2017-09-18 22:38:16 +00:00
|
|
|
/*
|
2012-01-02 09:21:57 +00:00
|
|
|
* 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
|
2012-02-27 13:01:10 +00:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
2012-01-02 09:21:57 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
#include "gtkstylepropertyprivate.h"
|
|
|
|
|
2012-01-02 10:12:46 +00:00
|
|
|
#include <gobject/gvaluecollector.h>
|
2012-01-02 09:21:57 +00:00
|
|
|
#include <gdk-pixbuf/gdk-pixbuf.h>
|
2012-01-15 01:53:39 +00:00
|
|
|
#include <math.h>
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2020-10-03 02:28:17 +00:00
|
|
|
#include <gtk/css/gtkcss.h>
|
|
|
|
#include "gtk/css/gtkcsstokenizerprivate.h"
|
|
|
|
#include "gtk/css/gtkcssparserprivate.h"
|
2012-01-02 09:21:57 +00:00
|
|
|
#include "gtkcssstylepropertyprivate.h"
|
|
|
|
#include "gtkcsstypesprivate.h"
|
|
|
|
#include "gtkprivatetypebuiltins.h"
|
|
|
|
|
|
|
|
/* the actual parsers we have */
|
2012-03-30 01:09:26 +00:00
|
|
|
#include "gtkcssarrayvalueprivate.h"
|
2012-04-04 10:39:55 +00:00
|
|
|
#include "gtkcssbgsizevalueprivate.h"
|
2012-04-04 14:15:41 +00:00
|
|
|
#include "gtkcssbordervalueprivate.h"
|
2012-11-08 16:22:56 +00:00
|
|
|
#include "gtkcsscolorvalueprivate.h"
|
2012-04-03 16:39:01 +00:00
|
|
|
#include "gtkcsscornervalueprivate.h"
|
2012-04-01 04:22:20 +00:00
|
|
|
#include "gtkcsseasevalueprivate.h"
|
2016-12-31 00:15:52 +00:00
|
|
|
#include "gtkcssfiltervalueprivate.h"
|
2017-12-21 17:18:10 +00:00
|
|
|
#include "gtkcssfontfeaturesvalueprivate.h"
|
2012-03-27 21:54:06 +00:00
|
|
|
#include "gtkcssimageprivate.h"
|
2012-03-29 00:58:32 +00:00
|
|
|
#include "gtkcssimagevalueprivate.h"
|
2012-11-25 14:35:52 +00:00
|
|
|
#include "gtkcssinitialvalueprivate.h"
|
2012-03-28 06:19:53 +00:00
|
|
|
#include "gtkcssenumvalueprivate.h"
|
2012-03-27 22:04:29 +00:00
|
|
|
#include "gtkcssnumbervalueprivate.h"
|
2015-12-02 23:33:51 +00:00
|
|
|
#include "gtkcsspalettevalueprivate.h"
|
2012-04-03 20:21:16 +00:00
|
|
|
#include "gtkcsspositionvalueprivate.h"
|
2012-04-04 09:44:57 +00:00
|
|
|
#include "gtkcssrepeatvalueprivate.h"
|
2020-01-14 13:34:15 +00:00
|
|
|
#include "gtkcssshadowvalueprivate.h"
|
2012-03-30 01:09:26 +00:00
|
|
|
#include "gtkcssstringvalueprivate.h"
|
2014-05-05 13:28:18 +00:00
|
|
|
#include "gtkcsstransformvalueprivate.h"
|
2017-12-20 05:45:30 +00:00
|
|
|
#include "gtkcssfontvariationsvalueprivate.h"
|
2021-08-06 18:19:34 +00:00
|
|
|
#include "gtkcsslineheightvalueprivate.h"
|
2012-01-02 09:21:57 +00:00
|
|
|
#include "gtktypebuiltins.h"
|
|
|
|
|
|
|
|
/*** REGISTRATION ***/
|
|
|
|
|
2012-04-02 06:47:11 +00:00
|
|
|
typedef enum {
|
2012-04-02 06:53:51 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT = (1 << 0),
|
2012-11-30 18:00:23 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED = (1 << 1),
|
2012-04-02 06:47:11 +00:00
|
|
|
} GtkStylePropertyFlags;
|
|
|
|
|
2012-01-02 09:21:57 +00:00
|
|
|
static void
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register (const char * name,
|
2012-03-31 03:28:58 +00:00
|
|
|
guint expected_id,
|
2012-01-14 16:12:57 +00:00
|
|
|
GtkStylePropertyFlags flags,
|
2014-10-01 04:49:01 +00:00
|
|
|
GtkCssAffects affects,
|
2012-01-14 16:12:57 +00:00
|
|
|
GtkCssStylePropertyParseFunc parse_value,
|
2012-03-27 02:58:15 +00:00
|
|
|
GtkCssValue * initial_value)
|
2012-01-02 09:21:57 +00:00
|
|
|
{
|
2012-01-02 17:05:06 +00:00
|
|
|
GtkCssStyleProperty *node;
|
2012-01-02 10:12:46 +00:00
|
|
|
|
2012-03-27 02:58:15 +00:00
|
|
|
g_assert (initial_value != NULL);
|
2012-03-27 13:58:22 +00:00
|
|
|
g_assert (parse_value != NULL);
|
2012-03-06 13:16:32 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
node = g_object_new (GTK_TYPE_CSS_STYLE_PROPERTY,
|
2015-01-27 03:32:09 +00:00
|
|
|
"affects", affects,
|
2012-04-02 06:53:51 +00:00
|
|
|
"animated", (flags & GTK_STYLE_PROPERTY_ANIMATED) ? TRUE : FALSE,
|
2012-01-14 16:12:57 +00:00
|
|
|
"inherit", (flags & GTK_STYLE_PROPERTY_INHERIT) ? TRUE : FALSE,
|
2012-03-06 13:16:32 +00:00
|
|
|
"initial-value", initial_value,
|
2012-01-14 16:12:57 +00:00
|
|
|
"name", name,
|
|
|
|
NULL);
|
2015-11-21 01:25:33 +00:00
|
|
|
|
2012-03-27 13:58:22 +00:00
|
|
|
node->parse_value = parse_value;
|
2012-01-02 10:12:46 +00:00
|
|
|
|
2012-03-06 13:16:32 +00:00
|
|
|
_gtk_css_value_unref (initial_value);
|
2012-03-31 03:28:58 +00:00
|
|
|
|
|
|
|
g_assert (_gtk_css_style_property_get_id (node) == expected_id);
|
2012-01-02 10:12:46 +00:00
|
|
|
}
|
|
|
|
|
2012-01-02 09:21:57 +00:00
|
|
|
/*** IMPLEMENTATIONS ***/
|
|
|
|
|
2012-03-27 03:11:58 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
color_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 03:11:58 +00:00
|
|
|
{
|
2012-11-08 16:22:56 +00:00
|
|
|
return _gtk_css_color_value_parse (parser);
|
2012-03-27 03:11:58 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-04-03 07:49:37 +00:00
|
|
|
font_family_parse_one (GtkCssParser *parser)
|
2012-01-02 09:21:57 +00:00
|
|
|
{
|
|
|
|
char *name;
|
|
|
|
|
2019-03-31 10:40:53 +00:00
|
|
|
if (gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_IDENT))
|
2012-04-03 07:49:37 +00:00
|
|
|
{
|
2019-03-31 10:40:53 +00:00
|
|
|
GString *string = g_string_new (NULL);
|
|
|
|
|
|
|
|
name = gtk_css_parser_consume_ident (parser);
|
|
|
|
g_string_append (string, name);
|
2012-04-03 07:49:37 +00:00
|
|
|
g_free (name);
|
2019-03-31 10:40:53 +00:00
|
|
|
while (gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_IDENT))
|
2012-04-03 07:49:37 +00:00
|
|
|
{
|
2019-03-31 10:40:53 +00:00
|
|
|
name = gtk_css_parser_consume_ident (parser);
|
2012-04-03 07:49:37 +00:00
|
|
|
g_string_append_c (string, ' ');
|
|
|
|
g_string_append (string, name);
|
|
|
|
g_free (name);
|
|
|
|
}
|
|
|
|
name = g_string_free (string, FALSE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2019-04-04 21:37:38 +00:00
|
|
|
name = gtk_css_parser_consume_string (parser);
|
2012-04-03 07:49:37 +00:00
|
|
|
if (name == NULL)
|
|
|
|
return NULL;
|
|
|
|
}
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
return _gtk_css_string_value_new_take (name);
|
|
|
|
}
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2016-04-18 15:43:01 +00:00
|
|
|
GtkCssValue *
|
|
|
|
gtk_css_font_family_value_parse (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, font_family_parse_one);
|
|
|
|
}
|
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
font_family_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-04-03 07:49:37 +00:00
|
|
|
{
|
2016-04-18 15:43:01 +00:00
|
|
|
return gtk_css_font_family_value_parse (parser);
|
2012-01-02 09:21:57 +00:00
|
|
|
}
|
|
|
|
|
2012-03-27 04:29:37 +00:00
|
|
|
static GtkCssValue *
|
2016-04-18 13:43:10 +00:00
|
|
|
font_style_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
2012-03-27 04:29:37 +00:00
|
|
|
{
|
2012-03-28 07:04:54 +00:00
|
|
|
GtkCssValue *value = _gtk_css_font_style_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font style value");
|
2012-03-27 04:29:37 +00:00
|
|
|
|
2012-03-28 07:04:54 +00:00
|
|
|
return value;
|
|
|
|
}
|
2012-03-27 04:29:37 +00:00
|
|
|
|
|
|
|
static GtkCssValue *
|
2016-04-18 13:43:10 +00:00
|
|
|
font_weight_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
2012-03-27 04:29:37 +00:00
|
|
|
{
|
2019-03-31 18:05:12 +00:00
|
|
|
GtkCssValue *value;
|
2012-03-28 07:04:54 +00:00
|
|
|
|
2019-03-31 18:05:12 +00:00
|
|
|
value = gtk_css_font_weight_value_try_parse (parser);
|
2012-03-28 07:04:54 +00:00
|
|
|
if (value == NULL)
|
2019-03-31 18:05:12 +00:00
|
|
|
{
|
|
|
|
value = _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER | GTK_CSS_POSITIVE_ONLY);
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
return NULL;
|
|
|
|
|
|
|
|
if (_gtk_css_number_value_get (value, 100) < 1 ||
|
|
|
|
_gtk_css_number_value_get (value, 100) > 1000)
|
2019-03-31 18:05:12 +00:00
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_value (parser, "Font weight values must be between 1 and 1000");
|
2019-03-31 18:05:12 +00:00
|
|
|
g_clear_pointer (&value, gtk_css_value_unref);
|
|
|
|
}
|
|
|
|
}
|
2012-03-27 04:29:37 +00:00
|
|
|
|
2012-03-28 07:04:54 +00:00
|
|
|
return value;
|
|
|
|
}
|
2012-03-27 04:29:37 +00:00
|
|
|
|
2014-08-28 11:50:49 +00:00
|
|
|
static GtkCssValue *
|
2016-04-18 13:43:10 +00:00
|
|
|
font_stretch_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
2014-08-28 11:50:49 +00:00
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_font_stretch_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font stretch value");
|
2014-08-28 11:50:49 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-03-27 04:29:37 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_border_style (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 04:29:37 +00:00
|
|
|
{
|
2012-03-28 06:19:53 +00:00
|
|
|
GtkCssValue *value = _gtk_css_border_style_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown border style value");
|
2012-03-27 04:29:37 +00:00
|
|
|
|
2012-03-28 06:19:53 +00:00
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2012-03-27 04:29:37 +00:00
|
|
|
static GtkCssValue *
|
2012-05-10 14:25:33 +00:00
|
|
|
parse_css_area_one (GtkCssParser *parser)
|
2012-03-27 04:29:37 +00:00
|
|
|
{
|
2012-03-30 00:19:39 +00:00
|
|
|
GtkCssValue *value = _gtk_css_area_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown box value");
|
2012-03-27 04:29:37 +00:00
|
|
|
|
2012-03-30 00:19:39 +00:00
|
|
|
return value;
|
2012-03-27 04:29:37 +00:00
|
|
|
}
|
|
|
|
|
2012-05-10 14:25:33 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_css_area (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, parse_css_area_one);
|
2012-05-10 14:25:33 +00:00
|
|
|
}
|
|
|
|
|
2012-04-19 12:50:38 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_one_css_direction (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_direction_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown direction value");
|
2012-04-19 12:50:38 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
parse_css_direction (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, parse_one_css_direction);
|
|
|
|
}
|
|
|
|
|
2013-02-06 13:29:22 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
opacity_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER);
|
|
|
|
}
|
|
|
|
|
2012-04-19 12:50:38 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_one_css_play_state (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_play_state_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown play state value");
|
2012-04-19 12:50:38 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
parse_css_play_state (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, parse_one_css_play_state);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
parse_one_css_fill_mode (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_fill_mode_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown fill mode value");
|
2012-04-19 12:50:38 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
parse_css_fill_mode (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, parse_one_css_fill_mode);
|
|
|
|
}
|
|
|
|
|
2017-01-20 00:50:50 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
icon_size_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser,
|
|
|
|
GTK_CSS_PARSE_LENGTH
|
|
|
|
| GTK_CSS_PARSE_PERCENT
|
|
|
|
| GTK_CSS_POSITIVE_ONLY);
|
|
|
|
}
|
|
|
|
|
2015-12-02 23:33:51 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
icon_palette_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_palette_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2014-05-06 14:06:33 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
icon_style_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_icon_style_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown icon style value");
|
2014-05-06 14:06:33 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2015-07-04 17:56:40 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_letter_spacing (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_LENGTH);
|
|
|
|
}
|
|
|
|
|
2021-01-26 22:40:34 +00:00
|
|
|
static gboolean
|
|
|
|
value_is_done_parsing (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_EOF) ||
|
|
|
|
gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_COMMA) ||
|
|
|
|
gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_SEMICOLON) ||
|
|
|
|
gtk_css_parser_has_token (parser, GTK_CSS_TOKEN_CLOSE_CURLY);
|
|
|
|
}
|
|
|
|
|
2015-07-05 16:59:27 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_text_decoration_line (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2021-01-26 22:40:34 +00:00
|
|
|
GtkCssValue *value = NULL;
|
|
|
|
GtkTextDecorationLine line;
|
2015-07-05 16:59:27 +00:00
|
|
|
|
2021-01-26 22:40:34 +00:00
|
|
|
line = 0;
|
|
|
|
do {
|
|
|
|
GtkTextDecorationLine parsed;
|
|
|
|
|
|
|
|
parsed = _gtk_css_text_decoration_line_try_parse_one (parser, line);
|
|
|
|
if (parsed == 0 || parsed == line)
|
|
|
|
{
|
|
|
|
gtk_css_parser_error_syntax (parser, "Not a valid value");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
line = parsed;
|
|
|
|
} while (!value_is_done_parsing (parser));
|
|
|
|
|
|
|
|
value = _gtk_css_text_decoration_line_value_new (line);
|
2015-07-05 16:59:27 +00:00
|
|
|
if (value == NULL)
|
2021-01-26 22:40:34 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Invalid combination of values");
|
2015-07-05 16:59:27 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2015-07-06 18:03:54 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_text_decoration_style (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_text_decoration_style_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown text decoration style value");
|
2015-07-06 18:03:54 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2021-08-20 23:01:01 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_text_transform (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_text_transform_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
|
|
|
gtk_css_parser_error_syntax (parser, "unknown text transform value");
|
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 01:27:59 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_kerning (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssValue *value = _gtk_css_font_kerning_value_try_parse (parser);
|
2017-09-18 01:27:59 +00:00
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font kerning value");
|
2017-09-18 01:27:59 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 03:52:04 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variant_ligatures (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = NULL;
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssFontVariantLigature ligatures;
|
2017-09-18 03:52:04 +00:00
|
|
|
|
2017-09-18 22:38:16 +00:00
|
|
|
ligatures = 0;
|
|
|
|
do {
|
|
|
|
GtkCssFontVariantLigature parsed;
|
|
|
|
|
|
|
|
parsed = _gtk_css_font_variant_ligature_try_parse_one (parser, ligatures);
|
|
|
|
if (parsed == 0 || parsed == ligatures)
|
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Not a valid value");
|
2017-09-18 22:38:16 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
ligatures = parsed;
|
|
|
|
} while (!value_is_done_parsing (parser));
|
|
|
|
|
|
|
|
value = _gtk_css_font_variant_ligature_value_new (ligatures);
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Invalid combination of values");
|
2017-09-18 03:52:04 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 04:01:39 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variant_position (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssValue *value = _gtk_css_font_variant_position_value_try_parse (parser);
|
2017-09-18 04:01:39 +00:00
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font variant position value");
|
2017-09-18 04:01:39 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 04:12:12 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variant_caps (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssValue *value = _gtk_css_font_variant_caps_value_try_parse (parser);
|
2017-09-18 04:12:12 +00:00
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font variant caps value");
|
2017-09-18 04:12:12 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 11:34:46 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variant_numeric (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = NULL;
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssFontVariantNumeric numeric;
|
2017-09-18 11:34:46 +00:00
|
|
|
|
2017-09-18 22:38:16 +00:00
|
|
|
numeric = 0;
|
|
|
|
do {
|
|
|
|
GtkCssFontVariantNumeric parsed;
|
|
|
|
|
|
|
|
parsed = _gtk_css_font_variant_numeric_try_parse_one (parser, numeric);
|
|
|
|
if (parsed == 0 || parsed == numeric)
|
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Not a valid value");
|
2017-09-18 22:38:16 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
numeric = parsed;
|
|
|
|
} while (!value_is_done_parsing (parser));
|
|
|
|
|
|
|
|
value = _gtk_css_font_variant_numeric_value_new (numeric);
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Invalid combination of values");
|
2017-09-18 11:34:46 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 14:01:05 +00:00
|
|
|
static GtkCssValue *
|
2017-09-18 22:10:08 +00:00
|
|
|
parse_font_variant_alternates (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
2017-09-18 14:01:05 +00:00
|
|
|
{
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssValue *value = _gtk_css_font_variant_alternate_value_try_parse (parser);
|
2017-09-18 14:01:05 +00:00
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "unknown font variant alternate value");
|
2017-09-18 14:01:05 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2017-09-18 16:42:42 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variant_east_asian (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = NULL;
|
2017-09-18 22:38:16 +00:00
|
|
|
GtkCssFontVariantEastAsian east_asian;
|
2017-09-18 16:42:42 +00:00
|
|
|
|
2017-09-18 22:38:16 +00:00
|
|
|
east_asian = 0;
|
|
|
|
do {
|
|
|
|
GtkCssFontVariantEastAsian parsed;
|
|
|
|
|
|
|
|
parsed = _gtk_css_font_variant_east_asian_try_parse_one (parser, east_asian);
|
|
|
|
if (parsed == 0 || parsed == east_asian)
|
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Not a valid value");
|
2017-09-18 22:38:16 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
east_asian = parsed;
|
|
|
|
} while (!value_is_done_parsing (parser));
|
|
|
|
|
|
|
|
value = _gtk_css_font_variant_east_asian_value_new (east_asian);
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Invalid combination of values");
|
2017-09-18 16:42:42 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
2014-06-09 23:04:55 +00:00
|
|
|
static GtkCssValue *
|
2017-12-20 15:29:33 +00:00
|
|
|
parse_font_feature_settings (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_font_features_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2017-12-20 05:45:30 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_font_variation_settings (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_font_variations_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2017-12-20 15:36:25 +00:00
|
|
|
static GtkCssValue *
|
2014-06-09 23:04:55 +00:00
|
|
|
box_shadow_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2021-02-06 20:37:04 +00:00
|
|
|
return gtk_css_shadow_value_parse (parser, TRUE);
|
2014-06-09 23:04:55 +00:00
|
|
|
}
|
|
|
|
|
2012-03-27 05:15:23 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
shadow_value_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 05:15:23 +00:00
|
|
|
{
|
2021-02-06 20:37:04 +00:00
|
|
|
return gtk_css_shadow_value_parse (parser, FALSE);
|
2012-03-27 05:15:23 +00:00
|
|
|
}
|
|
|
|
|
2014-05-05 13:28:18 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
transform_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_transform_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2016-12-31 00:15:52 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
filter_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_filter_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2016-12-10 02:26:24 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
border_spacing_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_position_value_parse_spacing (parser);
|
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-02 17:05:06 +00:00
|
|
|
border_corner_radius_value_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-02 09:21:57 +00:00
|
|
|
{
|
2012-04-03 16:39:01 +00:00
|
|
|
return _gtk_css_corner_value_parse (parser);
|
2012-01-02 09:21:57 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-02 21:22:25 +00:00
|
|
|
css_image_value_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-02 21:22:25 +00:00
|
|
|
{
|
|
|
|
GtkCssImage *image;
|
|
|
|
|
2019-03-24 13:03:52 +00:00
|
|
|
if (gtk_css_parser_try_ident (parser, "none"))
|
2012-01-02 21:22:25 +00:00
|
|
|
image = NULL;
|
|
|
|
else
|
|
|
|
{
|
2012-04-18 19:44:08 +00:00
|
|
|
image = _gtk_css_image_new_parse (parser);
|
2012-01-02 21:22:25 +00:00
|
|
|
if (image == NULL)
|
2013-03-27 03:30:10 +00:00
|
|
|
return NULL;
|
2012-01-02 21:22:25 +00:00
|
|
|
}
|
|
|
|
|
2012-03-29 00:58:32 +00:00
|
|
|
return _gtk_css_image_value_new (image);
|
2012-01-02 21:22:25 +00:00
|
|
|
}
|
|
|
|
|
2012-05-10 15:18:29 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
background_image_value_parse_one (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return css_image_value_parse (NULL, parser);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
background_image_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, background_image_value_parse_one);
|
2012-05-10 15:18:29 +00:00
|
|
|
}
|
|
|
|
|
2015-02-05 17:52:59 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
dpi_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER);
|
|
|
|
}
|
|
|
|
|
2016-04-18 15:43:01 +00:00
|
|
|
GtkCssValue *
|
|
|
|
gtk_css_font_size_value_parse (GtkCssParser *parser)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2012-12-01 13:00:24 +00:00
|
|
|
GtkCssValue *value;
|
2012-03-27 07:05:47 +00:00
|
|
|
|
2012-12-01 13:00:24 +00:00
|
|
|
value = _gtk_css_font_size_value_try_parse (parser);
|
|
|
|
if (value)
|
|
|
|
return value;
|
|
|
|
|
2012-12-01 15:22:04 +00:00
|
|
|
return _gtk_css_number_value_parse (parser,
|
|
|
|
GTK_CSS_PARSE_LENGTH
|
|
|
|
| GTK_CSS_PARSE_PERCENT
|
2017-01-18 03:12:15 +00:00
|
|
|
| GTK_CSS_POSITIVE_ONLY);
|
2012-03-30 01:51:25 +00:00
|
|
|
}
|
|
|
|
|
2016-04-18 15:43:01 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
font_size_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_font_size_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2012-03-27 07:05:47 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
outline_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2012-04-03 14:57:44 +00:00
|
|
|
return _gtk_css_number_value_parse (parser,
|
2017-01-18 03:12:15 +00:00
|
|
|
GTK_CSS_PARSE_LENGTH);
|
2012-04-03 14:57:44 +00:00
|
|
|
}
|
2012-03-27 07:05:47 +00:00
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
border_image_repeat_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2012-04-04 09:44:57 +00:00
|
|
|
GtkCssValue *value = _gtk_css_border_repeat_value_try_parse (parser);
|
2012-03-27 07:05:47 +00:00
|
|
|
|
2012-04-04 09:44:57 +00:00
|
|
|
if (value == NULL)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Not a valid border repeat value");
|
2012-03-27 07:05:47 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-04-04 09:44:57 +00:00
|
|
|
return value;
|
2012-03-27 07:05:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
border_image_slice_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2012-04-04 14:15:41 +00:00
|
|
|
return _gtk_css_border_value_parse (parser,
|
|
|
|
GTK_CSS_PARSE_PERCENT
|
|
|
|
| GTK_CSS_PARSE_NUMBER
|
|
|
|
| GTK_CSS_POSITIVE_ONLY,
|
|
|
|
FALSE,
|
|
|
|
TRUE);
|
2012-03-27 07:05:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
border_image_width_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-27 07:05:47 +00:00
|
|
|
{
|
2012-04-04 15:42:45 +00:00
|
|
|
return _gtk_css_border_value_parse (parser,
|
|
|
|
GTK_CSS_PARSE_PERCENT
|
|
|
|
| GTK_CSS_PARSE_LENGTH
|
|
|
|
| GTK_CSS_PARSE_NUMBER
|
|
|
|
| GTK_CSS_POSITIVE_ONLY,
|
|
|
|
TRUE,
|
|
|
|
FALSE);
|
2012-03-27 07:05:47 +00:00
|
|
|
}
|
|
|
|
|
2012-12-13 02:10:25 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
minmax_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser,
|
|
|
|
GTK_CSS_PARSE_LENGTH
|
|
|
|
| GTK_CSS_POSITIVE_ONLY);
|
|
|
|
}
|
|
|
|
|
2012-04-01 04:22:20 +00:00
|
|
|
static GtkCssValue *
|
2012-04-03 07:49:37 +00:00
|
|
|
transition_property_parse_one (GtkCssParser *parser)
|
2012-04-01 04:22:20 +00:00
|
|
|
{
|
2012-04-03 07:49:37 +00:00
|
|
|
GtkCssValue *value;
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
value = _gtk_css_ident_value_try_parse (parser);
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
if (value == NULL)
|
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Expected an identifier");
|
2012-04-03 07:49:37 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
return value;
|
|
|
|
}
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
transition_property_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-04-03 07:49:37 +00:00
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, transition_property_parse_one);
|
2012-04-03 07:49:37 +00:00
|
|
|
}
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-03 07:49:37 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
transition_time_parse_one (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_TIME);
|
2012-04-01 04:22:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
transition_time_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-04-01 04:22:20 +00:00
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, transition_time_parse_one);
|
2012-04-01 04:22:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
transition_timing_function_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-04-01 04:22:20 +00:00
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, _gtk_css_ease_value_parse);
|
2012-04-01 04:22:20 +00:00
|
|
|
}
|
|
|
|
|
2012-04-19 12:50:38 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
iteration_count_parse_one (GtkCssParser *parser)
|
|
|
|
{
|
2019-03-24 13:03:52 +00:00
|
|
|
if (gtk_css_parser_try_ident (parser, "infinite"))
|
2012-04-19 12:50:38 +00:00
|
|
|
return _gtk_css_number_value_new (HUGE_VAL, GTK_CSS_NUMBER);
|
|
|
|
|
|
|
|
return _gtk_css_number_value_parse (parser, GTK_CSS_PARSE_NUMBER | GTK_CSS_POSITIVE_ONLY);
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
iteration_count_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, iteration_count_parse_one);
|
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-17 15:41:14 +00:00
|
|
|
parse_margin (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-17 15:41:14 +00:00
|
|
|
{
|
2012-03-27 22:04:29 +00:00
|
|
|
return _gtk_css_number_value_parse (parser,
|
2017-01-18 03:12:15 +00:00
|
|
|
GTK_CSS_PARSE_LENGTH);
|
2012-01-17 15:41:14 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-24 16:49:29 +00:00
|
|
|
parse_padding (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-24 16:49:29 +00:00
|
|
|
{
|
2012-03-27 22:04:29 +00:00
|
|
|
return _gtk_css_number_value_parse (parser,
|
|
|
|
GTK_CSS_POSITIVE_ONLY
|
|
|
|
| GTK_CSS_PARSE_LENGTH);
|
2012-01-24 16:49:29 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-15 01:53:39 +00:00
|
|
|
{
|
2012-03-27 22:04:29 +00:00
|
|
|
return _gtk_css_number_value_parse (parser,
|
|
|
|
GTK_CSS_POSITIVE_ONLY
|
|
|
|
| GTK_CSS_PARSE_LENGTH);
|
2012-01-15 01:53:39 +00:00
|
|
|
}
|
|
|
|
|
2016-07-01 12:54:23 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
blend_mode_value_parse_one (GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
GtkCssValue *value = _gtk_css_blend_mode_value_try_parse (parser);
|
|
|
|
|
|
|
|
if (value == NULL)
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Unknown blend mode value");
|
2016-07-01 12:54:23 +00:00
|
|
|
|
|
|
|
return value;
|
|
|
|
}
|
|
|
|
|
|
|
|
static GtkCssValue *
|
|
|
|
blend_mode_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_array_value_parse (parser, blend_mode_value_parse_one);
|
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-05-10 14:31:06 +00:00
|
|
|
background_repeat_value_parse_one (GtkCssParser *parser)
|
2012-01-05 01:48:32 +00:00
|
|
|
{
|
2012-04-04 09:44:57 +00:00
|
|
|
GtkCssValue *value = _gtk_css_background_repeat_value_try_parse (parser);
|
2012-01-05 01:48:32 +00:00
|
|
|
|
2012-04-04 09:44:57 +00:00
|
|
|
if (value == NULL)
|
2012-01-05 01:48:32 +00:00
|
|
|
{
|
2019-04-09 03:40:50 +00:00
|
|
|
gtk_css_parser_error_syntax (parser, "Unknown repeat value");
|
2012-04-04 09:44:57 +00:00
|
|
|
return NULL;
|
2012-01-05 01:48:32 +00:00
|
|
|
}
|
|
|
|
|
2012-04-04 09:44:57 +00:00
|
|
|
return value;
|
2012-01-05 01:48:32 +00:00
|
|
|
}
|
|
|
|
|
2012-05-10 14:31:06 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
background_repeat_value_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, background_repeat_value_parse_one);
|
2012-05-10 14:31:06 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-01-17 14:11:48 +00:00
|
|
|
background_size_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-01-17 14:11:48 +00:00
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, _gtk_css_bg_size_value_parse);
|
2012-01-17 14:11:48 +00:00
|
|
|
}
|
|
|
|
|
2012-03-26 15:24:02 +00:00
|
|
|
static GtkCssValue *
|
2012-03-16 21:13:39 +00:00
|
|
|
background_position_parse (GtkCssStyleProperty *property,
|
2012-04-18 19:58:22 +00:00
|
|
|
GtkCssParser *parser)
|
2012-03-16 21:13:39 +00:00
|
|
|
{
|
2012-08-29 10:30:33 +00:00
|
|
|
return _gtk_css_array_value_parse (parser, _gtk_css_position_value_parse);
|
2012-03-16 21:13:39 +00:00
|
|
|
}
|
|
|
|
|
2021-01-25 03:46:01 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
transform_origin_parse (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return _gtk_css_position_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2021-08-06 18:19:34 +00:00
|
|
|
static GtkCssValue *
|
|
|
|
parse_line_height (GtkCssStyleProperty *property,
|
|
|
|
GtkCssParser *parser)
|
|
|
|
{
|
|
|
|
return gtk_css_line_height_value_parse (parser);
|
|
|
|
}
|
|
|
|
|
2012-01-02 09:21:57 +00:00
|
|
|
/*** REGISTRATION ***/
|
|
|
|
|
2020-01-21 03:53:25 +00:00
|
|
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_COLOR == 0);
|
|
|
|
G_STATIC_ASSERT (GTK_CSS_PROPERTY_DPI < GTK_CSS_PROPERTY_FONT_SIZE);
|
|
|
|
|
2012-01-02 09:21:57 +00:00
|
|
|
void
|
|
|
|
_gtk_css_style_property_init_properties (void)
|
|
|
|
{
|
2015-02-05 17:52:59 +00:00
|
|
|
/* Initialize "color", "-gtk-dpi" and "font-size" first,
|
2012-01-03 02:37:13 +00:00
|
|
|
* so that when computing values later they are
|
|
|
|
* done first. That way, 'currentColor' and font
|
|
|
|
* sizes in em can be looked up properly */
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT | GTK_CSS_AFFECTS_ICON_REDRAW_SYMBOLIC,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2020-01-10 12:02:33 +00:00
|
|
|
gtk_css_color_value_new_white ());
|
2015-02-05 17:52:59 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-dpi",
|
|
|
|
GTK_CSS_PROPERTY_DPI,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_TEXT_SIZE,
|
2015-02-05 17:52:59 +00:00
|
|
|
dpi_parse,
|
|
|
|
_gtk_css_number_value_new (96.0, GTK_CSS_NUMBER));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("font-size",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_SIZE,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_TEXT_SIZE,
|
2012-03-27 07:05:47 +00:00
|
|
|
font_size_parse,
|
2012-12-01 13:00:24 +00:00
|
|
|
_gtk_css_font_size_value_new (GTK_CSS_FONT_SIZE_MEDIUM));
|
2016-01-13 21:16:39 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-palette",
|
|
|
|
GTK_CSS_PROPERTY_ICON_PALETTE,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED | GTK_STYLE_PROPERTY_INHERIT,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_ICON_REDRAW_SYMBOLIC,
|
2016-01-13 21:16:39 +00:00
|
|
|
icon_palette_parse,
|
|
|
|
gtk_css_palette_value_new_default ());
|
|
|
|
|
2015-12-02 02:54:41 +00:00
|
|
|
|
|
|
|
/* properties that aren't referenced when computing values
|
|
|
|
* start here */
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("background-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2020-01-10 12:02:33 +00:00
|
|
|
gtk_css_color_value_new_transparent ());
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("font-family",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_FAMILY,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_SIZE,
|
2012-01-02 09:21:57 +00:00
|
|
|
font_family_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_string_value_new ("Sans"));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("font-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_SIZE,
|
2016-04-18 13:43:10 +00:00
|
|
|
font_style_parse,
|
2012-03-28 07:04:54 +00:00
|
|
|
_gtk_css_font_style_value_new (PANGO_STYLE_NORMAL));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("font-weight",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_WEIGHT,
|
2015-02-15 04:37:19 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_SIZE,
|
2016-04-18 13:43:10 +00:00
|
|
|
font_weight_parse,
|
2019-03-31 18:05:12 +00:00
|
|
|
_gtk_css_number_value_new (PANGO_WEIGHT_NORMAL, GTK_CSS_NUMBER));
|
2014-08-28 11:50:49 +00:00
|
|
|
gtk_css_style_property_register ("font-stretch",
|
|
|
|
GTK_CSS_PROPERTY_FONT_STRETCH,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_SIZE,
|
2016-04-18 13:43:10 +00:00
|
|
|
font_stretch_parse,
|
2014-08-28 11:50:49 +00:00
|
|
|
_gtk_css_font_stretch_value_new (PANGO_STRETCH_NORMAL));
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2015-07-04 17:56:40 +00:00
|
|
|
gtk_css_style_property_register ("letter-spacing",
|
|
|
|
GTK_CSS_PROPERTY_LETTER_SPACING,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2019-04-18 17:34:44 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
2015-07-04 17:56:40 +00:00
|
|
|
parse_letter_spacing,
|
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
|
|
|
|
2015-07-05 16:59:27 +00:00
|
|
|
gtk_css_style_property_register ("text-decoration-line",
|
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_LINE,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2015-07-05 16:59:27 +00:00
|
|
|
parse_text_decoration_line,
|
|
|
|
_gtk_css_text_decoration_line_value_new (GTK_CSS_TEXT_DECORATION_LINE_NONE));
|
2015-07-05 20:05:33 +00:00
|
|
|
gtk_css_style_property_register ("text-decoration-color",
|
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_COLOR,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2015-07-05 20:05:33 +00:00
|
|
|
color_parse,
|
|
|
|
_gtk_css_color_value_new_current_color ());
|
2015-07-06 18:03:54 +00:00
|
|
|
gtk_css_style_property_register ("text-decoration-style",
|
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE,
|
2015-07-07 15:51:31 +00:00
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2015-07-06 18:03:54 +00:00
|
|
|
parse_text_decoration_style,
|
|
|
|
_gtk_css_text_decoration_style_value_new (GTK_CSS_TEXT_DECORATION_STYLE_SOLID));
|
2021-08-20 23:01:01 +00:00
|
|
|
gtk_css_style_property_register ("text-transform",
|
|
|
|
GTK_CSS_PROPERTY_TEXT_TRANSFORM,
|
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
|
|
|
parse_text_transform,
|
|
|
|
_gtk_css_text_transform_value_new (GTK_CSS_TEXT_TRANSFORM_NONE));
|
2017-09-18 01:27:59 +00:00
|
|
|
gtk_css_style_property_register ("font-kerning",
|
|
|
|
GTK_CSS_PROPERTY_FONT_KERNING,
|
|
|
|
0,
|
2019-04-18 18:08:10 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
2017-09-18 01:27:59 +00:00
|
|
|
parse_font_kerning,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_kerning_value_new (GTK_CSS_FONT_KERNING_AUTO));
|
2017-09-18 03:52:04 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-ligatures",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_LIGATURES,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 03:52:04 +00:00
|
|
|
parse_font_variant_ligatures,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_ligature_value_new (GTK_CSS_FONT_VARIANT_LIGATURE_NORMAL));
|
2017-09-18 04:01:39 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-position",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_POSITION,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 04:01:39 +00:00
|
|
|
parse_font_variant_position,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_position_value_new (GTK_CSS_FONT_VARIANT_POSITION_NORMAL));
|
2017-09-18 04:12:12 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-caps",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_CAPS,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 04:12:12 +00:00
|
|
|
parse_font_variant_caps,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_caps_value_new (GTK_CSS_FONT_VARIANT_CAPS_NORMAL));
|
2017-09-18 11:34:46 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-numeric",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_NUMERIC,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 11:34:46 +00:00
|
|
|
parse_font_variant_numeric,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_numeric_value_new (GTK_CSS_FONT_VARIANT_NUMERIC_NORMAL));
|
2017-09-18 22:10:08 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-alternates",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_ALTERNATES,
|
2017-09-18 14:01:05 +00:00
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 22:10:08 +00:00
|
|
|
parse_font_variant_alternates,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_alternate_value_new (GTK_CSS_FONT_VARIANT_ALTERNATE_NORMAL));
|
2017-09-18 16:42:42 +00:00
|
|
|
gtk_css_style_property_register ("font-variant-east-asian",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_EAST_ASIAN,
|
|
|
|
0,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS,
|
2017-09-18 16:42:42 +00:00
|
|
|
parse_font_variant_east_asian,
|
2017-09-18 22:38:16 +00:00
|
|
|
_gtk_css_font_variant_east_asian_value_new (GTK_CSS_FONT_VARIANT_EAST_ASIAN_NORMAL));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("text-shadow",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_TEXT_SHADOW,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2018-04-09 18:19:17 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_CONTENT,
|
2012-03-27 05:15:23 +00:00
|
|
|
shadow_value_parse,
|
2020-01-14 13:34:15 +00:00
|
|
|
gtk_css_shadow_value_new_none ());
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("box-shadow",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BOX_SHADOW,
|
2014-05-23 13:52:16 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2018-07-15 15:51:47 +00:00
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2014-06-09 23:04:55 +00:00
|
|
|
box_shadow_value_parse,
|
2020-01-14 13:34:15 +00:00
|
|
|
gtk_css_shadow_value_new_none ());
|
2012-01-02 10:27:54 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("margin-top",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_MARGIN_TOP,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-17 15:41:14 +00:00
|
|
|
parse_margin,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("margin-left",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_MARGIN_LEFT,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-17 15:41:14 +00:00
|
|
|
parse_margin,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("margin-bottom",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_MARGIN_BOTTOM,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-17 15:41:14 +00:00
|
|
|
parse_margin,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("margin-right",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_MARGIN_RIGHT,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-17 15:41:14 +00:00
|
|
|
parse_margin,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("padding-top",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_PADDING_TOP,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-24 16:49:29 +00:00
|
|
|
parse_padding,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("padding-left",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_PADDING_LEFT,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-24 16:49:29 +00:00
|
|
|
parse_padding,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("padding-bottom",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_PADDING_BOTTOM,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-24 16:49:29 +00:00
|
|
|
parse_padding,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("padding-right",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_PADDING_RIGHT,
|
2012-04-02 07:16:08 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
2012-01-24 16:49:29 +00:00
|
|
|
parse_padding,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-07-16 11:42:18 +00:00
|
|
|
/* IMPORTANT: the border-width properties must come after border-style properties,
|
|
|
|
* they depend on them for their value computation.
|
2012-01-06 21:25:05 +00:00
|
|
|
*/
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-top-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_border_style,
|
2012-03-28 06:19:53 +00:00
|
|
|
_gtk_css_border_style_value_new (GTK_BORDER_STYLE_NONE));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-top-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_WIDTH,
|
2012-11-30 19:41:58 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_BORDER | GTK_CSS_AFFECTS_SIZE,
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-left-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_border_style,
|
2012-03-28 06:19:53 +00:00
|
|
|
_gtk_css_border_style_value_new (GTK_BORDER_STYLE_NONE));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-left-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH,
|
2012-11-30 19:41:58 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_BORDER | GTK_CSS_AFFECTS_SIZE,
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-bottom-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_border_style,
|
2012-03-28 06:19:53 +00:00
|
|
|
_gtk_css_border_style_value_new (GTK_BORDER_STYLE_NONE));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-bottom-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH,
|
2012-11-30 19:41:58 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_BORDER | GTK_CSS_AFFECTS_SIZE,
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-right-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_border_style,
|
2012-03-28 06:19:53 +00:00
|
|
|
_gtk_css_border_style_value_new (GTK_BORDER_STYLE_NONE));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-right-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH,
|
2012-11-30 19:41:58 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_CSS_AFFECTS_BORDER | GTK_CSS_AFFECTS_SIZE,
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-top-left-radius",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
|
2012-01-02 09:21:57 +00:00
|
|
|
border_corner_radius_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-top-right-radius",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
|
2012-01-02 09:21:57 +00:00
|
|
|
border_corner_radius_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-bottom-right-radius",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
|
2012-01-02 09:21:57 +00:00
|
|
|
border_corner_radius_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-bottom-left-radius",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND | GTK_CSS_AFFECTS_BORDER,
|
2012-01-02 09:21:57 +00:00
|
|
|
border_corner_radius_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("outline-style",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_OUTLINE_STYLE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
2018-07-15 15:51:47 +00:00
|
|
|
GTK_CSS_AFFECTS_OUTLINE,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_border_style,
|
2012-03-28 06:19:53 +00:00
|
|
|
_gtk_css_border_style_value_new (GTK_BORDER_STYLE_NONE));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("outline-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_OUTLINE_WIDTH,
|
2012-11-30 19:41:58 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2018-07-15 15:51:47 +00:00
|
|
|
GTK_CSS_AFFECTS_OUTLINE,
|
2012-01-15 01:53:39 +00:00
|
|
|
parse_border_width,
|
2012-03-27 22:04:29 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("outline-offset",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_OUTLINE_OFFSET,
|
2016-02-21 00:02:15 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2018-07-15 15:51:47 +00:00
|
|
|
GTK_CSS_AFFECTS_OUTLINE,
|
2012-03-27 07:05:47 +00:00
|
|
|
outline_parse,
|
2012-04-03 14:57:44 +00:00
|
|
|
_gtk_css_number_value_new (0.0, GTK_CSS_PX));
|
2012-01-08 01:10:35 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("background-clip",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_CLIP,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_css_area,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_area_value_new (GTK_CSS_AREA_BORDER_BOX));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("background-origin",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_ORIGIN,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-03-27 04:29:37 +00:00
|
|
|
parse_css_area,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_area_value_new (GTK_CSS_AREA_PADDING_BOX));
|
2012-01-17 14:11:48 +00:00
|
|
|
gtk_css_style_property_register ("background-size",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_SIZE,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-01-17 14:11:48 +00:00
|
|
|
background_size_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_bg_size_value_new (NULL, NULL));
|
2012-03-16 21:13:39 +00:00
|
|
|
gtk_css_style_property_register ("background-position",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_POSITION,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-03-16 21:13:39 +00:00
|
|
|
background_position_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_position_value_new (_gtk_css_number_value_new (0, GTK_CSS_PERCENT),
|
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PERCENT)));
|
2012-01-02 10:27:54 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-top-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2012-11-08 16:22:56 +00:00
|
|
|
_gtk_css_color_value_new_current_color ());
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-right-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2012-11-08 16:22:56 +00:00
|
|
|
_gtk_css_color_value_new_current_color ());
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-bottom-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2012-11-08 16:22:56 +00:00
|
|
|
_gtk_css_color_value_new_current_color ());
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-left-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2012-11-08 16:22:56 +00:00
|
|
|
_gtk_css_color_value_new_current_color ());
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("outline-color",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_OUTLINE_COLOR,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_OUTLINE,
|
2012-03-27 03:11:58 +00:00
|
|
|
color_parse,
|
2012-11-08 16:22:56 +00:00
|
|
|
_gtk_css_color_value_new_current_color ());
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("background-repeat",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_REPEAT,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-01-05 01:48:32 +00:00
|
|
|
background_repeat_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_background_repeat_value_new (GTK_CSS_REPEAT_STYLE_REPEAT,
|
|
|
|
GTK_CSS_REPEAT_STYLE_REPEAT));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("background-image",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_IMAGE,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
2012-05-10 15:18:29 +00:00
|
|
|
background_image_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_image_value_new (NULL));
|
2012-01-02 09:21:57 +00:00
|
|
|
|
2016-07-01 12:54:23 +00:00
|
|
|
gtk_css_style_property_register ("background-blend-mode",
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_BLEND_MODE,
|
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND,
|
|
|
|
blend_mode_value_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_blend_mode_value_new (GSK_BLEND_MODE_DEFAULT));
|
2016-07-01 12:54:23 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-image-source",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2011-12-21 16:43:31 +00:00
|
|
|
css_image_value_parse,
|
2012-03-29 00:58:32 +00:00
|
|
|
_gtk_css_image_value_new (NULL));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-image-repeat",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 07:05:47 +00:00
|
|
|
border_image_repeat_parse,
|
2012-04-04 09:44:57 +00:00
|
|
|
_gtk_css_border_repeat_value_new (GTK_CSS_REPEAT_STYLE_STRETCH,
|
|
|
|
GTK_CSS_REPEAT_STYLE_STRETCH));
|
2012-01-02 10:27:54 +00:00
|
|
|
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-image-slice",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 07:05:47 +00:00
|
|
|
border_image_slice_parse,
|
2012-04-04 14:15:41 +00:00
|
|
|
_gtk_css_border_value_new (_gtk_css_number_value_new (100, GTK_CSS_PERCENT),
|
|
|
|
_gtk_css_number_value_new (100, GTK_CSS_PERCENT),
|
|
|
|
_gtk_css_number_value_new (100, GTK_CSS_PERCENT),
|
|
|
|
_gtk_css_number_value_new (100, GTK_CSS_PERCENT)));
|
2012-01-14 16:12:57 +00:00
|
|
|
gtk_css_style_property_register ("border-image-width",
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
GTK_CSS_AFFECTS_BORDER,
|
2012-03-27 07:05:47 +00:00
|
|
|
border_image_width_parse,
|
2012-04-04 15:42:45 +00:00
|
|
|
_gtk_css_border_value_new (_gtk_css_number_value_new (1, GTK_CSS_NUMBER),
|
|
|
|
_gtk_css_number_value_new (1, GTK_CSS_NUMBER),
|
|
|
|
_gtk_css_number_value_new (1, GTK_CSS_NUMBER),
|
|
|
|
_gtk_css_number_value_new (1, GTK_CSS_NUMBER)));
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2015-01-19 16:09:42 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-source",
|
|
|
|
GTK_CSS_PROPERTY_ICON_SOURCE,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_ICON_TEXTURE,
|
2020-01-10 17:56:47 +00:00
|
|
|
css_image_value_parse,
|
|
|
|
_gtk_css_image_value_new (NULL));
|
2017-01-20 00:50:50 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-size",
|
|
|
|
GTK_CSS_PROPERTY_ICON_SIZE,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_SIZE | GTK_CSS_AFFECTS_ICON_SIZE,
|
2017-01-20 00:50:50 +00:00
|
|
|
icon_size_parse,
|
|
|
|
_gtk_css_number_value_new (16, GTK_CSS_PX));
|
2015-11-21 01:25:33 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-shadow",
|
2015-01-19 16:09:42 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SHADOW,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_ICON_REDRAW,
|
2015-01-19 16:09:42 +00:00
|
|
|
shadow_value_parse,
|
2020-01-14 13:34:15 +00:00
|
|
|
gtk_css_shadow_value_new_none ());
|
2015-01-19 16:09:42 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-style",
|
|
|
|
GTK_CSS_PROPERTY_ICON_STYLE,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT,
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_ICON_TEXTURE,
|
2015-01-19 16:09:42 +00:00
|
|
|
icon_style_parse,
|
|
|
|
_gtk_css_icon_style_value_new (GTK_CSS_ICON_STYLE_REQUESTED));
|
|
|
|
gtk_css_style_property_register ("-gtk-icon-transform",
|
|
|
|
GTK_CSS_PROPERTY_ICON_TRANSFORM,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2018-07-15 15:51:47 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT,
|
2015-01-19 16:09:42 +00:00
|
|
|
transform_value_parse,
|
|
|
|
_gtk_css_transform_value_new_none ());
|
2016-12-31 00:15:52 +00:00
|
|
|
gtk_css_style_property_register ("-gtk-icon-filter",
|
|
|
|
GTK_CSS_PROPERTY_ICON_FILTER,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2017-01-01 18:50:25 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT,
|
2016-12-31 00:15:52 +00:00
|
|
|
filter_value_parse,
|
|
|
|
gtk_css_filter_value_new_none ());
|
2016-12-10 02:26:24 +00:00
|
|
|
gtk_css_style_property_register ("border-spacing",
|
|
|
|
GTK_CSS_PROPERTY_BORDER_SPACING,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
|
|
|
border_spacing_value_parse,
|
|
|
|
_gtk_css_position_value_new (_gtk_css_number_value_new (0, GTK_CSS_PX),
|
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX)));
|
|
|
|
|
2019-01-19 07:53:08 +00:00
|
|
|
gtk_css_style_property_register ("transform",
|
|
|
|
GTK_CSS_PROPERTY_TRANSFORM,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2019-01-23 16:42:03 +00:00
|
|
|
GTK_CSS_AFFECTS_TRANSFORM,
|
2019-01-19 07:53:08 +00:00
|
|
|
transform_value_parse,
|
|
|
|
_gtk_css_transform_value_new_none ());
|
2021-01-25 03:46:01 +00:00
|
|
|
gtk_css_style_property_register ("transform-origin",
|
|
|
|
GTK_CSS_PROPERTY_TRANSFORM_ORIGIN,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_TRANSFORM,
|
|
|
|
transform_origin_parse,
|
|
|
|
_gtk_css_position_value_new (_gtk_css_number_value_new (50, GTK_CSS_PERCENT),
|
|
|
|
_gtk_css_number_value_new (50, GTK_CSS_PERCENT)));
|
2012-12-13 02:10:25 +00:00
|
|
|
gtk_css_style_property_register ("min-width",
|
|
|
|
GTK_CSS_PROPERTY_MIN_WIDTH,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
|
|
|
minmax_parse,
|
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
|
|
|
gtk_css_style_property_register ("min-height",
|
|
|
|
GTK_CSS_PROPERTY_MIN_HEIGHT,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_SIZE,
|
|
|
|
minmax_parse,
|
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_PX));
|
|
|
|
|
2012-04-01 04:22:20 +00:00
|
|
|
gtk_css_style_property_register ("transition-property",
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-01 04:22:20 +00:00
|
|
|
transition_property_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_ident_value_new ("all"));
|
2012-04-01 04:22:20 +00:00
|
|
|
gtk_css_style_property_register ("transition-duration",
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_DURATION,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-01 04:22:20 +00:00
|
|
|
transition_time_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_S));
|
2012-04-01 04:22:20 +00:00
|
|
|
gtk_css_style_property_register ("transition-timing-function",
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-01 04:22:20 +00:00
|
|
|
transition_timing_function_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_ease_value_new_cubic_bezier (0.25, 0.1, 0.25, 1.0));
|
2012-04-01 04:22:20 +00:00
|
|
|
gtk_css_style_property_register ("transition-delay",
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_DELAY,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-01 04:22:20 +00:00
|
|
|
transition_time_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_S));
|
2012-04-01 04:22:20 +00:00
|
|
|
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-name",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_NAME,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
transition_property_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_ident_value_new ("none"));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-duration",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DURATION,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
transition_time_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_S));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-timing-function",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_TIMING_FUNCTION,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
transition_timing_function_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_ease_value_new_cubic_bezier (0.25, 0.1, 0.25, 1.0));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-iteration-count",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_ITERATION_COUNT,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
iteration_count_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (1, GTK_CSS_NUMBER));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-direction",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DIRECTION,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
parse_css_direction,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_direction_value_new (GTK_CSS_DIRECTION_NORMAL));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-play-state",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_PLAY_STATE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
parse_css_play_state,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_play_state_value_new (GTK_CSS_PLAY_STATE_RUNNING));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-delay",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DELAY,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
transition_time_parse,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_number_value_new (0, GTK_CSS_S));
|
2012-04-19 12:50:38 +00:00
|
|
|
gtk_css_style_property_register ("animation-fill-mode",
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_FILL_MODE,
|
2014-10-01 04:49:01 +00:00
|
|
|
0,
|
|
|
|
0,
|
2012-04-19 12:50:38 +00:00
|
|
|
parse_css_fill_mode,
|
2020-01-12 00:05:39 +00:00
|
|
|
_gtk_css_fill_mode_value_new (GTK_CSS_FILL_NONE));
|
2014-10-01 04:49:01 +00:00
|
|
|
|
2013-02-06 13:29:22 +00:00
|
|
|
gtk_css_style_property_register ("opacity",
|
|
|
|
GTK_CSS_PROPERTY_OPACITY,
|
2014-10-01 04:49:01 +00:00
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2017-01-01 18:50:25 +00:00
|
|
|
GTK_CSS_AFFECTS_POSTEFFECT,
|
2013-02-06 13:29:22 +00:00
|
|
|
opacity_parse,
|
|
|
|
_gtk_css_number_value_new (1, GTK_CSS_NUMBER));
|
2016-12-31 01:48:25 +00:00
|
|
|
gtk_css_style_property_register ("filter",
|
|
|
|
GTK_CSS_PROPERTY_FILTER,
|
|
|
|
GTK_STYLE_PROPERTY_ANIMATED,
|
2017-01-01 18:50:25 +00:00
|
|
|
GTK_CSS_AFFECTS_POSTEFFECT,
|
2016-12-31 01:48:25 +00:00
|
|
|
filter_value_parse,
|
|
|
|
gtk_css_filter_value_new_none ());
|
2012-04-19 12:50:38 +00:00
|
|
|
|
2016-01-07 03:05:29 +00:00
|
|
|
gtk_css_style_property_register ("caret-color",
|
|
|
|
GTK_CSS_PROPERTY_CARET_COLOR,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT,
|
2016-01-07 03:05:29 +00:00
|
|
|
color_parse,
|
|
|
|
_gtk_css_color_value_new_current_color ());
|
|
|
|
gtk_css_style_property_register ("-gtk-secondary-caret-color",
|
|
|
|
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
2017-10-12 11:18:07 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT,
|
2016-01-07 03:05:29 +00:00
|
|
|
color_parse,
|
|
|
|
_gtk_css_color_value_new_current_color ());
|
2017-12-20 15:29:33 +00:00
|
|
|
gtk_css_style_property_register ("font-feature-settings",
|
|
|
|
GTK_CSS_PROPERTY_FONT_FEATURE_SETTINGS,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
|
|
|
parse_font_feature_settings,
|
|
|
|
gtk_css_font_features_value_new_default ());
|
2017-12-20 05:45:30 +00:00
|
|
|
gtk_css_style_property_register ("font-variation-settings",
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIATION_SETTINGS,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
|
|
|
parse_font_variation_settings,
|
|
|
|
gtk_css_font_variations_value_new_default ());
|
2021-08-06 18:19:34 +00:00
|
|
|
gtk_css_style_property_register ("line-height",
|
|
|
|
GTK_CSS_PROPERTY_LINE_HEIGHT,
|
|
|
|
GTK_STYLE_PROPERTY_INHERIT | GTK_STYLE_PROPERTY_ANIMATED,
|
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS | GTK_CSS_AFFECTS_TEXT_SIZE,
|
|
|
|
parse_line_height,
|
|
|
|
_gtk_css_value_ref (gtk_css_line_height_value_get_default ()));
|
2016-01-07 03:05:29 +00:00
|
|
|
}
|