CoreGTK 3.18.0 CoreGTK is an Objective-C language binding for the GTK+ widget toolkit

- Main Page
- Classes
- Files

- File List

CGTKEntry.m
1 /*
2 * CGTKEntry.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2016 - Tyler Burton
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 */
21
22 /*
23 * Modified by the CoreGTK Team, 2016. See the AUTHORS file for a
24 * list of people on the CoreGTK Team.
25 * See the ChangeLog files for a list of changes.
26 *
27 */
28
29 /*
30 * Objective-C imports
31 */
32 #import "CoreGTK/CGTKEntry.h"
33
34 @implementation CGTKEntry
35
36 -(id)init
37 {
38 self = [super initWithGObject:(GObject *)gtk_entry_new()];
39
40 if(self)
41 {
42 //Do nothing
43 }
44
45 return self;
46 }
47
48 -(id)initWithBuffer:(GtkEntryBuffer*) buffer
49 {
50 self = [super initWithGObject:(GObject *)gtk_entry_new_with_buffer(buffer)];
51
52 if(self)
53 {
54 //Do nothing
55 }
56
57 return self;
58 }
59
60 -(GtkEntry*)ENTRY
61 {
62 return GTK_ENTRY([self GOBJECT]);
63 }
64
65 -(BOOL)getActivatesDefault
66 {
67 return (gtk_entry_get_activates_default(GTK_ENTRY([self GOBJECT])) ? YES : NO);
68 }
69
70 -(gfloat)getAlignment
71 {
72 return gtk_entry_get_alignment(GTK_ENTRY([self GOBJECT]));
73 }
74
75 -(PangoAttrList*)getAttributes
76 {
77 return gtk_entry_get_attributes(GTK_ENTRY([self GOBJECT]));
78 }
79
80 -(GtkEntryBuffer*)getBuffer
81 {
82 return gtk_entry_get_buffer(GTK_ENTRY([self GOBJECT]));
83 }
84
85 -(GtkEntryCompletion*)getCompletion
86 {
87 return gtk_entry_get_completion(GTK_ENTRY([self GOBJECT]));
88 }
89
90 -(gint)getCurrentIconDragSource
91 {
92 return gtk_entry_get_current_icon_drag_source(GTK_ENTRY([self GOBJECT]));
93 }
94
95 -(GtkAdjustment*)getCursorHadjustment
96 {
97 return gtk_entry_get_cursor_hadjustment(GTK_ENTRY([self GOBJECT]));
98 }
99
100 -(BOOL)getHasFrame
101 {
102 return (gtk_entry_get_has_frame(GTK_ENTRY([self GOBJECT])) ? YES : NO);
103 }
104
105 -(BOOL)getIconActivatable:(GtkEntryIconPosition) iconPos
106 {
107 return (gtk_entry_get_icon_activatable(GTK_ENTRY([self GOBJECT]), iconPos) ? YES : NO);
108 }
109
110 -(void)getIconAreaWithIconPos:(GtkEntryIconPosition) iconPos andIconArea:(GdkRectangle*) iconArea
111 {
112 gtk_entry_get_icon_area(GTK_ENTRY([self GOBJECT]), iconPos, iconArea);
113 }
114
115 -(gint)getIconAtPosWithX:(gint) x andY:(gint) y
116 {
117 return gtk_entry_get_icon_at_pos(GTK_ENTRY([self GOBJECT]), x, y);
118 }
119
120 -(GIcon*)getIconGicon:(GtkEntryIconPosition) iconPos
121 {
122 return gtk_entry_get_icon_gicon(GTK_ENTRY([self GOBJECT]), iconPos);
123 }
124
125 -(NSString*)getIconName:(GtkEntryIconPosition) iconPos
126 {
127 return [NSString stringWithUTF8String:gtk_entry_get_icon_name(GTK_ENTRY([self GOBJECT]), iconPos)];
128 }
129
130 -(GdkPixbuf*)getIconPixbuf:(GtkEntryIconPosition) iconPos
131 {
132 return gtk_entry_get_icon_pixbuf(GTK_ENTRY([self GOBJECT]), iconPos);
133 }
134
135 -(BOOL)getIconSensitive:(GtkEntryIconPosition) iconPos
136 {
137 return (gtk_entry_get_icon_sensitive(GTK_ENTRY([self GOBJECT]), iconPos) ? YES : NO);
138 }
139
140 -(NSString*)getIconStock:(GtkEntryIconPosition) iconPos
141 {
142 return [NSString stringWithUTF8String:gtk_entry_get_icon_stock(GTK_ENTRY([self GOBJECT]), iconPos)];
143 }
144
145 -(GtkImageType)getIconStorageType:(GtkEntryIconPosition) iconPos
146 {
147 return gtk_entry_get_icon_storage_type(GTK_ENTRY([self GOBJECT]), iconPos);
148 }
149
150 -(NSString*)getIconTooltipMarkup:(GtkEntryIconPosition) iconPos
151 {
152 return [NSString stringWithUTF8String:gtk_entry_get_icon_tooltip_markup(GTK_ENTRY([self GOBJECT]), iconPos)];
153 }
154
155 -(NSString*)getIconTooltipText:(GtkEntryIconPosition) iconPos
156 {
157 return [NSString stringWithUTF8String:gtk_entry_get_icon_tooltip_text(GTK_ENTRY([self GOBJECT]), iconPos)];
158 }
159
160 -(const GtkBorder*)getInnerBorder
161 {
162 return gtk_entry_get_inner_border(GTK_ENTRY([self GOBJECT]));
163 }
164
165 -(GtkInputHints)getInputHints
166 {
167 return gtk_entry_get_input_hints(GTK_ENTRY([self GOBJECT]));
168 }
169
170 -(GtkInputPurpose)getInputPurpose
171 {
172 return gtk_entry_get_input_purpose(GTK_ENTRY([self GOBJECT]));
173 }
174
175 -(gunichar)getInvisibleChar
176 {
177 return gtk_entry_get_invisible_char(GTK_ENTRY([self GOBJECT]));
178 }
179
180 -(PangoLayout*)getLayout
181 {
182 return gtk_entry_get_layout(GTK_ENTRY([self GOBJECT]));
183 }
184
185 -(void)getLayoutOffsetsWithX:(gint*) x andY:(gint*) y
186 {
187 gtk_entry_get_layout_offsets(GTK_ENTRY([self GOBJECT]), x, y);
188 }
189
190 -(gint)getMaxLength
191 {
192 return gtk_entry_get_max_length(GTK_ENTRY([self GOBJECT]));
193 }
194
195 -(gint)getMaxWidthChars
196 {
197 return gtk_entry_get_max_width_chars(GTK_ENTRY([self GOBJECT]));
198 }
199
200 -(BOOL)getOverwriteMode
201 {
202 return (gtk_entry_get_overwrite_mode(GTK_ENTRY([self GOBJECT])) ? YES : NO);
203 }
204
205 -(NSString*)getPlaceholderText
206 {
207 return [NSString stringWithUTF8String:gtk_entry_get_placeholder_text(GTK_ENTRY([self GOBJECT]))];
208 }
209
210 -(gdouble)getProgressFraction
211 {
212 return gtk_entry_get_progress_fraction(GTK_ENTRY([self GOBJECT]));
213 }
214
215 -(gdouble)getProgressPulseStep
216 {
217 return gtk_entry_get_progress_pulse_step(GTK_ENTRY([self GOBJECT]));
218 }
219
220 -(PangoTabArray*)getTabs
221 {
222 return gtk_entry_get_tabs(GTK_ENTRY([self GOBJECT]));
223 }
224
225 -(NSString*)getText
226 {
227 return [NSString stringWithUTF8String:gtk_entry_get_text(GTK_ENTRY([self GOBJECT]))];
228 }
229
230 -(void)getTextArea:(GdkRectangle*) textArea
231 {
232 gtk_entry_get_text_area(GTK_ENTRY([self GOBJECT]), textArea);
233 }
234
235 -(guint16)getTextLength
236 {
237 return gtk_entry_get_text_length(GTK_ENTRY([self GOBJECT]));
238 }
239
240 -(BOOL)getVisibility
241 {
242 return (gtk_entry_get_visibility(GTK_ENTRY([self GOBJECT])) ? YES : NO);
243 }
244
245 -(gint)getWidthChars
246 {
247 return gtk_entry_get_width_chars(GTK_ENTRY([self GOBJECT]));
248 }
249
250 -(void)grabFocusWithoutSelecting
251 {
252 gtk_entry_grab_focus_without_selecting(GTK_ENTRY([self GOBJECT]));
253 }
254
255 -(BOOL)imContextFilterKeypress:(GdkEventKey*) event
256 {
257 return (gtk_entry_im_context_filter_keypress(GTK_ENTRY([self GOBJECT]), event) ? YES : NO);
258 }
259
260 -(gint)layoutIndexToTextIndex:(gint) layoutIndex
261 {
262 return gtk_entry_layout_index_to_text_index(GTK_ENTRY([self GOBJECT]), layoutIndex);
263 }
264
265 -(void)progressPulse
266 {
267 gtk_entry_progress_pulse(GTK_ENTRY([self GOBJECT]));
268 }
269
270 -(void)resetImContext
271 {
272 gtk_entry_reset_im_context(GTK_ENTRY([self GOBJECT]));
273 }
274
275 -(void)setActivatesDefault:(BOOL) setting
276 {
277 gtk_entry_set_activates_default(GTK_ENTRY([self GOBJECT]), (setting ? TRUE : FALSE));
278 }
279
280 -(void)setAlignment:(gfloat) xalign
281 {
282 gtk_entry_set_alignment(GTK_ENTRY([self GOBJECT]), xalign);
283 }
284
285 -(void)setAttributes:(PangoAttrList*) attrs
286 {
287 gtk_entry_set_attributes(GTK_ENTRY([self GOBJECT]), attrs);
288 }
289
290 -(void)setBuffer:(GtkEntryBuffer*) buffer
291 {
292 gtk_entry_set_buffer(GTK_ENTRY([self GOBJECT]), buffer);
293 }
294
295 -(void)setCompletion:(GtkEntryCompletion*) completion
296 {
297 gtk_entry_set_completion(GTK_ENTRY([self GOBJECT]), completion);
298 }
299
300 -(void)setCursorHadjustment:(GtkAdjustment*) adjustment
301 {
302 gtk_entry_set_cursor_hadjustment(GTK_ENTRY([self GOBJECT]), adjustment);
303 }
304
305 -(void)setHasFrame:(BOOL) setting
306 {
307 gtk_entry_set_has_frame(GTK_ENTRY([self GOBJECT]), (setting ? TRUE : FALSE));
308 }
309
310 -(void)setIconActivatableWithIconPos:(GtkEntryIconPosition) iconPos andActivatable:(BOOL) activatable
311 {
312 gtk_entry_set_icon_activatable(GTK_ENTRY([self GOBJECT]), iconPos, (activatable ? TRUE : FALSE));
313 }
314
315 -(void)setIconDragSourceWithIconPos:(GtkEntryIconPosition) iconPos andTargetList:(GtkTargetList*) targetList andActions:(GdkDragAction) actions
316 {
317 gtk_entry_set_icon_drag_source(GTK_ENTRY([self GOBJECT]), iconPos, targetList, actions);
318 }
319
320 -(void)setIconFromGiconWithIconPos:(GtkEntryIconPosition) iconPos andIcon:(GIcon*) icon
321 {
322 gtk_entry_set_icon_from_gicon(GTK_ENTRY([self GOBJECT]), iconPos, icon);
323 }
324
325 -(void)setIconFromIconNameWithIconPos:(GtkEntryIconPosition) iconPos andIconName:(NSString*) iconName
326 {
327 gtk_entry_set_icon_from_icon_name(GTK_ENTRY([self GOBJECT]), iconPos, [iconName UTF8String]);
328 }
329
330 -(void)setIconFromPixbufWithIconPos:(GtkEntryIconPosition) iconPos andPixbuf:(GdkPixbuf*) pixbuf
331 {
332 gtk_entry_set_icon_from_pixbuf(GTK_ENTRY([self GOBJECT]), iconPos, pixbuf);
333 }
334
335 -(void)setIconFromStockWithIconPos:(GtkEntryIconPosition) iconPos andStockId:(NSString*) stockId
336 {
337 gtk_entry_set_icon_from_stock(GTK_ENTRY([self GOBJECT]), iconPos, [stockId UTF8String]);
338 }
339
340 -(void)setIconSensitiveWithIconPos:(GtkEntryIconPosition) iconPos andSensitive:(BOOL) sensitive
341 {
342 gtk_entry_set_icon_sensitive(GTK_ENTRY([self GOBJECT]), iconPos, (sensitive ? TRUE : FALSE));
343 }
344
345 -(void)setIconTooltipMarkupWithIconPos:(GtkEntryIconPosition) iconPos andTooltip:(NSString*) tooltip
346 {
347 gtk_entry_set_icon_tooltip_markup(GTK_ENTRY([self GOBJECT]), iconPos, [tooltip UTF8String]);
348 }
349
350 -(void)setIconTooltipTextWithIconPos:(GtkEntryIconPosition) iconPos andTooltip:(NSString*) tooltip
351 {
352 gtk_entry_set_icon_tooltip_text(GTK_ENTRY([self GOBJECT]), iconPos, [tooltip UTF8String]);
353 }
354
355 -(void)setInnerBorder:(const GtkBorder*) border
356 {
357 gtk_entry_set_inner_border(GTK_ENTRY([self GOBJECT]), border);
358 }
359
360 -(void)setInputHints:(GtkInputHints) hints
361 {
362 gtk_entry_set_input_hints(GTK_ENTRY([self GOBJECT]), hints);
363 }
364
365 -(void)setInputPurpose:(GtkInputPurpose) purpose
366 {
367 gtk_entry_set_input_purpose(GTK_ENTRY([self GOBJECT]), purpose);
368 }
369
370 -(void)setInvisibleChar:(gunichar) ch
371 {
372 gtk_entry_set_invisible_char(GTK_ENTRY([self GOBJECT]), ch);
373 }
374
375 -(void)setMaxLength:(gint) max
376 {
377 gtk_entry_set_max_length(GTK_ENTRY([self GOBJECT]), max);
378 }
379
380 -(void)setMaxWidthChars:(gint) nchars
381 {
382 gtk_entry_set_max_width_chars(GTK_ENTRY([self GOBJECT]), nchars);
383 }
384
385 -(void)setOverwriteMode:(BOOL) overwrite
386 {
387 gtk_entry_set_overwrite_mode(GTK_ENTRY([self GOBJECT]), (overwrite ? TRUE : FALSE));
388 }
389
390 -(void)setPlaceholderText:(NSString*) text
391 {
392 gtk_entry_set_placeholder_text(GTK_ENTRY([self GOBJECT]), [text UTF8String]);
393 }
394
395 -(void)setProgressFraction:(gdouble) fraction
396 {
397 gtk_entry_set_progress_fraction(GTK_ENTRY([self GOBJECT]), fraction);
398 }
399
400 -(void)setProgressPulseStep:(gdouble) fraction
401 {
402 gtk_entry_set_progress_pulse_step(GTK_ENTRY([self GOBJECT]), fraction);
403 }
404
405 -(void)setTabs:(PangoTabArray*) tabs
406 {
407 gtk_entry_set_tabs(GTK_ENTRY([self GOBJECT]), tabs);
408 }
409
410 -(void)setText:(NSString*) text
411 {
412 gtk_entry_set_text(GTK_ENTRY([self GOBJECT]), [text UTF8String]);
413 }
414
415 -(void)setVisibility:(BOOL) visible
416 {
417 gtk_entry_set_visibility(GTK_ENTRY([self GOBJECT]), (visible ? TRUE : FALSE));
418 }
419
420 -(void)setWidthChars:(gint) nchars
421 {
422 gtk_entry_set_width_chars(GTK_ENTRY([self GOBJECT]), nchars);
423 }
424
425 -(gint)textIndexToLayoutIndex:(gint) textIndex
426 {
427 return gtk_entry_text_index_to_layout_index(GTK_ENTRY([self GOBJECT]), textIndex);
428 }
429
430 -(void)unsetInvisibleChar
431 {
432 gtk_entry_unset_invisible_char(GTK_ENTRY([self GOBJECT]));
433 }
434
435
436 @end
-[CGTKEntry getInputPurpose]
GtkInputPurpose getInputPurpose()
Definition: CGTKEntry.m:170
-[CGTKEntry getProgressFraction]
gdouble getProgressFraction()
Definition: CGTKEntry.m:210
-[CGTKEntry getVisibility]
BOOL getVisibility()
Definition: CGTKEntry.m:240
-[CGTKEntry resetImContext]
void resetImContext()
Definition: CGTKEntry.m:270
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
-[CGTKEntry getMaxWidthChars]
gint getMaxWidthChars()
Definition: CGTKEntry.m:195
CGTKEntry
Definition: CGTKEntry.h:34
-[CGTKEntry getActivatesDefault]
BOOL getActivatesDefault()
Definition: CGTKEntry.m:65
-[CGTKEntry getInputHints]
GtkInputHints getInputHints()
Definition: CGTKEntry.m:165
-[CGTKEntry getHasFrame]
BOOL getHasFrame()
Definition: CGTKEntry.m:100
-[CGTKBase initWithGObject:]
id initWithGObject:(GObject *obj)
Definition: CGTKBase.m:48
-[CGTKEntry getInvisibleChar]
gunichar getInvisibleChar()
Definition: CGTKEntry.m:175
-[CGTKEntry unsetInvisibleChar]
void unsetInvisibleChar()
Definition: CGTKEntry.m:430
-[CGTKEntry getPlaceholderText]
NSString * getPlaceholderText()
Definition: CGTKEntry.m:205
-[CGTKEntry getProgressPulseStep]
gdouble getProgressPulseStep()
Definition: CGTKEntry.m:215
-[CGTKEntry getCurrentIconDragSource]
gint getCurrentIconDragSource()
Definition: CGTKEntry.m:90
-[CGTKEntry getAttributes]
PangoAttrList * getAttributes()
Definition: CGTKEntry.m:75
-[CGTKEntry getBuffer]
GtkEntryBuffer * getBuffer()
Definition: CGTKEntry.m:80
-[CGTKEntry getCompletion]
GtkEntryCompletion * getCompletion()
Definition: CGTKEntry.m:85
-[CGTKEntry getLayout]
PangoLayout * getLayout()
Definition: CGTKEntry.m:180
-[CGTKEntry getCursorHadjustment]
GtkAdjustment * getCursorHadjustment()
Definition: CGTKEntry.m:95
-[CGTKEntry ENTRY]
GtkEntry * ENTRY()
Definition: CGTKEntry.m:60
-[CGTKEntry init]
id init()
Definition: CGTKEntry.m:36
-[CGTKEntry getAlignment]
gfloat getAlignment()
Definition: CGTKEntry.m:70
-[CGTKEntry progressPulse]
void progressPulse()
Definition: CGTKEntry.m:265
-[CGTKEntry getText]
NSString * getText()
Definition: CGTKEntry.m:225
-[CGTKEntry grabFocusWithoutSelecting]
void grabFocusWithoutSelecting()
Definition: CGTKEntry.m:250
-[CGTKEntry getWidthChars]
gint getWidthChars()
Definition: CGTKEntry.m:245
-[CGTKEntry getTextLength]
guint16 getTextLength()
Definition: CGTKEntry.m:235
-[CGTKEntry getMaxLength]
gint getMaxLength()
Definition: CGTKEntry.m:190
-[CGTKEntry getInnerBorder]
const GtkBorder * getInnerBorder()
Definition: CGTKEntry.m:160
-[CGTKEntry getOverwriteMode]
BOOL getOverwriteMode()
Definition: CGTKEntry.m:200
-[CGTKEntry getTabs]
PangoTabArray * getTabs()
Definition: CGTKEntry.m:220