Panda3D
|
This graphics pipe represents the interface for creating graphics windows on an X-based client. More...
#include "x11GraphicsPipe.h"
Public Types | |
typedef int(* | pfn_XcursorGetDefaultSize) (X11_Display *) |
typedef XcursorImage *(* | pfn_XcursorImageCreate) (int, int) |
typedef void(* | pfn_XcursorImageDestroy) (XcursorImage *) |
typedef X11_Cursor(* | pfn_XcursorImageLoadCursor) (X11_Display *, const XcursorImage *) |
typedef void(* | pfn_XcursorImagesDestroy) (XcursorImages *) |
typedef X11_Cursor(* | pfn_XcursorImagesLoadCursor) (X11_Display *, const XcursorImages *) |
typedef XcursorImages *(* | pfn_XcursorXcFileLoadImages) (XcursorFile *, int) |
typedef SizeID(* | pfn_XRRConfigCurrentConfiguration) (XRRScreenConfiguration *, Rotation *) |
typedef XRRScreenConfiguration *(* | pfn_XRRGetScreenInfo) (X11_Display *, X11_Window) |
typedef Bool(* | pfn_XRRQueryExtension) (X11_Display *, int *, int *) |
typedef Status(* | pfn_XRRQueryVersion) (X11_Display *, int *, int *) |
typedef short *(* | pfn_XRRRates) (X11_Display *, int, int, int *) |
typedef Status(* | pfn_XRRSetScreenConfig) (X11_Display *, XRRScreenConfiguration *, Drawable, int, Rotation, Time) |
typedef XRRScreenSize *(* | pfn_XRRSizes) (X11_Display *, int, int *) |
![]() | |
enum | BufferCreationFlags { BF_refuse_parasite = 0x0001 , BF_require_parasite = 0x0002 , BF_refuse_window = 0x0004 , BF_require_window = 0x0008 , BF_require_callback_window = 0x0010 , BF_can_bind_color = 0x0040 , BF_can_bind_every = 0x0080 , BF_resizeable = 0x0100 , BF_size_track_host = 0x0200 , BF_rtt_cumulative = 0x0400 , BF_fb_props_optional = 0x0800 , BF_size_square = 0x1000 , BF_size_power_2 = 0x2000 , BF_can_bind_layered = 0x4000 } |
enum | OutputTypes { OT_window = 0x0001 , OT_fullscreen_window = 0x0002 , OT_buffer = 0x0004 , OT_texture_buffer = 0x0008 } |
enum | PreferredWindowThread { PWT_app , PWT_draw } |
Public Member Functions | |
x11GraphicsPipe (const std::string &display=std::string()) | |
void | disable_relative_mouse () |
Disables relative mouse mode for this display. | |
bool | enable_relative_mouse () |
Enables relative mouse mode for this display. | |
RRCrtc | find_fullscreen_crtc (const LPoint2i &point, int &x, int &y, int &width, int &height) |
Finds a CRTC for going fullscreen to, at the given origin. | |
virtual TypeHandle | force_init_type () |
std::unique_ptr< XRRCrtcInfo, pfn_XRRFreeCrtcInfo > | get_crtc_info (XRRScreenResources *res, RRCrtc crtc) const |
Returns an XRRCrtcInfo object, or null if RandR 1.2 is not supported. | |
X11_Display * | get_display () const |
Returns a pointer to the X display associated with the pipe: the display on which to create the windows. | |
X11_Cursor | get_hidden_cursor () |
Returns an invisible Cursor suitable for assigning to windows that have the cursor_hidden property set. | |
XIM | get_im () const |
Returns the input method opened for the pipe, or NULL if the input method could not be opened for some reason. | |
virtual PreferredWindowThread | get_preferred_window_thread () const |
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be performed: typically either the app thread (e.g. | |
X11_Window | get_root () const |
Returns the handle to the root window on the pipe's display. | |
int | get_screen () const |
Returns the X screen number associated with the pipe. | |
std::unique_ptr< XRRScreenResources, pfn_XRRFreeScreenResources > | get_screen_resources () const |
Returns an XRRScreenResources object, or null if RandR 1.2 is not supported. | |
virtual TypeHandle | get_type () const |
bool | supports_relative_mouse () const |
Returns true if relative mouse mode is supported on this display. | |
![]() | |
GraphicsDevice * | get_device () const |
Returns a pointer to device object. | |
int | get_display_height () const |
DisplayInformation * | get_display_information () |
int | get_display_width () const |
PN_stdfloat | get_display_zoom () const |
virtual std::string | get_interface_name () const =0 |
int | get_supported_types () const |
Returns the mask of bits that represents the kinds of GraphicsOutput objects this pipe might be able to successfully create. | |
bool | is_valid () const |
Returns false if this pipe is known to be invalid, meaning that an attempt to create a GraphicsWindow with the pipe will certainly fail. | |
virtual void | lookup_cpu_data () |
Looks up the detailed CPU information and stores it in _display_information, if supported by the OS. | |
virtual | PT (GraphicsDevice) make_device(void *scrn |
virtual | PT (GraphicsStateGuardian) make_callback_gsg(GraphicsEngine *engine) |
bool | supports_type (int flags) const |
A convenience function to ask if a particular type or types of GraphicsObjects are supported. | |
![]() | |
TypedReferenceCount (const TypedReferenceCount ©) | |
void | operator= (const TypedReferenceCount ©) |
![]() | |
TypedObject (const TypedObject ©)=default | |
TypedObject * | as_typed_object () |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
const TypedObject * | as_typed_object () const |
Returns the object, upcast (if necessary) to a TypedObject pointer. | |
int | get_best_parent_from_Set (const std::set< int > &) const |
int | get_type_index () const |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | is_exact_type (TypeHandle handle) const |
Returns true if the current object is the indicated type exactly. | |
bool | is_of_type (TypeHandle handle) const |
Returns true if the current object is or derives from the indicated type. | |
TypedObject & | operator= (const TypedObject ©)=default |
![]() | |
void | operator delete (void *, void *) |
void | operator delete (void *ptr) |
void | operator delete[] (void *, void *) |
void | operator delete[] (void *ptr) |
void * | operator new (size_t size) |
void * | operator new (size_t size, void *ptr) |
void * | operator new[] (size_t size) |
void * | operator new[] (size_t size, void *ptr) |
![]() | |
int | get_ref_count () const |
WeakReferenceList * | get_weak_list () const |
Returns the WeakReferenceList associated with this ReferenceCount object. | |
bool | has_weak_list () const |
Returns true if this particular ReferenceCount object has a WeakReferenceList created, false otherwise. | |
void | local_object () |
This function should be called, once, immediately after creating a new instance of some ReferenceCount-derived object on the stack. | |
void | ref () const |
Explicitly increments the reference count. | |
bool | ref_if_nonzero () const |
Atomically increases the reference count of this object if it is not zero. | |
bool | test_ref_count_integrity () const |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | test_ref_count_nonzero () const |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
virtual bool | unref () const |
Explicitly decrements the reference count. | |
bool | unref_if_one () const |
Atomically decreases the reference count of this object if it is one. | |
WeakReferenceList * | weak_ref () |
Adds the indicated PointerToVoid as a weak reference to this object. | |
void | weak_unref () |
Removes the indicated PointerToVoid as a weak reference to this object. | |
Static Public Member Functions | |
static int | disable_x_error_messages () |
Globally disables the printing of error messages that are raised by the X11 system, for instance in order to test whether a particular X11 operation will succeed. | |
static int | enable_x_error_messages () |
Reenables the printing of error messages after a previous call to disable_x_error_messages(). | |
static TypeHandle | get_class_type () |
static int | get_x_error_count () |
Returns the number of times an error indication has been raised by the X11 system since application start, including errors raised while error messages were disabled. | |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
This function is declared non-inline to work around a compiler bug in g++ 2.96. | |
![]() | |
static TypeHandle | get_class_type () |
static void | init_type () |
Public Attributes | |
bool | _have_xrandr |
Atom | _net_wm_bypass_compositor |
Atom | _net_wm_pid |
Atom | _net_wm_state |
Atom | _net_wm_state_above |
Atom | _net_wm_state_add |
Atom | _net_wm_state_below |
Atom | _net_wm_state_fullscreen |
Atom | _net_wm_state_remove |
Atom | _net_wm_window_type |
Atom | _net_wm_window_type_fullscreen |
Atom | _net_wm_window_type_splash |
Atom | _wm_delete_window |
int | _xcursor_size |
pfn_XcursorImageCreate | _XcursorImageCreate |
pfn_XcursorImageDestroy | _XcursorImageDestroy |
pfn_XcursorImageLoadCursor | _XcursorImageLoadCursor |
pfn_XcursorImagesDestroy | _XcursorImagesDestroy |
pfn_XcursorImagesLoadCursor | _XcursorImagesLoadCursor |
pfn_XcursorXcFileLoadImages | _XcursorXcFileLoadImages |
pfn_XRRConfigCurrentConfiguration | _XRRConfigCurrentConfiguration |
pfn_XRRGetScreenInfo | _XRRGetScreenInfo |
pfn_XRRRates | _XRRRates |
pfn_XRRSetScreenConfig | _XRRSetScreenConfig |
pfn_XRRSizes | _XRRSizes |
![]() | |
get_display_height | |
Returns the height of the entire display, if it is known. | |
get_display_information | |
Gets the pipe's DisplayInformation. | |
get_display_width | |
Returns the width of the entire display, if it is known. | |
get_display_zoom | |
Returns the display zoom factor configured in the operating system. | |
get_interface_name | |
![]() | |
get_type | |
![]() | |
get_ref_count | |
Returns the current reference count. | |
Static Public Attributes | |
static LightReMutex | _x_mutex |
This graphics pipe represents the interface for creating graphics windows on an X-based client.
Definition at line 96 of file x11GraphicsPipe.h.
typedef int(* x11GraphicsPipe::pfn_XcursorGetDefaultSize) (X11_Display *) |
Definition at line 141 of file x11GraphicsPipe.h.
typedef XcursorImage *(* x11GraphicsPipe::pfn_XcursorImageCreate) (int, int) |
Definition at line 145 of file x11GraphicsPipe.h.
typedef void(* x11GraphicsPipe::pfn_XcursorImageDestroy) (XcursorImage *) |
Definition at line 147 of file x11GraphicsPipe.h.
typedef X11_Cursor(* x11GraphicsPipe::pfn_XcursorImageLoadCursor) (X11_Display *, const XcursorImage *) |
Definition at line 146 of file x11GraphicsPipe.h.
typedef void(* x11GraphicsPipe::pfn_XcursorImagesDestroy) (XcursorImages *) |
Definition at line 144 of file x11GraphicsPipe.h.
typedef X11_Cursor(* x11GraphicsPipe::pfn_XcursorImagesLoadCursor) (X11_Display *, const XcursorImages *) |
Definition at line 143 of file x11GraphicsPipe.h.
typedef XcursorImages *(* x11GraphicsPipe::pfn_XcursorXcFileLoadImages) (XcursorFile *, int) |
Definition at line 142 of file x11GraphicsPipe.h.
typedef SizeID(* x11GraphicsPipe::pfn_XRRConfigCurrentConfiguration) (XRRScreenConfiguration *, Rotation *) |
Definition at line 162 of file x11GraphicsPipe.h.
typedef XRRScreenConfiguration *(* x11GraphicsPipe::pfn_XRRGetScreenInfo) (X11_Display *, X11_Window) |
Definition at line 161 of file x11GraphicsPipe.h.
typedef Bool(* x11GraphicsPipe::pfn_XRRQueryExtension) (X11_Display *, int *, int *) |
Definition at line 157 of file x11GraphicsPipe.h.
typedef Status(* x11GraphicsPipe::pfn_XRRQueryVersion) (X11_Display *, int *, int *) |
Definition at line 158 of file x11GraphicsPipe.h.
typedef short *(* x11GraphicsPipe::pfn_XRRRates) (X11_Display *, int, int, int *) |
Definition at line 160 of file x11GraphicsPipe.h.
typedef Status(* x11GraphicsPipe::pfn_XRRSetScreenConfig) (X11_Display *, XRRScreenConfiguration *, Drawable, int, Rotation, Time) |
Definition at line 163 of file x11GraphicsPipe.h.
typedef XRRScreenSize *(* x11GraphicsPipe::pfn_XRRSizes) (X11_Display *, int, int *) |
Definition at line 159 of file x11GraphicsPipe.h.
x11GraphicsPipe::x11GraphicsPipe | ( | const std::string & | display = std::string() | ) |
Definition at line 36 of file x11GraphicsPipe.cxx.
|
virtual |
Definition at line 359 of file x11GraphicsPipe.cxx.
|
inline |
Disables relative mouse mode for this display.
Definition at line 84 of file x11GraphicsPipe.I.
Referenced by x11GraphicsWindow::process_events(), and x11GraphicsWindow::set_properties_now().
|
inlinestatic |
Globally disables the printing of error messages that are raised by the X11 system, for instance in order to test whether a particular X11 operation will succeed.
Reenable error messages with a later call to enable_x_error_messages().
The return value is the current value of get_x_error_count().
Definition at line 100 of file x11GraphicsPipe.I.
|
inline |
Enables relative mouse mode for this display.
Returns false if unsupported.
Definition at line 71 of file x11GraphicsPipe.I.
Referenced by x11GraphicsWindow::process_events(), and x11GraphicsWindow::set_properties_now().
|
inlinestatic |
Reenables the printing of error messages after a previous call to disable_x_error_messages().
The return value is the current value of get_x_error_count().
Definition at line 112 of file x11GraphicsPipe.I.
RRCrtc x11GraphicsPipe::find_fullscreen_crtc | ( | const LPoint2i & | point, |
int & | x, | ||
int & | y, | ||
int & | width, | ||
int & | height ) |
Finds a CRTC for going fullscreen to, at the given origin.
The new CRTC is returned, along with its x, y, width and height.
If the required RandR extension is not supported, a value of None will be returned, but x, y, width and height will still be populated.
Definition at line 405 of file x11GraphicsPipe.cxx.
References get_crtc_info(), and get_screen_resources().
Referenced by x11GraphicsWindow::set_properties_now().
|
inlinevirtual |
Reimplemented from GraphicsPipe.
Definition at line 227 of file x11GraphicsPipe.h.
|
inlinestatic |
Definition at line 216 of file x11GraphicsPipe.h.
std::unique_ptr< XRRCrtcInfo, pfn_XRRFreeCrtcInfo > x11GraphicsPipe::get_crtc_info | ( | XRRScreenResources * | res, |
RRCrtc | crtc ) const |
Returns an XRRCrtcInfo object, or null if RandR 1.2 is not supported.
Definition at line 387 of file x11GraphicsPipe.cxx.
Referenced by find_fullscreen_crtc().
|
inline |
Returns a pointer to the X display associated with the pipe: the display on which to create the windows.
Definition at line 18 of file x11GraphicsPipe.I.
|
inline |
Returns an invisible Cursor suitable for assigning to windows that have the cursor_hidden property set.
Definition at line 52 of file x11GraphicsPipe.I.
Referenced by x11GraphicsWindow::process_events(), and x11GraphicsWindow::set_properties_now().
|
inline |
Returns the input method opened for the pipe, or NULL if the input method could not be opened for some reason.
Definition at line 43 of file x11GraphicsPipe.I.
|
virtual |
Returns an indication of the thread in which this GraphicsPipe requires its window processing to be performed: typically either the app thread (e.g.
X) or the draw thread (Windows).
Reimplemented from GraphicsPipe.
Definition at line 439 of file x11GraphicsPipe.cxx.
|
inline |
Returns the handle to the root window on the pipe's display.
Definition at line 34 of file x11GraphicsPipe.I.
Referenced by x11GraphicsWindow::set_properties_now().
|
inline |
Returns the X screen number associated with the pipe.
Definition at line 26 of file x11GraphicsPipe.I.
std::unique_ptr< XRRScreenResources, pfn_XRRFreeScreenResources > x11GraphicsPipe::get_screen_resources | ( | ) | const |
Returns an XRRScreenResources object, or null if RandR 1.2 is not supported.
Definition at line 373 of file x11GraphicsPipe.cxx.
Referenced by find_fullscreen_crtc().
|
inlinevirtual |
Reimplemented from GraphicsPipe.
Definition at line 224 of file x11GraphicsPipe.h.
|
inlinestatic |
Returns the number of times an error indication has been raised by the X11 system since application start, including errors raised while error messages were disabled.
Definition at line 123 of file x11GraphicsPipe.I.
|
inlinestatic |
Definition at line 219 of file x11GraphicsPipe.h.
|
inline |
Returns true if relative mouse mode is supported on this display.
Definition at line 63 of file x11GraphicsPipe.I.
Referenced by x11GraphicsWindow::set_properties_now().
bool x11GraphicsPipe::_have_xrandr |
Definition at line 166 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_bypass_compositor |
Definition at line 138 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_pid |
Definition at line 128 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state |
Definition at line 132 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state_above |
Definition at line 134 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state_add |
Definition at line 136 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state_below |
Definition at line 135 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state_fullscreen |
Definition at line 133 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_state_remove |
Definition at line 137 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_window_type |
Definition at line 129 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_window_type_fullscreen |
Definition at line 131 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_net_wm_window_type_splash |
Definition at line 130 of file x11GraphicsPipe.h.
Atom x11GraphicsPipe::_wm_delete_window |
Definition at line 127 of file x11GraphicsPipe.h.
|
static |
Definition at line 213 of file x11GraphicsPipe.h.
int x11GraphicsPipe::_xcursor_size |
Definition at line 149 of file x11GraphicsPipe.h.
pfn_XcursorImageCreate x11GraphicsPipe::_XcursorImageCreate |
Definition at line 153 of file x11GraphicsPipe.h.
pfn_XcursorImageDestroy x11GraphicsPipe::_XcursorImageDestroy |
Definition at line 155 of file x11GraphicsPipe.h.
pfn_XcursorImageLoadCursor x11GraphicsPipe::_XcursorImageLoadCursor |
Definition at line 154 of file x11GraphicsPipe.h.
pfn_XcursorImagesDestroy x11GraphicsPipe::_XcursorImagesDestroy |
Definition at line 152 of file x11GraphicsPipe.h.
pfn_XcursorImagesLoadCursor x11GraphicsPipe::_XcursorImagesLoadCursor |
Definition at line 151 of file x11GraphicsPipe.h.
pfn_XcursorXcFileLoadImages x11GraphicsPipe::_XcursorXcFileLoadImages |
Definition at line 150 of file x11GraphicsPipe.h.
pfn_XRRConfigCurrentConfiguration x11GraphicsPipe::_XRRConfigCurrentConfiguration |
Definition at line 170 of file x11GraphicsPipe.h.
pfn_XRRGetScreenInfo x11GraphicsPipe::_XRRGetScreenInfo |
Definition at line 169 of file x11GraphicsPipe.h.
pfn_XRRRates x11GraphicsPipe::_XRRRates |
Definition at line 168 of file x11GraphicsPipe.h.
pfn_XRRSetScreenConfig x11GraphicsPipe::_XRRSetScreenConfig |
Definition at line 171 of file x11GraphicsPipe.h.
pfn_XRRSizes x11GraphicsPipe::_XRRSizes |
Definition at line 167 of file x11GraphicsPipe.h.