1 # This file is part of NIT ( http://www.nitlanguage.org ).
3 # Copyright 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 # GTK+ services added at version 3.6
19 module v3_6
is pkgconfig
"gtk+-3.0"
23 # An entry which shows a search icon
24 # See: https://developer.gnome.org/gtk3/stable/GtkSearchEntry.html
25 extern class GtkSearchEntry `{GtkSearchEntry *`}
29 return (GtkSearchEntry *)gtk_search_entry_new
();
33 redef extern class GtkEntry
34 # Purpose of this text field
36 # Can be used by on-screen keyboards and other input methods to adjust their behaviour.
37 fun input_purpose: GtkInputPurpose `{
38 return gtk_entry_get_input_purpose
(self);
41 # Input purpose, tweaks the behavior of this widget
43 # Can be used by on-screen keyboards and other input methods to adjust their behaviour.
44 fun input_purpose=(purpose: GtkInputPurpose) `{
45 gtk_entry_set_input_purpose
(self, purpose
);
49 # Describe the purpose of an input widget
50 extern class GtkInputPurpose `{ GtkInputPurpose `}
52 new free_form
`{ return GTK_INPUT_PURPOSE_FREE_FORM; `}
54 # Allow only alphabetic characters
55 new alpha `{ return GTK_INPUT_PURPOSE_ALPHA; `}
58 new digits
`{ return GTK_INPUT_PURPOSE_DIGITS; `}
60 # Edited field expects numbers
61 new number `{ return GTK_INPUT_PURPOSE_NUMBER; `}
63 # Edited field expects phone number
64 new phone
`{ return GTK_INPUT_PURPOSE_PHONE; `}
66 # Edited field expects URL
67 new url `{ return GTK_INPUT_PURPOSE_URL; `}
69 # Edited field expects email address
70 new email
`{ return GTK_INPUT_PURPOSE_EMAIL; `}
72 # Edited field expects the name of a person
73 new name `{ return GTK_INPUT_PURPOSE_NAME; `}
75 # Like `free_form`, but characters are hidden
76 new password
`{ return GTK_INPUT_PURPOSE_PASSWORD; `}
78 # Like `digits
`, but characters are hidden
79 new pin `{ return GTK_INPUT_PURPOSE_PIN; `}