osgViewer::GraphicsWindowX11 Class Reference

`#include <GraphicsWindowX11>`

Inheritance diagram for osgViewer::GraphicsWindowX11:

## Classes

struct | WindowData

## Public Member Functions

| GraphicsWindowX11 (osg::GraphicsContext::Traits *traits)
virtual bool | isSameKindAs (const Object *object) const
virtual const char * | libraryName () const
virtual const char * | className () const
virtual bool | valid () const
virtual bool | realizeImplementation ()
virtual bool | isRealizedImplementation () const
virtual void | closeImplementation ()
virtual bool | makeCurrentImplementation ()
virtual bool | releaseContextImplementation ()
virtual void | swapBuffersImplementation ()
virtual bool | checkEvents ()
virtual bool | setWindowDecorationImplementation (bool flag)
virtual void | grabFocus ()
virtual void | grabFocusIfPointerInWindow ()
virtual void | raiseWindow ()
virtual void | requestWarpPointer (float x, float y)
virtual bool | setWindowRectangleImplementation (int x, int y, int width, int height)
virtual void | setWindowName (const std::string &name)
virtual void | setCursor (MouseCursor cursor)
Display * | getEventDisplay () const
Display * | getDisplayToUse () const
Window & | getParent ()
Window & | getWindow ()
Cursor | getCurrentCursor ()
Public Member Functions inherited from osgViewer::GraphicsWindow
| GraphicsWindow ()
void | setEventQueue (osgGA::EventQueue *eventQueue)
osgGA::EventQueue * | getEventQueue ()
const osgGA::EventQueue * | getEventQueue () const
void | setWindowRectangle (int x, int y, int width, int height)
virtual void | getWindowRectangle (int &x, int &y, int &width, int &height)
void | setWindowDecoration (bool flag)
virtual bool | getWindowDecoration () const
virtual std::string | getWindowName ()
virtual void | useCursor (bool cursorOn)
virtual void | setSyncToVBlank (bool on)
bool | getSyncToVBlank () const
virtual void | setSwapGroup (bool on, GLuint group, GLuint barrier)
void | getSwapGroup (bool &on, GLuint &group, GLuint &barrier) const
virtual bool | makeContextCurrentImplementation (GraphicsContext *)
virtual void | bindPBufferToTextureImplementation (GLenum)
void | getViews (Views &views)
virtual void | requestRedraw ()
virtual void | requestContinuousUpdate (bool=true)
Public Member Functions inherited from osg::GraphicsContext
void | add (Operation *operation)
void | remove (Operation *operation)
void | remove (const std::string &name)
void | removeAllOperations ()
virtual void | runOperations ()
GraphicsOperationQueue & | getOperationsQueue ()
OpenThreads::Mutex * | getOperationsMutex ()
osg::RefBlock * | getOperationsBlock ()
Operation * | getCurrentOperation ()
const Traits * | getTraits () const
void | setState (State *state)
State * | getState ()
const State * | getState () const
void | setClearColor (const Vec4 &color)
const Vec4 & | getClearColor () const
void | setClearMask (GLbitfield mask)
GLbitfield | getClearMask () const
virtual void | clear ()
double | getTimeSinceLastClear () const
bool | realize ()
void | close (bool callCloseImplementation=true)
void | swapBuffers ()
bool | isRealized () const
bool | makeCurrent ()
bool | makeContextCurrent (GraphicsContext *readContext)
bool | releaseContext ()
bool | isCurrent () const
void | bindPBufferToTexture (GLenum buffer)
void | createGraphicsThread ()
void | setGraphicsThread (GraphicsThread *gt)
GraphicsThread * | getGraphicsThread ()
const GraphicsThread * | getGraphicsThread () const
virtual bool | makeContextCurrentImplementation (GraphicsContext *readContext)=0
void | setSwapCallback (SwapCallback *rc)
SwapCallback * | getSwapCallback ()
const SwapCallback * | getSwapCallback () const
void | swapBuffersCallbackOrImplementation ()
void | resized (int x, int y, int width, int height)
void | setResizedCallback (ResizedCallback *rc)
ResizedCallback * | getResizedCallback ()
const ResizedCallback * | getResizedCallback () const
virtual void | resizedImplementation (int x, int y, int width, int height)
Cameras & | getCameras ()
const Cameras & | getCameras () const
void | setDefaultFboId (GLuint i)
GLuint | getDefaultFboId () const
virtual bool | isSameKindAs (const Object *object) const
Public Member Functions inherited from osg::Object
| Object ()
| Object (bool threadSafeRefUnref)
| Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
std::string | getCompoundClassName () const
virtual Node * | asNode ()
virtual const Node * | asNode () const
virtual NodeVisitor * | asNodeVisitor ()
virtual const NodeVisitor * | asNodeVisitor () const
virtual StateSet * | asStateSet ()
virtual const StateSet * | asStateSet () const
virtual StateAttribute * | asStateAttribute ()
virtual const StateAttribute * | asStateAttribute () const
virtual Uniform * | asUniform ()
virtual const Uniform * | asUniform () const
virtual Camera * | asCamera ()
virtual const Camera * | asCamera () const
virtual Drawable * | asDrawable ()
virtual const Drawable * | asDrawable () const
virtual Callback * | asCallback ()
virtual const Callback * | asCallback () const
virtual CallbackObject * | asCallbackObject ()
virtual const CallbackObject * | asCallbackObject () const
virtual UserDataContainer * | asUserDataContainer ()
virtual const UserDataContainer * | asUserDataContainer () const
virtual ValueObject * | asValueObject ()
virtual const ValueObject * | asValueObject () const
virtual Image * | asImage ()
virtual const Image * | asImage () const
virtual void | setThreadSafeRefUnref (bool threadSafe)
virtual void | setName (const std::string &name)
void | setName (const char *name)
const std::string & | getName () const
void | setDataVariance (DataVariance dv)
DataVariance | getDataVariance () const
virtual void | computeDataVariance ()
void | setUserDataContainer (osg::UserDataContainer *udc)
template<class T>
void | setUserDataContainer (const ref_ptr< T > &udc)
osg::UserDataContainer * | getUserDataContainer ()
const osg::UserDataContainer * | getUserDataContainer () const
osg::UserDataContainer * | getOrCreateUserDataContainer ()
virtual void | setUserData (Referenced *obj)
template<class T>
void | setUserData (const ref_ptr< T > &ud)
virtual Referenced * | getUserData ()
virtual const Referenced * | getUserData () const
template<typename T>
bool | getUserValue (const std::string &name, T &value) const
template<typename T>
void | setUserValue (const std::string &name, const T &value)
virtual void | resizeGLObjectBuffers (unsigned int)
virtual void | releaseGLObjects (osg::State *=0) const
template<typename T>
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const
Public Member Functions inherited from osg::Referenced
| Referenced ()
| Referenced (bool threadSafeRefUnref)
| Referenced (const Referenced &)
Referenced & | operator= (const Referenced &)
bool | getThreadSafeRefUnref () const
OpenThreads::Mutex * | getRefMutex () const
int | ref () const
int | unref () const
int | unref_nodelete () const
int | referenceCount () const
ObserverSet * | getObserverSet () const
ObserverSet * | getOrCreateObserverSet () const
void | addObserver (Observer *observer) const
void | removeObserver (Observer *observer) const
Public Member Functions inherited from osgGA::GUIActionAdapter
virtual | ~GUIActionAdapter ()
virtual osg::View * | asView ()
virtual bool | computeIntersections (const osgGA::GUIEventAdapter &, osgUtil::LineSegmentIntersector::Intersections &, osg::Node::NodeMask=0xffffffff)
virtual bool | computeIntersections (const osgGA::GUIEventAdapter &, const osg::NodePath &, osgUtil::LineSegmentIntersector::Intersections &, osg::Node::NodeMask=0xffffffff)
Public Member Functions inherited from osgViewer::GraphicsHandleX11
| GraphicsHandleX11 ()
void | setDisplay (Display *display)
Display * | getDisplay () const
void | setContext (Context context)
Context | getContext () const

