gtkcsstypesprivate.h 15.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/* 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
Javier Jardón's avatar
Javier Jardón committed
15
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 17 18 19 20 21
 */

#ifndef __GTK_CSS_TYPES_PRIVATE_H__
#define __GTK_CSS_TYPES_PRIVATE_H__

#include <glib-object.h>
Benjamin Otte's avatar
Benjamin Otte committed
22
#include <gtk/gtkstylecontext.h>
23 24 25

G_BEGIN_DECLS

26 27
typedef union _GtkCssMatcher GtkCssMatcher;
typedef struct _GtkCssNode GtkCssNode;
28
typedef struct _GtkCssNodeDeclaration GtkCssNodeDeclaration;
29
typedef struct _GtkCssStyle GtkCssStyle;
30
typedef struct _GtkStyleProviderPrivate GtkStyleProviderPrivate; /* dummy typedef */
Benjamin Otte's avatar
Benjamin Otte committed
31

32 33
#define GTK_CSS_CHANGE_CLASS                          (1ULL <<  0)
#define GTK_CSS_CHANGE_NAME                           (1ULL <<  1)
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#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)
#define GTK_CSS_CHANGE_SIBLING_CLASS                  (1ULL <<  8)
#define GTK_CSS_CHANGE_SIBLING_NAME                   (1ULL <<  9)
#define GTK_CSS_CHANGE_SIBLING_ID                     (1ULL << 10)
#define GTK_CSS_CHANGE_SIBLING_FIRST_CHILD            (1ULL << 11)
#define GTK_CSS_CHANGE_SIBLING_LAST_CHILD             (1ULL << 12)
#define GTK_CSS_CHANGE_SIBLING_NTH_CHILD              (1ULL << 13)
#define GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD         (1ULL << 14)
#define GTK_CSS_CHANGE_SIBLING_STATE                  (1ULL << 15)
#define GTK_CSS_CHANGE_PARENT_CLASS                   (1ULL << 16)
#define GTK_CSS_CHANGE_PARENT_NAME                    (1ULL << 17)
#define GTK_CSS_CHANGE_PARENT_ID                      (1ULL << 18)
#define GTK_CSS_CHANGE_PARENT_FIRST_CHILD             (1ULL << 19)
#define GTK_CSS_CHANGE_PARENT_LAST_CHILD              (1ULL << 20)
#define GTK_CSS_CHANGE_PARENT_NTH_CHILD               (1ULL << 21)
#define GTK_CSS_CHANGE_PARENT_NTH_LAST_CHILD          (1ULL << 22)
#define GTK_CSS_CHANGE_PARENT_STATE                   (1ULL << 23)
#define GTK_CSS_CHANGE_PARENT_SIBLING_CLASS           (1ULL << 24)
#define GTK_CSS_CHANGE_PARENT_SIBLING_ID              (1ULL << 25)
#define GTK_CSS_CHANGE_PARENT_SIBLING_NAME            (1ULL << 26)
#define GTK_CSS_CHANGE_PARENT_SIBLING_FIRST_CHILD     (1ULL << 27)
#define GTK_CSS_CHANGE_PARENT_SIBLING_LAST_CHILD      (1ULL << 28)
#define GTK_CSS_CHANGE_PARENT_SIBLING_NTH_CHILD       (1ULL << 29)
#define GTK_CSS_CHANGE_PARENT_SIBLING_NTH_LAST_CHILD  (1ULL << 30)
#define GTK_CSS_CHANGE_PARENT_SIBLING_STATE           (1ULL << 31)
64

65
/* add more */
66 67 68 69
#define GTK_CSS_CHANGE_SOURCE                         (1ULL << 32)
#define GTK_CSS_CHANGE_PARENT_STYLE                   (1ULL << 33)
#define GTK_CSS_CHANGE_TIMESTAMP                      (1ULL << 34)
#define GTK_CSS_CHANGE_ANIMATIONS                     (1ULL << 35)
70

71 72 73
#define GTK_CSS_CHANGE_RESERVED_BIT                   (1ULL << 62) /* Used internally in gtkcssselector.c */

