|
Blender V5.0
|
#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) |
| 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, BLENDER_ICONS_WM_X11, count, Display, ELEM, false, free(), GHOST_ISystem::getUseWindowFrame(), GHOST_DialogError, GHOST_kSuccess, GHOST_kWindowStateFullScreen, GHOST_kWindowStateMaximized, GHOST_kWindowStateMinimized, GHOST_kWindowStateNormal, GHOST_PRINT, GHOST_TABLET_DATA_NONE, GHOST_Window::GHOST_Window(), GHOST_WindowX11(), HOST_NAME_MAX, if(), left, len, nullptr, post_init_, post_state_, setDialogHints(), GHOST_Window::setDrawingContextType(), setTitle(), GHOST_SystemX11::showMessageBox(), state, top, and GHOST_System::window_focus_.
Referenced by getWindowCursorGrab(), GHOST_WindowX11(), and setDialogHints().
|
override |
Destructor. Closes the window and disposes resources allocated.
Definition at line 1153 of file GHOST_WindowX11.cc.
References None, 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 580 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 1565 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 513 of file GHOST_WindowX11.cc.
References bounds(), clientToScreen(), and Window.
Referenced by getWindowBounds().
|
overridevirtual |
Returns the recommended DPI for this window.
Reimplemented from GHOST_Window.
Definition at line 1515 of file GHOST_WindowX11.cc.
|
overridevirtual |
Returns the state of the window (normal, minimized, maximized).
Implements GHOST_IWindow.
Definition at line 900 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.
| title | The title displayed in the title bar. |
Implements GHOST_IWindow.
Definition at line 496 of file GHOST_WindowX11.cc.
References name.
|
overridevirtual |
Returns indication as to whether the window is valid.
Reimplemented from GHOST_Window.
Definition at line 477 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 506 of file GHOST_WindowX11.cc.
References bounds(), and getClientBounds().
|
protected |
| Window GHOST_WindowX11::getXWindow | ( | ) |
Return a handle to the x11 window type.
Definition at line 472 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 1469 of file GHOST_WindowX11.cc.
References Cursor.
|
overridevirtual |
Invalidates the contents of this window.
Implements GHOST_IWindow.
Definition at line 1120 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
|
overridevirtual |
Reimplemented from GHOST_Window.
Definition at line 1082 of file GHOST_WindowX11.cc.
|
overrideprotectedvirtual |
| type | The type of rendering context create. |
Implements GHOST_Window.
Definition at line 1206 of file GHOST_WindowX11.cc.
References 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_, 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 567 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 548 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 557 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 538 of file GHOST_WindowX11.cc.
References GHOST_kSuccess.
| GHOST_TSuccess GHOST_WindowX11::setDialogHints | ( | GHOST_WindowX11 * | parent_window | ) |
Definition at line 591 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 1025 of file GHOST_WindowX11.cc.
References GHOST_kFailure, GHOST_kSuccess, GHOST_kWindowOrderBottom, GHOST_kWindowOrderTop, None, 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 1560 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 926 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 482 of file GHOST_WindowX11.cc.
References name.
Referenced by GHOST_WindowX11().
|
overrideprotectedvirtual |
Sets the cursor grab on the window using native window system calls.
Reimplemented from GHOST_Window.
Definition at line 1388 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, None, 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 1454 of file GHOST_WindowX11.cc.
References Cursor, GHOST_kFailure, GHOST_kStandardCursorDefault, and GHOST_kSuccess.
|
overrideprotectedvirtual |
Sets the cursor visibility on the window using native window system calls.
Implements GHOST_Window.
Definition at line 1366 of file GHOST_WindowX11.cc.
References Cursor, 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 1475 of file GHOST_WindowX11.cc.
References GHOST_kFailure, GHOST_kSuccess, L, mask(), and size().
| 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 1148 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().