## Protected Member Functions

| ~GraphicsWindowX11 ()
Cursor | getOrCreateCursor (MouseCursor mouseShape)
bool | createVisualInfo ()
bool | createWindow ()
bool | setWindow (Window window)
void | init ()
bool | checkAndSendEventFullScreenIfNeeded (Display *display, int x, int y, int width, int height, bool windowDecoration)
void | transformMouseXY (float &x, float &y)
void | adaptKey (XKeyEvent &keyevent, int &keySymbol, int &unmodifiedKeySymbol)
void | forceKey (int key, double time, bool state)
void | rescanModifierMapping ()
void | getModifierMap (char *keymap) const
int | getModifierMask () const
void | syncLocks ()
void | flushKeyEvents ()
Protected Member Functions inherited from osg::GraphicsContext
| GraphicsContext ()
| GraphicsContext (const GraphicsContext &, const osg::CopyOp &)
virtual | ~GraphicsContext ()
virtual Object * | cloneType () const
virtual Object * | clone (const CopyOp &) const
void | addCamera (osg::Camera *camera)
void | removeCamera (osg::Camera *camera)
Protected Member Functions inherited from osg::Object
virtual | ~Object ()
Protected Member Functions inherited from osg::Referenced
virtual | ~Referenced ()
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const
void | deleteUsingDeleteHandler () const

