]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
Add GTK_WRAP_WORD_CHAR. (#110086, David Brigada)
[~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 #include <glib-object.h>
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif /* __cplusplus */
35
36
37 /* Anchor types */
38 typedef enum
39 {
40   GTK_ANCHOR_CENTER,
41   GTK_ANCHOR_NORTH,
42   GTK_ANCHOR_NORTH_WEST,
43   GTK_ANCHOR_NORTH_EAST,
44   GTK_ANCHOR_SOUTH,
45   GTK_ANCHOR_SOUTH_WEST,
46   GTK_ANCHOR_SOUTH_EAST,
47   GTK_ANCHOR_WEST,
48   GTK_ANCHOR_EAST,
49   GTK_ANCHOR_N          = GTK_ANCHOR_NORTH,
50   GTK_ANCHOR_NW         = GTK_ANCHOR_NORTH_WEST,
51   GTK_ANCHOR_NE         = GTK_ANCHOR_NORTH_EAST,
52   GTK_ANCHOR_S          = GTK_ANCHOR_SOUTH,
53   GTK_ANCHOR_SW         = GTK_ANCHOR_SOUTH_WEST,
54   GTK_ANCHOR_SE         = GTK_ANCHOR_SOUTH_EAST,
55   GTK_ANCHOR_W          = GTK_ANCHOR_WEST,
56   GTK_ANCHOR_E          = GTK_ANCHOR_EAST
57 } GtkAnchorType;
58
59 /* Arrow types */
60 typedef enum
61 {
62   GTK_ARROW_UP,
63   GTK_ARROW_DOWN,
64   GTK_ARROW_LEFT,
65   GTK_ARROW_RIGHT
66 } GtkArrowType;
67
68 /* Attach options (for tables) */
69 typedef enum
70 {
71   GTK_EXPAND = 1 << 0,
72   GTK_SHRINK = 1 << 1,
73   GTK_FILL   = 1 << 2
74 } GtkAttachOptions;
75
76 /* Button box styles */
77 typedef enum 
78 {
79   GTK_BUTTONBOX_DEFAULT_STYLE,
80   GTK_BUTTONBOX_SPREAD,
81   GTK_BUTTONBOX_EDGE,
82   GTK_BUTTONBOX_START,
83   GTK_BUTTONBOX_END
84 } GtkButtonBoxStyle;
85
86 /* Curve types */
87 typedef enum
88 {
89   GTK_CURVE_TYPE_LINEAR,       /* linear interpolation */
90   GTK_CURVE_TYPE_SPLINE,       /* spline interpolation */
91   GTK_CURVE_TYPE_FREE          /* free form curve */
92 } GtkCurveType;
93  
94 typedef enum {
95   GTK_DELETE_CHARS,
96   GTK_DELETE_WORD_ENDS,           /* delete only the portion of the word to the
97                                    * left/right of cursor if we're in the middle
98                                    * of a word */
99   GTK_DELETE_WORDS,
100   GTK_DELETE_DISPLAY_LINES,
101   GTK_DELETE_DISPLAY_LINE_ENDS,
102   GTK_DELETE_PARAGRAPH_ENDS,      /* like C-k in Emacs (or its reverse) */
103   GTK_DELETE_PARAGRAPHS,          /* C-k in pico, kill whole line */
104   GTK_DELETE_WHITESPACE           /* M-\ in Emacs */
105 } GtkDeleteType;
106
107 /* Focus movement types */
108 typedef enum
109 {
110   GTK_DIR_TAB_FORWARD,
111   GTK_DIR_TAB_BACKWARD,
112   GTK_DIR_UP,
113   GTK_DIR_DOWN,
114   GTK_DIR_LEFT,
115   GTK_DIR_RIGHT
116 } GtkDirectionType;
117
118 /* Expander styles */
119 typedef enum
120 {
121   GTK_EXPANDER_COLLAPSED,
122   GTK_EXPANDER_SEMI_COLLAPSED,
123   GTK_EXPANDER_SEMI_EXPANDED,
124   GTK_EXPANDER_EXPANDED
125 } GtkExpanderStyle;
126
127 /* Built-in stock icon sizes */
128 typedef enum
129 {
130   GTK_ICON_SIZE_INVALID,
131   GTK_ICON_SIZE_MENU,
132   GTK_ICON_SIZE_SMALL_TOOLBAR,
133   GTK_ICON_SIZE_LARGE_TOOLBAR,
134   GTK_ICON_SIZE_BUTTON,
135   GTK_ICON_SIZE_DND,
136   GTK_ICON_SIZE_DIALOG
137 } GtkIconSize;
138
139 #ifndef GTK_DISABLE_DEPRECATED
140 /* side types */
141 typedef enum
142 {
143   GTK_SIDE_TOP,
144   GTK_SIDE_BOTTOM,
145   GTK_SIDE_LEFT,
146   GTK_SIDE_RIGHT
147 } GtkSideType;
148 #endif /* GTK_DISABLE_DEPRECATED */
149
150 /* Reading directions for text */
151 typedef enum
152 {
153   GTK_TEXT_DIR_NONE,
154   GTK_TEXT_DIR_LTR,
155   GTK_TEXT_DIR_RTL
156 } GtkTextDirection;
157
158 /* justification for label and maybe other widgets (text?) */
159 typedef enum
160 {
161   GTK_JUSTIFY_LEFT,
162   GTK_JUSTIFY_RIGHT,
163   GTK_JUSTIFY_CENTER,
164   GTK_JUSTIFY_FILL
165 } GtkJustification;
166
167 #ifndef GTK_DISABLE_DEPRECATED
168 /* GtkPatternSpec match types */
169 typedef enum
170 {
171   GTK_MATCH_ALL,       /* "*A?A*" */
172   GTK_MATCH_ALL_TAIL,  /* "*A?AA" */
173   GTK_MATCH_HEAD,      /* "AAAA*" */
174   GTK_MATCH_TAIL,      /* "*AAAA" */
175   GTK_MATCH_EXACT,     /* "AAAAA" */
176   GTK_MATCH_LAST
177 } GtkMatchType;
178 #endif /* GTK_DISABLE_DEPRECATED */
179
180 /* Menu keyboard movement types */
181 typedef enum
182 {
183   GTK_MENU_DIR_PARENT,
184   GTK_MENU_DIR_CHILD,
185   GTK_MENU_DIR_NEXT,
186   GTK_MENU_DIR_PREV
187 } GtkMenuDirectionType;
188
189 typedef enum
190 {
191   GTK_PIXELS,
192   GTK_INCHES,
193   GTK_CENTIMETERS
194 } GtkMetricType;
195
196 typedef enum {
197   GTK_MOVEMENT_LOGICAL_POSITIONS, /* move by forw/back graphemes */
198   GTK_MOVEMENT_VISUAL_POSITIONS,  /* move by left/right graphemes */
199   GTK_MOVEMENT_WORDS,             /* move by forward/back words */
200   GTK_MOVEMENT_DISPLAY_LINES,     /* move up/down lines (wrapped lines) */
201   GTK_MOVEMENT_DISPLAY_LINE_ENDS, /* move up/down lines (wrapped lines) */
202   GTK_MOVEMENT_PARAGRAPHS,        /* move up/down paragraphs (newline-ended lines) */
203   GTK_MOVEMENT_PARAGRAPH_ENDS,    /* move to either end of a paragraph */
204   GTK_MOVEMENT_PAGES,             /* move by pages */
205   GTK_MOVEMENT_BUFFER_ENDS,       /* move to ends of the buffer */
206   GTK_MOVEMENT_HORIZONTAL_PAGES   /* move horizontally by pages */
207 } GtkMovementStep;
208
209 /* Orientation for toolbars, etc. */
210 typedef enum
211 {
212   GTK_ORIENTATION_HORIZONTAL,
213   GTK_ORIENTATION_VERTICAL
214 } GtkOrientation;
215
216 /* Placement type for scrolled window */
217 typedef enum
218 {
219   GTK_CORNER_TOP_LEFT,
220   GTK_CORNER_BOTTOM_LEFT,
221   GTK_CORNER_TOP_RIGHT,
222   GTK_CORNER_BOTTOM_RIGHT
223 } GtkCornerType;
224
225 /* Packing types (for boxes) */
226 typedef enum
227 {
228   GTK_PACK_START,
229   GTK_PACK_END
230 } GtkPackType;
231
232 /* priorities for path lookups */
233 typedef enum
234 {
235   GTK_PATH_PRIO_LOWEST      = 0,
236   GTK_PATH_PRIO_GTK         = 4,
237   GTK_PATH_PRIO_APPLICATION = 8,
238   GTK_PATH_PRIO_THEME       = 10,
239   GTK_PATH_PRIO_RC          = 12,
240   GTK_PATH_PRIO_HIGHEST     = 15
241 } GtkPathPriorityType;
242 #define GTK_PATH_PRIO_MASK 0x0f
243
244 /* widget path types */
245 typedef enum
246 {
247   GTK_PATH_WIDGET,
248   GTK_PATH_WIDGET_CLASS,
249   GTK_PATH_CLASS
250 } GtkPathType;
251
252 /* Scrollbar policy types (for scrolled windows) */
253 typedef enum
254 {
255   GTK_POLICY_ALWAYS,
256   GTK_POLICY_AUTOMATIC,
257   GTK_POLICY_NEVER
258 } GtkPolicyType;
259
260 typedef enum
261 {
262   GTK_POS_LEFT,
263   GTK_POS_RIGHT,
264   GTK_POS_TOP,
265   GTK_POS_BOTTOM
266 } GtkPositionType;
267
268 #ifndef GTK_DISABLE_DEPRECATED
269 typedef enum
270 {
271   GTK_PREVIEW_COLOR,
272   GTK_PREVIEW_GRAYSCALE
273 } GtkPreviewType;
274 #endif /* GTK_DISABLE_DEPRECATED */
275
276 /* Style for buttons */
277 typedef enum
278 {
279   GTK_RELIEF_NORMAL,
280   GTK_RELIEF_HALF,
281   GTK_RELIEF_NONE
282 } GtkReliefStyle;
283
284 /* Resize type */
285 typedef enum
286 {
287   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
288   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
289   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
290 } GtkResizeMode;
291
292 #ifndef GTK_DISABLE_DEPRECATED
293 /* signal run types */
294 typedef enum                    /*< flags >*/
295 {
296   GTK_RUN_FIRST      = G_SIGNAL_RUN_FIRST,
297   GTK_RUN_LAST       = G_SIGNAL_RUN_LAST,
298   GTK_RUN_BOTH       = (GTK_RUN_FIRST | GTK_RUN_LAST),
299   GTK_RUN_NO_RECURSE = G_SIGNAL_NO_RECURSE,
300   GTK_RUN_ACTION     = G_SIGNAL_ACTION,
301   GTK_RUN_NO_HOOKS   = G_SIGNAL_NO_HOOKS
302 } GtkSignalRunType;
303 #endif /* GTK_DISABLE_DEPRECATED */
304
305 /* scrolling types */
306 typedef enum
307 {
308   GTK_SCROLL_NONE,
309   GTK_SCROLL_JUMP,
310   GTK_SCROLL_STEP_BACKWARD,
311   GTK_SCROLL_STEP_FORWARD,
312   GTK_SCROLL_PAGE_BACKWARD,
313   GTK_SCROLL_PAGE_FORWARD,
314   GTK_SCROLL_STEP_UP,
315   GTK_SCROLL_STEP_DOWN,
316   GTK_SCROLL_PAGE_UP,
317   GTK_SCROLL_PAGE_DOWN,
318   GTK_SCROLL_STEP_LEFT,
319   GTK_SCROLL_STEP_RIGHT,
320   GTK_SCROLL_PAGE_LEFT,
321   GTK_SCROLL_PAGE_RIGHT,
322   GTK_SCROLL_START,
323   GTK_SCROLL_END
324 } GtkScrollType;
325
326 /* list selection modes */
327 typedef enum
328 {
329   GTK_SELECTION_NONE,                             /* Nothing can be selected */
330   GTK_SELECTION_SINGLE,
331   GTK_SELECTION_BROWSE,
332   GTK_SELECTION_MULTIPLE,
333   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
334 } GtkSelectionMode;
335
336 /* Shadow types */
337 typedef enum
338 {
339   GTK_SHADOW_NONE,
340   GTK_SHADOW_IN,
341   GTK_SHADOW_OUT,
342   GTK_SHADOW_ETCHED_IN,
343   GTK_SHADOW_ETCHED_OUT
344 } GtkShadowType;
345
346 /* Widget states */
347 typedef enum
348 {
349   GTK_STATE_NORMAL,
350   GTK_STATE_ACTIVE,
351   GTK_STATE_PRELIGHT,
352   GTK_STATE_SELECTED,
353   GTK_STATE_INSENSITIVE
354 } GtkStateType;
355
356 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
357 /* Directions for submenus */
358 typedef enum
359 {
360   GTK_DIRECTION_LEFT,
361   GTK_DIRECTION_RIGHT
362 } GtkSubmenuDirection;
363
364 /* Placement of submenus */
365 typedef enum
366 {
367   GTK_TOP_BOTTOM,
368   GTK_LEFT_RIGHT
369 } GtkSubmenuPlacement;
370 #endif /* GTK_DISABLE_DEPRECATED */
371
372 /* Style for toolbars */
373 typedef enum
374 {
375   GTK_TOOLBAR_ICONS,
376   GTK_TOOLBAR_TEXT,
377   GTK_TOOLBAR_BOTH,
378   GTK_TOOLBAR_BOTH_HORIZ
379 } GtkToolbarStyle;
380
381 /* Data update types (for ranges) */
382 typedef enum
383 {
384   GTK_UPDATE_CONTINUOUS,
385   GTK_UPDATE_DISCONTINUOUS,
386   GTK_UPDATE_DELAYED
387 } GtkUpdateType;
388
389 /* Generic visibility flags */
390 typedef enum
391 {
392   GTK_VISIBILITY_NONE,
393   GTK_VISIBILITY_PARTIAL,
394   GTK_VISIBILITY_FULL
395 } GtkVisibility;
396
397 /* Window position types */
398 typedef enum
399 {
400   GTK_WIN_POS_NONE,
401   GTK_WIN_POS_CENTER,
402   GTK_WIN_POS_MOUSE,
403   GTK_WIN_POS_CENTER_ALWAYS,
404   GTK_WIN_POS_CENTER_ON_PARENT
405 } GtkWindowPosition;
406
407 /* Window types */
408 typedef enum
409 {
410   GTK_WINDOW_TOPLEVEL,
411   GTK_WINDOW_POPUP
412 } GtkWindowType;
413
414 /* Text wrap */
415 typedef enum
416 {
417   GTK_WRAP_NONE,
418   GTK_WRAP_CHAR,
419   GTK_WRAP_WORD,
420   GTK_WRAP_WORD_CHAR
421 } GtkWrapMode;
422
423 /* How to sort */
424 typedef enum
425 {
426   GTK_SORT_ASCENDING,
427   GTK_SORT_DESCENDING
428 } GtkSortType;
429
430 /* Style for gtk input method preedit/status */
431 typedef enum
432 {
433   GTK_IM_PREEDIT_NOTHING,
434   GTK_IM_PREEDIT_CALLBACK
435 } GtkIMPreeditStyle;
436
437 typedef enum
438 {
439   GTK_IM_STATUS_NOTHING,
440   GTK_IM_STATUS_CALLBACK
441 } GtkIMStatusStyle;
442
443 #ifdef __cplusplus
444 }
445 #endif /* __cplusplus */
446
447
448 #endif /* __GTK_ENUMS_H__ */