Functions
gtk_style_context_get_direction ()
GtkTextDirection
gtk_style_context_get_direction (GtkStyleContext *context);
Returns the widget direction used for rendering.
Returns
the widget direction
Since: 3.0
gtk_style_context_get_junction_sides ()
GtkJunctionSides
gtk_style_context_get_junction_sides (GtkStyleContext *context);
Returns the sides where rendered elements connect visually with others.
Returns
the junction sides
Since: 3.0
gtk_style_context_get_path ()
const GtkWidgetPath *
gtk_style_context_get_path (GtkStyleContext *context);
Returns the widget path used for style matching.
Since: 3.0
gtk_style_context_get_property ()
void
gtk_style_context_get_property (GtkStyleContext *context,
const gchar *property,
GtkStateFlags state,
GValue *value);
Gets a style property from context
for the given state.
Note that not all CSS properties that are supported by GTK+ can be
retrieved in this way, since they may not be representable as GValue.
GTK+ defines macros for a number of properties that can be used
with this function.
Note that passing a state other than the current state of context
is not recommended unless the style context has been saved with
gtk_style_context_save().
When value
is no longer needed, g_value_unset() must be called
to free any allocated memory.
Since: 3.0
gtk_style_context_get_style ()
void
gtk_style_context_get_style (GtkStyleContext *context,
...);
Retrieves several widget style properties from context
according to the
current style.
Since: 3.0
gtk_style_context_get_style_property ()
void
gtk_style_context_get_style_property (GtkStyleContext *context,
const gchar *property_name,
GValue *value);
Gets the value for a widget style property.
When value
is no longer needed, g_value_unset() must be called
to free any allocated memory.
gtk_style_context_get_style_valist ()
void
gtk_style_context_get_style_valist (GtkStyleContext *context,
va_list args);
Retrieves several widget style properties from context
according to the
current style.
Since: 3.0
gtk_style_context_get_section ()
GtkCssSection *
gtk_style_context_get_section (GtkStyleContext *context,
const gchar *property);
Queries the location in the CSS where property
was defined for the
current context
. Note that the state to be queried is taken from
gtk_style_context_get_state().
If the location is not available, NULL will be returned. The
location might not be available for various reasons, such as the
property being overridden, property
not naming a supported CSS
property or tracking of definitions being disabled for performance
reasons.
Shorthand CSS properties cannot be queried for a location and will
always return NULL.
Returns
NULL or the section where a value
for property
was defined.
[nullable][transfer none]
gtk_style_context_get_background_color ()
void
gtk_style_context_get_background_color
(GtkStyleContext *context,
GtkStateFlags state,
GdkRGBA *color);
gtk_style_context_get_background_color has been deprecated since version 3.16 and should not be used in newly-written code.
Use gtk_render_background() instead.
Gets the background color for a given state.
This function is far less useful than it seems, and it should not be used in
newly written code. CSS has no concept of "background color", as a background
can be an image, or a gradient, or any other pattern including solid colors.
The only reason why you would call gtk_style_context_get_background_color() is
to use the returned value to draw the background with it; the correct way to
achieve this result is to use gtk_render_background() instead, along with CSS
style classes to modify the color to be rendered.
Since: 3.0
gtk_style_context_get_border_color ()
void
gtk_style_context_get_border_color (GtkStyleContext *context,
GtkStateFlags state,
GdkRGBA *color);
gtk_style_context_get_border_color has been deprecated since version 3.16 and should not be used in newly-written code.
Use gtk_render_frame() instead.
Gets the border color for a given state.
Since: 3.0
gtk_style_context_get_font ()
const PangoFontDescription *
gtk_style_context_get_font (GtkStyleContext *context,
GtkStateFlags state);
gtk_style_context_get_font has been deprecated since version 3.8 and should not be used in newly-written code.
Use gtk_style_context_get() for "font" or
subproperties instead.
Returns the font description for a given state. The returned
object is const and will remain valid until the
“changed” signal happens.
Returns
the PangoFontDescription for the given
state. This object is owned by GTK+ and should not be
freed.
[transfer none]
Since: 3.0
gtk_style_context_invalidate ()
void
gtk_style_context_invalidate (GtkStyleContext *context);
gtk_style_context_invalidate has been deprecated since version 3.12 and should not be used in newly-written code.
Style contexts are invalidated automatically.
Invalidates context
style information, so it will be reconstructed
again. It is useful if you modify the context
and need the new
information immediately.
Since: 3.0
gtk_style_context_state_is_running ()
gboolean
gtk_style_context_state_is_running (GtkStyleContext *context,
GtkStateType state,
gdouble *progress);
gtk_style_context_state_is_running has been deprecated since version 3.6 and should not be used in newly-written code.
This function always returns FALSE
Returns TRUE if there is a transition animation running for the
current region (see gtk_style_context_push_animatable_region()).
If progress
is not NULL, the animation progress will be returned
there, 0.0 means the state is closest to being unset, while 1.0 means
it’s closest to being set. This means transition animation will
run from 0 to 1 when state
is being set and from 1 to 0 when
it’s being unset.
Returns
TRUE if there is a running transition animation for state
.
Since: 3.0
gtk_style_context_lookup_color ()
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.
Returns
TRUE if color_name
was found and resolved, FALSE otherwise
gtk_style_context_lookup_icon_set ()
GtkIconSet *
gtk_style_context_lookup_icon_set (GtkStyleContext *context,
const gchar *stock_id);
gtk_style_context_lookup_icon_set has been deprecated since version 3.10 and should not be used in newly-written code.
Use gtk_icon_theme_lookup_icon() instead.
Looks up stock_id
in the icon factories associated to context
and
the default icon factory, returning an icon set if found, otherwise
NULL.
gtk_style_context_notify_state_change ()
void
gtk_style_context_notify_state_change (GtkStyleContext *context,
GdkWindow *window,
gpointer region_id,
GtkStateType state,
gboolean state_value);
gtk_style_context_notify_state_change has been deprecated since version 3.6 and should not be used in newly-written code.
This function does nothing.
Notifies a state change on context
, so if the current style makes use
of transition animations, one will be started so all rendered elements
under region_id
are animated for state state
being set to value
state_value
.
The window
parameter is used in order to invalidate the rendered area
as the animation runs, so make sure it is the same window that is being
rendered on by the gtk_render_*() functions.
If region_id
is NULL, all rendered elements using context
will be
affected by this state transition.
As a practical example, a GtkButton notifying a state transition on
the prelight state:
Can be handled in the CSS file like this:
This combination will animate the button background from red to white
if a pointer enters the button, and back to red if the pointer leaves
the button.
Note that state
is used when finding the transition parameters, which
is why the style places the transition under the :hover pseudo-class.
Since: 3.0
gtk_style_context_pop_animatable_region ()
void
gtk_style_context_pop_animatable_region
(GtkStyleContext *context);
gtk_style_context_pop_animatable_region has been deprecated since version 3.6 and should not be used in newly-written code.
This function does nothing.
Pops an animatable region from context
.
See gtk_style_context_push_animatable_region().
Since: 3.0
gtk_style_context_push_animatable_region ()
void
gtk_style_context_push_animatable_region
(GtkStyleContext *context,
gpointer region_id);
gtk_style_context_push_animatable_region has been deprecated since version 3.6 and should not be used in newly-written code.
This function does nothing.
Pushes an animatable region, so all further gtk_render_*() calls between
this call and the following gtk_style_context_pop_animatable_region()
will potentially show transition animations for this region if
gtk_style_context_notify_state_change() is called for a given state,
and the current theme/style defines transition animations for state
changes.
The region_id
used must be unique in context
so the themes
can uniquely identify rendered elements subject to a state transition.
Since: 3.0
gtk_style_context_cancel_animations ()
void
gtk_style_context_cancel_animations (GtkStyleContext *context,
gpointer region_id);
gtk_style_context_cancel_animations has been deprecated since version 3.6 and should not be used in newly-written code.
This function does nothing.
Stops all running animations for region_id
and all animatable
regions underneath.
A NULL region_id
will stop all ongoing animations in context
,
when dealing with a GtkStyleContext obtained through
gtk_widget_get_style_context(), this is normally done for you
in all circumstances you would expect all widget to be stopped,
so this should be only used in complex widgets with different
animatable regions.
Since: 3.0
gtk_style_context_scroll_animations ()
void
gtk_style_context_scroll_animations (GtkStyleContext *context,
GdkWindow *window,
gint dx,
gint dy);
gtk_style_context_scroll_animations has been deprecated since version 3.6 and should not be used in newly-written code.
This function does nothing.
This function is analogous to gdk_window_scroll(), and
should be called together with it so the invalidation
areas for any ongoing animation are scrolled together
with it.
Since: 3.0
gtk_style_context_remove_provider ()
void
gtk_style_context_remove_provider (GtkStyleContext *context,
GtkStyleProvider *provider);
Removes provider
from the style providers list in context
.
Since: 3.0
gtk_style_context_remove_provider_for_screen ()
void
gtk_style_context_remove_provider_for_screen
(GdkScreen *screen,
GtkStyleProvider *provider);
Removes provider
from the global style providers list in screen
.
Since: 3.0
gtk_style_context_reset_widgets ()
void
gtk_style_context_reset_widgets (GdkScreen *screen);
This function recomputes the styles for all widgets under a particular
GdkScreen. 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.
Since: 3.0
gtk_style_context_set_background ()
void
gtk_style_context_set_background (GtkStyleContext *context,
GdkWindow *window);
gtk_style_context_set_background has been deprecated since version 3.18 and should not be used in newly-written code.
Use gtk_render_background() instead.
Note that clients still using this function are now responsible
for calling this function again whenever context
is invalidated.
Sets the background of window
to the background pattern or
color specified in context
for its current state.
Since: 3.0
gtk_style_context_set_junction_sides ()
void
gtk_style_context_set_junction_sides (GtkStyleContext *context,
GtkJunctionSides sides);
Sets the sides where rendered elements (mostly through
gtk_render_frame()) will visually connect with other visual elements.
This is merely a hint that may or may not be honored
by themes.
Container widgets are expected to set junction hints as appropriate
for their children, so it should not normally be necessary to call
this function manually.
Since: 3.0
gtk_style_context_add_class ()
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:
While any widget defining a “search” class would be
matched by:
Since: 3.0
gtk_style_context_remove_class ()
void
gtk_style_context_remove_class (GtkStyleContext *context,
const gchar *class_name);
Removes class_name
from context
.
Since: 3.0
gtk_style_context_has_class ()
gboolean
gtk_style_context_has_class (GtkStyleContext *context,
const gchar *class_name);
Returns TRUE if context
currently has defined the
given class name.
Returns
TRUE if context
has class_name
defined
Since: 3.0
gtk_style_context_list_classes ()
GList *
gtk_style_context_list_classes (GtkStyleContext *context);
Returns the list of classes currently defined in context
.
Returns
a GList of
strings with the currently defined classes. The contents
of the list are owned by GTK+, but you must free the list
itself with g_list_free() when you are done with it.
[transfer container][element-type utf8]
Since: 3.0
gtk_style_context_add_region ()
void
gtk_style_context_add_region (GtkStyleContext *context,
const gchar *region_name,
GtkRegionFlags flags);
gtk_style_context_add_region has been deprecated since version 3.14 and should not be used in newly-written code.
Adds a region to context
, so posterior calls to
gtk_style_context_get() or any of the gtk_render_*()
functions will make use of this new region for styling.
In the CSS file format, a GtkTreeView defining a “row”
region, would be matched by:
Pseudo-classes are used for matching flags
, so the two
following rules:
would apply to even and odd rows, respectively.
Region names must only contain lowercase letters
and “-”, starting always with a lowercase letter.
Since: 3.0
gtk_style_context_remove_region ()
void
gtk_style_context_remove_region (GtkStyleContext *context,
const gchar *region_name);
gtk_style_context_remove_region has been deprecated since version 3.14 and should not be used in newly-written code.
Removes a region from context
.
Since: 3.0
gtk_style_context_has_region ()
gboolean
gtk_style_context_has_region (GtkStyleContext *context,
const gchar *region_name,
GtkRegionFlags *flags_return);
gtk_style_context_has_region has been deprecated since version 3.14 and should not be used in newly-written code.
Returns TRUE if context
has the region defined.
If flags_return
is not NULL, it is set to the flags
affecting the region.
Returns
TRUE if region is defined
Since: 3.0
gtk_style_context_list_regions ()
GList *
gtk_style_context_list_regions (GtkStyleContext *context);
gtk_style_context_list_regions has been deprecated since version 3.14 and should not be used in newly-written code.
Returns the list of regions currently defined in context
.
Returns
a GList of
strings with the currently defined regions. The contents
of the list are owned by GTK+, but you must free the list
itself with g_list_free() when you are done with it.
[transfer container][element-type utf8]
Since: 3.0
gtk_style_context_set_state ()
void
gtk_style_context_set_state (GtkStyleContext *context,
GtkStateFlags flags);
Sets the state to be used for style matching.
Since: 3.0
gtk_style_context_set_scale ()
void
gtk_style_context_set_scale (GtkStyleContext *context,
gint scale);
Sets the scale to use when getting image assets for the style.
Since: 3.10
gtk_style_context_get_scale ()
gint
gtk_style_context_get_scale (GtkStyleContext *context);
Returns the scale used for assets.
Since: 3.10
gtk_style_context_to_string ()
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.
Returns
a newly allocated string representing context
Since: 3.20
gtk_border_new ()
GtkBorder *
gtk_border_new (void);
Allocates a new GtkBorder and initializes its elements to zero.
Since: 2.14
gtk_border_copy ()
GtkBorder *
gtk_border_copy (const GtkBorder *border_);
Copies a GtkBorder.
Returns
a copy of border_
.
[transfer full]
gtk_render_background ()
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:

