Mercurial > pidgin
comparison finch/libgnt/gntentry.h @ 20306:665d6d7eea83
applied changes from 88f296b3653b5a7578a7581c1582d37390c9d212
through 4bbc209c8076ef89135700af844ec6bb04602c0a
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 19 Oct 2007 17:06:53 +0000 |
parents | 44b4e8bd759b |
children | 1f59065c606a |
comparison
equal
deleted
inserted
replaced
20305:636e6a3a5b67 | 20306:665d6d7eea83 |
---|---|
98 }; | 98 }; |
99 | 99 |
100 G_BEGIN_DECLS | 100 G_BEGIN_DECLS |
101 | 101 |
102 /** | 102 /** |
103 * | 103 * @return GType for GntEntry. |
104 * | |
105 * @return | |
106 */ | 104 */ |
107 GType gnt_entry_get_gtype(void); | 105 GType gnt_entry_get_gtype(void); |
108 | 106 |
109 /** | 107 /** |
110 * | 108 * Create a new GntEntry. |
111 * @param text | 109 * |
112 * | 110 * @param text The text in the new entry box. |
113 * @return | 111 * |
112 * @return The newly created entry box. | |
114 */ | 113 */ |
115 GntWidget * gnt_entry_new(const char *text); | 114 GntWidget * gnt_entry_new(const char *text); |
116 | 115 |
117 /** | 116 /** |
118 * | 117 * Set the maximum length of the text in the entry box. |
119 * @param entry | 118 * |
120 * @param max | 119 * @param entry The entry box. |
120 * @param max The maximum length for text. A value of 0 means infinite length. | |
121 */ | 121 */ |
122 void gnt_entry_set_max(GntEntry *entry, int max); | 122 void gnt_entry_set_max(GntEntry *entry, int max); |
123 | 123 |
124 /** | 124 /** |
125 * | 125 * Set the text in an entry box. |
126 * @param entry | 126 * |
127 * @param text | 127 * @param entry The entry box. |
128 * @param text The text to set in the box. | |
128 */ | 129 */ |
129 void gnt_entry_set_text(GntEntry *entry, const char *text); | 130 void gnt_entry_set_text(GntEntry *entry, const char *text); |
130 | 131 |
131 /** | 132 /** |
132 * | 133 * Set flags an entry box. |
133 * @param entry | 134 * |
134 * @param flag | 135 * @param entry The entry box. |
136 * @param flag The flags to set for the entry box. | |
135 */ | 137 */ |
136 void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); | 138 void gnt_entry_set_flag(GntEntry *entry, GntEntryFlag flag); |
137 | 139 |
140 /** | |
141 * Get the text in an entry box. | |
142 * | |
143 * @param entry The entry box. | |
144 * | |
145 * @return The current text in the entry box. | |
146 */ | |
138 const char *gnt_entry_get_text(GntEntry *entry); | 147 const char *gnt_entry_get_text(GntEntry *entry); |
139 | 148 |
140 /** | 149 /** |
141 * | 150 * Clear the text in the entry box. |
142 * @param entry | 151 * |
152 * @param entry The entry box. | |
143 */ | 153 */ |
144 void gnt_entry_clear(GntEntry *entry); | 154 void gnt_entry_clear(GntEntry *entry); |
145 | 155 |
146 /** | 156 /** |
147 * | 157 * Set whether the text in the entry box should be masked for display. |
148 * @param entry | 158 * |
149 * @param set | 159 * @param entry The entry box. |
160 * @param set @c TRUE if the text should be masked, @c FALSE otherwise. | |
150 */ | 161 */ |
151 void gnt_entry_set_masked(GntEntry *entry, gboolean set); | 162 void gnt_entry_set_masked(GntEntry *entry, gboolean set); |
152 | 163 |
153 /** | 164 /** |
154 * | 165 * Add a text to the history list for the text. The history length for the |
155 * @param entry | 166 * entry box needs to be set first by gnt_entry_set_history_length. |
156 * @param text | 167 * |
168 * @param entry The entry box. | |
169 * @param text A new entry for the history list. | |
157 */ | 170 */ |
158 void gnt_entry_add_to_history(GntEntry *entry, const char *text); | 171 void gnt_entry_add_to_history(GntEntry *entry, const char *text); |
159 | 172 |
160 /** | 173 /** |
161 * | 174 * Set the length of history for the entry box. |
162 * @param entry | 175 * |
163 * @param num | 176 * @param entry The entry box. |
177 * @param num The maximum length of the history. | |
164 */ | 178 */ |
165 void gnt_entry_set_history_length(GntEntry *entry, int num); | 179 void gnt_entry_set_history_length(GntEntry *entry, int num); |
166 | 180 |
167 /** | 181 /** |
168 * | 182 * Set whether the suggestions are for the entire entry box, or for each |
169 * @param entry | 183 * individual word in the entry box. |
170 * @param word | 184 * |
185 * @param entry The entry box. | |
186 * @param word @c TRUE if the suggestions are for individual words, @c FALSE otherwise. | |
171 */ | 187 */ |
172 void gnt_entry_set_word_suggest(GntEntry *entry, gboolean word); | 188 void gnt_entry_set_word_suggest(GntEntry *entry, gboolean word); |
173 | 189 |
174 /** | 190 /** |
175 * | 191 * Set whether to always display the suggestions list, or only when the |
176 * @param entry | 192 * tab-completion key is pressed (the TAB key, by default). |
177 * @param always | 193 * |
194 * @param entry The entry box. | |
195 * @param always @c TRUE if the suggestion list should always be displayed. | |
178 */ | 196 */ |
179 void gnt_entry_set_always_suggest(GntEntry *entry, gboolean always); | 197 void gnt_entry_set_always_suggest(GntEntry *entry, gboolean always); |
180 | 198 |
181 /** | 199 /** |
182 * | 200 * Add an item to the suggestion list. |
183 * @param entry | 201 * |
184 * @param text | 202 * @param entry The entry box. |
203 * @param text An item to add to the suggestion list. | |
185 */ | 204 */ |
186 void gnt_entry_add_suggest(GntEntry *entry, const char *text); | 205 void gnt_entry_add_suggest(GntEntry *entry, const char *text); |
187 | 206 |
188 /** | 207 /** |
189 * | 208 * Remove an entry from the suggestion list. |
190 * @param entry | 209 * |
191 * @param text | 210 * @param entry The entry box. |
211 * @param text The item to remove from the suggestion list. | |
192 */ | 212 */ |
193 void gnt_entry_remove_suggest(GntEntry *entry, const char *text); | 213 void gnt_entry_remove_suggest(GntEntry *entry, const char *text); |
194 | 214 |
195 G_END_DECLS | 215 G_END_DECLS |
196 | 216 |