7
7
* Copyright 2009, 2010 Florian Müllner
8
8
* Copyright 2010 Adel Gadllah
9
9
* Copyright 2010 Giovanni Campagna
10
* Copyright 2011 Quentin "Sardem FF7" Glidic
11
12
* This program is free software; you can redistribute it and/or modify
12
13
* it under the terms of the GNU Lesser General Public License as
1482
1483
* @node: a #StThemeNode
1483
1484
* @color: (out caller-allocates): location to store the color
1485
* Returns the color of @node's outline.
1486
* Gets the color of @node's outline.
1488
1489
st_theme_node_get_outline_color (StThemeNode *node,
1579
1580
node->background_color = TRANSPARENT_COLOR;
1580
1581
node->background_gradient_type = ST_GRADIENT_NONE;
1581
1582
node->background_position_set = FALSE;
1583
node->background_size = ST_BACKGROUND_SIZE_AUTO;
1583
1585
ensure_properties (node);
1606
1608
g_free (node->background_image);
1607
1609
node->background_image = NULL;
1608
1610
node->background_position_set = FALSE;
1611
node->background_size = ST_BACKGROUND_SIZE_AUTO;
1610
1613
for (term = decl->value; term; term = term->next)
1663
1666
node->background_position_set = TRUE;
1668
else if (strcmp (property_name, "-size") == 0)
1670
if (decl->value->type == TERM_IDENT)
1672
if (strcmp (decl->value->content.str->stryng->str, "contain") == 0)
1673
node->background_size = ST_BACKGROUND_SIZE_CONTAIN;
1674
else if (strcmp (decl->value->content.str->stryng->str, "cover") == 0)
1675
node->background_size = ST_BACKGROUND_SIZE_COVER;
1676
else if ((strcmp (decl->value->content.str->stryng->str, "auto") == 0) && (decl->value->next) && (decl->value->next->type == TERM_NUMBER))
1678
GetFromTermResult result = get_length_from_term_int (node, decl->value->next, FALSE, &node->background_size_h);
1680
node->background_size_w = -1;
1681
node->background_size = (result == VALUE_FOUND) ? ST_BACKGROUND_SIZE_FIXED : ST_BACKGROUND_SIZE_AUTO;
1684
node->background_size = ST_BACKGROUND_SIZE_AUTO;
1686
else if (decl->value->type == TERM_NUMBER)
1688
GetFromTermResult result = get_length_from_term_int (node, decl->value, FALSE, &node->background_size_w);
1689
if (result == VALUE_NOT_FOUND)
1692
node->background_size = ST_BACKGROUND_SIZE_FIXED;
1694
if ((decl->value->next) && (decl->value->next->type == TERM_NUMBER))
1696
result = get_length_from_term_int (node, decl->value->next, FALSE, &node->background_size_h);
1698
if (result == VALUE_FOUND)
1701
node->background_size_h = -1;
1704
node->background_size = ST_BACKGROUND_SIZE_AUTO;
1665
1706
else if (strcmp (property_name, "-color") == 0)
1667
1708
GetFromTermResult result;
1751
1792
* @node: a #StThemeNode
1752
1793
* @color: (out caller-allocates): location to store the color
1754
* Returns @node's background color.
1795
* Gets @node's background color.
1757
1798
st_theme_node_get_background_color (StThemeNode *node,
1779
1820
* @node: a #StThemeNode
1780
1821
* @color: (out caller-allocates): location to store the color
1782
* Returns @node's foreground color.
1823
* Gets @node's foreground color.
1785
1826
st_theme_node_get_foreground_color (StThemeNode *node,
1853
1894
* @side: a #StSide
1854
1895
* @color: (out caller-allocates): location to store the color
1856
* Returns the color of @node's border on @side
1897
* Gets the color of @node's border on @side
1859
1900
st_theme_node_get_border_color (StThemeNode *node,