ClangFormat: apply to source, most of intern
[blender.git] / intern / ghost / intern / GHOST_WindowSDL.h
index c732524..3a9a1ad 100644 (file)
@@ -28,7 +28,7 @@
 #include <map>
 
 extern "C" {
-       #include "SDL.h"
+#include "SDL.h"
 }
 
 #if !SDL_VERSION_ATLEAST(2, 0, 0)
@@ -38,133 +38,128 @@ extern "C" {
 class STR_String;
 class GHOST_SystemSDL;
 
-class GHOST_WindowSDL : public GHOST_Window
-{
-private:
-       GHOST_SystemSDL  *m_system;
-       bool m_valid_setup;
-       bool m_invalid_window;
+class GHOST_WindowSDL : public GHOST_Window {
+ private:
+  GHOST_SystemSDL *m_system;
+  bool m_valid_setup;
+  bool m_invalid_window;
 
-       SDL_Window       *m_sdl_win;
-       SDL_Cursor       *m_sdl_custom_cursor;
+  SDL_Window *m_sdl_win;
+  SDL_Cursor *m_sdl_custom_cursor;
 
-public:
+ public:
+  const GHOST_TabletData *GetTabletData()
+  {
+    return NULL;
+  }
+
+  GHOST_WindowSDL(GHOST_SystemSDL *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 = GHOST_kDrawingContextTypeNone,
+                  const bool stereoVisual = false,
+                  const bool exclusive = false,
+                  const GHOST_TUns16 numOfAASamples = 0);
 
-       const GHOST_TabletData *GetTabletData() {
-               return NULL;
-       }
+  ~GHOST_WindowSDL();
 
-       GHOST_WindowSDL(GHOST_SystemSDL *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 = GHOST_kDrawingContextTypeNone,
-                       const bool stereoVisual = false,
-                       const bool exclusive = false,
-                       const GHOST_TUns16 numOfAASamples = 0
-                       );
+  /* SDL specific */
+  SDL_Window *getSDLWindow()
+  {
+    return m_sdl_win;
+  }
 
-       ~GHOST_WindowSDL();
+  GHOST_TSuccess invalidate(void);
 
-       /* SDL specific */
-       SDL_Window *
-       getSDLWindow()
-       {
-               return m_sdl_win;
-       }
+  /**
+   * called by the X11 system implementation when expose events
+   * for the window have been pushed onto the GHOST queue
+   */
 
+  void validate()
+  {
+    m_invalid_window = false;
+  }
 
-       GHOST_TSuccess invalidate(void);
+  bool getValid() const;
 
-       /**
-        * called by the X11 system implementation when expose events
-        * for the window have been pushed onto the GHOST queue
-        */
+  void getWindowBounds(GHOST_Rect &bounds) const;
+  void getClientBounds(GHOST_Rect &bounds) const;
 
-       void validate()
-       {
-               m_invalid_window = false;
-       }
+ protected:
+  /**
+   * \param type  The type of rendering context create.
+   * \return Indication of success.
+   */
+  GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type);
 
-       bool getValid() const;
+  GHOST_TSuccess setWindowCursorGrab(GHOST_TGrabCursorMode mode);
 
-       void getWindowBounds(GHOST_Rect& bounds) const;
-       void getClientBounds(GHOST_Rect& bounds) const;
+  GHOST_TSuccess setWindowCursorShape(GHOST_TStandardCursor shape);
 
-protected:
+  GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
+                                            GHOST_TUns8 mask[16][2],
+                                            int hotX,
+                                            int hotY);
 
-       /**
-        * \param type  The type of rendering context create.
-        * \return Indication of success.
-        */
-       GHOST_Context *newDrawingContext(GHOST_TDrawingContextType type);
+  GHOST_TSuccess setWindowCustomCursorShape(GHOST_TUns8 *bitmap,
+                                            GHOST_TUns8 *mask,
+                                            int sizex,
+                                            int sizey,
+                                            int hotX,
+                                            int hotY,
+                                            int fg_color,
+                                            int bg_color);
 
-       GHOST_TSuccess
-       setWindowCursorGrab(GHOST_TGrabCursorMode mode);
+  GHOST_TSuccess setWindowCursorVisibility(bool visible);
 
-       GHOST_TSuccess
-       setWindowCursorShape(GHOST_TStandardCursor shape);
+  void setTitle(const STR_String &title);
 
-       GHOST_TSuccess
-       setWindowCustomCursorShape(GHOST_TUns8 bitmap[16][2],
-                                  GHOST_TUns8 mask[16][2],
-                                  int hotX, int hotY);
+  void getTitle(STR_String &title) const;
 
-       GHOST_TSuccess
-       setWindowCustomCursorShape(GHOST_TUns8 *bitmap,
-                                  GHOST_TUns8 *mask,
-                                  int sizex, int sizey,
-                                  int hotX, int hotY,
-                                  int fg_color, int bg_color);
+  GHOST_TSuccess setClientWidth(GHOST_TUns32 width);
 
-       GHOST_TSuccess
-       setWindowCursorVisibility(bool visible);
+  GHOST_TSuccess setClientHeight(GHOST_TUns32 height);
 
-       void
-       setTitle(const STR_String& title);
+  GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height);
 
-       void
-       getTitle(STR_String& title) const;
+  void screenToClient(GHOST_TInt32 inX,
+                      GHOST_TInt32 inY,
+                      GHOST_TInt32 &outX,
+                      GHOST_TInt32 &outY) const;
 
-       GHOST_TSuccess
-       setClientWidth(GHOST_TUns32 width);
+  void clientToScreen(GHOST_TInt32 inX,
+                      GHOST_TInt32 inY,
+                      GHOST_TInt32 &outX,
+                      GHOST_TInt32 &outY) const;
 
-       GHOST_TSuccess
-       setClientHeight(GHOST_TUns32 height);
+  GHOST_TSuccess setState(GHOST_TWindowState state);
+
+  GHOST_TWindowState getState() const;
 
-       GHOST_TSuccess
-       setClientSize(GHOST_TUns32 width,
-                     GHOST_TUns32 height);
+  GHOST_TSuccess setOrder(GHOST_TWindowOrder order)
+  {
+    // TODO
+    return GHOST_kSuccess;
+  }
+
+  // TODO
+  GHOST_TSuccess beginFullScreen() const
+  {
+    return GHOST_kFailure;
+  }
 
-       void
-       screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY,
-                      GHOST_TInt32& outX, GHOST_TInt32& outY) const;
+  GHOST_TSuccess endFullScreen() const
+  {
+    return GHOST_kFailure;
+  }
 
-       void
-       clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY,
-                      GHOST_TInt32& outX, GHOST_TInt32& outY) const;
-
-       GHOST_TSuccess
-       setState(GHOST_TWindowState state);
-
-       GHOST_TWindowState
-       getState() const;
-
-       GHOST_TSuccess setOrder(GHOST_TWindowOrder order)
-       {
-               // TODO
-               return GHOST_kSuccess;
-       }
-
-       // TODO
-       GHOST_TSuccess beginFullScreen() const { return GHOST_kFailure; }
-
-       GHOST_TSuccess endFullScreen() const { return GHOST_kFailure; }
-
-       GHOST_TUns16 getDPIHint();
+  GHOST_TUns16 getDPIHint();
 };
 
-
-#endif // __GHOST_WINDOWSDL_H__
+#endif  // __GHOST_WINDOWSDL_H__