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