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>
|
2012-01-13 22:48:42 +00:00
|
|
|
#include <gtk/gtkstylecontext.h>
|
2011-05-26 01:50:53 +00:00
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2012-09-27 15:04:29 +00:00
|
|
|
/* forward declaration for GtkCssValue */
|
|
|
|
typedef struct _GtkCssComputedValues GtkCssComputedValues;
|
2012-09-28 11:42:21 +00:00
|
|
|
typedef struct _GtkStyleProviderPrivate GtkStyleProviderPrivate; /* dummy typedef */
|
2012-09-27 15:04:29 +00:00
|
|
|
|
2012-03-17 18:23:53 +00:00
|
|
|
typedef enum { /*< skip >*/
|
|
|
|
GTK_CSS_CHANGE_CLASS = (1 << 0),
|
|
|
|
GTK_CSS_CHANGE_NAME = (1 << 1),
|
|
|
|
GTK_CSS_CHANGE_ID = GTK_CSS_CHANGE_NAME,
|
|
|
|
GTK_CSS_CHANGE_REGION = GTK_CSS_CHANGE_NAME,
|
|
|
|
GTK_CSS_CHANGE_POSITION = (1 << 2),
|
|
|
|
GTK_CSS_CHANGE_STATE = (1 << 3),
|
|
|
|
GTK_CSS_CHANGE_SIBLING_CLASS = (1 << 4),
|
|
|
|
GTK_CSS_CHANGE_SIBLING_NAME = (1 << 5),
|
|
|
|
GTK_CSS_CHANGE_SIBLING_POSITION = (1 << 6),
|
|
|
|
GTK_CSS_CHANGE_SIBLING_STATE = (1 << 7),
|
|
|
|
GTK_CSS_CHANGE_PARENT_CLASS = (1 << 8),
|
|
|
|
GTK_CSS_CHANGE_PARENT_NAME = (1 << 9),
|
2012-10-01 11:10:44 +00:00
|
|
|
GTK_CSS_CHANGE_PARENT_REGION = GTK_CSS_CHANGE_PARENT_NAME,
|
2012-03-17 18:23:53 +00:00
|
|
|
GTK_CSS_CHANGE_PARENT_POSITION = (1 << 10),
|
|
|
|
GTK_CSS_CHANGE_PARENT_STATE = (1 << 11),
|
|
|
|
GTK_CSS_CHANGE_PARENT_SIBLING_CLASS = (1 << 12),
|
|
|
|
GTK_CSS_CHANGE_PARENT_SIBLING_NAME = (1 << 13),
|
|
|
|
GTK_CSS_CHANGE_PARENT_SIBLING_POSITION = (1 << 14),
|
|
|
|
GTK_CSS_CHANGE_PARENT_SIBLING_STATE = (1 << 15),
|
|
|
|
/* add more */
|
2012-04-10 13:37:35 +00:00
|
|
|
GTK_CSS_CHANGE_SOURCE = (1 << 16),
|
2012-11-14 12:24:58 +00:00
|
|
|
GTK_CSS_CHANGE_ANIMATE = (1 << 17),
|
2012-12-10 10:27:43 +00:00
|
|
|
GTK_CSS_CHANGE_FORCE_INVALIDATE = (1 << 18),
|
|
|
|
|
|
|
|
GTK_CSS_CHANGE_RESERVED_BIT = (1 << 31) /* Used internally in gtkcssselector.c */
|
2012-03-17 18:23:53 +00:00
|
|
|
} GtkCssChange;
|
|
|
|
|
2012-11-14 12:24:58 +00:00
|
|
|
#define GTK_CSS_CHANGE_ANY ((1 << 19) - 1)
|
2012-03-17 18:23:53 +00:00
|
|
|
#define GTK_CSS_CHANGE_ANY_SELF (GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_STATE)
|
|
|
|
#define GTK_CSS_CHANGE_ANY_SIBLING (GTK_CSS_CHANGE_SIBLING_CLASS | GTK_CSS_CHANGE_SIBLING_NAME | \
|
|
|
|
GTK_CSS_CHANGE_SIBLING_POSITION | GTK_CSS_CHANGE_SIBLING_STATE)
|
|
|
|
#define GTK_CSS_CHANGE_ANY_PARENT (GTK_CSS_CHANGE_PARENT_CLASS | GTK_CSS_CHANGE_PARENT_SIBLING_CLASS | \
|
|
|
|
GTK_CSS_CHANGE_PARENT_NAME | GTK_CSS_CHANGE_PARENT_SIBLING_NAME | \
|
|
|
|
GTK_CSS_CHANGE_PARENT_POSITION | GTK_CSS_CHANGE_PARENT_SIBLING_POSITION | \
|
|
|
|
GTK_CSS_CHANGE_PARENT_STATE | GTK_CSS_CHANGE_PARENT_SIBLING_STATE)
|
|
|
|
|
2012-07-16 12:48:43 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_DEPENDS_ON_PARENT = (1 << 0),
|
|
|
|
GTK_CSS_EQUALS_PARENT = (1 << 1),
|
|
|
|
GTK_CSS_DEPENDS_ON_COLOR = (1 << 2),
|
|
|
|
GTK_CSS_DEPENDS_ON_FONT_SIZE = (1 << 3)
|
|
|
|
} GtkCssDependencies;
|
|
|
|
|
2012-03-31 03:28:58 +00:00
|
|
|
enum { /*< skip >*/
|
|
|
|
GTK_CSS_PROPERTY_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_FONT_SIZE,
|
|
|
|
GTK_CSS_PROPERTY_BACKGROUND_COLOR,
|
|
|
|
GTK_CSS_PROPERTY_FONT_FAMILY,
|
|
|
|
GTK_CSS_PROPERTY_FONT_STYLE,
|
|
|
|
GTK_CSS_PROPERTY_FONT_VARIANT,
|
|
|
|
GTK_CSS_PROPERTY_FONT_WEIGHT,
|
|
|
|
GTK_CSS_PROPERTY_TEXT_SHADOW,
|
2014-05-02 19:28:36 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SOURCE,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_SHADOW,
|
2014-05-06 14:06:33 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_STYLE,
|
2014-05-05 13:28:18 +00:00
|
|
|
GTK_CSS_PROPERTY_ICON_TRANSFORM,
|
2012-03-31 03:28:58 +00:00
|
|
|
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,
|
2014-05-01 16:11:23 +00:00
|
|
|
GTK_CSS_PROPERTY_OUTLINE_TOP_LEFT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_TOP_RIGHT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_BOTTOM_RIGHT_RADIUS,
|
|
|
|
GTK_CSS_PROPERTY_OUTLINE_BOTTOM_LEFT_RADIUS,
|
2012-03-31 03:28:58 +00:00
|
|
|
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,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE,
|
|
|
|
GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH,
|
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,
|
2013-08-04 09:38:56 +00:00
|
|
|
GTK_CSS_PROPERTY_GTK_IMAGE_EFFECT,
|
2012-03-31 03:28:58 +00:00
|
|
|
GTK_CSS_PROPERTY_ENGINE,
|
|
|
|
GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
|
|
|
|
/* 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;
|
|
|
|
|
2013-08-04 09:38:56 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_IMAGE_EFFECT_NONE,
|
|
|
|
GTK_CSS_IMAGE_EFFECT_HIGHLIGHT,
|
|
|
|
GTK_CSS_IMAGE_EFFECT_DIM
|
|
|
|
} GtkCssImageEffect;
|
|
|
|
|
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;
|
|
|
|
|
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;
|
|
|
|
|
2012-01-07 21:40:17 +00:00
|
|
|
typedef enum /*< skip >*/ {
|
|
|
|
GTK_CSS_TOP_LEFT,
|
|
|
|
GTK_CSS_TOP_RIGHT,
|
|
|
|
GTK_CSS_BOTTOM_RIGHT,
|
|
|
|
GTK_CSS_BOTTOM_LEFT
|
|
|
|
} GtkCssCorner;
|
|
|
|
|
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,
|
|
|
|
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;
|
|
|
|
|
2012-08-24 23:59:13 +00:00
|
|
|
GtkCssChange _gtk_css_change_for_sibling (GtkCssChange match);
|
|
|
|
GtkCssChange _gtk_css_change_for_child (GtkCssChange match);
|
|
|
|
GtkCssDependencies _gtk_css_dependencies_union (GtkCssDependencies first,
|
|
|
|
GtkCssDependencies second);
|
2012-03-17 18:23:53 +00:00
|
|
|
|
2011-05-26 01:50:53 +00:00
|
|
|
|
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_CSS_TYPES_PRIVATE_H__ */
|