diff options
-rw-r--r-- | docs/reference/gtk/gtk4-sections.txt | 2 | ||||
-rw-r--r-- | gtk/gtksnapshot.c | 17 | ||||
-rw-r--r-- | gtk/gtksnapshot.h | 5 | ||||
-rw-r--r-- | gtk/gtksnapshotprivate.h | 2 |
4 files changed, 23 insertions, 3 deletions
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index fb8707a246..64f11cb4c3 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4171,6 +4171,8 @@ gtk_snapshot_ref gtk_snapshot_unref gtk_snapshot_to_node gtk_snapshot_free_to_node +gtk_snapshot_get_renderer +gtk_snapshot_get_record_names gtk_snapshot_push gtk_snapshot_push_transform gtk_snapshot_push_opacity diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index ffc7217544..a771a1adcc 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -1223,12 +1223,27 @@ gtk_snapshot_pop (GtkSnapshot *snapshot) * Returns: (transfer none): the #GskRenderer */ GskRenderer * -gtk_snapshot_get_renderer (const GtkSnapshot *snapshot) +gtk_snapshot_get_renderer (GtkSnapshot *snapshot) { return snapshot->renderer; } /** + * gtk_snapshot_get_record_names: + * @snapshot: a #GtkSnapshot + * + * Obtains whether the snapshot is recording names + * for debugging. + * + * Returns: whether the snapshot records names + */ +gboolean +gtk_snapshot_get_record_names (GtkSnapshot *snapshot) +{ + return snapshot->record_names; +} + +/** * gtk_snapshot_offset: * @snapshot: a $GtkSnapshot * @x: horizontal translation diff --git a/gtk/gtksnapshot.h b/gtk/gtksnapshot.h index 67c502dea4..767e1bcbfb 100644 --- a/gtk/gtksnapshot.h +++ b/gtk/gtksnapshot.h @@ -57,6 +57,11 @@ GDK_AVAILABLE_IN_ALL GskRenderNode * gtk_snapshot_to_node (GtkSnapshot *snapshot); GDK_AVAILABLE_IN_ALL +GskRenderer * gtk_snapshot_get_renderer (GtkSnapshot *snapshot); +GDK_AVAILABLE_IN_ALL +gboolean gtk_snapshot_get_record_names (GtkSnapshot *snapshot); + +GDK_AVAILABLE_IN_ALL void gtk_snapshot_push (GtkSnapshot *snapshot, gboolean keep_coordinates, const char *name, diff --git a/gtk/gtksnapshotprivate.h b/gtk/gtksnapshotprivate.h index f2117bb43f..f78b5ede19 100644 --- a/gtk/gtksnapshotprivate.h +++ b/gtk/gtksnapshotprivate.h @@ -88,8 +88,6 @@ struct _GtkSnapshot { GPtrArray *nodes; }; -GskRenderer * gtk_snapshot_get_renderer (const GtkSnapshot *snapshot); - G_END_DECLS #endif /* __GTK_SNAPSHOT_PRIVATE_H__ */ |