Panda3D
|
00001 // Filename: config_x11display.cxx 00002 // Created by: pro-rsoft (07Jul09) 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 #include "config_x11display.h" 00016 #include "x11GraphicsPipe.h" 00017 #include "x11GraphicsWindow.h" 00018 #include "graphicsPipeSelection.h" 00019 #include "dconfig.h" 00020 #include "pandaSystem.h" 00021 00022 Configure(config_x11display); 00023 NotifyCategoryDef(x11display, "display"); 00024 00025 ConfigureFn(config_x11display) { 00026 init_libx11display(); 00027 } 00028 00029 ConfigVariableString display_cfg 00030 ("display", "", 00031 PRC_DESC("Specify the X display string for the default display. If this " 00032 "is not specified, $DISPLAY is used.")); 00033 00034 ConfigVariableBool x_error_abort 00035 ("x-error-abort", false, 00036 PRC_DESC("Set this true to trigger and abort (and a stack trace) on receipt " 00037 "of an error from the X window system. This can make it easier " 00038 "to discover where these errors are generated.")); 00039 00040 ConfigVariableInt x_wheel_up_button 00041 ("x-wheel-up-button", 4, 00042 PRC_DESC("This is the mouse button index of the wheel_up event: which " 00043 "mouse button number does the system report when the mouse wheel " 00044 "is rolled one notch up?")); 00045 00046 ConfigVariableInt x_wheel_down_button 00047 ("x-wheel-down-button", 5, 00048 PRC_DESC("This is the mouse button index of the wheel_down event: which " 00049 "mouse button number does the system report when the mouse wheel " 00050 "is rolled one notch down?")); 00051 00052 ConfigVariableInt x_wheel_left_button 00053 ("x-wheel-left-button", 6, 00054 PRC_DESC("This is the mouse button index of the wheel_left event: which " 00055 "mouse button number does the system report when one scrolls " 00056 "to the left?")); 00057 00058 ConfigVariableInt x_wheel_right_button 00059 ("x-wheel-right-button", 7, 00060 PRC_DESC("This is the mouse button index of the wheel_right event: which " 00061 "mouse button number does the system report when one scrolls " 00062 "to the right?")); 00063 00064 //////////////////////////////////////////////////////////////////// 00065 // Function: init_libx11display 00066 // Description: Initializes the library. This must be called at 00067 // least once before any of the functions or classes in 00068 // this library can be used. Normally it will be 00069 // called by the static initializers and need not be 00070 // called explicitly, but special cases exist. 00071 //////////////////////////////////////////////////////////////////// 00072 void 00073 init_libx11display() { 00074 static bool initialized = false; 00075 if (initialized) { 00076 return; 00077 } 00078 initialized = true; 00079 00080 x11GraphicsPipe::init_type(); 00081 x11GraphicsWindow::init_type(); 00082 }