Class
StThemeNode
Constructors
st_theme_node_new
Creates a new StThemeNode
. Once created, a node is immutable. If any
of the attributes of the node (like the element_class
) change the node
and its child nodes must be destroyed and recreated.
Instance methods
st_theme_node_adjust_for_height
Adjusts a “for height” passed to clutter_actor_get_preferred_width()
to
account for borders and padding. This is a convenience function meant
to be called from a get_preferred_width()
method of a ClutterActor
subclass. The value after adjustment is the height available for the actor’s content.
st_theme_node_adjust_for_width
Adjusts a “for width” passed to clutter_actor_get_preferred_height()
to
account for borders and padding. This is a convenience function meant
to be called from a get_preferred_height()
method of a ClutterActor
subclass. The value after adjustment is the width available for the actor’s content.
st_theme_node_adjust_preferred_height
Adjusts the minimum and natural height computed for an actor by
adding on the necessary space for borders and padding and taking
into account any minimum or maximum height. This is a convenience
function meant to be called from the get_preferred_height()
method
of a ClutterActor
subclass.
st_theme_node_adjust_preferred_width
Adjusts the minimum and natural width computed for an actor by
adding on the necessary space for borders and padding and taking
into account any minimum or maximum width. This is a convenience
function meant to be called from the get_preferred_width()
method
of a ClutterActor
subclass.
st_theme_node_equal
Compare two StThemeNodes
. Two nodes which compare equal will match
the same CSS rules and have the same style properties. However, two
nodes that have ended up with identical style properties do not
necessarily compare equal.
st_theme_node_geometry_equal
Tests if two theme nodes have the same borders and padding; this can be used to optimize having to relayout when the style applied to a Clutter actor changes colors without changing the geometry.
st_theme_node_get_background_gradient
The start
and end
arguments will only be set if type
is not #ST_GRADIENT_NONE.
st_theme_node_get_background_image_shadow
Gets the value for the -st-background-image-shadow style property.
st_theme_node_get_background_paint_box
Gets the box used to paint the actor’s background, including the area occupied by properties which paint outside the actor’s assigned allocation.
st_theme_node_get_color
Generically looks up a property containing a single color value. When specific getters (like st_theme_node_get_background_color()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.
st_theme_node_get_content_box
Gets the box within an actor’s allocation that contents the content
of an actor (excluding borders and padding). This is a convenience function
meant to be used from the allocate()
or paint()
methods of a ClutterActor
subclass.
st_theme_node_get_double
Generically looks up a property containing a single numeric value without units.
st_theme_node_get_horizontal_padding
Gets the total horizontal padding (left + right padding), in physical pixels.
st_theme_node_get_icon_colors
Gets the colors that should be used for colorizing symbolic icons according the style of this node.
st_theme_node_get_icon_style
Get the icon style for node
(eg. symbolic, regular). This corresponds to the
special -st-icon-style
CSS property.
st_theme_node_get_length
Generically looks up a property containing a single length value. When specific getters (like st_theme_node_get_border_width()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.
st_theme_node_get_letter_spacing
Gets the value for the letter-spacing style property, in physical pixels.
st_theme_node_get_margin
Get the margin for node
on side
, in physical pixels. This corresponds to
the CSS properties such as margin-top
.
st_theme_node_get_padding
Get the padding for node
on side
, in physical pixels. This corresponds to
the CSS properties such as padding-top
.
st_theme_node_get_paint_box
Gets the box used to paint the actor, including the area occupied
by properties which paint outside the actor’s assigned allocation.
When painting node
to an offscreen buffer, this function can be
used to determine the necessary size of the buffer.
st_theme_node_get_shadow
Generically looks up a property containing a set of shadow values. When specific getters (like st_theme_node_get_box_shadow()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.
st_theme_node_get_text_decoration
Get the text decoration for node
(eg. underline, line-through, etc).
st_theme_node_get_transition_duration
Get the value of the transition-duration property, which
specifies the transition time between the previous StThemeNode
and node
.
st_theme_node_get_vertical_padding
Gets the total vertical padding (top + bottom padding), in physical pixels.
st_theme_node_lookup_color
Generically looks up a property containing a single color value. When specific getters (like st_theme_node_get_background_color()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.
st_theme_node_lookup_double
Generically looks up a property containing a single numeric value without units.
st_theme_node_lookup_length
Generically looks up a property containing a single length value. When specific getters (like st_theme_node_get_border_width()) exist, they should be used instead. They are cached, so more efficient, and have handling for shortcut properties and other details of CSS.
st_theme_node_lookup_shadow
If the property is not found, the value in the shadow variable will not be changed.
st_theme_node_lookup_time
Generically looks up a property containing a single time value, which is converted to milliseconds.
st_theme_node_paint_equal
Check if st_theme_node_paint()
will paint identically for node
as it does
for other
. Note that in some cases this function may return TRUE
even
if there is no visible difference in the painting.
st_theme_node_to_string
Serialize node
to a string of its GType
name, CSS ID, classes and pseudo-classes.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.