2011-05-26 01:50:53 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 2011 Benjamin Otte <otte@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/>.
|
2011-05-26 01:50:53 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GTK_CSS_TYPES_PRIVATE_H__
|
|
|
|
#define __GTK_CSS_TYPES_PRIVATE_H__
|
|
|
|
|
|
|
|
#include <glib-object.h>
|
2016-12-15 03:20:35 +00:00
|
|
|
#include <gsk/gsk.h>
|
2011-05-26 01:50:53 +00:00
|
|
|
|
2020-01-27 02:44:05 +00:00
|
|
|
#include <gtk/gtkenums.h>
|
|
|
|
|
2011-05-26 01:50:53 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2015-02-09 08:41:48 +00:00
|
|
|
typedef struct _GtkCssNode GtkCssNode;
|
2015-02-09 10:24:29 +00:00
|
|
|
typedef struct _GtkCssNodeDeclaration GtkCssNodeDeclaration;
|
2014-10-22 21:41:50 +00:00
|
|
|
typedef struct _GtkCssStyle GtkCssStyle;
|
2020-01-16 18:56:07 +00:00
|
|
|
typedef struct _GtkCssStaticStyle GtkCssStaticStyle;
|
2012-09-27 15:04:29 +00:00
|
|
|
|
2015-07-30 06:52:10 +00:00
|
|
|
#define GTK_CSS_CHANGE_CLASS (1ULL << 0)
|
|
|
|
#define GTK_CSS_CHANGE_NAME (1ULL << 1)
|
2015-08-27 12:06:13 +00:00
|
|
|
#define GTK_CSS_CHANGE_ID (1ULL << 2)
|
|
|
|
#define GTK_CSS_CHANGE_FIRST_CHILD (1ULL << 3)
|
|
|
|
#define GTK_CSS_CHANGE_LAST_CHILD (1ULL << 4)
|
|
|
|
#define GTK_CSS_CHANGE_NTH_CHILD (1ULL << 5)
|
|
|
|
#define GTK_CSS_CHANGE_NTH_LAST_CHILD (1ULL << 6)
|
|
|
|
#define GTK_CSS_CHANGE_STATE (1ULL << 7)
|
2020-01-15 20:10:06 +00:00
|
|
|
#define GTK_CSS_CHANGE_HOVER (1ULL << 8)
|
2020-01-16 00:19:38 +00:00
|
|
|
#define GTK_CSS_CHANGE_DISABLED (1ULL << 9)
|
2020-01-16 01:05:44 +00:00
|
|
|
#define GTK_CSS_CHANGE_BACKDROP (1ULL << 10)
|
2020-01-16 01:27:12 +00:00
|
|
|
#define GTK_CSS_CHANGE_SELECTED (1ULL << 11)
|
|
|
|
|
2020-02-08 19:39:08 +00:00
|
|
|
#define GTK_CSS_CHANGE_SIBLING_SHIFT 12
|
2020-01-16 01:27:12 +00:00
|
|
|
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_CLASS (1ULL << 12)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_NAME (1ULL << 13)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_ID (1ULL << 14)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_FIRST_CHILD (1ULL << 15)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_LAST_CHILD (1ULL << 16)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_NTH_CHILD (1ULL << 17)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD (1ULL << 18)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_STATE (1ULL << 19)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_HOVER (1ULL << 20)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_DISABLED (1ULL << 21)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_BACKDROP (1ULL << 22)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_SELECTED (1ULL << 23)
|
2020-01-15 20:10:06 +00:00
|
|
|
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SHIFT (GTK_CSS_CHANGE_SIBLING_SHIFT + GTK_CSS_CHANGE_SIBLING_SHIFT)
|
|
|
|
|
2020-01-16 01:27:12 +00:00
|
|
|
#define GTK_CSS_CHANGE_PARENT_CLASS (1ULL << 24)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_NAME (1ULL << 25)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_ID (1ULL << 26)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_FIRST_CHILD (1ULL << 27)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_LAST_CHILD (1ULL << 28)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_NTH_CHILD (1ULL << 29)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_NTH_LAST_CHILD (1ULL << 30)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_STATE (1ULL << 31)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_HOVER (1ULL << 32)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_DISABLED (1ULL << 33)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_BACKDROP (1ULL << 34)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SELECTED (1ULL << 35)
|
2020-01-15 20:10:06 +00:00
|
|
|
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_SHIFT (GTK_CSS_CHANGE_PARENT_SHIFT + GTK_CSS_CHANGE_SIBLING_SHIFT)
|
|
|
|
|
2020-01-16 01:27:12 +00:00
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_CLASS (1ULL << 36)
|
2020-01-17 02:13:09 +00:00
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_NAME (1ULL << 37)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_ID (1ULL << 38)
|
2020-01-16 01:27:12 +00:00
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_FIRST_CHILD (1ULL << 39)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_LAST_CHILD (1ULL << 40)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_NTH_CHILD (1ULL << 41)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_NTH_LAST_CHILD (1ULL << 42)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_STATE (1ULL << 43)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_HOVER (1ULL << 44)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_DISABLED (1ULL << 45)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_BACKDROP (1ULL << 46)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_SIBLING_SELECTED (1ULL << 47)
|
2012-12-10 10:27:43 +00:00
|
|
|
|
2015-07-30 06:52:10 +00:00
|
|
|
/* add more */
|
2020-01-16 01:27:12 +00:00
|
|
|
#define GTK_CSS_CHANGE_SOURCE (1ULL << 48)
|
|
|
|
#define GTK_CSS_CHANGE_PARENT_STYLE (1ULL << 49)
|
|
|
|
#define GTK_CSS_CHANGE_TIMESTAMP (1ULL << 50)
|
|
|
|
#define GTK_CSS_CHANGE_ANIMATIONS (1ULL << 51)
|
2012-03-17 18:23:53 +00:00
|
|
|
|
2020-01-17 16:01:55 +00:00
|
|
|
#define GTK_CSS_CHANGE_RESERVED_BIT (1ULL << 62)
|
2015-07-30 06:52:10 +00:00
|
|
|
|
|
|
|
typedef guint64 GtkCssChange;
|
2015-07-05 20:45:34 +00:00
|
|
|
|
2020-01-15 20:10:06 +00:00
|
|
|
#define GTK_CSS_CHANGE_POSITION (GTK_CSS_CHANGE_FIRST_CHILD | \
|
|
|
|
GTK_CSS_CHANGE_LAST_CHILD | \
|
|
|
|
GTK_CSS_CHANGE_NTH_CHILD | \
|
|
|
|
GTK_CSS_CHANGE_NTH_LAST_CHILD)
|
|
|
|
#define GTK_CSS_CHANGE_SIBLING_POSITION (GTK_CSS_CHANGE_POSITION << GTK_CSS_CHANGE_SIBLING_SHIFT)
|
|
|
|
|
|
|
|
#define GTK_CSS_CHANGE_ANY_SELF (GTK_CSS_CHANGE_CLASS | \
|
|
|
|
GTK_CSS_CHANGE_NAME | \
|
|
|
|
GTK_CSS_CHANGE_ID | \
|
|
|
|
GTK_CSS_CHANGE_POSITION | \
|
|
|
|
GTK_CSS_CHANGE_STATE | \
|
2020-01-16 00:19:38 +00:00
|
|
|
GTK_CSS_CHANGE_DISABLED | \
|
2020-01-16 01:05:44 +00:00
|
|
|
GTK_CSS_CHANGE_BACKDROP | \
|
2020-01-16 01:27:12 +00:00
|
|
|
GTK_CSS_CHANGE_SELECTED | \
|
2020-01-15 20:10:06 +00:00
|
|
|
GTK_CSS_CHANGE_HOVER)
|
|
|
|
#define GTK_CSS_CHANGE_ANY_SIBLING (GTK_CSS_CHANGE_ANY_SELF << GTK_CSS_CHANGE_SIBLING_SHIFT)
|
|
|
|
#define GTK_CSS_CHANGE_ANY_PARENT (GTK_CSS_CHANGE_ANY_SELF << GTK_CSS_CHANGE_PARENT_SHIFT)
|
|
|
|
#define GTK_CSS_CHANGE_ANY_PARENT_SIBLING (GTK_CSS_CHANGE_ANY_SELF << GTK_CSS_CHANGE_PARENT_SIBLING_SHIFT)
|
|
|
|
|
|
|
|
#define GTK_CSS_CHANGE_ANY (GTK_CSS_CHANGE_ANY_SELF | \
|
|
|
|
GTK_CSS_CHANGE_ANY_SIBLING | \
|
|
|
|
GTK_CSS_CHANGE_ANY_PARENT | \
|
|
|
|
GTK_CSS_CHANGE_ANY_PARENT_SIBLING | \
|
|
|
|
GTK_CSS_CHANGE_SOURCE | \
|
|
|
|
GTK_CSS_CHANGE_PARENT_STYLE | \
|
|
|
|
GTK_CSS_CHANGE_TIMESTAMP | \
|
|
|
|
GTK_CSS_CHANGE_ANIMATIONS)
|
2012-03-17 18:23:53 +00:00
|
|
|
|
2014-10-01 04:49:01 +00:00
|
|
|
/*
|
|
|
|
* GtkCssAffects:
|
2017-01-01 18:50:25 +00:00
|
|
|
* @GTK_CSS_AFFECTS_CONTENT: The content rendering is affected.
|
2014-10-01 04:49:01 +00:00
|
|
|
* This does not include things that affect the font. For those,
|
2019-04-18 18:04:58 +00:00
|
|
|
* see @GTK_CSS_AFFECTS_TEXT.
|
2014-10-01 04:49:01 +00:00
|
|
|
* @GTK_CSS_AFFECTS_BACKGROUND: The background rendering is affected.
|
|
|
|
* @GTK_CSS_AFFECTS_BORDER: The border styling is affected.
|
2015-07-04 17:56:40 +00:00
|
|
|
* @GTK_CSS_AFFECTS_TEXT_ATTRS: Text attributes are affected.
|
2017-12-20 13:31:22 +00:00
|
|
|
* @GTK_CSS_AFFECTS_TEXT_SIZE: Text size is affected.
|
2018-04-09 18:19:17 +00:00
|
|
|
* @GTK_CSS_AFFECTS_TEXT_CONTENT: Text rendering is affected, but size or
|
|
|
|
* attributes are not.
|
2020-01-25 00:57:45 +00:00
|
|
|
* @GTK_CSS_AFFECTS_ICON_SIZE: Icon size is affected.
|
|
|
|
* @GTK_CSS_AFFECTS_ICON_TEXTURE: The icon texture has changed and needs to be
|
|
|
|
* reloaded.
|
|
|
|
* @GTK_CSS_AFFECTS_ICON_REDRAW: Icons need to be redrawn (both symbolic and
|
|
|
|
* non-symbolic).
|
|
|
|
* @GTK_CSS_AFFECTS_ICON_REDRAW_SYMBOLIC: Symbolic icons need to be redrawn.
|
2019-04-18 18:04:58 +00:00
|
|
|
* @GTK_CSS_AFFECTS_OUTLINE: The outline styling is affected.
|
2014-10-01 04:49:01 +00:00
|
|
|
* @GTK_CSS_AFFECTS_SIZE: Changes in this property may have an effect
|
|
|
|
* on the allocated size of the element. Changes in these properties
|
|
|
|
* should cause a recomputation of the element's allocated size.
|
2017-01-01 18:50:25 +00:00
|
|
|
* @GTK_CSS_AFFECTS_POSTEFFECT: An effect is applied after drawing that changes
|
2017-12-20 13:31:22 +00:00
|
|
|
* @GTK_CSS_AFFECTS_TEXT: Affects anything related to text rendering.
|
|
|
|
* @GTK_CSS_AFFECTS_REDRAW: Affects anything that requires redraw.
|
2019-01-23 16:42:03 +00:00
|
|
|
* @GTK_CSS_AFFECTS_TRANSFORM: Affects the element transformation.
|
2014-10-01 04:49:01 +00:00
|
|
|
*
|
|
|
|
* The generic effects that a CSS property can have. If a value is
|
|
|
|
* set, then the property will have an influence on that feature.
|
|
|
|
*
|
|
|
|
* Note that multiple values can be set.
|
|
|
|
*/
|
2015-01-27 03:32:09 +00:00
|
|
|
typedef enum {
|
2020-01-25 00:57:45 +00:00
|
|
|
GTK_CSS_AFFECTS_CONTENT = (1 << 0),
|
|
|
|
GTK_CSS_AFFECTS_BACKGROUND = (1 << 1),
|
|
|
|
GTK_CSS_AFFECTS_BORDER = (1 << 2),
|
|
|
|
GTK_CSS_AFFECTS_TEXT_ATTRS = (1 << 3),
|
|
|
|
GTK_CSS_AFFECTS_TEXT_SIZE = (1 << 4),
|
|
|
|
GTK_CSS_AFFECTS_TEXT_CONTENT = (1 << 5),
|
|
|
|
GTK_CSS_AFFECTS_ICON_SIZE = (1 << 6),
|
|
|
|
GTK_CSS_AFFECTS_ICON_TEXTURE = (1 << 7),
|
|
|
|
GTK_CSS_AFFECTS_ICON_REDRAW = (1 << 8),
|
|
|
|
GTK_CSS_AFFECTS_ICON_REDRAW_SYMBOLIC = (1 << 9),
|
|
|
|
GTK_CSS_AFFECTS_OUTLINE = (1 << 10),
|
|
|
|
GTK_CSS_AFFECTS_SIZE = (1 << 11),
|
|
|
|
GTK_CSS_AFFECTS_POSTEFFECT = (1 << 12),
|
|
|
|
GTK_CSS_AFFECTS_TRANSFORM = (1 << 13),
|
2014-10-01 04:49:01 +00:00
|
|
|
} GtkCssAffects;
|
|
|
|
|
2017-01-01 18:50:25 +00:00
|
|
|
#define GTK_CSS_AFFECTS_REDRAW (GTK_CSS_AFFECTS_CONTENT | \
|
2015-08-02 19:37:03 +00:00
|
|
|
GTK_CSS_AFFECTS_BACKGROUND | \
|
|
|
|
GTK_CSS_AFFECTS_BORDER | \
|
2017-01-01 18:50:25 +00:00
|
|
|
GTK_CSS_AFFECTS_OUTLINE | \
|
|
|
|
GTK_CSS_AFFECTS_POSTEFFECT)
|
2015-08-02 19:37:03 +00:00
|
|
|
|
2017-10-12 11:18:07 +00:00
|
|
|
#define GTK_CSS_AFFECTS_TEXT (GTK_CSS_AFFECTS_TEXT_SIZE | \
|
2018-04-09 18:19:17 +00:00
|
|
|
GTK_CSS_AFFECTS_TEXT_CONTENT)
|
2017-10-12 11:18:07 +00:00
|
|
|
|
|
|
|
|
2012-03-31 03:28:58 +00:00
|
|
|
enum { /*< skip >*/
|
|
|
|
GTK_CSS_PROPERTY_COLOR,
|
2015-02-05 17:52:59 +00:00
|
|
|
GTK_CSS_PROPERTY_DPI,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_SIZE,
|
2015-01-26 23:25:05 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_THEME,
|
2016-01-13 21:16:39 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_PALETTE,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_FONT_FAMILY,
|
|
|
|
GTK_CSS_PROPERTY_FONT_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_FONT_WEIGHT,
|
2014-08-28 11:50:49 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_STRETCH,
|
2015-07-04 17:56:40 +00:00
|
|
|
GTK_CSS_PROPERTY_LETTER_SPACING,
|
2015-07-05 16:59:27 +00:00
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_LINE,
|
2015-07-05 20:05:33 +00:00
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_COLOR,
|
2015-07-06 18:03:54 +00:00
|
|
|
GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE,
|
2017-09-18 01:27:59 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_KERNING,
|
2017-09-18 03:52:04 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_LIGATURES,
|
2017-09-18 04:01:39 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_POSITION,
|
2017-09-18 04:12:12 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_CAPS,
|
2017-09-18 11:34:46 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_NUMERIC,
|
2017-09-18 22:10:08 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_ALTERNATES,
|
2017-09-18 16:42:42 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT_EAST_ASIAN,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_TEXT_SHADOW,
|
|
|
|
GTK_CSS_PROPERTY_BOX_SHADOW,
|
|
|
|
GTK_CSS_PROPERTY_MARGIN_TOP,
|
|
|
|
GTK_CSS_PROPERTY_MARGIN_LEFT,
|
|
|
|
GTK_CSS_PROPERTY_MARGIN_BOTTOM,
|
|
|
|
GTK_CSS_PROPERTY_MARGIN_RIGHT,
|
|
|
|
GTK_CSS_PROPERTY_PADDING_TOP,
|
|
|
|
GTK_CSS_PROPERTY_PADDING_LEFT,
|
|
|
|
GTK_CSS_PROPERTY_PADDING_BOTTOM,
|
|
|
|
GTK_CSS_PROPERTY_PADDING_RIGHT,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_LEFT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_RIGHT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_RIGHT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_LEFT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_OFFSET,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_CLIP,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_ORIGIN,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_SIZE,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_POSITION,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_TOP_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_RIGHT_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_BOTTOM_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_LEFT_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_REPEAT,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_IMAGE,
|
2016-07-01 12:54:23 +00:00
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_BLEND_MODE,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH,
|
2015-01-19 16:09:42 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SOURCE,
|
2017-01-20 00:50:50 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SIZE,
|
2015-01-19 16:09:42 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SHADOW,
|
|
|
|
GTK_CSS_PROPERTY_ICON_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_ICON_TRANSFORM,
|
2016-12-31 00:15:52 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_FILTER,
|
2016-12-10 02:26:24 +00:00
|
|
|
GTK_CSS_PROPERTY_BORDER_SPACING,
|
2019-01-19 07:53:08 +00:00
|
|
|
GTK_CSS_PROPERTY_TRANSFORM,
|
2012-12-13 02:10:25 +00:00
|
|
|
GTK_CSS_PROPERTY_MIN_WIDTH,
|
|
|
|
GTK_CSS_PROPERTY_MIN_HEIGHT,
|
2012-04-01 04:22:20 +00:00
|
|
|
GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_DURATION,
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
|
|
|
|
GTK_CSS_PROPERTY_TRANSITION_DELAY,
|
2012-04-19 12:50:05 +00:00
|
|
|
GTK_CSS_PROPERTY_ANIMATION_NAME,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DURATION,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_TIMING_FUNCTION,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_ITERATION_COUNT,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DIRECTION,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_PLAY_STATE,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_DELAY,
|
|
|
|
GTK_CSS_PROPERTY_ANIMATION_FILL_MODE,
|
2013-02-06 13:29:22 +00:00
|
|
|
GTK_CSS_PROPERTY_OPACITY,
|
2016-12-31 01:36:00 +00:00
|
|
|
GTK_CSS_PROPERTY_FILTER,
|
2016-01-07 03:05:29 +00:00
|
|
|
GTK_CSS_PROPERTY_CARET_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
|
2017-12-20 15:29:33 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_FEATURE_SETTINGS,
|
2017-12-20 05:45:30 +00:00
|
|
|
GTK_CSS_PROPERTY_FONT_VARIATION_SETTINGS,
|
2012-03-31 03:28:58 +00:00
|
|
|
/* add more */
|
|
|
|
GTK_CSS_PROPERTY_N_PROPERTIES
|
|
|
|
};
|
|
|
|
|
2012-03-30 00:19:39 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
2011-11-24 19:57:02 +00:00
|
|
|
GTK_CSS_AREA_BORDER_BOX,
|
|
|
|
GTK_CSS_AREA_PADDING_BOX,
|
|
|
|
GTK_CSS_AREA_CONTENT_BOX
|
|
|
|
} GtkCssArea;
|
|
|
|
|
2012-04-19 12:50:05 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_DIRECTION_NORMAL,
|
|
|
|
GTK_CSS_DIRECTION_REVERSE,
|
|
|
|
GTK_CSS_DIRECTION_ALTERNATE,
|
|
|
|
GTK_CSS_DIRECTION_ALTERNATE_REVERSE
|
|
|
|
} GtkCssDirection;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_PLAY_STATE_RUNNING,
|
|
|
|
GTK_CSS_PLAY_STATE_PAUSED
|
|
|
|
} GtkCssPlayState;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FILL_NONE,
|
|
|
|
GTK_CSS_FILL_FORWARDS,
|
|
|
|
GTK_CSS_FILL_BACKWARDS,
|
|
|
|
GTK_CSS_FILL_BOTH
|
|
|
|
} GtkCssFillMode;
|
|
|
|
|
2014-05-06 14:06:33 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_ICON_STYLE_REQUESTED,
|
|
|
|
GTK_CSS_ICON_STYLE_REGULAR,
|
|
|
|
GTK_CSS_ICON_STYLE_SYMBOLIC
|
|
|
|
} GtkCssIconStyle;
|
|
|
|
|
2012-12-01 13:00:24 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
2012-12-01 17:01:39 +00:00
|
|
|
/* relative font sizes */
|
|
|
|
GTK_CSS_FONT_SIZE_SMALLER,
|
|
|
|
GTK_CSS_FONT_SIZE_LARGER,
|
2012-12-01 13:00:24 +00:00
|
|
|
/* absolute font sizes */
|
|
|
|
GTK_CSS_FONT_SIZE_XX_SMALL,
|
|
|
|
GTK_CSS_FONT_SIZE_X_SMALL,
|
|
|
|
GTK_CSS_FONT_SIZE_SMALL,
|
|
|
|
GTK_CSS_FONT_SIZE_MEDIUM,
|
|
|
|
GTK_CSS_FONT_SIZE_LARGE,
|
|
|
|
GTK_CSS_FONT_SIZE_X_LARGE,
|
2012-12-01 17:01:39 +00:00
|
|
|
GTK_CSS_FONT_SIZE_XX_LARGE
|
2012-12-01 13:00:24 +00:00
|
|
|
} GtkCssFontSize;
|
|
|
|
|
2015-07-05 16:59:27 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_TEXT_DECORATION_LINE_NONE,
|
|
|
|
GTK_CSS_TEXT_DECORATION_LINE_UNDERLINE,
|
|
|
|
GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH
|
|
|
|
} GtkTextDecorationLine;
|
|
|
|
|
2015-07-06 18:03:54 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_TEXT_DECORATION_STYLE_SOLID,
|
|
|
|
GTK_CSS_TEXT_DECORATION_STYLE_DOUBLE,
|
|
|
|
GTK_CSS_TEXT_DECORATION_STYLE_WAVY
|
|
|
|
} GtkTextDecorationStyle;
|
|
|
|
|
2012-01-07 21:20:51 +00:00
|
|
|
/* for the order in arrays */
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_TOP,
|
|
|
|
GTK_CSS_RIGHT,
|
|
|
|
GTK_CSS_BOTTOM,
|
|
|
|
GTK_CSS_LEFT
|
|
|
|
} GtkCssSide;
|
|
|
|
|
2016-02-12 03:40:35 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_DIMENSION_PERCENTAGE,
|
|
|
|
GTK_CSS_DIMENSION_NUMBER,
|
|
|
|
GTK_CSS_DIMENSION_LENGTH,
|
|
|
|
GTK_CSS_DIMENSION_ANGLE,
|
|
|
|
GTK_CSS_DIMENSION_TIME
|
|
|
|
} GtkCssDimension;
|
|
|
|
|
2012-01-13 22:48:42 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
/* CSS term: <number> */
|
|
|
|
GTK_CSS_NUMBER,
|
|
|
|
/* CSS term: <percentage> */
|
|
|
|
GTK_CSS_PERCENT,
|
|
|
|
/* CSS term: <length> */
|
|
|
|
GTK_CSS_PX,
|
|
|
|
GTK_CSS_PT,
|
|
|
|
GTK_CSS_EM,
|
|
|
|
GTK_CSS_EX,
|
2016-02-04 18:37:44 +00:00
|
|
|
GTK_CSS_REM,
|
2012-01-13 22:48:42 +00:00
|
|
|
GTK_CSS_PC,
|
|
|
|
GTK_CSS_IN,
|
|
|
|
GTK_CSS_CM,
|
2012-01-15 16:51:58 +00:00
|
|
|
GTK_CSS_MM,
|
|
|
|
/* CSS term: <angle> */
|
|
|
|
GTK_CSS_RAD,
|
|
|
|
GTK_CSS_DEG,
|
|
|
|
GTK_CSS_GRAD,
|
2012-04-01 02:02:34 +00:00
|
|
|
GTK_CSS_TURN,
|
|
|
|
/* CSS term: <time> */
|
|
|
|
GTK_CSS_S,
|
|
|
|
GTK_CSS_MS,
|
2012-01-13 22:48:42 +00:00
|
|
|
} GtkCssUnit;
|
|
|
|
|
2017-09-18 22:38:16 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_KERNING_AUTO,
|
|
|
|
GTK_CSS_FONT_KERNING_NORMAL,
|
|
|
|
GTK_CSS_FONT_KERNING_NONE
|
|
|
|
} GtkCssFontKerning;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NORMAL = 1 << 0,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NONE = 1 << 1,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_COMMON_LIGATURES = 1 << 2,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NO_COMMON_LIGATURES = 1 << 3,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_DISCRETIONARY_LIGATURES = 1 << 4,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NO_DISCRETIONARY_LIGATURES = 1 << 5,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_HISTORICAL_LIGATURES = 1 << 6,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NO_HISTORICAL_LIGATURES = 1 << 7,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_CONTEXTUAL = 1 << 8,
|
|
|
|
GTK_CSS_FONT_VARIANT_LIGATURE_NO_CONTEXTUAL = 1 << 9
|
|
|
|
} GtkCssFontVariantLigature;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_POSITION_NORMAL,
|
|
|
|
GTK_CSS_FONT_VARIANT_POSITION_SUB,
|
|
|
|
GTK_CSS_FONT_VARIANT_POSITION_SUPER
|
|
|
|
} GtkCssFontVariantPosition;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_NORMAL = 1 << 0,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_LINING_NUMS = 1 << 1,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_OLDSTYLE_NUMS = 1 << 2,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_PROPORTIONAL_NUMS = 1 << 3,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_TABULAR_NUMS = 1 << 4,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_DIAGONAL_FRACTIONS = 1 << 5,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_STACKED_FRACTIONS = 1 << 6,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_ORDINAL = 1 << 7,
|
|
|
|
GTK_CSS_FONT_VARIANT_NUMERIC_SLASHED_ZERO = 1 << 8
|
|
|
|
} GtkCssFontVariantNumeric;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_NORMAL,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_SMALL_CAPS,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_ALL_SMALL_CAPS,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_PETITE_CAPS,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_ALL_PETITE_CAPS,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_UNICASE,
|
|
|
|
GTK_CSS_FONT_VARIANT_CAPS_TITLING_CAPS
|
|
|
|
} GtkCssFontVariantCaps;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_ALTERNATE_NORMAL,
|
|
|
|
GTK_CSS_FONT_VARIANT_ALTERNATE_HISTORICAL_FORMS
|
|
|
|
} GtkCssFontVariantAlternate;
|
|
|
|
|
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_NORMAL = 1 << 0,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_JIS78 = 1 << 1,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_JIS83 = 1 << 2,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_JIS90 = 1 << 3,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_JIS04 = 1 << 4,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_SIMPLIFIED = 1 << 5,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_TRADITIONAL = 1 << 6,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_FULL_WIDTH = 1 << 7,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_PROPORTIONAL = 1 << 8,
|
|
|
|
GTK_CSS_FONT_VARIANT_EAST_ASIAN_RUBY = 1 << 9
|
|
|
|
} GtkCssFontVariantEastAsian;
|
|
|
|
|
2012-08-24 23:59:13 +00:00
|
|
|
GtkCssChange _gtk_css_change_for_sibling (GtkCssChange match);
|
|
|
|
GtkCssChange _gtk_css_change_for_child (GtkCssChange match);
|
2012-03-17 18:23:53 +00:00
|
|
|
|
2016-02-12 03:40:35 +00:00
|
|
|
GtkCssDimension gtk_css_unit_get_dimension (GtkCssUnit unit);
|
|
|
|
|
2015-08-27 12:07:10 +00:00
|
|
|
char * gtk_css_change_to_string (GtkCssChange change);
|
|
|
|
void gtk_css_change_print (GtkCssChange change,
|
|
|
|
GString *string);
|
|
|
|
|
2020-01-27 02:44:05 +00:00
|
|
|
const char * gtk_css_pseudoclass_name (GtkStateFlags flags);
|
|
|
|
|
2020-01-24 16:56:53 +00:00
|
|
|
/* These hash functions are selected so they achieve 2 things:
|
|
|
|
* 1. collision free among each other
|
|
|
|
* Hashing the CSS selectors "button", ".button" and "#button" should give different results.
|
|
|
|
* So we multiply the hash values with distinct prime numbers.
|
|
|
|
* 2. generate small numbers
|
|
|
|
* It's why the code uses quarks instead of interned strings. Interned strings are random
|
|
|
|
* pointers, quarks are numbers increasing from 0.
|
|
|
|
* Both of these goals should achieve a bloom filter for selector matching that is as free
|
|
|
|
* of collisions as possible.
|
|
|
|
*/
|
|
|
|
static inline guint
|
|
|
|
gtk_css_hash_class (GQuark klass)
|
|
|
|
{
|
|
|
|
return klass * 5;
|
|
|
|
}
|
|
|
|
static inline guint
|
|
|
|
gtk_css_hash_name (GQuark name)
|
|
|
|
{
|
|
|
|
return name * 7;
|
|
|
|
}
|
|
|
|
static inline guint
|
|
|
|
gtk_css_hash_id (GQuark id)
|
|
|
|
{
|
|
|
|
return id * 11;
|
|
|
|
}
|
2020-01-27 02:44:05 +00:00
|
|
|
|
2011-05-26 01:50:53 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_CSS_TYPES_PRIVATE_H__ */
|