19 #if !defined(__MITSUBA_HW_X11DEVICE_H_)
20 #define __MITSUBA_HW_X11DEVICE_H_
53 void setTitle(
const std::string &title);
56 void showCursor(
bool enabled);
59 void setGrab(
bool grab);
62 void warpMouse(
const Point2i &position);
65 void processEvent(
const XEvent &event);
76 virtual XVisualInfo* createVisual();
79 void translateMouse(const XEvent &xEvent,
DeviceEvent &event);
82 bool translateKeyboard(const XEvent &xEvent,
DeviceEvent &event);
85 inline Window getWindow() {
return m_window; }
88 inline XVisualInfo *getVisual() {
return m_visinfo; }
The device event structure encapsulates event information such as mouse movement or key presses...
Definition: device.h:34
int m_buttonState
Definition: x11device.h:99
virtual void setPosition(const Point2i &position)
Set the position of the device.
GLX (XFree86) renderer.
Definition: glxrenderer.h:30
virtual void flip()
Flip the buffers (when using double buffering)
X Window System (X11R6) session.
Definition: x11session.h:31
virtual void shutdown()
Shut the device down.
int m_modifierState
Definition: x11device.h:98
X Window System (X11R6) device / software surface.
Definition: x11device.h:30
virtual void makeCurrent(Renderer *renderer)=0
Associate the renderer with this device.
virtual void setVisible(bool visible)=0
Only applies to devices, which are UI windows.
virtual void init(Device *other=NULL)
Atom m_deleteWindow
Definition: x11device.h:93
An abstract drawing device.
Definition: device.h:136
Window m_window
Definition: x11device.h:90
#define MTS_DECLARE_CLASS()
This macro must be used in the initial definition in classes that derive from Object.
Definition: class.h:158
Point2i m_mouse
Definition: x11device.h:97
Cursor m_cursor
Definition: x11device.h:95
Abstract renderer implementation.
Definition: renderer.h:79
bool m_grab
Definition: x11device.h:100
virtual void setTitle(const std::string &title)
Set the window title.
bool m_visible
Definition: x11device.h:94
XF86VidModeModeInfo m_previousMode
Definition: x11device.h:92
XVisualInfo * m_visinfo
Definition: x11device.h:91