Document predefined style provider priorites

Also, rename GTK_STYLE_PROVIDER_PRIORITY_DEFAULT to _THEME and
use it for themes.
This commit is contained in:
Matthias Clasen 2010-11-22 23:01:27 -05:00 committed by Carlos Garnacho
parent a260059c7f
commit d7a0fe5bf1
3 changed files with 44 additions and 4 deletions

View File

@ -5297,10 +5297,10 @@ gtk_widget_path_prepend_type
<TITLE>GtkStyleProvider</TITLE> <TITLE>GtkStyleProvider</TITLE>
GtkStyleProviderIface GtkStyleProviderIface
GtkStyleProvider GtkStyleProvider
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
GTK_STYLE_PROVIDER_PRIORITY_DEFAULT
GTK_STYLE_PROVIDER_PRIORITY_FALLBACK GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
GTK_STYLE_PROVIDER_PRIORITY_THEME
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS GTK_STYLE_PROVIDER_PRIORITY_SETTINGS
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
GTK_STYLE_PROVIDER_PRIORITY_USER GTK_STYLE_PROVIDER_PRIORITY_USER
gtk_style_provider_get_icon_factory gtk_style_provider_get_icon_factory
gtk_style_provider_get_style gtk_style_provider_get_style

View File

@ -2639,7 +2639,7 @@ settings_update_theme (GtkSettings *settings)
{ {
gtk_style_context_add_provider_for_screen (settings->screen, gtk_style_context_add_provider_for_screen (settings->screen,
GTK_STYLE_PROVIDER (new_provider), GTK_STYLE_PROVIDER (new_provider),
GTK_STYLE_PROVIDER_PRIORITY_SETTINGS - 1); GTK_STYLE_PROVIDER_PRIORITY_THEME);
g_object_ref (new_provider); g_object_ref (new_provider);
} }

View File

@ -33,10 +33,50 @@ G_BEGIN_DECLS
#define GTK_IS_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER)) #define GTK_IS_STYLE_PROVIDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_STYLE_PROVIDER))
#define GTK_STYLE_PROVIDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderIface)) #define GTK_STYLE_PROVIDER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), GTK_TYPE_STYLE_PROVIDER, GtkStyleProviderIface))
/**
* GTK_STYLE_PROVIDER_PRIORITY_FALLBACK:
*
* The priority used for default style information
* that is used in the absence of themes.
*/
#define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK 1 #define GTK_STYLE_PROVIDER_PRIORITY_FALLBACK 1
#define GTK_STYLE_PROVIDER_PRIORITY_DEFAULT 200
/**
* GTK_STYLE_PROVIDER_PRIORITY_DEFAULT:
*
* The priority used for style information provided
* by themes.
*/
#define GTK_STYLE_PROVIDER_PRIORITY_THEME 200
/**
* GTK_STYLE_PROVIDER_PRIORITY_SETTINGS:
*
* The priority used for style information provided
* via #GtkSettings.
*
* This priority is higher than #GTK_STYLE_PROVIDER_PRIORITY_THEME
* to let settings override themes.
*/
#define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS 400 #define GTK_STYLE_PROVIDER_PRIORITY_SETTINGS 400
/**
* GTK_STYLE_PROVIDER_PRIORITY_APPLICATION:
*
* A priority that can be used when adding a #GtkStyleProvider
* for application-specific style information.
*/
#define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600 #define GTK_STYLE_PROVIDER_PRIORITY_APPLICATION 600
/**
* GTK_STYLE_PROVIDER_PRIORITY_USER:
*
* The priority used for the style information from
* <filename>~/.gtk-3.0.css</filename>.
*
* You should not use priorities higher than this, to
* give the user the last word.
*/
#define GTK_STYLE_PROVIDER_PRIORITY_USER 800 #define GTK_STYLE_PROVIDER_PRIORITY_USER 800
typedef struct _GtkStyleProviderIface GtkStyleProviderIface; typedef struct _GtkStyleProviderIface GtkStyleProviderIface;