Top | Description | ![]() |
![]() |
![]() |
![]() |
#include <gtk/gtk.h> enum GtkAccelFlags; enum GtkArrowPlacement; enum GtkArrowType; enum GtkAttachOptions; enum GtkBaselinePosition; enum GtkButtonBoxStyle; enum GtkCornerType; enum GtkDeleteType; enum GtkDirectionType; enum GtkExpanderStyle; enum GtkIMPreeditStyle; enum GtkIMStatusStyle; enum GtkJustification; enum GtkMovementStep; enum GtkOrientation; enum GtkPackType; enum GtkPathPriorityType; enum GtkPathType; enum GtkPolicyType; enum GtkPositionType; enum GtkReliefStyle; enum GtkResizeMode; enum GtkScrollStep; enum GtkScrollType; enum GtkSelectionMode; enum GtkShadowType; enum GtkStateType; enum GtkStateFlags; enum GtkToolbarStyle; enum GtkWindowPosition; enum GtkWindowType; enum GtkSortType; enum GtkDragResult; enum GtkJunctionSides; enum GtkBorderStyle; enum GtkRegionFlags;
typedef enum { GTK_ACCEL_VISIBLE = 1 << 0, /* display in GtkAccelLabel? */ GTK_ACCEL_LOCKED = 1 << 1, /* is it removable? */ GTK_ACCEL_MASK = 0x07 } GtkAccelFlags;
Accelerator flags used with gtk_accel_group_connect()
.
typedef enum { GTK_ARROWS_BOTH, GTK_ARROWS_START, GTK_ARROWS_END } GtkArrowPlacement;
Used to specify the placement of scroll arrows in scrolling menus.
typedef enum { GTK_ARROW_UP, GTK_ARROW_DOWN, GTK_ARROW_LEFT, GTK_ARROW_RIGHT, GTK_ARROW_NONE } GtkArrowType;
Used to indicate the direction in which a GtkArrow should point.
typedef enum { GTK_EXPAND = 1 << 0, GTK_SHRINK = 1 << 1, GTK_FILL = 1 << 2 } GtkAttachOptions;
Denotes the expansion properties that a widget will have when it (or its parent) is resized.
typedef enum { GTK_BASELINE_POSITION_TOP, GTK_BASELINE_POSITION_CENTER, GTK_BASELINE_POSITION_BOTTOM } GtkBaselinePosition;
Whenever a container has some form of natural row it may align children in that row along a common typographical baseline. If the amount of verical space in the row is taller than the total requested height of the baseline-aligned children then it can use a GtkBaselinePosition to select where to put the baseline inside the extra availible space.
Align the baseline at the top | |
Center the baseline | |
Align the baseline at the bottom |
Since 3.10
typedef enum { GTK_BUTTONBOX_SPREAD = 1, GTK_BUTTONBOX_EDGE, GTK_BUTTONBOX_START, GTK_BUTTONBOX_END, GTK_BUTTONBOX_CENTER, GTK_BUTTONBOX_EXPAND } GtkButtonBoxStyle;
Used to dictate the style that a GtkButtonBox uses to layout the buttons it contains. (See also: GtkVButtonBox and GtkHButtonBox).
Buttons are evenly spread across the box. | |
Buttons are placed at the edges of the box. | |
Buttons are grouped towards the start of the box, (on the left for a HBox, or the top for a VBox). | |
Buttons are grouped towards the end of the box, (on the right for a HBox, or the bottom for a VBox). | |
Buttons are centered in the box. Since 2.12. | |
Buttons expand to fill the box. Since 3.12. |
typedef enum { GTK_CORNER_TOP_LEFT, GTK_CORNER_BOTTOM_LEFT, GTK_CORNER_TOP_RIGHT, GTK_CORNER_BOTTOM_RIGHT } GtkCornerType;
Specifies which corner a child widget should be placed in when packed into a GtkScrolledWindow. This is effectively the opposite of where the scroll bars are placed.
Place the scrollbars on the right and bottom of the widget (default behaviour). | |
Place the scrollbars on the top and right of the widget. | |
Place the scrollbars on the left and bottom of the widget. | |
Place the scrollbars on the top and left of the widget. |
typedef enum { GTK_DELETE_CHARS, GTK_DELETE_WORD_ENDS, /* delete only the portion of the word to the * left/right of cursor if we're in the middle * of a word */ GTK_DELETE_WORDS, GTK_DELETE_DISPLAY_LINES, GTK_DELETE_DISPLAY_LINE_ENDS, GTK_DELETE_PARAGRAPH_ENDS, /* like C-k in Emacs (or its reverse) */ GTK_DELETE_PARAGRAPHS, /* C-k in pico, kill whole line */ GTK_DELETE_WHITESPACE /* M-\ in Emacs */ } GtkDeleteType;
See also: "delete-from-cursor".
Delete characters. | |
Delete only the portion of the word to the left/right of cursor if we're in the middle of a word. | |
Delete words. | |
Delete display-lines. Display-lines refers to the visible lines, with respect to to the current line breaks. As opposed to paragraphs, which are defined by line breaks in the input. | |
Delete only the portion of the display-line to the left/right of cursor. | |
Delete to the end of the paragraph. Like C-k in Emacs (or its reverse). | |
Delete entire line. Like C-k in pico. | |
Delete only whitespace. Like M-\ in Emacs. |
typedef enum { GTK_DIR_TAB_FORWARD, GTK_DIR_TAB_BACKWARD, GTK_DIR_UP, GTK_DIR_DOWN, GTK_DIR_LEFT, GTK_DIR_RIGHT } GtkDirectionType;
Focus movement types.
typedef enum { GTK_EXPANDER_COLLAPSED, GTK_EXPANDER_SEMI_COLLAPSED, GTK_EXPANDER_SEMI_EXPANDED, GTK_EXPANDER_EXPANDED } GtkExpanderStyle;
Used to specify the style of the expanders drawn by a GtkTreeView.
typedef enum { GTK_IM_PREEDIT_NOTHING, GTK_IM_PREEDIT_CALLBACK, GTK_IM_PREEDIT_NONE } GtkIMPreeditStyle;
GtkIMPreeditStyle
is deprecated and should not be used in newly-written code. 3.10
Style for input method preedit. See also "gtk-im-preedit-style"
typedef enum { GTK_IM_STATUS_NOTHING, GTK_IM_STATUS_CALLBACK, GTK_IM_STATUS_NONE } GtkIMStatusStyle;
GtkIMStatusStyle
is deprecated and should not be used in newly-written code. 3.10
Style for input method status. See also "gtk-im-status-style"
typedef enum { GTK_JUSTIFY_LEFT, GTK_JUSTIFY_RIGHT, GTK_JUSTIFY_CENTER, GTK_JUSTIFY_FILL } GtkJustification;
Used for justifying the text inside a GtkLabel widget. (See also GtkAlignment).
typedef enum { GTK_MOVEMENT_LOGICAL_POSITIONS, GTK_MOVEMENT_VISUAL_POSITIONS, GTK_MOVEMENT_WORDS, GTK_MOVEMENT_DISPLAY_LINES, GTK_MOVEMENT_DISPLAY_LINE_ENDS, GTK_MOVEMENT_PARAGRAPHS, GTK_MOVEMENT_PARAGRAPH_ENDS, GTK_MOVEMENT_PAGES, GTK_MOVEMENT_BUFFER_ENDS, GTK_MOVEMENT_HORIZONTAL_PAGES } GtkMovementStep;
Move forward or back by graphemes | |
Move left or right by graphemes | |
Move forward or back by words | |
Move up or down lines (wrapped lines) | |
Move to either end of a line | |
Move up or down paragraphs (newline-ended lines) | |
Move to either end of a paragraph | |
Move by pages | |
Move to ends of the buffer | |
Move horizontally by pages |
typedef enum { GTK_ORIENTATION_HORIZONTAL, GTK_ORIENTATION_VERTICAL } GtkOrientation;
Represents the orientation of widgets which can be switched between horizontal and vertical orientation on the fly, like GtkToolbar.
typedef enum { GTK_PACK_START, GTK_PACK_END } GtkPackType;
Represents the packing location GtkBox children. (See: GtkVBox, GtkHBox, and GtkButtonBox).
typedef enum { GTK_PATH_PRIO_LOWEST = 0, GTK_PATH_PRIO_GTK = 4, GTK_PATH_PRIO_APPLICATION = 8, GTK_PATH_PRIO_THEME = 10, GTK_PATH_PRIO_RC = 12, GTK_PATH_PRIO_HIGHEST = 15 } GtkPathPriorityType;
GtkPathPriorityType
is deprecated and should not be used in newly-written code. 3.0
Priorities for path lookups.
See also gtk_binding_set_add_path()
.
typedef enum { GTK_PATH_WIDGET, GTK_PATH_WIDGET_CLASS, GTK_PATH_CLASS } GtkPathType;
GtkPathType
is deprecated and should not be used in newly-written code. 3.0
Widget path types.
See also gtk_binding_set_add_path()
.
typedef enum { GTK_POLICY_ALWAYS, GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER } GtkPolicyType;
Determines when a scroll bar will be visible.
The scrollbar is always visible. | |
The scrollbar will appear and disappear as necessary. For example, when all of a GtkCList can not be seen. | |
The scrollbar will never appear. |
typedef enum { GTK_POS_LEFT, GTK_POS_RIGHT, GTK_POS_TOP, GTK_POS_BOTTOM } GtkPositionType;
Describes which edge of a widget a certain feature is positioned at, e.g. the tabs of a GtkNotebook, the handle of a GtkHandleBox or the label of a GtkScale.
typedef enum { GTK_RELIEF_NORMAL, GTK_RELIEF_HALF, GTK_RELIEF_NONE } GtkReliefStyle;
Indicated the relief to be drawn around a GtkButton.
typedef enum { GTK_RESIZE_PARENT, GTK_RESIZE_QUEUE, GTK_RESIZE_IMMEDIATE } GtkResizeMode;
typedef enum { GTK_SCROLL_STEPS, GTK_SCROLL_PAGES, GTK_SCROLL_ENDS, GTK_SCROLL_HORIZONTAL_STEPS, GTK_SCROLL_HORIZONTAL_PAGES, GTK_SCROLL_HORIZONTAL_ENDS } GtkScrollStep;
typedef enum { GTK_SCROLL_NONE, GTK_SCROLL_JUMP, GTK_SCROLL_STEP_BACKWARD, GTK_SCROLL_STEP_FORWARD, GTK_SCROLL_PAGE_BACKWARD, GTK_SCROLL_PAGE_FORWARD, GTK_SCROLL_STEP_UP, GTK_SCROLL_STEP_DOWN, GTK_SCROLL_PAGE_UP, GTK_SCROLL_PAGE_DOWN, GTK_SCROLL_STEP_LEFT, GTK_SCROLL_STEP_RIGHT, GTK_SCROLL_PAGE_LEFT, GTK_SCROLL_PAGE_RIGHT, GTK_SCROLL_START, GTK_SCROLL_END } GtkScrollType;
Scrolling types.
No scrolling. | |
Jump to new location. | |
Step backward. | |
Step forward. | |
Page backward. | |
Page forward. | |
Step up. | |
Step down. | |
Page up. | |
Page down. | |
Step to the left. | |
Step to the right. | |
Page to the left. | |
Page to the right. | |
Scroll to start. | |
Scroll to end. |
typedef enum { GTK_SELECTION_NONE, GTK_SELECTION_SINGLE, GTK_SELECTION_BROWSE, GTK_SELECTION_MULTIPLE } GtkSelectionMode;
Used to control what selections users are allowed to make.
No selection is possible. | |
Zero or one element may be selected. | |
Exactly one element is selected.
In some circumstances, such as initially or during a search
operation, it's possible for no element to be selected with
GTK_SELECTION_BROWSE . What is really enforced is that the user
can't deselect a currently selected element except by selecting
another element.
|
|
Any number of elements may be selected. The Ctrl key may be used to enlarge the selection, and Shift key to select between the focus and the child pointed to. Some widgets may also allow Click-drag to select a range of elements. |
typedef enum { GTK_SHADOW_NONE, GTK_SHADOW_IN, GTK_SHADOW_OUT, GTK_SHADOW_ETCHED_IN, GTK_SHADOW_ETCHED_OUT } GtkShadowType;
Used to change the appearance of an outline typically provided by a GtkFrame.
typedef enum { GTK_STATE_NORMAL, GTK_STATE_ACTIVE, GTK_STATE_PRELIGHT, GTK_STATE_SELECTED, GTK_STATE_INSENSITIVE, GTK_STATE_INCONSISTENT, GTK_STATE_FOCUSED } GtkStateType;
This type indicates the current state of a widget; the state determines how the widget is drawn. The GtkStateType enumeration is also used to identify different colors in a GtkStyle for drawing, so states can be used for subparts of a widget as well as entire widgets.
State during normal operation. | |
State of a currently active widget, such as a depressed button. | |
State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks. | |
State of a selected item, such the selected row in a list. | |
State indicating that the widget is unresponsive to user actions. | |
The widget is inconsistent, such as checkbuttons
or radiobuttons that aren't either set to TRUE nor FALSE ,
or buttons requiring the user attention.
|
|
The widget has the keyboard focus. |
typedef enum { GTK_STATE_FLAG_NORMAL = 0, GTK_STATE_FLAG_ACTIVE = 1 << 0, GTK_STATE_FLAG_PRELIGHT = 1 << 1, GTK_STATE_FLAG_SELECTED = 1 << 2, GTK_STATE_FLAG_INSENSITIVE = 1 << 3, GTK_STATE_FLAG_INCONSISTENT = 1 << 4, GTK_STATE_FLAG_FOCUSED = 1 << 5, GTK_STATE_FLAG_BACKDROP = 1 << 6, GTK_STATE_FLAG_DIR_LTR = 1 << 7, GTK_STATE_FLAG_DIR_RTL = 1 << 8, GTK_STATE_FLAG_LINK = 1 << 9, GTK_STATE_FLAG_VISITED = 1 << 10 } GtkStateFlags;
Describes a widget state. Widget states are used to match the widget against CSS pseudo-classes. Note that GTK extends the regular CSS classes and sometimes uses different names.
State during normal operation. | |
Widget is active. | |
Widget has a mouse pointer over it. | |
Widget is selected. | |
Widget is insensitive. | |
Widget is inconsistent. | |
Widget has the keyboard focus. | |
Widget is in a background toplevel window. | |
Widget is in left-to-right text direction. Since 3.8 | |
Widget is in right-to-left text direction. Since 3.8 | |
Widget is a link. Since 3.12 | |
The location the widget points to has already been visited. Since 3.12 |
typedef enum { GTK_TOOLBAR_ICONS, GTK_TOOLBAR_TEXT, GTK_TOOLBAR_BOTH, GTK_TOOLBAR_BOTH_HORIZ } GtkToolbarStyle;
Used to customize the appearance of a GtkToolbar. Note that setting the toolbar style overrides the user's preferences for the default toolbar style. Note that if the button has only a label set and GTK_TOOLBAR_ICONS is used, the label will be visible, and vice versa.
typedef enum { GTK_WIN_POS_NONE, GTK_WIN_POS_CENTER, GTK_WIN_POS_MOUSE, GTK_WIN_POS_CENTER_ALWAYS, GTK_WIN_POS_CENTER_ON_PARENT } GtkWindowPosition;
Window placement can be influenced using this enumeration. Note that using GTK_WIN_POS_CENTER_ALWAYS is almost always a bad idea. It won't necessarily work well with all window managers or on all windowing systems.
No influence is made on placement. | |
Windows should be placed in the center of the screen. | |
Windows should be placed at the current mouse position. | |
Keep window centered as it changes size, etc. | |
Center the window on its transient
parent (see gtk_window_set_transient_for() ).
|
typedef enum { GTK_WINDOW_TOPLEVEL, GTK_WINDOW_POPUP } GtkWindowType;
A GtkWindow can be one of these types. Most things you'd consider a
"window" should have type GTK_WINDOW_TOPLEVEL; windows with this type
are managed by the window manager and have a frame by default (call
gtk_window_set_decorated()
to toggle the frame). Windows with type
GTK_WINDOW_POPUP are ignored by the window manager; window manager
keybindings won't work on them, the window manager won't decorate the
window with a frame, many GTK+ features that rely on the window
manager will not work (e.g. resize grips and
maximization/minimization). GTK_WINDOW_POPUP is used to implement
widgets such as GtkMenu or tooltips that you normally don't think of
as windows per se. Nearly all windows should be GTK_WINDOW_TOPLEVEL.
In particular, do not use GTK_WINDOW_POPUP just to turn off
the window borders; use gtk_window_set_decorated()
for that.
typedef enum { GTK_SORT_ASCENDING, GTK_SORT_DESCENDING } GtkSortType;
Determines the direction of a sort.
typedef enum { GTK_DRAG_RESULT_SUCCESS, GTK_DRAG_RESULT_NO_TARGET, GTK_DRAG_RESULT_USER_CANCELLED, GTK_DRAG_RESULT_TIMEOUT_EXPIRED, GTK_DRAG_RESULT_GRAB_BROKEN, GTK_DRAG_RESULT_ERROR } GtkDragResult;
Gives an indication why a drag operation failed. The value can by obtained by connecting to the "drag-failed" signal.
The drag operation was successful. | |
No suitable drag target. | |
The user cancelled the drag operation. | |
The drag operation timed out. | |
The pointer or keyboard grab used for the drag operation was broken. | |
The drag operation failed due to some unspecified error. |
typedef enum { GTK_JUNCTION_NONE = 0, GTK_JUNCTION_CORNER_TOPLEFT = 1 << 0, GTK_JUNCTION_CORNER_TOPRIGHT = 1 << 1, GTK_JUNCTION_CORNER_BOTTOMLEFT = 1 << 2, GTK_JUNCTION_CORNER_BOTTOMRIGHT = 1 << 3, GTK_JUNCTION_TOP = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_TOPRIGHT), GTK_JUNCTION_BOTTOM = (GTK_JUNCTION_CORNER_BOTTOMLEFT | GTK_JUNCTION_CORNER_BOTTOMRIGHT), GTK_JUNCTION_LEFT = (GTK_JUNCTION_CORNER_TOPLEFT | GTK_JUNCTION_CORNER_BOTTOMLEFT), GTK_JUNCTION_RIGHT = (GTK_JUNCTION_CORNER_TOPRIGHT | GTK_JUNCTION_CORNER_BOTTOMRIGHT) } GtkJunctionSides;
Describes how a rendered element connects to adjacent elements.
No junctions. | |
Element connects on the top-left corner. | |
Element connects on the top-right corner. | |
Element connects on the bottom-left corner. | |
Element connects on the bottom-right corner. | |
Element connects on the top side. | |
Element connects on the bottom side. | |
Element connects on the left side. | |
Element connects on the right side. |
typedef enum { GTK_BORDER_STYLE_NONE, GTK_BORDER_STYLE_SOLID, GTK_BORDER_STYLE_INSET, GTK_BORDER_STYLE_OUTSET, GTK_BORDER_STYLE_HIDDEN, GTK_BORDER_STYLE_DOTTED, GTK_BORDER_STYLE_DASHED, GTK_BORDER_STYLE_DOUBLE, GTK_BORDER_STYLE_GROOVE, GTK_BORDER_STYLE_RIDGE } GtkBorderStyle;
Describes how the border of a UI element should be rendered.
No visible border | |
A single line segment | |
Looks as if the content is sunken into the canvas | |
Looks as if the content is coming out of the canvas | |
Same as GTK_BORDER_STYLE_NONE
|
|
A series of round dots | |
A series of square-ended dashes | |
Two parallel lines with some space between them | |
Looks as if it were carved in the canvas | |
Looks as if it were coming out of the canvas |
typedef enum { GTK_REGION_EVEN = 1 << 0, GTK_REGION_ODD = 1 << 1, GTK_REGION_FIRST = 1 << 2, GTK_REGION_LAST = 1 << 3, GTK_REGION_ONLY = 1 << 4, GTK_REGION_SORTED = 1 << 5 } GtkRegionFlags;
Describes a region within a widget.
Region has an even number within a set. | |
Region has an odd number within a set. | |
Region is the first one within a set. | |
Region is the last one within a set. | |
Region is the only one within a set. | |
Region is part of a sorted area. |