## Protected Attributes

bool | _valid
Display * | _eventDisplay
Window | _parent
Window | _window
XVisualInfo * | _visualInfo
GLXFBConfig | _fbConfig
Cursor | _currentCursor
Atom | _deleteWindow
bool | _initialized
bool | _realized
bool | _ownsWindow
double | _timeOfLastCheckEvents
int | _lastEventType
int | _modifierState
int | _numLockMask
char | _keyMap [32]
std::map< MouseCursor, Cursor > | _mouseCursorMap
Protected Attributes inherited from osgViewer::GraphicsWindow
osg::ref_ptr< osgGA::EventQueue > | _eventQueue
Protected Attributes inherited from osg::GraphicsContext
Cameras | _cameras
ref_ptr< Traits > | _traits
ref_ptr< State > | _state
Vec4 | _clearColor
GLbitfield | _clearMask
size_t | _threadOfLastMakeCurrent
OpenThreads::Mutex | _operationsMutex
osg::ref_ptr< osg::RefBlock > | _operationsBlock
GraphicsOperationQueue | _operations
osg::ref_ptr< Operation > | _currentOperation
ref_ptr< GraphicsThread > | _graphicsThread
ref_ptr< ResizedCallback > | _resizedCallback
ref_ptr< SwapCallback > | _swapCallback
Timer_t | _lastClearTick
GLuint | _defaultFboId
Protected Attributes inherited from osg::Object
std::string | _name
DataVariance | _dataVariance
osg::UserDataContainer * | _userDataContainer
Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr | _observerSet
OpenThreads::Atomic | _refCount
Protected Attributes inherited from osgViewer::GraphicsHandleX11
Display * | _display
Context | _context

## Additional Inherited Members

