14 #ifndef X11GRAPHICSPIPE_H 15 #define X11GRAPHICSPIPE_H 27 #define XF86DGADirectMouse 0x0004 29 typedef struct _XcursorFile XcursorFile;
30 typedef struct _XcursorImage XcursorImage;
31 typedef struct _XcursorImages XcursorImages;
33 typedef unsigned short Rotation;
34 typedef unsigned short SizeID;
35 typedef struct _XRRScreenConfiguration XRRScreenConfiguration;
72 Atom _wm_delete_window;
74 Atom _net_wm_window_type;
75 Atom _net_wm_window_type_splash;
76 Atom _net_wm_window_type_fullscreen;
78 Atom _net_wm_state_fullscreen;
79 Atom _net_wm_state_above;
80 Atom _net_wm_state_below;
81 Atom _net_wm_state_add;
82 Atom _net_wm_state_remove;
83 Atom _net_wm_bypass_compositor;
86 typedef int (*pfn_XcursorGetDefaultSize)(X11_Display *);
87 typedef XcursorImages *(*pfn_XcursorXcFileLoadImages)(XcursorFile *, int);
88 typedef X11_Cursor (*pfn_XcursorImagesLoadCursor)(X11_Display *,
const XcursorImages *);
89 typedef void (*pfn_XcursorImagesDestroy)(XcursorImages *);
90 typedef XcursorImage *(*pfn_XcursorImageCreate)(int, int);
91 typedef X11_Cursor (*pfn_XcursorImageLoadCursor)(X11_Display *,
const XcursorImage *);
92 typedef void (*pfn_XcursorImageDestroy)(XcursorImage *);
95 pfn_XcursorXcFileLoadImages _XcursorXcFileLoadImages;
96 pfn_XcursorImagesLoadCursor _XcursorImagesLoadCursor;
97 pfn_XcursorImagesDestroy _XcursorImagesDestroy;
98 pfn_XcursorImageCreate _XcursorImageCreate;
99 pfn_XcursorImageLoadCursor _XcursorImageLoadCursor;
100 pfn_XcursorImageDestroy _XcursorImageDestroy;
102 typedef Bool (*pfn_XRRQueryExtension)(X11_Display *,
int*,
int*);
103 typedef XRRScreenSize *(*pfn_XRRSizes)(X11_Display*, int,
int*);
104 typedef short *(*pfn_XRRRates)(X11_Display*, int, int,
int*);
105 typedef XRRScreenConfiguration *(*pfn_XRRGetScreenInfo)(X11_Display*, X11_Window);
106 typedef SizeID (*pfn_XRRConfigCurrentConfiguration)(XRRScreenConfiguration*, Rotation*);
107 typedef Status (*pfn_XRRSetScreenConfig)(X11_Display*, XRRScreenConfiguration *,
108 Drawable, int, Rotation, Time);
111 pfn_XRRSizes _XRRSizes;
112 pfn_XRRRates _XRRRates;
113 pfn_XRRGetScreenInfo _XRRGetScreenInfo;
114 pfn_XRRConfigCurrentConfiguration _XRRConfigCurrentConfiguration;
115 pfn_XRRSetScreenConfig _XRRSetScreenConfig;
118 X11_Display *_display;
123 X11_Cursor _hidden_cursor;
125 typedef Bool (*pfn_XF86DGAQueryVersion)(X11_Display *,
int*,
int*);
126 typedef Status (*pfn_XF86DGADirectVideo)(X11_Display *, int, int);
127 pfn_XF86DGADirectVideo _XF86DGADirectVideo;
130 void make_hidden_cursor();
131 void release_hidden_cursor();
133 static void install_error_handlers();
134 static int error_handler(X11_Display *display, XErrorEvent *error);
135 static int io_error_handler(X11_Display *display);
137 typedef int ErrorHandlerFunc(X11_Display *, XErrorEvent *);
138 typedef int IOErrorHandlerFunc(X11_Display *);
139 static bool _error_handlers_installed;
140 static ErrorHandlerFunc *_prev_error_handler;
141 static IOErrorHandlerFunc *_prev_io_error_handler;
143 static bool _x_error_messages_enabled;
144 static int _x_error_count;
155 static void init_type() {
156 GraphicsPipe::init_type();
158 GraphicsPipe::get_class_type());
161 return get_class_type();
163 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
XIM get_im() const
Returns the input method opened for the pipe, or NULL if the input method could not be opened for som...
This graphics pipe represents the interface for creating graphics windows on an X-based client.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static int disable_x_error_messages()
Globally disables the printing of error messages that are raised by the X11 system,...
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A lightweight reentrant mutex.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
X11_Window get_root() const
Returns the handle to the root window on the pipe's display.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static int enable_x_error_messages()
Reenables the printing of error messages after a previous call to disable_x_error_messages().
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void disable_relative_mouse()
Disables relative mouse mode for this display.
int get_screen() const
Returns the X screen number associated with the pipe.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
An object to create GraphicsOutputs that share a particular 3-D API.
X11_Cursor get_hidden_cursor()
Returns an invisible Cursor suitable for assigning to windows that have the cursor_hidden property se...
X11_Display * get_display() const
Returns a pointer to the X display associated with the pipe: the display on which to create the windo...
virtual PreferredWindowThread get_preferred_window_thread() const
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be p...
TypeHandle is the identifier used to differentiate C++ class types.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
bool supports_relative_mouse() const
Returns true if relative mouse mode is supported on this display.
bool enable_relative_mouse()
Enables relative mouse mode for this display.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
static int get_x_error_count()
Returns the number of times an error indication has been raised by the X11 system since application s...