Blender V2.61 - r43446
Public Member Functions | Public Attributes

GHOST_SystemX11 Class Reference

#include <GHOST_SystemX11.h>

Inheritance diagram for GHOST_SystemX11:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GHOST_SystemX11 ()
virtual ~GHOST_SystemX11 ()
GHOST_TSuccess init ()
GHOST_TUns64 getMilliSeconds () const
GHOST_TUns8 getNumDisplays () const
void getMainDisplayDimensions (GHOST_TUns32 &width, GHOST_TUns32 &height) const
GHOST_IWindowcreateWindow (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)
bool processEvents (bool waitForEvent)
GHOST_TSuccess getCursorPosition (GHOST_TInt32 &x, GHOST_TInt32 &y) const
GHOST_TSuccess setCursorPosition (GHOST_TInt32 x, GHOST_TInt32 y)
GHOST_TSuccess getModifierKeys (GHOST_ModifierKeys &keys) const
GHOST_TSuccess getButtons (GHOST_Buttons &buttons) const
void addDirtyWindow (GHOST_WindowX11 *bad_wind)
Display * getXDisplay ()
void getClipboard_xcout (XEvent evt, Atom sel, Atom target, unsigned char **txt, unsigned long *len, unsigned int *context) const
GHOST_TUns8getClipboard (bool selection) const
void putClipboard (GHOST_TInt8 *buffer, bool selection) const
int toggleConsole (int action)

Public Attributes

Atom m_wm_state
Atom m_wm_change_state
Atom m_net_state
Atom m_net_max_horz
Atom m_net_max_vert
Atom m_net_fullscreen
Atom m_motif
Atom m_wm_take_focus
Atom m_wm_protocols
Atom m_delete_window_atom
Atom m_targets
Atom m_string
Atom m_compound_text
Atom m_text
Atom m_clipboard
Atom m_primary
Atom m_xclip_out
Atom m_incr
Atom m_utf8_string

Detailed Description

X11 Implementation of GHOST_System class.

See also:
GHOST_System.
Author:
Laurence Bourn
Date:
October 26, 2001

Definition at line 57 of file GHOST_SystemX11.h.


Constructor & Destructor Documentation

GHOST_SystemX11::GHOST_SystemX11 ( )
GHOST_SystemX11::~GHOST_SystemX11 ( ) [virtual]

Destructor.

Definition at line 146 of file GHOST_SystemX11.cpp.


Member Function Documentation

void GHOST_SystemX11::addDirtyWindow ( GHOST_WindowX11 bad_wind)

structures for CSG module.

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.

Parameters:
titleThe name of the window (displayed in the title bar of the window if the OS supports it).
leftThe coordinate of the left edge of the window.
topThe coordinate of the top edge of the window.
widthThe width the window.
heightThe height the window.
stateThe state of the window when opened.
typeThe type of drawing context installed in this window.
stereoVisualCreate a stereo visual for quad buffered stereo.
parentWindowParent (embedder) window
Returns:
The new window (or 0 if creation failed).

Create a new window. The new window is added to the list of windows managed. Never explicitly delete the window, use disposeWindow() instead.

Parameters:
titleThe name of the window (displayed in the title bar of the window if the OS supports it).
leftThe coordinate of the left edge of the window.
topThe coordinate of the top edge of the window.
widthThe width the window.
heightThe height the window.
stateThe state of the window when opened.
typeThe type of drawing context installed in this window.
stereoVisualStereo visual for quad buffered stereo.
numOfAASamplesNumber of samples used for AA (zero if no AA)
parentWindowParent (embedder) window
Returns:
The new window (or 0 if creation failed).

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).

Parameters:
buttonsThe state of the buttons.
Returns:
Indication of success.

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]
void GHOST_SystemX11::getClipboard_xcout ( XEvent  evt,
Atom  sel,
Atom  target,
unsigned char **  txt,
unsigned long *  len,
unsigned int *  context 
) const
GHOST_TSuccess GHOST_SystemX11::getCursorPosition ( GHOST_TInt32 x,
GHOST_TInt32 y 
) const [virtual]

structures for CSG module.

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.

Returns:
The dimension of the main display.

Implements GHOST_ISystem.

Definition at line 202 of file GHOST_SystemX11.cpp.

GHOST_TUns64 GHOST_SystemX11::getMilliSeconds ( ) const [virtual]

structures for CSG module.

Returns the system time. Returns the number of milliseconds since the start of the system process.

Returns:
The number of milliseconds.

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.

Parameters:
keysThe state of all modifier keys (true == pressed).
Returns:
Indication of success.

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.

Returns:
The number of displays.

Implements GHOST_ISystem.

Definition at line 191 of file GHOST_SystemX11.cpp.

Referenced by GHOST_DisplayManagerX11::getNumDisplays().

Display* GHOST_SystemX11::getXDisplay ( ) [inline]
GHOST_TSuccess GHOST_SystemX11::init ( ) [virtual]

Initialize the system.

Returns:
Indication of success.

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]

structures for CSG module.

Retrieves events from the system and stores them in the queue.

Parameters:
waitForEventFlag to wait for an event (or return immediately).
Returns:
Indication of the presence of events.

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

Parameters:
bufferThe buffer to copy to the clipboard
selectionSet 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).

Parameters:
xThe x-coordinate of the cursor.
yThe y-coordinate of the cursor.
Returns:
Indication of success.

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]
See also:
GHOST_ISystem

Implements GHOST_ISystem.

Definition at line 241 of file GHOST_SystemX11.h.


Member Data Documentation

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().


The documentation for this class was generated from the following files: