15 #ifndef GRAPHICSWINDOW_H
16 #define GRAPHICSWINDOW_H
18 #include "pandabase.h"
20 #include "graphicsOutput.h"
21 #include "graphicsWindowInputDevice.h"
22 #include "graphicsWindowProc.h"
23 #include "graphicsWindowProcCallbackData.h"
24 #include "windowProperties.h"
25 #include "mouseData.h"
26 #include "modifierButtons.h"
27 #include "buttonEvent.h"
28 #include "keyboardButton.h"
29 #include "buttonMap.h"
31 #include "lightMutex.h"
32 #include "lightReMutex.h"
34 #include "windowHandle.h"
35 #include "touchInfo.h"
59 void clear_rejected_properties();
62 INLINE
bool is_closed()
const;
64 INLINE
bool is_fullscreen()
const;
66 void set_window_event(
const string &window_event);
67 string get_window_event()
const;
69 void set_close_request_event(
const string &close_request_event);
70 string get_close_request_event()
const;
72 INLINE
void set_unexposed_draw(
bool unexposed_draw);
73 INLINE
bool get_unexposed_draw()
const;
78 int get_num_input_devices()
const;
79 string get_input_device_name(
int device)
const;
80 MAKE_SEQ(get_input_device_names, get_num_input_devices, get_input_device_name);
81 bool has_pointer(
int device)
const;
82 bool has_keyboard(
int device)
const;
83 virtual ButtonMap *get_keyboard_map()
const;
85 void enable_pointer_events(
int device);
86 void disable_pointer_events(
int device);
87 void enable_pointer_mode(
int device,
double speed);
88 void disable_pointer_mode(
int device);
91 virtual bool move_pointer(
int device,
int x,
int y);
92 virtual void close_ime();
96 bool has_button_event(
int device)
const;
98 bool has_pointer_event(
int device)
const;
103 virtual void clear_window_procs(){};
104 virtual bool supports_window_procs()
const;
106 virtual int verify_window_sizes(
int numsizes,
int *dimen);
109 virtual int get_num_touches();
110 virtual TouchInfo get_touch_info(
int index);
124 virtual void close_window();
125 virtual bool open_window();
128 virtual bool do_reshape_request(
int x_origin,
int y_origin,
bool has_origin,
129 int x_size,
int y_size);
131 virtual void mouse_mode_absolute();
132 virtual void mouse_mode_relative();
137 void system_changed_size(
int x_size,
int y_size);
141 typedef vector_GraphicsWindowInputDevice InputDevices;
142 InputDevices _input_devices;
150 bool _got_expose_event;
159 string _window_event;
160 string _close_request_event;
161 bool _unexposed_draw;
165 PythonWinProcClasses _python_window_proc_classes;
172 static void init_type() {
173 GraphicsOutput::init_type();
174 register_type(_type_handle,
"GraphicsWindow",
175 GraphicsOutput::get_class_type());
178 return get_class_type();
180 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
189 #include "graphicsWindow.I"
This specialization on CallbackData is passed when the callback is initiated from from an implementat...
virtual void request_close()
This is called by the GraphicsEngine to request that the window (or whatever) close itself or...
This object represents a window on the desktop, not necessarily a Panda window.
A lightweight reentrant mutex.
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...
virtual void set_close_now()
This is called by the GraphicsEngine to insist that the output be closed immediately.
A container for the various kinds of properties we might ask to have on a graphics window before we o...
virtual void request_open()
This is called by the GraphicsEngine to request that the window (or whatever) open itself or...
Stores information for a single touch event.
An object to create GraphicsOutputs that share a particular 3-D API.
The default class template does not define any methods.
This is a base class for the various different classes that represent the result of a frame of render...
virtual void process_events()
Do whatever processing in the window thread is appropriate for this output object each frame...
virtual void reset_window(bool swapchain)
Resets the window framebuffer from its derived children.
Defines an interface for storing platform-specific window processor methods.
Holds the data that might be generated by a 2-d pointer input device, such as the mouse in the Graphi...
Encapsulates all the communication with a particular instance of a given rendering backend...
This class is the main interface to controlling the render process.
TypeHandle is the identifier used to differentiate C++ class types.
A container for the various kinds of properties we might ask to have on a graphics frameBuffer before...
This is a standard, non-reentrant mutex, similar to the Mutex class.
virtual bool is_active() const
Returns true if the window is ready to be rendered into, false otherwise.