void _gtk_icon_helper_set_force_scale_pixbuf (GtkIconHelper *self, gboolean force_scale) { if (self->force_scale_pixbuf != force_scale) { self->force_scale_pixbuf = force_scale; gtk_icon_helper_invalidate (self); } }
gboolean _gtk_icon_helper_set_use_fallback (GtkIconHelper *self, gboolean use_fallback) { if (self->use_fallback != use_fallback) { self->use_fallback = use_fallback; gtk_icon_helper_invalidate (self); return TRUE; } return FALSE; }
gboolean _gtk_icon_helper_set_pixel_size (GtkIconHelper *self, gint pixel_size) { if (self->pixel_size != pixel_size) { self->pixel_size = pixel_size; gtk_icon_helper_invalidate (self); return TRUE; } return FALSE; }
gboolean _gtk_icon_helper_set_icon_size (GtkIconHelper *self, GtkIconSize icon_size) { if (self->priv->icon_size != icon_size) { self->priv->icon_size = icon_size; gtk_icon_helper_invalidate (self); return TRUE; } return FALSE; }
void _gtk_icon_helper_clear (GtkIconHelper *self) { g_clear_object (&self->paintable); self->texture_is_symbolic = FALSE; if (gtk_image_definition_get_storage_type (self->def) != GTK_IMAGE_EMPTY) { gtk_image_definition_unref (self->def); self->def = gtk_image_definition_new_empty (); gtk_icon_helper_invalidate (self); } }
static void gtk_icon_helper_take_definition (GtkIconHelper *self, GtkImageDefinition *def) { _gtk_icon_helper_clear (self); if (def == NULL) return; gtk_image_definition_unref (self->def); self->def = def; gtk_icon_helper_invalidate (self); }
void gtk_icon_helper_invalidate_for_change (GtkIconHelper *self, GtkCssStyleChange *change) { GtkIconHelperPrivate *priv = self->priv; if (change && ((gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_SYMBOLIC_ICON) && priv->rendered_surface_is_symbolic) || (gtk_css_style_change_affects (change, GTK_CSS_AFFECTS_ICON) && !priv->rendered_surface_is_symbolic))) { gtk_icon_helper_invalidate (self); } }