]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
docs: Add cross-reference in GtkAlign docs
[~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 typedef enum
212 {
213   GTK_PIXELS,
214   GTK_INCHES,
215   GTK_CENTIMETERS
216 } GtkMetricType;
217
218 /**
219  * GtkMovementStep:
220  * @GTK_MOVEMENT_LOGICAL_POSITIONS: Move forward or back by graphemes
221  * @GTK_MOVEMENT_VISUAL_POSITIONS:  Move left or right by graphemes
222  * @GTK_MOVEMENT_WORDS:             Move forward or back by words
223  * @GTK_MOVEMENT_DISPLAY_LINES:     Move up or down lines (wrapped lines)
224  * @GTK_MOVEMENT_DISPLAY_LINE_ENDS: Move to either end of a line
225  * @GTK_MOVEMENT_PARAGRAPHS:        Move up or down paragraphs (newline-ended lines)
226  * @GTK_MOVEMENT_PARAGRAPH_ENDS:    Move to either end of a paragraph
227  * @GTK_MOVEMENT_PAGES:             Move by pages
228  * @GTK_MOVEMENT_BUFFER_ENDS:       Move to ends of the buffer
229  * @GTK_MOVEMENT_HORIZONTAL_PAGES:  Move horizontally by pages
230  */
231 typedef enum
232 {
233   GTK_MOVEMENT_LOGICAL_POSITIONS,
234   GTK_MOVEMENT_VISUAL_POSITIONS,
235   GTK_MOVEMENT_WORDS,
236   GTK_MOVEMENT_DISPLAY_LINES,
237   GTK_MOVEMENT_DISPLAY_LINE_ENDS,
238   GTK_MOVEMENT_PARAGRAPHS,
239   GTK_MOVEMENT_PARAGRAPH_ENDS,
240   GTK_MOVEMENT_PAGES,
241   GTK_MOVEMENT_BUFFER_ENDS,
242   GTK_MOVEMENT_HORIZONTAL_PAGES
243 } GtkMovementStep;
244
245 typedef enum
246 {
247   GTK_SCROLL_STEPS,
248   GTK_SCROLL_PAGES,
249   GTK_SCROLL_ENDS,
250   GTK_SCROLL_HORIZONTAL_STEPS,
251   GTK_SCROLL_HORIZONTAL_PAGES,
252   GTK_SCROLL_HORIZONTAL_ENDS
253 } GtkScrollStep;
254
255 /* Orientation for toolbars, etc. */
256 typedef enum
257 {
258   GTK_ORIENTATION_HORIZONTAL,
259   GTK_ORIENTATION_VERTICAL
260 } GtkOrientation;
261
262 /* Placement type for scrolled window */
263 typedef enum
264 {
265   GTK_CORNER_TOP_LEFT,
266   GTK_CORNER_BOTTOM_LEFT,
267   GTK_CORNER_TOP_RIGHT,
268   GTK_CORNER_BOTTOM_RIGHT
269 } GtkCornerType;
270
271 /* Packing types (for boxes) */
272 typedef enum
273 {
274   GTK_PACK_START,
275   GTK_PACK_END
276 } GtkPackType;
277
278 /* priorities for path lookups */
279 typedef enum
280 {
281   GTK_PATH_PRIO_LOWEST      = 0,
282   GTK_PATH_PRIO_GTK         = 4,
283   GTK_PATH_PRIO_APPLICATION = 8,
284   GTK_PATH_PRIO_THEME       = 10,
285   GTK_PATH_PRIO_RC          = 12,
286   GTK_PATH_PRIO_HIGHEST     = 15
287 } GtkPathPriorityType;
288 #define GTK_PATH_PRIO_MASK 0x0f
289
290 /* widget path types */
291 typedef enum
292 {
293   GTK_PATH_WIDGET,
294   GTK_PATH_WIDGET_CLASS,
295   GTK_PATH_CLASS
296 } GtkPathType;
297
298 /* Scrollbar policy types (for scrolled windows) */
299 typedef enum
300 {
301   GTK_POLICY_ALWAYS,
302   GTK_POLICY_AUTOMATIC,
303   GTK_POLICY_NEVER
304 } GtkPolicyType;
305
306 typedef enum
307 {
308   GTK_POS_LEFT,
309   GTK_POS_RIGHT,
310   GTK_POS_TOP,
311   GTK_POS_BOTTOM
312 } GtkPositionType;
313
314 /* Style for buttons */
315 typedef enum
316 {
317   GTK_RELIEF_NORMAL,
318   GTK_RELIEF_HALF,
319   GTK_RELIEF_NONE
320 } GtkReliefStyle;
321
322 /* Resize type */
323 typedef enum
324 {
325   GTK_RESIZE_PARENT,            /* Pass resize request to the parent */
326   GTK_RESIZE_QUEUE,             /* Queue resizes on this widget */
327   GTK_RESIZE_IMMEDIATE          /* Perform the resizes now */
328 } GtkResizeMode;
329
330 /* scrolling types */
331 typedef enum
332 {
333   GTK_SCROLL_NONE,
334   GTK_SCROLL_JUMP,
335   GTK_SCROLL_STEP_BACKWARD,
336   GTK_SCROLL_STEP_FORWARD,
337   GTK_SCROLL_PAGE_BACKWARD,
338   GTK_SCROLL_PAGE_FORWARD,
339   GTK_SCROLL_STEP_UP,
340   GTK_SCROLL_STEP_DOWN,
341   GTK_SCROLL_PAGE_UP,
342   GTK_SCROLL_PAGE_DOWN,
343   GTK_SCROLL_STEP_LEFT,
344   GTK_SCROLL_STEP_RIGHT,
345   GTK_SCROLL_PAGE_LEFT,
346   GTK_SCROLL_PAGE_RIGHT,
347   GTK_SCROLL_START,
348   GTK_SCROLL_END
349 } GtkScrollType;
350
351 /* list selection modes */
352 typedef enum
353 {
354   GTK_SELECTION_NONE,                             /* Nothing can be selected */
355   GTK_SELECTION_SINGLE,
356   GTK_SELECTION_BROWSE,
357   GTK_SELECTION_MULTIPLE
358 } GtkSelectionMode;
359
360 /* Shadow types */
361 typedef enum
362 {
363   GTK_SHADOW_NONE,
364   GTK_SHADOW_IN,
365   GTK_SHADOW_OUT,
366   GTK_SHADOW_ETCHED_IN,
367   GTK_SHADOW_ETCHED_OUT
368 } GtkShadowType;
369
370 /* Widget states */
371 typedef enum
372 {
373   GTK_STATE_NORMAL,
374   GTK_STATE_ACTIVE,
375   GTK_STATE_PRELIGHT,
376   GTK_STATE_SELECTED,
377   GTK_STATE_INSENSITIVE
378 } GtkStateType;
379
380 /* Style for toolbars */
381 typedef enum
382 {
383   GTK_TOOLBAR_ICONS,
384   GTK_TOOLBAR_TEXT,
385   GTK_TOOLBAR_BOTH,
386   GTK_TOOLBAR_BOTH_HORIZ
387 } GtkToolbarStyle;
388
389 /* Data update types (for ranges) */
390 typedef enum
391 {
392   GTK_UPDATE_CONTINUOUS,
393   GTK_UPDATE_DISCONTINUOUS,
394   GTK_UPDATE_DELAYED
395 } GtkUpdateType;
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   GTK_IM_PREEDIT_NONE
436 } GtkIMPreeditStyle;
437
438 typedef enum
439 {
440   GTK_IM_STATUS_NOTHING,
441   GTK_IM_STATUS_CALLBACK,
442   GTK_IM_STATUS_NONE
443 } GtkIMStatusStyle;
444
445 typedef enum
446 {
447   GTK_PACK_DIRECTION_LTR,
448   GTK_PACK_DIRECTION_RTL,
449   GTK_PACK_DIRECTION_TTB,
450   GTK_PACK_DIRECTION_BTT
451 } GtkPackDirection;
452
453 typedef enum
454 {
455   GTK_PRINT_PAGES_ALL,
456   GTK_PRINT_PAGES_CURRENT,
457   GTK_PRINT_PAGES_RANGES,
458   GTK_PRINT_PAGES_SELECTION
459 } GtkPrintPages;
460
461 typedef enum
462 {
463   GTK_PAGE_SET_ALL,
464   GTK_PAGE_SET_EVEN,
465   GTK_PAGE_SET_ODD
466 } GtkPageSet;
467
468 typedef enum
469 {
470   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM, /*< nick=lrtb >*/
471   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, /*< nick=lrbt >*/
472   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM, /*< nick=rltb >*/
473   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, /*< nick=rlbt >*/
474   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, /*< nick=tblr >*/
475   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, /*< nick=tbrl >*/
476   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, /*< nick=btlr >*/
477   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT  /*< nick=btrl >*/
478 } GtkNumberUpLayout;
479
480 typedef enum
481 {
482   GTK_PAGE_ORIENTATION_PORTRAIT,
483   GTK_PAGE_ORIENTATION_LANDSCAPE,
484   GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
485   GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
486 } GtkPageOrientation;
487
488 typedef enum
489 {
490   GTK_PRINT_QUALITY_LOW,
491   GTK_PRINT_QUALITY_NORMAL,
492   GTK_PRINT_QUALITY_HIGH,
493   GTK_PRINT_QUALITY_DRAFT
494 } GtkPrintQuality;
495
496 typedef enum
497 {
498   GTK_PRINT_DUPLEX_SIMPLEX,
499   GTK_PRINT_DUPLEX_HORIZONTAL,
500   GTK_PRINT_DUPLEX_VERTICAL
501 } GtkPrintDuplex;
502
503
504 typedef enum
505 {
506   GTK_UNIT_PIXEL,
507   GTK_UNIT_POINTS,
508   GTK_UNIT_INCH,
509   GTK_UNIT_MM
510 } GtkUnit;
511
512 /**
513  * GtkTreeViewGridLines:
514  * @GTK_TREE_VIEW_GRID_LINES_NONE: No grid lines.
515  * @GTK_TREE_VIEW_GRID_LINES_HORIZONTAL: Horizontal grid lines.
516  * @GTK_TREE_VIEW_GRID_LINES_VERTICAL: Vertical grid lines.
517  * @GTK_TREE_VIEW_GRID_LINES_BOTH: Horizontal and vertical grid lines.
518  *
519  * Used to indicate which grid lines to draw in a tree view.
520  */
521 typedef enum
522 {
523   GTK_TREE_VIEW_GRID_LINES_NONE,
524   GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
525   GTK_TREE_VIEW_GRID_LINES_VERTICAL,
526   GTK_TREE_VIEW_GRID_LINES_BOTH
527 } GtkTreeViewGridLines;
528
529 typedef enum
530 {
531   GTK_DRAG_RESULT_SUCCESS,
532   GTK_DRAG_RESULT_NO_TARGET,
533   GTK_DRAG_RESULT_USER_CANCELLED,
534   GTK_DRAG_RESULT_TIMEOUT_EXPIRED,
535   GTK_DRAG_RESULT_GRAB_BROKEN,
536   GTK_DRAG_RESULT_ERROR
537 } GtkDragResult;
538
539 /**
540  * GtkSizeRequestMode:
541  * @GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH: Prefer height-for-width geometry management
542  * @GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT: Prefer width-for-height geometry management
543  * 
544  * Specifies a preference for height-for-width or
545  * width-for-height geometry management.
546  */
547 typedef enum
548 {
549   GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH = 0,
550   GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT
551 } GtkSizeRequestMode;
552
553 /**
554  * GtkScrollablePolicy:
555  * @GTK_SCROLL_MINIMUM: Scrollable adjustments are based on the minimum size
556  * @GTK_SCROLL_NATURAL: Scrollable adjustments are based on the natural size
557  *
558  * Defines the policy to be used in a scrollable widget when updating
559  * the scrolled window adjustments in a given orientation.
560  */
561 typedef enum
562 {
563   GTK_SCROLL_MINIMUM = 0,
564   GTK_SCROLL_NATURAL
565 } GtkScrollablePolicy;
566
567
568 G_END_DECLS
569
570
571 #endif /* __GTK_ENUMS_H__ */