Functions
gtk_style_provider_get_icon_factory ()
GtkIconFactory *
gtk_style_provider_get_icon_factory (GtkStyleProvider *provider,
GtkWidgetPath *path);
gtk_style_provider_get_icon_factory has been deprecated since version 3.8 and should not be used in newly-written code.
Will always return NULL for all GTK-provided style providers.
Returns the GtkIconFactory defined to be in use for path
, or NULL if none
is defined.
Returns
The icon factory to use for path
, or NULL.
[nullable][transfer none]
Since: 3.0
gtk_style_provider_get_style ()
GtkStyleProperties *
gtk_style_provider_get_style (GtkStyleProvider *provider,
GtkWidgetPath *path);
gtk_style_provider_get_style has been deprecated since version 3.8 and should not be used in newly-written code.
Will always return NULL for all GTK-provided style providers
as the interface cannot correctly work the way CSS is specified.
Returns the style settings affecting a widget defined by path
, or NULL if
provider
doesn’t contemplate styling path
.
Returns
a GtkStyleProperties containing the
style settings affecting path
.
[nullable][transfer full]
Since: 3.0
Types and Values
struct GtkStyleProviderIface
struct GtkStyleProviderIface {
GtkStyleProperties * (* get_style) (GtkStyleProvider *provider,
GtkWidgetPath *path);
gboolean (* get_style_property) (GtkStyleProvider *provider,
GtkWidgetPath *path,
GtkStateFlags state,
GParamSpec *pspec,
GValue *value);
GtkIconFactory * (* get_icon_factory) (GtkStyleProvider *provider,
GtkWidgetPath *path);
};
GtkStyleProvider
typedef struct _GtkStyleProvider GtkStyleProvider;
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
#define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK 1
The priority used for default style information
that is used in the absence of themes.
Note that this is not very useful for providing default
styling for custom style classes - themes are likely to
override styling provided at this priority with
catch-all * {...} rules.
GTK_STYLE_PROVIDER_PRIORITY_THEME
#define GTK_STYLE_PROVIDER_PRIORITY_THEME 200
The priority used for style information provided
by themes.
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
#define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS 400
The priority used for style information provided
via GtkSettings.
This priority is higher than GTK_STYLE_PROVIDER_PRIORITY_THEME
to let settings override themes.
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
#define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600
A priority that can be used when adding a GtkStyleProvider
for application-specific style information.
GTK_STYLE_PROVIDER_PRIORITY_USER
#define GTK_STYLE_PROVIDER_PRIORITY_USER 800
The priority used for the style information from
XDG_CONFIG_HOME/gtk-3.0/gtk.css.
You should not use priorities higher than this, to
give the user the last word.