typedef guint64 GtkCssChange;
74 75 76 77 78 79 80 81 82 83 84

#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_SIBLING_FIRST_CHILD | GTK_CSS_CHANGE_SIBLING_LAST_CHILD | \
                                         GTK_CSS_CHANGE_SIBLING_NTH_CHILD | GTK_CSS_CHANGE_SIBLING_NTH_LAST_CHILD)
#define GTK_CSS_CHANGE_PARENT_POSITION (GTK_CSS_CHANGE_PARENT_FIRST_CHILD | GTK_CSS_CHANGE_PARENT_LAST_CHILD | \
                                        GTK_CSS_CHANGE_PARENT_NTH_CHILD | GTK_CSS_CHANGE_PARENT_NTH_LAST_CHILD)
#define GTK_CSS_CHANGE_PARENT_SIBLING_POSITION (GTK_CSS_CHANGE_PARENT_SIBLING_FIRST_CHILD | GTK_CSS_CHANGE_PARENT_SIBLING_LAST_CHILD | \
                                                GTK_CSS_CHANGE_PARENT_SIBLING_NTH_CHILD | GTK_CSS_CHANGE_PARENT_SIBLING_NTH_LAST_CHILD)


85
#define GTK_CSS_CHANGE_ANY ((1 << 19) - 1)
86
#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)
87
#define GTK_CSS_CHANGE_ANY_SIBLING (GTK_CSS_CHANGE_SIBLING_CLASS | GTK_CSS_CHANGE_SIBLING_NAME | \
88
                                    GTK_CSS_CHANGE_SIBLING_ID | \
89 90 91
                                    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 | \
92
                                   GTK_CSS_CHANGE_PARENT_ID | GTK_CSS_CHANGE_PARENT_SIBLING_ID | \
93 94 95
                                   GTK_CSS_CHANGE_PARENT_POSITION | GTK_CSS_CHANGE_PARENT_SIBLING_POSITION | \
                                   GTK_CSS_CHANGE_PARENT_STATE | GTK_CSS_CHANGE_PARENT_SIBLING_STATE)

96 97 98
/*
 * GtkCssAffects:
 * @GTK_CSS_AFFECTS_FOREGROUND: The foreground rendering is affected.
99 100
 *   This does not include things that affect the font. For those,
 *   see @GTK_CSS_AFFECTS_FONT.
101 102 103
 * @GTK_CSS_AFFECTS_BACKGROUND: The background rendering is affected.
 * @GTK_CSS_AFFECTS_BORDER: The border styling is affected.
 * @GTK_CSS_AFFECTS_PANGO_LAYOUT: Font rendering is affected.
104 105
 * @GTK_CSS_AFFECTS_FONT: The font is affected and should be reloaded
 *   if it was cached.
106
 * @GTK_CSS_AFFECTS_TEXT: Text rendering is affected.
107
 * @GTK_CSS_AFFECTS_TEXT_ATTRS: Text attributes are affected.
108 109
 * @GTK_CSS_AFFECTS_ICON: Fullcolor icons and their rendering is affected.
 * @GTK_CSS_AFFECTS_SYMBOLIC_ICON: Symbolic icons and their rendering is affected.
110 111 112 113 114 115 116 117 118 119 120 121 122 123
 * @GTK_CSS_AFFECTS_OUTLINE: The outline styling is affected. Outlines
 *   only affect elements that can be focused.
 * @GTK_CSS_AFFECTS_CLIP: Changes in this property may have an effect
 *   on the clipping area of the element. Changes in these properties
 *   should cause a reevaluation of the element's clip area.
 * @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.
 *
 * 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.
 */
