2 * Copyright © 2012 Red Hat Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 * Authors: Alexander Larsson <alexl@gnome.org>
20 #ifndef __GTK_CSS_NUMBER_VALUE_PRIVATE_H__
21 #define __GTK_CSS_NUMBER_VALUE_PRIVATE_H__
23 #include "gtkcssparserprivate.h"
24 #include "gtkcsstypesprivate.h"
25 #include "gtkcssvalueprivate.h"
29 typedef enum /*< skip >*/ {
30 GTK_CSS_POSITIVE_ONLY = (1 << 0),
31 GTK_CSS_PARSE_PERCENT = (1 << 1),
32 GTK_CSS_PARSE_NUMBER = (1 << 2),
33 GTK_CSS_NUMBER_AS_PIXELS = (1 << 3),
34 GTK_CSS_PARSE_LENGTH = (1 << 4),
35 GTK_CSS_PARSE_ANGLE = (1 << 5),
36 GTK_CSS_PARSE_TIME = (1 << 6)
37 } GtkCssNumberParseFlags;
39 GtkCssValue * _gtk_css_number_value_new (double value,
41 /* This function implemented in gtkcssparser.c */
42 GtkCssValue * _gtk_css_number_value_parse (GtkCssParser *parser,
43 GtkCssNumberParseFlags flags);
45 GtkCssUnit _gtk_css_number_value_get_unit (const GtkCssValue *value);
46 double _gtk_css_number_value_get (const GtkCssValue *number,
47 double one_hundred_percent);
52 #endif /* __GTK_CSS_NUMBER_VALUE_PRIVATE_H__ */