Public Types inherited from osgViewer::GraphicsWindow
enum | MouseCursor { InheritCursor , NoCursor , RightArrowCursor , LeftArrowCursor , InfoCursor , DestroyCursor , HelpCursor , CycleCursor , SprayCursor , WaitCursor , TextCursor , CrosshairCursor , HandCursor , UpDownCursor , LeftRightCursor , TopSideCursor , BottomSideCursor , LeftSideCursor , RightSideCursor , TopLeftCorner , TopRightCorner , BottomRightCorner , BottomLeftCorner }
typedef std::list< osgViewer::View * > | Views
Public Types inherited from osg::GraphicsContext
typedef std::vector< ScreenSettings > | ScreenSettingsList
typedef std::vector< GraphicsContext * > | GraphicsContexts
typedef std::list< ref_ptr< Operation > > | GraphicsOperationQueue
typedef std::list< osg::Camera * > | Cameras
Public Types inherited from osg::Object
enum | DataVariance { DYNAMIC , STATIC , UNSPECIFIED }
Public Types inherited from osgViewer::GraphicsHandleX11
typedef GLXContext | Context
typedef GLXPbuffer | Pbuffer
Static Public Member Functions inherited from osg::GraphicsContext
static osg::ref_ptr< WindowingSystemInterfaces > & | getWindowingSystemInterfaces ()
static WindowingSystemInterface * | getWindowingSystemInterface (const std::string &name="")
static GraphicsContext * | createGraphicsContext (Traits *traits)
static unsigned int | createNewContextID ()
static unsigned int | getMaxContextID ()
static void | incrementContextIDUsageCount (unsigned int contextID)
static void | decrementContextIDUsageCount (unsigned int contextID)
static GraphicsContexts | getAllRegisteredGraphicsContexts ()
static GraphicsContexts | getRegisteredGraphicsContexts (unsigned int contextID)
static void | setCompileContext (unsigned int contextID, GraphicsContext *gc)
static GraphicsContext * | getOrCreateCompileContext (unsigned int contextID)
static GraphicsContext * | getCompileContext (unsigned int contextID)
Static Public Member Functions inherited from osg::Referenced
static OpenThreads::Mutex * | getGlobalReferencedMutex ()
static void | setDeleteHandler (DeleteHandler *handler)
static DeleteHandler * | getDeleteHandler ()
Static Protected Member Functions inherited from osg::GraphicsContext
static void | registerGraphicsContext (GraphicsContext *gc)
static void | unregisterGraphicsContext (GraphicsContext *gc)

## Constructor & Destructor Documentation

## GraphicsWindowX11()

osgViewer::GraphicsWindowX11::GraphicsWindowX11 | ( | osg::GraphicsContext::Traits * | traits | ) |

inline

References _currentCursor, _eventDisplay, _fbConfig, _initialized, _keyMap, _lastEventType, _modifierState, _numLockMask, _parent, _realized, _timeOfLastCheckEvents, osg::GraphicsContext::_traits, _valid, _visualInfo, _window, osg::GraphicsContext::createNewContextID(), osg::GraphicsContext::getState(), osg::GraphicsContext::incrementContextIDUsageCount(), init(), osg::GraphicsContext::setState(), and valid().

Referenced by isSameKindAs().

## ~GraphicsWindowX11()

osgViewer::GraphicsWindowX11::~GraphicsWindowX11 | ( |  | ) |

protected

## Member Function Documentation

## adaptKey()

void osgViewer::GraphicsWindowX11::adaptKey | ( | XKeyEvent & | keyevent,
|  | int & | keySymbol,
|  | int & | unmodifiedKeySymbol )

protected

## checkAndSendEventFullScreenIfNeeded()

bool osgViewer::GraphicsWindowX11::checkAndSendEventFullScreenIfNeeded | ( | Display * | display,
|  | int | x,
|  | int | y,
|  | int | width,
|  | int | height,
|  | bool | windowDecoration )

protected

## checkEvents()

virtual bool osgViewer::GraphicsWindowX11::checkEvents | ( |  | ) |

virtual

Check to see if any events have been generated.

Reimplemented from osgViewer::GraphicsWindow.

## className()

virtual const char * osgViewer::GraphicsWindowX11::className | ( |  | ) | const

inline virtual

return the name of the object's class type. Must be defined by derived classes.

Reimplemented from osgViewer::GraphicsWindow.

## closeImplementation()

virtual void osgViewer::GraphicsWindowX11::closeImplementation | ( |  | ) |

virtual

Close the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

## createVisualInfo()

bool osgViewer::GraphicsWindowX11::createVisualInfo | ( |  | ) |

protected

## createWindow()

bool osgViewer::GraphicsWindowX11::createWindow | ( |  | ) |

protected

## flushKeyEvents()

void osgViewer::GraphicsWindowX11::flushKeyEvents | ( |  | ) |

protected

## forceKey()

void osgViewer::GraphicsWindowX11::forceKey | ( | int | key,
|  | double | time,
|  | bool | state )

protected

## getCurrentCursor()

Cursor osgViewer::GraphicsWindowX11::getCurrentCursor | ( |  | ) |

inline

References _currentCursor.

