From 33e95ae65fd8fa7803de4915f3acddba262c80c5 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 3 Nov 2010 12:17:06 +0100 Subject: [PATCH] GtkStyleContext: Add the start of a default set of class names/regions. --- docs/reference/gtk/gtk3-sections.txt | 21 ++++ gtk/gtkstylecontext.h | 139 +++++++++++++++++++++++++++ 2 files changed, 160 insertions(+) diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt index db3cfadef..b87b13a97 100644 --- a/docs/reference/gtk/gtk3-sections.txt +++ b/docs/reference/gtk/gtk3-sections.txt @@ -5369,6 +5369,27 @@ gtk_style_properties_get_type
gtkstylecontext GtkStyleContext + +GTK_STYLE_CLASS_BACKGROUND +GTK_STYLE_CLASS_BUTTON +GTK_STYLE_CLASS_CALENDAR +GTK_STYLE_CLASS_CELL +GTK_STYLE_CLASS_CHECK +GTK_STYLE_CLASS_DEFAULT +GTK_STYLE_CLASS_ENTRY +GTK_STYLE_CLASS_HEADER +GTK_STYLE_CLASS_MENU +GTK_STYLE_CLASS_RADIO +GTK_STYLE_CLASS_RUBBERBAND +GTK_STYLE_CLASS_SCROLLBAR +GTK_STYLE_CLASS_SLIDER +GTK_STYLE_CLASS_TOOLTIP +GTK_STYLE_CLASS_TROUGH +GTK_STYLE_REGION_COLUMN +GTK_STYLE_REGION_COLUMN_HEADER +GTK_STYLE_REGION_ROW +GTK_STYLE_REGION_TAB + GtkStyleContext gtk_style_context_new gtk_style_context_add_provider diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 5a3730765..c57d914c9 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -49,6 +49,145 @@ struct _GtkStyleContextClass void (* changed) (GtkStyleContext *context); }; +/* Predefined set of CSS classes */ + +/** + * GTK_STYLE_CLASS_CELL: + * + * A CSS class to match content rendered in cell views. + */ +#define GTK_STYLE_CLASS_CELL "cell" + +/** + * GTK_STYLE_CLASS_ENTRY: + * + * A CSS class to match text entries. + */ +#define GTK_STYLE_CLASS_ENTRY "entry" + +/** + * GTK_STYLE_CLASS_BUTTON: + * + * A CSS class to match buttons. + */ +#define GTK_STYLE_CLASS_BUTTON "button" + +/** + * GTK_STYLE_CLASS_CALENDAR: + * + * A CSS class to match calendars. + */ +#define GTK_STYLE_CLASS_CALENDAR "calendar" + +/** + * GTK_STYLE_CLASS_SLIDER: + * + * A CSS class to match sliders. + */ +#define GTK_STYLE_CLASS_SLIDER "slider" + +/** + * GTK_STYLE_CLASS_BACKGROUND: + * + * A CSS class to match the window background. + */ +#define GTK_STYLE_CLASS_BACKGROUND "background" + +/** + * GTK_STYLE_CLASS_RUBBERBAND: + * + * A CSS class to match the rubberband selection rectangle. + */ +#define GTK_STYLE_CLASS_RUBBERBAND "rubberband" + +/** + * GTK_STYLE_CLASS_TOOLTIP: + * + * A CSS class to match tooltip windows. + */ +#define GTK_STYLE_CLASS_TOOLTIP "tooltip" + +/** + * GTK_STYLE_CLASS_MENU: + * + * A CSS class to match popup menus. + */ +#define GTK_STYLE_CLASS_MENU "menu" + +/** + * GTK_STYLE_CLASS_RADIO: + * + * A CSS class to match radio buttons. + */ +#define GTK_STYLE_CLASS_RADIO "radio" + +/** + * GTK_STYLE_CLASS_CHECK: + * + * A CSS class to match check boxes. + */ +#define GTK_STYLE_CLASS_CHECK "check" + +/** + * GTK_STYLE_CLASS_DEFAULT: + * + * A CSS class to match the default widget. + */ +#define GTK_STYLE_CLASS_DEFAULT "default" + +/** + * GTK_STYLE_CLASS_TROUGH: + * + * A CSS class to match troughs, as in scrollbars and progressbars. + */ +#define GTK_STYLE_CLASS_TROUGH "trough" + +/** + * GTK_STYLE_CLASS_SCROLLBAR: + * + * A CSS class to match scrollbars. + */ +#define GTK_STYLE_CLASS_SCROLLBAR "scrollbar" + +/** + * GTK_STYLE_CLASS_HEADER: + * + * A CSS class to match a header element. + */ +#define GTK_STYLE_CLASS_HEADER "header" + + +/* Predefined set of widget regions */ + +/** + * GTK_STYLE_REGION_ROW: + * + * A widget region name to define a treeview row. + */ +#define GTK_STYLE_REGION_ROW "row" + +/** + * GTK_STYLE_REGION_COLUMN: + * + * A widget region name to define a treeview column. + */ +#define GTK_STYLE_REGION_COLUMN "column" + +/** + * GTK_STYLE_REGION_COLUMN_HEADER: + * + * A widget region name to define a treeview column header. + */ +#define GTK_STYLE_REGION_COLUMN_HEADER "column-header" + +/** + * GTK_STYLE_REGION_TAB: + * + * A widget region name to define a notebook tab. + */ +#define GTK_STYLE_REGION_TAB "tab" + + GType gtk_style_context_get_type (void) G_GNUC_CONST; GtkStyleContext * gtk_style_context_new (void); -- 2.43.2