mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Turn context structs into classes.
Remove placeholder "#pragma once" uses.
This commit is contained in:
parent
c4412fa77b
commit
7dcf6a0ce4
|
@ -1,12 +1,15 @@
|
|||
#pragma once
|
||||
#ifndef __GTK_GLX_CONTEXT_H
|
||||
#define __GTK_GLX_CONTEXT_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkx.h>
|
||||
#include <epoxy/glx.h>
|
||||
|
||||
#include "gtk_opengl_context.h"
|
||||
|
||||
struct GTKGLXContext : OpenGLContext
|
||||
class GTKGLXContext : public OpenGLContext
|
||||
{
|
||||
public:
|
||||
GTKGLXContext ();
|
||||
~GTKGLXContext ();
|
||||
bool attach (GtkWidget *widget);
|
||||
|
@ -33,3 +36,5 @@ struct GTKGLXContext : OpenGLContext
|
|||
int version_major;
|
||||
int version_minor;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
#pragma once
|
||||
#ifndef __GTK_OPENGL_CONTEXT_H
|
||||
#define __GTK_OPENGL_CONTEXT_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
struct OpenGLContext
|
||||
class OpenGLContext
|
||||
{
|
||||
public:
|
||||
virtual bool attach (GtkWidget *widget) = 0;
|
||||
virtual bool create_context () = 0;
|
||||
virtual void resize () = 0;
|
||||
|
@ -15,3 +18,5 @@ struct OpenGLContext
|
|||
int width;
|
||||
int height;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
#pragma once
|
||||
#ifndef __GTK_WAYLAND_EGL_CONTEXT_H
|
||||
#define __GTK_WAYLAND_EGL_CONTEXT_H
|
||||
|
||||
#include <gdk/gdkwayland.h>
|
||||
#include <wayland-egl.h>
|
||||
#include <epoxy/egl.h>
|
||||
|
||||
#include "gtk_opengl_context.h"
|
||||
|
||||
struct WaylandEGLContext : OpenGLContext
|
||||
class WaylandEGLContext : public OpenGLContext
|
||||
{
|
||||
public:
|
||||
WaylandEGLContext ();
|
||||
~WaylandEGLContext ();
|
||||
bool attach (GtkWidget *widget);
|
||||
|
@ -35,3 +38,5 @@ struct WaylandEGLContext : OpenGLContext
|
|||
|
||||
wl_egl_window *egl_window;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue