15 #ifndef ANDROIDGRAPHICSWINDOW_H
16 #define ANDROIDGRAPHICSWINDOW_H
18 #include "pandabase.h"
20 #include "androidGraphicsPipe.h"
21 #include "graphicsWindow.h"
22 #include "buttonHandle.h"
24 #include <android/native_window.h>
25 #include <android/input.h>
26 #include <android/native_activity.h>
27 #include <android/rect.h>
55 virtual void close_window();
56 virtual bool open_window();
58 virtual void destroy_surface();
59 virtual bool create_surface();
62 static void handle_command(
struct android_app *app, int32_t command);
63 static int32_t handle_input_event(
struct android_app *app, AInputEvent *event);
65 void ns_handle_command(int32_t command);
66 int32_t handle_key_event(
const AInputEvent *event);
67 int32_t handle_motion_event(
const AInputEvent *event);
72 struct android_app* _app;
74 EGLDisplay _egl_display;
75 EGLSurface _egl_surface;
83 static void init_type() {
84 GraphicsWindow::init_type();
85 register_type(_type_handle,
"AndroidGraphicsWindow",
86 GraphicsWindow::get_class_type());
89 return get_class_type();
91 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
97 #include "androidGraphicsWindow.I"
virtual void end_flip()
This function will be called within the draw thread after begin_flip() has been called on all windows...
virtual void end_frame(FrameMode mode, Thread *current_thread)
This function will be called within the draw thread after rendering is completed for a given frame...
An interface to manage Android windows and their appropriate EGL surfaces.
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
A container for the various kinds of properties we might ask to have on a graphics window before we o...
virtual void set_properties_now(WindowProperties &properties)
Applies the requested set of properties to the window, if possible, for instance to request a change ...
An object to create GraphicsOutputs that share a particular 3-D API.
This is a base class for the various different classes that represent the result of a frame of render...
virtual bool begin_frame(FrameMode mode, Thread *current_thread)
This function will be called within the draw thread before beginning rendering for a given frame...
A thread; that is, a lightweight process.
virtual void process_events()
Do whatever processing is necessary to ensure that the window responds to user events.
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...