| CCSS Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
typedef ccss_style_t; void ccss_style_destroy (ccss_style_t *self); bool ccss_style_get_double (ccss_style_t const *self,char const *property_name,double *value); bool ccss_style_get_property (ccss_style_t const *self,char const *property_name,ccss_property_base_t const **value); void ccss_style_set_property (ccss_style_t *self,char const *property_name,ccss_property_base_t const *value); bool ccss_style_get_string (ccss_style_t const *self,char const *property_name,char **value); void (*ccss_style_iterator_f) (ccss_style_t const *self,char const *property_name,void *user_data); void ccss_style_foreach (ccss_style_t const *self,ccss_style_iterator_f func,void *user_data); void ccss_style_dump (ccss_style_t const *self);
typedef struct ccss_style_ ccss_style_t;
Representation of a block of CSS statements.
Memory management: Style objects are owned by the stylesheet, and therefore not created or modified by the CCSS consumer.
void ccss_style_destroy (ccss_style_t *self);
Frees the style an all associated resources.
|
a ccss_style_t. |
bool ccss_style_get_double (ccss_style_t const *self,char const *property_name,double *value);
Query a numeric property.
|
a ccss_style_t. |
|
name of the property. |
|
location to store the converted property. |
Returns : |
TRUE if the property was found and could be converted. |
bool ccss_style_get_property (ccss_style_t const *self,char const *property_name,ccss_property_base_t const **value);
Query a custom property.
|
a ccss_style_t. |
|
name of the property. |
|
location to store the raw property pointer. |
Returns : |
TRUE if the property was found. |
void ccss_style_set_property (ccss_style_t *self,char const *property_name,ccss_property_base_t const *value);
Insert custom property. This is for custom property implementations only.
|
a ccss_style_t. |
|
name of the property. |
|
the property to insert into the style. |
bool ccss_style_get_string (ccss_style_t const *self,char const *property_name,char **value);
Query a string property.
|
a ccss_style_t. |
|
name of the property. |
|
location to store the converted property. |
Returns : |
TRUE if the property was found and could be converted. |
void (*ccss_style_iterator_f) (ccss_style_t const *self,char const *property_name,void *user_data);
Specifies the type of the function passed to ccss_style_foreach().
|
a ccss_style_t. |
|
property name , e.g. `background-color'. |
|
user data passed to ccss_style_foreach. |
void ccss_style_foreach (ccss_style_t const *self,ccss_style_iterator_f func,void *user_data);
The iterator function func is called for each type in the style.
|
a ccss_style_t. |
|
a ccss_style_iterator_f. |
|
user data to pass to the iterator function. |
void ccss_style_dump (ccss_style_t const *self);
Print informations about the internal state of this object.
|
a ccss_style_t. |