Blender  V3.3
GHOST_SystemCocoa.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
9 #pragma once
10 
11 #ifndef __APPLE__
12 # error Apple OSX only!
13 #endif // __APPLE__
14 
15 //#define __CARBONSOUND__
16 
17 #include "GHOST_System.h"
18 
19 class GHOST_EventCursor;
20 class GHOST_EventKey;
21 class GHOST_EventWindow;
22 class GHOST_WindowCocoa;
23 
25  public:
30 
35 
36  /***************************************************************************************
37  * Time(r) functionality
38  ***************************************************************************************/
39 
46  uint64_t getMilliSeconds() const;
47 
48  /***************************************************************************************
49  * Display/window management functionality
50  ***************************************************************************************/
51 
56  uint8_t getNumDisplays() const;
57 
63 
68 
86  GHOST_IWindow *createWindow(const char *title,
87  int32_t left,
88  int32_t top,
93  GHOST_GLSettings glSettings,
94  const bool exclusive = false,
95  const bool is_dialog = false,
96  const GHOST_IWindow *parentWindow = NULL);
97 
104 
111 
119 
120  /***************************************************************************************
121  * Event management functionality
122  ***************************************************************************************/
123 
129  bool processEvents(bool waitForEvent);
130 
135  void handleQuitRequest();
136 
141  bool handleOpenDocumentRequest(void *filepathStr);
142 
154  GHOST_TDragnDropTypes draggedObjectType,
155  GHOST_WindowCocoa *window,
156  int mouseX,
157  int mouseY,
158  void *data);
159 
160  /***************************************************************************************
161  * Cursor management functionality
162  ***************************************************************************************/
163 
171 
179 
180  /***************************************************************************************
181  * Access to mouse button and keyboard states.
182  ***************************************************************************************/
183 
190 
196  GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const;
197 
203  char *getClipboard(bool selection) const;
204 
210  void putClipboard(const char *buffer, bool selection) const;
211 
219 
225 
229  bool hasDialogWindow();
230 
235 
240  {
241  return 0;
242  }
243 
252  GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType);
253  bool handleTabletEvent(void *eventPtr);
254 
260  GHOST_TSuccess handleMouseEvent(void *eventPtr);
261 
267  GHOST_TSuccess handleKeyEvent(void *eventPtr);
268 
269  protected:
276 
284 
287 
291 
295 
298 
301 
309 };
GHOST_TWindowState
Definition: GHOST_Types.h:129
GHOST_TEventType
Definition: GHOST_Types.h:169
GHOST_TDrawingContextType
Definition: GHOST_Types.h:148
GHOST_TSuccess
Definition: GHOST_Types.h:74
GHOST_TDragnDropTypes
Definition: GHOST_Types.h:474
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
bool processEvents(bool waitForEvent)
GHOST_TSuccess disposeContext(GHOST_IContext *context)
GHOST_TSuccess handleWindowEvent(GHOST_TEventType eventType, GHOST_WindowCocoa *window)
GHOST_TSuccess handleDraggingEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType, GHOST_WindowCocoa *window, int mouseX, int mouseY, void *data)
GHOST_IWindow * getWindowUnderCursor(int32_t x, int32_t y)
bool m_needDelayedApplicationBecomeActiveEventProcessing
GHOST_TSuccess handleApplicationBecomeActiveEvent()
GHOST_TSuccess setCursorPosition(int32_t x, int32_t y)
GHOST_TSuccess handleMouseEvent(void *eventPtr)
GHOST_TSuccess handleKeyEvent(void *eventPtr)
uint8_t getNumDisplays() const
void getAllDisplayDimensions(uint32_t &width, uint32_t &height) const
GHOST_TSuccess getButtons(GHOST_Buttons &buttons) const
void putClipboard(const char *buffer, bool selection) const
void getMainDisplayDimensions(uint32_t &width, uint32_t &height) const
GHOST_TSuccess handleTabletEvent(void *eventPtr, short eventType)
bool handleOpenDocumentRequest(void *filepathStr)
GHOST_TSuccess getModifierKeys(GHOST_ModifierKeys &keys) const
uint64_t getMilliSeconds() const
char * getClipboard(bool selection) const
GHOST_TSuccess setMouseCursorPosition(int32_t x, int32_t y)
GHOST_IContext * createOffscreenContext(GHOST_GLSettings glSettings)
GHOST_TSuccess getCursorPosition(int32_t &x, int32_t &y) const
int setConsoleWindowState(GHOST_TConsoleWindowState action)
GHOST_IWindow * createWindow(const char *title, int32_t left, int32_t top, uint32_t width, uint32_t height, GHOST_TWindowState state, GHOST_TDrawingContextType type, GHOST_GLSettings glSettings, const bool exclusive=false, const bool is_dialog=false, const GHOST_IWindow *parentWindow=NULL)
GHOST_TSuccess init()
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