Blender  V3.3
GHOST_SystemSDL.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
8 #pragma once
9 
10 #include "../GHOST_Types.h"
12 #include "GHOST_Event.h"
13 #include "GHOST_System.h"
14 #include "GHOST_TimerManager.h"
15 #include "GHOST_WindowSDL.h"
16 
17 extern "C" {
18 #include "SDL.h"
19 }
20 
21 #if !SDL_VERSION_ATLEAST(2, 0, 0)
22 # error "SDL 2.0 or newer is needed to build with Ghost"
23 #endif
24 
25 class GHOST_WindowSDL;
26 
27 class GHOST_SystemSDL : public GHOST_System {
28  public:
29  void addDirtyWindow(GHOST_WindowSDL *bad_wind);
30 
33 
34  bool processEvents(bool waitForEvent);
35 
37  {
38  return 0;
39  }
40 
42 
43  GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
44 
45  char *getClipboard(bool selection) const;
46 
47  void putClipboard(const char *buffer, bool selection) const;
48 
50 
51  uint8_t getNumDisplays() const;
52 
54 
56 
58 
60 
62 
64 
65  private:
66  GHOST_TSuccess init();
67 
68  GHOST_IWindow *createWindow(const char *title,
69  int32_t left,
70  int32_t top,
75  GHOST_GLSettings glSettings,
76  const bool exclusive = false,
77  const bool is_dialog = false,
78  const GHOST_IWindow *parentWindow = NULL);
79 
80  /* SDL specific */
81  GHOST_WindowSDL *findGhostWindow(SDL_Window *sdl_win);
82 
83  bool generateWindowExposeEvents();
84 
85  void processEvent(SDL_Event *sdl_event);
86 
88  std::vector<GHOST_WindowSDL *> m_dirty_windows;
89 };
GHOST_TWindowState
Definition: GHOST_Types.h:129
GHOST_TDrawingContextType
Definition: GHOST_Types.h:148
GHOST_TSuccess
Definition: GHOST_Types.h:74
GHOST_TConsoleWindowState
Definition: GHOST_Types.h:139
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble top
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const
bool processEvents(bool waitForEvent)
GHOST_IContext * createOffscreenContext(GHOST_GLSettings glSettings)
int setConsoleWindowState(GHOST_TConsoleWindowState)
uint8_t getNumDisplays() const
GHOST_TSuccess disposeContext(GHOST_IContext *context)
char * getClipboard(bool selection) const
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y)
void addDirtyWindow(GHOST_WindowSDL *bad_wind)
void putClipboard(const char *buffer, bool selection) const
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const
uint64_t getMilliSeconds()
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const
ccl_global float * buffer
const int state
static int left
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78
unsigned __int64 uint64_t
Definition: stdint.h:90