1------------------------------------------------------------------------------
2--                                                                          --
3--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
4--                     Copyright (C) 2000-2015, AdaCore                     --
5--                                                                          --
6-- This library is free software;  you can redistribute it and/or modify it --
7-- under terms of the  GNU General Public License  as published by the Free --
8-- Software  Foundation;  either version 3,  or (at your  option) any later --
9-- version. This library is distributed in the hope that it will be useful, --
10-- but WITHOUT ANY WARRANTY;  without even the implied warranty of MERCHAN- --
11-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
12--                                                                          --
13-- As a special exception under Section 7 of GPL version 3, you are granted --
14-- additional permissions described in the GCC Runtime Library Exception,   --
15-- version 3.1, as published by the Free Software Foundation.               --
16--                                                                          --
17-- You should have received a copy of the GNU General Public License and    --
18-- a copy of the GCC Runtime Library Exception along with this program;     --
19-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
20-- <http://www.gnu.org/licenses/>.                                          --
21--                                                                          --
22------------------------------------------------------------------------------
23
24pragma Style_Checks (Off);
25pragma Warnings (Off, "*is already use-visible*");
26with Ada.Unchecked_Conversion;
27with Glib.Type_Conversion_Hooks; use Glib.Type_Conversion_Hooks;
28with Glib.Values;                use Glib.Values;
29with Gtk.Arguments;              use Gtk.Arguments;
30with Gtkada.Bindings;            use Gtkada.Bindings;
31pragma Warnings(Off);  --  might be unused
32with Interfaces.C.Strings;       use Interfaces.C.Strings;
33pragma Warnings(On);
34
35package body Gtk.GEntry is
36
37   procedure Insert_Text
38     (Editable : access Gtk_Entry_Record;
39      New_Text : UTF8_String;
40      Position : in out Gint) is
41   begin
42      Insert_Text
43        (Editable, New_Text & ASCII.NUL, New_Text'Length, Position);
44   end Insert_Text;
45
46   package Type_Conversion_Gtk_Entry is new Glib.Type_Conversion_Hooks.Hook_Registrator
47     (Get_Type'Access, Gtk_Entry_Record);
48   pragma Unreferenced (Type_Conversion_Gtk_Entry);
49
50   -------------------
51   -- Gtk_Entry_New --
52   -------------------
53
54   function Gtk_Entry_New return Gtk_Entry is
55      The_Entry : constant Gtk_Entry := new Gtk_Entry_Record;
56   begin
57      Gtk.GEntry.Initialize (The_Entry);
58      return The_Entry;
59   end Gtk_Entry_New;
60
61   -------------------------------
62   -- Gtk_Entry_New_With_Buffer --
63   -------------------------------
64
65   function Gtk_Entry_New_With_Buffer
66      (Buffer : not null access Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record'Class)
67       return Gtk_Entry
68   is
69      The_Entry : constant Gtk_Entry := new Gtk_Entry_Record;
70   begin
71      Gtk.GEntry.Initialize_With_Buffer (The_Entry, Buffer);
72      return The_Entry;
73   end Gtk_Entry_New_With_Buffer;
74
75   -------------
76   -- Gtk_New --
77   -------------
78
79   procedure Gtk_New (The_Entry : out Gtk_Entry) is
80   begin
81      The_Entry := new Gtk_Entry_Record;
82      Gtk.GEntry.Initialize (The_Entry);
83   end Gtk_New;
84
85   -------------------------
86   -- Gtk_New_With_Buffer --
87   -------------------------
88
89   procedure Gtk_New_With_Buffer
90      (The_Entry : out Gtk_Entry;
91       Buffer    : not null access Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record'Class)
92   is
93   begin
94      The_Entry := new Gtk_Entry_Record;
95      Gtk.GEntry.Initialize_With_Buffer (The_Entry, Buffer);
96   end Gtk_New_With_Buffer;
97
98   ----------------
99   -- Initialize --
100   ----------------
101
102   procedure Initialize (The_Entry : not null access Gtk_Entry_Record'Class) is
103      function Internal return System.Address;
104      pragma Import (C, Internal, "gtk_entry_new");
105   begin
106      if not The_Entry.Is_Created then
107         Set_Object (The_Entry, Internal);
108      end if;
109   end Initialize;
110
111   ----------------------------
112   -- Initialize_With_Buffer --
113   ----------------------------
114
115   procedure Initialize_With_Buffer
116      (The_Entry : not null access Gtk_Entry_Record'Class;
117       Buffer    : not null access Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record'Class)
118   is
119      function Internal (Buffer : System.Address) return System.Address;
120      pragma Import (C, Internal, "gtk_entry_new_with_buffer");
121   begin
122      if not The_Entry.Is_Created then
123         Set_Object (The_Entry, Internal (Get_Object (Buffer)));
124      end if;
125   end Initialize_With_Buffer;
126
127   ---------------------------
128   -- Get_Activates_Default --
129   ---------------------------
130
131   function Get_Activates_Default
132      (The_Entry : not null access Gtk_Entry_Record) return Boolean
133   is
134      function Internal (The_Entry : System.Address) return Glib.Gboolean;
135      pragma Import (C, Internal, "gtk_entry_get_activates_default");
136   begin
137      return Internal (Get_Object (The_Entry)) /= 0;
138   end Get_Activates_Default;
139
140   -------------------
141   -- Get_Alignment --
142   -------------------
143
144   function Get_Alignment
145      (The_Entry : not null access Gtk_Entry_Record) return Gfloat
146   is
147      function Internal (The_Entry : System.Address) return Gfloat;
148      pragma Import (C, Internal, "gtk_entry_get_alignment");
149   begin
150      return Internal (Get_Object (The_Entry));
151   end Get_Alignment;
152
153   --------------------
154   -- Get_Attributes --
155   --------------------
156
157   function Get_Attributes
158      (The_Entry : not null access Gtk_Entry_Record)
159       return Pango.Attributes.Pango_Attr_List
160   is
161      function Internal (The_Entry : System.Address) return System.Address;
162      pragma Import (C, Internal, "gtk_entry_get_attributes");
163   begin
164      return From_Object (Internal (Get_Object (The_Entry)));
165   end Get_Attributes;
166
167   ----------------
168   -- Get_Buffer --
169   ----------------
170
171   function Get_Buffer
172      (The_Entry : not null access Gtk_Entry_Record)
173       return Gtk.Entry_Buffer.Gtk_Entry_Buffer
174   is
175      function Internal (The_Entry : System.Address) return System.Address;
176      pragma Import (C, Internal, "gtk_entry_get_buffer");
177      Stub_Gtk_Entry_Buffer : Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record;
178   begin
179      return Gtk.Entry_Buffer.Gtk_Entry_Buffer (Get_User_Data (Internal (Get_Object (The_Entry)), Stub_Gtk_Entry_Buffer));
180   end Get_Buffer;
181
182   --------------------
183   -- Get_Completion --
184   --------------------
185
186   function Get_Completion
187      (The_Entry : not null access Gtk_Entry_Record)
188       return Gtk.Entry_Completion.Gtk_Entry_Completion
189   is
190      function Internal (The_Entry : System.Address) return System.Address;
191      pragma Import (C, Internal, "gtk_entry_get_completion");
192      Stub_Gtk_Entry_Completion : Gtk.Entry_Completion.Gtk_Entry_Completion_Record;
193   begin
194      return Gtk.Entry_Completion.Gtk_Entry_Completion (Get_User_Data (Internal (Get_Object (The_Entry)), Stub_Gtk_Entry_Completion));
195   end Get_Completion;
196
197   ----------------------------------
198   -- Get_Current_Icon_Drag_Source --
199   ----------------------------------
200
201   function Get_Current_Icon_Drag_Source
202      (The_Entry : not null access Gtk_Entry_Record) return Gint
203   is
204      function Internal (The_Entry : System.Address) return Gint;
205      pragma Import (C, Internal, "gtk_entry_get_current_icon_drag_source");
206   begin
207      return Internal (Get_Object (The_Entry));
208   end Get_Current_Icon_Drag_Source;
209
210   ----------------------------
211   -- Get_Cursor_Hadjustment --
212   ----------------------------
213
214   function Get_Cursor_Hadjustment
215      (The_Entry : not null access Gtk_Entry_Record)
216       return Gtk.Adjustment.Gtk_Adjustment
217   is
218      function Internal (The_Entry : System.Address) return System.Address;
219      pragma Import (C, Internal, "gtk_entry_get_cursor_hadjustment");
220      Stub_Gtk_Adjustment : Gtk.Adjustment.Gtk_Adjustment_Record;
221   begin
222      return Gtk.Adjustment.Gtk_Adjustment (Get_User_Data (Internal (Get_Object (The_Entry)), Stub_Gtk_Adjustment));
223   end Get_Cursor_Hadjustment;
224
225   -------------------
226   -- Get_Has_Frame --
227   -------------------
228
229   function Get_Has_Frame
230      (The_Entry : not null access Gtk_Entry_Record) return Boolean
231   is
232      function Internal (The_Entry : System.Address) return Glib.Gboolean;
233      pragma Import (C, Internal, "gtk_entry_get_has_frame");
234   begin
235      return Internal (Get_Object (The_Entry)) /= 0;
236   end Get_Has_Frame;
237
238   --------------------------
239   -- Get_Icon_Activatable --
240   --------------------------
241
242   function Get_Icon_Activatable
243      (The_Entry : not null access Gtk_Entry_Record;
244       Icon_Pos  : Gtk_Entry_Icon_Position) return Boolean
245   is
246      function Internal
247         (The_Entry : System.Address;
248          Icon_Pos  : Gtk_Entry_Icon_Position) return Glib.Gboolean;
249      pragma Import (C, Internal, "gtk_entry_get_icon_activatable");
250   begin
251      return Internal (Get_Object (The_Entry), Icon_Pos) /= 0;
252   end Get_Icon_Activatable;
253
254   -------------------
255   -- Get_Icon_Area --
256   -------------------
257
258   procedure Get_Icon_Area
259      (The_Entry : not null access Gtk_Entry_Record;
260       Icon_Pos  : Gtk_Entry_Icon_Position;
261       Icon_Area : out Gdk.Rectangle.Gdk_Rectangle)
262   is
263      procedure Internal
264         (The_Entry : System.Address;
265          Icon_Pos  : Gtk_Entry_Icon_Position;
266          Icon_Area : out Gdk.Rectangle.Gdk_Rectangle);
267      pragma Import (C, Internal, "gtk_entry_get_icon_area");
268   begin
269      Internal (Get_Object (The_Entry), Icon_Pos, Icon_Area);
270   end Get_Icon_Area;
271
272   ---------------------
273   -- Get_Icon_At_Pos --
274   ---------------------
275
276   function Get_Icon_At_Pos
277      (The_Entry : not null access Gtk_Entry_Record;
278       X         : Gint;
279       Y         : Gint) return Gint
280   is
281      function Internal
282         (The_Entry : System.Address;
283          X         : Gint;
284          Y         : Gint) return Gint;
285      pragma Import (C, Internal, "gtk_entry_get_icon_at_pos");
286   begin
287      return Internal (Get_Object (The_Entry), X, Y);
288   end Get_Icon_At_Pos;
289
290   --------------------
291   -- Get_Icon_Gicon --
292   --------------------
293
294   function Get_Icon_Gicon
295      (The_Entry : not null access Gtk_Entry_Record;
296       Icon_Pos  : Gtk_Entry_Icon_Position) return Glib.G_Icon.G_Icon
297   is
298      function Internal
299         (The_Entry : System.Address;
300          Icon_Pos  : Gtk_Entry_Icon_Position) return Glib.G_Icon.G_Icon;
301      pragma Import (C, Internal, "gtk_entry_get_icon_gicon");
302   begin
303      return Internal (Get_Object (The_Entry), Icon_Pos);
304   end Get_Icon_Gicon;
305
306   -------------------
307   -- Get_Icon_Name --
308   -------------------
309
310   function Get_Icon_Name
311      (The_Entry : not null access Gtk_Entry_Record;
312       Icon_Pos  : Gtk_Entry_Icon_Position) return UTF8_String
313   is
314      function Internal
315         (The_Entry : System.Address;
316          Icon_Pos  : Gtk_Entry_Icon_Position)
317          return Interfaces.C.Strings.chars_ptr;
318      pragma Import (C, Internal, "gtk_entry_get_icon_name");
319   begin
320      return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (The_Entry), Icon_Pos));
321   end Get_Icon_Name;
322
323   ---------------------
324   -- Get_Icon_Pixbuf --
325   ---------------------
326
327   function Get_Icon_Pixbuf
328      (The_Entry : not null access Gtk_Entry_Record;
329       Icon_Pos  : Gtk_Entry_Icon_Position) return Gdk.Pixbuf.Gdk_Pixbuf
330   is
331      function Internal
332         (The_Entry : System.Address;
333          Icon_Pos  : Gtk_Entry_Icon_Position) return System.Address;
334      pragma Import (C, Internal, "gtk_entry_get_icon_pixbuf");
335      Stub_Gdk_Pixbuf : Gdk.Pixbuf.Gdk_Pixbuf_Record;
336   begin
337      return Gdk.Pixbuf.Gdk_Pixbuf (Get_User_Data (Internal (Get_Object (The_Entry), Icon_Pos), Stub_Gdk_Pixbuf));
338   end Get_Icon_Pixbuf;
339
340   ------------------------
341   -- Get_Icon_Sensitive --
342   ------------------------
343
344   function Get_Icon_Sensitive
345      (The_Entry : not null access Gtk_Entry_Record;
346       Icon_Pos  : Gtk_Entry_Icon_Position) return Boolean
347   is
348      function Internal
349         (The_Entry : System.Address;
350          Icon_Pos  : Gtk_Entry_Icon_Position) return Glib.Gboolean;
351      pragma Import (C, Internal, "gtk_entry_get_icon_sensitive");
352   begin
353      return Internal (Get_Object (The_Entry), Icon_Pos) /= 0;
354   end Get_Icon_Sensitive;
355
356   --------------------
357   -- Get_Icon_Stock --
358   --------------------
359
360   function Get_Icon_Stock
361      (The_Entry : not null access Gtk_Entry_Record;
362       Icon_Pos  : Gtk_Entry_Icon_Position) return UTF8_String
363   is
364      function Internal
365         (The_Entry : System.Address;
366          Icon_Pos  : Gtk_Entry_Icon_Position)
367          return Interfaces.C.Strings.chars_ptr;
368      pragma Import (C, Internal, "gtk_entry_get_icon_stock");
369   begin
370      return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (The_Entry), Icon_Pos));
371   end Get_Icon_Stock;
372
373   ---------------------------
374   -- Get_Icon_Storage_Type --
375   ---------------------------
376
377   function Get_Icon_Storage_Type
378      (The_Entry : not null access Gtk_Entry_Record;
379       Icon_Pos  : Gtk_Entry_Icon_Position) return Gtk.Image.Gtk_Image_Type
380   is
381      function Internal
382         (The_Entry : System.Address;
383          Icon_Pos  : Gtk_Entry_Icon_Position)
384          return Gtk.Image.Gtk_Image_Type;
385      pragma Import (C, Internal, "gtk_entry_get_icon_storage_type");
386   begin
387      return Internal (Get_Object (The_Entry), Icon_Pos);
388   end Get_Icon_Storage_Type;
389
390   -----------------------------
391   -- Get_Icon_Tooltip_Markup --
392   -----------------------------
393
394   function Get_Icon_Tooltip_Markup
395      (The_Entry : not null access Gtk_Entry_Record;
396       Icon_Pos  : Gtk_Entry_Icon_Position) return UTF8_String
397   is
398      function Internal
399         (The_Entry : System.Address;
400          Icon_Pos  : Gtk_Entry_Icon_Position)
401          return Interfaces.C.Strings.chars_ptr;
402      pragma Import (C, Internal, "gtk_entry_get_icon_tooltip_markup");
403   begin
404      return Gtkada.Bindings.Value_And_Free (Internal (Get_Object (The_Entry), Icon_Pos));
405   end Get_Icon_Tooltip_Markup;
406
407   ---------------------------
408   -- Get_Icon_Tooltip_Text --
409   ---------------------------
410
411   function Get_Icon_Tooltip_Text
412      (The_Entry : not null access Gtk_Entry_Record;
413       Icon_Pos  : Gtk_Entry_Icon_Position) return UTF8_String
414   is
415      function Internal
416         (The_Entry : System.Address;
417          Icon_Pos  : Gtk_Entry_Icon_Position)
418          return Interfaces.C.Strings.chars_ptr;
419      pragma Import (C, Internal, "gtk_entry_get_icon_tooltip_text");
420   begin
421      return Gtkada.Bindings.Value_And_Free (Internal (Get_Object (The_Entry), Icon_Pos));
422   end Get_Icon_Tooltip_Text;
423
424   ----------------------
425   -- Get_Inner_Border --
426   ----------------------
427
428   function Get_Inner_Border
429      (The_Entry : not null access Gtk_Entry_Record)
430       return Gtk.Style.Gtk_Border
431   is
432      function Internal
433         (The_Entry : System.Address) return access Gtk.Style.Gtk_Border;
434      pragma Import (C, Internal, "gtk_entry_get_inner_border");
435   begin
436      return Internal (Get_Object (The_Entry)).all;
437   end Get_Inner_Border;
438
439   ---------------------
440   -- Get_Input_Hints --
441   ---------------------
442
443   function Get_Input_Hints
444      (The_Entry : not null access Gtk_Entry_Record)
445       return Gtk.Enums.Gtk_Input_Hints
446   is
447      function Internal
448         (The_Entry : System.Address) return Gtk.Enums.Gtk_Input_Hints;
449      pragma Import (C, Internal, "gtk_entry_get_input_hints");
450   begin
451      return Internal (Get_Object (The_Entry));
452   end Get_Input_Hints;
453
454   -----------------------
455   -- Get_Input_Purpose --
456   -----------------------
457
458   function Get_Input_Purpose
459      (The_Entry : not null access Gtk_Entry_Record)
460       return Gtk.Enums.Gtk_Input_Purpose
461   is
462      function Internal
463         (The_Entry : System.Address) return Gtk.Enums.Gtk_Input_Purpose;
464      pragma Import (C, Internal, "gtk_entry_get_input_purpose");
465   begin
466      return Internal (Get_Object (The_Entry));
467   end Get_Input_Purpose;
468
469   ------------------------
470   -- Get_Invisible_Char --
471   ------------------------
472
473   function Get_Invisible_Char
474      (The_Entry : not null access Gtk_Entry_Record) return Gunichar
475   is
476      function Internal (The_Entry : System.Address) return Gunichar;
477      pragma Import (C, Internal, "gtk_entry_get_invisible_char");
478   begin
479      return Internal (Get_Object (The_Entry));
480   end Get_Invisible_Char;
481
482   ----------------
483   -- Get_Layout --
484   ----------------
485
486   function Get_Layout
487      (The_Entry : not null access Gtk_Entry_Record)
488       return Pango.Layout.Pango_Layout
489   is
490      function Internal (The_Entry : System.Address) return System.Address;
491      pragma Import (C, Internal, "gtk_entry_get_layout");
492      Stub_Pango_Layout : Pango.Layout.Pango_Layout_Record;
493   begin
494      return Pango.Layout.Pango_Layout (Get_User_Data (Internal (Get_Object (The_Entry)), Stub_Pango_Layout));
495   end Get_Layout;
496
497   ------------------------
498   -- Get_Layout_Offsets --
499   ------------------------
500
501   procedure Get_Layout_Offsets
502      (The_Entry : not null access Gtk_Entry_Record;
503       X         : out Gint;
504       Y         : out Gint)
505   is
506      procedure Internal
507         (The_Entry : System.Address;
508          X         : out Gint;
509          Y         : out Gint);
510      pragma Import (C, Internal, "gtk_entry_get_layout_offsets");
511   begin
512      Internal (Get_Object (The_Entry), X, Y);
513   end Get_Layout_Offsets;
514
515   --------------------
516   -- Get_Max_Length --
517   --------------------
518
519   function Get_Max_Length
520      (The_Entry : not null access Gtk_Entry_Record) return Gint
521   is
522      function Internal (The_Entry : System.Address) return Gint;
523      pragma Import (C, Internal, "gtk_entry_get_max_length");
524   begin
525      return Internal (Get_Object (The_Entry));
526   end Get_Max_Length;
527
528   -------------------------
529   -- Get_Max_Width_Chars --
530   -------------------------
531
532   function Get_Max_Width_Chars
533      (The_Entry : not null access Gtk_Entry_Record) return Gint
534   is
535      function Internal (The_Entry : System.Address) return Gint;
536      pragma Import (C, Internal, "gtk_entry_get_max_width_chars");
537   begin
538      return Internal (Get_Object (The_Entry));
539   end Get_Max_Width_Chars;
540
541   ------------------------
542   -- Get_Overwrite_Mode --
543   ------------------------
544
545   function Get_Overwrite_Mode
546      (The_Entry : not null access Gtk_Entry_Record) return Boolean
547   is
548      function Internal (The_Entry : System.Address) return Glib.Gboolean;
549      pragma Import (C, Internal, "gtk_entry_get_overwrite_mode");
550   begin
551      return Internal (Get_Object (The_Entry)) /= 0;
552   end Get_Overwrite_Mode;
553
554   --------------------------
555   -- Get_Placeholder_Text --
556   --------------------------
557
558   function Get_Placeholder_Text
559      (The_Entry : not null access Gtk_Entry_Record) return UTF8_String
560   is
561      function Internal
562         (The_Entry : System.Address) return Interfaces.C.Strings.chars_ptr;
563      pragma Import (C, Internal, "gtk_entry_get_placeholder_text");
564   begin
565      return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (The_Entry)));
566   end Get_Placeholder_Text;
567
568   ---------------------------
569   -- Get_Progress_Fraction --
570   ---------------------------
571
572   function Get_Progress_Fraction
573      (The_Entry : not null access Gtk_Entry_Record) return Gdouble
574   is
575      function Internal (The_Entry : System.Address) return Gdouble;
576      pragma Import (C, Internal, "gtk_entry_get_progress_fraction");
577   begin
578      return Internal (Get_Object (The_Entry));
579   end Get_Progress_Fraction;
580
581   -----------------------------
582   -- Get_Progress_Pulse_Step --
583   -----------------------------
584
585   function Get_Progress_Pulse_Step
586      (The_Entry : not null access Gtk_Entry_Record) return Gdouble
587   is
588      function Internal (The_Entry : System.Address) return Gdouble;
589      pragma Import (C, Internal, "gtk_entry_get_progress_pulse_step");
590   begin
591      return Internal (Get_Object (The_Entry));
592   end Get_Progress_Pulse_Step;
593
594   --------------
595   -- Get_Tabs --
596   --------------
597
598   function Get_Tabs
599      (The_Entry : not null access Gtk_Entry_Record)
600       return Pango.Tabs.Pango_Tab_Array
601   is
602      function Internal (The_Entry : System.Address) return System.Address;
603      pragma Import (C, Internal, "gtk_entry_get_tabs");
604   begin
605      return From_Object (Internal (Get_Object (The_Entry)));
606   end Get_Tabs;
607
608   --------------
609   -- Get_Text --
610   --------------
611
612   function Get_Text
613      (The_Entry : not null access Gtk_Entry_Record) return UTF8_String
614   is
615      function Internal
616         (The_Entry : System.Address) return Interfaces.C.Strings.chars_ptr;
617      pragma Import (C, Internal, "gtk_entry_get_text");
618   begin
619      return Gtkada.Bindings.Value_Allowing_Null (Internal (Get_Object (The_Entry)));
620   end Get_Text;
621
622   -------------------
623   -- Get_Text_Area --
624   -------------------
625
626   procedure Get_Text_Area
627      (The_Entry : not null access Gtk_Entry_Record;
628       Text_Area : out Gdk.Rectangle.Gdk_Rectangle)
629   is
630      procedure Internal
631         (The_Entry : System.Address;
632          Text_Area : out Gdk.Rectangle.Gdk_Rectangle);
633      pragma Import (C, Internal, "gtk_entry_get_text_area");
634   begin
635      Internal (Get_Object (The_Entry), Text_Area);
636   end Get_Text_Area;
637
638   ---------------------
639   -- Get_Text_Length --
640   ---------------------
641
642   function Get_Text_Length
643      (The_Entry : not null access Gtk_Entry_Record) return Guint16
644   is
645      function Internal (The_Entry : System.Address) return Guint16;
646      pragma Import (C, Internal, "gtk_entry_get_text_length");
647   begin
648      return Internal (Get_Object (The_Entry));
649   end Get_Text_Length;
650
651   --------------------
652   -- Get_Visibility --
653   --------------------
654
655   function Get_Visibility
656      (The_Entry : not null access Gtk_Entry_Record) return Boolean
657   is
658      function Internal (The_Entry : System.Address) return Glib.Gboolean;
659      pragma Import (C, Internal, "gtk_entry_get_visibility");
660   begin
661      return Internal (Get_Object (The_Entry)) /= 0;
662   end Get_Visibility;
663
664   ---------------------
665   -- Get_Width_Chars --
666   ---------------------
667
668   function Get_Width_Chars
669      (The_Entry : not null access Gtk_Entry_Record) return Gint
670   is
671      function Internal (The_Entry : System.Address) return Gint;
672      pragma Import (C, Internal, "gtk_entry_get_width_chars");
673   begin
674      return Internal (Get_Object (The_Entry));
675   end Get_Width_Chars;
676
677   --------------------------------
678   -- Im_Context_Filter_Keypress --
679   --------------------------------
680
681   function Im_Context_Filter_Keypress
682      (The_Entry : not null access Gtk_Entry_Record;
683       Event     : Gdk.Event.Gdk_Event_Key) return Boolean
684   is
685      function Internal
686         (The_Entry : System.Address;
687          Event     : Gdk.Event.Gdk_Event_Key) return Glib.Gboolean;
688      pragma Import (C, Internal, "gtk_entry_im_context_filter_keypress");
689   begin
690      return Internal (Get_Object (The_Entry), Event) /= 0;
691   end Im_Context_Filter_Keypress;
692
693   --------------------------------
694   -- Layout_Index_To_Text_Index --
695   --------------------------------
696
697   function Layout_Index_To_Text_Index
698      (The_Entry    : not null access Gtk_Entry_Record;
699       Layout_Index : Gint) return Gint
700   is
701      function Internal
702         (The_Entry    : System.Address;
703          Layout_Index : Gint) return Gint;
704      pragma Import (C, Internal, "gtk_entry_layout_index_to_text_index");
705   begin
706      return Internal (Get_Object (The_Entry), Layout_Index);
707   end Layout_Index_To_Text_Index;
708
709   --------------------
710   -- Progress_Pulse --
711   --------------------
712
713   procedure Progress_Pulse (The_Entry : not null access Gtk_Entry_Record) is
714      procedure Internal (The_Entry : System.Address);
715      pragma Import (C, Internal, "gtk_entry_progress_pulse");
716   begin
717      Internal (Get_Object (The_Entry));
718   end Progress_Pulse;
719
720   ----------------------
721   -- Reset_Im_Context --
722   ----------------------
723
724   procedure Reset_Im_Context (The_Entry : not null access Gtk_Entry_Record) is
725      procedure Internal (The_Entry : System.Address);
726      pragma Import (C, Internal, "gtk_entry_reset_im_context");
727   begin
728      Internal (Get_Object (The_Entry));
729   end Reset_Im_Context;
730
731   ---------------------------
732   -- Set_Activates_Default --
733   ---------------------------
734
735   procedure Set_Activates_Default
736      (The_Entry : not null access Gtk_Entry_Record;
737       Setting   : Boolean)
738   is
739      procedure Internal
740         (The_Entry : System.Address;
741          Setting   : Glib.Gboolean);
742      pragma Import (C, Internal, "gtk_entry_set_activates_default");
743   begin
744      Internal (Get_Object (The_Entry), Boolean'Pos (Setting));
745   end Set_Activates_Default;
746
747   -------------------
748   -- Set_Alignment --
749   -------------------
750
751   procedure Set_Alignment
752      (The_Entry : not null access Gtk_Entry_Record;
753       Xalign    : Gfloat)
754   is
755      procedure Internal (The_Entry : System.Address; Xalign : Gfloat);
756      pragma Import (C, Internal, "gtk_entry_set_alignment");
757   begin
758      Internal (Get_Object (The_Entry), Xalign);
759   end Set_Alignment;
760
761   --------------------
762   -- Set_Attributes --
763   --------------------
764
765   procedure Set_Attributes
766      (The_Entry : not null access Gtk_Entry_Record;
767       Attrs     : Pango.Attributes.Pango_Attr_List)
768   is
769      procedure Internal
770         (The_Entry : System.Address;
771          Attrs     : System.Address);
772      pragma Import (C, Internal, "gtk_entry_set_attributes");
773   begin
774      Internal (Get_Object (The_Entry), Get_Object (Attrs));
775   end Set_Attributes;
776
777   ----------------
778   -- Set_Buffer --
779   ----------------
780
781   procedure Set_Buffer
782      (The_Entry : not null access Gtk_Entry_Record;
783       Buffer    : not null access Gtk.Entry_Buffer.Gtk_Entry_Buffer_Record'Class)
784   is
785      procedure Internal
786         (The_Entry : System.Address;
787          Buffer    : System.Address);
788      pragma Import (C, Internal, "gtk_entry_set_buffer");
789   begin
790      Internal (Get_Object (The_Entry), Get_Object (Buffer));
791   end Set_Buffer;
792
793   --------------------
794   -- Set_Completion --
795   --------------------
796
797   procedure Set_Completion
798      (The_Entry  : not null access Gtk_Entry_Record;
799       Completion : access Gtk.Entry_Completion.Gtk_Entry_Completion_Record'Class)
800   is
801      procedure Internal
802         (The_Entry  : System.Address;
803          Completion : System.Address);
804      pragma Import (C, Internal, "gtk_entry_set_completion");
805   begin
806      Internal (Get_Object (The_Entry), Get_Object_Or_Null (GObject (Completion)));
807   end Set_Completion;
808
809   ----------------------------
810   -- Set_Cursor_Hadjustment --
811   ----------------------------
812
813   procedure Set_Cursor_Hadjustment
814      (The_Entry  : not null access Gtk_Entry_Record;
815       Adjustment : not null access Gtk.Adjustment.Gtk_Adjustment_Record'Class)
816   is
817      procedure Internal
818         (The_Entry  : System.Address;
819          Adjustment : System.Address);
820      pragma Import (C, Internal, "gtk_entry_set_cursor_hadjustment");
821   begin
822      Internal (Get_Object (The_Entry), Get_Object (Adjustment));
823   end Set_Cursor_Hadjustment;
824
825   -------------------
826   -- Set_Has_Frame --
827   -------------------
828
829   procedure Set_Has_Frame
830      (The_Entry : not null access Gtk_Entry_Record;
831       Setting   : Boolean := True)
832   is
833      procedure Internal
834         (The_Entry : System.Address;
835          Setting   : Glib.Gboolean);
836      pragma Import (C, Internal, "gtk_entry_set_has_frame");
837   begin
838      Internal (Get_Object (The_Entry), Boolean'Pos (Setting));
839   end Set_Has_Frame;
840
841   --------------------------
842   -- Set_Icon_Activatable --
843   --------------------------
844
845   procedure Set_Icon_Activatable
846      (The_Entry   : not null access Gtk_Entry_Record;
847       Icon_Pos    : Gtk_Entry_Icon_Position;
848       Activatable : Boolean)
849   is
850      procedure Internal
851         (The_Entry   : System.Address;
852          Icon_Pos    : Gtk_Entry_Icon_Position;
853          Activatable : Glib.Gboolean);
854      pragma Import (C, Internal, "gtk_entry_set_icon_activatable");
855   begin
856      Internal (Get_Object (The_Entry), Icon_Pos, Boolean'Pos (Activatable));
857   end Set_Icon_Activatable;
858
859   --------------------------
860   -- Set_Icon_Drag_Source --
861   --------------------------
862
863   procedure Set_Icon_Drag_Source
864      (The_Entry   : not null access Gtk_Entry_Record;
865       Icon_Pos    : Gtk_Entry_Icon_Position;
866       Target_List : Gtk.Target_List.Gtk_Target_List;
867       Actions     : Gdk.Drag_Contexts.Gdk_Drag_Action)
868   is
869      procedure Internal
870         (The_Entry   : System.Address;
871          Icon_Pos    : Gtk_Entry_Icon_Position;
872          Target_List : System.Address;
873          Actions     : Gdk.Drag_Contexts.Gdk_Drag_Action);
874      pragma Import (C, Internal, "gtk_entry_set_icon_drag_source");
875   begin
876      Internal (Get_Object (The_Entry), Icon_Pos, Get_Object (Target_List), Actions);
877   end Set_Icon_Drag_Source;
878
879   -------------------------
880   -- Set_Icon_From_Gicon --
881   -------------------------
882
883   procedure Set_Icon_From_Gicon
884      (The_Entry : not null access Gtk_Entry_Record;
885       Icon_Pos  : Gtk_Entry_Icon_Position;
886       Icon      : Glib.G_Icon.G_Icon)
887   is
888      procedure Internal
889         (The_Entry : System.Address;
890          Icon_Pos  : Gtk_Entry_Icon_Position;
891          Icon      : Glib.G_Icon.G_Icon);
892      pragma Import (C, Internal, "gtk_entry_set_icon_from_gicon");
893   begin
894      Internal (Get_Object (The_Entry), Icon_Pos, Icon);
895   end Set_Icon_From_Gicon;
896
897   -----------------------------
898   -- Set_Icon_From_Icon_Name --
899   -----------------------------
900
901   procedure Set_Icon_From_Icon_Name
902      (The_Entry : not null access Gtk_Entry_Record;
903       Icon_Pos  : Gtk_Entry_Icon_Position;
904       Icon_Name : UTF8_String := "")
905   is
906      procedure Internal
907         (The_Entry : System.Address;
908          Icon_Pos  : Gtk_Entry_Icon_Position;
909          Icon_Name : Interfaces.C.Strings.chars_ptr);
910      pragma Import (C, Internal, "gtk_entry_set_icon_from_icon_name");
911      Tmp_Icon_Name : Interfaces.C.Strings.chars_ptr;
912   begin
913      if Icon_Name = "" then
914         Tmp_Icon_Name := Interfaces.C.Strings.Null_Ptr;
915      else
916         Tmp_Icon_Name := New_String (Icon_Name);
917      end if;
918      Internal (Get_Object (The_Entry), Icon_Pos, Tmp_Icon_Name);
919      Free (Tmp_Icon_Name);
920   end Set_Icon_From_Icon_Name;
921
922   --------------------------
923   -- Set_Icon_From_Pixbuf --
924   --------------------------
925
926   procedure Set_Icon_From_Pixbuf
927      (The_Entry : not null access Gtk_Entry_Record;
928       Icon_Pos  : Gtk_Entry_Icon_Position;
929       Pixbuf    : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class)
930   is
931      procedure Internal
932         (The_Entry : System.Address;
933          Icon_Pos  : Gtk_Entry_Icon_Position;
934          Pixbuf    : System.Address);
935      pragma Import (C, Internal, "gtk_entry_set_icon_from_pixbuf");
936   begin
937      Internal (Get_Object (The_Entry), Icon_Pos, Get_Object_Or_Null (GObject (Pixbuf)));
938   end Set_Icon_From_Pixbuf;
939
940   -------------------------
941   -- Set_Icon_From_Stock --
942   -------------------------
943
944   procedure Set_Icon_From_Stock
945      (The_Entry : not null access Gtk_Entry_Record;
946       Icon_Pos  : Gtk_Entry_Icon_Position;
947       Stock_Id  : UTF8_String := "")
948   is
949      procedure Internal
950         (The_Entry : System.Address;
951          Icon_Pos  : Gtk_Entry_Icon_Position;
952          Stock_Id  : Interfaces.C.Strings.chars_ptr);
953      pragma Import (C, Internal, "gtk_entry_set_icon_from_stock");
954      Tmp_Stock_Id : Interfaces.C.Strings.chars_ptr;
955   begin
956      if Stock_Id = "" then
957         Tmp_Stock_Id := Interfaces.C.Strings.Null_Ptr;
958      else
959         Tmp_Stock_Id := New_String (Stock_Id);
960      end if;
961      Internal (Get_Object (The_Entry), Icon_Pos, Tmp_Stock_Id);
962      Free (Tmp_Stock_Id);
963   end Set_Icon_From_Stock;
964
965   ------------------------
966   -- Set_Icon_Sensitive --
967   ------------------------
968
969   procedure Set_Icon_Sensitive
970      (The_Entry : not null access Gtk_Entry_Record;
971       Icon_Pos  : Gtk_Entry_Icon_Position;
972       Sensitive : Boolean)
973   is
974      procedure Internal
975         (The_Entry : System.Address;
976          Icon_Pos  : Gtk_Entry_Icon_Position;
977          Sensitive : Glib.Gboolean);
978      pragma Import (C, Internal, "gtk_entry_set_icon_sensitive");
979   begin
980      Internal (Get_Object (The_Entry), Icon_Pos, Boolean'Pos (Sensitive));
981   end Set_Icon_Sensitive;
982
983   -----------------------------
984   -- Set_Icon_Tooltip_Markup --
985   -----------------------------
986
987   procedure Set_Icon_Tooltip_Markup
988      (The_Entry : not null access Gtk_Entry_Record;
989       Icon_Pos  : Gtk_Entry_Icon_Position;
990       Tooltip   : UTF8_String := "")
991   is
992      procedure Internal
993         (The_Entry : System.Address;
994          Icon_Pos  : Gtk_Entry_Icon_Position;
995          Tooltip   : Interfaces.C.Strings.chars_ptr);
996      pragma Import (C, Internal, "gtk_entry_set_icon_tooltip_markup");
997      Tmp_Tooltip : Interfaces.C.Strings.chars_ptr;
998   begin
999      if Tooltip = "" then
1000         Tmp_Tooltip := Interfaces.C.Strings.Null_Ptr;
1001      else
1002         Tmp_Tooltip := New_String (Tooltip);
1003      end if;
1004      Internal (Get_Object (The_Entry), Icon_Pos, Tmp_Tooltip);
1005      Free (Tmp_Tooltip);
1006   end Set_Icon_Tooltip_Markup;
1007
1008   ---------------------------
1009   -- Set_Icon_Tooltip_Text --
1010   ---------------------------
1011
1012   procedure Set_Icon_Tooltip_Text
1013      (The_Entry : not null access Gtk_Entry_Record;
1014       Icon_Pos  : Gtk_Entry_Icon_Position;
1015       Tooltip   : UTF8_String := "")
1016   is
1017      procedure Internal
1018         (The_Entry : System.Address;
1019          Icon_Pos  : Gtk_Entry_Icon_Position;
1020          Tooltip   : Interfaces.C.Strings.chars_ptr);
1021      pragma Import (C, Internal, "gtk_entry_set_icon_tooltip_text");
1022      Tmp_Tooltip : Interfaces.C.Strings.chars_ptr;
1023   begin
1024      if Tooltip = "" then
1025         Tmp_Tooltip := Interfaces.C.Strings.Null_Ptr;
1026      else
1027         Tmp_Tooltip := New_String (Tooltip);
1028      end if;
1029      Internal (Get_Object (The_Entry), Icon_Pos, Tmp_Tooltip);
1030      Free (Tmp_Tooltip);
1031   end Set_Icon_Tooltip_Text;
1032
1033   ----------------------
1034   -- Set_Inner_Border --
1035   ----------------------
1036
1037   procedure Set_Inner_Border
1038      (The_Entry : not null access Gtk_Entry_Record;
1039       Border    : Gtk.Style.Gtk_Border)
1040   is
1041      procedure Internal
1042         (The_Entry : System.Address;
1043          Border    : Gtk.Style.Gtk_Border);
1044      pragma Import (C, Internal, "gtk_entry_set_inner_border");
1045   begin
1046      Internal (Get_Object (The_Entry), Border);
1047   end Set_Inner_Border;
1048
1049   ---------------------
1050   -- Set_Input_Hints --
1051   ---------------------
1052
1053   procedure Set_Input_Hints
1054      (The_Entry : not null access Gtk_Entry_Record;
1055       Hints     : Gtk.Enums.Gtk_Input_Hints)
1056   is
1057      procedure Internal
1058         (The_Entry : System.Address;
1059          Hints     : Gtk.Enums.Gtk_Input_Hints);
1060      pragma Import (C, Internal, "gtk_entry_set_input_hints");
1061   begin
1062      Internal (Get_Object (The_Entry), Hints);
1063   end Set_Input_Hints;
1064
1065   -----------------------
1066   -- Set_Input_Purpose --
1067   -----------------------
1068
1069   procedure Set_Input_Purpose
1070      (The_Entry : not null access Gtk_Entry_Record;
1071       Purpose   : Gtk.Enums.Gtk_Input_Purpose)
1072   is
1073      procedure Internal
1074         (The_Entry : System.Address;
1075          Purpose   : Gtk.Enums.Gtk_Input_Purpose);
1076      pragma Import (C, Internal, "gtk_entry_set_input_purpose");
1077   begin
1078      Internal (Get_Object (The_Entry), Purpose);
1079   end Set_Input_Purpose;
1080
1081   ------------------------
1082   -- Set_Invisible_Char --
1083   ------------------------
1084
1085   procedure Set_Invisible_Char
1086      (The_Entry : not null access Gtk_Entry_Record;
1087       Char      : Gunichar)
1088   is
1089      procedure Internal (The_Entry : System.Address; Char : Gunichar);
1090      pragma Import (C, Internal, "gtk_entry_set_invisible_char");
1091   begin
1092      Internal (Get_Object (The_Entry), Char);
1093   end Set_Invisible_Char;
1094
1095   --------------------
1096   -- Set_Max_Length --
1097   --------------------
1098
1099   procedure Set_Max_Length
1100      (The_Entry : not null access Gtk_Entry_Record;
1101       Max       : Gint)
1102   is
1103      procedure Internal (The_Entry : System.Address; Max : Gint);
1104      pragma Import (C, Internal, "gtk_entry_set_max_length");
1105   begin
1106      Internal (Get_Object (The_Entry), Max);
1107   end Set_Max_Length;
1108
1109   -------------------------
1110   -- Set_Max_Width_Chars --
1111   -------------------------
1112
1113   procedure Set_Max_Width_Chars
1114      (The_Entry : not null access Gtk_Entry_Record;
1115       N_Chars   : Gint)
1116   is
1117      procedure Internal (The_Entry : System.Address; N_Chars : Gint);
1118      pragma Import (C, Internal, "gtk_entry_set_max_width_chars");
1119   begin
1120      Internal (Get_Object (The_Entry), N_Chars);
1121   end Set_Max_Width_Chars;
1122
1123   ------------------------
1124   -- Set_Overwrite_Mode --
1125   ------------------------
1126
1127   procedure Set_Overwrite_Mode
1128      (The_Entry : not null access Gtk_Entry_Record;
1129       Overwrite : Boolean)
1130   is
1131      procedure Internal
1132         (The_Entry : System.Address;
1133          Overwrite : Glib.Gboolean);
1134      pragma Import (C, Internal, "gtk_entry_set_overwrite_mode");
1135   begin
1136      Internal (Get_Object (The_Entry), Boolean'Pos (Overwrite));
1137   end Set_Overwrite_Mode;
1138
1139   --------------------------
1140   -- Set_Placeholder_Text --
1141   --------------------------
1142
1143   procedure Set_Placeholder_Text
1144      (The_Entry : not null access Gtk_Entry_Record;
1145       Text      : UTF8_String)
1146   is
1147      procedure Internal
1148         (The_Entry : System.Address;
1149          Text      : Interfaces.C.Strings.chars_ptr);
1150      pragma Import (C, Internal, "gtk_entry_set_placeholder_text");
1151      Tmp_Text : Interfaces.C.Strings.chars_ptr := New_String (Text);
1152   begin
1153      Internal (Get_Object (The_Entry), Tmp_Text);
1154      Free (Tmp_Text);
1155   end Set_Placeholder_Text;
1156
1157   ---------------------------
1158   -- Set_Progress_Fraction --
1159   ---------------------------
1160
1161   procedure Set_Progress_Fraction
1162      (The_Entry : not null access Gtk_Entry_Record;
1163       Fraction  : Gdouble)
1164   is
1165      procedure Internal (The_Entry : System.Address; Fraction : Gdouble);
1166      pragma Import (C, Internal, "gtk_entry_set_progress_fraction");
1167   begin
1168      Internal (Get_Object (The_Entry), Fraction);
1169   end Set_Progress_Fraction;
1170
1171   -----------------------------
1172   -- Set_Progress_Pulse_Step --
1173   -----------------------------
1174
1175   procedure Set_Progress_Pulse_Step
1176      (The_Entry : not null access Gtk_Entry_Record;
1177       Fraction  : Gdouble)
1178   is
1179      procedure Internal (The_Entry : System.Address; Fraction : Gdouble);
1180      pragma Import (C, Internal, "gtk_entry_set_progress_pulse_step");
1181   begin
1182      Internal (Get_Object (The_Entry), Fraction);
1183   end Set_Progress_Pulse_Step;
1184
1185   --------------
1186   -- Set_Tabs --
1187   --------------
1188
1189   procedure Set_Tabs
1190      (The_Entry : not null access Gtk_Entry_Record;
1191       Tabs      : Pango.Tabs.Pango_Tab_Array)
1192   is
1193      procedure Internal (The_Entry : System.Address; Tabs : System.Address);
1194      pragma Import (C, Internal, "gtk_entry_set_tabs");
1195   begin
1196      Internal (Get_Object (The_Entry), Get_Object (Tabs));
1197   end Set_Tabs;
1198
1199   --------------
1200   -- Set_Text --
1201   --------------
1202
1203   procedure Set_Text
1204      (The_Entry : not null access Gtk_Entry_Record;
1205       Text      : UTF8_String)
1206   is
1207      procedure Internal
1208         (The_Entry : System.Address;
1209          Text      : Interfaces.C.Strings.chars_ptr);
1210      pragma Import (C, Internal, "gtk_entry_set_text");
1211      Tmp_Text : Interfaces.C.Strings.chars_ptr := New_String (Text);
1212   begin
1213      Internal (Get_Object (The_Entry), Tmp_Text);
1214      Free (Tmp_Text);
1215   end Set_Text;
1216
1217   --------------------
1218   -- Set_Visibility --
1219   --------------------
1220
1221   procedure Set_Visibility
1222      (The_Entry : not null access Gtk_Entry_Record;
1223       Visible   : Boolean)
1224   is
1225      procedure Internal
1226         (The_Entry : System.Address;
1227          Visible   : Glib.Gboolean);
1228      pragma Import (C, Internal, "gtk_entry_set_visibility");
1229   begin
1230      Internal (Get_Object (The_Entry), Boolean'Pos (Visible));
1231   end Set_Visibility;
1232
1233   ---------------------
1234   -- Set_Width_Chars --
1235   ---------------------
1236
1237   procedure Set_Width_Chars
1238      (The_Entry : not null access Gtk_Entry_Record;
1239       Width     : Gint)
1240   is
1241      procedure Internal (The_Entry : System.Address; Width : Gint);
1242      pragma Import (C, Internal, "gtk_entry_set_width_chars");
1243   begin
1244      Internal (Get_Object (The_Entry), Width);
1245   end Set_Width_Chars;
1246
1247   --------------------------------
1248   -- Text_Index_To_Layout_Index --
1249   --------------------------------
1250
1251   function Text_Index_To_Layout_Index
1252      (The_Entry  : not null access Gtk_Entry_Record;
1253       Text_Index : Gint) return Gint
1254   is
1255      function Internal
1256         (The_Entry  : System.Address;
1257          Text_Index : Gint) return Gint;
1258      pragma Import (C, Internal, "gtk_entry_text_index_to_layout_index");
1259   begin
1260      return Internal (Get_Object (The_Entry), Text_Index);
1261   end Text_Index_To_Layout_Index;
1262
1263   --------------------------
1264   -- Unset_Invisible_Char --
1265   --------------------------
1266
1267   procedure Unset_Invisible_Char
1268      (The_Entry : not null access Gtk_Entry_Record)
1269   is
1270      procedure Internal (The_Entry : System.Address);
1271      pragma Import (C, Internal, "gtk_entry_unset_invisible_char");
1272   begin
1273      Internal (Get_Object (The_Entry));
1274   end Unset_Invisible_Char;
1275
1276   --------------------
1277   -- Copy_Clipboard --
1278   --------------------
1279
1280   procedure Copy_Clipboard (Editable : not null access Gtk_Entry_Record) is
1281      procedure Internal (Editable : System.Address);
1282      pragma Import (C, Internal, "gtk_editable_copy_clipboard");
1283   begin
1284      Internal (Get_Object (Editable));
1285   end Copy_Clipboard;
1286
1287   -------------------
1288   -- Cut_Clipboard --
1289   -------------------
1290
1291   procedure Cut_Clipboard (Editable : not null access Gtk_Entry_Record) is
1292      procedure Internal (Editable : System.Address);
1293      pragma Import (C, Internal, "gtk_editable_cut_clipboard");
1294   begin
1295      Internal (Get_Object (Editable));
1296   end Cut_Clipboard;
1297
1298   ----------------------
1299   -- Delete_Selection --
1300   ----------------------
1301
1302   procedure Delete_Selection (Editable : not null access Gtk_Entry_Record) is
1303      procedure Internal (Editable : System.Address);
1304      pragma Import (C, Internal, "gtk_editable_delete_selection");
1305   begin
1306      Internal (Get_Object (Editable));
1307   end Delete_Selection;
1308
1309   -----------------
1310   -- Delete_Text --
1311   -----------------
1312
1313   procedure Delete_Text
1314      (Editable  : not null access Gtk_Entry_Record;
1315       Start_Pos : Gint;
1316       End_Pos   : Gint := -1)
1317   is
1318      procedure Internal
1319         (Editable  : System.Address;
1320          Start_Pos : Gint;
1321          End_Pos   : Gint);
1322      pragma Import (C, Internal, "gtk_editable_delete_text");
1323   begin
1324      Internal (Get_Object (Editable), Start_Pos, End_Pos);
1325   end Delete_Text;
1326
1327   ------------------
1328   -- Editing_Done --
1329   ------------------
1330
1331   procedure Editing_Done (Cell_Editable : not null access Gtk_Entry_Record) is
1332      procedure Internal (Cell_Editable : System.Address);
1333      pragma Import (C, Internal, "gtk_cell_editable_editing_done");
1334   begin
1335      Internal (Get_Object (Cell_Editable));
1336   end Editing_Done;
1337
1338   ---------------
1339   -- Get_Chars --
1340   ---------------
1341
1342   function Get_Chars
1343      (Editable  : not null access Gtk_Entry_Record;
1344       Start_Pos : Gint;
1345       End_Pos   : Gint := -1) return UTF8_String
1346   is
1347      function Internal
1348         (Editable  : System.Address;
1349          Start_Pos : Gint;
1350          End_Pos   : Gint) return Interfaces.C.Strings.chars_ptr;
1351      pragma Import (C, Internal, "gtk_editable_get_chars");
1352   begin
1353      return Gtkada.Bindings.Value_And_Free (Internal (Get_Object (Editable), Start_Pos, End_Pos));
1354   end Get_Chars;
1355
1356   ------------------
1357   -- Get_Editable --
1358   ------------------
1359
1360   function Get_Editable
1361      (Editable : not null access Gtk_Entry_Record) return Boolean
1362   is
1363      function Internal (Editable : System.Address) return Glib.Gboolean;
1364      pragma Import (C, Internal, "gtk_editable_get_editable");
1365   begin
1366      return Internal (Get_Object (Editable)) /= 0;
1367   end Get_Editable;
1368
1369   ------------------
1370   -- Get_Position --
1371   ------------------
1372
1373   function Get_Position
1374      (Editable : not null access Gtk_Entry_Record) return Gint
1375   is
1376      function Internal (Editable : System.Address) return Gint;
1377      pragma Import (C, Internal, "gtk_editable_get_position");
1378   begin
1379      return Internal (Get_Object (Editable));
1380   end Get_Position;
1381
1382   --------------------------
1383   -- Get_Selection_Bounds --
1384   --------------------------
1385
1386   procedure Get_Selection_Bounds
1387      (Editable      : not null access Gtk_Entry_Record;
1388       Start_Pos     : out Gint;
1389       End_Pos       : out Gint;
1390       Has_Selection : out Boolean)
1391   is
1392      function Internal
1393         (Editable      : System.Address;
1394          Acc_Start_Pos : access Gint;
1395          Acc_End_Pos   : access Gint) return Glib.Gboolean;
1396      pragma Import (C, Internal, "gtk_editable_get_selection_bounds");
1397      Acc_Start_Pos : aliased Gint;
1398      Acc_End_Pos   : aliased Gint;
1399      Tmp_Return    : Glib.Gboolean;
1400   begin
1401      Tmp_Return := Internal (Get_Object (Editable), Acc_Start_Pos'Access, Acc_End_Pos'Access);
1402      Start_Pos := Acc_Start_Pos;
1403      End_Pos := Acc_End_Pos;
1404      Has_Selection := Tmp_Return /= 0;
1405   end Get_Selection_Bounds;
1406
1407   -----------------
1408   -- Insert_Text --
1409   -----------------
1410
1411   procedure Insert_Text
1412      (Editable        : not null access Gtk_Entry_Record;
1413       New_Text        : UTF8_String;
1414       New_Text_Length : Gint;
1415       Position        : in out Gint)
1416   is
1417      procedure Internal
1418         (Editable        : System.Address;
1419          New_Text        : Interfaces.C.Strings.chars_ptr;
1420          New_Text_Length : Gint;
1421          Position        : in out Gint);
1422      pragma Import (C, Internal, "gtk_editable_insert_text");
1423      Tmp_New_Text : Interfaces.C.Strings.chars_ptr := New_String (New_Text);
1424   begin
1425      Internal (Get_Object (Editable), Tmp_New_Text, New_Text_Length, Position);
1426      Free (Tmp_New_Text);
1427   end Insert_Text;
1428
1429   ---------------------
1430   -- Paste_Clipboard --
1431   ---------------------
1432
1433   procedure Paste_Clipboard (Editable : not null access Gtk_Entry_Record) is
1434      procedure Internal (Editable : System.Address);
1435      pragma Import (C, Internal, "gtk_editable_paste_clipboard");
1436   begin
1437      Internal (Get_Object (Editable));
1438   end Paste_Clipboard;
1439
1440   -------------------
1441   -- Remove_Widget --
1442   -------------------
1443
1444   procedure Remove_Widget
1445      (Cell_Editable : not null access Gtk_Entry_Record)
1446   is
1447      procedure Internal (Cell_Editable : System.Address);
1448      pragma Import (C, Internal, "gtk_cell_editable_remove_widget");
1449   begin
1450      Internal (Get_Object (Cell_Editable));
1451   end Remove_Widget;
1452
1453   -------------------
1454   -- Select_Region --
1455   -------------------
1456
1457   procedure Select_Region
1458      (Editable  : not null access Gtk_Entry_Record;
1459       Start_Pos : Gint;
1460       End_Pos   : Gint := -1)
1461   is
1462      procedure Internal
1463         (Editable  : System.Address;
1464          Start_Pos : Gint;
1465          End_Pos   : Gint);
1466      pragma Import (C, Internal, "gtk_editable_select_region");
1467   begin
1468      Internal (Get_Object (Editable), Start_Pos, End_Pos);
1469   end Select_Region;
1470
1471   ------------------
1472   -- Set_Editable --
1473   ------------------
1474
1475   procedure Set_Editable
1476      (Editable    : not null access Gtk_Entry_Record;
1477       Is_Editable : Boolean)
1478   is
1479      procedure Internal
1480         (Editable    : System.Address;
1481          Is_Editable : Glib.Gboolean);
1482      pragma Import (C, Internal, "gtk_editable_set_editable");
1483   begin
1484      Internal (Get_Object (Editable), Boolean'Pos (Is_Editable));
1485   end Set_Editable;
1486
1487   ------------------
1488   -- Set_Position --
1489   ------------------
1490
1491   procedure Set_Position
1492      (Editable : not null access Gtk_Entry_Record;
1493       Position : Gint)
1494   is
1495      procedure Internal (Editable : System.Address; Position : Gint);
1496      pragma Import (C, Internal, "gtk_editable_set_position");
1497   begin
1498      Internal (Get_Object (Editable), Position);
1499   end Set_Position;
1500
1501   -------------------
1502   -- Start_Editing --
1503   -------------------
1504
1505   procedure Start_Editing
1506      (Cell_Editable : not null access Gtk_Entry_Record;
1507       Event         : Gdk.Event.Gdk_Event)
1508   is
1509      procedure Internal
1510         (Cell_Editable : System.Address;
1511          Event         : Gdk.Event.Gdk_Event);
1512      pragma Import (C, Internal, "gtk_cell_editable_start_editing");
1513   begin
1514      Internal (Get_Object (Cell_Editable), Event);
1515   end Start_Editing;
1516
1517   use type System.Address;
1518
1519   function Cb_To_Address is new Ada.Unchecked_Conversion
1520     (Cb_Gtk_Entry_Void, System.Address);
1521   function Address_To_Cb is new Ada.Unchecked_Conversion
1522     (System.Address, Cb_Gtk_Entry_Void);
1523
1524   function Cb_To_Address is new Ada.Unchecked_Conversion
1525     (Cb_GObject_Void, System.Address);
1526   function Address_To_Cb is new Ada.Unchecked_Conversion
1527     (System.Address, Cb_GObject_Void);
1528
1529   function Cb_To_Address is new Ada.Unchecked_Conversion
1530     (Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void, System.Address);
1531   function Address_To_Cb is new Ada.Unchecked_Conversion
1532     (System.Address, Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void);
1533
1534   function Cb_To_Address is new Ada.Unchecked_Conversion
1535     (Cb_GObject_Gtk_Delete_Type_Gint_Void, System.Address);
1536   function Address_To_Cb is new Ada.Unchecked_Conversion
1537     (System.Address, Cb_GObject_Gtk_Delete_Type_Gint_Void);
1538
1539   function Cb_To_Address is new Ada.Unchecked_Conversion
1540     (Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void, System.Address);
1541   function Address_To_Cb is new Ada.Unchecked_Conversion
1542     (System.Address, Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void);
1543
1544   function Cb_To_Address is new Ada.Unchecked_Conversion
1545     (Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void, System.Address);
1546   function Address_To_Cb is new Ada.Unchecked_Conversion
1547     (System.Address, Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void);
1548
1549   function Cb_To_Address is new Ada.Unchecked_Conversion
1550     (Cb_Gtk_Entry_UTF8_String_Void, System.Address);
1551   function Address_To_Cb is new Ada.Unchecked_Conversion
1552     (System.Address, Cb_Gtk_Entry_UTF8_String_Void);
1553
1554   function Cb_To_Address is new Ada.Unchecked_Conversion
1555     (Cb_GObject_UTF8_String_Void, System.Address);
1556   function Address_To_Cb is new Ada.Unchecked_Conversion
1557     (System.Address, Cb_GObject_UTF8_String_Void);
1558
1559   function Cb_To_Address is new Ada.Unchecked_Conversion
1560     (Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void, System.Address);
1561   function Address_To_Cb is new Ada.Unchecked_Conversion
1562     (System.Address, Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void);
1563
1564   function Cb_To_Address is new Ada.Unchecked_Conversion
1565     (Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void, System.Address);
1566   function Address_To_Cb is new Ada.Unchecked_Conversion
1567     (System.Address, Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void);
1568
1569   function Cb_To_Address is new Ada.Unchecked_Conversion
1570     (Cb_Gtk_Entry_Gtk_Widget_Void, System.Address);
1571   function Address_To_Cb is new Ada.Unchecked_Conversion
1572     (System.Address, Cb_Gtk_Entry_Gtk_Widget_Void);
1573
1574   function Cb_To_Address is new Ada.Unchecked_Conversion
1575     (Cb_GObject_Gtk_Widget_Void, System.Address);
1576   function Address_To_Cb is new Ada.Unchecked_Conversion
1577     (System.Address, Cb_GObject_Gtk_Widget_Void);
1578
1579   procedure Connect
1580      (Object  : access Gtk_Entry_Record'Class;
1581       C_Name  : Glib.Signal_Name;
1582       Handler : Cb_Gtk_Entry_Void;
1583       After   : Boolean);
1584
1585   procedure Connect
1586      (Object  : access Gtk_Entry_Record'Class;
1587       C_Name  : Glib.Signal_Name;
1588       Handler : Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void;
1589       After   : Boolean);
1590
1591   procedure Connect
1592      (Object  : access Gtk_Entry_Record'Class;
1593       C_Name  : Glib.Signal_Name;
1594       Handler : Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
1595       After   : Boolean);
1596
1597   procedure Connect
1598      (Object  : access Gtk_Entry_Record'Class;
1599       C_Name  : Glib.Signal_Name;
1600       Handler : Cb_Gtk_Entry_UTF8_String_Void;
1601       After   : Boolean);
1602
1603   procedure Connect
1604      (Object  : access Gtk_Entry_Record'Class;
1605       C_Name  : Glib.Signal_Name;
1606       Handler : Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void;
1607       After   : Boolean);
1608
1609   procedure Connect
1610      (Object  : access Gtk_Entry_Record'Class;
1611       C_Name  : Glib.Signal_Name;
1612       Handler : Cb_Gtk_Entry_Gtk_Widget_Void;
1613       After   : Boolean);
1614
1615   procedure Connect_Slot
1616      (Object  : access Gtk_Entry_Record'Class;
1617       C_Name  : Glib.Signal_Name;
1618       Handler : Cb_GObject_Void;
1619       After   : Boolean;
1620       Slot    : access Glib.Object.GObject_Record'Class := null);
1621
1622   procedure Connect_Slot
1623      (Object  : access Gtk_Entry_Record'Class;
1624       C_Name  : Glib.Signal_Name;
1625       Handler : Cb_GObject_Gtk_Delete_Type_Gint_Void;
1626       After   : Boolean;
1627       Slot    : access Glib.Object.GObject_Record'Class := null);
1628
1629   procedure Connect_Slot
1630      (Object  : access Gtk_Entry_Record'Class;
1631       C_Name  : Glib.Signal_Name;
1632       Handler : Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
1633       After   : Boolean;
1634       Slot    : access Glib.Object.GObject_Record'Class := null);
1635
1636   procedure Connect_Slot
1637      (Object  : access Gtk_Entry_Record'Class;
1638       C_Name  : Glib.Signal_Name;
1639       Handler : Cb_GObject_UTF8_String_Void;
1640       After   : Boolean;
1641       Slot    : access Glib.Object.GObject_Record'Class := null);
1642
1643   procedure Connect_Slot
1644      (Object  : access Gtk_Entry_Record'Class;
1645       C_Name  : Glib.Signal_Name;
1646       Handler : Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void;
1647       After   : Boolean;
1648       Slot    : access Glib.Object.GObject_Record'Class := null);
1649
1650   procedure Connect_Slot
1651      (Object  : access Gtk_Entry_Record'Class;
1652       C_Name  : Glib.Signal_Name;
1653       Handler : Cb_GObject_Gtk_Widget_Void;
1654       After   : Boolean;
1655       Slot    : access Glib.Object.GObject_Record'Class := null);
1656
1657   procedure Marsh_GObject_Gtk_Delete_Type_Gint_Void
1658      (Closure         : GClosure;
1659       Return_Value    : Glib.Values.GValue;
1660       N_Params        : Glib.Guint;
1661       Params          : Glib.Values.C_GValues;
1662       Invocation_Hint : System.Address;
1663       User_Data       : System.Address);
1664   pragma Convention (C, Marsh_GObject_Gtk_Delete_Type_Gint_Void);
1665
1666   procedure Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void
1667      (Closure         : GClosure;
1668       Return_Value    : Glib.Values.GValue;
1669       N_Params        : Glib.Guint;
1670       Params          : Glib.Values.C_GValues;
1671       Invocation_Hint : System.Address;
1672       User_Data       : System.Address);
1673   pragma Convention (C, Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void);
1674
1675   procedure Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void
1676      (Closure         : GClosure;
1677       Return_Value    : Glib.Values.GValue;
1678       N_Params        : Glib.Guint;
1679       Params          : Glib.Values.C_GValues;
1680       Invocation_Hint : System.Address;
1681       User_Data       : System.Address);
1682   pragma Convention (C, Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void);
1683
1684   procedure Marsh_GObject_Gtk_Widget_Void
1685      (Closure         : GClosure;
1686       Return_Value    : Glib.Values.GValue;
1687       N_Params        : Glib.Guint;
1688       Params          : Glib.Values.C_GValues;
1689       Invocation_Hint : System.Address;
1690       User_Data       : System.Address);
1691   pragma Convention (C, Marsh_GObject_Gtk_Widget_Void);
1692
1693   procedure Marsh_GObject_UTF8_String_Void
1694      (Closure         : GClosure;
1695       Return_Value    : Glib.Values.GValue;
1696       N_Params        : Glib.Guint;
1697       Params          : Glib.Values.C_GValues;
1698       Invocation_Hint : System.Address;
1699       User_Data       : System.Address);
1700   pragma Convention (C, Marsh_GObject_UTF8_String_Void);
1701
1702   procedure Marsh_GObject_Void
1703      (Closure         : GClosure;
1704       Return_Value    : Glib.Values.GValue;
1705       N_Params        : Glib.Guint;
1706       Params          : Glib.Values.C_GValues;
1707       Invocation_Hint : System.Address;
1708       User_Data       : System.Address);
1709   pragma Convention (C, Marsh_GObject_Void);
1710
1711   procedure Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void
1712      (Closure         : GClosure;
1713       Return_Value    : Glib.Values.GValue;
1714       N_Params        : Glib.Guint;
1715       Params          : Glib.Values.C_GValues;
1716       Invocation_Hint : System.Address;
1717       User_Data       : System.Address);
1718   pragma Convention (C, Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void);
1719
1720   procedure Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void
1721      (Closure         : GClosure;
1722       Return_Value    : Glib.Values.GValue;
1723       N_Params        : Glib.Guint;
1724       Params          : Glib.Values.C_GValues;
1725       Invocation_Hint : System.Address;
1726       User_Data       : System.Address);
1727   pragma Convention (C, Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void);
1728
1729   procedure Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void
1730      (Closure         : GClosure;
1731       Return_Value    : Glib.Values.GValue;
1732       N_Params        : Glib.Guint;
1733       Params          : Glib.Values.C_GValues;
1734       Invocation_Hint : System.Address;
1735       User_Data       : System.Address);
1736   pragma Convention (C, Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void);
1737
1738   procedure Marsh_Gtk_Entry_Gtk_Widget_Void
1739      (Closure         : GClosure;
1740       Return_Value    : Glib.Values.GValue;
1741       N_Params        : Glib.Guint;
1742       Params          : Glib.Values.C_GValues;
1743       Invocation_Hint : System.Address;
1744       User_Data       : System.Address);
1745   pragma Convention (C, Marsh_Gtk_Entry_Gtk_Widget_Void);
1746
1747   procedure Marsh_Gtk_Entry_UTF8_String_Void
1748      (Closure         : GClosure;
1749       Return_Value    : Glib.Values.GValue;
1750       N_Params        : Glib.Guint;
1751       Params          : Glib.Values.C_GValues;
1752       Invocation_Hint : System.Address;
1753       User_Data       : System.Address);
1754   pragma Convention (C, Marsh_Gtk_Entry_UTF8_String_Void);
1755
1756   procedure Marsh_Gtk_Entry_Void
1757      (Closure         : GClosure;
1758       Return_Value    : Glib.Values.GValue;
1759       N_Params        : Glib.Guint;
1760       Params          : Glib.Values.C_GValues;
1761       Invocation_Hint : System.Address;
1762       User_Data       : System.Address);
1763   pragma Convention (C, Marsh_Gtk_Entry_Void);
1764
1765   -------------
1766   -- Connect --
1767   -------------
1768
1769   procedure Connect
1770      (Object  : access Gtk_Entry_Record'Class;
1771       C_Name  : Glib.Signal_Name;
1772       Handler : Cb_Gtk_Entry_Void;
1773       After   : Boolean)
1774   is
1775   begin
1776      Unchecked_Do_Signal_Connect
1777        (Object      => Object,
1778         C_Name      => C_Name,
1779         Marshaller  => Marsh_Gtk_Entry_Void'Access,
1780         Handler     => Cb_To_Address (Handler),--  Set in the closure
1781         After       => After);
1782   end Connect;
1783
1784   -------------
1785   -- Connect --
1786   -------------
1787
1788   procedure Connect
1789      (Object  : access Gtk_Entry_Record'Class;
1790       C_Name  : Glib.Signal_Name;
1791       Handler : Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void;
1792       After   : Boolean)
1793   is
1794   begin
1795      Unchecked_Do_Signal_Connect
1796        (Object      => Object,
1797         C_Name      => C_Name,
1798         Marshaller  => Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void'Access,
1799         Handler     => Cb_To_Address (Handler),--  Set in the closure
1800         After       => After);
1801   end Connect;
1802
1803   -------------
1804   -- Connect --
1805   -------------
1806
1807   procedure Connect
1808      (Object  : access Gtk_Entry_Record'Class;
1809       C_Name  : Glib.Signal_Name;
1810       Handler : Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
1811       After   : Boolean)
1812   is
1813   begin
1814      Unchecked_Do_Signal_Connect
1815        (Object      => Object,
1816         C_Name      => C_Name,
1817         Marshaller  => Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void'Access,
1818         Handler     => Cb_To_Address (Handler),--  Set in the closure
1819         After       => After);
1820   end Connect;
1821
1822   -------------
1823   -- Connect --
1824   -------------
1825
1826   procedure Connect
1827      (Object  : access Gtk_Entry_Record'Class;
1828       C_Name  : Glib.Signal_Name;
1829       Handler : Cb_Gtk_Entry_UTF8_String_Void;
1830       After   : Boolean)
1831   is
1832   begin
1833      Unchecked_Do_Signal_Connect
1834        (Object      => Object,
1835         C_Name      => C_Name,
1836         Marshaller  => Marsh_Gtk_Entry_UTF8_String_Void'Access,
1837         Handler     => Cb_To_Address (Handler),--  Set in the closure
1838         After       => After);
1839   end Connect;
1840
1841   -------------
1842   -- Connect --
1843   -------------
1844
1845   procedure Connect
1846      (Object  : access Gtk_Entry_Record'Class;
1847       C_Name  : Glib.Signal_Name;
1848       Handler : Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void;
1849       After   : Boolean)
1850   is
1851   begin
1852      Unchecked_Do_Signal_Connect
1853        (Object      => Object,
1854         C_Name      => C_Name,
1855         Marshaller  => Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void'Access,
1856         Handler     => Cb_To_Address (Handler),--  Set in the closure
1857         After       => After);
1858   end Connect;
1859
1860   -------------
1861   -- Connect --
1862   -------------
1863
1864   procedure Connect
1865      (Object  : access Gtk_Entry_Record'Class;
1866       C_Name  : Glib.Signal_Name;
1867       Handler : Cb_Gtk_Entry_Gtk_Widget_Void;
1868       After   : Boolean)
1869   is
1870   begin
1871      Unchecked_Do_Signal_Connect
1872        (Object      => Object,
1873         C_Name      => C_Name,
1874         Marshaller  => Marsh_Gtk_Entry_Gtk_Widget_Void'Access,
1875         Handler     => Cb_To_Address (Handler),--  Set in the closure
1876         After       => After);
1877   end Connect;
1878
1879   ------------------
1880   -- Connect_Slot --
1881   ------------------
1882
1883   procedure Connect_Slot
1884      (Object  : access Gtk_Entry_Record'Class;
1885       C_Name  : Glib.Signal_Name;
1886       Handler : Cb_GObject_Void;
1887       After   : Boolean;
1888       Slot    : access Glib.Object.GObject_Record'Class := null)
1889   is
1890   begin
1891      Unchecked_Do_Signal_Connect
1892        (Object      => Object,
1893         C_Name      => C_Name,
1894         Marshaller  => Marsh_GObject_Void'Access,
1895         Handler     => Cb_To_Address (Handler),--  Set in the closure
1896         Slot_Object => Slot,
1897         After       => After);
1898   end Connect_Slot;
1899
1900   ------------------
1901   -- Connect_Slot --
1902   ------------------
1903
1904   procedure Connect_Slot
1905      (Object  : access Gtk_Entry_Record'Class;
1906       C_Name  : Glib.Signal_Name;
1907       Handler : Cb_GObject_Gtk_Delete_Type_Gint_Void;
1908       After   : Boolean;
1909       Slot    : access Glib.Object.GObject_Record'Class := null)
1910   is
1911   begin
1912      Unchecked_Do_Signal_Connect
1913        (Object      => Object,
1914         C_Name      => C_Name,
1915         Marshaller  => Marsh_GObject_Gtk_Delete_Type_Gint_Void'Access,
1916         Handler     => Cb_To_Address (Handler),--  Set in the closure
1917         Slot_Object => Slot,
1918         After       => After);
1919   end Connect_Slot;
1920
1921   ------------------
1922   -- Connect_Slot --
1923   ------------------
1924
1925   procedure Connect_Slot
1926      (Object  : access Gtk_Entry_Record'Class;
1927       C_Name  : Glib.Signal_Name;
1928       Handler : Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
1929       After   : Boolean;
1930       Slot    : access Glib.Object.GObject_Record'Class := null)
1931   is
1932   begin
1933      Unchecked_Do_Signal_Connect
1934        (Object      => Object,
1935         C_Name      => C_Name,
1936         Marshaller  => Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void'Access,
1937         Handler     => Cb_To_Address (Handler),--  Set in the closure
1938         Slot_Object => Slot,
1939         After       => After);
1940   end Connect_Slot;
1941
1942   ------------------
1943   -- Connect_Slot --
1944   ------------------
1945
1946   procedure Connect_Slot
1947      (Object  : access Gtk_Entry_Record'Class;
1948       C_Name  : Glib.Signal_Name;
1949       Handler : Cb_GObject_UTF8_String_Void;
1950       After   : Boolean;
1951       Slot    : access Glib.Object.GObject_Record'Class := null)
1952   is
1953   begin
1954      Unchecked_Do_Signal_Connect
1955        (Object      => Object,
1956         C_Name      => C_Name,
1957         Marshaller  => Marsh_GObject_UTF8_String_Void'Access,
1958         Handler     => Cb_To_Address (Handler),--  Set in the closure
1959         Slot_Object => Slot,
1960         After       => After);
1961   end Connect_Slot;
1962
1963   ------------------
1964   -- Connect_Slot --
1965   ------------------
1966
1967   procedure Connect_Slot
1968      (Object  : access Gtk_Entry_Record'Class;
1969       C_Name  : Glib.Signal_Name;
1970       Handler : Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void;
1971       After   : Boolean;
1972       Slot    : access Glib.Object.GObject_Record'Class := null)
1973   is
1974   begin
1975      Unchecked_Do_Signal_Connect
1976        (Object      => Object,
1977         C_Name      => C_Name,
1978         Marshaller  => Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void'Access,
1979         Handler     => Cb_To_Address (Handler),--  Set in the closure
1980         Slot_Object => Slot,
1981         After       => After);
1982   end Connect_Slot;
1983
1984   ------------------
1985   -- Connect_Slot --
1986   ------------------
1987
1988   procedure Connect_Slot
1989      (Object  : access Gtk_Entry_Record'Class;
1990       C_Name  : Glib.Signal_Name;
1991       Handler : Cb_GObject_Gtk_Widget_Void;
1992       After   : Boolean;
1993       Slot    : access Glib.Object.GObject_Record'Class := null)
1994   is
1995   begin
1996      Unchecked_Do_Signal_Connect
1997        (Object      => Object,
1998         C_Name      => C_Name,
1999         Marshaller  => Marsh_GObject_Gtk_Widget_Void'Access,
2000         Handler     => Cb_To_Address (Handler),--  Set in the closure
2001         Slot_Object => Slot,
2002         After       => After);
2003   end Connect_Slot;
2004
2005   ---------------------------------------------
2006   -- Marsh_GObject_Gtk_Delete_Type_Gint_Void --
2007   ---------------------------------------------
2008
2009   procedure Marsh_GObject_Gtk_Delete_Type_Gint_Void
2010      (Closure         : GClosure;
2011       Return_Value    : Glib.Values.GValue;
2012       N_Params        : Glib.Guint;
2013       Params          : Glib.Values.C_GValues;
2014       Invocation_Hint : System.Address;
2015       User_Data       : System.Address)
2016   is
2017      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2018      H   : constant Cb_GObject_Gtk_Delete_Type_Gint_Void := Address_To_Cb (Get_Callback (Closure));
2019      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2020   begin
2021      H (Obj, Unchecked_To_Gtk_Delete_Type (Params, 1), Unchecked_To_Gint (Params, 2));
2022      exception when E : others => Process_Exception (E);
2023   end Marsh_GObject_Gtk_Delete_Type_Gint_Void;
2024
2025   -----------------------------------------------------------------
2026   -- Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void --
2027   -----------------------------------------------------------------
2028
2029   procedure Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void
2030      (Closure         : GClosure;
2031       Return_Value    : Glib.Values.GValue;
2032       N_Params        : Glib.Guint;
2033       Params          : Glib.Values.C_GValues;
2034       Invocation_Hint : System.Address;
2035       User_Data       : System.Address)
2036   is
2037      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2038      H   : constant Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void := Address_To_Cb (Get_Callback (Closure));
2039      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2040   begin
2041      H (Obj, Unchecked_To_Gtk_Entry_Icon_Position (Params, 1), Unchecked_To_Gdk_Event_Button (Params, 2));
2042      exception when E : others => Process_Exception (E);
2043   end Marsh_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2044
2045   -------------------------------------------------------
2046   -- Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void --
2047   -------------------------------------------------------
2048
2049   procedure Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void
2050      (Closure         : GClosure;
2051       Return_Value    : Glib.Values.GValue;
2052       N_Params        : Glib.Guint;
2053       Params          : Glib.Values.C_GValues;
2054       Invocation_Hint : System.Address;
2055       User_Data       : System.Address)
2056   is
2057      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2058      H   : constant Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void := Address_To_Cb (Get_Callback (Closure));
2059      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2060   begin
2061      H (Obj, Unchecked_To_Gtk_Movement_Step (Params, 1), Unchecked_To_Gint (Params, 2), Unchecked_To_Boolean (Params, 3));
2062      exception when E : others => Process_Exception (E);
2063   end Marsh_GObject_Gtk_Movement_Step_Gint_Boolean_Void;
2064
2065   -----------------------------------
2066   -- Marsh_GObject_Gtk_Widget_Void --
2067   -----------------------------------
2068
2069   procedure Marsh_GObject_Gtk_Widget_Void
2070      (Closure         : GClosure;
2071       Return_Value    : Glib.Values.GValue;
2072       N_Params        : Glib.Guint;
2073       Params          : Glib.Values.C_GValues;
2074       Invocation_Hint : System.Address;
2075       User_Data       : System.Address)
2076   is
2077      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2078      H   : constant Cb_GObject_Gtk_Widget_Void := Address_To_Cb (Get_Callback (Closure));
2079      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2080   begin
2081      H (Obj, Gtk.Widget.Gtk_Widget (Unchecked_To_Object (Params, 1)));
2082      exception when E : others => Process_Exception (E);
2083   end Marsh_GObject_Gtk_Widget_Void;
2084
2085   ------------------------------------
2086   -- Marsh_GObject_UTF8_String_Void --
2087   ------------------------------------
2088
2089   procedure Marsh_GObject_UTF8_String_Void
2090      (Closure         : GClosure;
2091       Return_Value    : Glib.Values.GValue;
2092       N_Params        : Glib.Guint;
2093       Params          : Glib.Values.C_GValues;
2094       Invocation_Hint : System.Address;
2095       User_Data       : System.Address)
2096   is
2097      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2098      H   : constant Cb_GObject_UTF8_String_Void := Address_To_Cb (Get_Callback (Closure));
2099      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2100   begin
2101      H (Obj, Unchecked_To_UTF8_String (Params, 1));
2102      exception when E : others => Process_Exception (E);
2103   end Marsh_GObject_UTF8_String_Void;
2104
2105   ------------------------
2106   -- Marsh_GObject_Void --
2107   ------------------------
2108
2109   procedure Marsh_GObject_Void
2110      (Closure         : GClosure;
2111       Return_Value    : Glib.Values.GValue;
2112       N_Params        : Glib.Guint;
2113       Params          : Glib.Values.C_GValues;
2114       Invocation_Hint : System.Address;
2115       User_Data       : System.Address)
2116   is
2117      pragma Unreferenced (Return_Value, N_Params, Params, Invocation_Hint, User_Data);
2118      H   : constant Cb_GObject_Void := Address_To_Cb (Get_Callback (Closure));
2119      Obj : constant Glib.Object.GObject := Glib.Object.Convert (Get_Data (Closure));
2120   begin
2121      H (Obj);
2122      exception when E : others => Process_Exception (E);
2123   end Marsh_GObject_Void;
2124
2125   -----------------------------------------------
2126   -- Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void --
2127   -----------------------------------------------
2128
2129   procedure Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void
2130      (Closure         : GClosure;
2131       Return_Value    : Glib.Values.GValue;
2132       N_Params        : Glib.Guint;
2133       Params          : Glib.Values.C_GValues;
2134       Invocation_Hint : System.Address;
2135       User_Data       : System.Address)
2136   is
2137      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2138      H   : constant Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void := Address_To_Cb (Get_Callback (Closure));
2139      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2140   begin
2141      H (Obj, Unchecked_To_Gtk_Delete_Type (Params, 1), Unchecked_To_Gint (Params, 2));
2142      exception when E : others => Process_Exception (E);
2143   end Marsh_Gtk_Entry_Gtk_Delete_Type_Gint_Void;
2144
2145   -------------------------------------------------------------------
2146   -- Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void --
2147   -------------------------------------------------------------------
2148
2149   procedure Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void
2150      (Closure         : GClosure;
2151       Return_Value    : Glib.Values.GValue;
2152       N_Params        : Glib.Guint;
2153       Params          : Glib.Values.C_GValues;
2154       Invocation_Hint : System.Address;
2155       User_Data       : System.Address)
2156   is
2157      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2158      H   : constant Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void := Address_To_Cb (Get_Callback (Closure));
2159      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2160   begin
2161      H (Obj, Unchecked_To_Gtk_Entry_Icon_Position (Params, 1), Unchecked_To_Gdk_Event_Button (Params, 2));
2162      exception when E : others => Process_Exception (E);
2163   end Marsh_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2164
2165   ---------------------------------------------------------
2166   -- Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void --
2167   ---------------------------------------------------------
2168
2169   procedure Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void
2170      (Closure         : GClosure;
2171       Return_Value    : Glib.Values.GValue;
2172       N_Params        : Glib.Guint;
2173       Params          : Glib.Values.C_GValues;
2174       Invocation_Hint : System.Address;
2175       User_Data       : System.Address)
2176   is
2177      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2178      H   : constant Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void := Address_To_Cb (Get_Callback (Closure));
2179      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2180   begin
2181      H (Obj, Unchecked_To_Gtk_Movement_Step (Params, 1), Unchecked_To_Gint (Params, 2), Unchecked_To_Boolean (Params, 3));
2182      exception when E : others => Process_Exception (E);
2183   end Marsh_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void;
2184
2185   -------------------------------------
2186   -- Marsh_Gtk_Entry_Gtk_Widget_Void --
2187   -------------------------------------
2188
2189   procedure Marsh_Gtk_Entry_Gtk_Widget_Void
2190      (Closure         : GClosure;
2191       Return_Value    : Glib.Values.GValue;
2192       N_Params        : Glib.Guint;
2193       Params          : Glib.Values.C_GValues;
2194       Invocation_Hint : System.Address;
2195       User_Data       : System.Address)
2196   is
2197      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2198      H   : constant Cb_Gtk_Entry_Gtk_Widget_Void := Address_To_Cb (Get_Callback (Closure));
2199      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2200   begin
2201      H (Obj, Gtk.Widget.Gtk_Widget (Unchecked_To_Object (Params, 1)));
2202      exception when E : others => Process_Exception (E);
2203   end Marsh_Gtk_Entry_Gtk_Widget_Void;
2204
2205   --------------------------------------
2206   -- Marsh_Gtk_Entry_UTF8_String_Void --
2207   --------------------------------------
2208
2209   procedure Marsh_Gtk_Entry_UTF8_String_Void
2210      (Closure         : GClosure;
2211       Return_Value    : Glib.Values.GValue;
2212       N_Params        : Glib.Guint;
2213       Params          : Glib.Values.C_GValues;
2214       Invocation_Hint : System.Address;
2215       User_Data       : System.Address)
2216   is
2217      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2218      H   : constant Cb_Gtk_Entry_UTF8_String_Void := Address_To_Cb (Get_Callback (Closure));
2219      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2220   begin
2221      H (Obj, Unchecked_To_UTF8_String (Params, 1));
2222      exception when E : others => Process_Exception (E);
2223   end Marsh_Gtk_Entry_UTF8_String_Void;
2224
2225   --------------------------
2226   -- Marsh_Gtk_Entry_Void --
2227   --------------------------
2228
2229   procedure Marsh_Gtk_Entry_Void
2230      (Closure         : GClosure;
2231       Return_Value    : Glib.Values.GValue;
2232       N_Params        : Glib.Guint;
2233       Params          : Glib.Values.C_GValues;
2234       Invocation_Hint : System.Address;
2235       User_Data       : System.Address)
2236   is
2237      pragma Unreferenced (Return_Value, N_Params, Invocation_Hint, User_Data);
2238      H   : constant Cb_Gtk_Entry_Void := Address_To_Cb (Get_Callback (Closure));
2239      Obj : constant Gtk_Entry := Gtk_Entry (Unchecked_To_Object (Params, 0));
2240   begin
2241      H (Obj);
2242      exception when E : others => Process_Exception (E);
2243   end Marsh_Gtk_Entry_Void;
2244
2245   -----------------
2246   -- On_Activate --
2247   -----------------
2248
2249   procedure On_Activate
2250      (Self  : not null access Gtk_Entry_Record;
2251       Call  : Cb_Gtk_Entry_Void;
2252       After : Boolean := False)
2253   is
2254   begin
2255      Connect (Self, "activate" & ASCII.NUL, Call, After);
2256   end On_Activate;
2257
2258   -----------------
2259   -- On_Activate --
2260   -----------------
2261
2262   procedure On_Activate
2263      (Self  : not null access Gtk_Entry_Record;
2264       Call  : Cb_GObject_Void;
2265       Slot  : not null access Glib.Object.GObject_Record'Class;
2266       After : Boolean := False)
2267   is
2268   begin
2269      Connect_Slot (Self, "activate" & ASCII.NUL, Call, After, Slot);
2270   end On_Activate;
2271
2272   ------------------
2273   -- On_Backspace --
2274   ------------------
2275
2276   procedure On_Backspace
2277      (Self  : not null access Gtk_Entry_Record;
2278       Call  : Cb_Gtk_Entry_Void;
2279       After : Boolean := False)
2280   is
2281   begin
2282      Connect (Self, "backspace" & ASCII.NUL, Call, After);
2283   end On_Backspace;
2284
2285   ------------------
2286   -- On_Backspace --
2287   ------------------
2288
2289   procedure On_Backspace
2290      (Self  : not null access Gtk_Entry_Record;
2291       Call  : Cb_GObject_Void;
2292       Slot  : not null access Glib.Object.GObject_Record'Class;
2293       After : Boolean := False)
2294   is
2295   begin
2296      Connect_Slot (Self, "backspace" & ASCII.NUL, Call, After, Slot);
2297   end On_Backspace;
2298
2299   -----------------------
2300   -- On_Copy_Clipboard --
2301   -----------------------
2302
2303   procedure On_Copy_Clipboard
2304      (Self  : not null access Gtk_Entry_Record;
2305       Call  : Cb_Gtk_Entry_Void;
2306       After : Boolean := False)
2307   is
2308   begin
2309      Connect (Self, "copy-clipboard" & ASCII.NUL, Call, After);
2310   end On_Copy_Clipboard;
2311
2312   -----------------------
2313   -- On_Copy_Clipboard --
2314   -----------------------
2315
2316   procedure On_Copy_Clipboard
2317      (Self  : not null access Gtk_Entry_Record;
2318       Call  : Cb_GObject_Void;
2319       Slot  : not null access Glib.Object.GObject_Record'Class;
2320       After : Boolean := False)
2321   is
2322   begin
2323      Connect_Slot (Self, "copy-clipboard" & ASCII.NUL, Call, After, Slot);
2324   end On_Copy_Clipboard;
2325
2326   ----------------------
2327   -- On_Cut_Clipboard --
2328   ----------------------
2329
2330   procedure On_Cut_Clipboard
2331      (Self  : not null access Gtk_Entry_Record;
2332       Call  : Cb_Gtk_Entry_Void;
2333       After : Boolean := False)
2334   is
2335   begin
2336      Connect (Self, "cut-clipboard" & ASCII.NUL, Call, After);
2337   end On_Cut_Clipboard;
2338
2339   ----------------------
2340   -- On_Cut_Clipboard --
2341   ----------------------
2342
2343   procedure On_Cut_Clipboard
2344      (Self  : not null access Gtk_Entry_Record;
2345       Call  : Cb_GObject_Void;
2346       Slot  : not null access Glib.Object.GObject_Record'Class;
2347       After : Boolean := False)
2348   is
2349   begin
2350      Connect_Slot (Self, "cut-clipboard" & ASCII.NUL, Call, After, Slot);
2351   end On_Cut_Clipboard;
2352
2353   ---------------------------
2354   -- On_Delete_From_Cursor --
2355   ---------------------------
2356
2357   procedure On_Delete_From_Cursor
2358      (Self  : not null access Gtk_Entry_Record;
2359       Call  : Cb_Gtk_Entry_Gtk_Delete_Type_Gint_Void;
2360       After : Boolean := False)
2361   is
2362   begin
2363      Connect (Self, "delete-from-cursor" & ASCII.NUL, Call, After);
2364   end On_Delete_From_Cursor;
2365
2366   ---------------------------
2367   -- On_Delete_From_Cursor --
2368   ---------------------------
2369
2370   procedure On_Delete_From_Cursor
2371      (Self  : not null access Gtk_Entry_Record;
2372       Call  : Cb_GObject_Gtk_Delete_Type_Gint_Void;
2373       Slot  : not null access Glib.Object.GObject_Record'Class;
2374       After : Boolean := False)
2375   is
2376   begin
2377      Connect_Slot (Self, "delete-from-cursor" & ASCII.NUL, Call, After, Slot);
2378   end On_Delete_From_Cursor;
2379
2380   -------------------
2381   -- On_Icon_Press --
2382   -------------------
2383
2384   procedure On_Icon_Press
2385      (Self  : not null access Gtk_Entry_Record;
2386       Call  : Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2387       After : Boolean := False)
2388   is
2389   begin
2390      Connect (Self, "icon-press" & ASCII.NUL, Call, After);
2391   end On_Icon_Press;
2392
2393   -------------------
2394   -- On_Icon_Press --
2395   -------------------
2396
2397   procedure On_Icon_Press
2398      (Self  : not null access Gtk_Entry_Record;
2399       Call  : Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2400       Slot  : not null access Glib.Object.GObject_Record'Class;
2401       After : Boolean := False)
2402   is
2403   begin
2404      Connect_Slot (Self, "icon-press" & ASCII.NUL, Call, After, Slot);
2405   end On_Icon_Press;
2406
2407   ---------------------
2408   -- On_Icon_Release --
2409   ---------------------
2410
2411   procedure On_Icon_Release
2412      (Self  : not null access Gtk_Entry_Record;
2413       Call  : Cb_Gtk_Entry_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2414       After : Boolean := False)
2415   is
2416   begin
2417      Connect (Self, "icon-release" & ASCII.NUL, Call, After);
2418   end On_Icon_Release;
2419
2420   ---------------------
2421   -- On_Icon_Release --
2422   ---------------------
2423
2424   procedure On_Icon_Release
2425      (Self  : not null access Gtk_Entry_Record;
2426       Call  : Cb_GObject_Gtk_Entry_Icon_Position_Gdk_Event_Button_Void;
2427       Slot  : not null access Glib.Object.GObject_Record'Class;
2428       After : Boolean := False)
2429   is
2430   begin
2431      Connect_Slot (Self, "icon-release" & ASCII.NUL, Call, After, Slot);
2432   end On_Icon_Release;
2433
2434   -------------------------
2435   -- On_Insert_At_Cursor --
2436   -------------------------
2437
2438   procedure On_Insert_At_Cursor
2439      (Self  : not null access Gtk_Entry_Record;
2440       Call  : Cb_Gtk_Entry_UTF8_String_Void;
2441       After : Boolean := False)
2442   is
2443   begin
2444      Connect (Self, "insert-at-cursor" & ASCII.NUL, Call, After);
2445   end On_Insert_At_Cursor;
2446
2447   -------------------------
2448   -- On_Insert_At_Cursor --
2449   -------------------------
2450
2451   procedure On_Insert_At_Cursor
2452      (Self  : not null access Gtk_Entry_Record;
2453       Call  : Cb_GObject_UTF8_String_Void;
2454       Slot  : not null access Glib.Object.GObject_Record'Class;
2455       After : Boolean := False)
2456   is
2457   begin
2458      Connect_Slot (Self, "insert-at-cursor" & ASCII.NUL, Call, After, Slot);
2459   end On_Insert_At_Cursor;
2460
2461   --------------------
2462   -- On_Move_Cursor --
2463   --------------------
2464
2465   procedure On_Move_Cursor
2466      (Self  : not null access Gtk_Entry_Record;
2467       Call  : Cb_Gtk_Entry_Gtk_Movement_Step_Gint_Boolean_Void;
2468       After : Boolean := False)
2469   is
2470   begin
2471      Connect (Self, "move-cursor" & ASCII.NUL, Call, After);
2472   end On_Move_Cursor;
2473
2474   --------------------
2475   -- On_Move_Cursor --
2476   --------------------
2477
2478   procedure On_Move_Cursor
2479      (Self  : not null access Gtk_Entry_Record;
2480       Call  : Cb_GObject_Gtk_Movement_Step_Gint_Boolean_Void;
2481       Slot  : not null access Glib.Object.GObject_Record'Class;
2482       After : Boolean := False)
2483   is
2484   begin
2485      Connect_Slot (Self, "move-cursor" & ASCII.NUL, Call, After, Slot);
2486   end On_Move_Cursor;
2487
2488   ------------------------
2489   -- On_Paste_Clipboard --
2490   ------------------------
2491
2492   procedure On_Paste_Clipboard
2493      (Self  : not null access Gtk_Entry_Record;
2494       Call  : Cb_Gtk_Entry_Void;
2495       After : Boolean := False)
2496   is
2497   begin
2498      Connect (Self, "paste-clipboard" & ASCII.NUL, Call, After);
2499   end On_Paste_Clipboard;
2500
2501   ------------------------
2502   -- On_Paste_Clipboard --
2503   ------------------------
2504
2505   procedure On_Paste_Clipboard
2506      (Self  : not null access Gtk_Entry_Record;
2507       Call  : Cb_GObject_Void;
2508       Slot  : not null access Glib.Object.GObject_Record'Class;
2509       After : Boolean := False)
2510   is
2511   begin
2512      Connect_Slot (Self, "paste-clipboard" & ASCII.NUL, Call, After, Slot);
2513   end On_Paste_Clipboard;
2514
2515   -----------------------
2516   -- On_Populate_Popup --
2517   -----------------------
2518
2519   procedure On_Populate_Popup
2520      (Self  : not null access Gtk_Entry_Record;
2521       Call  : Cb_Gtk_Entry_Gtk_Widget_Void;
2522       After : Boolean := False)
2523   is
2524   begin
2525      Connect (Self, "populate-popup" & ASCII.NUL, Call, After);
2526   end On_Populate_Popup;
2527
2528   -----------------------
2529   -- On_Populate_Popup --
2530   -----------------------
2531
2532   procedure On_Populate_Popup
2533      (Self  : not null access Gtk_Entry_Record;
2534       Call  : Cb_GObject_Gtk_Widget_Void;
2535       Slot  : not null access Glib.Object.GObject_Record'Class;
2536       After : Boolean := False)
2537   is
2538   begin
2539      Connect_Slot (Self, "populate-popup" & ASCII.NUL, Call, After, Slot);
2540   end On_Populate_Popup;
2541
2542   ------------------------
2543   -- On_Preedit_Changed --
2544   ------------------------
2545
2546   procedure On_Preedit_Changed
2547      (Self  : not null access Gtk_Entry_Record;
2548       Call  : Cb_Gtk_Entry_UTF8_String_Void;
2549       After : Boolean := False)
2550   is
2551   begin
2552      Connect (Self, "preedit-changed" & ASCII.NUL, Call, After);
2553   end On_Preedit_Changed;
2554
2555   ------------------------
2556   -- On_Preedit_Changed --
2557   ------------------------
2558
2559   procedure On_Preedit_Changed
2560      (Self  : not null access Gtk_Entry_Record;
2561       Call  : Cb_GObject_UTF8_String_Void;
2562       Slot  : not null access Glib.Object.GObject_Record'Class;
2563       After : Boolean := False)
2564   is
2565   begin
2566      Connect_Slot (Self, "preedit-changed" & ASCII.NUL, Call, After, Slot);
2567   end On_Preedit_Changed;
2568
2569   -------------------------
2570   -- On_Toggle_Overwrite --
2571   -------------------------
2572
2573   procedure On_Toggle_Overwrite
2574      (Self  : not null access Gtk_Entry_Record;
2575       Call  : Cb_Gtk_Entry_Void;
2576       After : Boolean := False)
2577   is
2578   begin
2579      Connect (Self, "toggle-overwrite" & ASCII.NUL, Call, After);
2580   end On_Toggle_Overwrite;
2581
2582   -------------------------
2583   -- On_Toggle_Overwrite --
2584   -------------------------
2585
2586   procedure On_Toggle_Overwrite
2587      (Self  : not null access Gtk_Entry_Record;
2588       Call  : Cb_GObject_Void;
2589       Slot  : not null access Glib.Object.GObject_Record'Class;
2590       After : Boolean := False)
2591   is
2592   begin
2593      Connect_Slot (Self, "toggle-overwrite" & ASCII.NUL, Call, After, Slot);
2594   end On_Toggle_Overwrite;
2595
2596end Gtk.GEntry;
2597