snes9x/gtk/src/gtk_wayland_egl_context.h

53 lines
1.4 KiB
C
Raw Normal View History

/*****************************************************************************\
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
This file is licensed under the Snes9x License.
For further information, consult the LICENSE file in the root directory.
\*****************************************************************************/
#ifndef __GTK_WAYLAND_EGL_CONTEXT_H
#define __GTK_WAYLAND_EGL_CONTEXT_H
#include "gtk_opengl_context.h"
#include "gtk_compat.h"
2018-10-22 01:03:35 +02:00
#include <epoxy/egl.h>
#include <wayland-egl.h>
2018-10-22 01:03:35 +02:00
class WaylandEGLContext : public OpenGLContext
2018-10-22 01:03:35 +02:00
{
public:
WaylandEGLContext();
~WaylandEGLContext();
bool attach(GtkWidget *widget);
bool create_context();
void resize();
void swap_buffers();
void swap_interval(int frames);
void make_current();
bool ready();
2018-10-22 01:03:35 +02:00
GdkWindow *gdk_window;
struct wl_display *display;
struct wl_registry *registry;
struct wl_compositor *compositor;
struct wl_subcompositor *subcompositor;
struct wl_surface *parent;
struct wl_surface *child;
struct wl_subsurface *subsurface;
struct wl_region *region;
EGLDisplay egl_display;
EGLSurface egl_surface;
EGLContext egl_context;
EGLConfig egl_config;
2018-10-22 01:03:35 +02:00
wl_egl_window *egl_window;
2022-01-31 04:23:33 +01:00
struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager;
struct zwp_idle_inhibitor_v1 *idle_inhibitor;
2018-10-22 01:03:35 +02:00
};
#endif