]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
applied patch from Andreas Persenius <ndap@swipnet.se> that updates the
[~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 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.
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  * Lesser General Public License for more details.
13  *
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.
18  */
19
20 /*
21  * Modified by the GTK+ Team and others 1997-2000.  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 /* Reading directions for text */
81 typedef enum
82 {
83   GTK_TEXT_DIR_NONE,
84   GTK_TEXT_DIR_LTR,
85   GTK_TEXT_DIR_RTL
86 } GtkTextDirection;
87
88 /* justification for label and maybe other widgets (text?) */
89 typedef enum
90 {
91   GTK_JUSTIFY_LEFT,
92   GTK_JUSTIFY_RIGHT,
93   GTK_JUSTIFY_CENTER,
94   GTK_JUSTIFY_FILL
95 } GtkJustification;
96
97 /* GtkPatternSpec match types */
98 typedef enum
99 {
100   GTK_MATCH_ALL,       /* "*A?A*" */
101   GTK_MATCH_ALL_TAIL,  /* "*A?AA" */
102   GTK_MATCH_HEAD,      /* "AAAA*" */
103   GTK_MATCH_TAIL,      /* "*AAAA" */
104   GTK_MATCH_EXACT,     /* "AAAAA" */
105   GTK_MATCH_LAST
106 } GtkMatchType;
107
108 /* Menu keyboard movement types */
109 typedef enum
110 {
111   GTK_MENU_DIR_PARENT,
112   GTK_MENU_DIR_CHILD,
113   GTK_MENU_DIR_NEXT,
114   GTK_MENU_DIR_PREV
115 } GtkMenuDirectionType;
116
117 typedef enum
118 {
119   GTK_MENU_FACTORY_MENU,
120   GTK_MENU_FACTORY_MENU_BAR,
121   GTK_MENU_FACTORY_OPTION_MENU
122 } GtkMenuFactoryType;
123
124 typedef enum
125 {
126   GTK_PIXELS,
127   GTK_INCHES,
128   GTK_CENTIMETERS
129 } GtkMetricType;
130
131 /* Orientation for toolbars, etc. */
132 typedef enum
133 {
134   GTK_ORIENTATION_HORIZONTAL,
135   GTK_ORIENTATION_VERTICAL
136 } GtkOrientation;
137
138 /* Placement type for scrolled window */
139 typedef enum
140 {
141   GTK_CORNER_TOP_LEFT,
142   GTK_CORNER_BOTTOM_LEFT,
143   GTK_CORNER_TOP_RIGHT,
144   GTK_CORNER_BOTTOM_RIGHT
145 } GtkCornerType;
146
147 /* Packing types (for boxes) */
148 typedef enum
149 {
150   GTK_PACK_START,
151   GTK_PACK_END
152 } GtkPackType;
153
154 /* priorities for path lookups */
155 typedef enum
156 {
157   GTK_PATH_PRIO_LOWEST      = 0,
158   GTK_PATH_PRIO_GTK         = 4,
159   GTK_PATH_PRIO_APPLICATION = 8,
160   GTK_PATH_PRIO_RC          = 12,
161   GTK_PATH_PRIO_HIGHEST     = 15,
162   GTK_PATH_PRIO_MASK        = 0x0f
163 } GtkPathPriorityType;
164
165 /* widget path types */
166 typedef enum
167 {
168   GTK_PATH_WIDGET,
169   GTK_PATH_WIDGET_CLASS,
170   GTK_PATH_CLASS
171 } GtkPathType;
172
173 /* Scrollbar policy types (for scrolled windows) */
174 typedef enum
175 {
176   GTK_POLICY_ALWAYS,
177   GTK_POLICY_AUTOMATIC,
178   GTK_POLICY_NEVER
179 } GtkPolicyType;
180
181 typedef enum
182 {
183   GTK_POS_LEFT,
184   GTK_POS_RIGHT,
185   GTK_POS_TOP,
186   GTK_POS_BOTTOM
187 } GtkPositionType;
188
189 typedef enum
190 {
191   GTK_PREVIEW_COLOR,
192   GTK_PREVIEW_GRAYSCALE
193 } GtkPreviewType;
194
195 /* Style for buttons */
196 typedef enum
197 {
198   GTK_RELIEF_NORMAL,
199   GTK_RELIEF_HALF,
200   GTK_RELIEF_NONE
201 } GtkReliefStyle;
202
203 /* Resize type */
204 typedef enum
205 {
206   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
207   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
208   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
209 } GtkResizeMode;
210
211 /* signal run types */
212 typedef enum                    /*< flags >*/
213 {
214   GTK_RUN_FIRST      = 1 << 0,
215   GTK_RUN_LAST       = 1 << 1,
216   GTK_RUN_BOTH       = (GTK_RUN_FIRST | GTK_RUN_LAST),
217   GTK_RUN_NO_RECURSE = 1 << 2,
218   GTK_RUN_ACTION     = 1 << 3,
219   GTK_RUN_NO_HOOKS   = 1 << 4
220 } GtkSignalRunType;
221
222 /* scrolling types */
223 typedef enum
224 {
225   GTK_SCROLL_NONE,
226   GTK_SCROLL_STEP_BACKWARD,
227   GTK_SCROLL_STEP_FORWARD,
228   GTK_SCROLL_PAGE_BACKWARD,
229   GTK_SCROLL_PAGE_FORWARD,
230   GTK_SCROLL_JUMP
231 } GtkScrollType;
232
233 /* list selection modes */
234 typedef enum
235 {
236   GTK_SELECTION_SINGLE,
237   GTK_SELECTION_BROWSE,
238   GTK_SELECTION_MULTIPLE,
239   GTK_SELECTION_EXTENDED
240 } GtkSelectionMode;
241
242 /* Shadow types */
243 typedef enum
244 {
245   GTK_SHADOW_NONE,
246   GTK_SHADOW_IN,
247   GTK_SHADOW_OUT,
248   GTK_SHADOW_ETCHED_IN,
249   GTK_SHADOW_ETCHED_OUT
250 } GtkShadowType;
251
252 /* Widget states */
253 typedef enum
254 {
255   GTK_STATE_NORMAL,
256   GTK_STATE_ACTIVE,
257   GTK_STATE_PRELIGHT,
258   GTK_STATE_SELECTED,
259   GTK_STATE_INSENSITIVE
260 } GtkStateType;
261
262 /* Directions for submenus */
263 typedef enum
264 {
265   GTK_DIRECTION_LEFT,
266   GTK_DIRECTION_RIGHT
267 } GtkSubmenuDirection;
268
269 /* Placement of submenus */
270 typedef enum
271 {
272   GTK_TOP_BOTTOM,
273   GTK_LEFT_RIGHT
274 } GtkSubmenuPlacement;
275
276 /* Style for toolbars */
277 typedef enum
278 {
279   GTK_TOOLBAR_ICONS,
280   GTK_TOOLBAR_TEXT,
281   GTK_TOOLBAR_BOTH,
282   GTK_TOOLBAR_BOTH_HORIZ
283 } GtkToolbarStyle;
284
285 /* Trough types for GtkRange */
286 typedef enum
287 {
288   GTK_TROUGH_NONE,
289   GTK_TROUGH_START,
290   GTK_TROUGH_END,
291   GTK_TROUGH_JUMP
292 } GtkTroughType;
293
294 /* Data update types (for ranges) */
295 typedef enum
296 {
297   GTK_UPDATE_CONTINUOUS,
298   GTK_UPDATE_DISCONTINUOUS,
299   GTK_UPDATE_DELAYED
300 } GtkUpdateType;
301
302 /* Generic visibility flags */
303 typedef enum
304 {
305   GTK_VISIBILITY_NONE,
306   GTK_VISIBILITY_PARTIAL,
307   GTK_VISIBILITY_FULL
308 } GtkVisibility;
309
310 /* Window position types */
311 typedef enum
312 {
313   GTK_WIN_POS_NONE,
314   GTK_WIN_POS_CENTER,
315   GTK_WIN_POS_MOUSE,
316   GTK_WIN_POS_CENTER_ALWAYS
317 } GtkWindowPosition;
318
319 /* Window types */
320 typedef enum
321 {
322   GTK_WINDOW_TOPLEVEL,
323   GTK_WINDOW_DIALOG,
324   GTK_WINDOW_POPUP
325 } GtkWindowType;
326
327 /* How to sort */
328 typedef enum
329 {
330   GTK_SORT_ASCENDING,
331   GTK_SORT_DESCENDING
332 } GtkSortType;
333
334 #ifdef __cplusplus
335 }
336 #endif /* __cplusplus */
337
338
339 #endif /* __GTK_ENUMS_H__ */