gtk2/gdk/gdktextureprivate.h

54 lines
2.4 KiB
C
Raw Normal View History

#ifndef __GDK_TEXTURE_PRIVATE_H__
#define __GDK_TEXTURE_PRIVATE_H__
2016-11-07 16:59:38 +00:00
#include "gdktexture.h"
2016-11-07 16:59:38 +00:00
G_BEGIN_DECLS
#define GDK_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_TEXTURE, GdkTextureClass))
#define GDK_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_TEXTURE))
#define GDK_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_TEXTURE, GdkTextureClass))
2016-11-07 16:59:38 +00:00
struct _GdkTexture
2016-11-07 16:59:38 +00:00
{
2017-01-01 12:40:13 +00:00
GObject parent_instance;
2016-11-07 16:59:38 +00:00
int width;
int height;
gpointer render_key;
gpointer render_data;
GDestroyNotify render_notify;
2016-11-07 16:59:38 +00:00
};
struct _GdkTextureClass {
2017-01-01 12:40:13 +00:00
GObjectClass parent_class;
void (* download) (GdkTexture *texture,
const GdkRectangle *area,
guchar *data,
gsize stride);
};
gpointer gdk_texture_new (const GdkTextureClass *klass,
int width,
int height);
GdkTexture * gdk_texture_new_for_surface (cairo_surface_t *surface);
cairo_surface_t * gdk_texture_download_surface (GdkTexture *texture);
void gdk_texture_download_area (GdkTexture *texture,
const GdkRectangle *area,
guchar *data,
gsize stride);
2016-11-07 16:59:38 +00:00
gboolean gdk_texture_set_render_data (GdkTexture *self,
gpointer key,
gpointer data,
GDestroyNotify notify);
void gdk_texture_clear_render_data (GdkTexture *self);
gpointer gdk_texture_get_render_data (GdkTexture *self,
gpointer key);
2016-11-07 16:59:38 +00:00
G_END_DECLS
#endif /* __GDK_TEXTURE_PRIVATE_H__ */