3 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
21 #ifndef __GST_GL_WINDOW_WAYLAND_EGL_H__
22 #define __GST_GL_WINDOW_WAYLAND_EGL_H__
24 #include <wayland-client.h>
25 #include <wayland-egl.h>
26 #include <wayland-cursor.h>
28 #include <gst/gl/gl.h>
32 #define GST_GL_TYPE_WINDOW_WAYLAND_EGL (gst_gl_window_wayland_egl_get_type())
33 #define GST_GL_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_CAST((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL))
34 #define GST_GL_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS((k), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGLClass))
35 #define GST_GL_IS_WINDOW_WAYLAND_EGL(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL))
36 #define GST_GL_IS_WINDOW_WAYLAND_EGL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), GST_GL_TYPE_WINDOW_WAYLAND_EGL))
37 #define GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_GL_TYPE_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL_Class))
39 typedef struct _GstGLWindowWaylandEGL GstGLWindowWaylandEGL;
40 typedef struct _GstGLWindowWaylandEGLClass GstGLWindowWaylandEGLClass;
45 struct wl_display *display;
46 struct wl_registry *registry;
47 struct wl_compositor *compositor;
48 struct wl_shell *shell;
50 struct wl_pointer *pointer;
51 struct wl_keyboard *keyboard;
53 struct wl_cursor_theme *cursor_theme;
54 struct wl_cursor *default_cursor;
55 struct wl_surface *cursor_surface;
56 struct window *window;
64 struct display *display;
66 struct wl_event_queue *queue;
67 struct wl_surface *surface;
68 struct wl_shell_surface *shell_surface;
69 struct wl_egl_window *native;
70 struct wl_surface *foreign_surface;
71 struct wl_subsurface *subsurface;
72 struct wl_callback *callback;
73 int fullscreen, configured;
74 int window_width, window_height;
75 int window_x, window_y;
78 struct _GstGLWindowWaylandEGL {
82 struct display display;
87 gpointer _reserved[GST_PADDING];
90 struct _GstGLWindowWaylandEGLClass {
92 GstGLWindowClass parent_class;
95 gpointer _reserved[GST_PADDING];
98 GType gst_gl_window_wayland_egl_get_type (void);
100 GstGLWindowWaylandEGL * gst_gl_window_wayland_egl_new (GstGLDisplay * display);
102 void gst_gl_window_wayland_egl_create_window (GstGLWindowWaylandEGL * window_egl);
106 #endif /* __GST_GL_WINDOW_X11_H__ */