lib/gtk: renamed to gtk3_4
[nit.git] / lib / gtk3_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
19
20 in "C Header" `{
21 #include <gtk/gtk.h>
22
23 `}
24
25 #enum GtkArrowPlacement
26 #Used to specify the placement of scroll arrows in scrolling menus.
27 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkArrowPlacement
28 extern GtkArrowPlacement `{GtkArrowPlacement`}
29 #Place one arrow on each end of the menu.
30 new both `{ return GTK_ARROWS_BOTH; `}
31
32 #Place both arrows at the top of the menu.
33 new top `{ return GTK_ARROWS_START; `}
34
35 #Place both arrows at the bottom of the menu.
36 new bottom `{ return GTK_ARROWS_END; `}
37 end
38
39 #enum GtkArrowType
40 #Used to indicate the direction in which a GtkArrow should point.
41 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkArrowType
42 extern GtkArrowType `{GtkArrowType`}
43 #Represents an upward pointing arrow.
44 new up `{ return GTK_ARROW_UP; `}
45
46 #Represents an downward pointing arrow.
47 new down `{ return GTK_ARROW_DOWN; `}
48
49 #Represents a left pointing arrow.
50 new left `{ return GTK_ARROW_LEFT; `}
51
52 #Represents a right pointing arrow.
53 new right `{ return GTK_ARROW_RIGHT; `}
54
55 #No arrow
56 new none `{ return GTK_ARROW_NONE; `}
57 end
58
59 #enum GtkAttachOptions
60 #Denotes the expansion properties that a widget will have when it (or its parent) is resized.
61 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkAttachOptions
62 extern GtkAttachOptions `{GtkAttachOptions`}
63 #The widget should expand to take up any extra space in its container that has been allocated.
64 new expan `{ return GTK_EXPAND; `}
65
66 #The widget should shrink as and when possible.
67 new shrink `{ return GTK_SHRINK; `}
68
69 #The widget should fill the space allocated to it.
70 new fill `{ return GTK_FILL; `}
71 end
72
73 #enum GtkButtonBoxStyle
74 #Used to dictate the style that a GtkButtonBox uses to layout the buttons it contains.
75 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkButtonBoxStyle
76 extern GtkButtonBoxStyle `{GtkButtonBoxStyle`}
77 #Buttons are evenly spread across the box.
78 new spread `{ return GTK_BUTTONBOX_SPREAD; `}
79
80 #Buttons are placed at the edges of the box.
81 new edge `{ return GTK_BUTTONBOX_EDGE; `}
82
83 #Buttons are grouped towards the start of the box.
84 new start `{ return GTK_BUTTONBOX_START; `}
85
86 #Buttons are grouped towards the end of the box.
87 new end_of_box `{ return GTK_BUTTONBOX_END; `}
88
89 #Buttons are centered in the box
90 new center `{ return GTK_BUTTONBOX_CENTER; `}
91 end
92
93 #enum GtkCornerType
94 #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.
95 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkCornerType
96 extern GtkCornerType `{GtkCornerType`}
97 #Place the scrollbars on the right and bottom of the widget (default behaviour).
98 new top_left `{ return GTK_CORNER_TOP_LEFT; `}
99
100 #Place the scrollbars on the right and bottom of the widget (default behaviour).
101 new bottom_left `{ return GTK_CORNER_BOTTOM_LEFT; `}
102
103 #Place the scrollbars on the left and bottom of the widget.
104 new top_right `{ return GTK_CORNER_TOP_RIGHT; `}
105
106 #Place the scrollbars on the top and left of the widget.
107 new bottom_right `{ return GTK_CORNER_BOTTOM_RIGHT; `}
108 end
109
110 #enum GtkExpanderStyle
111 #Used to specify the style of the expanders drawn by a GtkTreeView.
112 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkExpanderStyle
113 extern GtkExpanderStyle `{GtkExpanderStyle`}
114 #The style used for a collapsed subtree.
115 new collapsed `{ return GTK_EXPANDER_COLLAPSED; `}
116
117 #Intermediate style used during animation.
118 new semi_collapsed `{ return GTK_EXPANDER_SEMI_COLLAPSED; `}
119
120 #Intermediate style used during animation.
121 new semi_expanded `{ return GTK_EXPANDER_SEMI_EXPANDED; `}
122
123 #The style used for an expanded subtree.
124 new expanded `{ return GTK_EXPANDER_EXPANDED; `}
125 end
126
127 #enum GtkJustification
128 #Used for justifying the text inside a GtkLabel widget.
129 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkJustification
130 extern GtkJustification `{GtkJustification`}
131 #The text is placed at the left edge of the label.
132 new left `{ return GTK_JUSTIFY_LEFT; `}
133
134 #The text is placed at the right edge of the label.
135 new right `{ return GTK_JUSTIFY_RIGHT; `}
136
137 #The text is placed in the center of the label.
138 new center `{ return GTK_JUSTIFY_CENTER; `}
139
140 #The text is placed is distributed across the label.
141 new fill `{ return GTK_JUSTIFY_FILL; `}
142 end
143
144 #enum GtkOrientation
145 #Represents the orientation of widgets.
146 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkOrientation
147 extern GtkOrientation `{GtkOrientation`}
148 #The widget is in horizontal orientation.
149 new horizontal `{ return GTK_ORIENTATION_HORIZONTAL; `}
150
151 #The widget is in vertical orientation.
152 new vertical `{ return GTK_ORIENTATION_VERTICAL; `}
153 end
154
155 #enum GtkPackType
156 #Represents the packing location GtkBox children.
157 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPackType
158 extern GtkPackType `{GtkPackType`}
159 #The child is packed into the start of the box.
160 new start `{ return GTK_PACK_START; `}
161
162 #The child is packed into the end of the box.
163 new end_of_box `{ return GTK_PACK_END; `}
164 end
165
166 #enum GtkPolicyType
167 #Determines when a scroll bar will be visible.
168 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPolicyType
169 extern GtkPolicyType `{GtkPolicyType`}
170 #The scrollbar is always visible.
171 new always `{ return GTK_POLICY_ALWAYS; `}
172
173 #The scrollbar will appear and disappear as necessary.
174 new automatic `{ return GTK_POLICY_AUTOMATIC; `}
175
176 #The scrollbar will never appear.
177 new never `{ return GTK_POLICY_NEVER; `}
178 end
179
180 #enum GtkPositionType
181 #Describes which edge of a widget a certain feature is positioned.
182 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkPositionType
183 extern GtkPositionType `{GtkPositionType`}
184 #The feature is at the left edge.
185 new left `{ return GTK_POS_LEFT; `}
186
187 #The feature is at the right edge.
188 new right `{ return GTK_POS_RIGHT; `}
189
190 #The feature is at the top edge.
191 new top `{ return GTK_POS_TOP; `}
192
193 #The feature is at the bottom edge.
194 new bottom `{ return GTK_POS_BOTTOM; `}
195 end
196
197 #enum GtkReliefStyle
198 #Indicates the relief to be drawn around a GtkButton.
199 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkReliefStyle
200 extern GtkReliefStyle `{GtkReliefStyle`}
201 #Draw a normal relief.
202 new normal `{ return GTK_RELIEF_NORMAL; `}
203
204 #A half relief.
205 new half `{ return GTK_RELIEF_HALF; `}
206
207 #No relief.
208 new none `{ return GTK_RELIEF_NONE; `}
209 end
210
211 #enum GtkResizeMode
212 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkResizeMode
213 extern GtkResizeMode `{GtkResizeMode`}
214 #Pass resize request to the parent.
215 new parent `{ return GTK_RESIZE_PARENT; `}
216
217 #Queue resizes on this widget.
218 new queue `{ return GTK_RESIZE_QUEUE; `}
219 end
220
221 #enum GtkSelectionMode
222 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkSelectionMode
223 extern GtkSelectionMode `{GtkResizeMode`}
224 #No selection is possible.
225 new none `{ return GTK_SELECTION_NONE; `}
226
227 #Zero or one element may be selected.
228 new single `{ return GTK_SELECTION_SINGLE; `}
229
230 #Exactly one element is selected.
231 new browse `{ return GTK_SELECTION_BROWSE; `}
232
233 #Any number of elements may be selected.
234 new multiple `{ return GTK_SELECTION_MULTIPLE; `}
235 end
236
237 #enum GtkShadowType
238 #Used to change the appearance of an outline typically provided by a GtkFrame.
239 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkShadowType
240 extern GtkShadowType `{GtkShadowType`}
241 #No outline.
242 new none `{ return GTK_SHADOW_NONE; `}
243
244 #The outline is bevelled inwards.
245 new shadow_in `{ return GTK_SHADOW_IN; `}
246
247 #The outline is bevelled outwards like a button.
248 new shadow_out `{ return GTK_SHADOW_OUT; `}
249
250 #The outline has a sunken 3d appearance.
251 new etched_id `{ return GTK_SHADOW_ETCHED_IN; `}
252
253 #The outline has a raised 3d appearance.
254 new etched_out `{ return GTK_SHADOW_ETCHED_OUT; `}
255 end
256
257 #enum GtkStateType
258 #Indicates the current state of a widget; the state determines how the widget is drawn.
259 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkStateType
260 extern GtkStateType `{GtkStateType`}
261 #State during normal operation.
262 new normal `{ return GTK_STATE_NORMAL; `}
263
264 #State of a currently active widget, such as a depressed button.
265 new active `{ return GTK_STATE_ACTIVE; `}
266
267 #State indicating that the mouse pointer is over the widget and the widget will respond to mouse clicks.
268 new prelight `{ return GTK_STATE_PRELIGHT; `}
269
270 #State of a selected item, such the selected row in a list.
271 new selected `{ return GTK_STATE_SELECTED; `}
272
273 #State indicating that the widget is unresponsive to user actions.
274 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
275
276 #The widget is inconsistent, such as checkbuttons or radiobuttons that aren't either set to TRUE nor FALSE, or buttons requiring the user attention.
277 new inconsistent `{ return GTK_STATE_INCONSISTENT; `}
278
279 #The widget has the keyboard focus.
280 new focused `{ return GTK_STATE_FOCUSED; `}
281 end
282
283 #enum GtkStateFlags
284 #Describes a widget state.
285 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkStateFlags
286 extern GtkStateFlags `{GtkStateFlags`}
287 #State during normal operation.
288 new normal `{ return GTK_STATE_FLAG_NORMAL; `}
289
290 #Widget is active.
291 new active `{ return GTK_STATE_FLAG_ACTIVE; `}
292
293 #Widget has a mouse pointer over it.
294 new prelight `{ return GTK_STATE_FLAG_PRELIGHT; `}
295
296 #Widget is selected.
297 new selected `{ return GTK_STATE_FLAG_SELECTED; `}
298
299 #Widget is insensitive.
300 new insensitive `{ return GTK_STATE_INSENSITIVE; `}
301
302 #Widget is inconsistent.
303 new inconsistent `{ return GTK_STATE_FLAG_INCONSISTENT; `}
304
305 #Widget has the keyboard focus.
306 new focused `{ return GTK_STATE_FLAG_FOCUSED; `}
307 end
308
309 #enum GtkToolbarStyle
310 #Used to customize the appearance of a GtkToolbar.
311 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkToolbarStyle
312 extern GtkToolbarStyle `{GtkToolbarStyle`}
313 #Buttons display only icons in the toolbar.
314 new icons `{ return GTK_TOOLBAR_ICONS; `}
315
316 #Buttons display only text labels in the toolbar.
317 new text `{ return GTK_TOOLBAR_TEXT; `}
318
319 #Buttons display text and icons in the toolbar.
320 new both `{ return GTK_TOOLBAR_BOTH; `}
321
322 #Buttons display icons and text alongside each other, rather than vertically stacked
323 new both_horiz `{ return GTK_TOOLBAR_BOTH_HORIZ; `}
324 end
325
326 #enum GtkWindowPosition
327 #Window placement can be influenced using this enumeration.
328 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkWindowPosition
329 extern GtkWindowPosition `{GtkWindowPosition`}
330 #No influence is made on placement.
331 new none `{ return GTK_WIN_POS_NONE; `}
332
333 #Windows should be placed in the center of the screen.
334 new center `{ return GTK_WIN_POS_CENTER; `}
335
336 #Windows should be placed at the current mouse position.
337 new mouse `{ return GTK_WIN_POS_MOUSE; `}
338
339 #Keep window centered as it changes size, etc.
340 new center_always `{ return GTK_WIN_POS_CENTER_ALWAYS; `}
341
342 #Center the window on its transient parent.
343 new center_on_parent `{ return GTK_WIN_POS_CENTER_ON_PARENT; `}
344 end
345
346 #enum GtkWindowType
347 #A GtkWindow can be one of these types.
348 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkWindowType
349 extern GtkWindowType `{GtkWindowType`}
350 #A regular window, such as a dialog
351 new toplevel `{ return GTK_WINDOW_TOPLEVEL; `}
352
353 #A special window such as a tooltip.
354 new popup `{ return GTK_WINDOW_POPUP; `}
355 end
356
357 #enum GtkSortType
358 #Determines the direction of a sort.
359 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkSortType
360 extern GtkSortType `{GtkSortType`}
361 #Sorting is in ascending order.
362 new asc `{ return GTK_SORT_ASCENDING; `}
363
364 #Sorting is in descending order.
365 new desc `{ return GTK_SORT_DESCENDING; `}
366 end
367
368 #enum GtkBorderStyle
369 #Describes how the border of a UI element should be rendered.
370 #@https://developer.gnome.org/gtk3/3.2/gtk3-Standard-Enumerations.html#GtkBorderStyle
371 extern GtkBorderStyle `{GtkBorderStyle`}
372 #No visible border.
373 new none `{ return GTK_BORDER_STYLE_NONE; `}
374
375 #An solid border.
376 new solid `{ return GTK_BORDER_STYLE_SOLID; `}
377
378 #An intset border.
379 new inset `{ return GTK_BORDER_STYLE_INSET; `}
380
381 #An outset border.
382 new outset `{ return GTK_BORDER_STYLE_OUTSET; `}
383 end
384
385 # Icon size enum
386 extern GtkIconSize `{GtkIconSize`}
387 new invalid `{ return GTK_ICON_SIZE_INVALID; `}
388 new menu `{ return GTK_ICON_SIZE_MENU; `}
389 new small_toolbar `{ return GTK_ICON_SIZE_SMALL_TOOLBAR; `}
390 new large_toolbar `{ return GTK_ICON_SIZE_LARGE_TOOLBAR; `}
391 new button `{ return GTK_ICON_SIZE_BUTTON; `}
392 new dnd `{ return GTK_ICON_SIZE_DND; `}
393 new dialog `{ return GTK_ICON_SIZE_DIALOG;`}
394 end