Blender
V3.3
|
#include <GHOST_SystemX11.h>
Public Attributes | |
struct { | |
Atom WM_STATE | |
Atom WM_CHANGE_STATE | |
Atom _NET_WM_STATE | |
Atom _NET_WM_STATE_MAXIMIZED_HORZ | |
Atom _NET_WM_STATE_MAXIMIZED_VERT | |
Atom _NET_WM_STATE_FULLSCREEN | |
Atom _MOTIF_WM_HINTS | |
Atom WM_TAKE_FOCUS | |
Atom WM_PROTOCOLS | |
Atom WM_DELETE_WINDOW | |
Atom TARGETS | |
Atom STRING | |
Atom COMPOUND_TEXT | |
Atom TEXT | |
Atom CLIPBOARD | |
Atom PRIMARY | |
Atom XCLIP_OUT | |
Atom INCR | |
Atom UTF8_STRING | |
} | m_atom |
![]() | |
bool | m_nativePixel |
bool | m_windowFocus |
X11 Implementation of GHOST_System class.
Definition at line 60 of file GHOST_SystemX11.h.
GHOST_SystemX11::GHOST_SystemX11 | ( | ) |
Constructor this class should only be instantiated by GHOST_ISystem.
Definition at line 102 of file GHOST_SystemX11.cpp.
References _MOTIF_WM_HINTS, _NET_WM_STATE, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT, CLIPBOARD, COMPOUND_TEXT, GHOST_ASSERT, GHOST_INTERN_ATOM, GHOST_INTERN_ATOM_IF_EXISTS, GHOST_X11_ApplicationErrorHandler(), GHOST_X11_ApplicationIOErrorHandler(), INCR, m_atom, PRIMARY, STRING, TARGETS, TEXT, UTF8_STRING, void, WM_CHANGE_STATE, WM_DELETE_WINDOW, WM_PROTOCOLS, WM_STATE, WM_TAKE_FOCUS, and XCLIP_OUT.
GHOST_SystemX11::~GHOST_SystemX11 | ( | ) |
Destructor.
Definition at line 225 of file GHOST_SystemX11.cpp.
void GHOST_SystemX11::addDirtyWindow | ( | GHOST_WindowX11 * | bad_wind | ) |
Flag a window as dirty. This will generate a GHOST window update event on a call to processEvents()
Definition at line 1750 of file GHOST_SystemX11.cpp.
References GHOST_ASSERT.
Referenced by GHOST_WindowX11::invalidate().
|
virtual |
Create a new off-screen context. Never explicitly delete the context, use disposeContext() instead.
Implements GHOST_System.
Definition at line 383 of file GHOST_SystemX11.cpp.
References blender::compositor::context, GHOST_GLSettings::flags, GHOST_glDebugContext, GHOST_OPENGL_EGL_CONTEXT_FLAGS, GHOST_OPENGL_EGL_RESET_NOTIFICATION_STRATEGY, GHOST_OPENGL_GLX_CONTEXT_FLAGS, and GHOST_OPENGL_GLX_RESET_NOTIFICATION_STRATEGY.
|
virtual |
Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.
title | The name of the window. (displayed in the title bar of the window if the OS supports it). |
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 of the window when opened. |
type | The type of drawing context installed in this window. |
stereoVisual | Create a stereo visual for quad buffered stereo. |
exclusive | Use to show the window ontop and ignore others (used full*screen). |
parentWindow | Parent (embedder) window. |
Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.
title | The name of the window (displayed in the title bar of the window if the OS supports it). |
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 of the window when opened. |
type | The type of drawing context installed in this window. |
glSettings | Misc OpenGL settings. |
exclusive | Use to show the window on top and ignore others (used full-screen). |
parentWindow | Parent window. |
Implements GHOST_ISystem.
Definition at line 326 of file GHOST_SystemX11.cpp.
References GHOST_WindowManager::addWindow(), GHOST_GLSettings::flags, getMilliSeconds(), GHOST_WindowX11::getValid(), GHOST_glAlphaBackground, GHOST_glDebugContext, GHOST_glStereoVisual, GHOST_kEventWindowSize, height, left, GHOST_System::m_windowManager, GHOST_System::pushEvent(), GHOST_WindowManager::setActiveWindow(), state, top, type, and width.
|
virtual |
Dispose of a context.
context | Pointer to the context to be disposed. |
Implements GHOST_ISystem.
Definition at line 498 of file GHOST_SystemX11.cpp.
References blender::compositor::context, and GHOST_kSuccess.
Returns the dimensions of all displays on this system.
Returns the dimensions of the main display on this system.
Implements GHOST_ISystem.
Definition at line 301 of file GHOST_SystemX11.cpp.
Referenced by getMainDisplayDimensions().
|
virtual |
Returns the state of the mouse buttons (outside the message queue).
buttons | The state of the buttons. |
Implements GHOST_System.
Definition at line 1631 of file GHOST_SystemX11.cpp.
References GHOST_kButtonMaskButton4, GHOST_kButtonMaskButton5, GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, GHOST_kFailure, GHOST_kSuccess, and GHOST_Buttons::set().
|
virtual |
Returns unsigned char from CUT_BUFFER0
selection | Get selection, X11 only feature. |
Implements GHOST_System.
Definition at line 2160 of file GHOST_SystemX11.cpp.
References blender::compositor::context, free(), getClipboard_xcout(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), m_atom, GHOST_System::m_windowManager, None, txt_cut_buffer, txt_select_buffer, XCLIB_XCOUT_FALLBACK, XCLIB_XCOUT_FALLBACK_COMP, XCLIB_XCOUT_FALLBACK_TEXT, XCLIB_XCOUT_FALLBACK_UTF8, and XCLIB_XCOUT_NONE.
void GHOST_SystemX11::getClipboard_xcout | ( | const XEvent * | evt, |
Atom | sel, | ||
Atom | target, | ||
unsigned char ** | txt, | ||
unsigned long * | len, | ||
unsigned int * | context | ||
) | const |
Helped function for get data from the clipboard.
Definition at line 1956 of file GHOST_SystemX11.cpp.
References buffer, blender::compositor::context, free(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), len, m_atom, GHOST_System::m_windowManager, None, XCLIB_XCOUT_FALLBACK_COMP, XCLIB_XCOUT_FALLBACK_TEXT, XCLIB_XCOUT_FALLBACK_UTF8, XCLIB_XCOUT_INCR, XCLIB_XCOUT_NONE, and XCLIB_XCOUT_SENTCONVSEL.
Referenced by getClipboard().
|
virtual |
Returns the current location of the cursor (location in screen coordinates)
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Implements GHOST_ISystem.
Definition at line 1686 of file GHOST_SystemX11.cpp.
References getCursorPosition_impl(), x, and y.
Referenced by setCursorPosition(), and GHOST_WindowX11::setWindowCursorGrab().
|
virtual |
Returns the dimensions of the main display on this system.
Implements GHOST_ISystem.
Definition at line 287 of file GHOST_SystemX11.cpp.
References getAllDisplayDimensions(), height, and width.
|
virtual |
Returns the system time. Returns the number of milliseconds since the start of the system process.
Reimplemented from GHOST_System.
Definition at line 267 of file GHOST_SystemX11.cpp.
References GHOST_ASSERT.
Referenced by createWindow(), and processEvents().
|
virtual |
Returns the state of all modifier keys.
keys | The state of all modifier keys (true == pressed). |
Implements GHOST_System.
Definition at line 1590 of file GHOST_SystemX11.cpp.
References GHOST_kModifierKeyLeftAlt, GHOST_kModifierKeyLeftControl, GHOST_kModifierKeyLeftShift, GHOST_kModifierKeyOS, GHOST_kModifierKeyRightAlt, GHOST_kModifierKeyRightControl, GHOST_kModifierKeyRightShift, GHOST_kSuccess, and GHOST_ModifierKeys::set().
|
virtual |
Returns the number of displays on this system.
Implements GHOST_ISystem.
Definition at line 278 of file GHOST_SystemX11.cpp.
Referenced by GHOST_DisplayManagerX11::getNumDisplays().
|
inline |
return a pointer to the X11 display structure
Definition at line 184 of file GHOST_SystemX11.h.
Referenced by GHOST_DisplayManagerX11::getDisplaySetting(), GHOST_DisplayManagerX11::getNumDisplaySettings(), GHOST_DropTargetX11::GHOST_HandleClientMessage(), and GHOST_DisplayManagerX11::setCurrentDisplaySetting().
|
virtual |
Initialize the system.
Reimplemented from GHOST_System.
Definition at line 249 of file GHOST_SystemX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, GHOST_System::init(), and GHOST_System::m_displayManager.
Retrieves events from the system and stores them in the queue.
waitForEvent | Flag to wait for an event (or return immediately). |
Implements GHOST_ISystem.
Definition at line 630 of file GHOST_SystemX11.cpp.
References ARRAY_SIZE, ELEM, GHOST_TimerManager::fireTimers(), getMilliSeconds(), GHOST_System::getTimerManager(), GHOST_kEventKeyDown, ghost_key_from_keysym(), GHOST_kFireTimeNever, GHOST_PRINT, next, GHOST_TimerManager::nextFireTime(), GHOST_System::pushEvent(), and SleepTillEvent().
Puts buffer to system clipboard
buffer | The buffer to copy to the clipboard. |
selection | Set the selection into the clipboard, X11 only feature. |
Implements GHOST_System.
Definition at line 2270 of file GHOST_SystemX11.cpp.
References buffer, free(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), m_atom, GHOST_System::m_windowManager, txt_cut_buffer, and txt_select_buffer.
|
inlinevirtual |
|
virtual |
Updates the location of the cursor (location in screen coordinates). Not all operating systems allow the cursor to be moved (without the input device being moved).
x | The x-coordinate of the cursor. |
y | The y-coordinate of the cursor. |
Implements GHOST_ISystem.
Definition at line 1692 of file GHOST_SystemX11.cpp.
References getCursorPosition(), getCursorPosition_impl(), GHOST_kFailure, GHOST_kSuccess, None, x, and y.
Referenced by GHOST_WindowX11::beginFullScreen(), and GHOST_WindowX11::setWindowCursorGrab().
|
virtual |
Show a system message box
title | The title of the message box. |
message | The message to display. |
help_label | Help button label. |
continue_label | Continue button label. |
link | An optional hyperlink. |
dialog_options | Options how to display the message. |
Reimplemented from GHOST_System.
Definition at line 2411 of file GHOST_SystemX11.cpp.
References DialogData::drawButton(), e, free(), GHOST_kSuccess, GHOST_PRINTF, DialogData::height, DialogData::isInsideButton(), DialogData::line_height, DialogData::padding_x, split(), and DialogData::width.
Atom GHOST_SystemX11::_MOTIF_WM_HINTS |
Definition at line 295 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::setDialogHints().
Atom GHOST_SystemX11::_NET_WM_STATE |
Definition at line 291 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::_NET_WM_STATE_FULLSCREEN |
Definition at line 294 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::_NET_WM_STATE_MAXIMIZED_HORZ |
Definition at line 292 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::_NET_WM_STATE_MAXIMIZED_VERT |
Definition at line 293 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::CLIPBOARD |
Definition at line 305 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::COMPOUND_TEXT |
Definition at line 303 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::INCR |
Definition at line 308 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
struct { ... } GHOST_SystemX11::m_atom |
Atom GHOST_SystemX11::PRIMARY |
Definition at line 306 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::STRING |
Definition at line 302 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::TARGETS |
Definition at line 301 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::TEXT |
Definition at line 304 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::UTF8_STRING |
Definition at line 309 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::WM_CHANGE_STATE |
Definition at line 290 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::WM_DELETE_WINDOW |
Definition at line 298 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::WM_PROTOCOLS |
Definition at line 297 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::WM_STATE |
Atom used for ICCCM, WM-spec and Motif. We only need get this atom at the start, it's relative to the display not the window and are public for every window that need it.
Definition at line 289 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Atom GHOST_SystemX11::WM_TAKE_FOCUS |
Definition at line 296 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Atom GHOST_SystemX11::XCLIP_OUT |
Definition at line 307 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().