4 * An OpenGL based 'interactive canvas' 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_CONTENT_H__
30 #define __CLUTTER_CONTENT_H__
32 #include <clutter/clutter-types.h>
36 #define CLUTTER_TYPE_CONTENT (clutter_content_get_type ())
37 #define CLUTTER_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CONTENT, ClutterContent))
38 #define CLUTTER_IS_CONTENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CONTENT))
39 #define CLUTTER_CONTENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), CLUTTER_TYPE_CONTENT, ClutterContentIface))
41 typedef struct _ClutterContentIface ClutterContentIface;
46 * The <structname>ClutterContent</structname> structure is an opaque type
47 * whose members cannot be acccessed directly.
53 * ClutterContentIface:
54 * @get_preferred_size: virtual function; should be overridden by subclasses
55 * of #ClutterContent that have a natural size
56 * @paint_content: virtual function; called each time the content needs to
58 * @attached: virtual function; called each time a #ClutterContent is attached
60 * @detached: virtual function; called each time a #ClutterContent is detached
61 * from a #ClutterActor.
62 * @invalidate: virtual function; called each time a #ClutterContent state
65 * The <structname>ClutterContentIface</structname> structure contains only
70 struct _ClutterContentIface
73 GTypeInterface g_iface;
76 gboolean (* get_preferred_size) (ClutterContent *content,
79 void (* paint_content) (ClutterContent *content,
81 ClutterPaintNode *node);
83 void (* attached) (ClutterContent *content,
85 void (* detached) (ClutterContent *content,
88 void (* invalidate) (ClutterContent *content);
91 CLUTTER_AVAILABLE_IN_1_10
92 GType clutter_content_get_type (void) G_GNUC_CONST;
94 CLUTTER_AVAILABLE_IN_1_10
95 gboolean clutter_content_get_preferred_size (ClutterContent *content,
98 CLUTTER_AVAILABLE_IN_1_10
99 void clutter_content_invalidate (ClutterContent *content);
103 #endif /* __CLUTTER_CONTENT_H__ */