1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Copyright 2011-2013 Alexis Laferrière <alexis.laf@xymus.net>
4 # Copyright 2013 Nathan Heu <heu.nathan@courrier.uqam.ca>
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
18 module gtk_enums
is pkgconfig
("gtk+-3.0")
24 #enum GtkArrowPlacement
25 #Used to specify the placement of scroll arrows in scrolling menus.
26 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkArrowPlacement
27 extern class GtkArrowPlacement `{GtkArrowPlacement`}
28 #Place one arrow on each end of the menu.
29 new both `{ return GTK_ARROWS_BOTH; `}
31 #Place both arrows at the top of the menu.
32 new top
`{ return GTK_ARROWS_START; `}
34 #Place both arrows at the bottom of the menu.
35 new bottom `{ return GTK_ARROWS_END; `}
39 #Used to indicate the direction in which a GtkArrow should point.
40 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkArrowType
41 extern class GtkArrowType `{GtkArrowType`}
42 #Represents an upward pointing arrow.
43 new up `{ return GTK_ARROW_UP; `}
45 #Represents an downward pointing arrow.
46 new down
`{ return GTK_ARROW_DOWN; `}
48 #Represents a left pointing arrow.
49 new left `{ return GTK_ARROW_LEFT; `}
51 #Represents a right pointing arrow.
52 new right
`{ return GTK_ARROW_RIGHT; `}
55 new none `{ return GTK_ARROW_NONE; `}
58 #enum GtkAttachOptions
59 #Denotes the expansion properties that a widget will have when it (or its parent) is resized.
60 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkAttachOptions
61 extern class GtkAttachOptions `{GtkAttachOptions`}
62 #The widget should expand to take up any extra space in its container that has been allocated.
63 new expan `{ return GTK_EXPAND; `}
65 #The widget should shrink as and when possible.
66 new shrink
`{ return GTK_SHRINK; `}
68 #The widget should fill the space allocated to it.
69 new fill `{ return GTK_FILL; `}
72 #enum GtkButtonBoxStyle
73 #Used to dictate the style that a GtkButtonBox uses to layout the buttons it contains.
74 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkButtonBoxStyle
75 extern class GtkButtonBoxStyle `{GtkButtonBoxStyle`}
76 #Buttons are evenly spread across the box.
77 new spread `{ return GTK_BUTTONBOX_SPREAD; `}
79 #Buttons are placed at the edges of the box.
80 new edge
`{ return GTK_BUTTONBOX_EDGE; `}
82 #Buttons are grouped towards the start of the box.
83 new start `{ return GTK_BUTTONBOX_START; `}
85 #Buttons are grouped towards the end of the box.
86 new end_of_box
`{ return GTK_BUTTONBOX_END; `}
88 #Buttons are centered in the box
89 new center `{ return GTK_BUTTONBOX_CENTER; `}
93 #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.
94 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkCornerType
95 extern class GtkCornerType `{GtkCornerType`}
96 #Place the scrollbars on the right and bottom of the widget (default behaviour).
97 new top_left `{ return GTK_CORNER_TOP_LEFT; `}
99 #Place the scrollbars on the right and bottom of the widget (default behaviour).
100 new bottom_left
`{ return GTK_CORNER_BOTTOM_LEFT; `}
102 #Place the scrollbars on the left and bottom of the widget.
103 new top_right `{ return GTK_CORNER_TOP_RIGHT; `}
105 #Place the scrollbars on the top and left of the widget.
106 new bottom_right
`{ return GTK_CORNER_BOTTOM_RIGHT; `}
109 #enum GtkExpanderStyle
110 #Used to specify the style of the expanders drawn by a GtkTreeView.
111 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkExpanderStyle
112 extern class GtkExpanderStyle `{GtkExpanderStyle`}
113 #The style used for a collapsed subtree.
114 new collapsed
`{ return GTK_EXPANDER_COLLAPSED; `}
116 #Intermediate style used during animation.
117 new semi_collapsed `{ return GTK_EXPANDER_SEMI_COLLAPSED; `}
119 #Intermediate style used during animation.
120 new semi_expanded
`{ return GTK_EXPANDER_SEMI_EXPANDED; `}
122 #The style used for an expanded subtree.
123 new expanded `{ return GTK_EXPANDER_EXPANDED; `}
126 #enum GtkJustification
127 #Used for justifying the text inside a GtkLabel widget.
128 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkJustification
129 extern class GtkJustification `{GtkJustification`}
130 #The text is placed at the left edge of the label.
131 new left `{ return GTK_JUSTIFY_LEFT; `}
133 #The text is placed at the right edge of the label.
134 new right
`{ return GTK_JUSTIFY_RIGHT; `}
136 #The text is placed in the center of the label.
137 new center `{ return GTK_JUSTIFY_CENTER; `}
139 #The text is placed is distributed across the label.
140 new fill
`{ return GTK_JUSTIFY_FILL; `}
144 #Represents the orientation of widgets.
145 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkOrientation
146 extern class GtkOrientation `{GtkOrientation`}
147 #The widget is in horizontal orientation.
148 new horizontal
`{ return GTK_ORIENTATION_HORIZONTAL; `}
150 #The widget is in vertical orientation.
151 new vertical `{ return GTK_ORIENTATION_VERTICAL; `}
155 #Represents the packing location GtkBox children.
156 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPackType
157 extern class GtkPackType `{GtkPackType`}
158 #The child is packed into the start of the box.
159 new start `{ return GTK_PACK_START; `}
161 #The child is packed into the end of the box.
162 new end_of_box
`{ return GTK_PACK_END; `}
166 #Determines when a scroll bar will be visible.
167 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPolicyType
168 extern class GtkPolicyType `{GtkPolicyType`}
169 #The scrollbar is always visible.
170 new always
`{ return GTK_POLICY_ALWAYS; `}
172 #The scrollbar will appear and disappear as necessary.
173 new automatic `{ return GTK_POLICY_AUTOMATIC; `}
175 #The scrollbar will never appear.
176 new never
`{ return GTK_POLICY_NEVER; `}
179 #enum GtkPositionType
180 #Describes which edge of a widget a certain feature is positioned.
181 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPositionType
182 extern class GtkPositionType `{GtkPositionType`}
183 #The feature is at the left edge.
184 new left
`{ return GTK_POS_LEFT; `}
186 #The feature is at the right edge.
187 new right `{ return GTK_POS_RIGHT; `}
189 #The feature is at the top edge.
190 new top
`{ return GTK_POS_TOP; `}
192 #The feature is at the bottom edge.
193 new bottom `{ return GTK_POS_BOTTOM; `}
197 #Indicates the relief to be drawn around a GtkButton.
198 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkReliefStyle
199 extern class GtkReliefStyle `{GtkReliefStyle`}
200 #Draw a normal relief.
201 new normal `{ return GTK_RELIEF_NORMAL; `}
204 new half
`{ return GTK_RELIEF_HALF; `}
207 new none `{ return GTK_RELIEF_NONE; `}
211 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkResizeMode
212 extern class GtkResizeMode `{GtkResizeMode`}
213 #Pass resize request to the parent.
214 new parent `{ return GTK_RESIZE_PARENT; `}
216 #Queue resizes on this widget.
217 new queue
`{ return GTK_RESIZE_QUEUE; `}
220 #enum GtkSelectionMode
221 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkSelectionMode
222 extern class GtkSelectionMode `{GtkResizeMode`}
223 #No selection is possible.
224 new none
`{ return GTK_SELECTION_NONE; `}
226 #Zero or one element may be selected.
227 new single `{ return GTK_SELECTION_SINGLE; `}
229 #Exactly one element is selected.
230 new browse
`{ return GTK_SELECTION_BROWSE; `}
232 #Any number of elements may be selected.
233 new multiple `{ return GTK_SELECTION_MULTIPLE; `}
237 #Used to change the appearance of an outline typically provided by a GtkFrame.
238 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkShadowType
239 extern class GtkShadowType `{GtkShadowType`}
241 new none `{ return GTK_SHADOW_NONE; `}
243 #The outline is bevelled inwards.
244 new shadow_in
`{ return GTK_SHADOW_IN; `}
246 #The outline is bevelled outwards like a button.
247 new shadow_out `{ return GTK_SHADOW_OUT; `}
249 #The outline has a sunken 3d appearance.
250 new etched_id
`{ return GTK_SHADOW_ETCHED_IN; `}
252 #The outline has a raised 3d appearance.
253 new etched_out `{ return GTK_SHADOW_ETCHED_OUT; `}
257 #Indicates the current state of a widget; the state determines how the widget is drawn.
258 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkStateType
259 extern class GtkStateType `{GtkStateType`}
260 #State during normal operation.
261 new normal `{ return GTK_STATE_NORMAL; `}
263 #State of a currently active widget, such as a depressed button.
264 new active
`{ return GTK_STATE_ACTIVE; `}
266 #State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.
267 new prelight `{ return GTK_STATE_PRELIGHT; `}
269 #State of a selected item, such the selected row in a list.
270 new selected
`{ return GTK_STATE_SELECTED; `}
272 #State indicating that the widget is unresponsive to user actions.
273 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
275 #The widget is inconsistent, such as checkbuttons or radiobuttons that aren't either set to TRUE nor FALSE, or buttons requiring the user attention.
276 new inconsistent
`{ return GTK_STATE_INCONSISTENT; `}
278 #The widget has the keyboard focus.
279 new focused `{ return GTK_STATE_FOCUSED; `}
283 #Describes a widget state.
284 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkStateFlags
285 extern class GtkStateFlags `{GtkStateFlags`}
286 #State during normal operation.
287 new normal `{ return GTK_STATE_FLAG_NORMAL; `}
290 new active
`{ return GTK_STATE_FLAG_ACTIVE; `}
292 #Widget has a mouse pointer over it.
293 new prelight `{ return GTK_STATE_FLAG_PRELIGHT; `}
296 new selected
`{ return GTK_STATE_FLAG_SELECTED; `}
298 #Widget is insensitive.
299 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
301 #Widget is inconsistent.
302 new inconsistent
`{ return GTK_STATE_FLAG_INCONSISTENT; `}
304 #Widget has the keyboard focus.
305 new focused `{ return GTK_STATE_FLAG_FOCUSED; `}
308 #enum GtkToolbarStyle
309 #Used to customize the appearance of a GtkToolbar.
310 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkToolbarStyle
311 extern class GtkToolbarStyle `{GtkToolbarStyle`}
312 #Buttons display only icons in the toolbar.
313 new icons `{ return GTK_TOOLBAR_ICONS; `}
315 #Buttons display only text labels in the toolbar.
316 new text
`{ return GTK_TOOLBAR_TEXT; `}
318 #Buttons display text and icons in the toolbar.
319 new both `{ return GTK_TOOLBAR_BOTH; `}
321 #Buttons display icons and text alongside each other, rather than vertically stacked
322 new both_horiz
`{ return GTK_TOOLBAR_BOTH_HORIZ; `}
325 #enum GtkWindowPosition
326 #Window placement can be influenced using this enumeration.
327 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkWindowPosition
328 extern class GtkWindowPosition `{GtkWindowPosition`}
329 #No influence is made on placement.
330 new none
`{ return GTK_WIN_POS_NONE; `}
332 #Windows should be placed in the center of the screen.
333 new center `{ return GTK_WIN_POS_CENTER; `}
335 #Windows should be placed at the current mouse position.
336 new mouse
`{ return GTK_WIN_POS_MOUSE; `}
338 #Keep window centered as it changes size, etc.
339 new center_always `{ return GTK_WIN_POS_CENTER_ALWAYS; `}
341 #Center the window on its transient parent.
342 new center_on_parent
`{ return GTK_WIN_POS_CENTER_ON_PARENT; `}
346 #A GtkWindow can be one of these types.
347 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkWindowType
348 extern class GtkWindowType `{GtkWindowType`}
349 #A regular window, such as a dialog
350 new toplevel
`{ return GTK_WINDOW_TOPLEVEL; `}
352 #A special window such as a tooltip.
353 new popup `{ return GTK_WINDOW_POPUP; `}
357 #Determines the direction of a sort.
358 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkSortType
359 extern class GtkSortType `{GtkSortType`}
360 #Sorting is in ascending order.
361 new asc `{ return GTK_SORT_ASCENDING; `}
363 #Sorting is in descending order.
364 new desc
`{ return GTK_SORT_DESCENDING; `}
368 #Describes how the border of a UI element should be rendered.
369 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkBorderStyle
370 extern class GtkBorderStyle `{GtkBorderStyle`}
372 new none
`{ return GTK_BORDER_STYLE_NONE; `}
375 new solid `{ return GTK_BORDER_STYLE_SOLID; `}
378 new inset
`{ return GTK_BORDER_STYLE_INSET; `}
381 new outset `{ return GTK_BORDER_STYLE_OUTSET; `}
385 extern class GtkIconSize `{GtkIconSize`}
386 new invalid `{ return GTK_ICON_SIZE_INVALID; `}
387 new menu
`{ return GTK_ICON_SIZE_MENU; `}
388 new small_toolbar `{ return GTK_ICON_SIZE_SMALL_TOOLBAR; `}
389 new large_toolbar
`{ return GTK_ICON_SIZE_LARGE_TOOLBAR; `}
390 new button `{ return GTK_ICON_SIZE_BUTTON; `}
391 new dnd
`{ return GTK_ICON_SIZE_DND; `}
392 new dialog `{ return GTK_ICON_SIZE_DIALOG;`}