Blender  V3.3
GHOST_IWindow.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 #include "GHOST_Rect.h"
12 #include "GHOST_Types.h"
13 
14 #include <stdlib.h>
15 #include <string>
16 
32  public:
36  virtual ~GHOST_IWindow()
37  {
38  }
39 
44  virtual bool getValid() const = 0;
45 
50  virtual void *getOSWindow() const = 0;
51 
57 
64 
69  virtual void setTitle(const char *title) = 0;
70 
75  virtual std::string getTitle() const = 0;
76 
82  virtual void getWindowBounds(GHOST_Rect &bounds) const = 0;
83 
89  virtual void getClientBounds(GHOST_Rect &bounds) const = 0;
90 
96 
102 
109 
117  virtual void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const = 0;
118 
126  virtual void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const = 0;
127 
131  virtual void setAcceptDragOperation(bool canAccept) = 0;
132 
137  virtual bool canAcceptDragOperation() const = 0;
138 
143  virtual GHOST_TWindowState getState() const = 0;
144 
151 
157  virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges) = 0;
158 
163  virtual bool getModifiedState() = 0;
164 
171 
177 
183  virtual GHOST_TSuccess setSwapInterval(int interval) = 0;
184 
191  virtual GHOST_TSuccess getSwapInterval(int &intervalOut) = 0;
192 
198 
203  virtual unsigned int getDefaultFramebuffer() = 0;
204 
209  virtual GHOST_TSuccess invalidate() = 0;
210 
215  virtual GHOST_TUserDataPtr getUserData() const = 0;
216 
221  virtual void setUserData(const GHOST_TUserDataPtr userData) = 0;
222 
223  virtual bool isDialog() const = 0;
224 
225  /***************************************************************************************
226  * Progress bar functionality
227  ***************************************************************************************/
228 
233  virtual GHOST_TSuccess setProgressBar(float progress) = 0;
234 
239 
240  /***************************************************************************************
241  * Cursor management functionality
242  ***************************************************************************************/
243 
249 
256 
258 
260  GHOST_TAxisFlag &axis_flag,
262  bool &use_software_cursor) = 0;
263 
265 
271 
281  uint8_t *mask,
282  int sizex,
283  int sizey,
284  int hotX,
285  int hotY,
286  bool canInvertColor) = 0;
287 
289 
294  virtual bool getCursorVisibility() const = 0;
295 
301  virtual GHOST_TSuccess setCursorVisibility(bool visible) = 0;
302 
309  GHOST_TAxisFlag /*wrap_axis*/,
310  GHOST_Rect * /*bounds*/,
311  int32_t /*mouse_ungrab_xy*/[2])
312  {
313  return GHOST_kSuccess;
314  }
315 
317  virtual GHOST_TSuccess beginFullScreen() const = 0;
318  virtual GHOST_TSuccess endFullScreen() const = 0;
319 
320  virtual float getNativePixelSize(void) = 0;
321 
326  virtual uint16_t getDPIHint() = 0;
327 
328 #ifdef WITH_INPUT_IME
340  virtual void beginIME(int32_t x, int32_t y, int32_t w, int32_t h, bool completed) = 0;
341 
346  virtual void endIME() = 0;
347 #endif /* WITH_INPUT_IME */
348 
349 #ifdef WITH_CXX_GUARDEDALLOC
350  MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow")
351 #endif
352 };
GHOST_TWindowState
Definition: GHOST_Types.h:129
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:72
GHOST_TStandardCursor
Definition: GHOST_Types.h:214
GHOST_TAxisFlag
Definition: GHOST_Types.h:420
GHOST_TDrawingContextType
Definition: GHOST_Types.h:148
GHOST_TWindowOrder
Definition: GHOST_Types.h:146
GHOST_TSuccess
Definition: GHOST_Types.h:74
@ GHOST_kSuccess
Definition: GHOST_Types.h:74
GHOST_TGrabCursorMode
Definition: GHOST_Types.h:404
_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 GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint order
static btDbvtVolume bounds(btDbvtNode **leaves, int count)
Definition: btDbvt.cpp:299
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
virtual GHOST_TSuccess beginFullScreen() const =0
virtual void setTitle(const char *title)=0
virtual void getClientBounds(GHOST_Rect &bounds) const =0
virtual void setAcceptDragOperation(bool canAccept)=0
virtual GHOST_TSuccess activateDrawingContext()=0
virtual bool getModifiedState()=0
virtual GHOST_TSuccess getCursorBitmap(GHOST_CursorBitmapRef *bitmap)=0
virtual GHOST_TSuccess endProgressBar()=0
virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order)=0
virtual bool canAcceptDragOperation() const =0
virtual void clientToScreen(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual GHOST_TSuccess setClientHeight(uint32_t height)=0
virtual GHOST_TSuccess setProgressBar(float progress)=0
virtual bool isDialog() const =0
virtual ~GHOST_IWindow()
Definition: GHOST_IWindow.h:36
virtual std::string getTitle() const =0
virtual GHOST_TSuccess setClientSize(uint32_t width, uint32_t height)=0
virtual GHOST_TSuccess setState(GHOST_TWindowState state)=0
virtual GHOST_TSuccess getSwapInterval(int &intervalOut)=0
virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual bool getCursorGrabUseSoftwareDisplay()=0
virtual GHOST_TSuccess setClientWidth(uint32_t width)=0
virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges)=0
virtual GHOST_TSuccess setCursorVisibility(bool visible)=0
virtual void getCursorGrabState(GHOST_TGrabCursorMode &mode, GHOST_TAxisFlag &axis_flag, GHOST_Rect &bounds, bool &use_software_cursor)=0
virtual void * getOSWindow() const =0
virtual void screenToClient(int32_t inX, int32_t inY, int32_t &outX, int32_t &outY) const =0
virtual void getWindowBounds(GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual bool getCursorVisibility() const =0
virtual GHOST_TSuccess setDrawingContextType(GHOST_TDrawingContextType type)=0
virtual bool getValid() const =0
virtual float getNativePixelSize(void)=0
virtual GHOST_TSuccess setSwapInterval(int interval)=0
virtual GHOST_TUserDataPtr getUserData() const =0
virtual GHOST_TSuccess invalidate()=0
virtual void setUserData(const GHOST_TUserDataPtr userData)=0
virtual GHOST_TDrawingContextType getDrawingContextType()=0
virtual GHOST_TSuccess swapBuffers()=0
virtual GHOST_TSuccess endFullScreen() const =0
virtual GHOST_TStandardCursor getCursorShape() const =0
virtual uint16_t getDPIHint()=0
virtual GHOST_TWindowState getState() const =0
virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode, GHOST_TAxisFlag, GHOST_Rect *, int32_t[2])
virtual GHOST_TSuccess setCustomCursorShape(uint8_t *bitmap, uint8_t *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)=0
virtual unsigned int getDefaultFramebuffer()=0
virtual GHOST_TSuccess getCursorGrabBounds(GHOST_Rect &bounds)=0
const int state
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
Definition: math_float4.h:513
unsigned short uint16_t
Definition: stdint.h:79
unsigned int uint32_t
Definition: stdint.h:80
signed int int32_t
Definition: stdint.h:77
unsigned char uint8_t
Definition: stdint.h:78