]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
gtkenums.h: Remove trailing comma to fix warning.
[~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 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
28 #error "Only <gtk/gtk.h> can be included directly."
29 #endif
30
31 #ifndef __GTK_ENUMS_H__
32 #define __GTK_ENUMS_H__
33
34 #include <glib-object.h>
35
36 G_BEGIN_DECLS
37
38 /* Anchor types */
39 typedef enum
40 {
41   GTK_ANCHOR_CENTER,
42   GTK_ANCHOR_NORTH,
43   GTK_ANCHOR_NORTH_WEST,
44   GTK_ANCHOR_NORTH_EAST,
45   GTK_ANCHOR_SOUTH,
46   GTK_ANCHOR_SOUTH_WEST,
47   GTK_ANCHOR_SOUTH_EAST,
48   GTK_ANCHOR_WEST,
49   GTK_ANCHOR_EAST,
50   GTK_ANCHOR_N          = GTK_ANCHOR_NORTH,
51   GTK_ANCHOR_NW         = GTK_ANCHOR_NORTH_WEST,
52   GTK_ANCHOR_NE         = GTK_ANCHOR_NORTH_EAST,
53   GTK_ANCHOR_S          = GTK_ANCHOR_SOUTH,
54   GTK_ANCHOR_SW         = GTK_ANCHOR_SOUTH_WEST,
55   GTK_ANCHOR_SE         = GTK_ANCHOR_SOUTH_EAST,
56   GTK_ANCHOR_W          = GTK_ANCHOR_WEST,
57   GTK_ANCHOR_E          = GTK_ANCHOR_EAST
58 } GtkAnchorType;
59
60 /* Arrow placement */
61 typedef enum
62 {
63   GTK_ARROWS_BOTH,
64   GTK_ARROWS_START,
65   GTK_ARROWS_END
66 } GtkArrowPlacement;
67
68 /* Arrow types */
69 typedef enum
70 {
71   GTK_ARROW_UP,
72   GTK_ARROW_DOWN,
73   GTK_ARROW_LEFT,
74   GTK_ARROW_RIGHT,
75   GTK_ARROW_NONE
76 } GtkArrowType;
77
78 /* Attach options (for tables) */
79 typedef enum
80 {
81   GTK_EXPAND = 1 << 0,
82   GTK_SHRINK = 1 << 1,
83   GTK_FILL   = 1 << 2
84 } GtkAttachOptions;
85
86 /* Button box styles */
87 typedef enum
88 {
89   GTK_BUTTONBOX_DEFAULT_STYLE,
90   GTK_BUTTONBOX_SPREAD,
91   GTK_BUTTONBOX_EDGE,
92   GTK_BUTTONBOX_START,
93   GTK_BUTTONBOX_END,
94   GTK_BUTTONBOX_CENTER
95 } GtkButtonBoxStyle;
96
97 typedef enum
98 {
99   GTK_DELETE_CHARS,
100   GTK_DELETE_WORD_ENDS,           /* delete only the portion of the word to the
101                                    * left/right of cursor if we're in the middle
102                                    * of a word */
103   GTK_DELETE_WORDS,
104   GTK_DELETE_DISPLAY_LINES,
105   GTK_DELETE_DISPLAY_LINE_ENDS,
106   GTK_DELETE_PARAGRAPH_ENDS,      /* like C-k in Emacs (or its reverse) */
107   GTK_DELETE_PARAGRAPHS,          /* C-k in pico, kill whole line */
108   GTK_DELETE_WHITESPACE           /* M-\ in Emacs */
109 } GtkDeleteType;
110
111 /* Focus movement types */
112 typedef enum
113 {
114   GTK_DIR_TAB_FORWARD,
115   GTK_DIR_TAB_BACKWARD,
116   GTK_DIR_UP,
117   GTK_DIR_DOWN,
118   GTK_DIR_LEFT,
119   GTK_DIR_RIGHT
120 } GtkDirectionType;
121
122 /* Expander styles */
123 typedef enum
124 {
125   GTK_EXPANDER_COLLAPSED,
126   GTK_EXPANDER_SEMI_COLLAPSED,
127   GTK_EXPANDER_SEMI_EXPANDED,
128   GTK_EXPANDER_EXPANDED
129 } GtkExpanderStyle;
130
131 /* Built-in stock icon sizes */
132 typedef enum
133 {
134   GTK_ICON_SIZE_INVALID,
135   GTK_ICON_SIZE_MENU,
136   GTK_ICON_SIZE_SMALL_TOOLBAR,
137   GTK_ICON_SIZE_LARGE_TOOLBAR,
138   GTK_ICON_SIZE_BUTTON,
139   GTK_ICON_SIZE_DND,
140   GTK_ICON_SIZE_DIALOG
141 } GtkIconSize;
142
143 /**
144  * GtkSensitivityType:
145  * @GTK_SENSITIVITY_AUTO: The arrow is made insensitive if the
146  *   thumb is at the end
147  * @GTK_SENSITIVITY_ON: The arrow is always sensitive
148  * @GTK_SENSITIVITY_OFF: The arrow is always insensitive
149  *
150  * Determines how GTK+ handles the sensitivity of stepper arrows
151  * at the end of range widgets.
152  */
153 typedef enum
154 {
155   GTK_SENSITIVITY_AUTO,
156   GTK_SENSITIVITY_ON,
157   GTK_SENSITIVITY_OFF
158 } GtkSensitivityType;
159
160 /* Reading directions for text */
161 typedef enum
162 {
163   GTK_TEXT_DIR_NONE,
164   GTK_TEXT_DIR_LTR,
165   GTK_TEXT_DIR_RTL
166 } GtkTextDirection;
167
168 /* justification for label and maybe other widgets (text?) */
169 typedef enum
170 {
171   GTK_JUSTIFY_LEFT,
172   GTK_JUSTIFY_RIGHT,
173   GTK_JUSTIFY_CENTER,
174   GTK_JUSTIFY_FILL
175 } GtkJustification;
176
177 /* Menu keyboard movement types */
178 typedef enum
179 {
180   GTK_MENU_DIR_PARENT,
181   GTK_MENU_DIR_CHILD,
182   GTK_MENU_DIR_NEXT,
183   GTK_MENU_DIR_PREV
184 } GtkMenuDirectionType;
185
186 /**
187  * GtkMessageType:
188  * @GTK_MESSAGE_INFO: Informational message
189  * @GTK_MESSAGE_WARNING: Nonfatal warning message
190  * @GTK_MESSAGE_QUESTION: Question requiring a choice
191  * @GTK_MESSAGE_ERROR: Fatal error message
192  * @GTK_MESSAGE_OTHER: None of the above, doesn't get an icon
193  *
194  * The type of message being displayed in the dialog.
195  */
196 typedef enum
197 {
198   GTK_MESSAGE_INFO,
199   GTK_MESSAGE_WARNING,
200   GTK_MESSAGE_QUESTION,
201   GTK_MESSAGE_ERROR,
202   GTK_MESSAGE_OTHER
203 } GtkMessageType;
204
205 typedef enum
206 {
207   GTK_PIXELS,
208   GTK_INCHES,
209   GTK_CENTIMETERS
210 } GtkMetricType;
211
212 /**
213  * GtkMovementStep:
214  * @GTK_MOVEMENT_LOGICAL_POSITIONS: Move forward or back by graphemes
215  * @GTK_MOVEMENT_VISUAL_POSITIONS:  Move left or right by graphemes
216  * @GTK_MOVEMENT_WORDS:             Move forward or back by words
217  * @GTK_MOVEMENT_DISPLAY_LINES:     Move up or down lines (wrapped lines)
218  * @GTK_MOVEMENT_DISPLAY_LINE_ENDS: Move to either end of a line
219  * @GTK_MOVEMENT_PARAGRAPHS:        Move up or down paragraphs (newline-ended lines)
220  * @GTK_MOVEMENT_PARAGRAPH_ENDS:    Move to either end of a paragraph
221  * @GTK_MOVEMENT_PAGES:             Move by pages
222  * @GTK_MOVEMENT_BUFFER_ENDS:       Move to ends of the buffer
223  * @GTK_MOVEMENT_HORIZONTAL_PAGES:  Move horizontally by pages
224  */
225 typedef enum
226 {
227   GTK_MOVEMENT_LOGICAL_POSITIONS,
228   GTK_MOVEMENT_VISUAL_POSITIONS,
229   GTK_MOVEMENT_WORDS,
230   GTK_MOVEMENT_DISPLAY_LINES,
231   GTK_MOVEMENT_DISPLAY_LINE_ENDS,
232   GTK_MOVEMENT_PARAGRAPHS,
233   GTK_MOVEMENT_PARAGRAPH_ENDS,
234   GTK_MOVEMENT_PAGES,
235   GTK_MOVEMENT_BUFFER_ENDS,
236   GTK_MOVEMENT_HORIZONTAL_PAGES
237 } GtkMovementStep;
238
239 typedef enum
240 {
241   GTK_SCROLL_STEPS,
242   GTK_SCROLL_PAGES,
243   GTK_SCROLL_ENDS,
244   GTK_SCROLL_HORIZONTAL_STEPS,
245   GTK_SCROLL_HORIZONTAL_PAGES,
246   GTK_SCROLL_HORIZONTAL_ENDS
247 } GtkScrollStep;
248
249 /* Orientation for toolbars, etc. */
250 typedef enum
251 {
252   GTK_ORIENTATION_HORIZONTAL,
253   GTK_ORIENTATION_VERTICAL
254 } GtkOrientation;
255
256 /* Placement type for scrolled window */
257 typedef enum
258 {
259   GTK_CORNER_TOP_LEFT,
260   GTK_CORNER_BOTTOM_LEFT,
261   GTK_CORNER_TOP_RIGHT,
262   GTK_CORNER_BOTTOM_RIGHT
263 } GtkCornerType;
264
265 /* Packing types (for boxes) */
266 typedef enum
267 {
268   GTK_PACK_START,
269   GTK_PACK_END
270 } GtkPackType;
271
272 /* priorities for path lookups */
273 typedef enum
274 {
275   GTK_PATH_PRIO_LOWEST      = 0,
276   GTK_PATH_PRIO_GTK         = 4,
277   GTK_PATH_PRIO_APPLICATION = 8,
278   GTK_PATH_PRIO_THEME       = 10,
279   GTK_PATH_PRIO_RC          = 12,
280   GTK_PATH_PRIO_HIGHEST     = 15
281 } GtkPathPriorityType;
282 #define GTK_PATH_PRIO_MASK 0x0f
283
284 /* widget path types */
285 typedef enum
286 {
287   GTK_PATH_WIDGET,
288   GTK_PATH_WIDGET_CLASS,
289   GTK_PATH_CLASS
290 } GtkPathType;
291
292 /* Scrollbar policy types (for scrolled windows) */
293 typedef enum
294 {
295   GTK_POLICY_ALWAYS,
296   GTK_POLICY_AUTOMATIC,
297   GTK_POLICY_NEVER
298 } GtkPolicyType;
299
300 typedef enum
301 {
302   GTK_POS_LEFT,
303   GTK_POS_RIGHT,
304   GTK_POS_TOP,
305   GTK_POS_BOTTOM
306 } GtkPositionType;
307
308 /* Style for buttons */
309 typedef enum
310 {
311   GTK_RELIEF_NORMAL,
312   GTK_RELIEF_HALF,
313   GTK_RELIEF_NONE
314 } GtkReliefStyle;
315
316 /* Resize type */
317 typedef enum
318 {
319   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
320   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
321   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
322 } GtkResizeMode;
323
324 /* scrolling types */
325 typedef enum
326 {
327   GTK_SCROLL_NONE,
328   GTK_SCROLL_JUMP,
329   GTK_SCROLL_STEP_BACKWARD,
330   GTK_SCROLL_STEP_FORWARD,
331   GTK_SCROLL_PAGE_BACKWARD,
332   GTK_SCROLL_PAGE_FORWARD,
333   GTK_SCROLL_STEP_UP,
334   GTK_SCROLL_STEP_DOWN,
335   GTK_SCROLL_PAGE_UP,
336   GTK_SCROLL_PAGE_DOWN,
337   GTK_SCROLL_STEP_LEFT,
338   GTK_SCROLL_STEP_RIGHT,
339   GTK_SCROLL_PAGE_LEFT,
340   GTK_SCROLL_PAGE_RIGHT,
341   GTK_SCROLL_START,
342   GTK_SCROLL_END
343 } GtkScrollType;
344
345 /* list selection modes */
346 typedef enum
347 {
348   GTK_SELECTION_NONE,                             /* Nothing can be selected */
349   GTK_SELECTION_SINGLE,
350   GTK_SELECTION_BROWSE,
351   GTK_SELECTION_MULTIPLE,
352   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
353 } GtkSelectionMode;
354
355 /* Shadow types */
356 typedef enum
357 {
358   GTK_SHADOW_NONE,
359   GTK_SHADOW_IN,
360   GTK_SHADOW_OUT,
361   GTK_SHADOW_ETCHED_IN,
362   GTK_SHADOW_ETCHED_OUT
363 } GtkShadowType;
364
365 /* Widget states */
366 typedef enum
367 {
368   GTK_STATE_NORMAL,
369   GTK_STATE_ACTIVE,
370   GTK_STATE_PRELIGHT,
371   GTK_STATE_SELECTED,
372   GTK_STATE_INSENSITIVE
373 } GtkStateType;
374
375 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
376 /* Directions for submenus */
377 typedef enum
378 {
379   GTK_DIRECTION_LEFT,
380   GTK_DIRECTION_RIGHT
381 } GtkSubmenuDirection;
382
383 /* Placement of submenus */
384 typedef enum
385 {
386   GTK_TOP_BOTTOM,
387   GTK_LEFT_RIGHT
388 } GtkSubmenuPlacement;
389 #endif /* GTK_DISABLE_DEPRECATED */
390
391 /* Style for toolbars */
392 typedef enum
393 {
394   GTK_TOOLBAR_ICONS,
395   GTK_TOOLBAR_TEXT,
396   GTK_TOOLBAR_BOTH,
397   GTK_TOOLBAR_BOTH_HORIZ
398 } GtkToolbarStyle;
399
400 /* Data update types (for ranges) */
401 typedef enum
402 {
403   GTK_UPDATE_CONTINUOUS,
404   GTK_UPDATE_DISCONTINUOUS,
405   GTK_UPDATE_DELAYED
406 } GtkUpdateType;
407
408 /* Generic visibility flags */
409 typedef enum
410 {
411   GTK_VISIBILITY_NONE,
412   GTK_VISIBILITY_PARTIAL,
413   GTK_VISIBILITY_FULL
414 } GtkVisibility;
415
416 /* Window position types */
417 typedef enum
418 {
419   GTK_WIN_POS_NONE,
420   GTK_WIN_POS_CENTER,
421   GTK_WIN_POS_MOUSE,
422   GTK_WIN_POS_CENTER_ALWAYS,
423   GTK_WIN_POS_CENTER_ON_PARENT
424 } GtkWindowPosition;
425
426 /* Window types */
427 typedef enum
428 {
429   GTK_WINDOW_TOPLEVEL,
430   GTK_WINDOW_POPUP
431 } GtkWindowType;
432
433 /* Text wrap */
434 typedef enum
435 {
436   GTK_WRAP_NONE,
437   GTK_WRAP_CHAR,
438   GTK_WRAP_WORD,
439   GTK_WRAP_WORD_CHAR
440 } GtkWrapMode;
441
442 /* How to sort */
443 typedef enum
444 {
445   GTK_SORT_ASCENDING,
446   GTK_SORT_DESCENDING
447 } GtkSortType;
448
449 /* Style for gtk input method preedit/status */
450 typedef enum
451 {
452   GTK_IM_PREEDIT_NOTHING,
453   GTK_IM_PREEDIT_CALLBACK,
454   GTK_IM_PREEDIT_NONE
455 } GtkIMPreeditStyle;
456
457 typedef enum
458 {
459   GTK_IM_STATUS_NOTHING,
460   GTK_IM_STATUS_CALLBACK,
461   GTK_IM_STATUS_NONE
462 } GtkIMStatusStyle;
463
464 typedef enum
465 {
466   GTK_PACK_DIRECTION_LTR,
467   GTK_PACK_DIRECTION_RTL,
468   GTK_PACK_DIRECTION_TTB,
469   GTK_PACK_DIRECTION_BTT
470 } GtkPackDirection;
471
472 typedef enum
473 {
474   GTK_PRINT_PAGES_ALL,
475   GTK_PRINT_PAGES_CURRENT,
476   GTK_PRINT_PAGES_RANGES,
477   GTK_PRINT_PAGES_SELECTION
478 } GtkPrintPages;
479
480 typedef enum
481 {
482   GTK_PAGE_SET_ALL,
483   GTK_PAGE_SET_EVEN,
484   GTK_PAGE_SET_ODD
485 } GtkPageSet;
486
487 typedef enum
488 {
489   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM, /*< nick=lrtb >*/
490   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, /*< nick=lrbt >*/
491   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM, /*< nick=rltb >*/
492   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, /*< nick=rlbt >*/
493   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, /*< nick=tblr >*/
494   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, /*< nick=tbrl >*/
495   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, /*< nick=btlr >*/
496   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT  /*< nick=btrl >*/
497 } GtkNumberUpLayout;
498
499 typedef enum
500 {
501   GTK_PAGE_ORIENTATION_PORTRAIT,
502   GTK_PAGE_ORIENTATION_LANDSCAPE,
503   GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
504   GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
505 } GtkPageOrientation;
506
507 typedef enum
508 {
509   GTK_PRINT_QUALITY_LOW,
510   GTK_PRINT_QUALITY_NORMAL,
511   GTK_PRINT_QUALITY_HIGH,
512   GTK_PRINT_QUALITY_DRAFT
513 } GtkPrintQuality;
514
515 typedef enum
516 {
517   GTK_PRINT_DUPLEX_SIMPLEX,
518   GTK_PRINT_DUPLEX_HORIZONTAL,
519   GTK_PRINT_DUPLEX_VERTICAL
520 } GtkPrintDuplex;
521
522
523 typedef enum
524 {
525   GTK_UNIT_PIXEL,
526   GTK_UNIT_POINTS,
527   GTK_UNIT_INCH,
528   GTK_UNIT_MM
529 } GtkUnit;
530
531 typedef enum
532 {
533   GTK_TREE_VIEW_GRID_LINES_NONE,
534   GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
535   GTK_TREE_VIEW_GRID_LINES_VERTICAL,
536   GTK_TREE_VIEW_GRID_LINES_BOTH
537 } GtkTreeViewGridLines;
538
539 typedef enum
540 {
541   GTK_DRAG_RESULT_SUCCESS,
542   GTK_DRAG_RESULT_NO_TARGET,
543   GTK_DRAG_RESULT_USER_CANCELLED,
544   GTK_DRAG_RESULT_TIMEOUT_EXPIRED,
545   GTK_DRAG_RESULT_GRAB_BROKEN,
546   GTK_DRAG_RESULT_ERROR
547 } GtkDragResult;
548
549 /**
550  * GtkSizeRequestMode:
551  * @GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH: Prefer height-for-width geometry management
552  * @GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT: Prefer width-for-height geometry management
553  * 
554  * Specifies a preference for height-for-width or
555  * width-for-height geometry management.
556  */
557 typedef enum
558 {
559   GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH = 0,
560   GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT
561 } GtkSizeRequestMode;
562
563
564 G_END_DECLS
565
566 #endif /* __GTK_ENUMS_H__ */