| 1 |
/* |
| 2 |
* Clutter. |
| 3 |
* |
| 4 |
* An OpenGL based 'interactive canvas' library. |
| 5 |
* |
| 6 |
* Copyright (C) 2011 Intel Corporation. |
| 7 |
* |
| 8 |
* This library is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU Lesser General Public |
| 10 |
* License as published by the Free Software Foundation; either |
| 11 |
* version 2 of the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* This library is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 16 |
* Lesser General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU Lesser General Public |
| 19 |
* License along with this library. If not, see |
| 20 |
* <http://www.gnu.org/licenses/>. |
| 21 |
* |
| 22 |
* Authors: |
| 23 |
* Robert Bragg <[email protected]> |
| 24 |
* |
| 25 |
*/ |
| 26 |
|
| 27 |
#ifndef __CLUTTER_WAYLAND_SURFACE_H__ |
| 28 |
#define __CLUTTER_WAYLAND_SURFACE_H__ |
| 29 |
|
| 30 |
#include <glib.h> |
| 31 |
#include <glib-object.h> |
| 32 |
#include <clutter/clutter.h> |
| 33 |
|
| 34 |
#include <wayland-server.h> |
| 35 |
|
| 36 |
G_BEGIN_DECLS |
| 37 |
|
| 38 |
#define CLUTTER_WAYLAND_TYPE_SURFACE (clutter_wayland_surface_get_type ()) |
| 39 |
#define CLUTTER_WAYLAND_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_WAYLAND_TYPE_SURFACE, ClutterWaylandSurface)) |
| 40 |
#define CLUTTER_WAYLAND_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_WAYLAND_TYPE_SURFACE, ClutterWaylandSurfaceClass)) |
| 41 |
#define CLUTTER_WAYLAND_IS_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_WAYLAND_TYPE_SURFACE)) |
| 42 |
#define CLUTTER_WAYLAND_IS_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_WAYLAND_TYPE_SURFACE)) |
| 43 |
#define CLUTTER_WAYLAND_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_WAYLAND_TYPE_SURFACE, ClutterWaylandSurfaceClass)) |
| 44 |
|
| 45 |
typedef struct _ClutterWaylandSurface ClutterWaylandSurface; |
| 46 |
typedef struct _ClutterWaylandSurfaceClass ClutterWaylandSurfaceClass; |
| 47 |
typedef struct _ClutterWaylandSurfacePrivate ClutterWaylandSurfacePrivate; |
| 48 |
|
| 49 |
/** |
| 50 |
* ClutterWaylandSurface: |
| 51 |
* |
| 52 |
* The #ClutterWaylandSurface structure contains only private data |
| 53 |
* |
| 54 |
* Since: 1.10 |
| 55 |
* Stability: unstable |
| 56 |
*/ |
| 57 |
struct _ClutterWaylandSurface |
| 58 |
{ |
| 59 |
/*< private >*/ |
| 60 |
ClutterActor parent; |
| 61 |
|
| 62 |
ClutterWaylandSurfacePrivate *priv; |
| 63 |
}; |
| 64 |
|
| 65 |
/** |
| 66 |
* ClutterWaylandSurfaceClass: |
| 67 |
* @queue_damage_redraw: class handler of the #ClutterWaylandSurface::queue-damage-redraw signal |
| 68 |
* |
| 69 |
* The #ClutterWaylandSurfaceClass structure contains only private data |
| 70 |
* |
| 71 |
* Since: 1.10 |
| 72 |
* Stability: unstable |
| 73 |
*/ |
| 74 |
struct _ClutterWaylandSurfaceClass |
| 75 |
{ |
| 76 |
/*< private >*/ |
| 77 |
ClutterActorClass parent_class; |
| 78 |
|
| 79 |
/*< public >*/ |
| 80 |
void (*queue_damage_redraw) (ClutterWaylandSurface *texture, |
| 81 |
gint x, |
| 82 |
gint y, |
| 83 |
gint width, |
| 84 |
gint height); |
| 85 |
|
| 86 |
/*< private >*/ |
| 87 |
/* padding for future expansion */ |
| 88 |
gpointer _padding_dummy[8]; |
| 89 |
}; |
| 90 |
|
| 91 |
CLUTTER_AVAILABLE_IN_1_10 |
| 92 |
GType clutter_wayland_surface_get_type (void) G_GNUC_CONST; |
| 93 |
|
| 94 |
CLUTTER_AVAILABLE_IN_1_8 |
| 95 |
ClutterActor *clutter_wayland_surface_new (struct wl_surface *surface); |
| 96 |
CLUTTER_AVAILABLE_IN_1_10 |
| 97 |
void clutter_wayland_surface_set_surface (ClutterWaylandSurface *self, |
| 98 |
struct wl_surface *surface); |
| 99 |
CLUTTER_AVAILABLE_IN_1_10 |
| 100 |
struct wl_surface *clutter_wayland_surface_get_surface (ClutterWaylandSurface *self); |
| 101 |
CLUTTER_AVAILABLE_IN_1_8 |
| 102 |
gboolean clutter_wayland_surface_attach_buffer (ClutterWaylandSurface *self, |
| 103 |
struct wl_resource *buffer, |
| 104 |
GError **error); |
| 105 |
CLUTTER_AVAILABLE_IN_1_8 |
| 106 |
void clutter_wayland_surface_damage_buffer (ClutterWaylandSurface *self, |
| 107 |
struct wl_resource *buffer, |
| 108 |
gint32 x, |
| 109 |
gint32 y, |
| 110 |
gint32 width, |
| 111 |
gint32 height); |
| 112 |
CLUTTER_AVAILABLE_IN_1_10 |
| 113 |
CoglTexture *clutter_wayland_surface_get_cogl_texture (ClutterWaylandSurface *self); |
| 114 |
|
| 115 |
G_END_DECLS |
| 116 |
|
| 117 |
#endif |