forked from AuroraMiddleware/gtk
widget: Add gtk_widget_get_css_name() API
This commit is contained in:
parent
ad23ce23ad
commit
264967b764
@ -4189,6 +4189,7 @@ gtk_widget_insert_after
|
|||||||
gtk_widget_set_layout_manager
|
gtk_widget_set_layout_manager
|
||||||
gtk_widget_get_layout_manager
|
gtk_widget_get_layout_manager
|
||||||
gtk_widget_should_layout
|
gtk_widget_should_layout
|
||||||
|
gtk_widget_get_css_name
|
||||||
gtk_widget_add_css_class
|
gtk_widget_add_css_class
|
||||||
gtk_widget_remove_css_class
|
gtk_widget_remove_css_class
|
||||||
gtk_widget_has_css_class
|
gtk_widget_has_css_class
|
||||||
|
@ -13102,6 +13102,24 @@ gtk_widget_class_query_action (GtkWidgetClass *widget_class,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_widget_get_css_name:
|
||||||
|
* @self: a #GtkWidget
|
||||||
|
*
|
||||||
|
* Returns the CSS name that is used for @self.
|
||||||
|
*
|
||||||
|
* Returns: the CSS name
|
||||||
|
**/
|
||||||
|
const char *
|
||||||
|
gtk_widget_get_css_name (GtkWidget *self)
|
||||||
|
{
|
||||||
|
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (self);
|
||||||
|
|
||||||
|
g_return_val_if_fail (GTK_IS_WIDGET (self), NULL);
|
||||||
|
|
||||||
|
return g_quark_to_string (gtk_css_node_get_name (priv->cssnode));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_widget_add_css_class:
|
* gtk_widget_add_css_class:
|
||||||
* @widget: a #GtkWidget
|
* @widget: a #GtkWidget
|
||||||
|
@ -971,6 +971,8 @@ void gtk_widget_snapshot_child (GtkWidget *widget,
|
|||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
gboolean gtk_widget_should_layout (GtkWidget *widget);
|
gboolean gtk_widget_should_layout (GtkWidget *widget);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
const char * gtk_widget_get_css_name (GtkWidget *self) G_GNUC_PURE;
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
void gtk_widget_add_css_class (GtkWidget *widget,
|
void gtk_widget_add_css_class (GtkWidget *widget,
|
||||||
const char *css_class);
|
const char *css_class);
|
||||||
GDK_AVAILABLE_IN_ALL
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
Loading…
Reference in New Issue
Block a user