Blender  V2.93
GHOST_IWindow.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
25 #pragma once
26 
27 #include "GHOST_Rect.h"
28 #include "GHOST_Types.h"
29 
30 #include <stdlib.h>
31 #include <string>
32 
48  public:
52  virtual ~GHOST_IWindow()
53  {
54  }
55 
60  virtual bool getValid() const = 0;
61 
66  virtual void *getOSWindow() const = 0;
67 
73 
80 
85  virtual void setTitle(const char *title) = 0;
86 
91  virtual std::string getTitle() const = 0;
92 
98  virtual void getWindowBounds(GHOST_Rect &bounds) const = 0;
99 
105  virtual void getClientBounds(GHOST_Rect &bounds) const = 0;
106 
112 
118 
125 
133  virtual void screenToClient(GHOST_TInt32 inX,
134  GHOST_TInt32 inY,
135  GHOST_TInt32 &outX,
136  GHOST_TInt32 &outY) const = 0;
137 
145  virtual void clientToScreen(GHOST_TInt32 inX,
146  GHOST_TInt32 inY,
147  GHOST_TInt32 &outX,
148  GHOST_TInt32 &outY) const = 0;
149 
153  virtual void setAcceptDragOperation(bool canAccept) = 0;
154 
159  virtual bool canAcceptDragOperation() const = 0;
160 
165  virtual GHOST_TWindowState getState() const = 0;
166 
173 
179  virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges) = 0;
180 
185  virtual bool getModifiedState() = 0;
186 
193 
199 
205  virtual GHOST_TSuccess setSwapInterval(int interval) = 0;
206 
213  virtual GHOST_TSuccess getSwapInterval(int &intervalOut) = 0;
214 
220 
225  virtual unsigned int getDefaultFramebuffer() = 0;
226 
231  virtual GHOST_TSuccess invalidate() = 0;
232 
237  virtual GHOST_TUserDataPtr getUserData() const = 0;
238 
243  virtual void setUserData(const GHOST_TUserDataPtr userData) = 0;
244 
245  virtual bool isDialog() const = 0;
246 
247  /***************************************************************************************
248  * Progress bar functionality
249  ***************************************************************************************/
250 
255  virtual GHOST_TSuccess setProgressBar(float progress) = 0;
256 
261 
262  /***************************************************************************************
263  * Cursor management functionality
264  ***************************************************************************************/
265 
271 
278 
284 
294  GHOST_TUns8 *mask,
295  int sizex,
296  int sizey,
297  int hotX,
298  int hotY,
299  bool canInvertColor) = 0;
300 
305  virtual bool getCursorVisibility() const = 0;
306 
312  virtual GHOST_TSuccess setCursorVisibility(bool visible) = 0;
313 
320  GHOST_TAxisFlag /*wrap_axis*/,
321  GHOST_Rect * /*bounds*/,
322  GHOST_TInt32 /*mouse_ungrab_xy*/[2])
323  {
324  return GHOST_kSuccess;
325  }
326 
328  virtual GHOST_TSuccess beginFullScreen() const = 0;
329  virtual GHOST_TSuccess endFullScreen() const = 0;
330 
331  virtual float getNativePixelSize(void) = 0;
332 
337  virtual GHOST_TUns16 getDPIHint() = 0;
338 
339 #ifdef WITH_INPUT_IME
351  virtual void beginIME(
352  GHOST_TInt32 x, GHOST_TInt32 y, GHOST_TInt32 w, GHOST_TInt32 h, int completed) = 0;
353 
358  virtual void endIME() = 0;
359 #endif /* WITH_INPUT_IME */
360 
361 #ifdef WITH_CXX_GUARDEDALLOC
362  MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_IWindow")
363 #endif
364 };
GHOST_TWindowState
Definition: GHOST_Types.h:144
void * GHOST_TUserDataPtr
Definition: GHOST_Types.h:89
GHOST_TStandardCursor
Definition: GHOST_Types.h:222
unsigned int GHOST_TUns32
Definition: GHOST_Types.h:64
int GHOST_TInt32
Definition: GHOST_Types.h:63
GHOST_TAxisFlag
Definition: GHOST_Types.h:423
unsigned short GHOST_TUns16
Definition: GHOST_Types.h:62
GHOST_TDrawingContextType
Definition: GHOST_Types.h:156
GHOST_TWindowOrder
Definition: GHOST_Types.h:154
GHOST_TSuccess
Definition: GHOST_Types.h:91
@ GHOST_kSuccess
Definition: GHOST_Types.h:91
GHOST_TGrabCursorMode
Definition: GHOST_Types.h:412
unsigned char GHOST_TUns8
Definition: GHOST_Types.h:60
_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 type
_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 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 GHOST_TSuccess setCustomCursorShape(GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor)=0
virtual bool getModifiedState()=0
virtual GHOST_TSuccess endProgressBar()=0
virtual GHOST_TSuccess setClientWidth(GHOST_TUns32 width)=0
virtual GHOST_TSuccess setOrder(GHOST_TWindowOrder order)=0
virtual bool canAcceptDragOperation() const =0
virtual GHOST_TSuccess setClientSize(GHOST_TUns32 width, GHOST_TUns32 height)=0
virtual GHOST_TSuccess setProgressBar(float progress)=0
virtual bool isDialog() const =0
virtual ~GHOST_IWindow()
Definition: GHOST_IWindow.h:52
virtual std::string getTitle() const =0
virtual GHOST_TSuccess setState(GHOST_TWindowState state)=0
virtual void screenToClient(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const =0
virtual GHOST_TSuccess getSwapInterval(int &intervalOut)=0
virtual GHOST_TSuccess setCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual GHOST_TSuccess setModifiedState(bool isUnsavedChanges)=0
virtual GHOST_TSuccess setCursorGrab(GHOST_TGrabCursorMode, GHOST_TAxisFlag, GHOST_Rect *, GHOST_TInt32[2])
virtual GHOST_TSuccess setCursorVisibility(bool visible)=0
virtual GHOST_TSuccess setClientHeight(GHOST_TUns32 height)=0
virtual void * getOSWindow() const =0
virtual void getWindowBounds(GHOST_Rect &bounds) const =0
virtual GHOST_TSuccess hasCursorShape(GHOST_TStandardCursor cursorShape)=0
virtual GHOST_TUns16 getDPIHint()=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 void clientToScreen(GHOST_TInt32 inX, GHOST_TInt32 inY, GHOST_TInt32 &outX, GHOST_TInt32 &outY) const =0
virtual GHOST_TStandardCursor getCursorShape() const =0
virtual GHOST_TWindowState getState() const =0
virtual unsigned int getDefaultFramebuffer()=0
static ulong state[N]
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)