From 582bfe830a3bee4985ec72e5fae76a1eb50faa6c Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Thu, 21 Nov 2019 18:33:14 -0600 Subject: [PATCH] cr-rgb: remove handling of "inherit" and "transparent" st-theme-node.c already handles those by itself. Part of https://gitlab.gnome.org/GNOME/gnome-shell/issues/1934 --- src/st/croco/cr-rgb.c | 382 +++++++++++++++++------------------------- src/st/croco/cr-rgb.h | 10 -- 2 files changed, 150 insertions(+), 242 deletions(-) diff --git a/src/st/croco/cr-rgb.c b/src/st/croco/cr-rgb.c index 1b8b66256..6ab97826c 100644 --- a/src/st/croco/cr-rgb.c +++ b/src/st/croco/cr-rgb.c @@ -31,154 +31,153 @@ #include "cr-parser.h" static const CRRgb gv_standard_colors[] = { - {(const guchar*)"aliceblue", 240, 248, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"antiquewhite", 250, 235, 215, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"aqua", 0, 255, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"aquamarine", 127, 255, 212, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"azure", 240, 255, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"beige", 245, 245, 220, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"bisque", 255, 228, 196, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"black", 0, 0, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"blanchedalmond", 255, 235, 205, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"blue", 0, 0, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"blueviolet", 138, 43, 226, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"brown", 165, 42, 42, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"burlywood", 222, 184, 135, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"cadetblue", 95, 158, 160, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"chartreuse", 127, 255, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"chocolate", 210, 105, 30, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"coral", 255, 127, 80, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"cornflowerblue", 100, 149, 237, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"cornsilk", 255, 248, 220, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"crimson", 220, 20, 60, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"cyan", 0, 255, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkblue", 0, 0, 139, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkcyan", 0, 139, 139, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkgoldenrod", 184, 134, 11, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkgray", 169, 169, 169, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkgreen", 0, 100, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkgrey", 169, 169, 169, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkkhaki", 189, 183, 107, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkmagenta", 139, 0, 139, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkolivegreen", 85, 107, 47, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkorange", 255, 140, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkorchid", 153, 50, 204, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkred", 139, 0, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darksalmon", 233, 150, 122, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkseagreen", 143, 188, 143, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkslateblue", 72, 61, 139, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkslategray", 47, 79, 79, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkslategrey", 47, 79, 79, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkturquoise", 0, 206, 209, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"darkviolet", 148, 0, 211, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"deeppink", 255, 20, 147, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"deepskyblue", 0, 191, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"dimgray", 105, 105, 105, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"dimgrey", 105, 105, 105, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"dodgerblue", 30, 144, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"firebrick", 178, 34, 34, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"floralwhite", 255, 250, 240, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"forestgreen", 34, 139, 34, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"fuchsia", 255, 0, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"gainsboro", 220, 220, 220, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"ghostwhite", 248, 248, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"gold", 255, 215, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"goldenrod", 218, 165, 32, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"gray", 128, 128, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"green", 0, 128, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"greenyellow", 173, 255, 47, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"grey", 128, 128, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"honeydew", 240, 255, 240, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"hotpink", 255, 105, 180, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"indianred", 205, 92, 92, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"indigo", 75, 0, 130, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"ivory", 255, 255, 240, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"khaki", 240, 230, 140, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lavender", 230, 230, 250, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lavenderblush", 255, 240, 245, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lawngreen", 124, 252, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lemonchiffon", 255, 250, 205, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightblue", 173, 216, 230, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightcoral", 240, 128, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightcyan", 224, 255, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightgoldenrodyellow", 250, 250, 210, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightgray", 211, 211, 211, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightgreen", 144, 238, 144, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightgrey", 211, 211, 211, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightpink", 255, 182, 193, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightsalmon", 255, 160, 122, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightseagreen", 32, 178, 170, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightskyblue", 135, 206, 250, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightslategray", 119, 136, 153, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightslategrey", 119, 136, 153, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightsteelblue", 176, 196, 222, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lightyellow", 255, 255, 224, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"lime", 0, 255, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"limegreen", 50, 205, 50, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"linen", 250, 240, 230, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"magenta", 255, 0, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"maroon", 128, 0, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumaquamarine", 102, 205, 170, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumblue", 0, 0, 205, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumorchid", 186, 85, 211, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumpurple", 147, 112, 219, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumseagreen", 60, 179, 113, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumslateblue", 123, 104, 238, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumspringgreen", 0, 250, 154, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumturquoise", 72, 209, 204, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mediumvioletred", 199, 21, 133, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"midnightblue", 25, 25, 112, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mintcream", 245, 255, 250, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"mistyrose", 255, 228, 225, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"moccasin", 255, 228, 181, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"navajowhite", 255, 222, 173, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"navy", 0, 0, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"oldlace", 253, 245, 230, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"olive", 128, 128, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"olivedrab", 107, 142, 35, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"orange", 255, 165, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"orangered", 255, 69, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"orchid", 218, 112, 214, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"palegoldenrod", 238, 232, 170, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"palegreen", 152, 251, 152, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"paleturquoise", 175, 238, 238, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"palevioletred", 219, 112, 147, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"papayawhip", 255, 239, 213, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"peachpuff", 255, 218, 185, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"peru", 205, 133, 63, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"pink", 255, 192, 203, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"plum", 221, 160, 221, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"powderblue", 176, 224, 230, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"purple", 128, 0, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"red", 255, 0, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"rosybrown", 188, 143, 143, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"royalblue", 65, 105, 225, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"saddlebrown", 139, 69, 19, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"salmon", 250, 128, 114, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"sandybrown", 244, 164, 96, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"seagreen", 46, 139, 87, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"seashell", 255, 245, 238, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"sienna", 160, 82, 45, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"silver", 192, 192, 192, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"skyblue", 135, 206, 235, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"slateblue", 106, 90, 205, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"slategray", 112, 128, 144, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"slategrey", 112, 128, 144, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"snow", 255, 250, 250, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"springgreen", 0, 255, 127, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"steelblue", 70, 130, 180, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"tan", 210, 180, 140, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"teal", 0, 128, 128, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"thistle", 216, 191, 216, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"tomato", 255, 99, 71, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"transparent", 255, 255, 255, FALSE, FALSE, TRUE, {0,0,0}}, - {(const guchar*)"turquoise", 64, 224, 208, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"violet", 238, 130, 238, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"wheat", 245, 222, 179, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"white", 255, 255, 255, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"whitesmoke", 245, 245, 245, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"yellow", 255, 255, 0, FALSE, FALSE, FALSE, {0,0,0}}, - {(const guchar*)"yellowgreen", 154, 205, 50, FALSE, FALSE, FALSE, {0,0,0}} + {(const guchar*)"aliceblue", 240, 248, 255, FALSE, {0,0,0}}, + {(const guchar*)"antiquewhite", 250, 235, 215, FALSE, {0,0,0}}, + {(const guchar*)"aqua", 0, 255, 255, FALSE, {0,0,0}}, + {(const guchar*)"aquamarine", 127, 255, 212, FALSE, {0,0,0}}, + {(const guchar*)"azure", 240, 255, 255, FALSE, {0,0,0}}, + {(const guchar*)"beige", 245, 245, 220, FALSE, {0,0,0}}, + {(const guchar*)"bisque", 255, 228, 196, FALSE, {0,0,0}}, + {(const guchar*)"black", 0, 0, 0, FALSE, {0,0,0}}, + {(const guchar*)"blanchedalmond", 255, 235, 205, FALSE, {0,0,0}}, + {(const guchar*)"blue", 0, 0, 255, FALSE, {0,0,0}}, + {(const guchar*)"blueviolet", 138, 43, 226, FALSE, {0,0,0}}, + {(const guchar*)"brown", 165, 42, 42, FALSE, {0,0,0}}, + {(const guchar*)"burlywood", 222, 184, 135, FALSE, {0,0,0}}, + {(const guchar*)"cadetblue", 95, 158, 160, FALSE, {0,0,0}}, + {(const guchar*)"chartreuse", 127, 255, 0, FALSE, {0,0,0}}, + {(const guchar*)"chocolate", 210, 105, 30, FALSE, {0,0,0}}, + {(const guchar*)"coral", 255, 127, 80, FALSE, {0,0,0}}, + {(const guchar*)"cornflowerblue", 100, 149, 237, FALSE, {0,0,0}}, + {(const guchar*)"cornsilk", 255, 248, 220, FALSE, {0,0,0}}, + {(const guchar*)"crimson", 220, 20, 60, FALSE, {0,0,0}}, + {(const guchar*)"cyan", 0, 255, 255, FALSE, {0,0,0}}, + {(const guchar*)"darkblue", 0, 0, 139, FALSE, {0,0,0}}, + {(const guchar*)"darkcyan", 0, 139, 139, FALSE, {0,0,0}}, + {(const guchar*)"darkgoldenrod", 184, 134, 11, FALSE, {0,0,0}}, + {(const guchar*)"darkgray", 169, 169, 169, FALSE, {0,0,0}}, + {(const guchar*)"darkgreen", 0, 100, 0, FALSE, {0,0,0}}, + {(const guchar*)"darkgrey", 169, 169, 169, FALSE, {0,0,0}}, + {(const guchar*)"darkkhaki", 189, 183, 107, FALSE, {0,0,0}}, + {(const guchar*)"darkmagenta", 139, 0, 139, FALSE, {0,0,0}}, + {(const guchar*)"darkolivegreen", 85, 107, 47, FALSE, {0,0,0}}, + {(const guchar*)"darkorange", 255, 140, 0, FALSE, {0,0,0}}, + {(const guchar*)"darkorchid", 153, 50, 204, FALSE, {0,0,0}}, + {(const guchar*)"darkred", 139, 0, 0, FALSE, {0,0,0}}, + {(const guchar*)"darksalmon", 233, 150, 122, FALSE, {0,0,0}}, + {(const guchar*)"darkseagreen", 143, 188, 143, FALSE, {0,0,0}}, + {(const guchar*)"darkslateblue", 72, 61, 139, FALSE, {0,0,0}}, + {(const guchar*)"darkslategray", 47, 79, 79, FALSE, {0,0,0}}, + {(const guchar*)"darkslategrey", 47, 79, 79, FALSE, {0,0,0}}, + {(const guchar*)"darkturquoise", 0, 206, 209, FALSE, {0,0,0}}, + {(const guchar*)"darkviolet", 148, 0, 211, FALSE, {0,0,0}}, + {(const guchar*)"deeppink", 255, 20, 147, FALSE, {0,0,0}}, + {(const guchar*)"deepskyblue", 0, 191, 255, FALSE, {0,0,0}}, + {(const guchar*)"dimgray", 105, 105, 105, FALSE, {0,0,0}}, + {(const guchar*)"dimgrey", 105, 105, 105, FALSE, {0,0,0}}, + {(const guchar*)"dodgerblue", 30, 144, 255, FALSE, {0,0,0}}, + {(const guchar*)"firebrick", 178, 34, 34, FALSE, {0,0,0}}, + {(const guchar*)"floralwhite", 255, 250, 240, FALSE, {0,0,0}}, + {(const guchar*)"forestgreen", 34, 139, 34, FALSE, {0,0,0}}, + {(const guchar*)"fuchsia", 255, 0, 255, FALSE, {0,0,0}}, + {(const guchar*)"gainsboro", 220, 220, 220, FALSE, {0,0,0}}, + {(const guchar*)"ghostwhite", 248, 248, 255, FALSE, {0,0,0}}, + {(const guchar*)"gold", 255, 215, 0, FALSE, {0,0,0}}, + {(const guchar*)"goldenrod", 218, 165, 32, FALSE, {0,0,0}}, + {(const guchar*)"gray", 128, 128, 128, FALSE, {0,0,0}}, + {(const guchar*)"green", 0, 128, 0, FALSE, {0,0,0}}, + {(const guchar*)"greenyellow", 173, 255, 47, FALSE, {0,0,0}}, + {(const guchar*)"grey", 128, 128, 128, FALSE, {0,0,0}}, + {(const guchar*)"honeydew", 240, 255, 240, FALSE, {0,0,0}}, + {(const guchar*)"hotpink", 255, 105, 180, FALSE, {0,0,0}}, + {(const guchar*)"indianred", 205, 92, 92, FALSE, {0,0,0}}, + {(const guchar*)"indigo", 75, 0, 130, FALSE, {0,0,0}}, + {(const guchar*)"ivory", 255, 255, 240, FALSE, {0,0,0}}, + {(const guchar*)"khaki", 240, 230, 140, FALSE, {0,0,0}}, + {(const guchar*)"lavender", 230, 230, 250, FALSE, {0,0,0}}, + {(const guchar*)"lavenderblush", 255, 240, 245, FALSE, {0,0,0}}, + {(const guchar*)"lawngreen", 124, 252, 0, FALSE, {0,0,0}}, + {(const guchar*)"lemonchiffon", 255, 250, 205, FALSE, {0,0,0}}, + {(const guchar*)"lightblue", 173, 216, 230, FALSE, {0,0,0}}, + {(const guchar*)"lightcoral", 240, 128, 128, FALSE, {0,0,0}}, + {(const guchar*)"lightcyan", 224, 255, 255, FALSE, {0,0,0}}, + {(const guchar*)"lightgoldenrodyellow", 250, 250, 210, FALSE, {0,0,0}}, + {(const guchar*)"lightgray", 211, 211, 211, FALSE, {0,0,0}}, + {(const guchar*)"lightgreen", 144, 238, 144, FALSE, {0,0,0}}, + {(const guchar*)"lightgrey", 211, 211, 211, FALSE, {0,0,0}}, + {(const guchar*)"lightpink", 255, 182, 193, FALSE, {0,0,0}}, + {(const guchar*)"lightsalmon", 255, 160, 122, FALSE, {0,0,0}}, + {(const guchar*)"lightseagreen", 32, 178, 170, FALSE, {0,0,0}}, + {(const guchar*)"lightskyblue", 135, 206, 250, FALSE, {0,0,0}}, + {(const guchar*)"lightslategray", 119, 136, 153, FALSE, {0,0,0}}, + {(const guchar*)"lightslategrey", 119, 136, 153, FALSE, {0,0,0}}, + {(const guchar*)"lightsteelblue", 176, 196, 222, FALSE, {0,0,0}}, + {(const guchar*)"lightyellow", 255, 255, 224, FALSE, {0,0,0}}, + {(const guchar*)"lime", 0, 255, 0, FALSE, {0,0,0}}, + {(const guchar*)"limegreen", 50, 205, 50, FALSE, {0,0,0}}, + {(const guchar*)"linen", 250, 240, 230, FALSE, {0,0,0}}, + {(const guchar*)"magenta", 255, 0, 255, FALSE, {0,0,0}}, + {(const guchar*)"maroon", 128, 0, 0, FALSE, {0,0,0}}, + {(const guchar*)"mediumaquamarine", 102, 205, 170, FALSE, {0,0,0}}, + {(const guchar*)"mediumblue", 0, 0, 205, FALSE, {0,0,0}}, + {(const guchar*)"mediumorchid", 186, 85, 211, FALSE, {0,0,0}}, + {(const guchar*)"mediumpurple", 147, 112, 219, FALSE, {0,0,0}}, + {(const guchar*)"mediumseagreen", 60, 179, 113, FALSE, {0,0,0}}, + {(const guchar*)"mediumslateblue", 123, 104, 238, FALSE, {0,0,0}}, + {(const guchar*)"mediumspringgreen", 0, 250, 154, FALSE, {0,0,0}}, + {(const guchar*)"mediumturquoise", 72, 209, 204, FALSE, {0,0,0}}, + {(const guchar*)"mediumvioletred", 199, 21, 133, FALSE, {0,0,0}}, + {(const guchar*)"midnightblue", 25, 25, 112, FALSE, {0,0,0}}, + {(const guchar*)"mintcream", 245, 255, 250, FALSE, {0,0,0}}, + {(const guchar*)"mistyrose", 255, 228, 225, FALSE, {0,0,0}}, + {(const guchar*)"moccasin", 255, 228, 181, FALSE, {0,0,0}}, + {(const guchar*)"navajowhite", 255, 222, 173, FALSE, {0,0,0}}, + {(const guchar*)"navy", 0, 0, 128, FALSE, {0,0,0}}, + {(const guchar*)"oldlace", 253, 245, 230, FALSE, {0,0,0}}, + {(const guchar*)"olive", 128, 128, 0, FALSE, {0,0,0}}, + {(const guchar*)"olivedrab", 107, 142, 35, FALSE, {0,0,0}}, + {(const guchar*)"orange", 255, 165, 0, FALSE, {0,0,0}}, + {(const guchar*)"orangered", 255, 69, 0, FALSE, {0,0,0}}, + {(const guchar*)"orchid", 218, 112, 214, FALSE, {0,0,0}}, + {(const guchar*)"palegoldenrod", 238, 232, 170, FALSE, {0,0,0}}, + {(const guchar*)"palegreen", 152, 251, 152, FALSE, {0,0,0}}, + {(const guchar*)"paleturquoise", 175, 238, 238, FALSE, {0,0,0}}, + {(const guchar*)"palevioletred", 219, 112, 147, FALSE, {0,0,0}}, + {(const guchar*)"papayawhip", 255, 239, 213, FALSE, {0,0,0}}, + {(const guchar*)"peachpuff", 255, 218, 185, FALSE, {0,0,0}}, + {(const guchar*)"peru", 205, 133, 63, FALSE, {0,0,0}}, + {(const guchar*)"pink", 255, 192, 203, FALSE, {0,0,0}}, + {(const guchar*)"plum", 221, 160, 221, FALSE, {0,0,0}}, + {(const guchar*)"powderblue", 176, 224, 230, FALSE, {0,0,0}}, + {(const guchar*)"purple", 128, 0, 128, FALSE, {0,0,0}}, + {(const guchar*)"red", 255, 0, 0, FALSE, {0,0,0}}, + {(const guchar*)"rosybrown", 188, 143, 143, FALSE, {0,0,0}}, + {(const guchar*)"royalblue", 65, 105, 225, FALSE, {0,0,0}}, + {(const guchar*)"saddlebrown", 139, 69, 19, FALSE, {0,0,0}}, + {(const guchar*)"salmon", 250, 128, 114, FALSE, {0,0,0}}, + {(const guchar*)"sandybrown", 244, 164, 96, FALSE, {0,0,0}}, + {(const guchar*)"seagreen", 46, 139, 87, FALSE, {0,0,0}}, + {(const guchar*)"seashell", 255, 245, 238, FALSE, {0,0,0}}, + {(const guchar*)"sienna", 160, 82, 45, FALSE, {0,0,0}}, + {(const guchar*)"silver", 192, 192, 192, FALSE, {0,0,0}}, + {(const guchar*)"skyblue", 135, 206, 235, FALSE, {0,0,0}}, + {(const guchar*)"slateblue", 106, 90, 205, FALSE, {0,0,0}}, + {(const guchar*)"slategray", 112, 128, 144, FALSE, {0,0,0}}, + {(const guchar*)"slategrey", 112, 128, 144, FALSE, {0,0,0}}, + {(const guchar*)"snow", 255, 250, 250, FALSE, {0,0,0}}, + {(const guchar*)"springgreen", 0, 255, 127, FALSE, {0,0,0}}, + {(const guchar*)"steelblue", 70, 130, 180, FALSE, {0,0,0}}, + {(const guchar*)"tan", 210, 180, 140, FALSE, {0,0,0}}, + {(const guchar*)"teal", 0, 128, 128, FALSE, {0,0,0}}, + {(const guchar*)"thistle", 216, 191, 216, FALSE, {0,0,0}}, + {(const guchar*)"tomato", 255, 99, 71, FALSE, {0,0,0}}, + {(const guchar*)"turquoise", 64, 224, 208, FALSE, {0,0,0}}, + {(const guchar*)"violet", 238, 130, 238, FALSE, {0,0,0}}, + {(const guchar*)"wheat", 245, 222, 179, FALSE, {0,0,0}}, + {(const guchar*)"white", 255, 255, 255, FALSE, {0,0,0}}, + {(const guchar*)"whitesmoke", 245, 245, 245, FALSE, {0,0,0}}, + {(const guchar*)"yellow", 255, 255, 0, FALSE, {0,0,0}}, + {(const guchar*)"yellowgreen", 154, 205, 50, FALSE, {0,0,0}} }; /** @@ -357,82 +356,9 @@ cr_rgb_set (CRRgb * a_this, gulong a_red, a_this->red = a_red; a_this->green = a_green; a_this->blue = a_blue; - a_this->inherit = FALSE ; - a_this->is_transparent = FALSE ; return CR_OK; } -/** - * cr_rgb_set_to_inherit: - *@a_this: the current instance of #CRRgb - * - *sets the value of the rgb to inherit. - *Look at the css spec from chapter 6.1 to 6.2 to understand - *the meaning of "inherit". - * - * Returns CR_OK upon succesful completion, an error code otherwise. - */ -enum CRStatus -cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) -{ - g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR) ; - - a_this->inherit = a_inherit ; - - return CR_OK ; -} - -/** - * cr_rgb_is_set_to_inherit: - * - * @a_this: the current instance of #CRRgb. - * - * Returns TRUE if the rgb is set to the value "inherit", FALSE otherwise. - */ -gboolean -cr_rgb_is_set_to_inherit (CRRgb const *a_this) -{ - g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR) ; - - return a_this->inherit ; -} - -/** - * cr_rgb_is_set_to_transparent: - *@a_this: the current instance of - *#CRRgb - * - *Tests if the the rgb is set to the - *value "transparent" or not. - * - *Returns TRUE if the rgb has been set to - *transparent, FALSE otherwise. - */ -gboolean -cr_rgb_is_set_to_transparent (CRRgb const *a_this) -{ - g_return_val_if_fail (a_this, FALSE) ; - return a_this->is_transparent ; -} - - -/** - * cr_rgb_set_to_transparent: - *@a_this: the current instance of #CRRgb - *@a_is_transparent: set to transparent or not. - * - *Sets the rgb to the "transparent" value (or not) - *Returns CR_OK upon successfull completion, an error code otherwise. - */ -enum CRStatus -cr_rgb_set_to_transparent (CRRgb *a_this, - gboolean a_is_transparent) -{ - g_return_val_if_fail (a_this, CR_BAD_PARAM_ERROR) ; - a_this->is_transparent = a_is_transparent ; - return CR_OK ; -} - /** * cr_rgb_set_from_rgb: *@a_this: the current instance of #CRRgb. @@ -546,7 +472,6 @@ cr_rgb_set_from_hex_str (CRRgb * a_this, const guchar * a_hex) if (status == CR_OK) { status = cr_rgb_set (a_this, colors[0], colors[1], colors[2], FALSE); - cr_rgb_set_to_transparent (a_this, FALSE) ; } return status; } @@ -578,16 +503,9 @@ cr_rgb_set_from_term (CRRgb *a_this, const struct _CRTerm *a_value) if (a_value->content.str && a_value->content.str->stryng && a_value->content.str->stryng->str) { - if (!strncmp ("inherit", - a_value->content.str->stryng->str, - sizeof ("inherit")-1)) { - a_this->inherit = TRUE; - a_this->is_transparent = FALSE ; - } else { - status = cr_rgb_set_from_name - (a_this, - (const guchar *) a_value->content.str->stryng->str) ; - } + status = cr_rgb_set_from_name + (a_this, + (const guchar *) a_value->content.str->stryng->str) ; } else { cr_utils_trace_info ("a_value has NULL string value") ; diff --git a/src/st/croco/cr-rgb.h b/src/st/croco/cr-rgb.h index a127a440e..a77e30992 100644 --- a/src/st/croco/cr-rgb.h +++ b/src/st/croco/cr-rgb.h @@ -44,8 +44,6 @@ struct _CRRgb glong green ; glong blue ; gboolean is_percentage ; - gboolean inherit ; - gboolean is_transparent ; CRParsingLocation location ; } ; @@ -65,14 +63,6 @@ enum CRStatus cr_rgb_set (CRRgb *a_this, gulong a_red, enum CRStatus cr_rgb_copy (CRRgb *a_dest, CRRgb const *a_src) ; -enum CRStatus cr_rgb_set_to_inherit (CRRgb *a_this, gboolean a_inherit) ; - -gboolean cr_rgb_is_set_to_inherit (CRRgb const *a_this) ; - -gboolean cr_rgb_is_set_to_transparent (CRRgb const *a_this) ; - -enum CRStatus cr_rgb_set_to_transparent (CRRgb *a_this, - gboolean a_is_transparent) ; enum CRStatus cr_rgb_set_from_rgb (CRRgb *a_this, CRRgb const *a_rgb) ; enum CRStatus cr_rgb_set_from_name (CRRgb *a_this, const guchar *a_color_name) ;