## getDisplayToUse()

Display * osgViewer::GraphicsWindowX11::getDisplayToUse | ( |  | ) | const

## getEventDisplay()

Display * osgViewer::GraphicsWindowX11::getEventDisplay | ( |  | ) | const

inline

References _eventDisplay.

## getModifierMap()

void osgViewer::GraphicsWindowX11::getModifierMap | ( | char * | keymap | ) | const

protected

## getModifierMask()

int osgViewer::GraphicsWindowX11::getModifierMask | ( |  | ) | const

protected

## getOrCreateCursor()

Cursor osgViewer::GraphicsWindowX11::getOrCreateCursor | ( | MouseCursor | mouseShape | ) |

protected

## getParent()

Window & osgViewer::GraphicsWindowX11::getParent | ( |  | ) |

inline

References _parent.

## getWindow()

Window & osgViewer::GraphicsWindowX11::getWindow | ( |  | ) |

inline

References _window.

## grabFocus()

virtual void osgViewer::GraphicsWindowX11::grabFocus | ( |  | ) |

virtual

Get focus.

Reimplemented from osgViewer::GraphicsWindow.

## grabFocusIfPointerInWindow()

virtual void osgViewer::GraphicsWindowX11::grabFocusIfPointerInWindow | ( |  | ) |

virtual

Get focus on if the pointer is in this window.

Reimplemented from osgViewer::GraphicsWindow.

## init()

void osgViewer::GraphicsWindowX11::init | ( |  | ) |

protected

Referenced by GraphicsWindowX11().

## isRealizedImplementation()

virtual bool osgViewer::GraphicsWindowX11::isRealizedImplementation | ( |  | ) | const

inline virtual

Return true if the graphics context has been realised and is ready to use.

Reimplemented from osgViewer::GraphicsWindow.

References _realized.

## isSameKindAs()

virtual bool osgViewer::GraphicsWindowX11::isSameKindAs | ( | const Object * | object | ) | const

inline virtual

Reimplemented from osgViewer::GraphicsWindow.

References GraphicsWindowX11(), and osg::Object::Object().

## libraryName()

virtual const char * osgViewer::GraphicsWindowX11::libraryName | ( |  | ) | const

inline virtual

return the name of the object's library. Must be defined by derived classes. The OpenSceneGraph convention is that the namespace of a library is the same as the library name.

Reimplemented from osgViewer::GraphicsWindow.

## makeCurrentImplementation()

virtual bool osgViewer::GraphicsWindowX11::makeCurrentImplementation | ( |  | ) |

virtual

Make this graphics context current.

Reimplemented from osgViewer::GraphicsWindow.

## raiseWindow()

virtual void osgViewer::GraphicsWindowX11::raiseWindow | ( |  | ) |

virtual

Raise specified window

Reimplemented from osgViewer::GraphicsWindow.

## realizeImplementation()

virtual bool osgViewer::GraphicsWindowX11::realizeImplementation | ( |  | ) |

virtual

Realise the GraphicsContext.

Reimplemented from osgViewer::GraphicsWindow.

## releaseContextImplementation()

virtual bool osgViewer::GraphicsWindowX11::releaseContextImplementation | ( |  | ) |

virtual

Release the graphics context.

Reimplemented from osgViewer::GraphicsWindow.

## requestWarpPointer()

virtual void osgViewer::GraphicsWindowX11::requestWarpPointer | ( | float | x,
|  | float | y )

virtual

requestWarpPointer(int,int) is requesting a repositioning of the mouse pointer to a specified x,y location on the window. This is used by some camera manipulators to initialise the mouse pointer when mouse position relative to a controls neutral mouse position is required, i.e when mimicking an aircraft joystick.

Reimplemented from osgViewer::GraphicsWindow.

## rescanModifierMapping()

void osgViewer::GraphicsWindowX11::rescanModifierMapping | ( |  | ) |

protected

## setCursor()

virtual void osgViewer::GraphicsWindowX11::setCursor | ( | MouseCursor | cursor | ) |

virtual

Set mouse cursor to a specific shape.

Reimplemented from osgViewer::GraphicsWindow.

