Blame gst-libs/gst/gl/wayland/gstglwindow_wayland_egl.h

Packit 971217
/*
Packit 971217
 * GStreamer
Packit 971217
 * Copyright (C) 2012 Matthew Waters <ystreet00@gmail.com>
Packit 971217
 *
Packit 971217
 * This library is free software; you can redistribute it and/or
Packit 971217
 * modify it under the terms of the GNU Library General Public
Packit 971217
 * License as published by the Free Software Foundation; either
Packit 971217
 * version 2 of the License, or (at your option) any later version.
Packit 971217
 *
Packit 971217
 * This library is distributed in the hope that it will be useful,
Packit 971217
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 971217
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 971217
 * Library General Public License for more details.
Packit 971217
 *
Packit 971217
 * You should have received a copy of the GNU Library General Public
Packit 971217
 * License along with this library; if not, write to the
Packit 971217
 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
Packit 971217
 * Boston, MA 02110-1301, USA.
Packit 971217
 */
Packit 971217
Packit 971217
#ifndef __GST_GL_WINDOW_WAYLAND_EGL_H__
Packit 971217
#define __GST_GL_WINDOW_WAYLAND_EGL_H__
Packit 971217
Packit 971217
#include <wayland-client.h>
Packit 971217
#include <wayland-egl.h>
Packit 971217
#include <wayland-cursor.h>
Packit 971217
Packit 971217
#include <gst/gl/gl.h>
Packit 971217
Packit 971217
G_BEGIN_DECLS
Packit 971217
Packit 971217
#define GST_TYPE_GL_WINDOW_WAYLAND_EGL         (gst_gl_window_wayland_egl_get_type())
Packit 971217
#define GST_GL_WINDOW_WAYLAND_EGL(o)           (G_TYPE_CHECK_INSTANCE_CAST((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL))
Packit 971217
#define GST_GL_WINDOW_WAYLAND_EGL_CLASS(k)     (G_TYPE_CHECK_CLASS((k), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGLClass))
Packit 971217
#define GST_IS_GL_WINDOW_WAYLAND_EGL(o)        (G_TYPE_CHECK_INSTANCE_TYPE((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL))
Packit 971217
#define GST_IS_GL_WINDOW_WAYLAND_EGL_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE((k), GST_TYPE_GL_WINDOW_WAYLAND_EGL))
Packit 971217
#define GST_GL_WINDOW_WAYLAND_EGL_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS((o), GST_TYPE_GL_WINDOW_WAYLAND_EGL, GstGLWindowWaylandEGL_Class))
Packit 971217
Packit 971217
typedef struct _GstGLWindowWaylandEGL        GstGLWindowWaylandEGL;
Packit 971217
typedef struct _GstGLWindowWaylandEGLClass   GstGLWindowWaylandEGLClass;
Packit 971217
Packit 971217
struct window;
Packit 971217
Packit 971217
struct display {
Packit 971217
  struct wl_display      *display;
Packit 971217
  struct wl_registry     *registry;
Packit 971217
  struct wl_compositor   *compositor;
Packit 971217
  struct wl_shell        *shell;
Packit 971217
  struct wl_seat         *seat;
Packit 971217
  struct wl_pointer      *pointer;
Packit 971217
  struct wl_keyboard     *keyboard;
Packit 971217
  struct wl_shm          *shm;
Packit 971217
  struct wl_cursor_theme *cursor_theme;
Packit 971217
  struct wl_cursor       *default_cursor;
Packit 971217
  struct wl_surface      *cursor_surface;
Packit 971217
  struct window          *window;
Packit 971217
  guint32                 serial;
Packit 971217
Packit 971217
  gdouble pointer_x;
Packit 971217
  gdouble pointer_y;
Packit 971217
};
Packit 971217
Packit 971217
struct window {
Packit 971217
  struct display *display;
Packit 971217
Packit 971217
  struct wl_event_queue     *queue;
Packit 971217
  struct wl_surface         *surface;
Packit 971217
  struct wl_shell_surface   *shell_surface;
Packit 971217
  struct wl_egl_window      *native;
Packit 971217
  struct wl_surface         *foreign_surface;
Packit 971217
  struct wl_subsurface      *subsurface;
Packit 971217
  struct wl_callback        *callback;
Packit 971217
  int fullscreen, configured;
Packit 971217
  int window_width, window_height;
Packit 971217
  int window_x, window_y;
Packit 971217
};
Packit 971217
Packit 971217
struct _GstGLWindowWaylandEGL {
Packit 971217
  /*< private >*/
Packit 971217
  GstGLWindow parent;
Packit 971217
Packit 971217
  struct display display;
Packit 971217
  struct window  window;
Packit 971217
Packit 971217
  GSource *wl_source;
Packit 971217
Packit 971217
  gpointer _reserved[GST_PADDING];
Packit 971217
};
Packit 971217
Packit 971217
struct _GstGLWindowWaylandEGLClass {
Packit 971217
  /*< private >*/
Packit 971217
  GstGLWindowClass parent_class;
Packit 971217
Packit 971217
  /*< private >*/
Packit 971217
  gpointer _reserved[GST_PADDING];
Packit 971217
};
Packit 971217
Packit 971217
G_GNUC_INTERNAL
Packit 971217
GType                   gst_gl_window_wayland_egl_get_type (void);
Packit 971217
Packit 971217
G_GNUC_INTERNAL
Packit 971217
GstGLWindowWaylandEGL * gst_gl_window_wayland_egl_new  (GstGLDisplay * display);
Packit 971217
Packit 971217
G_GNUC_INTERNAL
Packit 971217
void gst_gl_window_wayland_egl_create_window (GstGLWindowWaylandEGL * window_egl);
Packit 971217
Packit 971217
G_END_DECLS
Packit 971217
Packit 971217
#endif /* __GST_GL_WINDOW_WAYLAND_EGL_H__ */