/** * _gtk_style_property_get_value_type: * @property: the property to query * * Gets the value type of the @property, if the property is usable * in public API via _gtk_style_property_query(). If the @property is not * usable in that way, %G_TYPE_NONE is returned. * * Returns: the value type in use or %G_TYPE_NONE if none. **/ GType _gtk_style_property_get_value_type (GtkStyleProperty *property) { g_return_val_if_fail (GTK_IS_STYLE_PROPERTY (property), G_TYPE_NONE); return property->value_type; }
/** * _gtk_style_property_get_name: * @property: the property to query * * Gets the name of the given property. * * Returns: the name of the property **/ const char * _gtk_style_property_get_name (GtkStyleProperty *property) { g_return_val_if_fail (GTK_IS_STYLE_PROPERTY (property), NULL); return property->name; }
/** * _gtk_style_property_parse_value: * @property: the property * @parser: the parser to parse from * * Tries to parse the given @property from the given @parser into * @value. The type that @value will be assigned is dependant on * the parser and no assumptions must be made about it. If the * parsing fails, %FALSE will be returned and @value will be * left uninitialized. * * Only if @property is a #GtkCssShorthandProperty, the @value will * always be a #GtkCssValue whose values can be queried with * _gtk_css_array_value_get_nth(). * * Returns: %NULL on failure or the parsed #GtkCssValue **/ GtkCssValue * _gtk_style_property_parse_value (GtkStyleProperty *property, GtkCssParser *parser) { GtkStylePropertyClass *klass; g_return_val_if_fail (GTK_IS_STYLE_PROPERTY (property), NULL); g_return_val_if_fail (parser != NULL, NULL); klass = GTK_STYLE_PROPERTY_GET_CLASS (property); return klass->parse_value (property, parser); }
/** * _gtk_style_property_query: * @property: the property * @value: (out): an uninitialized #GValue to be filled with the * contents of the lookup * @query_func: The function to use to query properties * @query_data: The data to pass to @query_func * * This function is called by gtk_style_properties_get() and in * turn gtk_style_context_get() and similar functions to get the * value to return to code using old APIs. **/ void _gtk_style_property_query (GtkStyleProperty *property, GValue *value, GtkStyleQueryFunc query_func, gpointer query_data) { GtkStylePropertyClass *klass; g_return_if_fail (value != NULL); g_return_if_fail (GTK_IS_STYLE_PROPERTY (property)); g_return_if_fail (query_func != NULL); klass = GTK_STYLE_PROPERTY_GET_CLASS (property); klass->query (property, value, query_func, query_data); }
/** * _gtk_style_property_assign: * @property: the property * @props: The properties to assign to * @state: The state to assign * @value: (out): the #GValue with the value to be * assigned * * This function is called by gtk_style_properties_set() and in * turn gtk_style_context_set() and similar functions to set the * value from code using old APIs. **/ void _gtk_style_property_assign (GtkStyleProperty *property, GtkStyleProperties *props, GtkStateFlags state, const GValue *value) { GtkStylePropertyClass *klass; g_return_if_fail (GTK_IS_STYLE_PROPERTY (property)); g_return_if_fail (GTK_IS_STYLE_PROPERTIES (props)); g_return_if_fail (value != NULL); klass = GTK_STYLE_PROPERTY_GET_CLASS (property); klass->assign (property, props, state, value); }