1#ifndef __GDK_TEXTURE_PRIVATE_H__
2#define __GDK_TEXTURE_PRIVATE_H__
3
4#include "gdktexture.h"
5
6#include "gdkenums.h"
7
8G_BEGIN_DECLS
9
10#define GDK_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_TEXTURE, GdkTextureClass))
11#define GDK_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_TEXTURE))
12#define GDK_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_TEXTURE, GdkTextureClass))
13
14struct _GdkTexture
15{
16 GObject parent_instance;
17
18 GdkMemoryFormat format;
19 int width;
20 int height;
21
22 gpointer render_key;
23 gpointer render_data;
24 GDestroyNotify render_notify;
25};
26
27struct _GdkTextureClass {
28 GObjectClass parent_class;
29
30 /* mandatory: Download in the given format into data */
31 void (* download) (GdkTexture *texture,
32 GdkMemoryFormat format,
33 guchar *data,
34 gsize stride);
35};
36
37gboolean gdk_texture_can_load (GBytes *bytes);
38
39GdkTexture * gdk_texture_new_for_surface (cairo_surface_t *surface);
40cairo_surface_t * gdk_texture_download_surface (GdkTexture *texture);
41
42void gdk_texture_do_download (GdkTexture *texture,
43 GdkMemoryFormat format,
44 guchar *data,
45 gsize stride);
46GdkMemoryFormat gdk_texture_get_format (GdkTexture *self);
47gboolean gdk_texture_set_render_data (GdkTexture *self,
48 gpointer key,
49 gpointer data,
50 GDestroyNotify notify);
51void gdk_texture_clear_render_data (GdkTexture *self);
52gpointer gdk_texture_get_render_data (GdkTexture *self,
53 gpointer key);
54
55G_END_DECLS
56
57#endif /* __GDK_TEXTURE_PRIVATE_H__ */
58

source code of gtk/gdk/gdktextureprivate.h