]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
Adapt cast macros to standard.
[~andy/gtk] / gtk / gtkenums.h
1 /* GTK - The GIMP Toolkit
2  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library 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.
8  *
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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library 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.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-1999.  See the AUTHORS
22  * file for a list of people on the GTK+ Team.  See the ChangeLog
23  * files for a list of changes.  These files are distributed with
24  * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 
25  */
26
27 #ifndef __GTK_ENUMS_H__
28 #define __GTK_ENUMS_H__
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 /* Arrow types */
35 typedef enum
36 {
37   GTK_ARROW_UP,
38   GTK_ARROW_DOWN,
39   GTK_ARROW_LEFT,
40   GTK_ARROW_RIGHT
41 } GtkArrowType;
42
43 /* Attach options (for tables) */
44 typedef enum
45 {
46   GTK_EXPAND = 1 << 0,
47   GTK_SHRINK = 1 << 1,
48   GTK_FILL   = 1 << 2
49 } GtkAttachOptions;
50
51 /* Button box styles */
52 typedef enum 
53 {
54   GTK_BUTTONBOX_DEFAULT_STYLE,
55   GTK_BUTTONBOX_SPREAD,
56   GTK_BUTTONBOX_EDGE,
57   GTK_BUTTONBOX_START,
58   GTK_BUTTONBOX_END
59 } GtkButtonBoxStyle;
60
61 /* Curve types */
62 typedef enum
63 {
64   GTK_CURVE_TYPE_LINEAR,       /* linear interpolation */
65   GTK_CURVE_TYPE_SPLINE,       /* spline interpolation */
66   GTK_CURVE_TYPE_FREE          /* free form curve */
67 } GtkCurveType;
68  
69 /* Focus movement types */
70 typedef enum
71 {
72   GTK_DIR_TAB_FORWARD,
73   GTK_DIR_TAB_BACKWARD,
74   GTK_DIR_UP,
75   GTK_DIR_DOWN,
76   GTK_DIR_LEFT,
77   GTK_DIR_RIGHT
78 } GtkDirectionType;
79
80 /* justification for label and maybe other widgets (text?) */
81 typedef enum
82 {
83   GTK_JUSTIFY_LEFT,
84   GTK_JUSTIFY_RIGHT,
85   GTK_JUSTIFY_CENTER,
86   GTK_JUSTIFY_FILL
87 } GtkJustification;
88
89 /* GtkPatternSpec match types */
90 typedef enum
91 {
92   GTK_MATCH_ALL,       /* "*A?A*" */
93   GTK_MATCH_ALL_TAIL,  /* "*A?AA" */
94   GTK_MATCH_HEAD,      /* "AAAA*" */
95   GTK_MATCH_TAIL,      /* "*AAAA" */
96   GTK_MATCH_EXACT,     /* "AAAAA" */
97   GTK_MATCH_LAST
98 } GtkMatchType;
99
100 /* Menu keyboard movement types */
101 typedef enum
102 {
103   GTK_MENU_DIR_PARENT,
104   GTK_MENU_DIR_CHILD,
105   GTK_MENU_DIR_NEXT,
106   GTK_MENU_DIR_PREV
107 } GtkMenuDirectionType;
108
109 typedef enum
110 {
111   GTK_MENU_FACTORY_MENU,
112   GTK_MENU_FACTORY_MENU_BAR,
113   GTK_MENU_FACTORY_OPTION_MENU
114 } GtkMenuFactoryType;
115
116 typedef enum
117 {
118   GTK_PIXELS,
119   GTK_INCHES,
120   GTK_CENTIMETERS
121 } GtkMetricType;
122
123 /* Orientation for toolbars, etc. */
124 typedef enum
125 {
126   GTK_ORIENTATION_HORIZONTAL,
127   GTK_ORIENTATION_VERTICAL
128 } GtkOrientation;
129
130 /* Placement type for scrolled window */
131 typedef enum
132 {
133   GTK_CORNER_TOP_LEFT,
134   GTK_CORNER_BOTTOM_LEFT,
135   GTK_CORNER_TOP_RIGHT,
136   GTK_CORNER_BOTTOM_RIGHT
137 } GtkCornerType;
138
139 /* Packing types (for boxes) */
140 typedef enum
141 {
142   GTK_PACK_START,
143   GTK_PACK_END
144 } GtkPackType;
145
146 /* priorities for path lookups */
147 typedef enum
148 {
149   GTK_PATH_PRIO_LOWEST      = 0,
150   GTK_PATH_PRIO_GTK         = 4,
151   GTK_PATH_PRIO_APPLICATION = 8,
152   GTK_PATH_PRIO_RC          = 12,
153   GTK_PATH_PRIO_HIGHEST     = 15,
154   GTK_PATH_PRIO_MASK        = 0x0f
155 } GtkPathPriorityType;
156
157 /* widget path types */
158 typedef enum
159 {
160   GTK_PATH_WIDGET,
161   GTK_PATH_WIDGET_CLASS,
162   GTK_PATH_CLASS
163 } GtkPathType;
164
165 /* Scrollbar policy types (for scrolled windows) */
166 typedef enum
167 {
168   GTK_POLICY_ALWAYS,
169   GTK_POLICY_AUTOMATIC,
170   GTK_POLICY_NEVER
171 } GtkPolicyType;
172
173 typedef enum
174 {
175   GTK_POS_LEFT,
176   GTK_POS_RIGHT,
177   GTK_POS_TOP,
178   GTK_POS_BOTTOM
179 } GtkPositionType;
180
181 typedef enum
182 {
183   GTK_PREVIEW_COLOR,
184   GTK_PREVIEW_GRAYSCALE
185 } GtkPreviewType;
186
187 /* Style for buttons */
188 typedef enum
189 {
190   GTK_RELIEF_NORMAL,
191   GTK_RELIEF_HALF,
192   GTK_RELIEF_NONE
193 } GtkReliefStyle;
194
195 /* Resize type */
196 typedef enum
197 {
198   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
199   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
200   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
201 } GtkResizeMode;
202
203 /* signal run types */
204 typedef enum                    /*< flags >*/
205 {
206   GTK_RUN_FIRST      = 1 << 0,
207   GTK_RUN_LAST       = 1 << 1,
208   GTK_RUN_BOTH       = (GTK_RUN_FIRST | GTK_RUN_LAST),
209   GTK_RUN_NO_RECURSE = 1 << 2,
210   GTK_RUN_ACTION     = 1 << 3,
211   GTK_RUN_NO_HOOKS   = 1 << 4
212 } GtkSignalRunType;
213
214 /* scrolling types */
215 typedef enum
216 {
217   GTK_SCROLL_NONE,
218   GTK_SCROLL_STEP_BACKWARD,
219   GTK_SCROLL_STEP_FORWARD,
220   GTK_SCROLL_PAGE_BACKWARD,
221   GTK_SCROLL_PAGE_FORWARD,
222   GTK_SCROLL_JUMP
223 } GtkScrollType;
224
225 /* list selection modes */
226 typedef enum
227 {
228   GTK_SELECTION_SINGLE,
229   GTK_SELECTION_BROWSE,
230   GTK_SELECTION_MULTIPLE,
231   GTK_SELECTION_EXTENDED
232 } GtkSelectionMode;
233
234 /* Shadow types */
235 typedef enum
236 {
237   GTK_SHADOW_NONE,
238   GTK_SHADOW_IN,
239   GTK_SHADOW_OUT,
240   GTK_SHADOW_ETCHED_IN,
241   GTK_SHADOW_ETCHED_OUT
242 } GtkShadowType;
243
244 /* Widget states */
245 typedef enum
246 {
247   GTK_STATE_NORMAL,
248   GTK_STATE_ACTIVE,
249   GTK_STATE_PRELIGHT,
250   GTK_STATE_SELECTED,
251   GTK_STATE_INSENSITIVE
252 } GtkStateType;
253
254 /* Directions for submenus */
255 typedef enum
256 {
257   GTK_DIRECTION_LEFT,
258   GTK_DIRECTION_RIGHT
259 } GtkSubmenuDirection;
260
261 /* Placement of submenus */
262 typedef enum
263 {
264   GTK_TOP_BOTTOM,
265   GTK_LEFT_RIGHT
266 } GtkSubmenuPlacement;
267
268 /* Style for toolbars */
269 typedef enum
270 {
271   GTK_TOOLBAR_ICONS,
272   GTK_TOOLBAR_TEXT,
273   GTK_TOOLBAR_BOTH,
274   GTK_TOOLBAR_BOTH_HORIZ
275 } GtkToolbarStyle;
276
277 /* Trough types for GtkRange */
278 typedef enum
279 {
280   GTK_TROUGH_NONE,
281   GTK_TROUGH_START,
282   GTK_TROUGH_END,
283   GTK_TROUGH_JUMP
284 } GtkTroughType;
285
286 /* Data update types (for ranges) */
287 typedef enum
288 {
289   GTK_UPDATE_CONTINUOUS,
290   GTK_UPDATE_DISCONTINUOUS,
291   GTK_UPDATE_DELAYED
292 } GtkUpdateType;
293
294 /* Generic visibility flags */
295 typedef enum
296 {
297   GTK_VISIBILITY_NONE,
298   GTK_VISIBILITY_PARTIAL,
299   GTK_VISIBILITY_FULL
300 } GtkVisibility;
301
302 /* Window position types */
303 typedef enum
304 {
305   GTK_WIN_POS_NONE,
306   GTK_WIN_POS_CENTER,
307   GTK_WIN_POS_MOUSE,
308   GTK_WIN_POS_CENTER_ALWAYS
309 } GtkWindowPosition;
310
311 /* Window types */
312 typedef enum
313 {
314   GTK_WINDOW_TOPLEVEL,
315   GTK_WINDOW_DIALOG,
316   GTK_WINDOW_POPUP
317 } GtkWindowType;
318
319 /* How to sort */
320 typedef enum
321 {
322   GTK_SORT_ASCENDING,
323   GTK_SORT_DESCENDING
324 } GtkSortType;
325
326 #ifdef __cplusplus
327 }
328 #endif /* __cplusplus */
329
330
331 #endif /* __GTK_ENUMS_H__ */