lib/gtk: move default gtk module as a project
[nit.git] / lib / gtk / v3_4 / gtk_enums.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 2011-2013 Alexis Laferrière <alexis.laf@xymus.net>
4 # Copyright 2013 Nathan Heu <heu.nathan@courrier.uqam.ca>
5 #
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
9 #
10 # http://www.apache.org/licenses/LICENSE-2.0
11 #
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.
17
18 module gtk_enums is pkgconfig("gtk+-3.0")
19
20 in "C Header" `{
21 #include <gtk/gtk.h>
22 `}
23
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; `}
30
31 #Place both arrows at the top of the menu.
32 new top `{ return GTK_ARROWS_START; `}
33
34 #Place both arrows at the bottom of the menu.
35 new bottom `{ return GTK_ARROWS_END; `}
36 end
37
38 #enum GtkArrowType
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; `}
44
45 #Represents an downward pointing arrow.
46 new down `{ return GTK_ARROW_DOWN; `}
47
48 #Represents a left pointing arrow.
49 new left `{ return GTK_ARROW_LEFT; `}
50
51 #Represents a right pointing arrow.
52 new right `{ return GTK_ARROW_RIGHT; `}
53
54 #No arrow
55 new none `{ return GTK_ARROW_NONE; `}
56 end
57
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; `}
64
65 #The widget should shrink as and when possible.
66 new shrink `{ return GTK_SHRINK; `}
67
68 #The widget should fill the space allocated to it.
69 new fill `{ return GTK_FILL; `}
70 end
71
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; `}
78
79 #Buttons are placed at the edges of the box.
80 new edge `{ return GTK_BUTTONBOX_EDGE; `}
81
82 #Buttons are grouped towards the start of the box.
83 new start `{ return GTK_BUTTONBOX_START; `}
84
85 #Buttons are grouped towards the end of the box.
86 new end_of_box `{ return GTK_BUTTONBOX_END; `}
87
88 #Buttons are centered in the box
89 new center `{ return GTK_BUTTONBOX_CENTER; `}
90 end
91
92 #enum GtkCornerType
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; `}
98
99 #Place the scrollbars on the right and bottom of the widget (default behaviour).
100 new bottom_left `{ return GTK_CORNER_BOTTOM_LEFT; `}
101
102 #Place the scrollbars on the left and bottom of the widget.
103 new top_right `{ return GTK_CORNER_TOP_RIGHT; `}
104
105 #Place the scrollbars on the top and left of the widget.
106 new bottom_right `{ return GTK_CORNER_BOTTOM_RIGHT; `}
107 end
108
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; `}
115
116 #Intermediate style used during animation.
117 new semi_collapsed `{ return GTK_EXPANDER_SEMI_COLLAPSED; `}
118
119 #Intermediate style used during animation.
120 new semi_expanded `{ return GTK_EXPANDER_SEMI_EXPANDED; `}
121
122 #The style used for an expanded subtree.
123 new expanded `{ return GTK_EXPANDER_EXPANDED; `}
124 end
125
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; `}
132
133 #The text is placed at the right edge of the label.
134 new right `{ return GTK_JUSTIFY_RIGHT; `}
135
136 #The text is placed in the center of the label.
137 new center `{ return GTK_JUSTIFY_CENTER; `}
138
139 #The text is placed is distributed across the label.
140 new fill `{ return GTK_JUSTIFY_FILL; `}
141 end
142
143 #enum GtkOrientation
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; `}
149
150 #The widget is in vertical orientation.
151 new vertical `{ return GTK_ORIENTATION_VERTICAL; `}
152 end
153
154 #enum GtkPackType
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; `}
160
161 #The child is packed into the end of the box.
162 new end_of_box `{ return GTK_PACK_END; `}
163 end
164
165 #enum GtkPolicyType
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; `}
171
172 #The scrollbar will appear and disappear as necessary.
173 new automatic `{ return GTK_POLICY_AUTOMATIC; `}
174
175 #The scrollbar will never appear.
176 new never `{ return GTK_POLICY_NEVER; `}
177 end
178
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; `}
185
186 #The feature is at the right edge.
187 new right `{ return GTK_POS_RIGHT; `}
188
189 #The feature is at the top edge.
190 new top `{ return GTK_POS_TOP; `}
191
192 #The feature is at the bottom edge.
193 new bottom `{ return GTK_POS_BOTTOM; `}
194 end
195
196 #enum GtkReliefStyle
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; `}
202
203 #A half relief.
204 new half `{ return GTK_RELIEF_HALF; `}
205
206 #No relief.
207 new none `{ return GTK_RELIEF_NONE; `}
208 end
209
210 #enum GtkResizeMode
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; `}
215
216 #Queue resizes on this widget.
217 new queue `{ return GTK_RESIZE_QUEUE; `}
218 end
219
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; `}
225
226 #Zero or one element may be selected.
227 new single `{ return GTK_SELECTION_SINGLE; `}
228
229 #Exactly one element is selected.
230 new browse `{ return GTK_SELECTION_BROWSE; `}
231
232 #Any number of elements may be selected.
233 new multiple `{ return GTK_SELECTION_MULTIPLE; `}
234 end
235
236 #enum GtkShadowType
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`}
240 #No outline.
241 new none `{ return GTK_SHADOW_NONE; `}
242
243 #The outline is bevelled inwards.
244 new shadow_in `{ return GTK_SHADOW_IN; `}
245
246 #The outline is bevelled outwards like a button.
247 new shadow_out `{ return GTK_SHADOW_OUT; `}
248
249 #The outline has a sunken 3d appearance.
250 new etched_id `{ return GTK_SHADOW_ETCHED_IN; `}
251
252 #The outline has a raised 3d appearance.
253 new etched_out `{ return GTK_SHADOW_ETCHED_OUT; `}
254 end
255
256 #enum GtkStateType
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; `}
262
263 #State of a currently active widget, such as a depressed button.
264 new active `{ return GTK_STATE_ACTIVE; `}
265
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; `}
268
269 #State of a selected item, such the selected row in a list.
270 new selected `{ return GTK_STATE_SELECTED; `}
271
272 #State indicating that the widget is unresponsive to user actions.
273 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
274
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; `}
277
278 #The widget has the keyboard focus.
279 new focused `{ return GTK_STATE_FOCUSED; `}
280 end
281
282 #enum GtkStateFlags
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; `}
288
289 #Widget is active.
290 new active `{ return GTK_STATE_FLAG_ACTIVE; `}
291
292 #Widget has a mouse pointer over it.
293 new prelight `{ return GTK_STATE_FLAG_PRELIGHT; `}
294
295 #Widget is selected.
296 new selected `{ return GTK_STATE_FLAG_SELECTED; `}
297
298 #Widget is insensitive.
299 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
300
301 #Widget is inconsistent.
302 new inconsistent `{ return GTK_STATE_FLAG_INCONSISTENT; `}
303
304 #Widget has the keyboard focus.
305 new focused `{ return GTK_STATE_FLAG_FOCUSED; `}
306 end
307
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; `}
314
315 #Buttons display only text labels in the toolbar.
316 new text `{ return GTK_TOOLBAR_TEXT; `}
317
318 #Buttons display text and icons in the toolbar.
319 new both `{ return GTK_TOOLBAR_BOTH; `}
320
321 #Buttons display icons and text alongside each other, rather than vertically stacked
322 new both_horiz `{ return GTK_TOOLBAR_BOTH_HORIZ; `}
323 end
324
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; `}
331
332 #Windows should be placed in the center of the screen.
333 new center `{ return GTK_WIN_POS_CENTER; `}
334
335 #Windows should be placed at the current mouse position.
336 new mouse `{ return GTK_WIN_POS_MOUSE; `}
337
338 #Keep window centered as it changes size, etc.
339 new center_always `{ return GTK_WIN_POS_CENTER_ALWAYS; `}
340
341 #Center the window on its transient parent.
342 new center_on_parent `{ return GTK_WIN_POS_CENTER_ON_PARENT; `}
343 end
344
345 #enum GtkWindowType
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; `}
351
352 #A special window such as a tooltip.
353 new popup `{ return GTK_WINDOW_POPUP; `}
354 end
355
356 #enum GtkSortType
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; `}
362
363 #Sorting is in descending order.
364 new desc `{ return GTK_SORT_DESCENDING; `}
365 end
366
367 #enum GtkBorderStyle
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`}
371 #No visible border.
372 new none `{ return GTK_BORDER_STYLE_NONE; `}
373
374 #An solid border.
375 new solid `{ return GTK_BORDER_STYLE_SOLID; `}
376
377 #An intset border.
378 new inset `{ return GTK_BORDER_STYLE_INSET; `}
379
380 #An outset border.
381 new outset `{ return GTK_BORDER_STYLE_OUTSET; `}
382 end
383
384 # Icon size enum
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;`}
393 end