mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
243bd4f0c8
Rename the surface getter to peek, following other render node getters, and make the surface-based constructor private, since it is not something we want to encourage. Update all callers.
57 lines
1.7 KiB
C
57 lines
1.7 KiB
C
#ifndef __GSK_RENDER_NODE_PRIVATE_H__
|
|
#define __GSK_RENDER_NODE_PRIVATE_H__
|
|
|
|
#include "gskrendernode.h"
|
|
#include <cairo.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
typedef struct _GskRenderNodeClass GskRenderNodeClass;
|
|
|
|
#define GSK_IS_RENDER_NODE_TYPE(node,type) (GSK_IS_RENDER_NODE (node) && (node)->node_class->node_type == (type))
|
|
|
|
struct _GskRenderNode
|
|
{
|
|
const GskRenderNodeClass *node_class;
|
|
|
|
volatile int ref_count;
|
|
|
|
/* Use for debugging */
|
|
char *name;
|
|
|
|
/* Scaling filters */
|
|
GskScalingFilter min_filter;
|
|
GskScalingFilter mag_filter;
|
|
|
|
graphene_rect_t bounds;
|
|
};
|
|
|
|
struct _GskRenderNodeClass
|
|
{
|
|
GskRenderNodeType node_type;
|
|
gsize struct_size;
|
|
const char *type_name;
|
|
|
|
void (* finalize) (GskRenderNode *node);
|
|
void (* draw) (GskRenderNode *node,
|
|
cairo_t *cr);
|
|
GVariant * (* serialize) (GskRenderNode *node);
|
|
GskRenderNode * (* deserialize) (GVariant *variant,
|
|
GError **error);
|
|
};
|
|
|
|
GskRenderNode * gsk_render_node_new (const GskRenderNodeClass *node_class,
|
|
gsize extra_size);
|
|
|
|
GVariant * gsk_render_node_serialize_node (GskRenderNode *node);
|
|
GskRenderNode * gsk_render_node_deserialize_node (GskRenderNodeType type,
|
|
GVariant *variant,
|
|
GError **error);
|
|
|
|
GskRenderNode * gsk_cairo_node_new_for_surface (const graphene_rect_t *bounds,
|
|
cairo_surface_t *surface);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GSK_RENDER_NODE_PRIVATE_H__ */
|