Panda3D
config_x11display.cxx
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file config_x11display.cxx
10  * @author rdb
11  * @date 2009-07-07
12  */
13 
14 #include "config_x11display.h"
15 #include "x11GraphicsPipe.h"
16 #include "x11GraphicsWindow.h"
17 #include "graphicsPipeSelection.h"
18 #include "dconfig.h"
19 #include "pandaSystem.h"
20 
21 #if !defined(CPPPARSER) && !defined(LINK_ALL_STATIC) && !defined(BUILDING_PANDAX11)
22  #error Buildsystem error: BUILDING_PANDAX11 not defined
23 #endif
24 
25 Configure(config_x11display);
26 NotifyCategoryDef(x11display, "display");
27 
28 ConfigureFn(config_x11display) {
30 }
31 
32 ConfigVariableString display_cfg
33 ("display", "",
34  PRC_DESC("Specify the X display string for the default display. If this "
35  "is not specified, $DISPLAY is used."));
36 
37 ConfigVariableBool x_error_abort
38 ("x-error-abort", false,
39  PRC_DESC("Set this true to trigger and abort (and a stack trace) on receipt "
40  "of an error from the X window system. This can make it easier "
41  "to discover where these errors are generated."));
42 
43 ConfigVariableBool x_init_threads
44 ("x-init-threads", false,
45  PRC_DESC("Set this true to ask Panda3D to call XInitThreads() upon loading "
46  "the display module, which may help with some threading issues."));
47 
48 ConfigVariableInt x_wheel_up_button
49 ("x-wheel-up-button", 4,
50  PRC_DESC("This is the mouse button index of the wheel_up event: which "
51  "mouse button number does the system report when the mouse wheel "
52  "is rolled one notch up?"));
53 
54 ConfigVariableInt x_wheel_down_button
55 ("x-wheel-down-button", 5,
56  PRC_DESC("This is the mouse button index of the wheel_down event: which "
57  "mouse button number does the system report when the mouse wheel "
58  "is rolled one notch down?"));
59 
60 ConfigVariableInt x_wheel_left_button
61 ("x-wheel-left-button", 6,
62  PRC_DESC("This is the mouse button index of the wheel_left event: which "
63  "mouse button number does the system report when one scrolls "
64  "to the left?"));
65 
66 ConfigVariableInt x_wheel_right_button
67 ("x-wheel-right-button", 7,
68  PRC_DESC("This is the mouse button index of the wheel_right event: which "
69  "mouse button number does the system report when one scrolls "
70  "to the right?"));
71 
72 ConfigVariableInt x_cursor_size
73 ("x-cursor-size", -1,
74  PRC_DESC("This sets the cursor size when using XCursor to change the mouse "
75  "cursor. The default is to use the default size for the display."));
76 
77 ConfigVariableString x_wm_class_name
78 ("x-wm-class-name", "",
79  PRC_DESC("Specify the value to use for the res_name field of the window's "
80  "WM_CLASS property. Has no effect when x-wm-class is not set."));
81 
82 ConfigVariableString x_wm_class
83 ("x-wm-class", "",
84  PRC_DESC("Specify the value to use for the res_class field of the window's "
85  "WM_CLASS property."));
86 
87 /**
88  * Initializes the library. This must be called at least once before any of
89  * the functions or classes in this library can be used. Normally it will be
90  * called by the static initializers and need not be called explicitly, but
91  * special cases exist.
92  */
93 void
95  static bool initialized = false;
96  if (initialized) {
97  return;
98  }
99  initialized = true;
100 
101  x11GraphicsPipe::init_type();
102  x11GraphicsWindow::init_type();
103 }
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void init_libx11display()
Initializes the library.
This is a convenience class to specialize ConfigVariable as a boolean type.
This is a convenience class to specialize ConfigVariable as a string type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is a convenience class to specialize ConfigVariable as an integer type.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.