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

- Main Page
- Classes
- Files

- File List

All Classes Functions Variables
CGTKEntry.m
1 /*
2 * CGTKEntry.m
3 * This file is part of CoreGTK
4 *
5 * Copyright (C) 2015 - 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, 2015. 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 -(BOOL)getOverwriteMode
196 {
197 return (gtk_entry_get_overwrite_mode(GTK_ENTRY([self GOBJECT])) ? YES : NO);
198 }
199
200 -(NSString*)getPlaceholderText
201 {
202 return [NSString stringWithUTF8String:gtk_entry_get_placeholder_text(GTK_ENTRY([self GOBJECT]))];
203 }
204
205 -(gdouble)getProgressFraction
206 {
207 return gtk_entry_get_progress_fraction(GTK_ENTRY([self GOBJECT]));
208 }
209
210 -(gdouble)getProgressPulseStep
211 {
212 return gtk_entry_get_progress_pulse_step(GTK_ENTRY([self GOBJECT]));
213 }
214
215 -(PangoTabArray*)getTabs
216 {
217 return gtk_entry_get_tabs(GTK_ENTRY([self GOBJECT]));
218 }
219
220 -(NSString*)getText
221 {
222 return [NSString stringWithUTF8String:gtk_entry_get_text(GTK_ENTRY([self GOBJECT]))];
223 }
224
225 -(void)getTextArea:(GdkRectangle*) textArea
226 {
227 gtk_entry_get_text_area(GTK_ENTRY([self GOBJECT]), textArea);
228 }
229
230 -(guint16)getTextLength
231 {
232 return gtk_entry_get_text_length(GTK_ENTRY([self GOBJECT]));
233 }
234
235 -(BOOL)getVisibility
236 {
237 return (gtk_entry_get_visibility(GTK_ENTRY([self GOBJECT])) ? YES : NO);
238 }
239
240 -(gint)getWidthChars
241 {
242 return gtk_entry_get_width_chars(GTK_ENTRY([self GOBJECT]));
243 }
244
245 -(BOOL)imContextFilterKeypress:(GdkEventKey*) event
246 {
247 return (gtk_entry_im_context_filter_keypress(GTK_ENTRY([self GOBJECT]), event) ? YES : NO);
248 }
249
250 -(gint)layoutIndexToTextIndex:(gint) layoutIndex
251 {
252 return gtk_entry_layout_index_to_text_index(GTK_ENTRY([self GOBJECT]), layoutIndex);
253 }
254
255 -(void)progressPulse
256 {
257 gtk_entry_progress_pulse(GTK_ENTRY([self GOBJECT]));
258 }
259
260 -(void)resetImContext
261 {
262 gtk_entry_reset_im_context(GTK_ENTRY([self GOBJECT]));
263 }
264
265 -(void)setActivatesDefault:(BOOL) setting
266 {
267 gtk_entry_set_activates_default(GTK_ENTRY([self GOBJECT]), (setting ? TRUE : FALSE));
268 }
269
270 -(void)setAlignment:(gfloat) xalign
271 {
272 gtk_entry_set_alignment(GTK_ENTRY([self GOBJECT]), xalign);
273 }
274
275 -(void)setAttributes:(PangoAttrList*) attrs
276 {
277 gtk_entry_set_attributes(GTK_ENTRY([self GOBJECT]), attrs);
278 }
279
280 -(void)setBuffer:(GtkEntryBuffer*) buffer
281 {
282 gtk_entry_set_buffer(GTK_ENTRY([self GOBJECT]), buffer);
283 }
284
285 -(void)setCompletion:(GtkEntryCompletion*) completion
286 {
287 gtk_entry_set_completion(GTK_ENTRY([self GOBJECT]), completion);
288 }
289
290 -(void)setCursorHadjustment:(GtkAdjustment*) adjustment
291 {
292 gtk_entry_set_cursor_hadjustment(GTK_ENTRY([self GOBJECT]), adjustment);
293 }
294
295 -(void)setHasFrame:(BOOL) setting
296 {
297 gtk_entry_set_has_frame(GTK_ENTRY([self GOBJECT]), (setting ? TRUE : FALSE));
298 }
299
300 -(void)setIconActivatableWithIconPos:(GtkEntryIconPosition) iconPos andActivatable:(BOOL) activatable
301 {
302 gtk_entry_set_icon_activatable(GTK_ENTRY([self GOBJECT]), iconPos, (activatable ? TRUE : FALSE));
303 }
304
305 -(void)setIconDragSourceWithIconPos:(GtkEntryIconPosition) iconPos andTargetList:(GtkTargetList*) targetList andActions:(GdkDragAction) actions
306 {
307 gtk_entry_set_icon_drag_source(GTK_ENTRY([self GOBJECT]), iconPos, targetList, actions);
308 }
309
310 -(void)setIconFromGiconWithIconPos:(GtkEntryIconPosition) iconPos andIcon:(GIcon*) icon
311 {
312 gtk_entry_set_icon_from_gicon(GTK_ENTRY([self GOBJECT]), iconPos, icon);
313 }
314
315 -(void)setIconFromIconNameWithIconPos:(GtkEntryIconPosition) iconPos andIconName:(NSString*) iconName
316 {
317 gtk_entry_set_icon_from_icon_name(GTK_ENTRY([self GOBJECT]), iconPos, [iconName UTF8String]);
318 }
319
320 -(void)setIconFromPixbufWithIconPos:(GtkEntryIconPosition) iconPos andPixbuf:(GdkPixbuf*) pixbuf
321 {
322 gtk_entry_set_icon_from_pixbuf(GTK_ENTRY([self GOBJECT]), iconPos, pixbuf);
323 }
324
325 -(void)setIconFromStockWithIconPos:(GtkEntryIconPosition) iconPos andStockId:(NSString*) stockId
326 {
327 gtk_entry_set_icon_from_stock(GTK_ENTRY([self GOBJECT]), iconPos, [stockId UTF8String]);
328 }
329
330 -(void)setIconSensitiveWithIconPos:(GtkEntryIconPosition) iconPos andSensitive:(BOOL) sensitive
331 {
332 gtk_entry_set_icon_sensitive(GTK_ENTRY([self GOBJECT]), iconPos, (sensitive ? TRUE : FALSE));
333 }
334
335 -(void)setIconTooltipMarkupWithIconPos:(GtkEntryIconPosition) iconPos andTooltip:(NSString*) tooltip
336 {
337 gtk_entry_set_icon_tooltip_markup(GTK_ENTRY([self GOBJECT]), iconPos, [tooltip UTF8String]);
338 }
339
340 -(void)setIconTooltipTextWithIconPos:(GtkEntryIconPosition) iconPos andTooltip:(NSString*) tooltip
341 {
342 gtk_entry_set_icon_tooltip_text(GTK_ENTRY([self GOBJECT]), iconPos, [tooltip UTF8String]);
343 }
344
345 -(void)setInnerBorder:(const GtkBorder*) border
346 {
347 gtk_entry_set_inner_border(GTK_ENTRY([self GOBJECT]), border);
348 }
349
350 -(void)setInputHints:(GtkInputHints) hints
351 {
352 gtk_entry_set_input_hints(GTK_ENTRY([self GOBJECT]), hints);
353 }
354
355 -(void)setInputPurpose:(GtkInputPurpose) purpose
356 {
357 gtk_entry_set_input_purpose(GTK_ENTRY([self GOBJECT]), purpose);
358 }
359
360 -(void)setInvisibleChar:(gunichar) ch
361 {
362 gtk_entry_set_invisible_char(GTK_ENTRY([self GOBJECT]), ch);
363 }
364
365 -(void)setMaxLength:(gint) max
366 {
367 gtk_entry_set_max_length(GTK_ENTRY([self GOBJECT]), max);
368 }
369
370 -(void)setOverwriteMode:(BOOL) overwrite
371 {
372 gtk_entry_set_overwrite_mode(GTK_ENTRY([self GOBJECT]), (overwrite ? TRUE : FALSE));
373 }
374
375 -(void)setPlaceholderText:(NSString*) text
376 {
377 gtk_entry_set_placeholder_text(GTK_ENTRY([self GOBJECT]), [text UTF8String]);
378 }
379
380 -(void)setProgressFraction:(gdouble) fraction
381 {
382 gtk_entry_set_progress_fraction(GTK_ENTRY([self GOBJECT]), fraction);
383 }
384
385 -(void)setProgressPulseStep:(gdouble) fraction
386 {
387 gtk_entry_set_progress_pulse_step(GTK_ENTRY([self GOBJECT]), fraction);
388 }
389
390 -(void)setTabs:(PangoTabArray*) tabs
391 {
392 gtk_entry_set_tabs(GTK_ENTRY([self GOBJECT]), tabs);
393 }
394
395 -(void)setText:(NSString*) text
396 {
397 gtk_entry_set_text(GTK_ENTRY([self GOBJECT]), [text UTF8String]);
398 }
399
400 -(void)setVisibility:(BOOL) visible
401 {
402 gtk_entry_set_visibility(GTK_ENTRY([self GOBJECT]), (visible ? TRUE : FALSE));
403 }
404
405 -(void)setWidthChars:(gint) nchars
406 {
407 gtk_entry_set_width_chars(GTK_ENTRY([self GOBJECT]), nchars);
408 }
409
410 -(gint)textIndexToLayoutIndex:(gint) textIndex
411 {
412 return gtk_entry_text_index_to_layout_index(GTK_ENTRY([self GOBJECT]), textIndex);
413 }
414
415 -(void)unsetInvisibleChar
416 {
417 gtk_entry_unset_invisible_char(GTK_ENTRY([self GOBJECT]));
418 }
419
420
421 @end
-[CGTKEntry getInputPurpose]
GtkInputPurpose getInputPurpose()
Definition: CGTKEntry.m:170
-[CGTKEntry getProgressFraction]
gdouble getProgressFraction()
Definition: CGTKEntry.m:205
-[CGTKEntry getVisibility]
BOOL getVisibility()
Definition: CGTKEntry.m:235
-[CGTKEntry resetImContext]
void resetImContext()
Definition: CGTKEntry.m:260
-[CGTKBase GOBJECT]
GObject * GOBJECT()
Definition: CGTKBase.m:82
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:415
-[CGTKEntry getPlaceholderText]
NSString * getPlaceholderText()
Definition: CGTKEntry.m:200
-[CGTKEntry getProgressPulseStep]
gdouble getProgressPulseStep()
Definition: CGTKEntry.m:210
-[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:255
-[CGTKEntry getText]
NSString * getText()
Definition: CGTKEntry.m:220
-[CGTKEntry getWidthChars]
gint getWidthChars()
Definition: CGTKEntry.m:240
-[CGTKEntry getTextLength]
guint16 getTextLength()
Definition: CGTKEntry.m:230
-[CGTKEntry getMaxLength]
gint getMaxLength()
Definition: CGTKEntry.m:190
-[CGTKEntry getInnerBorder]
const GtkBorder * getInnerBorder()
Definition: CGTKEntry.m:160
-[CGTKEntry getOverwriteMode]
BOOL getOverwriteMode()
Definition: CGTKEntry.m:195
-[CGTKEntry getTabs]
PangoTabArray * getTabs()
Definition: CGTKEntry.m:215