Merge: doc: fixed some typos and other misc. corrections
[nit.git] / lib / gtk / v3_6.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Copyright 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 # GTK+ services added at version 3.6
19 module v3_6 is pkgconfig "gtk+-3.0"
20
21 import v3_4
22
23 # An entry which shows a search icon
24 # See: https://developer.gnome.org/gtk3/stable/GtkSearchEntry.html
25 extern class GtkSearchEntry `{GtkSearchEntry *`}
26 super GtkEntry
27
28 new `{
29 return (GtkSearchEntry *)gtk_search_entry_new();
30 `}
31 end
32
33 redef extern class GtkEntry
34 # Purpose of this text field
35 #
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);
39 `}
40
41 # Input purpose, tweaks the behavior of this widget
42 #
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);
46 `}
47 end
48
49 # Describe the purpose of an input widget
50 extern class GtkInputPurpose `{ GtkInputPurpose `}
51 # Allow any character
52 new free_form `{ return GTK_INPUT_PURPOSE_FREE_FORM; `}
53
54 # Allow only alphabetic characters
55 new alpha `{ return GTK_INPUT_PURPOSE_ALPHA; `}
56
57 # Allow only digits
58 new digits `{ return GTK_INPUT_PURPOSE_DIGITS; `}
59
60 # Edited field expects numbers
61 new number `{ return GTK_INPUT_PURPOSE_NUMBER; `}
62
63 # Edited field expects phone number
64 new phone `{ return GTK_INPUT_PURPOSE_PHONE; `}
65
66 # Edited field expects URL
67 new url `{ return GTK_INPUT_PURPOSE_URL; `}
68
69 # Edited field expects email address
70 new email `{ return GTK_INPUT_PURPOSE_EMAIL; `}
71
72 # Edited field expects the name of a person
73 new name `{ return GTK_INPUT_PURPOSE_NAME; `}
74
75 # Like `free_form`, but characters are hidden
76 new password `{ return GTK_INPUT_PURPOSE_PASSWORD; `}
77
78 # Like `digits`, but characters are hidden
79 new pin `{ return GTK_INPUT_PURPOSE_PIN; `}
80 end