|
Blender V5.3
|
#include <GHOST_WindowX11.hh>
Inherits GHOST_Window.
Public Attributes | |
| bool | post_init_ |
| GHOST_TWindowState | post_state_ |
Protected Member Functions | |
| GHOST_Context * | newDrawingContext (GHOST_TDrawingContextType type) override |
| GHOST_TSuccess | setWindowCursorVisibility (bool visible) override |
| GHOST_TSuccess | setWindowCursorGrab (GHOST_TGrabCursorMode mode) override |
| GHOST_TGrabCursorMode | getWindowCursorGrab () const |
| GHOST_TSuccess | setWindowCursorShape (GHOST_TStandardCursor shape) override |
| GHOST_TSuccess | hasCursorShape (GHOST_TStandardCursor shape) override |
| GHOST_TSuccess | setWindowCustomCursorShape (const uint8_t *bitmap, const uint8_t *mask, const int size[2], const int hot_spot[2], bool can_invert_color) override |
| Protected Member Functions inherited from GHOST_Window | |
| virtual GHOST_TSuccess | setWindowCustomCursorGenerator (GHOST_CursorGenerator *cursor_generator) |
| virtual bool | getCursorGrabUseSoftwareDisplay () |
| virtual bool | getModifiedState () |
| GHOST_TSuccess | releaseNativeHandles () |
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 33 of file GHOST_WindowX11.hh.
| GHOST_WindowX11::GHOST_WindowX11 | ( | GHOST_SystemX11 * | system, |
| Display * | display, | ||
| const char * | title, | ||
| int32_t | left, | ||
| int32_t | top, | ||
| uint32_t | width, | ||
| uint32_t | height, | ||
| GHOST_TWindowState | state, | ||
| GHOST_WindowX11 * | parent_window, | ||
| GHOST_TDrawingContextType | type, | ||
| const bool | is_dialog, | ||
| const GHOST_ContextParams & | context_params, | ||
| const bool | exclusive, | ||
| const GHOST_GPUDevice & | preferred_device ) |
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. |
| parent_window | Parent (embedder) window. |
| type | The type of drawing context installed in this window. |
| context_params | Parameters to use when initializing the context. |
| preferred_device | Preferred device to use when new device will be created. |
Definition at line 102 of file GHOST_WindowX11.cc.
References ARRAY_SIZE(), Display, ELEM, GHOST_ISystem::getUseWindowFrame(), GHOST_DialogError, GHOST_DropTargetX11::GHOST_DropTargetX11(), GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_PRINT, GHOST_Window::GHOST_Window(), GHOST_WindowX11(), HOST_NAME_MAX, if(), len(), post_init_, post_state_, setDialogHints(), GHOST_Window::setDrawingContextType(), setTitle(), GHOST_SystemX11::showMessageBox(), state, and GHOST_System::window_focus_.
Referenced by GHOST_SystemX11::createWindow(), getWindowCursorGrab(), GHOST_WindowX11(), and setDialogHints().
|
override |
Destructor. Closes the window and disposes resources allocated.
Definition at line 1167 of file GHOST_WindowX11.cc.
References GHOST_Window::releaseNativeHandles(), and Window.
|
overridevirtual |
Converts a point in client rectangle coordinates to screen 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 594 of file GHOST_WindowX11.cc.
References Window.
Referenced by getClientBounds().
|
overridevirtual |
Hides the progress bar in the icon.
Reimplemented from GHOST_Window.
Definition at line 1584 of file GHOST_WindowX11.cc.
References GHOST_kFailure.
|
overridevirtual |
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 527 of file GHOST_WindowX11.cc.
References GHOST_Rect::b_, clientToScreen(), GHOST_Rect::l_, GHOST_Rect::r_, GHOST_Rect::t_, and Window.
Referenced by getWindowBounds().
|
overridevirtual |
Returns the recommended DPI for this window.
Reimplemented from GHOST_Window.
Definition at line 1529 of file GHOST_WindowX11.cc.
|
overridevirtual |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 914 of file GHOST_WindowX11.cc.
References ELEM, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
Referenced by setState().
|
inline |
Definition at line 121 of file GHOST_WindowX11.hh.
|
overridevirtual |
Returns the title displayed in the title bar.
Implements GHOST_IWindow.
Definition at line 510 of file GHOST_WindowX11.cc.
|
overridevirtual |
Returns indication as to whether the window is valid.
Reimplemented from GHOST_Window.
Definition at line 491 of file GHOST_WindowX11.cc.
References GHOST_Window::getValid().
Referenced by GHOST_SystemX11::createWindow().
|
overridevirtual |
Returns the window rectangle dimensions. These are screen coordinates.
| bounds | The bounding rectangle of the window. |
Implements GHOST_IWindow.
Definition at line 520 of file GHOST_WindowX11.cc.
References getClientBounds().
|
protected |
References Display, GHOST_WindowX11(), hasCursorShape(), mask(), setWindowCursorShape(), setWindowCustomCursorShape(), state, and Window.
| Window GHOST_WindowX11::getXWindow | ( | ) |
Return a handle to the x11 window type.
Definition at line 486 of file GHOST_WindowX11.cc.
References Window.
Referenced by GHOST_SystemX11::getClipboard(), GHOST_SystemX11::getClipboard_xcout(), GHOST_DropTargetX11::GHOST_DropTargetX11(), and GHOST_SystemX11::putClipboard().
|
overrideprotectedvirtual |
Test if the standard cursor shape is supported by current platform.
Implements GHOST_IWindow.
Definition at line 1483 of file GHOST_WindowX11.cc.
Referenced by getWindowCursorGrab().
|
overridevirtual |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 1134 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
|
overridevirtual |
Reimplemented from GHOST_Window.
Definition at line 1096 of file GHOST_WindowX11.cc.
References INT_MAX.
|
overrideprotectedvirtual |
| type | The type of rendering context create. |
Implements GHOST_Window.
Definition at line 1220 of file GHOST_WindowX11.cc.
References GHOST_ContextEGL::GHOST_ContextEGL(), GHOST_ContextGLX::GHOST_ContextGLX(), GHOST_ContextVK::GHOST_ContextVK(), GHOST_OPENGL_EGL_CONTEXT_FLAGS, GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY, GHOST_OPENGL_GLX_CONTEXT_FLAGS, GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY, GHOST_Window::hdr_info_, GHOST_ContextParams::is_debug, and GHOST_Window::want_context_params_.
|
overridevirtual |
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 581 of file GHOST_WindowX11.cc.
References Window.
|
overridevirtual |
Resizes client rectangle height.
| height | The new height of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 562 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
|
overridevirtual |
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 571 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
|
overridevirtual |
Resizes client rectangle width.
| width | The new width of the client area of the window. |
Implements GHOST_IWindow.
Definition at line 552 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
| GHOST_TSuccess GHOST_WindowX11::setDialogHints | ( | GHOST_WindowX11 * | parent_window | ) |
Definition at line 605 of file GHOST_WindowX11.cc.
References MotifWmHints::flags, MotifWmHints::functions, GHOST_kSuccess, GHOST_WindowX11(), MWM_FUNCTION_CLOSE, MWM_FUNCTION_MAXIMIZE, MWM_FUNCTION_MOVE, MWM_FUNCTION_RESIZE, and MWM_HINTS_FUNCTIONS.
Referenced by GHOST_WindowX11().
|
overridevirtual |
Sets the order of the window (bottom, top).
| order | The order of the window. |
Implements GHOST_IWindow.
Definition at line 1039 of file GHOST_WindowX11.cc.
References GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowOrderBottom, GHOST_kWindowOrderTop, and Window.
|
overridevirtual |
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 1579 of file GHOST_WindowX11.cc.
References GHOST_kFailure.
|
overridevirtual |
Sets the state of the window (normal, minimized, maximized).
| state | The state of the window. |
Implements GHOST_IWindow.
Definition at line 940 of file GHOST_WindowX11.cc.
References getState(), GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, and state.
|
overridevirtual |
Sets the title displayed in the title bar.
| title | The title to display in the title bar. |
Implements GHOST_IWindow.
Definition at line 496 of file GHOST_WindowX11.cc.
Referenced by GHOST_WindowX11().
|
overrideprotectedvirtual |
Sets the cursor grab on the window using native window system calls.
Reimplemented from GHOST_Window.
Definition at line 1402 of file GHOST_WindowX11.cc.
References GHOST_Window::cursor_grab_, GHOST_Window::cursor_grab_bounds_, GHOST_Window::cursor_grab_init_pos_, GHOST_kGrabDisable, GHOST_kGrabHide, GHOST_kGrabNormal, GHOST_kSuccess, GHOST_Rect::l_, GHOST_Rect::r_, GHOST_Window::setCursorGrabAccum(), setWindowCursorVisibility(), and UNPACK2.
|
overrideprotectedvirtual |
Sets the cursor shape on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1468 of file GHOST_WindowX11.cc.
References GHOST_kFailure, GHOST_kStandardCursorDefault, and GHOST_kSuccess.
Referenced by getWindowCursorGrab().
|
overrideprotectedvirtual |
Sets the cursor visibility on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1380 of file GHOST_WindowX11.cc.
References GHOST_Window::getCursorShape(), GHOST_kFailure, and GHOST_kSuccess.
Referenced by setWindowCursorGrab().
|
overrideprotectedvirtual |
Sets the cursor shape on the window using native window system calls (Arbitrary size/color).
Implements GHOST_Window.
Definition at line 1489 of file GHOST_WindowX11.cc.
References GHOST_kFailure, GHOST_kSuccess, L, and mask().
Referenced by getWindowCursorGrab().
| 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 1162 of file GHOST_WindowX11.cc.
| bool GHOST_WindowX11::post_init_ |
Definition at line 151 of file GHOST_WindowX11.hh.
Referenced by GHOST_WindowX11().
| GHOST_TWindowState GHOST_WindowX11::post_state_ |
Definition at line 152 of file GHOST_WindowX11.hh.
Referenced by GHOST_WindowX11().