124
typedef enum {
125 126 127 128 129 130 131 132 133 134 135
  GTK_CSS_AFFECTS_FOREGROUND = (1 << 0),
  GTK_CSS_AFFECTS_BACKGROUND = (1 << 1),
  GTK_CSS_AFFECTS_BORDER = (1 << 2),
  GTK_CSS_AFFECTS_FONT = (1 << 3),
  GTK_CSS_AFFECTS_TEXT = (1 << 4),
  GTK_CSS_AFFECTS_TEXT_ATTRS = (1 << 5),
  GTK_CSS_AFFECTS_ICON = (1 << 6),
  GTK_CSS_AFFECTS_SYMBOLIC_ICON = (1 << 7),
  GTK_CSS_AFFECTS_OUTLINE = (1 << 8),
  GTK_CSS_AFFECTS_CLIP = (1 << 9),
  GTK_CSS_AFFECTS_SIZE = (1 << 10)
136 137
} GtkCssAffects;

138
#define GTK_CSS_AFFECTS_REDRAW (GTK_CSS_AFFECTS_FOREGROUND |    \
139 140 141
                                GTK_CSS_AFFECTS_BACKGROUND |    \
                                GTK_CSS_AFFECTS_BORDER |        \
                                GTK_CSS_AFFECTS_ICON |          \
142
                                GTK_CSS_AFFECTS_SYMBOLIC_ICON | \
143 144
                                GTK_CSS_AFFECTS_OUTLINE)

145 146
enum { /*< skip >*/
  GTK_CSS_PROPERTY_COLOR,
147
  GTK_CSS_PROPERTY_DPI,
148
  GTK_CSS_PROPERTY_FONT_SIZE,
149
  GTK_CSS_PROPERTY_ICON_THEME,
150
  GTK_CSS_PROPERTY_ICON_PALETTE,
151 152 153 154 155
  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,
156
  GTK_CSS_PROPERTY_FONT_STRETCH,
157
  GTK_CSS_PROPERTY_LETTER_SPACING,
158
  GTK_CSS_PROPERTY_TEXT_DECORATION_LINE,
159
  GTK_CSS_PROPERTY_TEXT_DECORATION_COLOR,
160
  GTK_CSS_PROPERTY_TEXT_DECORATION_STYLE,
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185
  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,
186 187 188 189
  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,
190 191 192 193 194 195 196 197 198 199 200
  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,
201
  GTK_CSS_PROPERTY_BACKGROUND_BLEND_MODE,
202 203 204 205
  GTK_CSS_PROPERTY_BORDER_IMAGE_SOURCE,
  GTK_CSS_PROPERTY_BORDER_IMAGE_REPEAT,
  GTK_CSS_PROPERTY_BORDER_IMAGE_SLICE,
  GTK_CSS_PROPERTY_BORDER_IMAGE_WIDTH,
206 207 208 209
  GTK_CSS_PROPERTY_ICON_SOURCE,
  GTK_CSS_PROPERTY_ICON_SHADOW,
  GTK_CSS_PROPERTY_ICON_STYLE,
  GTK_CSS_PROPERTY_ICON_TRANSFORM,
210 211
  GTK_CSS_PROPERTY_MIN_WIDTH,
  GTK_CSS_PROPERTY_MIN_HEIGHT,
212 213 214 215
  GTK_CSS_PROPERTY_TRANSITION_PROPERTY,
  GTK_CSS_PROPERTY_TRANSITION_DURATION,
  GTK_CSS_PROPERTY_TRANSITION_TIMING_FUNCTION,
  GTK_CSS_PROPERTY_TRANSITION_DELAY,
216 217 218 219 220 221 222 223
  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,
Alexander Larsson's avatar
Alexander Larsson committed
224
  GTK_CSS_PROPERTY_OPACITY,
225
  GTK_CSS_PROPERTY_ICON_EFFECT,
226 227
  GTK_CSS_PROPERTY_ENGINE,
  GTK_CSS_PROPERTY_GTK_KEY_BINDINGS,
228 229
  GTK_CSS_PROPERTY_CARET_COLOR,
  GTK_CSS_PROPERTY_SECONDARY_CARET_COLOR,
230 231 232 233
  /* add more */
  GTK_CSS_PROPERTY_N_PROPERTIES
};