## setWindow()

bool osgViewer::GraphicsWindowX11::setWindow | ( | Window | window | ) |

protected

## setWindowDecorationImplementation()

virtual bool osgViewer::GraphicsWindowX11::setWindowDecorationImplementation | ( | bool | flag | ) |

virtual

Set Window decoration.

Reimplemented from osgViewer::GraphicsWindow.

## setWindowName()

virtual void osgViewer::GraphicsWindowX11::setWindowName | ( | const std::string & | name | ) |

virtual

Set the name of the window

Reimplemented from osgViewer::GraphicsWindow.

## setWindowRectangleImplementation()

virtual bool osgViewer::GraphicsWindowX11::setWindowRectangleImplementation | ( | int | x,
|  | int | y,
|  | int | width,
|  | int | height )

virtual

Set the window's position and size.

Reimplemented from osgViewer::GraphicsWindow.

## swapBuffersImplementation()

virtual void osgViewer::GraphicsWindowX11::swapBuffersImplementation | ( |  | ) |

virtual

Swap the front and back buffers.

Reimplemented from osgViewer::GraphicsWindow.

## syncLocks()

void osgViewer::GraphicsWindowX11::syncLocks | ( |  | ) |

protected

## transformMouseXY()

void osgViewer::GraphicsWindowX11::transformMouseXY | ( | float & | x,
|  | float & | y )

protected

## valid()

virtual bool osgViewer::GraphicsWindowX11::valid | ( |  | ) | const

inline virtual

Return whether a valid and usable GraphicsContext has been created.

Reimplemented from osgViewer::GraphicsWindow.

References _valid.

Referenced by GraphicsWindowX11().

## Member Data Documentation

## _currentCursor

Cursor osgViewer::GraphicsWindowX11::_currentCursor

protected

Referenced by getCurrentCursor(), and GraphicsWindowX11().

## _deleteWindow

Atom osgViewer::GraphicsWindowX11::_deleteWindow

protected

## _eventDisplay

Display* osgViewer::GraphicsWindowX11::_eventDisplay

protected

Referenced by getEventDisplay(), and GraphicsWindowX11().

## _fbConfig

GLXFBConfig osgViewer::GraphicsWindowX11::_fbConfig

protected

Referenced by GraphicsWindowX11().

## _initialized

bool osgViewer::GraphicsWindowX11::_initialized

protected

Referenced by GraphicsWindowX11().

## _keyMap

char osgViewer::GraphicsWindowX11::_keyMap[32]

protected

Referenced by GraphicsWindowX11().

## _lastEventType

int osgViewer::GraphicsWindowX11::_lastEventType

protected

Referenced by GraphicsWindowX11().

## _modifierState

int osgViewer::GraphicsWindowX11::_modifierState

protected

Referenced by GraphicsWindowX11().

## _mouseCursorMap

std::map<MouseCursor,Cursor> osgViewer::GraphicsWindowX11::_mouseCursorMap

protected

## _numLockMask

int osgViewer::GraphicsWindowX11::_numLockMask

protected

Referenced by GraphicsWindowX11().

## _ownsWindow

bool osgViewer::GraphicsWindowX11::_ownsWindow

protected

## _parent

Window osgViewer::GraphicsWindowX11::_parent

protected

Referenced by getParent(), and GraphicsWindowX11().

## _realized

bool osgViewer::GraphicsWindowX11::_realized

protected

Referenced by GraphicsWindowX11(), and isRealizedImplementation().

## _timeOfLastCheckEvents

double osgViewer::GraphicsWindowX11::_timeOfLastCheckEvents

protected

Referenced by GraphicsWindowX11().

## _valid

bool osgViewer::GraphicsWindowX11::_valid

protected

Referenced by GraphicsWindowX11(), and valid().

## _visualInfo

XVisualInfo* osgViewer::GraphicsWindowX11::_visualInfo

protected

Referenced by GraphicsWindowX11().

## _window

Window osgViewer::GraphicsWindowX11::_window

protected

Referenced by getWindow(), and GraphicsWindowX11().

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

- GraphicsWindowX11