Panda3D

x11GraphicsPipe.I

00001 // Filename: x11GraphicsPipe.I
00002 // Created by:  drose (30Oct00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: x11GraphicsPipe::get_display
00018 //       Access: Public
00019 //  Description: Returns a pointer to the X display associated with
00020 //               the pipe: the display on which to create the windows.
00021 ////////////////////////////////////////////////////////////////////
00022 INLINE X11_Display *x11GraphicsPipe::
00023 get_display() const {
00024   return _display;
00025 }
00026 
00027 ////////////////////////////////////////////////////////////////////
00028 //     Function: x11GraphicsPipe::get_screen
00029 //       Access: Public
00030 //  Description: Returns the X screen number associated with the pipe.
00031 ////////////////////////////////////////////////////////////////////
00032 INLINE int x11GraphicsPipe::
00033 get_screen() const {
00034   return _screen;
00035 }
00036 
00037 ////////////////////////////////////////////////////////////////////
00038 //     Function: x11GraphicsPipe::get_root
00039 //       Access: Public
00040 //  Description: Returns the handle to the root window on the pipe's
00041 //               display.
00042 ////////////////////////////////////////////////////////////////////
00043 INLINE X11_Window x11GraphicsPipe::
00044 get_root() const {
00045   return _root;
00046 }
00047 
00048 ////////////////////////////////////////////////////////////////////
00049 //     Function: x11GraphicsPipe::get_im
00050 //       Access: Public
00051 //  Description: Returns the input method opened for the pipe, or NULL
00052 //               if the input method could not be opened for some
00053 //               reason.
00054 ////////////////////////////////////////////////////////////////////
00055 INLINE XIM x11GraphicsPipe::
00056 get_im() const {
00057   return _im;
00058 }
00059 
00060 ////////////////////////////////////////////////////////////////////
00061 //     Function: x11GraphicsPipe::get_hidden_cursor
00062 //       Access: Public
00063 //  Description: Returns an invisible Cursor suitable for assigning to
00064 //               windows that have the cursor_hidden property set.
00065 ////////////////////////////////////////////////////////////////////
00066 INLINE X11_Cursor x11GraphicsPipe::
00067 get_hidden_cursor() {
00068   if (_hidden_cursor == None) {
00069     make_hidden_cursor();
00070   }
00071   return _hidden_cursor;
00072 }
00073 
00074 ////////////////////////////////////////////////////////////////////
00075 //     Function: x11GraphicsPipe::disable_x_error_messages
00076 //       Access: Public, Static
00077 //  Description: Globally disables the printing of error messages that
00078 //               are raised by the X11 system, for instance in order
00079 //               to test whether a particular X11 operation will
00080 //               succeed.  Reenable error messages with a later call
00081 //               to enable_x_error_messages().
00082 //
00083 //               The return value is the current value of
00084 //               get_x_error_count().
00085 ////////////////////////////////////////////////////////////////////
00086 INLINE int x11GraphicsPipe::
00087 disable_x_error_messages() {
00088   _x_error_messages_enabled = false;
00089   return _x_error_count;
00090 }
00091 
00092 ////////////////////////////////////////////////////////////////////
00093 //     Function: x11GraphicsPipe::enable_x_error_messages
00094 //       Access: Public, Static
00095 //  Description: Reenables the printing of error messages after a
00096 //               previous call to disable_x_error_messages().
00097 //
00098 //               The return value is the current value of
00099 //               get_x_error_count().
00100 ////////////////////////////////////////////////////////////////////
00101 INLINE int x11GraphicsPipe::
00102 enable_x_error_messages() {
00103   _x_error_messages_enabled = true;
00104   return _x_error_count;
00105 }
00106 
00107 ////////////////////////////////////////////////////////////////////
00108 //     Function: x11GraphicsPipe::get_x_error_count
00109 //       Access: Public, Static
00110 //  Description: Returns the number of times an error indication has
00111 //               been raised by the X11 system since application
00112 //               start, including errors raised while error messages
00113 //               were disabled.
00114 ////////////////////////////////////////////////////////////////////
00115 INLINE int x11GraphicsPipe::
00116 get_x_error_count() {
00117   return _x_error_count;
00118 }
 All Classes Functions Variables Enumerations