Since: 3.0.
gtk_render_frame ()
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:

Since: 3.0
gtk_render_frame_gap ()
void
gtk_render_frame_gap (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height,
GtkPositionType gap_side,
gdouble xy0_gap,
gdouble xy1_gap);
gtk_render_frame_gap has been deprecated since version 3.24 and should not be used in newly-written code.
Use gtk_render_frame() instead. Themes can create gaps
by omitting borders via CSS.
Renders a frame around the rectangle defined by (x
, y
, width
, height
),
leaving a gap on one side. xy0_gap
and xy1_gap
will mean X coordinates
for GTK_POS_TOP and GTK_POS_BOTTOM gap sides, and Y coordinates for
GTK_POS_LEFT and GTK_POS_RIGHT.
Typical rendering of a frame with a gap:

Since: 3.0
gtk_render_handle ()
void
gtk_render_handle (GtkStyleContext *context,
cairo_t *cr,
gdouble x,
gdouble y,
gdouble width,
gdouble height);
Renders a handle (as in GtkHandleBox, GtkPaned and
GtkWindow’s resize grip), in the rectangle
determined by x
, y
, width
, height
.
Handles rendered for the paned and grip classes:

Since: 3.0
gtk_render_icon_pixbuf ()
GdkPixbuf *
gtk_render_icon_pixbuf (GtkStyleContext *context,
const GtkIconSource *source,
GtkIconSize size);
gtk_render_icon_pixbuf has been deprecated since version 3.10 and should not be used in newly-written code.
Use gtk_icon_theme_load_icon() instead.
Renders the icon specified by source
at the given size
, returning the result
in a pixbuf.
Returns
a newly-created GdkPixbuf containing the rendered icon.
[transfer full]
Since: 3.0
gtk_render_icon ()
void
gtk_render_icon (GtkStyleContext *context,
cairo_t *cr,
GdkPixbuf *pixbuf,
gdouble x,
gdouble y);
Renders the icon in pixbuf
at the specified x
and y
coordinates.
This function will render the icon in pixbuf
at exactly its size,
regardless of scaling factors, which may not be appropriate when
drawing on displays with high pixel densities.
You probably want to use gtk_render_icon_surface() instead, if you
already have a Cairo surface.
Since: 3.2
Types and Values
GTK_STYLE_PROPERTY_BACKGROUND_COLOR
#define GTK_STYLE_PROPERTY_BACKGROUND_COLOR "background-color"
A property holding the background color of rendered elements as a GdkRGBA.
GTK_STYLE_PROPERTY_COLOR
#define GTK_STYLE_PROPERTY_COLOR "color"
A property holding the foreground color of rendered elements as a GdkRGBA.
GTK_STYLE_PROPERTY_FONT
#define GTK_STYLE_PROPERTY_FONT "font"
A property holding the font properties used when rendering text
as a PangoFontDescription.
GTK_STYLE_PROPERTY_MARGIN
#define GTK_STYLE_PROPERTY_MARGIN "margin"
A property holding the rendered element’s margin as a GtkBorder. The
margin is defined as the spacing between the border of the element
and its surrounding elements. It is external to GtkWidget's
size allocations, and the most external spacing property of the
padding/border/margin series.
GTK_STYLE_PROPERTY_PADDING
#define GTK_STYLE_PROPERTY_PADDING "padding"
A property holding the rendered element’s padding as a GtkBorder. The
padding is defined as the spacing between the inner part of the element border
and its child. It’s the innermost spacing property of the padding/border/margin
series.
GTK_STYLE_PROPERTY_BORDER_WIDTH
#define GTK_STYLE_PROPERTY_BORDER_WIDTH "border-width"
A property holding the rendered element’s border width in pixels as
a GtkBorder. The border is the intermediary spacing property of the
padding/border/margin series.
gtk_render_frame() uses this property to find out the frame line width,
so GtkWidgets rendering frames may need to add up this padding when
requesting size
GTK_STYLE_PROPERTY_BORDER_RADIUS
#define GTK_STYLE_PROPERTY_BORDER_RADIUS "border-radius"
A property holding the rendered element’s border radius in pixels as a gint.
GTK_STYLE_PROPERTY_BORDER_STYLE
#define GTK_STYLE_PROPERTY_BORDER_STYLE "border-style"
A property holding the element’s border style as a GtkBorderStyle.
GTK_STYLE_PROPERTY_BORDER_COLOR
#define GTK_STYLE_PROPERTY_BORDER_COLOR "border-color"
A property holding the element’s border color as a GdkRGBA.
GTK_STYLE_PROPERTY_BACKGROUND_IMAGE
#define GTK_STYLE_PROPERTY_BACKGROUND_IMAGE "background-image"
A property holding the element’s background as a cairo_pattern_t.
enum GtkBorderStyle
Describes how the border of a UI element should be rendered.
GTK_STYLE_CLASS_ACCELERATOR
#define GTK_STYLE_CLASS_ACCELERATOR "accelerator"
A CSS class to match an accelerator.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_ARROW
#define GTK_STYLE_CLASS_ARROW "arrow"
A CSS class used when rendering an arrow element.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_BACKGROUND
#define GTK_STYLE_CLASS_BACKGROUND "background"
A CSS class to match the window background.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_BOTTOM
#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.
GTK_STYLE_CLASS_BUTTON
#define GTK_STYLE_CLASS_BUTTON "button"
A CSS class to match buttons.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_CALENDAR
#define GTK_STYLE_CLASS_CALENDAR "calendar"
A CSS class to match calendars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_CELL
#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.
GTK_STYLE_CLASS_COMBOBOX_ENTRY
#define GTK_STYLE_CLASS_COMBOBOX_ENTRY "combobox-entry"
A CSS class to match combobox entries.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_CONTEXT_MENU
#define GTK_STYLE_CLASS_CONTEXT_MENU "context-menu"
A CSS class to match context menus.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_CHECK
#define GTK_STYLE_CLASS_CHECK "check"
A CSS class to match check boxes.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_CSD
#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.
Since: 3.14
GTK_STYLE_CLASS_CURSOR_HANDLE
#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.
GTK_STYLE_CLASS_DEFAULT
#define GTK_STYLE_CLASS_DEFAULT "default"
A CSS class to match the default widget.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_DESTRUCTIVE_ACTION
#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.
Since: 3.12
GTK_STYLE_CLASS_DIM_LABEL
#define GTK_STYLE_CLASS_DIM_LABEL "dim-label"
A CSS class to match dimmed labels.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_DND
#define GTK_STYLE_CLASS_DND "dnd"
A CSS class for a drag-and-drop indicator.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_DOCK
#define GTK_STYLE_CLASS_DOCK "dock"
A CSS class defining a dock area.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_ENTRY
#define GTK_STYLE_CLASS_ENTRY "entry"
A CSS class to match text entries.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_ERROR
#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.
GTK_STYLE_CLASS_EXPANDER
#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.
GTK_STYLE_CLASS_FRAME
#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.
GTK_STYLE_CLASS_FLAT
#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.
Since: 3.14
GTK_STYLE_CLASS_GRIP
#define GTK_STYLE_CLASS_GRIP "grip"
A CSS class defining a resize grip.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_HEADER
#define GTK_STYLE_CLASS_HEADER "header"
A CSS class to match a header element.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_HIGHLIGHT
#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.
GTK_STYLE_CLASS_HORIZONTAL
#define GTK_STYLE_CLASS_HORIZONTAL "horizontal"
A CSS class for horizontally layered widgets.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_IMAGE
#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.
GTK_STYLE_CLASS_INFO
#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.
GTK_STYLE_CLASS_INLINE_TOOLBAR
#define GTK_STYLE_CLASS_INLINE_TOOLBAR "inline-toolbar"
A CSS class to match inline toolbars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_INSERTION_CURSOR
#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.
GTK_STYLE_CLASS_LABEL
#define GTK_STYLE_CLASS_LABEL "label"
A CSS class to match labels.
Refer to individual widget documentation for used style classes.
Since: 3.16
GTK_STYLE_CLASS_LEFT
#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.
GTK_STYLE_CLASS_LEVEL_BAR
#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.
GTK_STYLE_CLASS_LINKED
#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.
GTK_STYLE_CLASS_LIST
#define GTK_STYLE_CLASS_LIST "list"
A CSS class to match lists.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_LIST_ROW
#define GTK_STYLE_CLASS_LIST_ROW "list-row"
A CSS class to match list rows.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_MARK
#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.
GTK_STYLE_CLASS_MENU
#define GTK_STYLE_CLASS_MENU "menu"
A CSS class to match menus.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_MENUBAR
#define GTK_STYLE_CLASS_MENUBAR "menubar"
A CSS class to menubars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_MENUITEM
#define GTK_STYLE_CLASS_MENUITEM "menuitem"
A CSS class to match menu items.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_MESSAGE_DIALOG
#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.
Since: 3.14
GTK_STYLE_CLASS_MONOSPACE
#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.
Since: 3.16
GTK_STYLE_CLASS_NEEDS_ATTENTION
#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.
Since: 3.12
GTK_STYLE_CLASS_NOTEBOOK
#define GTK_STYLE_CLASS_NOTEBOOK "notebook"
A CSS class defining a notebook.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_OSD
#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.
GTK_STYLE_CLASS_OVERSHOOT
#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.
Since: 3.14
GTK_STYLE_CLASS_PANE_SEPARATOR
#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.
GTK_STYLE_CLASS_PAPER
#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.
Since: 3.16
GTK_STYLE_CLASS_POPUP
#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.
Since: 3.14
GTK_STYLE_CLASS_POPOVER
#define GTK_STYLE_CLASS_POPOVER "popover"
A CSS class that matches popovers.
Refer to individual widget documentation for used style classes.
Since: 3.14
GTK_STYLE_CLASS_PRIMARY_TOOLBAR
#define GTK_STYLE_CLASS_PRIMARY_TOOLBAR "primary-toolbar"
A CSS class to match primary toolbars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_PROGRESSBAR
#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.
GTK_STYLE_CLASS_PULSE
#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.
GTK_STYLE_CLASS_QUESTION
#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.
GTK_STYLE_CLASS_RADIO
#define GTK_STYLE_CLASS_RADIO "radio"
A CSS class to match radio buttons.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_RAISED
#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.
GTK_STYLE_CLASS_READ_ONLY
#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.
GTK_STYLE_CLASS_RIGHT
#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.
GTK_STYLE_CLASS_RUBBERBAND
#define GTK_STYLE_CLASS_RUBBERBAND "rubberband"
A CSS class to match the rubberband selection rectangle.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SCALE
#define GTK_STYLE_CLASS_SCALE "scale"
A CSS class to match scale widgets.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE
#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.
GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW
#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.
GTK_STYLE_CLASS_SCROLLBAR
#define GTK_STYLE_CLASS_SCROLLBAR "scrollbar"
A CSS class to match scrollbars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SCROLLBARS_JUNCTION
#define GTK_STYLE_CLASS_SCROLLBARS_JUNCTION "scrollbars-junction"
A CSS class to match the junction area between an horizontal
and vertical scrollbar, when they’re both shown.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SEPARATOR
#define GTK_STYLE_CLASS_SEPARATOR "separator"
A CSS class for a separator.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SIDEBAR
#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.
GTK_STYLE_CLASS_SLIDER
#define GTK_STYLE_CLASS_SLIDER "slider"
A CSS class to match sliders.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SPINBUTTON
#define GTK_STYLE_CLASS_SPINBUTTON "spinbutton"
A CSS class defining an spinbutton.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_SPINNER
#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.
GTK_STYLE_CLASS_STATUSBAR
#define GTK_STYLE_CLASS_STATUSBAR "statusbar"
A CSS class to match statusbars.
Refer to individual widget documentation for used style classes.
Since: 3.16
GTK_STYLE_CLASS_SUBTITLE
#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.
Since: 3.14
GTK_STYLE_CLASS_SUGGESTED_ACTION
#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.
Since: 3.12
GTK_STYLE_CLASS_TITLE
#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.
Since: 3.14
GTK_STYLE_CLASS_TITLEBAR
#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.
GTK_STYLE_CLASS_TOOLBAR
#define GTK_STYLE_CLASS_TOOLBAR "toolbar"
A CSS class to match toolbars.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_TOOLTIP
#define GTK_STYLE_CLASS_TOOLTIP "tooltip"
A CSS class to match tooltip windows.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_TOUCH_SELECTION
#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.
Since: 3.16
GTK_STYLE_CLASS_TOP
#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.
GTK_STYLE_CLASS_TROUGH
#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.
GTK_STYLE_CLASS_UNDERSHOOT
#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.
Since: 3.16
GTK_STYLE_CLASS_VERTICAL
#define GTK_STYLE_CLASS_VERTICAL "vertical"
A CSS class for vertically layered widgets.
Refer to individual widget documentation for used style classes.
GTK_STYLE_CLASS_VIEW
#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.
GTK_STYLE_CLASS_WARNING
#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.
GTK_STYLE_CLASS_WIDE
#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.
Since: 3.16
GTK_STYLE_REGION_COLUMN
#define GTK_STYLE_REGION_COLUMN "column"
GTK_STYLE_REGION_COLUMN has been deprecated since version 3.20 and should not be used in newly-written code.
Don't use regions.
A widget region name to define a treeview column.
GTK_STYLE_REGION_COLUMN_HEADER
#define GTK_STYLE_REGION_COLUMN_HEADER "column-header"
GTK_STYLE_REGION_COLUMN_HEADER has been deprecated since version 3.20 and should not be used in newly-written code.
Don't use regions.
A widget region name to define a treeview column header.
GTK_STYLE_REGION_ROW
#define GTK_STYLE_REGION_ROW "row"
GTK_STYLE_REGION_ROW has been deprecated since version 3.20 and should not be used in newly-written code.
Don't use regions.
A widget region name to define a treeview row.
GTK_STYLE_REGION_TAB
#define GTK_STYLE_REGION_TAB "tab"
GTK_STYLE_REGION_TAB has been deprecated since version 3.20 and should not be used in newly-written code.
Don't use regions.
A widget region name to define a notebook tab.
GtkStyleContext
typedef struct _GtkStyleContext GtkStyleContext;
enum GtkJunctionSides
Describes how a rendered element connects to adjacent elements.
enum GtkRegionFlags
Describes a region within a widget.
struct GtkBorder
struct GtkBorder {
gint16 left;
gint16 right;
gint16 top;
gint16 bottom;
};
A struct that specifies a border around a rectangular area
that can be of different width on each side.