]> Pileus Git - ~andy/gtk/blob - gtk/gtkenums.h
Merge branch 'master' into broadway2
[~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
37 /**
38  * SECTION:gtkenum
39  * @Short_description: Public enumerated types used throughout GTK+
40  * @Title: Standard Enumerations
41  */
42
43
44 G_BEGIN_DECLS
45
46 /**
47  * GtkAlign:
48  * @GTK_ALIGN_FILL: stretch to fill all space if possible, center if
49  *     no meaningful way to stretch
50  * @GTK_ALIGN_START: snap to left or top side, leaving space on right
51  *     or bottom
52  * @GTK_ALIGN_END: snap to right or bottom side, leaving space on left
53  *     or top
54  * @GTK_ALIGN_CENTER: center natural width of widget inside the
55  *     allocation
56  *
57  * Controls how a widget deals with extra space in a single (x or y)
58  * dimension.
59  *
60  * Alignment only matters if the widget receives a "too large" allocation,
61  * for example if you packed the widget with the #GtkWidget:expand
62  * flag inside a #GtkBox, then the widget might get extra space.  If
63  * you have for example a 16x16 icon inside a 32x32 space, the icon
64  * could be scaled and stretched, it could be centered, or it could be
65  * positioned to one side of the space.
66  */
67 typedef enum
68 {
69   GTK_ALIGN_FILL,
70   GTK_ALIGN_START,
71   GTK_ALIGN_END,
72   GTK_ALIGN_CENTER
73 } GtkAlign;
74
75
76 /**
77  * GtkArrowPlacement:
78  * @GTK_ARROWS_BOTH: Place one arrow on each end of the menu.
79  * @GTK_ARROWS_START: Place both arrows at the top of the menu.
80  * @GTK_ARROWS_END: Place both arrows at the bottom of the menu.
81  *
82  * Used to specify the placement of scroll arrows in scrolling menus.
83  */
84 typedef enum
85 {
86   GTK_ARROWS_BOTH,
87   GTK_ARROWS_START,
88   GTK_ARROWS_END
89 } GtkArrowPlacement;
90
91 /**
92  * GtkArrowType
93  * @GTK_ARROW_UP: Represents an upward pointing arrow.
94  * @GTK_ARROW_DOWN: Represents a downward pointing arrow.
95  * @GTK_ARROW_LEFT: Represents a left pointing arrow.
96  * @GTK_ARROW_RIGHT: Represents a right pointing arrow.
97  * @GTK_ARROW_NONE: No arrow. Since 2.10.
98  *
99  * Used to indicate the direction in which a #GtkArrow should point.
100  */
101 typedef enum
102 {
103   GTK_ARROW_UP,
104   GTK_ARROW_DOWN,
105   GTK_ARROW_LEFT,
106   GTK_ARROW_RIGHT,
107   GTK_ARROW_NONE
108 } GtkArrowType;
109
110 /**
111  * GtkAttachOptions:
112  * @GTK_EXPAND: the widget should expand to take up any extra space in its
113  * container that has been allocated.
114  * @GTK_SHRINK: the widget should shrink as and when possible.
115  * @GTK_FILL: the widget should fill the space allocated to it.
116  *
117  * Denotes the expansion properties that a widget will have when it (or its
118  * parent) is resized.
119  */
120 typedef enum
121 {
122   GTK_EXPAND = 1 << 0,
123   GTK_SHRINK = 1 << 1,
124   GTK_FILL   = 1 << 2
125 } GtkAttachOptions;
126
127 /**
128  * GtkButtonBoxStyle:
129  * @GTK_BUTTONBOX_DEFAULT_STYLE: Default packing.
130  * @GTK_BUTTONBOX_SPREAD: Buttons are evenly spread across the box.
131  * @GTK_BUTTONBOX_EDGE: Buttons are placed at the edges of the box.
132  * @GTK_BUTTONBOX_START: Buttons are grouped towards the start of the box,
133  *   (on the left for a HBox, or the top for a VBox).
134  * @GTK_BUTTONBOX_END: Buttons are grouped towards the end of the box,
135  *   (on the right for a HBox, or the bottom for a VBox).
136  * @GTK_BUTTONBOX_CENTER: Buttons are centered in the box. Since 2.12.
137  *
138  * Used to dictate the style that a #GtkButtonBox uses to layout the buttons it
139  * contains. (See also: #GtkVButtonBox and #GtkHButtonBox).
140  */
141 typedef enum
142 {
143   GTK_BUTTONBOX_SPREAD = 1,
144   GTK_BUTTONBOX_EDGE,
145   GTK_BUTTONBOX_START,
146   GTK_BUTTONBOX_END,
147   GTK_BUTTONBOX_CENTER
148 } GtkButtonBoxStyle;
149
150
151 typedef enum
152 {
153   GTK_DELETE_CHARS,
154   GTK_DELETE_WORD_ENDS,           /* delete only the portion of the word to the
155                                    * left/right of cursor if we're in the middle
156                                    * of a word */
157   GTK_DELETE_WORDS,
158   GTK_DELETE_DISPLAY_LINES,
159   GTK_DELETE_DISPLAY_LINE_ENDS,
160   GTK_DELETE_PARAGRAPH_ENDS,      /* like C-k in Emacs (or its reverse) */
161   GTK_DELETE_PARAGRAPHS,          /* C-k in pico, kill whole line */
162   GTK_DELETE_WHITESPACE           /* M-\ in Emacs */
163 } GtkDeleteType;
164
165 /* Focus movement types */
166 typedef enum
167 {
168   GTK_DIR_TAB_FORWARD,
169   GTK_DIR_TAB_BACKWARD,
170   GTK_DIR_UP,
171   GTK_DIR_DOWN,
172   GTK_DIR_LEFT,
173   GTK_DIR_RIGHT
174 } GtkDirectionType;
175
176 /**
177  * GtkExpanderStyle:
178  * @GTK_EXPANDER_COLLAPSED: The style used for a collapsed subtree.
179  * @GTK_EXPANDER_SEMI_COLLAPSED: Intermediate style used during animation.
180  * @GTK_EXPANDER_SEMI_EXPANDED: Intermediate style used during animation.
181  * @GTK_EXPANDER_EXPANDED: The style used for an expanded subtree.
182  *
183  * Used to specify the style of the expanders drawn by a #GtkTreeView.
184  */
185 typedef enum
186 {
187   GTK_EXPANDER_COLLAPSED,
188   GTK_EXPANDER_SEMI_COLLAPSED,
189   GTK_EXPANDER_SEMI_EXPANDED,
190   GTK_EXPANDER_EXPANDED
191 } GtkExpanderStyle;
192
193 /* Built-in stock icon sizes */
194 typedef enum
195 {
196   GTK_ICON_SIZE_INVALID,
197   GTK_ICON_SIZE_MENU,
198   GTK_ICON_SIZE_SMALL_TOOLBAR,
199   GTK_ICON_SIZE_LARGE_TOOLBAR,
200   GTK_ICON_SIZE_BUTTON,
201   GTK_ICON_SIZE_DND,
202   GTK_ICON_SIZE_DIALOG
203 } GtkIconSize;
204
205 /**
206  * GtkSensitivityType:
207  * @GTK_SENSITIVITY_AUTO: The arrow is made insensitive if the
208  *   thumb is at the end
209  * @GTK_SENSITIVITY_ON: The arrow is always sensitive
210  * @GTK_SENSITIVITY_OFF: The arrow is always insensitive
211  *
212  * Determines how GTK+ handles the sensitivity of stepper arrows
213  * at the end of range widgets.
214  */
215 typedef enum
216 {
217   GTK_SENSITIVITY_AUTO,
218   GTK_SENSITIVITY_ON,
219   GTK_SENSITIVITY_OFF
220 } GtkSensitivityType;
221
222 /* Reading directions for text */
223 typedef enum
224 {
225   GTK_TEXT_DIR_NONE,
226   GTK_TEXT_DIR_LTR,
227   GTK_TEXT_DIR_RTL
228 } GtkTextDirection;
229
230 /**
231  * GtkJustification:
232  * @GTK_JUSTIFY_LEFT: The text is placed at the left edge of the label.
233  * @GTK_JUSTIFY_RIGHT: The text is placed at the right edge of the label.
234  * @GTK_JUSTIFY_CENTER: The text is placed in the center of the label.
235  * @GTK_JUSTIFY_FILL: The text is placed is distributed across the label.
236  *
237  * Used for justifying the text inside a #GtkLabel widget. (See also
238  * #GtkAlignment).
239  */
240 typedef enum
241 {
242   GTK_JUSTIFY_LEFT,
243   GTK_JUSTIFY_RIGHT,
244   GTK_JUSTIFY_CENTER,
245   GTK_JUSTIFY_FILL
246 } GtkJustification;
247
248 /**
249  * GtkMenuDirectionType:
250  * @GTK_MENU_DIR_PARENT: To the parent menu shell
251  * @GTK_MENU_DIR_CHILD: To the submenu, if any, associated with the item
252  * @GTK_MENU_DIR_NEXT: To the next menu item
253  * @GTK_MENU_DIR_PREV: To the previous menu item
254  *
255  * An enumeration representing directional movements within a menu.
256  */
257 typedef enum
258 {
259   GTK_MENU_DIR_PARENT,
260   GTK_MENU_DIR_CHILD,
261   GTK_MENU_DIR_NEXT,
262   GTK_MENU_DIR_PREV
263 } GtkMenuDirectionType;
264
265 /**
266  * GtkMessageType:
267  * @GTK_MESSAGE_INFO: Informational message
268  * @GTK_MESSAGE_WARNING: Nonfatal warning message
269  * @GTK_MESSAGE_QUESTION: Question requiring a choice
270  * @GTK_MESSAGE_ERROR: Fatal error message
271  * @GTK_MESSAGE_OTHER: None of the above, doesn't get an icon
272  *
273  * The type of message being displayed in the dialog.
274  */
275 typedef enum
276 {
277   GTK_MESSAGE_INFO,
278   GTK_MESSAGE_WARNING,
279   GTK_MESSAGE_QUESTION,
280   GTK_MESSAGE_ERROR,
281   GTK_MESSAGE_OTHER
282 } GtkMessageType;
283
284 /**
285  * GtkMovementStep:
286  * @GTK_MOVEMENT_LOGICAL_POSITIONS: Move forward or back by graphemes
287  * @GTK_MOVEMENT_VISUAL_POSITIONS:  Move left or right by graphemes
288  * @GTK_MOVEMENT_WORDS:             Move forward or back by words
289  * @GTK_MOVEMENT_DISPLAY_LINES:     Move up or down lines (wrapped lines)
290  * @GTK_MOVEMENT_DISPLAY_LINE_ENDS: Move to either end of a line
291  * @GTK_MOVEMENT_PARAGRAPHS:        Move up or down paragraphs (newline-ended lines)
292  * @GTK_MOVEMENT_PARAGRAPH_ENDS:    Move to either end of a paragraph
293  * @GTK_MOVEMENT_PAGES:             Move by pages
294  * @GTK_MOVEMENT_BUFFER_ENDS:       Move to ends of the buffer
295  * @GTK_MOVEMENT_HORIZONTAL_PAGES:  Move horizontally by pages
296  */
297 typedef enum
298 {
299   GTK_MOVEMENT_LOGICAL_POSITIONS,
300   GTK_MOVEMENT_VISUAL_POSITIONS,
301   GTK_MOVEMENT_WORDS,
302   GTK_MOVEMENT_DISPLAY_LINES,
303   GTK_MOVEMENT_DISPLAY_LINE_ENDS,
304   GTK_MOVEMENT_PARAGRAPHS,
305   GTK_MOVEMENT_PARAGRAPH_ENDS,
306   GTK_MOVEMENT_PAGES,
307   GTK_MOVEMENT_BUFFER_ENDS,
308   GTK_MOVEMENT_HORIZONTAL_PAGES
309 } GtkMovementStep;
310
311 typedef enum
312 {
313   GTK_SCROLL_STEPS,
314   GTK_SCROLL_PAGES,
315   GTK_SCROLL_ENDS,
316   GTK_SCROLL_HORIZONTAL_STEPS,
317   GTK_SCROLL_HORIZONTAL_PAGES,
318   GTK_SCROLL_HORIZONTAL_ENDS
319 } GtkScrollStep;
320
321 /**
322  * GtkOrientation:
323  * @GTK_ORIENTATION_HORIZONTAL: The widget is in horizontal orientation.
324  * @GTK_ORIENTATION_VERTICAL: The widget is in vertical orientation.
325  *
326  * Represents the orientation of widgets which can be switched between horizontal
327  * and vertical orientation on the fly, like #GtkToolbar.
328  */
329 typedef enum
330 {
331   GTK_ORIENTATION_HORIZONTAL,
332   GTK_ORIENTATION_VERTICAL
333 } GtkOrientation;
334
335 /**
336  * GtkCornerType:
337  * @GTK_CORNER_TOP_LEFT: Place the scrollbars on the right and bottom of the
338  *  widget (default behaviour).
339  * @GTK_CORNER_BOTTOM_LEFT: Place the scrollbars on the top and right of the
340  *  widget.
341  * @GTK_CORNER_TOP_RIGHT: Place the scrollbars on the left and bottom of the
342  *  widget.
343  * @GTK_CORNER_BOTTOM_RIGHT: Place the scrollbars on the top and left of the
344  *  widget.
345  *
346  * Specifies which corner a child widget should be placed in when packed into
347  * a #GtkScrolledWindow. This is effectively the opposite of where the scroll
348  * bars are placed.
349  */
350 typedef enum
351 {
352   GTK_CORNER_TOP_LEFT,
353   GTK_CORNER_BOTTOM_LEFT,
354   GTK_CORNER_TOP_RIGHT,
355   GTK_CORNER_BOTTOM_RIGHT
356 } GtkCornerType;
357
358 /**
359  * GtkPackType:
360  * @GTK_PACK_START: The child is packed into the start of the box
361  * @GTK_PACK_END: The child is packed into the end of the box
362  *
363  * Represents the packing location #GtkBox children. (See: #GtkVBox,
364  * #GtkHBox, and #GtkButtonBox).
365  */
366 typedef enum
367 {
368   GTK_PACK_START,
369   GTK_PACK_END
370 } GtkPackType;
371
372 /* priorities for path lookups */
373 typedef enum
374 {
375   GTK_PATH_PRIO_LOWEST      = 0,
376   GTK_PATH_PRIO_GTK         = 4,
377   GTK_PATH_PRIO_APPLICATION = 8,
378   GTK_PATH_PRIO_THEME       = 10,
379   GTK_PATH_PRIO_RC          = 12,
380   GTK_PATH_PRIO_HIGHEST     = 15
381 } GtkPathPriorityType;
382 #define GTK_PATH_PRIO_MASK 0x0f
383
384 /* widget path types */
385 typedef enum
386 {
387   GTK_PATH_WIDGET,
388   GTK_PATH_WIDGET_CLASS,
389   GTK_PATH_CLASS
390 } GtkPathType;
391
392 /**
393  * GtkPolicyType:
394  * @GTK_POLICY_ALWAYS: The scrollbar is always visible.
395  * @GTK_POLICY_AUTOMATIC: The scrollbar will appear and disappear as necessary. For example,
396  *  when all of a #GtkCList can not be seen.
397  * @GTK_POLICY_NEVER: The scrollbar will never appear.
398  *
399  * Determines when a scroll bar will be visible.
400  */
401 typedef enum
402 {
403   GTK_POLICY_ALWAYS,
404   GTK_POLICY_AUTOMATIC,
405   GTK_POLICY_NEVER
406 } GtkPolicyType;
407
408 /**
409  * GtkPositionType:
410  * @GTK_POS_LEFT: The feature is at the left edge.
411  * @GTK_POS_RIGHT: The feature is at the right edge.
412  * @GTK_POS_TOP: The feature is at the top edge.
413  * @GTK_POS_BOTTOM: The feature is at the bottom edge.
414  *
415  * Describes which edge of a widget a certain feature is positioned at, e.g. the
416  * tabs of a #GtkNotebook, the handle of a #GtkHandleBox or the label of a
417  * #GtkScale.
418  */
419 typedef enum
420 {
421   GTK_POS_LEFT,
422   GTK_POS_RIGHT,
423   GTK_POS_TOP,
424   GTK_POS_BOTTOM
425 } GtkPositionType;
426
427 /**
428  * GtkReliefStyle:
429  * @GTK_RELIEF_NORMAL: Draw a normal relief.
430  * @GTK_RELIEF_HALF: A half relief.
431  * @GTK_RELIEF_NONE: No relief.
432  *
433  * Indicated the relief to be drawn around a #GtkButton.
434  */
435 typedef enum
436 {
437   GTK_RELIEF_NORMAL,
438   GTK_RELIEF_HALF,
439   GTK_RELIEF_NONE
440 } GtkReliefStyle;
441
442 /**
443  * GtkResizeMode:
444  * @GTK_RESIZE_PARENT: Pass resize request to the parent
445  * @GTK_RESIZE_QUEUE: Queue resizes on this widget
446  * @GTK_RESIZE_IMMEDIATE: Resize immediately. Deprecated.
447  */
448 typedef enum
449 {
450   GTK_RESIZE_PARENT,
451   GTK_RESIZE_QUEUE,
452   GTK_RESIZE_IMMEDIATE
453 } GtkResizeMode;
454
455 /* scrolling types */
456 typedef enum
457 {
458   GTK_SCROLL_NONE,
459   GTK_SCROLL_JUMP,
460   GTK_SCROLL_STEP_BACKWARD,
461   GTK_SCROLL_STEP_FORWARD,
462   GTK_SCROLL_PAGE_BACKWARD,
463   GTK_SCROLL_PAGE_FORWARD,
464   GTK_SCROLL_STEP_UP,
465   GTK_SCROLL_STEP_DOWN,
466   GTK_SCROLL_PAGE_UP,
467   GTK_SCROLL_PAGE_DOWN,
468   GTK_SCROLL_STEP_LEFT,
469   GTK_SCROLL_STEP_RIGHT,
470   GTK_SCROLL_PAGE_LEFT,
471   GTK_SCROLL_PAGE_RIGHT,
472   GTK_SCROLL_START,
473   GTK_SCROLL_END
474 } GtkScrollType;
475
476 /**
477  * GtkSelectionMode:
478  * @GTK_SELECTION_NONE: No selection is possible.
479  * @GTK_SELECTION_SINGLE: Zero or one element may be selected.
480  * @GTK_SELECTION_BROWSE: Exactly one element is selected. In some circumstances,
481  *  such as initially or during a search operation, it's possible for no element
482  *  to be selected with %GTK_SELECTION_BROWSE. What is really enforced is that
483  *  the user can't deselect a currently selected element except by selecting
484  *  another element.
485  * @GTK_SELECTION_MULTIPLE: Any number of elements may be selected.
486  *  Clicks toggle the state of an item. Any number of elements may be selected.
487  *  The Ctrl key may be used to enlarge the selection, and Shift key to select
488  *  between the focus and the child pointed to. Some widgets may also allow
489  *  Click-drag to select a range of elements.
490  * @GTK_SELECTION_EXTENDED: Deprecated, behaves identical to %GTK_SELECTION_MULTIPLE.
491  *
492  * Used to control what selections users are allowed to make.
493  */
494 typedef enum
495 {
496   GTK_SELECTION_NONE,
497   GTK_SELECTION_SINGLE,
498   GTK_SELECTION_BROWSE,
499   GTK_SELECTION_MULTIPLE
500 } GtkSelectionMode;
501
502 /**
503  * GtkShadowType:
504  * @GTK_SHADOW_NONE: No outline.
505  * @GTK_SHADOW_IN: The outline is bevelled inwards.
506  * @GTK_SHADOW_OUT: The outline is bevelled outwards like a button.
507  * @GTK_SHADOW_ETCHED_IN: The outline has a sunken 3d appearance.
508  * @GTK_SHADOW_ETCHED_OUT: The outline has a raised 3d appearance.
509  *
510  * Used to change the appearance of an outline typically provided by a #GtkFrame.
511  */
512 typedef enum
513 {
514   GTK_SHADOW_NONE,
515   GTK_SHADOW_IN,
516   GTK_SHADOW_OUT,
517   GTK_SHADOW_ETCHED_IN,
518   GTK_SHADOW_ETCHED_OUT
519 } GtkShadowType;
520
521 /* Widget states */
522
523 /**
524  * GtkStateType:
525  * @GTK_STATE_NORMAL: State during normal operation.
526  * @GTK_STATE_ACTIVE: State of a currently active widget, such as a depressed button.
527  * @GTK_STATE_PRELIGHT: State indicating that the mouse pointer is over
528  *                      the widget and the widget will respond to mouse clicks.
529  * @GTK_STATE_SELECTED: State of a selected item, such the selected row in a list.
530  * @GTK_STATE_INSENSITIVE: State indicating that the widget is
531  *                         unresponsive to user actions.
532  * @GTK_STATE_INCONSISTENT: The widget is inconsistent, such as checkbuttons
533  *                          or radiobuttons that aren't either set to %TRUE nor %FALSE,
534  *                          or buttons requiring the user attention.
535  * @GTK_STATE_FOCUSED: The widget has the keyboard focus.
536  *
537  * This type indicates the current state of a widget; the state determines how
538  * the widget is drawn. The #GtkStateType enumeration is also used to
539  * identify different colors in a #GtkStyle for drawing, so states can be
540  * used for subparts of a widget as well as entire widgets.
541  */
542 typedef enum
543 {
544   GTK_STATE_NORMAL,
545   GTK_STATE_ACTIVE,
546   GTK_STATE_PRELIGHT,
547   GTK_STATE_SELECTED,
548   GTK_STATE_INSENSITIVE,
549   GTK_STATE_INCONSISTENT,
550   GTK_STATE_FOCUSED
551 } GtkStateType;
552
553 /**
554  * GtkToolbarStyle:
555  * @GTK_TOOLBAR_ICONS: Buttons display only icons in the toolbar.
556  * @GTK_TOOLBAR_TEXT: Buttons display only text labels in the toolbar.
557  * @GTK_TOOLBAR_BOTH: Buttons display text and icons in the toolbar.
558  * @GTK_TOOLBAR_BOTH_HORIZ: Buttons display icons and text alongside each
559  *  other, rather than vertically stacked
560  *
561  * Used to customize the appearance of a #GtkToolbar. Note that
562  * setting the toolbar style overrides the user's preferences
563  * for the default toolbar style.  Note that if the button has only
564  * a label set and GTK_TOOLBAR_ICONS is used, the label will be
565  * visible, and vice versa.
566  */
567 typedef enum
568 {
569   GTK_TOOLBAR_ICONS,
570   GTK_TOOLBAR_TEXT,
571   GTK_TOOLBAR_BOTH,
572   GTK_TOOLBAR_BOTH_HORIZ
573 } GtkToolbarStyle;
574
575 /**
576  * GtkWindowPosition:
577  * @GTK_WIN_POS_NONE: No influence is made on placement.
578  * @GTK_WIN_POS_CENTER: Windows should be placed in the center of the screen.
579  * @GTK_WIN_POS_MOUSE: Windows should be placed at the current mouse position.
580  * @GTK_WIN_POS_CENTER_ALWAYS: Keep window centered as it changes size, etc.
581  * @GTK_WIN_POS_CENTER_ON_PARENT: Center the window on its transient
582  *  parent (see gtk_window_set_transient_for()).
583  *
584  * Window placement can be influenced using this enumeration. Note that
585  * using #GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea.
586  * It won't necessarily work well with all window managers or on all windowing systems.
587  */
588 typedef enum
589 {
590   GTK_WIN_POS_NONE,
591   GTK_WIN_POS_CENTER,
592   GTK_WIN_POS_MOUSE,
593   GTK_WIN_POS_CENTER_ALWAYS,
594   GTK_WIN_POS_CENTER_ON_PARENT
595 } GtkWindowPosition;
596
597 /**
598  * GtkWindowType:
599  * @GTK_WINDOW_TOPLEVEL: A regular window, such as a dialog.
600  * @GTK_WINDOW_POPUP: A special window such as a tooltip.
601  *
602  * A #GtkWindow can be one of these types. Most things you'd consider a
603  * "window" should have type #GTK_WINDOW_TOPLEVEL; windows with this type
604  * are managed by the window manager and have a frame by default (call
605  * gtk_window_set_decorated() to toggle the frame).  Windows with type
606  * #GTK_WINDOW_POPUP are ignored by the window manager; window manager
607  * keybindings won't work on them, the window manager won't decorate the
608  * window with a frame, many GTK+ features that rely on the window
609  * manager will not work (e.g. resize grips and
610  * maximization/minimization). #GTK_WINDOW_POPUP is used to implement
611  * widgets such as #GtkMenu or tooltips that you normally don't think of
612  * as windows per se. Nearly all windows should be #GTK_WINDOW_TOPLEVEL.
613  * In particular, do not use #GTK_WINDOW_POPUP just to turn off
614  * the window borders; use gtk_window_set_decorated() for that.
615  */
616 typedef enum
617 {
618   GTK_WINDOW_TOPLEVEL,
619   GTK_WINDOW_POPUP
620 } GtkWindowType;
621
622 /**
623  * GtkWrapMode:
624  * @GTK_WRAP_NONE: do not wrap lines; just make the text area wider
625  * @GTK_WRAP_CHAR: wrap text, breaking lines anywhere the cursor can
626  *     appear (between characters, usually - if you want to be technical,
627  *     between graphemes, see pango_get_log_attrs())
628  * @GTK_WRAP_WORD: wrap text, breaking lines in between words
629  * @GTK_WRAP_WORD_CHAR: wrap text, breaking lines in between words, or if
630  *     that is not enough, also between graphemes
631  *
632  * Describes a type of line wrapping.
633  */
634 typedef enum
635 {
636   GTK_WRAP_NONE,
637   GTK_WRAP_CHAR,
638   GTK_WRAP_WORD,
639   GTK_WRAP_WORD_CHAR
640 } GtkWrapMode;
641
642 /**
643  * GtkSortType:
644  * @GTK_SORT_ASCENDING: Sorting is in ascending order.
645  * @GTK_SORT_DESCENDING: Sorting is in descending order.
646  *
647  * Determines the direction of a sort.
648  */
649 typedef enum
650 {
651   GTK_SORT_ASCENDING,
652   GTK_SORT_DESCENDING
653 } GtkSortType;
654
655 /* Style for gtk input method preedit/status */
656 typedef enum
657 {
658   GTK_IM_PREEDIT_NOTHING,
659   GTK_IM_PREEDIT_CALLBACK,
660   GTK_IM_PREEDIT_NONE
661 } GtkIMPreeditStyle;
662
663 typedef enum
664 {
665   GTK_IM_STATUS_NOTHING,
666   GTK_IM_STATUS_CALLBACK,
667   GTK_IM_STATUS_NONE
668 } GtkIMStatusStyle;
669
670 /**
671  * GtkPackDirection:
672  * @GTK_PACK_DIRECTION_LTR: Widgets are packed left-to-right
673  * @GTK_PACK_DIRECTION_RTL: Widgets are packed right-to-left
674  * @GTK_PACK_DIRECTION_TTB: Widgets are packed top-to-bottom
675  * @GTK_PACK_DIRECTION_BTT: Widgets are packed bottom-to-top
676  *
677  * Determines how widgets should be packed insided menubars
678  * and menuitems contained in menubars.
679  */
680 typedef enum
681 {
682   GTK_PACK_DIRECTION_LTR,
683   GTK_PACK_DIRECTION_RTL,
684   GTK_PACK_DIRECTION_TTB,
685   GTK_PACK_DIRECTION_BTT
686 } GtkPackDirection;
687
688 typedef enum
689 {
690   GTK_PRINT_PAGES_ALL,
691   GTK_PRINT_PAGES_CURRENT,
692   GTK_PRINT_PAGES_RANGES,
693   GTK_PRINT_PAGES_SELECTION
694 } GtkPrintPages;
695
696 typedef enum
697 {
698   GTK_PAGE_SET_ALL,
699   GTK_PAGE_SET_EVEN,
700   GTK_PAGE_SET_ODD
701 } GtkPageSet;
702
703 typedef enum
704 {
705   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_TOP_TO_BOTTOM, /*< nick=lrtb >*/
706   GTK_NUMBER_UP_LAYOUT_LEFT_TO_RIGHT_BOTTOM_TO_TOP, /*< nick=lrbt >*/
707   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_TOP_TO_BOTTOM, /*< nick=rltb >*/
708   GTK_NUMBER_UP_LAYOUT_RIGHT_TO_LEFT_BOTTOM_TO_TOP, /*< nick=rlbt >*/
709   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_LEFT_TO_RIGHT, /*< nick=tblr >*/
710   GTK_NUMBER_UP_LAYOUT_TOP_TO_BOTTOM_RIGHT_TO_LEFT, /*< nick=tbrl >*/
711   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_LEFT_TO_RIGHT, /*< nick=btlr >*/
712   GTK_NUMBER_UP_LAYOUT_BOTTOM_TO_TOP_RIGHT_TO_LEFT  /*< nick=btrl >*/
713 } GtkNumberUpLayout;
714
715 typedef enum
716 {
717   GTK_PAGE_ORIENTATION_PORTRAIT,
718   GTK_PAGE_ORIENTATION_LANDSCAPE,
719   GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT,
720   GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE
721 } GtkPageOrientation;
722
723 typedef enum
724 {
725   GTK_PRINT_QUALITY_LOW,
726   GTK_PRINT_QUALITY_NORMAL,
727   GTK_PRINT_QUALITY_HIGH,
728   GTK_PRINT_QUALITY_DRAFT
729 } GtkPrintQuality;
730
731 typedef enum
732 {
733   GTK_PRINT_DUPLEX_SIMPLEX,
734   GTK_PRINT_DUPLEX_HORIZONTAL,
735   GTK_PRINT_DUPLEX_VERTICAL
736 } GtkPrintDuplex;
737
738
739 typedef enum
740 {
741   GTK_UNIT_PIXEL,
742   GTK_UNIT_POINTS,
743   GTK_UNIT_INCH,
744   GTK_UNIT_MM
745 } GtkUnit;
746
747 /**
748  * GtkTreeViewGridLines:
749  * @GTK_TREE_VIEW_GRID_LINES_NONE: No grid lines.
750  * @GTK_TREE_VIEW_GRID_LINES_HORIZONTAL: Horizontal grid lines.
751  * @GTK_TREE_VIEW_GRID_LINES_VERTICAL: Vertical grid lines.
752  * @GTK_TREE_VIEW_GRID_LINES_BOTH: Horizontal and vertical grid lines.
753  *
754  * Used to indicate which grid lines to draw in a tree view.
755  */
756 typedef enum
757 {
758   GTK_TREE_VIEW_GRID_LINES_NONE,
759   GTK_TREE_VIEW_GRID_LINES_HORIZONTAL,
760   GTK_TREE_VIEW_GRID_LINES_VERTICAL,
761   GTK_TREE_VIEW_GRID_LINES_BOTH
762 } GtkTreeViewGridLines;
763
764 /**
765  * GtkDragResult:
766  * @GTK_DRAG_RESULT_SUCCESS: The drag operation was successful.
767  * @GTK_DRAG_RESULT_NO_TARGET: No suitable drag target.
768  * @GTK_DRAG_RESULT_USER_CANCELLED: The user cancelled the drag operation.
769  * @GTK_DRAG_RESULT_TIMEOUT_EXPIRED: The drag operation timed out.
770  * @GTK_DRAG_RESULT_GRAB_BROKEN: The pointer or keyboard grab used
771  *  for the drag operation was broken.
772  * @GTK_DRAG_RESULT_ERROR: The drag operation failed due to some
773  *  unspecified error.
774  *
775  * Gives an indication why a drag operation failed.
776  * The value can by obtained by connecting to the
777  * #GtkWidget::drag-failed signal.
778  */
779 typedef enum
780 {
781   GTK_DRAG_RESULT_SUCCESS,
782   GTK_DRAG_RESULT_NO_TARGET,
783   GTK_DRAG_RESULT_USER_CANCELLED,
784   GTK_DRAG_RESULT_TIMEOUT_EXPIRED,
785   GTK_DRAG_RESULT_GRAB_BROKEN,
786   GTK_DRAG_RESULT_ERROR
787 } GtkDragResult;
788
789 /**
790  * GtkSizeRequestMode:
791  * @GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH: Prefer height-for-width geometry management
792  * @GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT: Prefer width-for-height geometry management
793  * 
794  * Specifies a preference for height-for-width or
795  * width-for-height geometry management.
796  */
797 typedef enum
798 {
799   GTK_SIZE_REQUEST_HEIGHT_FOR_WIDTH = 0,
800   GTK_SIZE_REQUEST_WIDTH_FOR_HEIGHT
801 } GtkSizeRequestMode;
802
803 /**
804  * GtkScrollablePolicy:
805  * @GTK_SCROLL_MINIMUM: Scrollable adjustments are based on the minimum size
806  * @GTK_SCROLL_NATURAL: Scrollable adjustments are based on the natural size
807  *
808  * Defines the policy to be used in a scrollable widget when updating
809  * the scrolled window adjustments in a given orientation.
810  */
811 typedef enum
812 {
813   GTK_SCROLL_MINIMUM = 0,
814   GTK_SCROLL_NATURAL
815 } GtkScrollablePolicy;
816
817 /**
818  * GtkStateFlags:
819  * @GTK_STATE_FLAG_NORMAL: State during normal operation.
820  * @GTK_STATE_FLAG_ACTIVE: Widget is active.
821  * @GTK_STATE_FLAG_PRELIGHT: Widget has a mouse pointer over it.
822  * @GTK_STATE_FLAG_SELECTED: Widget is selected.
823  * @GTK_STATE_FLAG_INSENSITIVE: Widget is insensitive.
824  * @GTK_STATE_FLAG_INCONSISTENT: Widget is inconsistent.
825  * @GTK_STATE_FLAG_FOCUSED: Widget has the keyboard focus.
826  *
827  * Describes a widget state.
828  */
829 typedef enum
830 {
831   GTK_STATE_FLAG_NORMAL       = 0,
832   GTK_STATE_FLAG_ACTIVE       = 1 << 0,
833   GTK_STATE_FLAG_PRELIGHT     = 1 << 1,
834   GTK_STATE_FLAG_SELECTED     = 1 << 2,
835   GTK_STATE_FLAG_INSENSITIVE  = 1 << 3,
836   GTK_STATE_FLAG_INCONSISTENT = 1 << 4,
837   GTK_STATE_FLAG_FOCUSED      = 1 << 5
838 } GtkStateFlags;
839
840 /**
841  * GtkRegionFlags:
842  * @GTK_REGION_EVEN: Region has an even number within a set.
843  * @GTK_REGION_ODD: Region has an odd number within a set.
844  * @GTK_REGION_FIRST: Region is the first one within a set.
845  * @GTK_REGION_LAST: Region is the last one within a set.
846  * @GTK_REGION_SORTED: Region is part of a sorted area.
847  *
848  * Describes a region within a widget.
849  */
850 typedef enum {
851   GTK_REGION_EVEN    = 1 << 0,
852   GTK_REGION_ODD     = 1 << 1,
853   GTK_REGION_FIRST   = 1 << 2,
854   GTK_REGION_LAST    = 1 << 3,
855   GTK_REGION_SORTED  = 1 << 5
856 } GtkRegionFlags;
857
858 /**
859  * GtkJunctionSides:
860  * @GTK_JUNCTION_NONE: No junctions.
861  * @GTK_JUNCTION_CORNER_TOPLEFT: Element connects on the top-left corner.
862  * @GTK_JUNCTION_CORNER_TOPRIGHT: Element connects on the top-right corner.
863  * @GTK_JUNCTION_CORNER_BOTTOMLEFT: Element connects on the bottom-left corner.
864  * @GTK_JUNCTION_CORNER_BOTTOMRIGHT: Element connects on the bottom-right corner.
865  * @GTK_JUNCTION_TOP: Element connects on the top side.
866  * @GTK_JUNCTION_BOTTOM: Element connects on the bottom side.
867  * @GTK_JUNCTION_LEFT: Element connects on the left side.
868  * @GTK_JUNCTION_RIGHT: Element connects on the right side.
869  *
870  * Describes how a rendered element connects to adjacent elements.
871  */
872 typedef enum {
873   GTK_JUNCTION_NONE   = 0,
874   GTK_JUNCTION_CORNER_TOPLEFT = 1 << 0,
875   GTK_JUNCTION_CORNER_TOPRIGHT = 1 << 1,
876   GTK_JUNCTION_CORNER_BOTTOMLEFT = 1 << 2,
877   GTK_JUNCTION_CORNER_BOTTOMRIGHT = 1 << 3,
878   GTK_JUNCTION_TOP    = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_TOPRIGHT),
879   GTK_JUNCTION_BOTTOM = (GTK_JUNCTION_CORNER_BOTTOMLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT),
880   GTK_JUNCTION_LEFT   = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMLEFT),
881   GTK_JUNCTION_RIGHT  = (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMRIGHT)
882 } GtkJunctionSides;
883
884 /**
885  * GtkBorderStyle:
886  * @GTK_BORDER_STYLE_NONE: No visible border
887  * @GTK_BORDER_STYLE_SOLID: A solid border
888  * @GTK_BORDER_STYLE_INSET: An inset border
889  * @GTK_BORDER_STYLE_OUTSET: An outset border
890  *
891  * Describes how the border of a UI element should be rendered.
892  */
893 typedef enum {
894   GTK_BORDER_STYLE_NONE,
895   GTK_BORDER_STYLE_SOLID,
896   GTK_BORDER_STYLE_INSET,
897   GTK_BORDER_STYLE_OUTSET
898 } GtkBorderStyle;
899
900 G_END_DECLS
901
902
903 #endif /* __GTK_ENUMS_H__ */