## ccss_style_t

ccss_style_t

## Synopsis

    enum                ccss_cairo_gap_side_t;
    void                ccss_cairo_style_draw_rectangle     (ccss_style_t const *self,
                                                             cairo_t *cr,
                                                             double x,
                                                             double y,
                                                             double width,
                                                             double height);
    void                ccss_cairo_style_draw_rectangle_with_gap
                                                            (ccss_style_t const *self,
                                                             cairo_t *cr,
                                                             double x,
                                                             double y,
                                                             double width,
                                                             double height,
                                                             ccss_cairo_gap_side_t gap_side,
                                                             double gap_start,
                                                             double gap_width);
    bool                ccss_cairo_style_get_double         (ccss_style_t const *self,
                                                             char const *property_name,
                                                             double *value);
    bool                ccss_cairo_style_get_string         (ccss_style_t const *self,
                                                             char const *property_name,
                                                             char **value);
    bool                ccss_cairo_style_get_property       (ccss_style_t const *self,
                                                             char const *property_name,
                                                             ccss_property_t const **property);

## Description

## Details

### enum ccss_cairo_gap_side_t

    typedef enum {
    	CCSS_CAIRO_GAP_SIDE_LEFT,
    	CCSS_CAIRO_GAP_SIDE_RIGHT,
    	CCSS_CAIRO_GAP_SIDE_TOP,
    	CCSS_CAIRO_GAP_SIDE_BOTTOM
    } ccss_cairo_gap_side_t;

This enum mirrors GtkPositionType.

`CCSS_CAIRO_GAP_SIDE_LEFT` | gap on the left.
`CCSS_CAIRO_GAP_SIDE_RIGHT` | gap on the right.
`CCSS_CAIRO_GAP_SIDE_TOP` | gap on top.
`CCSS_CAIRO_GAP_SIDE_BOTTOM` | gap on the bottom.

### ccss_cairo_style_draw_rectangle ()

    void                ccss_cairo_style_draw_rectangle     (ccss_style_t const *self,
                                                             cairo_t *cr,
                                                             double x,
                                                             double y,
                                                             double width,
                                                             double height);

Draw a rectangle using this style instance.

`self` : | a ccss_style_t.
`cr` : | the target to draw onto.
`x` : | the starting x coordinate.
`y` : | the starting y coordinate.
`width` : | width of the outline to draw.
`height` : | height of the outline to draw.

### ccss_cairo_style_draw_rectangle_with_gap ()

    void                ccss_cairo_style_draw_rectangle_with_gap
                                                            (ccss_style_t const *self,
                                                             cairo_t *cr,
                                                             double x,
                                                             double y,
                                                             double width,
                                                             double height,
                                                             ccss_cairo_gap_side_t gap_side,
                                                             double gap_start,
                                                             double gap_width);

Draw a rectangle with gap using this style instance.

`self` : | a ccss_style_t.
`cr` : | the target to draw onto.
`x` : | the starting x coordinate.
`y` : | the starting y coordinate.
`width` : | width of the outline to draw.
`height` : | height of the outline to draw.
`gap_side` : | side in which to leave the gap.
`gap_start` : | starting position of the gap.
`gap_width` : | width of the gap.

### ccss_cairo_style_get_double ()

    bool                ccss_cairo_style_get_double         (ccss_style_t const *self,
                                                             char const *property_name,
                                                             double *value);

Query a numeric property with fallbacks, e.g. `border-color' if `border-left-color' is not given.

`self` : | a ccss_style_t.
`property_name` : | name of the property.
`value` : | location to store the converted property.
Returns : | `TRUE` if the property was found and could be converted.

### ccss_cairo_style_get_string ()

    bool                ccss_cairo_style_get_string         (ccss_style_t const *self,
                                                             char const *property_name,
                                                             char **value);

Query a string property with fallbacks, e.g. `border-color' if `border-left-color' is not given.

`self` : | a ccss_style_t.
`property_name` : | name of the property.
`value` : | location to store the converted property.
Returns : | `TRUE` if the property was found and could be converted.

### ccss_cairo_style_get_property ()

    bool                ccss_cairo_style_get_property       (ccss_style_t const *self,
                                                             char const *property_name,
                                                             ccss_property_t const **property);

Query a custom property with fallbacks, e.g. `border-color' if `border-left-color' is not given.

`self` : | a ccss_style_t.
`property_name` : | name of the property.
Returns : | `TRUE` if the property was found.