1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 2011 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef __GTK_CSS_TYPES_PRIVATE_H__
21 #define __GTK_CSS_TYPES_PRIVATE_H__
23 #include <glib-object.h>
30 GTK_CSS_CURRENT_COLOR /*< nick=currentColor >*/
33 /* We encode horizontal and vertical repeat in one enum value.
34 * This eases parsing and storage, but you need to be aware that
35 * you have to "unpack" this value.
37 #define GTK_CSS_BACKGROUND_REPEAT_SHIFT (8)
38 #define GTK_CSS_BACKGROUND_REPEAT_MASK ((1 << GTK_CSS_BACKGROUND_REPEAT_SHIFT) - 1)
39 #define GTK_CSS_BACKGROUND_HORIZONTAL(repeat) ((repeat) & GTK_CSS_BACKGROUND_REPEAT_MASK)
40 #define GTK_CSS_BACKGROUND_VERTICAL(repeat) (((repeat) >> GTK_CSS_BACKGROUND_REPEAT_SHIFT) & GTK_CSS_BACKGROUND_REPEAT_MASK)
41 typedef enum /*< enum >*/
43 GTK_CSS_BACKGROUND_INVALID, /*< skip >*/
44 GTK_CSS_BACKGROUND_REPEAT, /* start at one so we know if a value has been set */
45 GTK_CSS_BACKGROUND_SPACE,
46 GTK_CSS_BACKGROUND_ROUND,
47 GTK_CSS_BACKGROUND_NO_REPEAT,
48 /* need to hardcode the numer or glib-mkenums makes us into a flags type */
49 GTK_CSS_BACKGROUND_REPEAT_X = 1025,
50 GTK_CSS_BACKGROUND_REPEAT_Y = 260
51 } GtkCssBackgroundRepeat;
54 GTK_CSS_REPEAT_STYLE_STRETCH,
55 GTK_CSS_REPEAT_STYLE_REPEAT,
56 GTK_CSS_REPEAT_STYLE_ROUND,
57 GTK_CSS_REPEAT_STYLE_SPACE
58 } GtkCssBorderRepeatStyle;
61 GTK_CSS_AREA_BORDER_BOX,
62 GTK_CSS_AREA_PADDING_BOX,
63 GTK_CSS_AREA_CONTENT_BOX
66 /* for the order in arrays */
67 typedef enum /*< skip >*/ {
74 typedef enum /*< skip >*/ {
81 typedef struct _GtkCssBorderCornerRadius GtkCssBorderCornerRadius;
82 typedef struct _GtkCssBorderImageRepeat GtkCssBorderImageRepeat;
84 struct _GtkCssBorderCornerRadius {
89 struct _GtkCssBorderImageRepeat {
90 GtkCssBorderRepeatStyle vrepeat;
91 GtkCssBorderRepeatStyle hrepeat;
94 #define GTK_TYPE_CSS_BORDER_CORNER_RADIUS _gtk_css_border_corner_radius_get_type ()
95 #define GTK_TYPE_CSS_BORDER_RADIUS _gtk_css_border_radius_get_type ()
96 #define GTK_TYPE_CSS_BORDER_IMAGE_REPEAT _gtk_css_border_image_repeat_get_type ()
98 GType _gtk_css_border_corner_radius_get_type (void);
99 GType _gtk_css_border_radius_get_type (void);
100 GType _gtk_css_border_image_repeat_get_type (void);
104 #endif /* __GTK_CSS_TYPES_PRIVATE_H__ */