]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
Move documentation to inline comments: GtkRange
[~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 typedef enum
213 {
214   GTK_MOVEMENT_LOGICAL_POSITIONS, /* move by forw/back graphemes */
215   GTK_MOVEMENT_VISUAL_POSITIONS,  /* move by left/right graphemes */
216   GTK_MOVEMENT_WORDS,             /* move by forward/back words */
217   GTK_MOVEMENT_DISPLAY_LINES,     /* move up/down lines (wrapped lines) */
218   GTK_MOVEMENT_DISPLAY_LINE_ENDS, /* move to either end of a line */
219   GTK_MOVEMENT_PARAGRAPHS,        /* move up/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 } GtkMovementStep;
225
226 typedef enum
227 {
228   GTK_SCROLL_STEPS,
229   GTK_SCROLL_PAGES,
230   GTK_SCROLL_ENDS,
231   GTK_SCROLL_HORIZONTAL_STEPS,
232   GTK_SCROLL_HORIZONTAL_PAGES,
233   GTK_SCROLL_HORIZONTAL_ENDS
234 } GtkScrollStep;
235
236 /* Orientation for toolbars, etc. */
237 typedef enum
238 {
239   GTK_ORIENTATION_HORIZONTAL,
240   GTK_ORIENTATION_VERTICAL
241 } GtkOrientation;
242
243 /* Placement type for scrolled window */
244 typedef enum
245 {
246   GTK_CORNER_TOP_LEFT,
247   GTK_CORNER_BOTTOM_LEFT,
248   GTK_CORNER_TOP_RIGHT,
249   GTK_CORNER_BOTTOM_RIGHT
250 } GtkCornerType;
251
252 /* Packing types (for boxes) */
253 typedef enum
254 {
255   GTK_PACK_START,
256   GTK_PACK_END
257 } GtkPackType;
258
259 /* priorities for path lookups */
260 typedef enum
261 {
262   GTK_PATH_PRIO_LOWEST      = 0,
263   GTK_PATH_PRIO_GTK         = 4,
264   GTK_PATH_PRIO_APPLICATION = 8,
265   GTK_PATH_PRIO_THEME       = 10,
266   GTK_PATH_PRIO_RC          = 12,
267   GTK_PATH_PRIO_HIGHEST     = 15
268 } GtkPathPriorityType;
269 #define GTK_PATH_PRIO_MASK 0x0f
270
271 /* widget path types */
272 typedef enum
273 {
274   GTK_PATH_WIDGET,
275   GTK_PATH_WIDGET_CLASS,
276   GTK_PATH_CLASS
277 } GtkPathType;
278
279 /* Scrollbar policy types (for scrolled windows) */
280 typedef enum
281 {
282   GTK_POLICY_ALWAYS,
283   GTK_POLICY_AUTOMATIC,
284   GTK_POLICY_NEVER
285 } GtkPolicyType;
286
287 typedef enum
288 {
289   GTK_POS_LEFT,
290   GTK_POS_RIGHT,
291   GTK_POS_TOP,
292   GTK_POS_BOTTOM
293 } GtkPositionType;
294
295 /* Style for buttons */
296 typedef enum
297 {
298   GTK_RELIEF_NORMAL,
299   GTK_RELIEF_HALF,
300   GTK_RELIEF_NONE
301 } GtkReliefStyle;
302
303 /* Resize type */
304 typedef enum
305 {
306   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
307   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
308   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
309 } GtkResizeMode;
310
311 /* scrolling types */
312 typedef enum
313 {
314   GTK_SCROLL_NONE,
315   GTK_SCROLL_JUMP,
316   GTK_SCROLL_STEP_BACKWARD,
317   GTK_SCROLL_STEP_FORWARD,
318   GTK_SCROLL_PAGE_BACKWARD,
319   GTK_SCROLL_PAGE_FORWARD,
320   GTK_SCROLL_STEP_UP,
321   GTK_SCROLL_STEP_DOWN,
322   GTK_SCROLL_PAGE_UP,
323   GTK_SCROLL_PAGE_DOWN,
324   GTK_SCROLL_STEP_LEFT,
325   GTK_SCROLL_STEP_RIGHT,
326   GTK_SCROLL_PAGE_LEFT,
327   GTK_SCROLL_PAGE_RIGHT,
328   GTK_SCROLL_START,
329   GTK_SCROLL_END
330 } GtkScrollType;
331
332 /* list selection modes */
333 typedef enum
334 {
335   GTK_SELECTION_NONE,                             /* Nothing can be selected */
336   GTK_SELECTION_SINGLE,
337   GTK_SELECTION_BROWSE,
338   GTK_SELECTION_MULTIPLE,
339   GTK_SELECTION_EXTENDED = GTK_SELECTION_MULTIPLE /* Deprecated */
340 } GtkSelectionMode;
341
342 /* Shadow types */
343 typedef enum
344 {
345   GTK_SHADOW_NONE,
346   GTK_SHADOW_IN,
347   GTK_SHADOW_OUT,
348   GTK_SHADOW_ETCHED_IN,
349   GTK_SHADOW_ETCHED_OUT
350 } GtkShadowType;
351
352 /* Widget states */
353 typedef enum
354 {
355   GTK_STATE_NORMAL,
356   GTK_STATE_ACTIVE,
357   GTK_STATE_PRELIGHT,
358   GTK_STATE_SELECTED,
359   GTK_STATE_INSENSITIVE
360 } GtkStateType;
361
362 #if !defined(GTK_DISABLE_DEPRECATED) || defined (GTK_MENU_INTERNALS)
363 /* Directions for submenus */
364 typedef enum
365 {
366   GTK_DIRECTION_LEFT,
367   GTK_DIRECTION_RIGHT
368 } GtkSubmenuDirection;
369
370 /* Placement of submenus */
371 typedef enum
372 {
373   GTK_TOP_BOTTOM,
374   GTK_LEFT_RIGHT
375 } GtkSubmenuPlacement;
376 #endif /* GTK_DISABLE_DEPRECATED */
377
378 /* Style for toolbars */
379 typedef enum
380 {
381   GTK_TOOLBAR_ICONS,
382   GTK_TOOLBAR_TEXT,
383   GTK_TOOLBAR_BOTH,
384   GTK_TOOLBAR_BOTH_HORIZ
385 } GtkToolbarStyle;
386
387 /* Data update types (for ranges) */
388 typedef enum
389 {
390   GTK_UPDATE_CONTINUOUS,
391   GTK_UPDATE_DISCONTINUOUS,
392   GTK_UPDATE_DELAYED
393 } GtkUpdateType;
394
395 /* Generic visibility flags */
396 typedef enum
397 {
398   GTK_VISIBILITY_NONE,
399   GTK_VISIBILITY_PARTIAL,
400   GTK_VISIBILITY_FULL
401 } GtkVisibility;
402
403 /* Window position types */
404 typedef enum
405 {
406   GTK_WIN_POS_NONE,
407   GTK_WIN_POS_CENTER,
408   GTK_WIN_POS_MOUSE,
409   GTK_WIN_POS_CENTER_ALWAYS,
410   GTK_WIN_POS_CENTER_ON_PARENT
411 } GtkWindowPosition;
412
413 /* Window types */
414 typedef enum
415 {
416   GTK_WINDOW_TOPLEVEL,
417   GTK_WINDOW_POPUP
418 } GtkWindowType;
419
420 /* Text wrap */
421 typedef enum
422 {
423   GTK_WRAP_NONE,
424   GTK_WRAP_CHAR,
425   GTK_WRAP_WORD,
426   GTK_WRAP_WORD_CHAR
427 } GtkWrapMode;
428
429 /* How to sort */
430 typedef enum
431 {
432   GTK_SORT_ASCENDING,
433   GTK_SORT_DESCENDING
434 } GtkSortType;
435
436 /* Style for gtk input method preedit/status */
437 typedef enum
438 {
439   GTK_IM_PREEDIT_NOTHING,
440   GTK_IM_PREEDIT_CALLBACK,
441   GTK_IM_PREEDIT_NONE
442 } GtkIMPreeditStyle;
443
444 typedef enum
445 {
446   GTK_IM_STATUS_NOTHING,
447   GTK_IM_STATUS_CALLBACK,
448   GTK_IM_STATUS_NONE
449 } GtkIMStatusStyle;
450
451 typedef enum
452 {
453   GTK_PACK_DIRECTION_LTR,
454   GTK_PACK_DIRECTION_RTL,
455   GTK_PACK_DIRECTION_TTB,
456   GTK_PACK_DIRECTION_BTT
457 } GtkPackDirection;
458
459 typedef enum
460 {
461   GTK_PRINT_PAGES_ALL,
462   GTK_PRINT_PAGES_CURRENT,
463   GTK_PRINT_PAGES_RANGES,
464   GTK_PRINT_PAGES_SELECTION
465 } GtkPrintPages;
466
467 typedef enum
468 {
469   GTK_PAGE_SET_ALL,
470   GTK_PAGE_SET_EVEN,
471   GTK_PAGE_SET_ODD
472 } GtkPageSet;
473
474 typedef enum
475 {
476   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM, /*< nick=lrtb >*/
477   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, /*< nick=lrbt >*/
478   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM, /*< nick=rltb >*/
479   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, /*< nick=rlbt >*/
480   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, /*< nick=tblr >*/
481   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, /*< nick=tbrl >*/
482   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, /*< nick=btlr >*/
483   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT  /*< nick=btrl >*/
484 } GtkNumberUpLayout;
485
486 typedef enum
487 {
488   GTK_PAGE_ORIENTATION_PORTRAIT,
489   GTK_PAGE_ORIENTATION_LANDSCAPE,
490   GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
491   GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
492 } GtkPageOrientation;
493
494 typedef enum
495 {
496   GTK_PRINT_QUALITY_LOW,
497   GTK_PRINT_QUALITY_NORMAL,
498   GTK_PRINT_QUALITY_HIGH,
499   GTK_PRINT_QUALITY_DRAFT
500 } GtkPrintQuality;
501
502 typedef enum
503 {
504   GTK_PRINT_DUPLEX_SIMPLEX,
505   GTK_PRINT_DUPLEX_HORIZONTAL,
506   GTK_PRINT_DUPLEX_VERTICAL
507 } GtkPrintDuplex;
508
509
510 typedef enum
511 {
512   GTK_UNIT_PIXEL,
513   GTK_UNIT_POINTS,
514   GTK_UNIT_INCH,
515   GTK_UNIT_MM
516 } GtkUnit;
517
518 typedef enum
519 {
520   GTK_TREE_VIEW_GRID_LINES_NONE,
521   GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
522   GTK_TREE_VIEW_GRID_LINES_VERTICAL,
523   GTK_TREE_VIEW_GRID_LINES_BOTH
524 } GtkTreeViewGridLines;
525
526 typedef enum
527 {
528   GTK_DRAG_RESULT_SUCCESS,
529   GTK_DRAG_RESULT_NO_TARGET,
530   GTK_DRAG_RESULT_USER_CANCELLED,
531   GTK_DRAG_RESULT_TIMEOUT_EXPIRED,
532   GTK_DRAG_RESULT_GRAB_BROKEN,
533   GTK_DRAG_RESULT_ERROR
534 } GtkDragResult;
535
536 G_END_DECLS
537
538 #endif /* __GTK_ENUMS_H__ */