Blender V2.61 - r43446
|
#include <GHOST_SystemX11.h>
X11 Implementation of GHOST_System class.
Definition at line 57 of file GHOST_SystemX11.h.
GHOST_SystemX11::GHOST_SystemX11 | ( | ) |
Constructor this class should only be instanciated by GHOST_ISystem.
Definition at line 79 of file GHOST_SystemX11.cpp.
References GHOST_ASSERT, m_clipboard, m_compound_text, m_delete_window_atom, m_incr, m_motif, m_net_fullscreen, m_net_max_horz, m_net_max_vert, m_net_state, m_primary, m_string, m_targets, m_text, m_utf8_string, m_wm_change_state, m_wm_protocols, m_wm_state, m_wm_take_focus, m_xclip_out, and NULL.
GHOST_SystemX11::~GHOST_SystemX11 | ( | ) | [virtual] |
Destructor.
Definition at line 146 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 984 of file GHOST_SystemX11.cpp.
References GHOST_ASSERT, and NULL.
GHOST_IWindow * GHOST_SystemX11::createWindow | ( | const STR_String & | title, |
GHOST_TInt32 | left, | ||
GHOST_TInt32 | top, | ||
GHOST_TUns32 | width, | ||
GHOST_TUns32 | height, | ||
GHOST_TWindowState | state, | ||
GHOST_TDrawingContextType | type, | ||
const bool | stereoVisual, | ||
const GHOST_TUns16 | numOfAASamples = 0 , |
||
const GHOST_TEmbedderWindowID | parentWindow = 0 |
||
) | [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. |
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. |
stereoVisual | Stereo visual for quad buffered stereo. |
numOfAASamples | Number of samples used for AA (zero if no AA) |
parentWindow | Parent (embedder) window |
Implements GHOST_ISystem.
Definition at line 230 of file GHOST_SystemX11.cpp.
References GHOST_WindowManager::addWindow(), getMilliSeconds(), GHOST_WindowX11::getValid(), GHOST_kEventWindowSize, GHOST_System::m_windowManager, GHOST_System::pushEvent(), and GHOST_WindowManager::setActiveWindow().
GHOST_TSuccess GHOST_SystemX11::getButtons | ( | GHOST_Buttons & | buttons | ) | const [virtual] |
Returns the state of the mouse buttons (ouside the message queue).
buttons | The state of the buttons. |
Implements GHOST_System.
Definition at line 899 of file GHOST_SystemX11.cpp.
References GHOST_kButtonMaskLeft, GHOST_kButtonMaskMiddle, GHOST_kButtonMaskRight, GHOST_kFailure, GHOST_kSuccess, and GHOST_Buttons::set().
GHOST_TUns8 * GHOST_SystemX11::getClipboard | ( | bool | selection | ) | const [virtual] |
Returns unsinged char from CUT_BUFFER0
selection | Get selection, X11 only feature |
Implements GHOST_System.
Definition at line 1344 of file GHOST_SystemX11.cpp.
References addon::engine::free(), getClipboard_xcout(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), m_clipboard, m_compound_text, m_primary, m_string, m_text, m_utf8_string, GHOST_System::m_windowManager, None, NULL, strlen(), txt_cut_buffer, txt_select_buffer, XCLIB_XCOUT_FALLBACK, XCLIB_XCOUT_FALLBACK_COMP, XCLIB_XCOUT_FALLBACK_UTF8, and XCLIB_XCOUT_NONE.
void GHOST_SystemX11::getClipboard_xcout | ( | XEvent | evt, |
Atom | sel, | ||
Atom | target, | ||
unsigned char ** | txt, | ||
unsigned long * | len, | ||
unsigned int * | context | ||
) | const |
Definition at line 1181 of file GHOST_SystemX11.cpp.
References addon::engine::free(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), m_compound_text, m_incr, m_text, m_utf8_string, GHOST_System::m_windowManager, m_xclip_out, 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().
GHOST_TSuccess GHOST_SystemX11::getCursorPosition | ( | GHOST_TInt32 & | x, |
GHOST_TInt32 & | y | ||
) | const [virtual] |
Implements GHOST_ISystem.
Definition at line 929 of file GHOST_SystemX11.cpp.
References GHOST_kFailure, and GHOST_kSuccess.
Referenced by setCursorPosition().
void GHOST_SystemX11::getMainDisplayDimensions | ( | GHOST_TUns32 & | width, |
GHOST_TUns32 & | height | ||
) | const [virtual] |
Returns the dimensions of the main display on this system.
Implements GHOST_ISystem.
Definition at line 202 of file GHOST_SystemX11.cpp.
GHOST_TUns64 GHOST_SystemX11::getMilliSeconds | ( | ) | const [virtual] |
Returns the system time. Returns the number of milliseconds since the start of the system process.
Reimplemented from GHOST_System.
Definition at line 178 of file GHOST_SystemX11.cpp.
References GHOST_ASSERT, and NULL.
Referenced by createWindow(), and processEvents().
GHOST_TSuccess GHOST_SystemX11::getModifierKeys | ( | GHOST_ModifierKeys & | keys | ) | const [virtual] |
Returns the state of all modifier keys.
keys | The state of all modifier keys (true == pressed). |
Implements GHOST_System.
Definition at line 859 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().
GHOST_TUns8 GHOST_SystemX11::getNumDisplays | ( | ) | const [virtual] |
Returns the number of displays on this system.
Implements GHOST_ISystem.
Definition at line 191 of file GHOST_SystemX11.cpp.
Referenced by GHOST_DisplayManagerX11::getNumDisplays().
Display* GHOST_SystemX11::getXDisplay | ( | ) | [inline] |
return a pointer to the X11 display structure
Definition at line 206 of file GHOST_SystemX11.h.
Referenced by GHOST_DisplayManagerX11::getDisplaySetting(), GHOST_DisplayManagerX11::getNumDisplaySettings(), and GHOST_DisplayManagerX11::setCurrentDisplaySetting().
GHOST_TSuccess GHOST_SystemX11::init | ( | ) | [virtual] |
Initialize the system.
Reimplemented from GHOST_System.
Definition at line 158 of file GHOST_SystemX11.cpp.
References GHOST_kFailure, GHOST_kSuccess, and GHOST_System::m_displayManager.
bool GHOST_SystemX11::processEvents | ( | bool | waitForEvent | ) | [virtual] |
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 375 of file GHOST_SystemX11.cpp.
References GHOST_TimerManager::fireTimers(), getMilliSeconds(), GHOST_System::getTimerManager(), GHOST_kFireTimeNever, next, GHOST_TimerManager::nextFireTime(), and SleepTillEvent().
void GHOST_SystemX11::putClipboard | ( | GHOST_TInt8 * | buffer, |
bool | selection | ||
) | const [virtual] |
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 1433 of file GHOST_SystemX11.cpp.
References addon::engine::free(), GHOST_WindowManager::getWindows(), GHOST_WindowX11::getXWindow(), m_clipboard, m_primary, GHOST_System::m_windowManager, strlen(), txt_cut_buffer, and txt_select_buffer.
GHOST_TSuccess GHOST_SystemX11::setCursorPosition | ( | GHOST_TInt32 | x, |
GHOST_TInt32 | y | ||
) | [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 958 of file GHOST_SystemX11.cpp.
References getCursorPosition(), GHOST_kFailure, GHOST_kSuccess, and None.
int GHOST_SystemX11::toggleConsole | ( | int | action | ) | [inline, virtual] |
Definition at line 265 of file GHOST_SystemX11.h.
Referenced by getClipboard(), GHOST_SystemX11(), and putClipboard().
Definition at line 263 of file GHOST_SystemX11.h.
Referenced by getClipboard(), getClipboard_xcout(), and GHOST_SystemX11().
Definition at line 258 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Definition at line 268 of file GHOST_SystemX11.h.
Referenced by getClipboard_xcout(), and GHOST_SystemX11().
Definition at line 255 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 254 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 252 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 253 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 251 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 266 of file GHOST_SystemX11.h.
Referenced by getClipboard(), GHOST_SystemX11(), and putClipboard().
Definition at line 262 of file GHOST_SystemX11.h.
Referenced by getClipboard(), and GHOST_SystemX11().
Definition at line 261 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 264 of file GHOST_SystemX11.h.
Referenced by getClipboard(), getClipboard_xcout(), and GHOST_SystemX11().
Definition at line 269 of file GHOST_SystemX11.h.
Referenced by getClipboard(), getClipboard_xcout(), and GHOST_SystemX11().
Definition at line 250 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 257 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
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 249 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11().
Definition at line 256 of file GHOST_SystemX11.h.
Referenced by GHOST_SystemX11(), and GHOST_WindowX11::GHOST_WindowX11().
Definition at line 267 of file GHOST_SystemX11.h.
Referenced by getClipboard_xcout(), and GHOST_SystemX11().