234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
typedef enum /*< skip >*/ {
  GTK_CSS_BLEND_MODE_COLOR,
  GTK_CSS_BLEND_MODE_COLOR_BURN,
  GTK_CSS_BLEND_MODE_COLOR_DODGE,
  GTK_CSS_BLEND_MODE_DARKEN,
  GTK_CSS_BLEND_MODE_DIFFERENCE,
  GTK_CSS_BLEND_MODE_EXCLUSION,
  GTK_CSS_BLEND_MODE_HARD_LIGHT,
  GTK_CSS_BLEND_MODE_HUE,
  GTK_CSS_BLEND_MODE_LIGHTEN,
  GTK_CSS_BLEND_MODE_LUMINOSITY,
  GTK_CSS_BLEND_MODE_MULTIPLY,
  GTK_CSS_BLEND_MODE_NORMAL,
  GTK_CSS_BLEND_MODE_OVERLAY,
  GTK_CSS_BLEND_MODE_SATURATE,
  GTK_CSS_BLEND_MODE_SCREEN,
  GTK_CSS_BLEND_MODE_SOFT_LIGHT
} GtkCssBlendMode;

Benjamin Otte's avatar
Benjamin Otte committed
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283
typedef enum /*< skip >*/ {
  GTK_CSS_IMAGE_BUILTIN_NONE,
  GTK_CSS_IMAGE_BUILTIN_CHECK,
  GTK_CSS_IMAGE_BUILTIN_CHECK_INCONSISTENT,
  GTK_CSS_IMAGE_BUILTIN_OPTION,
  GTK_CSS_IMAGE_BUILTIN_OPTION_INCONSISTENT,
  GTK_CSS_IMAGE_BUILTIN_ARROW_UP,
  GTK_CSS_IMAGE_BUILTIN_ARROW_DOWN,
  GTK_CSS_IMAGE_BUILTIN_ARROW_LEFT,
  GTK_CSS_IMAGE_BUILTIN_ARROW_RIGHT,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_LEFT_EXPANDED,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_LEFT_EXPANDED,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_HORIZONTAL_RIGHT_EXPANDED,
  GTK_CSS_IMAGE_BUILTIN_EXPANDER_VERTICAL_RIGHT_EXPANDED,
  GTK_CSS_IMAGE_BUILTIN_GRIP_TOPLEFT,
  GTK_CSS_IMAGE_BUILTIN_GRIP_TOP,
  GTK_CSS_IMAGE_BUILTIN_GRIP_TOPRIGHT,
  GTK_CSS_IMAGE_BUILTIN_GRIP_RIGHT,
  GTK_CSS_IMAGE_BUILTIN_GRIP_BOTTOMRIGHT,
  GTK_CSS_IMAGE_BUILTIN_GRIP_BOTTOM,
  GTK_CSS_IMAGE_BUILTIN_GRIP_BOTTOMLEFT,
  GTK_CSS_IMAGE_BUILTIN_GRIP_LEFT,
  GTK_CSS_IMAGE_BUILTIN_PANE_SEPARATOR,
  GTK_CSS_IMAGE_BUILTIN_HANDLE,
  GTK_CSS_IMAGE_BUILTIN_SPINNER
} GtkCssImageBuiltinType;

284
typedef enum /*< skip >*/ {
Alexander Larsson's avatar
Alexander Larsson committed
285 286 287 288 289
  GTK_CSS_AREA_BORDER_BOX,
  GTK_CSS_AREA_PADDING_BOX,
  GTK_CSS_AREA_CONTENT_BOX
} GtkCssArea;

290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308
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;

309
typedef enum /*< skip >*/ {
310 311 312 313
  GTK_CSS_ICON_EFFECT_NONE,
  GTK_CSS_ICON_EFFECT_HIGHLIGHT,
  GTK_CSS_ICON_EFFECT_DIM
} GtkCssIconEffect;
314

315 316 317 318 319 320
typedef enum /*< skip >*/ {
  GTK_CSS_ICON_STYLE_REQUESTED,
  GTK_CSS_ICON_STYLE_REGULAR,
  GTK_CSS_ICON_STYLE_SYMBOLIC
} GtkCssIconStyle;

