Commit a94ea9a4 authored by Benjamin Otte's avatar Benjamin Otte
Browse files

css: Overhaul value parsing

Value parsing only sometimes emitted errors. Sometimes it didn't emit
errors but ignored the value, sometimes it took a default, sometimes it
converted it to something it deemed suitable.

While refactoring, I moved the whole GValue <=> char * conversion
routines to a separate file, to make navigating the core css provider
easier.
parent a50a06b5
......@@ -387,6 +387,7 @@ gtk_private_h_sources = \
gtkbuttonprivate.h \
gtkcellareaboxcontextprivate.h \
gtkcssproviderprivate.h \
gtkcssstringfuncsprivate.h \
gtkcustompaperunixdialog.h \
gtkdndcursors.h \
gtkentryprivate.h \
......@@ -512,6 +513,7 @@ gtk_base_c_sources = \
gtkcomboboxtext.c \
gtkcontainer.c \
gtkcssprovider.c \
gtkcssstringfuncs.c \
gtkdialog.c \
gtkdrawingarea.c \
gtkeditable.c \
......
This diff is collapsed.
This diff is collapsed.
/* GTK - The GIMP Toolkit
* Copyright (C) 2010 Carlos Garnacho <carlosg@gnome.org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GTK_CSS_STRINGFUNCS_PRIVATE_H__
#define __GTK_CSS_STRINGFUNCS_PRIVATE_H__
#include <gtk/gtksymboliccolor.h>
G_BEGIN_DECLS
gboolean _gtk_css_value_from_string (GValue *value,
GFile *base,
const char *string,
GError **error);
char * _gtk_css_value_to_string (const GValue *value);
GtkSymbolicColor * _gtk_css_parse_symbolic_color (const char *str,
GError **error);
GFile * _gtk_css_parse_url (GFile *base,
const char *str,
char **end,
GError **error);
G_END_DECLS
#endif /* __GTK_CSS_STRINGFUNCS_PRIVATE_H__ */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment