|
Blender
V2.93
|
#include <GHOST_WindowX11.h>
Inherits GHOST_Window.
Public Attributes | |
| bool | m_post_init |
| GHOST_TWindowState | m_post_state |
Protected Member Functions | |
| GHOST_Context * | newDrawingContext (GHOST_TDrawingContextType type) |
| GHOST_TSuccess | setWindowCursorVisibility (bool visible) |
| GHOST_TSuccess | setWindowCursorGrab (GHOST_TGrabCursorMode mode) |
| GHOST_TGrabCursorMode | getWindowCursorGrab () const |
| GHOST_TSuccess | setWindowCursorShape (GHOST_TStandardCursor shape) |
| GHOST_TSuccess | hasCursorShape (GHOST_TStandardCursor shape) |
| GHOST_TSuccess | setWindowCustomCursorShape (GHOST_TUns8 *bitmap, GHOST_TUns8 *mask, int sizex, int sizey, int hotX, int hotY, bool canInvertColor) |
Protected Member Functions inherited from GHOST_Window | |
| GHOST_TSuccess | releaseNativeHandles () |
Additional Inherited Members | |
Protected Attributes inherited from GHOST_Window | |
| GHOST_TDrawingContextType | m_drawingContextType |
| GHOST_TUserDataPtr | m_userData |
| bool | m_cursorVisible |
| GHOST_TGrabCursorMode | m_cursorGrab |
| GHOST_TAxisFlag | m_cursorGrabAxis |
| GHOST_TInt32 | m_cursorGrabInitPos [2] |
| GHOST_TInt32 | m_cursorGrabAccumPos [2] |
| GHOST_Rect | m_cursorGrabBounds |
| GHOST_TStandardCursor | m_cursorShape |
| bool | m_progressBarVisible |
| bool | m_canAcceptDragOperation |
| bool | m_isUnsavedChanges |
| bool | m_fullScreen |
| bool | m_wantStereoVisual |
| GHOST_TUns32 | m_fullScreenWidth |
| GHOST_TUns32 | m_fullScreenHeight |
| float | m_nativePixelSize |
X11 implementation of GHOST_IWindow. Dimensions are given in screen coordinates that are relative to the upper-left corner of the screen.
Definition at line 51 of file GHOST_WindowX11.h.
| GHOST_WindowX11::GHOST_WindowX11 | ( | GHOST_SystemX11 * | system, |
| Display * | display, | ||
| const char * | title, | ||
| GHOST_TInt32 | left, | ||
| GHOST_TInt32 | top, | ||
| GHOST_TUns32 | width, | ||
| GHOST_TUns32 | height, | ||
| GHOST_TWindowState | state, | ||
| GHOST_WindowX11 * | parentWindow, | ||
| GHOST_TDrawingContextType | type = GHOST_kDrawingContextTypeNone, |
||
| const bool | is_dialog = false, |
||
| const bool | stereoVisual = false, |
||
| const bool | exclusive = false, |
||
| const bool | alphaBackground = false, |
||
| const bool | is_debug = false |
||
| ) |
Constructor. Creates a new window and opens it. To check if the window was created properly, use the getValid() method.
| title | The text shown in the title bar of the window. |
| left | The coordinate of the left edge of the window. |
| top | The coordinate of the top edge of the window. |
| width | The width the window. |
| height | The height the window. |
| state | The state the window is initially opened with. |
| parentWindow | Parent (embedder) window. |
| type | The type of drawing context installed in this window. |
| stereoVisual | Stereo visual for quad buffered stereo. |
| alphaBackground | Enable alpha blending of window with display background. |
Definition at line 213 of file GHOST_WindowX11.cpp.
References GHOST_SystemX11::_NET_WM_STATE, GHOST_SystemX11::_NET_WM_STATE_FULLSCREEN, GHOST_SystemX11::_NET_WM_STATE_MAXIMIZED_HORZ, GHOST_SystemX11::_NET_WM_STATE_MAXIMIZED_VERT, BLENDER_ICONS_WM_X11, count, free(), GHOST_kDrawingContextTypeOpenGL, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_PRINT, GHOST_WindowX11(), height, HOST_NAME_MAX, left, len, GHOST_SystemX11::m_atom, m_post_init, m_post_state, GHOST_System::m_windowFocus, NULL, setDialogHints(), GHOST_Window::setDrawingContextType(), setTitle(), state, top, type, width, GHOST_SystemX11::WM_DELETE_WINDOW, GHOST_SystemX11::WM_PROTOCOLS, GHOST_SystemX11::WM_TAKE_FOCUS, and x11_visualinfo_from_glx().
Referenced by GHOST_WindowX11().
| GHOST_WindowX11::~GHOST_WindowX11 | ( | ) |
Destructor. Closes the window and disposes resources allocated.
Definition at line 1227 of file GHOST_WindowX11.cpp.
References GHOST_Window::releaseNativeHandles().
|
virtual |
Implements GHOST_IWindow.
Definition at line 1630 of file GHOST_WindowX11.cpp.
References err, GHOST_kSuccess, and GHOST_SystemX11::setCursorPosition().
|
virtual |
Converts a point in screen coordinates to client rectangle coordinates
| inX | The x-coordinate in the client rectangle. |
| inY | The y-coordinate in the client rectangle. |
| outX | The x-coordinate on the screen. |
| outY | The y-coordinate on the screen. |
Implements GHOST_IWindow.
Definition at line 690 of file GHOST_WindowX11.cpp.
Referenced by getClientBounds().
|
virtual |
Implements GHOST_IWindow.
Definition at line 1672 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess.
|
virtual |
Hides the progress bar in the icon
Reimplemented from GHOST_Window.
Definition at line 1731 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, GHOST_TaskBarX11::is_valid(), and GHOST_TaskBarX11::set_progress_enabled().
|
virtual |
Returns the client rectangle dimensions. The left and top members of the rectangle are always zero.
| bounds | The bounding rectangle of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 620 of file GHOST_WindowX11.cpp.
References bounds(), and clientToScreen().
Referenced by getWindowBounds().
|
virtual |
Returns the recommended DPI for this window.
Reimplemented from GHOST_Window.
Definition at line 1680 of file GHOST_WindowX11.cpp.
|
virtual |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 987 of file GHOST_WindowX11.cpp.
References GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by setState().
|
inline |
Definition at line 146 of file GHOST_WindowX11.h.
|
virtual |
Returns the title displayed in the title bar.
| title | The title displayed in the title bar. |
Implements GHOST_IWindow.
Definition at line 603 of file GHOST_WindowX11.cpp.
References NULL.
|
virtual |
Returns indication as to whether the window is valid.
Reimplemented from GHOST_Window.
Definition at line 578 of file GHOST_WindowX11.cpp.
References GHOST_Window::getValid().
Referenced by GHOST_SystemX11::createWindow().
|
virtual |
Returns the window rectangle dimensions. These are screen coordinates.
| bounds | The bounding rectangle of the window. |
Implements GHOST_IWindow.
Definition at line 613 of file GHOST_WindowX11.cpp.
References bounds(), and getClientBounds().
|
protected |
| Window GHOST_WindowX11::getXWindow | ( | ) |
Return a handle to the x11 window type.
Definition at line 573 of file GHOST_WindowX11.cpp.
Referenced by GHOST_SystemX11::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), GHOST_DropTargetX11::GHOST_DropTargetX11(), and GHOST_SystemX11::putClipboard().
|
protectedvirtual |
Test if the standard cursor shape is supported by current platform.
Implements GHOST_IWindow.
Definition at line 1585 of file GHOST_WindowX11.cpp.
|
virtual |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 1189 of file GHOST_WindowX11.cpp.
References GHOST_SystemX11::addDirtyWindow(), and GHOST_kSuccess.
|
virtual |
Reimplemented from GHOST_Window.
Definition at line 1151 of file GHOST_WindowX11.cpp.
|
protectedvirtual |
| type | The type of rendering context create. |
Implements GHOST_Window.
Definition at line 1280 of file GHOST_WindowX11.cpp.
References context, GHOST_kDrawingContextTypeOpenGL, GHOST_OPENGL_EGL_CONTEXT_FLAGS, GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY, GHOST_OPENGL_GLX_CONTEXT_FLAGS, GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY, GHOST_Window::m_wantStereoVisual, NULL, and type.
|
virtual |
Converts a point in screen coordinates to client rectangle coordinates
| inX | The x-coordinate on the screen. |
| inY | The y-coordinate on the screen. |
| outX | The x-coordinate in the client rectangle. |
| outY | The y-coordinate in the client rectangle. |
Implements GHOST_IWindow.
Definition at line 674 of file GHOST_WindowX11.cpp.
|
virtual |
Resizes client rectangle height.
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 655 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess, and height.
|
virtual |
Resizes client rectangle.
| width | The new width of the client area of the window. |
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 664 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess, height, and width.
|
virtual |
Resizes client rectangle width.
| width | The new width of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 645 of file GHOST_WindowX11.cpp.
References GHOST_kSuccess, and width.
| GHOST_TSuccess GHOST_WindowX11::setDialogHints | ( | GHOST_WindowX11 * | parentWindow | ) |
Definition at line 704 of file GHOST_WindowX11.cpp.
References GHOST_SystemX11::_MOTIF_WM_HINTS, MotifWmHints::flags, MotifWmHints::functions, GHOST_kSuccess, GHOST_SystemX11::m_atom, MWM_FUNCTION_CLOSE, MWM_FUNCTION_MAXIMIZE, MWM_FUNCTION_MOVE, MWM_FUNCTION_RESIZE, and MWM_HINTS_FUNCTIONS.
Referenced by GHOST_WindowX11().
|
virtual |
Sets the order of the window (bottom, top).
| order | The order of the window. |
Implements GHOST_IWindow.
Definition at line 1095 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowOrderBottom, GHOST_kWindowOrderTop, and order.
|
virtual |
Sets the progress bar value displayed in the window/application icon
| progress | The progress percentage (0.0 to 1.0). |
Reimplemented from GHOST_Window.
Definition at line 1720 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, GHOST_TaskBarX11::is_valid(), GHOST_TaskBarX11::set_progress(), and GHOST_TaskBarX11::set_progress_enabled().
|
virtual |
Sets the state of the window (normal, minimized, maximized).
| state | The state of the window. |
Implements GHOST_IWindow.
Definition at line 1009 of file GHOST_WindowX11.cpp.
References getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
|
virtual |
Sets the title displayed in the title bar.
| title | The title to display in the title bar. |
Implements GHOST_IWindow.
Definition at line 583 of file GHOST_WindowX11.cpp.
Referenced by GHOST_WindowX11().
|
protectedvirtual |
Sets the cursor grab on the window using native window system calls.
Reimplemented from GHOST_Window.
Definition at line 1504 of file GHOST_WindowX11.cpp.
References GHOST_SystemX11::getCursorPosition(), GHOST_kGrabDisable, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kSuccess, GHOST_Window::m_cursorGrab, GHOST_Window::m_cursorGrabBounds, GHOST_Window::m_cursorGrabInitPos, GHOST_Rect::m_l, GHOST_Rect::m_r, GHOST_Window::setCursorGrabAccum(), GHOST_SystemX11::setCursorPosition(), and setWindowCursorVisibility().
|
protectedvirtual |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1570 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kStandardCursorDefault, and GHOST_kSuccess.
|
protectedvirtual |
Sets the cursor visibility on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1482 of file GHOST_WindowX11.cpp.
References GHOST_Window::getCursorShape(), GHOST_kFailure, and GHOST_kSuccess.
Referenced by setWindowCursorGrab().
|
protectedvirtual |
Sets the cursor shape on the window using native window system calls (Arbitrary size/color).
Implements GHOST_Window.
Definition at line 1591 of file GHOST_WindowX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, L, and mask().
| void GHOST_WindowX11::validate | ( | ) |
The reverse of invalidate! Tells this window that all events for it have been pushed into the GHOST event queue.
called by the X11 system implementation when expose events for the window have been pushed onto the GHOST queue
Definition at line 1217 of file GHOST_WindowX11.cpp.
| bool GHOST_WindowX11::m_post_init |
Definition at line 176 of file GHOST_WindowX11.h.
Referenced by GHOST_WindowX11().
| GHOST_TWindowState GHOST_WindowX11::m_post_state |
Definition at line 177 of file GHOST_WindowX11.h.
Referenced by GHOST_WindowX11().