Top | ![]() |
![]() |
![]() |
![]() |
GtkStyleContext is an object that stores styling information affecting a widget.
In order to construct the final style information, GtkStyleContext
queries information from all attached GtkStyleProviders. Style providers
can be either attached explicitly to the context through
gtk_style_context_add_provider()
, or to the display through
gtk_style_context_add_provider_for_display()
. The resulting style is a
combination of all providers’ information in priority order.
For GTK+ widgets, any GtkStyleContext returned by
gtk_widget_get_style_context()
will already have a GdkDisplay and
RTL/LTR information set. The style context will also be updated
automatically if any of these settings change on the widget.
Widgets can add style classes to their context, which can be used to associate different styles by class. The documentation for individual widgets lists which style classes it uses itself, and which style classes may be added by applications to affect their appearance.
GTK+ defines macros for a number of style classes.
If you are developing a library with custom GtkWidgets that
render differently than standard components, you may need to add a
GtkStyleProvider yourself with the GTK_STYLE_PROVIDER_PRIORITY_FALLBACK
priority, either a GtkCssProvider or a custom object implementing the
GtkStyleProvider interface. This way themes may still attempt
to style your UI elements in a different way if needed so.
If you are using custom styling on an applications, you probably want then
to make your style information prevail to the theme’s, so you must use
a GtkStyleProvider with the GTK_STYLE_PROVIDER_PRIORITY_APPLICATION
priority, keep in mind that the user settings in
XDG_CONFIG_HOME/gtk-4.0/gtk.css
will
still take precedence over your changes, as it uses the
GTK_STYLE_PROVIDER_PRIORITY_USER
priority.
void gtk_style_context_add_provider (GtkStyleContext *context
,GtkStyleProvider *provider
,guint priority
);
Adds a style provider to context
, to be used in style construction.
Note that a style provider added by this function only affects
the style of the widget to which context
belongs. If you want
to affect the style of all widgets, use
gtk_style_context_add_provider_for_display()
.
Note: If both priorities are the same, a GtkStyleProvider
added through this function takes precedence over another added
through gtk_style_context_add_provider_for_display()
.
context |
||
provider |
||
priority |
the priority of the style provider. The lower
it is, the earlier it will be used in the style
construction. Typically this will be in the range
between |
void gtk_style_context_add_provider_for_display (GdkDisplay *display
,GtkStyleProvider *provider
,guint priority
);
Adds a global style provider to display
, which will be used
in style construction for all GtkStyleContexts under display
.
GTK+ uses this to make styling information from GtkSettings available.
Note: If both priorities are the same, A GtkStyleProvider
added through gtk_style_context_add_provider()
takes precedence
over another added through this function.
display |
||
provider |
||
priority |
the priority of the style provider. The lower
it is, the earlier it will be used in the style
construction. Typically this will be in the range
between |
GdkDisplay *
gtk_style_context_get_display (GtkStyleContext *context
);
Returns the GdkDisplay to which context
is attached.
GtkStateFlags
gtk_style_context_get_state (GtkStyleContext *context
);
Returns the state used for style matching.
This method should only be used to retrieve the GtkStateFlags
to pass to GtkStyleContext methods, like gtk_style_context_get_padding()
.
If you need to retrieve the current state of a GtkWidget, use
gtk_widget_get_state_flags()
.
void gtk_style_context_get_color (GtkStyleContext *context
,GdkRGBA *color
);
Gets the foreground color for a given state.
See gtk_style_context_get_property()
and
GTK_STYLE_PROPERTY_COLOR for details.
void gtk_style_context_get_border (GtkStyleContext *context
,GtkBorder *border
);
Gets the border for a given state as a GtkBorder.
See gtk_style_context_get_property()
and
GTK_STYLE_PROPERTY_BORDER_WIDTH for details.
void gtk_style_context_get_padding (GtkStyleContext *context
,GtkBorder *padding
);
Gets the padding for a given state as a GtkBorder.
See gtk_style_context_get()
and GTK_STYLE_PROPERTY_PADDING
for details.
void gtk_style_context_get_margin (GtkStyleContext *context
,GtkBorder *margin
);
Gets the margin for a given state as a GtkBorder.
See gtk_style_property_get()
and GTK_STYLE_PROPERTY_MARGIN
for details.
gboolean gtk_style_context_lookup_color (GtkStyleContext *context
,const gchar *color_name
,GdkRGBA *color
);
Looks up and resolves a color name in the context
color map.
void gtk_style_context_remove_provider (GtkStyleContext *context
,GtkStyleProvider *provider
);
Removes provider
from the style providers list in context
.
void gtk_style_context_remove_provider_for_display (GdkDisplay *display
,GtkStyleProvider *provider
);
Removes provider
from the global style providers list in display
.
void
gtk_style_context_reset_widgets (GdkDisplay *display
);
This function recomputes the styles for all widgets under a particular GdkDisplay. This is useful when some global parameter has changed that affects the appearance of all widgets, because when a widget gets a new style, it will both redraw and recompute any cached information about its appearance. As an example, it is used when the color scheme changes in the related GtkSettings object.
void
gtk_style_context_restore (GtkStyleContext *context
);
Restores context
state to a previous stage.
See gtk_style_context_save()
.
void
gtk_style_context_save (GtkStyleContext *context
);
Saves the context
state, so temporary modifications done through
gtk_style_context_add_class()
, gtk_style_context_remove_class()
,
gtk_style_context_set_state()
, etc. can quickly be reverted
in one go through gtk_style_context_restore()
.
The matching call to gtk_style_context_restore()
must be done
before GTK returns to the main loop.
void gtk_style_context_add_class (GtkStyleContext *context
,const gchar *class_name
);
Adds a style class to context
, so posterior calls to
gtk_style_context_get()
or any of the gtk_render_*()
functions will make use of this new class for styling.
In the CSS file format, a GtkEntry defining a “search” class, would be matched by:
1 |
entry.search { ... } |
While any widget defining a “search” class would be matched by:
1 |
.search { ... } |
void gtk_style_context_remove_class (GtkStyleContext *context
,const gchar *class_name
);
Removes class_name
from context
.
gboolean gtk_style_context_has_class (GtkStyleContext *context
,const gchar *class_name
);
Returns TRUE
if context
currently has defined the
given class name.
GList *
gtk_style_context_list_classes (GtkStyleContext *context
);
Returns the list of classes currently defined in context
.
void gtk_style_context_set_display (GtkStyleContext *context
,GdkDisplay *display
);
Attaches context
to the given display.
The display is used to add style information from “global” style providers, such as the display's GtkSettings instance.
If you are using a GtkStyleContext returned from
gtk_widget_get_style_context()
, you do not need to
call this yourself.
void gtk_style_context_set_state (GtkStyleContext *context
,GtkStateFlags flags
);
Sets the state to be used for style matching.
void gtk_style_context_set_scale (GtkStyleContext *context
,gint scale
);
Sets the scale to use when getting image assets for the style.
gint
gtk_style_context_get_scale (GtkStyleContext *context
);
Returns the scale used for assets.
char * gtk_style_context_to_string (GtkStyleContext *context
,GtkStyleContextPrintFlags flags
);
Converts the style context into a string representation.
The string representation always includes information about
the name, state, id, visibility and style classes of the CSS
node that is backing context
. Depending on the flags, more
information may be included.
This function is intended for testing and debugging of the CSS implementation in GTK+. There are no guarantees about the format of the returned string, it may change.
GtkBorder *
gtk_border_new (void
);
Allocates a new GtkBorder and initializes its elements to zero.
void gtk_render_arrow (GtkStyleContext *context
,cairo_t *cr
,gdouble angle
,gdouble x
,gdouble y
,gdouble size
);
Renders an arrow pointing to angle
.
Typical arrow rendering at 0, 1⁄2 π;, π; and 3⁄2 π:
context |
||
cr |
a cairo_t |
|
angle |
arrow angle from 0 to 2 * |
|
x |
X origin of the render area |
|
y |
Y origin of the render area |
|
size |
square side for render area |
void gtk_render_background (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders the background of an element.
Typical background rendering, showing the effect of
background-image
, border-width
and border-radius
:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_check (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders a checkmark (as in a GtkCheckButton).
The GTK_STATE_FLAG_CHECKED
state determines whether the check is
on or off, and GTK_STATE_FLAG_INCONSISTENT
determines whether it
should be marked as undefined.
Typical checkmark rendering:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_expander (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders an expander (as used in GtkTreeView and GtkExpander) in the area
defined by x
, y
, width
, height
. The state GTK_STATE_FLAG_CHECKED
determines whether the expander is collapsed or expanded.
Typical expander rendering:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_focus (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders a focus indicator on the rectangle determined by x
, y
, width
, height
.
Typical focus rendering:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_frame (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders a frame around the rectangle defined by x
, y
, width
, height
.
Examples of frame rendering, showing the effect of border-image
,
border-color
, border-width
, border-radius
and junctions:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_handle (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders a handle (as in GtkPaned and
GtkWindow’s resize grip), in the rectangle
determined by x
, y
, width
, height
.
Handles rendered for the paned and grip classes:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_layout (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,PangoLayout *layout
);
Renders layout
on the coordinates x
, y
void gtk_render_line (GtkStyleContext *context
,cairo_t *cr
,gdouble x0
,gdouble y0
,gdouble x1
,gdouble y1
);
Renders a line from (x0, y0) to (x1, y1).
context |
||
cr |
a cairo_t |
|
x0 |
X coordinate for the origin of the line |
|
y0 |
Y coordinate for the origin of the line |
|
x1 |
X coordinate for the end of the line |
|
y1 |
Y coordinate for the end of the line |
void gtk_render_option (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders an option mark (as in a GtkRadioButton), the GTK_STATE_FLAG_CHECKED
state will determine whether the option is on or off, and
GTK_STATE_FLAG_INCONSISTENT
whether it should be marked as undefined.
Typical option mark rendering:
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_activity (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,gdouble width
,gdouble height
);
Renders an activity indicator (such as in GtkSpinner).
The state GTK_STATE_FLAG_CHECKED
determines whether there is
activity going on.
context |
||
cr |
a cairo_t |
|
x |
X origin of the rectangle |
|
y |
Y origin of the rectangle |
|
width |
rectangle width |
|
height |
rectangle height |
void gtk_render_icon (GtkStyleContext *context
,cairo_t *cr
,GdkTexture *texture
,gdouble x
,gdouble y
);
Renders the icon in texture
at the specified x
and y
coordinates.
This function will render the icon in texture
at exactly its size,
regardless of scaling factors, which may not be appropriate when
drawing on displays with high pixel densities.
context |
||
cr |
a cairo_t |
|
texture |
a GdkTexture containing the icon to draw |
|
x |
X position for the |
|
y |
Y position for the |
void gtk_render_insertion_cursor (GtkStyleContext *context
,cairo_t *cr
,gdouble x
,gdouble y
,PangoLayout *layout
,int index
,PangoDirection direction
);
Draws a text caret on cr
at the specified index of layout
.
context |
||
cr |
a cairo_t |
|
x |
X origin |
|
y |
Y origin |
|
layout |
the PangoLayout of the text |
|
index |
the index in the PangoLayout |
|
direction |
the PangoDirection of the text |
Describes how the border of a UI element should be rendered.
No visible border |
||
Same as |
||
A single line segment |
||
Looks as if the content is sunken into the canvas |
||
Looks as if the content is coming out of the canvas |
||
A series of round dots |
||
A series of square-ended dashes |
||
Two parallel lines with some space between them |
||
Looks as if it were carved in the canvas |
||
Looks as if it were coming out of the canvas |
#define GTK_STYLE_CLASS_ACCELERATOR "accelerator"
A CSS class to match an accelerator.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_ARROW "arrow"
A CSS class used when rendering an arrow element.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_BACKGROUND "background"
A CSS class to match the window background.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_BOTTOM "bottom"
A CSS class to indicate an area at the bottom of a widget.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_BUTTON "button"
A CSS class to match buttons.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CALENDAR "calendar"
A CSS class to match calendars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CELL "cell"
A CSS class to match content rendered in cell views.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_COMBOBOX_ENTRY "combobox-entry"
A CSS class to match combobox entries.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CONTEXT_MENU "context-menu"
A CSS class to match context menus.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CHECK "check"
A CSS class to match check boxes.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CSD "csd"
A CSS class that gets added to windows which have client-side decorations.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_CURSOR_HANDLE "cursor-handle"
A CSS class used when rendering a drag handle for text selection.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_DEFAULT "default"
A CSS class to match the default widget.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_DESTRUCTIVE_ACTION "destructive-action"
A CSS class used when an action (usually a button) is one that is expected to remove or destroy something visible to the user.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_DIM_LABEL "dim-label"
A CSS class to match dimmed labels.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_DND "dnd"
A CSS class for a drag-and-drop indicator.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_DOCK "dock"
A CSS class defining a dock area.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_ENTRY "entry"
A CSS class to match text entries.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_ERROR "error"
A CSS class for an area displaying an error message, such as those in infobars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_EXPANDER "expander"
A CSS class defining an expander, such as those in treeviews.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_FRAME "frame"
A CSS class defining a frame delimiting content, such as GtkFrame or the scrolled window frame around the scrollable area.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_FLAT "flat"
A CSS class that is added when widgets that usually have a frame or border (like buttons or entries) should appear without it.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_HEADER "header"
A CSS class to match a header element.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_HIGHLIGHT "highlight"
A CSS class defining a highlighted area, such as headings in assistants and calendars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_HORIZONTAL "horizontal"
A CSS class for horizontally layered widgets.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_IMAGE "image"
A CSS class defining an image, such as the icon in an entry.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_INFO "info"
A CSS class for an area displaying an informational message, such as those in infobars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_INSERTION_CURSOR "insertion-cursor"
A CSS class used when rendering a drag handle for the insertion cursor position.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LABEL "label"
A CSS class to match labels.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LEFT "left"
A CSS class to indicate an area at the left of a widget.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LEVEL_BAR "level-bar"
A CSS class used when rendering a level indicator, such as a battery charge level, or a password strength.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LINKED "linked"
A CSS class to match a linked area, such as a box containing buttons belonging to the same control.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LIST "list"
A CSS class to match lists.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_LIST_ROW "list-row"
A CSS class to match list rows.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MARK "mark"
A CSS class defining marks in a widget, such as in scales.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MENU "menu"
A CSS class to match menus.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MENUBAR "menubar"
A CSS class to menubars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MENUITEM "menuitem"
A CSS class to match menu items.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MESSAGE_DIALOG "message-dialog"
A CSS class that is added to message dialogs.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_MONOSPACE "monospace"
A CSS class that is added to text view that should use a monospace font.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_NEEDS_ATTENTION "needs-attention"
A CSS class used when an element needs the user attention, for instance a button in a stack switcher corresponding to a hidden page that changed state.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_NOTEBOOK "notebook"
A CSS class defining a notebook.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_OSD "osd"
A CSS class used when rendering an OSD (On Screen Display) element, on top of another container.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_OVERSHOOT "overshoot"
A CSS class that is added on the visual hints that happen when scrolling is attempted past the limits of a scrollable area.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_PANE_SEPARATOR "pane-separator"
A CSS class for a pane separator, such as those in GtkPaned.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_PAPER "paper"
A CSS class that is added to areas that should look like paper.
This is used in print previews and themes are encouraged to style it as black text on white background.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_POPUP "popup"
A CSS class that is added to the toplevel windows used for menus.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_POPOVER "popover"
A CSS class that matches popovers.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_PROGRESSBAR "progressbar"
A CSS class to use when rendering activity as a progressbar.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_PULSE "pulse"
A CSS class to use when rendering a pulse in an indeterminate progress bar.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_QUESTION "question"
A CSS class for an area displaying a question to the user, such as those in infobars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_RADIO "radio"
A CSS class to match radio buttons.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_RAISED "raised"
A CSS class to match a raised control, such as a raised button on a toolbar.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_READ_ONLY "read-only"
A CSS class used to indicate a read-only state.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_RIGHT "right"
A CSS class to indicate an area at the right of a widget.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_RUBBERBAND "rubberband"
A CSS class to match the rubberband selection rectangle.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SCALE "scale"
A CSS class to match scale widgets.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE "scale-has-marks-above"
A CSS class to match scale widgets with marks attached, all the marks are above for horizontal GtkScale. left for vertical GtkScale.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW "scale-has-marks-below"
A CSS class to match scale widgets with marks attached, all the marks are below for horizontal GtkScale, right for vertical GtkScale.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SCROLLBAR "scrollbar"
A CSS class to match scrollbars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SCROLLBARS_JUNCTION "scrollbars-junction"
A CSS class to match the junction area between a horizontal and vertical scrollbar, when they’re both shown.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SEPARATOR "separator"
A CSS class for a separator.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SIDEBAR "sidebar"
A CSS class defining a sidebar, such as the left side in a file chooser.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SLIDER "slider"
A CSS class to match sliders.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SPINBUTTON "spinbutton"
A CSS class defining a spinbutton.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SPINNER "spinner"
A CSS class to use when rendering activity as a “spinner”.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_STATUSBAR "statusbar"
A CSS class to match statusbars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SUBTITLE "subtitle"
A CSS class used for the subtitle label in a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_SUGGESTED_ACTION "suggested-action"
A CSS class used when an action (usually a button) is the primary suggested action in a specific context.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TITLE "title"
A CSS class used for the title label in a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TITLEBAR "titlebar"
A CSS class used when rendering a titlebar in a toplevel window.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TOOLBAR "toolbar"
A CSS class to match toolbars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TOOLTIP "tooltip"
A CSS class to match tooltip windows.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TOUCH_SELECTION "touch-selection"
A CSS class for touch selection popups on entries and text views.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TOP "top"
A CSS class to indicate an area at the top of a widget.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_TROUGH "trough"
A CSS class to match troughs, as in scrollbars and progressbars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_UNDERSHOOT "undershoot"
A CSS class that is added on the visual hints that happen where content is 'scrolled off' and can be made visible by scrolling.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_VERTICAL "vertical"
A CSS class for vertically layered widgets.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_VIEW "view"
A CSS class defining a view, such as iconviews or treeviews.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_WARNING "warning"
A CSS class for an area displaying a warning message, such as those in infobars.
Refer to individual widget documentation for used style classes.
#define GTK_STYLE_CLASS_WIDE "wide"
A CSS class to indicate that a UI element should be 'wide'. Used by GtkPaned.
Refer to individual widget documentation for used style classes.
Flags that modify the behavior of gtk_style_context_to_string()
.
New values may be added to this enumeration.
“display”
property“display” GdkDisplay *
The associated GdkDisplay.
Owner: GtkStyleContext
Flags: Read / Write