update to 1.10.4
[profile/ivi/clutter.git] / clutter / x11 / clutter-x11-texture-pixmap.h
1 /*
2  * Clutter.
3  *
4  * An OpenGL based 'interactive canvas' library.
5  *
6  * Authored By Johan Bilien  <johan.bilien@nokia.com>
7  *
8  * Copyright (C) 2007 OpenedHand
9  *
10  * This library is free software; you can redistribute it and/or
11  * modify it under the terms of the GNU Lesser General Public
12  * License as published by the Free Software Foundation; either
13  * version 2 of the License, or (at your option) any later version.
14  *
15  * This library is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18  * Lesser General Public License for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public
21  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
22  *
23  *
24  */
25
26 #ifndef __CLUTTER_X11_TEXTURE_PIXMAP_H__
27 #define __CLUTTER_X11_TEXTURE_PIXMAP_H__
28
29 #include <glib.h>
30 #include <glib-object.h>
31 #include <clutter/clutter.h>
32
33 #include <X11/Xlib.h>
34
35 G_BEGIN_DECLS
36
37 #define CLUTTER_X11_TYPE_TEXTURE_PIXMAP                 (clutter_x11_texture_pixmap_get_type ())
38 #define CLUTTER_X11_TEXTURE_PIXMAP(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_X11_TYPE_TEXTURE_PIXMAP, ClutterX11TexturePixmap))
39 #define CLUTTER_X11_TEXTURE_PIXMAP_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_X11_TYPE_TEXTURE_PIXMAP, ClutterX11TexturePixmapClass))
40 #define CLUTTER_X11_IS_TEXTURE_PIXMAP(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_X11_TYPE_TEXTURE_PIXMAP))
41 #define CLUTTER_X11_IS_TEXTURE_PIXMAP_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_X11_TYPE_TEXTURE_PIXMAP))
42 #define CLUTTER_X11_TEXTURE_PIXMAP_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_X11_TYPE_TEXTURE_PIXMAP, ClutterX11TexturePixmapClass))
43
44 typedef struct _ClutterX11TexturePixmap        ClutterX11TexturePixmap;
45 typedef struct _ClutterX11TexturePixmapClass   ClutterX11TexturePixmapClass;
46 typedef struct _ClutterX11TexturePixmapPrivate ClutterX11TexturePixmapPrivate;
47
48 /**
49  * ClutterX11TexturePixmap:
50  *
51  * The #ClutterX11TexturePixmap structure contains only private data
52  *
53  * Since: 0.8
54  */
55 struct _ClutterX11TexturePixmap
56 {
57   /*< private >*/
58   ClutterTexture parent;
59
60   ClutterX11TexturePixmapPrivate *priv;
61 };
62
63 /**
64  * ClutterX11TexturePixmapClass:
65  * @update_area: virtual function for updating the area of the texture
66  *
67  * The #ClutterX11TexturePixmapClass structure contains only private data
68  *
69  * Since: 0.8
70  */
71 struct _ClutterX11TexturePixmapClass
72 {
73   /*< private >*/
74   ClutterTextureClass parent_class;
75
76   /*< public >*/
77   void (* update_area) (ClutterX11TexturePixmap *texture,
78                         gint                     x,
79                         gint                     y,
80                         gint                     width,
81                         gint                     height);
82 };
83
84 GType clutter_x11_texture_pixmap_get_type (void) G_GNUC_CONST;
85
86 ClutterActor *clutter_x11_texture_pixmap_new             (void);
87 ClutterActor *clutter_x11_texture_pixmap_new_with_pixmap (Pixmap      pixmap);
88 ClutterActor *clutter_x11_texture_pixmap_new_with_window (Window      window);
89
90 void          clutter_x11_texture_pixmap_set_automatic   (ClutterX11TexturePixmap *texture,
91                                                           gboolean                 setting);
92 void          clutter_x11_texture_pixmap_set_pixmap      (ClutterX11TexturePixmap *texture,
93                                                           Pixmap                   pixmap);
94 void          clutter_x11_texture_pixmap_set_window      (ClutterX11TexturePixmap *texture,
95                                                           Window                   window,
96                                                           gboolean                 automatic);
97
98 void          clutter_x11_texture_pixmap_sync_window     (ClutterX11TexturePixmap *texture);
99 void          clutter_x11_texture_pixmap_update_area     (ClutterX11TexturePixmap *texture,
100                                                           gint                     x,
101                                                           gint                     y,
102                                                           gint                     width,
103                                                           gint                     height);
104
105 G_END_DECLS
106
107 #endif