summaryrefslogtreecommitdiff
path: root/gtk/gtksnapshot.h
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2016-11-12 00:37:54 +0100
committerBenjamin Otte <otte@redhat.com>2016-11-15 17:48:45 +0100
commitd1fec79c0003520d4898448c690ab957e4e2819a (patch)
tree71f4ce95f0805b7f623f4855ef860ec4b7f2c488 /gtk/gtksnapshot.h
parent956edd83a7f7b5d232e279db8701f1f4f1bb4546 (diff)
downloadgtk+-d1fec79c0003520d4898448c690ab957e4e2819a.tar.gz
snapshot: Completely reengineer API
We now try to emulate cairo_t: We keep a stack of nodes via push/pop and a transform matrix. So whenever a new node is added to the snapshot, we transform it by the current transform matrix and append it to the current node.
Diffstat (limited to 'gtk/gtksnapshot.h')
-rw-r--r--gtk/gtksnapshot.h34
1 files changed, 30 insertions, 4 deletions
diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h
index 2d4e826923..b5a4b38954 100644
--- a/gtk/gtksnapshot.h
+++ b/gtk/gtksnapshot.h
@@ -38,12 +38,38 @@ typedef struct _GtkSnapshot GtkSnapshot;
GDK_AVAILABLE_IN_3_90
-GskRenderer * gtk_snapshot_get_renderer (const GtkSnapshot *state);
+GskRenderer * gtk_snapshot_get_renderer (const GtkSnapshot *state);
GDK_AVAILABLE_IN_3_90
-GskRenderNode * gtk_snapshot_create_render_node (const GtkSnapshot *state,
- const char *name,
- ...) G_GNUC_PRINTF(2, 3);
+void gtk_snapshot_push (GtkSnapshot *state,
+ GskRenderNode *node);
+GDK_AVAILABLE_IN_3_90
+cairo_t * gtk_snapshot_push_cairo_node (GtkSnapshot *state,
+ const graphene_rect_t *bounds,
+ const char *name,
+ ...) G_GNUC_PRINTF(3, 4);
+GDK_AVAILABLE_IN_3_90
+void gtk_snapshot_pop (GtkSnapshot *state);
+
+GDK_AVAILABLE_IN_3_90
+void gtk_snapshot_set_transform (GtkSnapshot *state,
+ const graphene_matrix_t *transform);
+GDK_AVAILABLE_IN_3_90
+void gtk_snapshot_transform (GtkSnapshot *state,
+ const graphene_matrix_t *matrix);
+GDK_AVAILABLE_IN_3_90
+void gtk_snapshot_translate_2d (GtkSnapshot *state,
+ int x,
+ int y);
+
+GDK_AVAILABLE_IN_3_90
+void gtk_snapshot_append_node (GtkSnapshot *state,
+ GskRenderNode *node);
+GDK_AVAILABLE_IN_3_90
+cairo_t * gtk_snapshot_append_cairo_node (GtkSnapshot *state,
+ const graphene_rect_t *bounds,
+ const char *name,
+ ...) G_GNUC_PRINTF(3, 4);
G_END_DECLS