15 #ifndef GRAPHICSWINDOWINPUTDEVICE_H 16 #define GRAPHICSWINDOWINPUTDEVICE_H 18 #include "pandabase.h" 20 #include "buttonEvent.h" 21 #include "pointerEvent.h" 22 #include "pointerEventList.h" 23 #include "mouseData.h" 24 #include "clockObject.h" 28 #include "lightMutex.h" 29 #include "lightMutexHolder.h" 52 GraphicsWindowInputDevice(
const GraphicsWindowInputDevice ©);
53 void operator = (
const GraphicsWindowInputDevice ©);
54 ~GraphicsWindowInputDevice();
56 INLINE
string get_name()
const;
57 INLINE
bool has_pointer()
const;
58 INLINE
bool has_keyboard()
const;
60 INLINE
void set_device_index(
int index);
65 INLINE
void enable_pointer_events();
66 INLINE
void disable_pointer_events();
68 void enable_pointer_mode(
double speed);
69 void disable_pointer_mode();
71 bool has_button_event()
const;
73 bool has_pointer_event()
const;
82 INLINE
void keystroke(
int keycode);
83 INLINE
void focus_lost();
86 INLINE
void set_pointer_in_window(
double x,
double y);
87 INLINE
void set_pointer_out_of_window();
90 void button_resume_down(
ButtonHandle button,
double time);
92 void keystroke(
int keycode,
double time);
93 void candidate(
const wstring &candidate_string,
size_t highlight_start,
94 size_t highlight_end,
size_t cursor_pos);
95 void focus_lost(
double time);
99 INLINE
void set_pointer_in_window(
double x,
double y,
double time);
100 INLINE
void set_pointer_out_of_window(
double time);
101 void set_pointer(
bool inwin,
double x,
double y,
double time);
107 INLINE
bool operator == (
const GraphicsWindowInputDevice &other)
const;
108 INLINE
bool operator != (
const GraphicsWindowInputDevice &other)
const;
109 INLINE
bool operator < (
const GraphicsWindowInputDevice &other)
const;
112 enum InputDeviceFlags {
113 IDF_has_pointer = 0x01,
114 IDF_has_keyboard = 0x02
127 bool _pointer_mode_enable;
128 double _pointer_speed;
130 bool _enable_pointer_events;
133 ButtonEvents _button_events;
137 ButtonsHeld _buttons_held;
140 #include "graphicsWindowInputDevice.I" 142 #define EXPCL EXPCL_PANDA_DISPLAY 143 #define EXPTP EXPTP_PANDA_DISPLAY 144 #define TYPE GraphicsWindowInputDevice 145 #define NAME vector_GraphicsWindowInputDevice 147 #include "vector_src.h" Records a set of pointer events that happened recently.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
Holds the data that might be generated by a 2-d pointer input device, such as the mouse in the Graphi...
This is a standard, non-reentrant mutex, similar to the Mutex class.