Use GtkSnapshot getters

We can avoid direct struct access and gtksnapshotprivate.h
everywhere.
This commit is contained in:
Matthias Clasen 2018-03-11 00:29:46 -05:00
parent 7c18911c00
commit d55da3fd44
12 changed files with 18 additions and 18 deletions

View File

@ -21,7 +21,7 @@
#include "gsk/gsk.h"
#include "gskpango.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include <math.h>
@ -155,7 +155,7 @@ gsk_pango_renderer_show_text_glyphs (PangoRenderer *renderer,
if (node == NULL)
return;
if (crenderer->snapshot->record_names)
if (gtk_snapshot_get_record_names (crenderer->snapshot))
{
char name[64];
g_snprintf (name, sizeof (name), "Glyphs<%d>", glyphs->num_glyphs);

View File

@ -22,7 +22,7 @@
#include "gtkcssimageprivate.h"
#include "gtkcssstyleprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
/* for the types only */
#include "gtk/gtkcssimagecrossfadeprivate.h"

View File

@ -25,7 +25,7 @@
#include "gtk/gtkcssparserprivate.h"
#include "gtk/gtkcsstypesprivate.h"
#include "gtk/gtksnapshotprivate.h"
#include "gtk/gtksnapshot.h"
G_BEGIN_DECLS

View File

@ -24,7 +24,7 @@
#include "gtkcsscolorvalueprivate.h"
#include "gtkcssnumbervalueprivate.h"
#include "gtkcssrgbavalueprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtkpango.h"
@ -1053,7 +1053,7 @@ gtk_css_shadow_value_snapshot_outset (const GtkCssValue *shadow,
_gtk_css_number_value_get (shadow->voffset, 0),
_gtk_css_number_value_get (shadow->spread, 0),
_gtk_css_number_value_get (shadow->radius, 0));
if (snapshot->record_names)
if (gtk_snapshot_get_record_names (snapshot))
gsk_render_node_set_name (node, "Outset Shadow");
gtk_snapshot_append_node (snapshot, node);
gsk_render_node_unref (node);
@ -1084,7 +1084,7 @@ gtk_css_shadow_value_snapshot_inset (const GtkCssValue *shadow,
_gtk_css_number_value_get (shadow->voffset, 0),
_gtk_css_number_value_get (shadow->spread, 0),
_gtk_css_number_value_get (shadow->radius, 0));
if (snapshot->record_names)
if (gtk_snapshot_get_record_names (snapshot))
gsk_render_node_set_name (node, "Inset Shadow");
gtk_snapshot_append_node (snapshot, node);
gsk_render_node_unref (node);

View File

@ -41,7 +41,7 @@
#include "gtkprivate.h"
#include "gtkscrollable.h"
#include "gtksizerequest.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktreednd.h"
#include "gtktypebuiltins.h"

View File

@ -19,7 +19,7 @@
#include "gtk/gtk.h"
#include "gtkmagnifierprivate.h"
#include "gtkwidgetprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkintl.h"
enum {
@ -116,7 +116,7 @@ gtk_magnifier_snapshot (GtkWidget *widget,
g_signal_handler_block (priv->inspected, priv->draw_handler);
inspected_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
snapshot->record_names,
gtk_snapshot_get_record_names (snapshot),
NULL,
"MagnifierSnapshot");

View File

@ -25,7 +25,7 @@
#include "gtkscrolledwindow.h"
#include "gtkwidgetprivate.h"
#include "gtkmarshalers.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkprivate.h"
#include "gtkintl.h"
@ -676,7 +676,7 @@ gtk_overlay_snapshot (GtkWidget *widget,
GtkSnapshot *child_snapshot;
child_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
snapshot->record_names,
gtk_snapshot_get_record_names (snapshot),
NULL,
"OverlayCaptureMainChild");
gtk_snapshot_offset (child_snapshot, main_alloc.x, main_alloc.y);

View File

@ -438,7 +438,7 @@ snapshot_frame_fill (GtkSnapshot *snapshot,
gsk_rounded_rect_offset (&offset_outline, off_x, off_y);
node = gsk_border_node_new (&offset_outline, border_width, colors);
if (snapshot->record_names)
if (gtk_snapshot_get_record_names (snapshot))
gsk_render_node_set_name (node, "Border");
gtk_snapshot_append_node (snapshot, node);
gsk_render_node_unref (node);

View File

@ -28,7 +28,7 @@
#include "gtkcssstyleprivate.h"
#include "gtkcsstransformvalueprivate.h"
#include "gtkiconthemeprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include <math.h>

View File

@ -28,7 +28,7 @@
#include "gtkcontainerprivate.h"
#include "gtkprogresstrackerprivate.h"
#include "gtksettingsprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkwidgetprivate.h"
#include "a11y/gtkstackaccessible.h"
#include "a11y/gtkstackaccessibleprivate.h"
@ -1957,7 +1957,7 @@ gtk_stack_snapshot (GtkWidget *widget,
gtk_widget_get_allocation (priv->last_visible_child->widget,
&priv->last_visible_surface_allocation);
last_visible_snapshot = gtk_snapshot_new (gtk_snapshot_get_renderer (snapshot),
snapshot->record_names,
gtk_snapshot_get_record_names (snapshot),
NULL,
"StackCaptureLastVisibleChild");
gtk_widget_snapshot (priv->last_visible_child->widget, last_visible_snapshot);

View File

@ -49,7 +49,7 @@
#include "gtkrendericonprivate.h"
#include "gtkscrollable.h"
#include "gtksettingsprivate.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktooltip.h"
#include "gtktreednd.h"

View File

@ -60,7 +60,7 @@
#include "gtkselection.h"
#include "gtksettingsprivate.h"
#include "gtksizegroup-private.h"
#include "gtksnapshotprivate.h"
#include "gtksnapshot.h"
#include "gtkstylecontextprivate.h"
#include "gtktooltipprivate.h"
#include "gtktypebuiltins.h"