diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /intern/ghost/intern/GHOST_WindowNULL.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'intern/ghost/intern/GHOST_WindowNULL.h')
-rw-r--r-- | intern/ghost/intern/GHOST_WindowNULL.h | 210 |
1 files changed, 152 insertions, 58 deletions
diff --git a/intern/ghost/intern/GHOST_WindowNULL.h b/intern/ghost/intern/GHOST_WindowNULL.h index c7d9efcdc51..3ac3389291d 100644 --- a/intern/ghost/intern/GHOST_WindowNULL.h +++ b/intern/ghost/intern/GHOST_WindowNULL.h @@ -29,69 +29,163 @@ class STR_String; class GHOST_SystemNULL; -class GHOST_WindowNULL : public GHOST_Window -{ -public: - const GHOST_TabletData* GetTabletData() { return NULL; } +class GHOST_WindowNULL : public GHOST_Window { + public: + const GHOST_TabletData *GetTabletData() + { + return NULL; + } - GHOST_WindowNULL( - GHOST_SystemNULL *system, - const STR_String& title, - GHOST_TInt32 left, - GHOST_TInt32 top, - GHOST_TUns32 width, - GHOST_TUns32 height, - GHOST_TWindowState state, - const GHOST_TEmbedderWindowID parentWindow, - GHOST_TDrawingContextType type, - const bool stereoVisual, - const GHOST_TUns16 numOfAASamples - ) : - GHOST_Window(width, height, state, stereoVisual, false, numOfAASamples), - m_system(system) - { - setTitle(title); - } + GHOST_WindowNULL(GHOST_SystemNULL *system, + const STR_String &title, + GHOST_TInt32 left, + GHOST_TInt32 top, + GHOST_TUns32 width, + GHOST_TUns32 height, + GHOST_TWindowState state, + const GHOST_TEmbedderWindowID parentWindow, + GHOST_TDrawingContextType type, + const bool stereoVisual, + const GHOST_TUns16 numOfAASamples) + : GHOST_Window(width, height, state, stereoVisual, false, numOfAASamples), m_system(system) + { + setTitle(title); + } -protected: - GHOST_TSuccess installDrawingContext( GHOST_TDrawingContextType type ) { return GHOST_kSuccess; } - GHOST_TSuccess removeDrawingContext( ) { return GHOST_kSuccess; } - GHOST_TSuccess setWindowCursorGrab( GHOST_TGrabCursorMode mode ) { return GHOST_kSuccess; } - GHOST_TSuccess setWindowCursorShape( GHOST_TStandardCursor shape ) { return GHOST_kSuccess; } - GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 bitmap[16][2], GHOST_TUns8 mask[16][2], int hotX, int hotY ) { return GHOST_kSuccess; } - GHOST_TSuccess setWindowCustomCursorShape( GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, int fg_color, int bg_color ) { return GHOST_kSuccess; } + protected: + GHOST_TSuccess installDrawingContext(GHOST_TDrawingContextType type) + { + return GHOST_kSuccess; + } + GHOST_TSuccess removeDrawingContext() + { + return GHOST_kSuccess; + } + GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode) + { + return GHOST_kSuccess; + } + GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape) + { + return GHOST_kSuccess; + } + GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2], + GHOST_TUns8 mask[16][2], + int hotX, + int hotY) + { + return GHOST_kSuccess; + } + GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap, + GHOST_TUns8 *mask, + int sizex, + int sizey, + int hotX, + int hotY, + int fg_color, + int bg_color) + { + return GHOST_kSuccess; + } - bool getValid( ) const { return true; } - void setTitle( const STR_String& title ) { /* nothing */ } - void getTitle( STR_String& title ) const { title= "untitled"; } - void getWindowBounds( GHOST_Rect& bounds ) const { getClientBounds(bounds); } - void getClientBounds( GHOST_Rect& bounds ) const { /* nothing */ } - GHOST_TSuccess setClientWidth( GHOST_TUns32 width ) { return GHOST_kFailure; } - GHOST_TSuccess setClientHeight( GHOST_TUns32 height ) { return GHOST_kFailure; } - GHOST_TSuccess setClientSize( GHOST_TUns32 width, GHOST_TUns32 height ) { return GHOST_kFailure; } - void screenToClient( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; } - void clientToScreen( GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32& outX, GHOST_TInt32& outY ) const { outX = inX; outY = inY; } - GHOST_TSuccess swapBuffers( ) { return GHOST_kFailure; } - GHOST_TSuccess activateDrawingContext( ) { return GHOST_kFailure; } - ~GHOST_WindowNULL( ) { /* nothing */ } - GHOST_TSuccess setWindowCursorVisibility( bool visible ) { return GHOST_kSuccess; } - GHOST_TSuccess setState(GHOST_TWindowState state) { return GHOST_kSuccess; } - GHOST_TWindowState getState() const { return GHOST_kWindowStateNormal; } - GHOST_TSuccess invalidate() { return GHOST_kSuccess; } - GHOST_TSuccess setOrder(GHOST_TWindowOrder order) { return GHOST_kSuccess; } + bool getValid() const + { + return true; + } + void setTitle(const STR_String &title) + { /* nothing */ + } + void getTitle(STR_String &title) const + { + title = "untitled"; + } + void getWindowBounds(GHOST_Rect &bounds) const + { + getClientBounds(bounds); + } + void getClientBounds(GHOST_Rect &bounds) const + { /* nothing */ + } + GHOST_TSuccess setClientWidth(GHOST_TUns32 width) + { + return GHOST_kFailure; + } + GHOST_TSuccess setClientHeight(GHOST_TUns32 height) + { + return GHOST_kFailure; + } + GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height) + { + return GHOST_kFailure; + } + void screenToClient(GHOST_TInt32 inX, + GHOST_TInt32 inY, + GHOST_TInt32 &outX, + GHOST_TInt32 &outY) const + { + outX = inX; + outY = inY; + } + void clientToScreen(GHOST_TInt32 inX, + GHOST_TInt32 inY, + GHOST_TInt32 &outX, + GHOST_TInt32 &outY) const + { + outX = inX; + outY = inY; + } + GHOST_TSuccess swapBuffers() + { + return GHOST_kFailure; + } + GHOST_TSuccess activateDrawingContext() + { + return GHOST_kFailure; + } + ~GHOST_WindowNULL() + { /* nothing */ + } + GHOST_TSuccess setWindowCursorVisibility(bool visible) + { + return GHOST_kSuccess; + } + GHOST_TSuccess setState(GHOST_TWindowState state) + { + return GHOST_kSuccess; + } + GHOST_TWindowState getState() const + { + return GHOST_kWindowStateNormal; + } + GHOST_TSuccess invalidate() + { + return GHOST_kSuccess; + } + GHOST_TSuccess setOrder(GHOST_TWindowOrder order) + { + return GHOST_kSuccess; + } - GHOST_TSuccess beginFullScreen() const { return GHOST_kSuccess; } - GHOST_TSuccess endFullScreen() const { return GHOST_kSuccess; } + GHOST_TSuccess beginFullScreen() const + { + return GHOST_kSuccess; + } + GHOST_TSuccess endFullScreen() const + { + return GHOST_kSuccess; + } -private: - GHOST_SystemNULL *m_system; + private: + GHOST_SystemNULL *m_system; - /** - * \param type The type of rendering context create. - * \return Indication of success. - */ - GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) { return NULL; } + /** + * \param type The type of rendering context create. + * \return Indication of success. + */ + GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type) + { + return NULL; + } }; - -#endif // __GHOST_WINDOWNULL_H__ +#endif // __GHOST_WINDOWNULL_H__ |