]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
Merge branch 'master' into toolpalette
[~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_DISABLE_SINGLE_INCLUDES) && !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 /* Curve types */
98 typedef enum
99 {
100   GTK_CURVE_TYPE_LINEAR,       /* linear interpolation */
101   GTK_CURVE_TYPE_SPLINE,       /* spline interpolation */
102   GTK_CURVE_TYPE_FREE          /* free form curve */
103 } GtkCurveType;
104
105 typedef enum
106 {
107   GTK_DELETE_CHARS,
108   GTK_DELETE_WORD_ENDS,           /* delete only the portion of the word to the
109                                    * left/right of cursor if we're in the middle
110                                    * of a word */
111   GTK_DELETE_WORDS,
112   GTK_DELETE_DISPLAY_LINES,
113   GTK_DELETE_DISPLAY_LINE_ENDS,
114   GTK_DELETE_PARAGRAPH_ENDS,      /* like C-k in Emacs (or its reverse) */
115   GTK_DELETE_PARAGRAPHS,          /* C-k in pico, kill whole line */
116   GTK_DELETE_WHITESPACE           /* M-\ in Emacs */
117 } GtkDeleteType;
118
119 /* Focus movement types */
120 typedef enum
121 {
122   GTK_DIR_TAB_FORWARD,
123   GTK_DIR_TAB_BACKWARD,
124   GTK_DIR_UP,
125   GTK_DIR_DOWN,
126   GTK_DIR_LEFT,
127   GTK_DIR_RIGHT
128 } GtkDirectionType;
129
130 /* Expander styles */
131 typedef enum
132 {
133   GTK_EXPANDER_COLLAPSED,
134   GTK_EXPANDER_SEMI_COLLAPSED,
135   GTK_EXPANDER_SEMI_EXPANDED,
136   GTK_EXPANDER_EXPANDED
137 } GtkExpanderStyle;
138
139 /* Built-in stock icon sizes */
140 typedef enum
141 {
142   GTK_ICON_SIZE_INVALID,
143   GTK_ICON_SIZE_MENU,
144   GTK_ICON_SIZE_SMALL_TOOLBAR,
145   GTK_ICON_SIZE_LARGE_TOOLBAR,
146   GTK_ICON_SIZE_BUTTON,
147   GTK_ICON_SIZE_DND,
148   GTK_ICON_SIZE_DIALOG
149 } GtkIconSize;
150
151 /* automatic sensitivity */
152 typedef enum
153 {
154   GTK_SENSITIVITY_AUTO,
155   GTK_SENSITIVITY_ON,
156   GTK_SENSITIVITY_OFF
157 } GtkSensitivityType;
158
159 #ifndef GTK_DISABLE_DEPRECATED
160 /* side types */
161 typedef enum
162 {
163   GTK_SIDE_TOP,
164   GTK_SIDE_BOTTOM,
165   GTK_SIDE_LEFT,
166   GTK_SIDE_RIGHT
167 } GtkSideType;
168 #endif /* GTK_DISABLE_DEPRECATED */
169
170 /* Reading directions for text */
171 typedef enum
172 {
173   GTK_TEXT_DIR_NONE,
174   GTK_TEXT_DIR_LTR,
175   GTK_TEXT_DIR_RTL
176 } GtkTextDirection;
177
178 /* justification for label and maybe other widgets (text?) */
179 typedef enum
180 {
181   GTK_JUSTIFY_LEFT,
182   GTK_JUSTIFY_RIGHT,
183   GTK_JUSTIFY_CENTER,
184   GTK_JUSTIFY_FILL
185 } GtkJustification;
186
187 #ifndef GTK_DISABLE_DEPRECATED
188 /* GtkPatternSpec match types */
189 typedef enum
190 {
191   GTK_MATCH_ALL,       /* "*A?A*" */
192   GTK_MATCH_ALL_TAIL,  /* "*A?AA" */
193   GTK_MATCH_HEAD,      /* "AAAA*" */
194   GTK_MATCH_TAIL,      /* "*AAAA" */
195   GTK_MATCH_EXACT,     /* "AAAAA" */
196   GTK_MATCH_LAST
197 } GtkMatchType;
198 #endif /* GTK_DISABLE_DEPRECATED */
199
200 /* Menu keyboard movement types */
201 typedef enum
202 {
203   GTK_MENU_DIR_PARENT,
204   GTK_MENU_DIR_CHILD,
205   GTK_MENU_DIR_NEXT,
206   GTK_MENU_DIR_PREV
207 } GtkMenuDirectionType;
208
209 typedef enum
210 {
211   GTK_MESSAGE_INFO,
212   GTK_MESSAGE_WARNING,
213   GTK_MESSAGE_QUESTION,
214   GTK_MESSAGE_ERROR,
215   GTK_MESSAGE_OTHER
216 } GtkMessageType;
217
218 typedef enum
219 {
220   GTK_PIXELS,
221   GTK_INCHES,
222   GTK_CENTIMETERS
223 } GtkMetricType;
224
225 typedef enum
226 {
227   GTK_MOVEMENT_LOGICAL_POSITIONS, /* move by forw/back graphemes */
228   GTK_MOVEMENT_VISUAL_POSITIONS,  /* move by left/right graphemes */
229   GTK_MOVEMENT_WORDS,             /* move by forward/back words */
230   GTK_MOVEMENT_DISPLAY_LINES,     /* move up/down lines (wrapped lines) */
231   GTK_MOVEMENT_DISPLAY_LINE_ENDS, /* move to either end of a line */
232   GTK_MOVEMENT_PARAGRAPHS,        /* move up/down paragraphs (newline-ended lines) */
233   GTK_MOVEMENT_PARAGRAPH_ENDS,    /* move to either end of a paragraph */
234   GTK_MOVEMENT_PAGES,             /* move by pages */
235   GTK_MOVEMENT_BUFFER_ENDS,       /* move to ends of the buffer */
236   GTK_MOVEMENT_HORIZONTAL_PAGES   /* move horizontally by 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 #ifndef GTK_DISABLE_DEPRECATED
309 typedef enum
310 {
311   GTK_PREVIEW_COLOR,
312   GTK_PREVIEW_GRAYSCALE
313 } GtkPreviewType;
314 #endif /* GTK_DISABLE_DEPRECATED */
315
316 /* Style for buttons */
317 typedef enum
318 {
319   GTK_RELIEF_NORMAL,
320   GTK_RELIEF_HALF,
321   GTK_RELIEF_NONE
322 } GtkReliefStyle;
323
324 /* Resize type */
325 typedef enum
326 {
327   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
328   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
329   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
330 } GtkResizeMode;
331
332 #ifndef GTK_DISABLE_DEPRECATED
333 /* signal run types */
334 typedef enum                    /*< flags >*/
335 {
336   GTK_RUN_FIRST      = G_SIGNAL_RUN_FIRST,
337   GTK_RUN_LAST       = G_SIGNAL_RUN_LAST,
338   GTK_RUN_BOTH       = (GTK_RUN_FIRST | GTK_RUN_LAST),
339   GTK_RUN_NO_RECURSE = G_SIGNAL_NO_RECURSE,
340   GTK_RUN_ACTION     = G_SIGNAL_ACTION,
341   GTK_RUN_NO_HOOKS   = G_SIGNAL_NO_HOOKS
342 } GtkSignalRunType;
343 #endif /* GTK_DISABLE_DEPRECATED */
344
345 /* scrolling types */
346 typedef enum
347 {
348   GTK_SCROLL_NONE,
349   GTK_SCROLL_JUMP,
350   GTK_SCROLL_STEP_BACKWARD,
351   GTK_SCROLL_STEP_FORWARD,
352   GTK_SCROLL_PAGE_BACKWARD,
353   GTK_SCROLL_PAGE_FORWARD,
354   GTK_SCROLL_STEP_UP,
355   GTK_SCROLL_STEP_DOWN,
356   GTK_SCROLL_PAGE_UP,
357   GTK_SCROLL_PAGE_DOWN,
358   GTK_SCROLL_STEP_LEFT,
359   GTK_SCROLL_STEP_RIGHT,
360   GTK_SCROLL_PAGE_LEFT,
361   GTK_SCROLL_PAGE_RIGHT,
362   GTK_SCROLL_START,
363   GTK_SCROLL_END
364 } GtkScrollType;
365
366 /* list selection modes */
367 typedef enum
368 {
369   GTK_SELECTION_NONE,                             /* Nothing can be selected */
370   GTK_SELECTION_SINGLE,
371   GTK_SELECTION_BROWSE,
372   GTK_SELECTION_MULTIPLE,
373   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
374 } GtkSelectionMode;
375
376 /* Shadow types */
377 typedef enum
378 {
379   GTK_SHADOW_NONE,
380   GTK_SHADOW_IN,
381   GTK_SHADOW_OUT,
382   GTK_SHADOW_ETCHED_IN,
383   GTK_SHADOW_ETCHED_OUT
384 } GtkShadowType;
385
386 /* Widget states */
387 typedef enum
388 {
389   GTK_STATE_NORMAL,
390   GTK_STATE_ACTIVE,
391   GTK_STATE_PRELIGHT,
392   GTK_STATE_SELECTED,
393   GTK_STATE_INSENSITIVE
394 } GtkStateType;
395
396 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
397 /* Directions for submenus */
398 typedef enum
399 {
400   GTK_DIRECTION_LEFT,
401   GTK_DIRECTION_RIGHT
402 } GtkSubmenuDirection;
403
404 /* Placement of submenus */
405 typedef enum
406 {
407   GTK_TOP_BOTTOM,
408   GTK_LEFT_RIGHT
409 } GtkSubmenuPlacement;
410 #endif /* GTK_DISABLE_DEPRECATED */
411
412 /* Style for toolbars */
413 typedef enum
414 {
415   GTK_TOOLBAR_ICONS,
416   GTK_TOOLBAR_TEXT,
417   GTK_TOOLBAR_BOTH,
418   GTK_TOOLBAR_BOTH_HORIZ
419 } GtkToolbarStyle;
420
421 /* Data update types (for ranges) */
422 typedef enum
423 {
424   GTK_UPDATE_CONTINUOUS,
425   GTK_UPDATE_DISCONTINUOUS,
426   GTK_UPDATE_DELAYED
427 } GtkUpdateType;
428
429 /* Generic visibility flags */
430 typedef enum
431 {
432   GTK_VISIBILITY_NONE,
433   GTK_VISIBILITY_PARTIAL,
434   GTK_VISIBILITY_FULL
435 } GtkVisibility;
436
437 /* Window position types */
438 typedef enum
439 {
440   GTK_WIN_POS_NONE,
441   GTK_WIN_POS_CENTER,
442   GTK_WIN_POS_MOUSE,
443   GTK_WIN_POS_CENTER_ALWAYS,
444   GTK_WIN_POS_CENTER_ON_PARENT
445 } GtkWindowPosition;
446
447 /* Window types */
448 typedef enum
449 {
450   GTK_WINDOW_TOPLEVEL,
451   GTK_WINDOW_POPUP
452 } GtkWindowType;
453
454 /* Text wrap */
455 typedef enum
456 {
457   GTK_WRAP_NONE,
458   GTK_WRAP_CHAR,
459   GTK_WRAP_WORD,
460   GTK_WRAP_WORD_CHAR
461 } GtkWrapMode;
462
463 /* How to sort */
464 typedef enum
465 {
466   GTK_SORT_ASCENDING,
467   GTK_SORT_DESCENDING
468 } GtkSortType;
469
470 /* Style for gtk input method preedit/status */
471 typedef enum
472 {
473   GTK_IM_PREEDIT_NOTHING,
474   GTK_IM_PREEDIT_CALLBACK,
475   GTK_IM_PREEDIT_NONE
476 } GtkIMPreeditStyle;
477
478 typedef enum
479 {
480   GTK_IM_STATUS_NOTHING,
481   GTK_IM_STATUS_CALLBACK,
482   GTK_IM_STATUS_NONE
483 } GtkIMStatusStyle;
484
485 typedef enum
486 {
487   GTK_PACK_DIRECTION_LTR,
488   GTK_PACK_DIRECTION_RTL,
489   GTK_PACK_DIRECTION_TTB,
490   GTK_PACK_DIRECTION_BTT
491 } GtkPackDirection;
492
493 typedef enum
494 {
495   GTK_PRINT_PAGES_ALL,
496   GTK_PRINT_PAGES_CURRENT,
497   GTK_PRINT_PAGES_RANGES,
498   GTK_PRINT_PAGES_SELECTION
499 } GtkPrintPages;
500
501 typedef enum
502 {
503   GTK_PAGE_SET_ALL,
504   GTK_PAGE_SET_EVEN,
505   GTK_PAGE_SET_ODD
506 } GtkPageSet;
507
508 typedef enum
509 {
510   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM, /*< nick=lrtb >*/
511   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, /*< nick=lrbt >*/
512   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM, /*< nick=rltb >*/
513   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, /*< nick=rlbt >*/
514   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, /*< nick=tblr >*/
515   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, /*< nick=tbrl >*/
516   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, /*< nick=btlr >*/
517   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT  /*< nick=btrl >*/
518 } GtkNumberUpLayout;
519
520 typedef enum
521 {
522   GTK_PAGE_ORIENTATION_PORTRAIT,
523   GTK_PAGE_ORIENTATION_LANDSCAPE,
524   GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
525   GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
526 } GtkPageOrientation;
527
528 typedef enum
529 {
530   GTK_PRINT_QUALITY_LOW,
531   GTK_PRINT_QUALITY_NORMAL,
532   GTK_PRINT_QUALITY_HIGH,
533   GTK_PRINT_QUALITY_DRAFT
534 } GtkPrintQuality;
535
536 typedef enum
537 {
538   GTK_PRINT_DUPLEX_SIMPLEX,
539   GTK_PRINT_DUPLEX_HORIZONTAL,
540   GTK_PRINT_DUPLEX_VERTICAL
541 } GtkPrintDuplex;
542
543
544 typedef enum
545 {
546   GTK_UNIT_PIXEL,
547   GTK_UNIT_POINTS,
548   GTK_UNIT_INCH,
549   GTK_UNIT_MM
550 } GtkUnit;
551
552 typedef enum
553 {
554   GTK_TREE_VIEW_GRID_LINES_NONE,
555   GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
556   GTK_TREE_VIEW_GRID_LINES_VERTICAL,
557   GTK_TREE_VIEW_GRID_LINES_BOTH
558 } GtkTreeViewGridLines;
559
560 typedef enum
561 {
562   GTK_DRAG_RESULT_SUCCESS,
563   GTK_DRAG_RESULT_NO_TARGET,
564   GTK_DRAG_RESULT_USER_CANCELLED,
565   GTK_DRAG_RESULT_TIMEOUT_EXPIRED,
566   GTK_DRAG_RESULT_GRAB_BROKEN,
567   GTK_DRAG_RESULT_ERROR
568 } GtkDragResult;
569
570 G_END_DECLS
571
572 #endif /* __GTK_ENUMS_H__ */