321
typedef enum /*< skip >*/ {
Benjamin Otte's avatar
Benjamin Otte committed
322 323 324
  /* relative font sizes */
  GTK_CSS_FONT_SIZE_SMALLER,
  GTK_CSS_FONT_SIZE_LARGER,
325 326 327 328 329 330 331
  /* 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,
Benjamin Otte's avatar
Benjamin Otte committed
332
  GTK_CSS_FONT_SIZE_XX_LARGE
333 334
} GtkCssFontSize;

335 336 337 338 339 340
typedef enum /*< skip >*/ {
  GTK_CSS_TEXT_DECORATION_LINE_NONE,
  GTK_CSS_TEXT_DECORATION_LINE_UNDERLINE,
  GTK_CSS_TEXT_DECORATION_LINE_LINE_THROUGH
} GtkTextDecorationLine;

341 342 343 344 345 346
typedef enum /*< skip >*/ {
  GTK_CSS_TEXT_DECORATION_STYLE_SOLID,
  GTK_CSS_TEXT_DECORATION_STYLE_DOUBLE,
  GTK_CSS_TEXT_DECORATION_STYLE_WAVY
} GtkTextDecorationStyle;

347 348 349 350 351 352 353 354
/* for the order in arrays */
typedef enum /*< skip >*/ {
  GTK_CSS_TOP,
  GTK_CSS_RIGHT,
  GTK_CSS_BOTTOM,
  GTK_CSS_LEFT
} GtkCssSide;

355 356 357 358 359 360 361
typedef enum /*< skip >*/ {
  GTK_CSS_TOP_LEFT,
  GTK_CSS_TOP_RIGHT,
  GTK_CSS_BOTTOM_RIGHT,
  GTK_CSS_BOTTOM_LEFT
} GtkCssCorner;

362 363 364 365 366 367 368 369
typedef enum /*< skip >*/ {
  GTK_CSS_DIMENSION_PERCENTAGE,
  GTK_CSS_DIMENSION_NUMBER,
  GTK_CSS_DIMENSION_LENGTH,
  GTK_CSS_DIMENSION_ANGLE,
  GTK_CSS_DIMENSION_TIME
} GtkCssDimension;

Benjamin Otte's avatar
Benjamin Otte committed
370 371 372 373 374 375 376 377 378 379
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,
Benjamin Otte's avatar
Benjamin Otte committed
380
  GTK_CSS_REM,
Benjamin Otte's avatar
Benjamin Otte committed
381 382 383
  GTK_CSS_PC,
  GTK_CSS_IN,
  GTK_CSS_CM,
384 385 386 387 388
  GTK_CSS_MM,
  /* CSS term: <angle> */
  GTK_CSS_RAD,
  GTK_CSS_DEG,
  GTK_CSS_GRAD,
389 390 391 392
  GTK_CSS_TURN,
  /* CSS term: <time> */
  GTK_CSS_S,
  GTK_CSS_MS,
Benjamin Otte's avatar
Benjamin Otte committed
393 394
} GtkCssUnit;

395 396
cairo_operator_t        _gtk_css_blend_mode_get_operator         (GtkCssBlendMode    mode);

397 398
GtkCssChange            _gtk_css_change_for_sibling              (GtkCssChange       match);
GtkCssChange            _gtk_css_change_for_child                (GtkCssChange       match);
399

400 401
GtkCssDimension         gtk_css_unit_get_dimension               (GtkCssUnit         unit);

402 403 404 405
char *                  gtk_css_change_to_string                 (GtkCssChange       change);
void                    gtk_css_change_print                     (GtkCssChange       change,
                                                                  GString           *string);

406 407 408
/* for lack of better place to put it */
/* mirror what cairo does */
#define gtk_rgba_is_clear(rgba) ((rgba)->alpha < ((double)0x00ff / (double)0xffff))
409 410 411 412

G_END_DECLS

#endif /* __GTK_CSS_TYPES_PRIVATE_H__ */