2016-11-07 16:59:38 +00:00
|
|
|
#ifndef __GSK_TEXTURE_PRIVATE_H__
|
|
|
|
#define __GSK_TEXTURE_PRIVATE_H__
|
|
|
|
|
|
|
|
#include "gsktexture.h"
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GSK_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GSK_TYPE_TEXTURE, GskTextureClass))
|
|
|
|
#define GSK_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GSK_TYPE_TEXTURE))
|
|
|
|
#define GSK_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GSK_TYPE_TEXTURE, GskTextureClass))
|
|
|
|
|
|
|
|
struct _GskTexture
|
|
|
|
{
|
2017-01-01 12:40:13 +00:00
|
|
|
GObject parent_instance;
|
2016-11-07 16:59:38 +00:00
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
2016-11-16 04:37:20 +00:00
|
|
|
|
|
|
|
gpointer render_key;
|
|
|
|
gpointer render_data;
|
|
|
|
GDestroyNotify render_notify;
|
2016-11-07 16:59:38 +00:00
|
|
|
};
|
|
|
|
|
2016-11-16 03:14:32 +00:00
|
|
|
struct _GskTextureClass {
|
2017-01-01 12:40:13 +00:00
|
|
|
GObjectClass parent_class;
|
2016-11-16 03:14:32 +00:00
|
|
|
|
2016-12-21 21:11:52 +00:00
|
|
|
void (* download) (GskTexture *texture,
|
|
|
|
guchar *data,
|
|
|
|
gsize stride);
|
2016-12-21 19:28:21 +00:00
|
|
|
cairo_surface_t * (* download_surface) (GskTexture *texture);
|
2016-11-16 03:14:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
gpointer gsk_texture_new (const GskTextureClass *klass,
|
|
|
|
int width,
|
|
|
|
int height);
|
|
|
|
GskTexture * gsk_texture_new_for_surface (cairo_surface_t *surface);
|
2016-12-21 19:28:21 +00:00
|
|
|
cairo_surface_t * gsk_texture_download_surface (GskTexture *texture);
|
2016-11-07 16:59:38 +00:00
|
|
|
|
2016-11-16 04:37:20 +00:00
|
|
|
gboolean gsk_texture_set_render_data (GskTexture *self,
|
|
|
|
gpointer key,
|
|
|
|
gpointer data,
|
|
|
|
GDestroyNotify notify);
|
|
|
|
void gsk_texture_clear_render_data (GskTexture *self);
|
|
|
|
gpointer gsk_texture_get_render_data (GskTexture *self,
|
|
|
|
gpointer key);
|
|
|
|
|
2016-11-07 16:59:38 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GSK_TEXTURE_PRIVATE_H__ */
|