4 * An OpenGL based 'interactive image' library.
6 * Copyright (C) 2012 Intel Corporation.
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.
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.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22 * Emmanuele Bassi <ebassi@linux.intel.com>
25 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
26 #error "Only <clutter/clutter.h> can be included directly."
29 #ifndef __CLUTTER_IMAGE_H__
30 #define __CLUTTER_IMAGE_H__
32 #include <cogl/cogl.h>
33 #include <clutter/clutter-types.h>
37 #define CLUTTER_TYPE_IMAGE (clutter_image_get_type ())
38 #define CLUTTER_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_IMAGE, ClutterImage))
39 #define CLUTTER_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_IMAGE))
40 #define CLUTTER_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_IMAGE, ClutterImageClass))
41 #define CLUTTER_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_IMAGE))
42 #define CLUTTER_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_IMAGE, ClutterImageClass))
45 * CLUTTER_IMAGE_ERROR:
47 * Error domain for the #ClutterImageError enumeration.
51 #define CLUTTER_IMAGE_ERROR (clutter_image_error_quark ())
53 typedef struct _ClutterImage ClutterImage;
54 typedef struct _ClutterImagePrivate ClutterImagePrivate;
55 typedef struct _ClutterImageClass ClutterImageClass;
59 * @CLUTTER_IMAGE_ERROR_INVALID_DATA: Invalid data passed to the
60 * clutter_image_set_data() function.
62 * Error enumeration for #ClutterImage.
67 CLUTTER_IMAGE_ERROR_INVALID_DATA
73 * The <structname>ClutterImage</structname> structure contains
74 * private data and should only be accessed using the provided
82 GObject parent_instance;
84 ClutterImagePrivate *priv;
90 * The <structname>ClutterImageClass</structname> structure contains
95 struct _ClutterImageClass
98 GObjectClass parent_class;
100 gpointer _padding[16];
103 CLUTTER_AVAILABLE_IN_1_10
104 GQuark clutter_image_error_quark (void);
105 CLUTTER_AVAILABLE_IN_1_10
106 GType clutter_image_get_type (void) G_GNUC_CONST;
108 CLUTTER_AVAILABLE_IN_1_10
109 ClutterContent * clutter_image_new (void);
110 CLUTTER_AVAILABLE_IN_1_10
111 gboolean clutter_image_set_data (ClutterImage *image,
113 CoglPixelFormat pixel_format,
118 CLUTTER_AVAILABLE_IN_1_10
119 gboolean clutter_image_set_area (ClutterImage *image,
121 CoglPixelFormat pixel_format,
122 const cairo_rectangle_int_t *rect,
125 CLUTTER_AVAILABLE_IN_1_12
126 gboolean clutter_image_set_bytes (ClutterImage *image,
128 CoglPixelFormat pixel_format,
134 #if defined(COGL_ENABLE_EXPERIMENTAL_API) && defined(CLUTTER_ENABLE_EXPERIMENTAL_API)
135 CLUTTER_AVAILABLE_IN_1_10
136 CoglTexture * clutter_image_get_texture (ClutterImage *image);
141 #endif /* __CLUTTER_IMAGE_H__ */