symboliccolor: Implement using GtkCssValue

This commit is contained in:
Benjamin Otte
2012-11-25 01:55:53 +01:00
parent b8e58015eb
commit 08ac1504d2
9 changed files with 80 additions and 669 deletions

View File

@ -23,8 +23,6 @@
#include "gtkwin32themeprivate.h"
#include <gtksymboliccolor.h>
#ifdef G_OS_WIN32
#include <cairo-win32.h>
@ -383,41 +381,6 @@ _gtk_win32_theme_int_parse (GtkCssParser *parser,
return -1;
}
GtkSymbolicColor *
_gtk_win32_theme_color_parse (GtkCssParser *parser)
{
GtkSymbolicColor *color;
char *class;
int id;
class = _gtk_css_parser_try_name (parser, TRUE);
if (class == NULL)
{
_gtk_css_parser_error (parser,
"Expected name as first argument to '-gtk-win32-color'");
return NULL;
}
if (! _gtk_css_parser_try (parser, ",", TRUE))
{
g_free (class);
_gtk_css_parser_error (parser,
"Expected ','");
return NULL;
}
if (!_gtk_css_parser_try_int (parser, &id))
{
g_free (class);
_gtk_css_parser_error (parser, "Expected a valid integer value");
return NULL;
}
color = gtk_symbolic_color_new_win32 (class, id);
g_free (class);
return color;
}
gboolean
_gtk_win32_theme_color_resolve (const char *theme_class,
gint id,