1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   -- 
  5. --                Copyright (C) 2000-2010, AdaCore                   -- 
  6. --                                                                   -- 
  7. -- This library is free software; you can redistribute it and/or     -- 
  8. -- modify it under the terms of the GNU General Public               -- 
  9. -- License as published by the Free Software Foundation; either      -- 
  10. -- version 2 of the License, or (at your option) any later version.  -- 
  11. --                                                                   -- 
  12. -- This library is distributed in the hope that it will be useful,   -- 
  13. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  14. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  15. -- General Public License for more details.                          -- 
  16. --                                                                   -- 
  17. -- You should have received a copy of the GNU General Public         -- 
  18. -- License along with this library; if not, write to the             -- 
  19. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  20. -- Boston, MA 02111-1307, USA.                                       -- 
  21. --                                                                   -- 
  22. -- -- -- -- -- -- -- -- -- -- -- --
  23. ----------------------------------------------------------------------- 
  24.  
  25. --  <description> 
  26. --  A Gtk_Entry is a single line text editing widget. 
  27. --  The text is automatically scrolled if it is longer than can be displayed 
  28. --  on the screen, so that the cursor position is visible at all times. 
  29. -- 
  30. --  See Gtk_Text_View for a multiple-line text editing widget. 
  31. --  </description> 
  32. --  <c_version>2.16.6</c_version> 
  33. --  <group>Numeric/Text Data Entry</group> 
  34. --  <testgtk>create_entry.adb</testgtk> 
  35. --  <screenshot>gtk-gentry</screenshot> 
  36.  
  37. with Glib.G_Icon; 
  38. with Glib.Properties; 
  39. with Gdk.Dnd; 
  40. with Gdk.Pixbuf; 
  41. with Gtk.Adjustment; 
  42. with Gtk.Editable; 
  43. with Gtk.Entry_Completion;  use Gtk.Entry_Completion; 
  44. with Gtk.Image; 
  45. with Gtk.Selection; 
  46. with Gtk.Style; 
  47. with Pango.Layout; 
  48.  
  49. package Gtk.GEntry is 
  50.  
  51.    type Gtk_Entry_Icon_Position is 
  52.      (Gtk_Entry_Icon_Primary, Gtk_Entry_Icon_Secondary); 
  53.    pragma Convention (C, Gtk_Entry_Icon_Position); 
  54.  
  55.    type Gtk_Entry_Record is new Gtk.Editable.Gtk_Editable_Record with private; 
  56.    --  Gtk_Entry is actually a child of Gtk_Widget, and implements the 
  57.    --  Gtk_Editable interface, but GtkAda does not support yet interfaces, 
  58.    --  so use direct inheritance for now ??? 
  59.  
  60.    type Gtk_Entry is access all Gtk_Entry_Record'Class; 
  61.    subtype Gtk_GEntry is Gtk_Entry; 
  62.  
  63.    procedure Gtk_New (Widget : out Gtk_Entry); 
  64.    --  Create a new entry with no maximum length for the text 
  65.  
  66.    procedure Initialize (Widget : access Gtk_Entry_Record'Class); 
  67.    --  Internal initialization function. 
  68.    --  See the section "Creating your own widgets" in the documentation. 
  69.  
  70.    function Get_Type return Gtk.Gtk_Type; 
  71.    --  Return the internal value associated with a Gtk_Entry. 
  72.  
  73.    function Get_Text_Length (The_Entry : access Gtk_Entry_Record) 
  74.       return Guint16; 
  75.    --  Retrieves the current length of the text in The_Entry. 
  76.  
  77.    procedure Set_Visibility 
  78.      (The_Entry : access Gtk_Entry_Record; Visible : Boolean); 
  79.    function Get_Visibility 
  80.      (The_Entry : access Gtk_Entry_Record) return Boolean; 
  81.    --  Set the visibility of the characters in the entry. 
  82.    --  If Visible is set to False, the characters will be replaced with 
  83.    --  the invisible character ('*' by default) in the display, and when the 
  84.    --  text is copied elsewhere. 
  85.  
  86.    procedure Set_Invisible_Char 
  87.      (The_Entry : access Gtk_Entry_Record; Char : Gunichar); 
  88.    function Get_Invisible_Char 
  89.      (The_Entry : access Gtk_Entry_Record) return Gunichar; 
  90.    --  Gets/Sets the character to use in place of the actual text when 
  91.    --  Set_Visibility has been called to set text visibility to False. 
  92.    --  i.e. this is the character used in "password mode" to 
  93.    --  show the user how many characters have been typed. By default, GTK+ 
  94.    --  picks the best invisible char available in the current font. If you 
  95.    --  set the invisible char to 0, then the user will get no feedback 
  96.    --  at all; there will be no text on the screen as they type. 
  97.  
  98.    procedure Unset_Invisible_Char (The_Entry : access Gtk_Entry_Record); 
  99.    --  Unsets the invisible char previously set with Set_Invisible_Char, 
  100.    --  so that the default invisible char is used again. 
  101.  
  102.    procedure Set_Has_Frame 
  103.      (The_Entry : access Gtk_Entry_Record; Setting : Boolean := True); 
  104.    function Get_Has_Frame 
  105.      (The_Entry : access Gtk_Entry_Record) return Boolean; 
  106.    --  Set whether the entry has a beveled frame around it. 
  107.  
  108.    procedure Set_Max_Length 
  109.      (The_Entry : access Gtk_Entry_Record; Max : Gint); 
  110.    function Get_Max_Length (The_Entry : access Gtk_Entry_Record) return Gint; 
  111.    --  Set the maximum length for the text. 
  112.    --  The current text is truncated if needed. 
  113.  
  114.    procedure Set_Activates_Default 
  115.      (The_Entry : access Gtk_Entry_Record; Setting : Boolean); 
  116.    function Get_Activates_Default 
  117.      (The_Entry : access Gtk_Entry_Record) return Boolean; 
  118.    --  If Setting is True, pressing Enter in the Entry will activate the 
  119.    --  default widget for the window containing the entry. This usually means 
  120.    --  that the dialog box containing the entry will be closed, since the 
  121.    --  default widget is usually one of the dialog buttons. 
  122.    -- 
  123.    --  (For experts: if Setting is True, the entry calls 
  124.    --  Gtk.Window.Activate_Default on the window containing the entry, in 
  125.    --  the default handler for the "activate" signal.) 
  126.  
  127.    procedure Set_Width_Chars 
  128.      (The_Entry : access Gtk_Entry_Record'Class; Width : Gint); 
  129.    function Get_Width_Chars 
  130.      (The_Entry : access Gtk_Entry_Record'Class) return Gint; 
  131.    --  Number of characters to leave space for in the entry, on the screen. 
  132.    --  This is the number of visible characters, not the maximal number of 
  133.    --  characters the entry can contain 
  134.  
  135.    procedure Set_Text 
  136.      (The_Entry : access Gtk_Entry_Record; Text : UTF8_String); 
  137.    function Get_Text (The_Entry : access Gtk_Entry_Record) return UTF8_String; 
  138.    --  Modify the text in the entry. 
  139.    --  The text is cut at the maximum length that was set when the entry was 
  140.    --  created. 
  141.    --  The text replaces the current contents. 
  142.  
  143.    procedure Set_Alignment (Ent  : access Gtk_Entry_Record; Xalign : Gfloat); 
  144.    function Get_Alignment   (Ent : access Gtk_Entry_Record) return Gfloat; 
  145.    --  Sets the alignment for the contents of the entry. This controls 
  146.    --  the horizontal positioning of the contents when the displayed 
  147.    --  text is shorter than the width of the entry. 
  148.  
  149.    procedure Set_Completion 
  150.      (Ent        : access Gtk_Entry_Record; 
  151.       Completion : access Gtk_Entry_Completion_Record'Class); 
  152.    function Get_Completion 
  153.      (Ent : access Gtk_Entry_Record) 
  154.       return Gtk_Entry_Completion; 
  155.    --  Sets Completion to be the auxiliary completion object to use with Ent. 
  156.    --  All further configuration of the completion mechanism is done on 
  157.    --  Completion using the Gtk.Entry_Completion API. 
  158.  
  159.    function Text_Index_To_Layout_Index 
  160.      (Ent        : access Gtk_Entry_Record; 
  161.       Text_Index : Gint) 
  162.       return Gint; 
  163.    --  Converts from a position in the entry's layout (returned by Get_Layout) 
  164.    --  to a position in the entry contents (returned by Get_Text). 
  165.    --  Returns the byte index into the entry layout text 
  166.  
  167.    function Layout_Index_To_Text_Index 
  168.      (Ent           : access Gtk_Entry_Record; 
  169.       Layout_Index : Gint) 
  170.       return Gint; 
  171.    --  Converts from a position in the entry contents (returned 
  172.    --  by Get_Text) to a position in the 
  173.    --  entry's layout (returned by Get_Layout, 
  174.    --  with text retrieved via pango.layout.Get_Text). 
  175.    --  Return the byte index into the entry contents 
  176.  
  177.    procedure Get_Layout_Offsets 
  178.      (The_Entry : access Gtk_Entry_Record; 
  179.       X         : out Gint; 
  180.       Y         : out Gint); 
  181.    --  Obtain the position of the Pango_Layout used to render text 
  182.    --  in the entry, in widget coordinates. Useful if you want to line 
  183.    --  up the text in an entry with some other text, e.g. when using the 
  184.    --  entry to implement editable cells in a sheet widget. 
  185.    -- 
  186.    --  Also useful to convert mouse events into coordinates inside the 
  187.    --  Pango_Layout, e.g. to take some action if some part of the entry text 
  188.    --  is clicked. 
  189.    -- 
  190.    --  Note that as the user scrolls around in the entry the offsets will 
  191.    --  change; you'll need to connect to the "notify::scroll_offset" 
  192.    --  signal to track this. Remember when using the Pango_Layout 
  193.    --  functions you need to convert to and from pixels using 
  194.    --  Pango_Pixels or Pango_Scale. 
  195.  
  196.    function Get_Layout (The_Entry : access Gtk_Entry_Record) 
  197.       return Pango.Layout.Pango_Layout; 
  198.    --  Return the widget that manages all the layout of text (left-to-right, 
  199.    --  right-to-left, fonts,...). Changing the font used for the entry should 
  200.    --  be done by changing the font using for this layout. Note that you should 
  201.    --  also change the font in the Pango_Context returned by Get_Pango_Context, 
  202.    --  or the next keypress event in the entry will restore the default initial 
  203.    --  font. 
  204.    -- 
  205.    --  The layout is useful to e.g. convert text positions to pixel positions, 
  206.    --  in combination with Get_Layout_Offsets.  The returned layout is owned by 
  207.    --  the entry so need not be freed by the caller. 
  208.  
  209.    function Get_Current_Icon_Drag_Source (The_Entry : access Gtk_Entry_Record) 
  210.       return Gint; 
  211.    --  Returns the index of the icon which is the source of the current 
  212.    --  DND operation, or -1. 
  213.    -- 
  214.    --  This function is meant to be used in a #GtkWidget::drag-data-get 
  215.    --  callback. 
  216.  
  217.    procedure Set_Icon_Drag_Source 
  218.      (The_Entry   : access Gtk_Entry_Record; 
  219.       Icon_Pos    : Gtk_Entry_Icon_Position; 
  220.       Target_List : Gtk.Selection.Target_List; 
  221.       Actions     : Gdk.Dnd.Drag_Action); 
  222.    --  Sets up the icon at the given position so that GTK+ will start a drag 
  223.    --  operation when the user clicks and drags the icon. 
  224.    -- 
  225.    --  To handle the drag operation, you need to connect to the usual 
  226.    --  #GtkWidget::drag-data-get (or possibly #GtkWidget::drag-data-delete) 
  227.    --  signal, and use Get_Current_Icon_Drag_Source in your signal handler 
  228.    --  to find out if the drag was started from an icon. 
  229.    -- 
  230.    --  By default, GTK+ uses the icon as the drag icon. You can use the 
  231.    --  #GtkWidget::drag-begin signal to set a different icon. Note that you 
  232.    --  have to use g_signal_connect_after() to ensure that your signal handler 
  233.    --  gets executed after the default handler. 
  234.  
  235.    function Get_Cursor_Hadjustment (The_Entry : access Gtk_Entry_Record) 
  236.       return Gtk.Adjustment.Gtk_Adjustment; 
  237.    procedure Set_Cursor_Hadjustment 
  238.      (The_Entry  : access Gtk_Entry_Record; 
  239.       Adjustment : access Gtk.Adjustment.Gtk_Adjustment_Record'Class); 
  240.    --  Hooks up an adjustment to the cursor position in an entry, so that when 
  241.    --  the cursor is moved, the adjustment is scrolled to show that position. 
  242.    --  See Gtk.Scrolled_Window.Get_Hadjustment for a typical way of obtaining 
  243.    --  the adjustment. 
  244.    -- 
  245.    --  The adjustment has to be in pixel units and in the same coordinate 
  246.    --  system as the entry. 
  247.    -- 
  248.    --  Get_Cursor_Hadjustment returns the horizontal cursor adjustment, or 
  249.    --  null if none has been set. 
  250.  
  251.    function Get_Icon_Activatable 
  252.      (The_Entry : access Gtk_Entry_Record; 
  253.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  254.       return Boolean; 
  255.    procedure Set_Icon_Activatable 
  256.      (The_Entry   : access Gtk_Entry_Record; 
  257.       Icon_Pos    : Gtk_Entry_Icon_Position; 
  258.       Activatable : Boolean); 
  259.    --  Get/Sets whether the icon is activatable. 
  260.  
  261.    function Get_Icon_At_Pos 
  262.      (The_Entry : access Gtk_Entry_Record; 
  263.       X         : Gint; 
  264.       Y         : Gint) 
  265.       return Gint; 
  266.    --  Finds the icon at the given position and return its index. 
  267.    --  If (X, Y) doesn't lie inside an icon, -1 is returned. 
  268.    --  This function is intended for use in a GtkWidget "query-tooltip" 
  269.    --  signal handler. 
  270.  
  271.    function Get_Icon_Gicon 
  272.      (The_Entry : access Gtk_Entry_Record; 
  273.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  274.       return Glib.G_Icon.G_Icon; 
  275.    procedure Set_Icon_From_Gicon 
  276.      (The_Entry : access Gtk_Entry_Record; 
  277.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  278.       Icon      : Glib.G_Icon.G_Icon); 
  279.    --  Sets the icon shown in the entry at the specified position 
  280.    --  from the current icon theme. 
  281.    --  If the icon isn't known, a "broken image" icon will be displayed 
  282.    --  instead. 
  283.    -- 
  284.    --  If Icon is null, no icon will be shown in the specified position. 
  285.  
  286.    function Get_Icon_Name 
  287.      (The_Entry : access Gtk_Entry_Record; 
  288.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  289.       return UTF8_String; 
  290.    --  Retrieves the icon name used for the icon, or "" if there is 
  291.    --  no icon or if the icon was set by some other method (e.g., by 
  292.    --  pixbuf, stock or gicon). 
  293.  
  294.    procedure Set_Icon_From_Icon_Name 
  295.      (The_Entry : access Gtk_Entry_Record; 
  296.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  297.       Icon_Name : UTF8_String); 
  298.    --  Sets the icon shown in the entry at the specified position 
  299.    --  from the current icon theme. 
  300.    -- 
  301.    --  If the icon name isn't known, a "broken image" icon will be displayed 
  302.    --  instead. 
  303.    -- 
  304.    --  If Icon_Name is "", no icon will be shown in the specified position. 
  305.  
  306.    function Get_Icon_Pixbuf 
  307.      (The_Entry : access Gtk_Entry_Record; 
  308.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  309.       return Gdk.Pixbuf.Gdk_Pixbuf; 
  310.    --  Retrieves the image used for the icon. 
  311.    -- 
  312.    --  Unlike the other methods of setting and getting icon data, this 
  313.    --  method will work regardless of whether the icon was set using a 
  314.    --  Gdk_Pixbuf, a G_Icon, a stock item, or an icon name. 
  315.    -- 
  316.    --  Returns: A Gdk_Pixbuf, or null if no icon is set for this position. 
  317.  
  318.    procedure Set_Icon_From_Pixbuf 
  319.      (The_Entry : access Gtk_Entry_Record; 
  320.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  321.       Pixbuf    : Gdk.Pixbuf.Gdk_Pixbuf); 
  322.    --  Sets the icon shown in the specified position using a pixbuf. 
  323.    --  If Pixbuf is null, no icon will be shown in the specified position. 
  324.  
  325.    function Get_Icon_Stock 
  326.      (The_Entry : access Gtk_Entry_Record; 
  327.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  328.       return UTF8_String; 
  329.    --  Retrieves the stock id used for the icon, or "" if there is 
  330.    --  no icon or if the icon was set by some other method (e.g., by 
  331.    --  pixbuf, icon name or gicon). 
  332.    -- 
  333.    --  Returns a stock id, or "" if no icon is set or if the icon 
  334.    --  wasn't set from a stock id 
  335.  
  336.    procedure Set_Icon_From_Stock 
  337.      (The_Entry : access Gtk_Entry_Record; 
  338.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  339.       Stock_Id  : UTF8_String); 
  340.    --  Sets the icon shown in the entry at the specified position from 
  341.    --  a stock image. 
  342.    -- 
  343.    --  If Stock_Id is "", no icon will be shown in the specified position. 
  344.  
  345.    function Get_Icon_Sensitive 
  346.      (The_Entry : access Gtk_Entry_Record; 
  347.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  348.       return Boolean; 
  349.    procedure Set_Icon_Sensitive 
  350.      (The_Entry : access Gtk_Entry_Record; 
  351.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  352.       Sensitive : Boolean); 
  353.    --  Gets/Sets the sensitivity for the specified icon. 
  354.  
  355.    function Get_Icon_Storage_Type 
  356.      (The_Entry : access Gtk_Entry_Record; 
  357.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  358.       return Gtk.Image.Gtk_Image_Type; 
  359.    --  Gets the type of representation being used by the icon 
  360.    --  to store image data. If the icon has no image data, 
  361.    --  the return value will be Gtk.Image.Image_Empty. 
  362.  
  363.    function Get_Icon_Tooltip_Markup 
  364.      (The_Entry : access Gtk_Entry_Record; 
  365.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  366.       return UTF8_String; 
  367.    procedure Set_Icon_Tooltip_Markup 
  368.      (The_Entry : access Gtk_Entry_Record; 
  369.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  370.       Tooltip   : UTF8_String); 
  371.    --  Gets/Sets Tooltip as the contents of the tooltip for the icon at 
  372.    --  the specified position. Tooltip is assumed to be marked up with 
  373.    --  the Pango text markup language. 
  374.    -- 
  375.    --  Use "" for Tooltip to remove an existing tooltip. 
  376.    -- 
  377.    --  See also Gtk.Widget.Set_Tooltip_Markup and Set_Icon_Tooltip_Text 
  378.  
  379.    function Get_Icon_Tooltip_Text 
  380.      (The_Entry : access Gtk_Entry_Record; 
  381.       Icon_Pos  : Gtk_Entry_Icon_Position) 
  382.       return UTF8_String; 
  383.    procedure Set_Icon_Tooltip_Text 
  384.      (The_Entry : access Gtk_Entry_Record; 
  385.       Icon_Pos  : Gtk_Entry_Icon_Position; 
  386.       Tooltip   : UTF8_String); 
  387.    --  Gets/Sets Tooltip as the contents of the tooltip for the icon 
  388.    --  at the specified position. 
  389.    -- 
  390.    --  Use "" for Tooltip to remove an existing tooltip. 
  391.    -- 
  392.    --  See also Gtk.Widget.Set_Tooltip_Text and Set_Icon_Tooltip_Markup 
  393.  
  394.    function Get_Inner_Border (The_Entry : access Gtk_Entry_Record) 
  395.       return Gtk.Style.Gtk_Border; 
  396.    procedure Set_Inner_Border 
  397.      (The_Entry : access Gtk_Entry_Record; 
  398.       Border    : Gtk.Style.Gtk_Border); 
  399.    --  Gets/Sets The_Entry's inner-border property.  null signifies that 
  400.    --  the property is (should be) cleared.  The inner-border is the area 
  401.    --  around the entry's text, but inside its frame. 
  402.    -- 
  403.    --  If set, this property overrides the inner-border style property. 
  404.    --  Overriding the style-provided border is useful when you want to do 
  405.    --  in-place editing of some text in a canvas or list widget, where 
  406.    --  pixel-exact positioning of the entry is important. 
  407.  
  408.    function Get_Overwrite_Mode (The_Entry : access Gtk_Entry_Record) 
  409.       return Boolean; 
  410.    procedure Set_Overwrite_Mode 
  411.      (The_Entry : access Gtk_Entry_Record; 
  412.       Overwrite : Boolean); 
  413.    --  Gets/Sets whether text is overwritten when typing in the Gtk_Entry. 
  414.  
  415.    function Get_Progress_Fraction (The_Entry : access Gtk_Entry_Record) 
  416.       return Gdouble; 
  417.    procedure Set_Progress_Fraction 
  418.      (The_Entry : access Gtk_Entry_Record; 
  419.       Fraction  : Gdouble); 
  420.    --  Causes the entry's progress indicator to "fill in" the given 
  421.    --  fraction of the bar. The fraction should be between 0.0 and 1.0, 
  422.    --  inclusive. 
  423.  
  424.    function Get_Progress_Pulse_Step (The_Entry : access Gtk_Entry_Record) 
  425.       return Gdouble; 
  426.    procedure Set_Progress_Pulse_Step 
  427.      (The_Entry : access Gtk_Entry_Record; 
  428.       Fraction  : Gdouble); 
  429.    --  Gets/Sets the fraction of total entry width to move the progress 
  430.    --  bouncing block for each call to Progress_Pulse. 
  431.  
  432.    procedure Progress_Pulse (The_Entry : access Gtk_Entry_Record); 
  433.    --  Indicates that some progress is made, but you don't know how much. 
  434.    --  Causes the entry's progress indicator to enter "activity mode," 
  435.    --  where a block bounces back and forth. Each call to 
  436.    --  Progress_Pulse causes the block to move by a little bit 
  437.    --  (the amount of movement per pulse is determined by 
  438.    --  Set_Progress_Pulse_Step). 
  439.  
  440.    ----------------- 
  441.    -- Obsolescent -- 
  442.    ----------------- 
  443.    --  All subprograms below are now obsolescent in gtk+. They might be removed 
  444.    --  from future versions of gtk+ (and therefore GtkAda). 
  445.    --  To find out whether your code uses any of these, we recommend compiling 
  446.    --  with the -gnatwj switch 
  447.    --  <doc_ignore> 
  448.  
  449.    procedure Gtk_New (Widget : out Gtk_Entry; Max : Gint); 
  450.    pragma Obsolescent;  --  New_With_Max_Length 
  451.    --  Create a new entry with a maximum length for the text. 
  452.    --  The text can never be longer than Max characters. 
  453.  
  454.    procedure Initialize 
  455.      (Widget : access Gtk_Entry_Record'Class; Max : Gint); 
  456.    pragma Obsolescent; 
  457.    --  Internal initialization function. 
  458.    --  See the section "Creating your own widgets" in the documentation. 
  459.  
  460.    procedure Append_Text 
  461.      (The_Entry : access Gtk_Entry_Record; Text : UTF8_String); 
  462.    pragma Obsolescent ("See Gtk.Editable.Insert_Text");  --  Append_Text 
  463.    --  Append a new string at the end of the existing one. 
  464.  
  465.    procedure Prepend_Text 
  466.      (The_Entry : access Gtk_Entry_Record; Text : UTF8_String); 
  467.    pragma Obsolescent ("See Gtk.Editable.Insert_Text");  --  Prepend_Text 
  468.    --  Insert some text at the beginning of the entry. 
  469.  
  470.    procedure Set_Editable 
  471.      (The_Entry : access Gtk_Entry_Record; Editable : Boolean); 
  472.    pragma Obsolescent;  --  Set_Editable 
  473.  
  474.    function Get_Chars (The_Entry : access Gtk_Entry_Record) return UTF8_String 
  475.                        renames Get_Text; 
  476.    --  pragma Obsolescent; 
  477.    --  Convenience function provided for compatibility with GtkAda 1.2 
  478.  
  479.    --  </doc_ignore> 
  480.  
  481.    ---------------- 
  482.    -- Properties -- 
  483.    ---------------- 
  484.  
  485.    --  <properties> 
  486.    --  The following properties are defined for this widget. See 
  487.    --  Glib.Properties for more information on properties. 
  488.    -- 
  489.    --  Name:  Activates_Default_Property 
  490.    --  Type:  Boolean 
  491.    --  Flags: read-write 
  492.    --  Descr: Whether to activate the default widget (such as the default 
  493.    --         button in a dialog) when Enter is pressed.) 
  494.    -- 
  495.    --  Name:  Caps_Lock_Warning_Property 
  496.    --  Type:  Boolean 
  497.    --  Descr: Whether password entries will show a warning when Caps Lock is on 
  498.    -- 
  499.    --  Name:  Cursor_Position_Property 
  500.    --  Type:  Int 
  501.    --  Descr: The current position of the insertion cursor in chars 
  502.    -- 
  503.    --  Name:  Editable_Property 
  504.    --  Type:  Boolean 
  505.    --  Flags: read-write 
  506.    --  Descr: Whether the entry contents can be edited 
  507.    --  See also:  Set_Editable 
  508.    -- 
  509.    --  Name:  Has_Frame_Property 
  510.    --  Type:  Boolean 
  511.    --  Descr: FALSE removes outside bevel from entry 
  512.    -- 
  513.    --  Name:  Im_Module_Property 
  514.    --  Type:  String 
  515.    --  Descr: Which IM module should be used 
  516.    -- 
  517.    --  Name:  Inner_Border_Property 
  518.    --  Type:  Boxed 
  519.    --  Descr: Border between text and frame. Overrides the inner-border 
  520.    --         style property 
  521.    -- 
  522.    --  Name:  Invisible_Char_Property 
  523.    --  Type:  Gunichar 
  524.    --  Flags: read-write 
  525.    --  Descr: The character to use when masking entry contents 
  526.    --         (in "password mode") 
  527.    -- 
  528.    --  Name:  Invisible_Char_Set_Property 
  529.    --  Type:  Boolean 
  530.    --  Descr: Whether the invisible char has been set 
  531.    -- 
  532.    --  Name:  Max_Length_Property 
  533.    --  Type:  Gint 
  534.    --  Flags: read-write 
  535.    --  Descr: Maximum number of characters for this entry 
  536.    --  See also:  Set_Max_Length 
  537.    -- 
  538.    --  Name:  Overwrite_Mode_Property 
  539.    --  Type:  Boolean 
  540.    --  Descr: Whether new text overwrites existing text 
  541.    -- 
  542.    --  Name:  Primary_Icon_Activatable_Property 
  543.    --  Type:  Boolean 
  544.    --  Descr: Whether the primary icon is activatable 
  545.    -- 
  546.    --  Name:  Primary_Icon_Gicon_Property 
  547.    --  Type:  Object 
  548.    --  Descr: GIcon for primary icon 
  549.    -- 
  550.    --  Name:  Primary_Icon_Name_Property 
  551.    --  Type:  String 
  552.    --  Descr: Icon name for primary icon 
  553.    -- 
  554.    --  Name:  Primary_Icon_Pixbuf_Property 
  555.    --  Type:  Object 
  556.    --  Descr: Primary pixbuf for the entry 
  557.    -- 
  558.    --  Name:  Primary_Icon_Sensitive_Property 
  559.    --  Type:  Boolean 
  560.    --  Descr: Whether the primary icon is sensitive 
  561.    -- 
  562.    --  Name:  Primary_Icon_Stock_Property 
  563.    --  Type:  String 
  564.    --  Descr: Stock ID for primary icon 
  565.    -- 
  566.    --  Name:  Primary_Icon_Storage_Type_Property 
  567.    --  Type:  Enum 
  568.    --  Descr: The representation being used for primary icon 
  569.    -- 
  570.    --  Name:  Primary_Icon_Tooltip_Markup_Property 
  571.    --  Type:  String 
  572.    --  Descr: The contents of the tooltip on the primary icon 
  573.    -- 
  574.    --  Name:  Primary_Icon_Tooltip_Text_Property 
  575.    --  Type:  String 
  576.    --  Descr: The contents of the tooltip on the primary icon 
  577.    -- 
  578.    --  Name:  Progress_Fraction_Property 
  579.    --  Type:  Double 
  580.    --  Descr: The current fraction of the task that's been completed 
  581.    -- 
  582.    --  Name:  Progress_Pulse_Step_Property 
  583.    --  Type:  Double 
  584.    --  Descr: The fraction of total entry width to move the progress 
  585.    --         bouncing block for each call to Progress_Pulse 
  586.    -- 
  587.    --  Name:  Scroll_Offset_Property 
  588.    --  Type:  Gint 
  589.    --  Flags: read only 
  590.    --  Descr: Number of pixels of the entry scrolled off the screen to the 
  591.    --         left 
  592.    -- 
  593.    --  Name:  Secondary_Icon_Activatable_Property 
  594.    --  Type:  Boolean 
  595.    --  Descr: Whether the secondary icon is activatable 
  596.    -- 
  597.    --  Name:  Secondary_Icon_Gicon_Property 
  598.    --  Type:  Object 
  599.    --  Descr: GIcon for secondary icon 
  600.    -- 
  601.    --  Name:  Secondary_Icon_Name_Property 
  602.    --  Type:  String 
  603.    --  Descr: Icon name for secondary icon 
  604.    -- 
  605.    --  Name:  Secondary_Icon_Pixbuf_Property 
  606.    --  Type:  Object 
  607.    --  Descr: Secondary pixbuf for the entry 
  608.    -- 
  609.    --  Name:  Secondary_Icon_Sensitive_Property 
  610.    --  Type:  Boolean 
  611.    --  Descr: Whether the secondary icon is sensitive 
  612.    -- 
  613.    --  Name:  Secondary_Icon_Stock_Property 
  614.    --  Type:  String 
  615.    --  Descr: Stock ID for secondary icon 
  616.    -- 
  617.    --  Name:  Secondary_Icon_Storage_Type_Property 
  618.    --  Type:  Enum 
  619.    --  Descr: The representation being used for secondary icon 
  620.    -- 
  621.    --  Name:  Secondary_Icon_Tooltip_Markup_Property 
  622.    --  Type:  String 
  623.    --  Descr: The contents of the tooltip on the secondary icon 
  624.    -- 
  625.    --  Name:  Secondary_Icon_Tooltip_Text_Property 
  626.    --  Type:  String 
  627.    --  Descr: The contents of the tooltip on the secondary icon 
  628.    -- 
  629.    --  Name:  Selection_Bound_Property 
  630.    --  Type:  Int 
  631.    --  Descr: The position of the opposite end of the selection from the cursor 
  632.    --         in chars 
  633.    -- 
  634.    --  Name:  Shadow_Type_Property 
  635.    --  Type:  Enum 
  636.    --  Descr: Which kind of shadow to draw around the entry when has-frame 
  637.    --         is set 
  638.    -- 
  639.    --  Name:  Text_Length_Property 
  640.    --  Type:  Uint 
  641.    --  Descr: Length of the text currently in the entry 
  642.    -- 
  643.    --  Name:  Text_Position_Property 
  644.    --  Type:  Gint 
  645.    --  Flags: read-write 
  646.    --  Descr: The current position of the insertion point 
  647.    -- 
  648.    --  Name:  Text_Property 
  649.    --  Type:  String 
  650.    --  Descr: The contents of the entry 
  651.    -- 
  652.    --  Name:  Truncate_Multiline_Property 
  653.    --  Type:  Boolean 
  654.    --  Descr: Whether to truncate multiline pastes to one line. 
  655.    -- 
  656.    --  Name:  Visibility_Property 
  657.    --  Type:  Boolean 
  658.    --  Flags: read-write 
  659.    --  Descr: FALSE displays the "invisible char" instead of the actual 
  660.    --         text (password mode) 
  661.    --  See also:  Set_Visibility 
  662.    -- 
  663.    --  Name:  Width_Chars_Property 
  664.    --  Type:  Gint 
  665.    --  Flags: read-write 
  666.    --  Descr: Number of characters to leave space for in the entry. 
  667.    --  See also: Set_Width_Chars 
  668.    -- 
  669.    --  Name:  Xalign_Property 
  670.    --  Type:  Float 
  671.    --  Descr: The horizontal alignment, from 0 (left) to 1 (right). Reversed 
  672.    --         for RTL layouts. 
  673.    -- 
  674.    --  </properties> 
  675.  
  676.    Activates_Default_Property : constant Glib.Properties.Property_Boolean; 
  677.    Caps_Lock_Warning_Property : constant Glib.Properties.Property_Boolean; 
  678.    Cursor_Position_Property   : constant Glib.Properties.Property_Int; 
  679.    Editable_Property          : constant Glib.Properties.Property_Boolean; 
  680.    Has_Frame_Property         : constant Glib.Properties.Property_Boolean; 
  681.    Im_Module_Property         : constant Glib.Properties.Property_String; 
  682.    Inner_Border_Property      : constant Glib.Properties.Property_Boxed; 
  683.    Invisible_Char_Property    : constant Glib.Properties.Property_Unichar; 
  684.    Invisible_Char_Set_Property : 
  685.                                 constant Glib.Properties.Property_Boolean; 
  686.    Max_Length_Property        : constant Glib.Properties.Property_Int; 
  687.    Overwrite_Mode_Property    : constant Glib.Properties.Property_Boolean; 
  688.    Primary_Icon_Activatable_Property : 
  689.                                 constant Glib.Properties.Property_Boolean; 
  690.    Primary_Icon_Gicon_Property : 
  691.                                 constant Glib.Properties.Property_Object; 
  692.    Primary_Icon_Name_Property : constant Glib.Properties.Property_String; 
  693.    Primary_Icon_Pixbuf_Property : 
  694.                                 constant Glib.Properties.Property_Object; 
  695.    Primary_Icon_Sensitive_Property : 
  696.                                 constant Glib.Properties.Property_Boolean; 
  697.    Primary_Icon_Stock_Property : 
  698.                                 constant Glib.Properties.Property_String; 
  699.    Primary_Icon_Storage_Type_Property : 
  700.                                 constant Glib.Properties.Property_Enum; 
  701.    Primary_Icon_Tooltip_Markup_Property : 
  702.                                 constant Glib.Properties.Property_String; 
  703.    Primary_Icon_Tooltip_Text_Property : 
  704.                                 constant Glib.Properties.Property_String; 
  705.    Progress_Fraction_Property : constant Glib.Properties.Property_Double; 
  706.    Progress_Pulse_Step_Property : 
  707.                                 constant Glib.Properties.Property_Double; 
  708.    Scroll_Offset_Property     : constant Glib.Properties.Property_Int; 
  709.    Secondary_Icon_Activatable_Property : 
  710.                                 constant Glib.Properties.Property_Boolean; 
  711.    Secondary_Icon_Gicon_Property : 
  712.                                 constant Glib.Properties.Property_Object; 
  713.    Secondary_Icon_Name_Property : 
  714.                                 constant Glib.Properties.Property_String; 
  715.    Secondary_Icon_Pixbuf_Property : 
  716.                                 constant Glib.Properties.Property_Object; 
  717.    Secondary_Icon_Sensitive_Property : 
  718.                                 constant Glib.Properties.Property_Boolean; 
  719.    Secondary_Icon_Stock_Property : 
  720.                                 constant Glib.Properties.Property_String; 
  721.    Secondary_Icon_Storage_Type_Property : 
  722.                                 constant Glib.Properties.Property_Enum; 
  723.    Secondary_Icon_Tooltip_Markup_Property : 
  724.                                 constant Glib.Properties.Property_String; 
  725.    Secondary_Icon_Tooltip_Text_Property : 
  726.                                 constant Glib.Properties.Property_String; 
  727.    Selection_Bound_Property   : constant Glib.Properties.Property_Int; 
  728.    Shadow_Type_Property       : constant Glib.Properties.Property_Enum; 
  729.    Text_Length_Property       : constant Glib.Properties.Property_Uint; 
  730.    Text_Position_Property     : constant Glib.Properties.Property_Int; 
  731.    Text_Property              : constant Glib.Properties.Property_String; 
  732.    Truncate_Multiline_Property : 
  733.                                 constant Glib.Properties.Property_Boolean; 
  734.    Visibility_Property        : constant Glib.Properties.Property_Boolean; 
  735.    Width_Chars_Property       : constant Glib.Properties.Property_Int; 
  736.    Xalign_Property            : constant Glib.Properties.Property_Float; 
  737.  
  738.    ---------------------- 
  739.    -- Style Properties -- 
  740.    ---------------------- 
  741.    --  The following properties can be changed through the gtk theme and 
  742.    --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property 
  743.  
  744.    --  <style_properties> 
  745.    --  Name:  Icon_Prelight_Property 
  746.    --  Type:  Boolean 
  747.    --  Descr: Whether activatable icons should prelight when hovered 
  748.    -- 
  749.    --  Name:  Progress_Border_Property 
  750.    --  Type:  Boxed 
  751.    --  Descr: Border around the progress bar 
  752.    -- 
  753.    --  Name:  State_Hint_Property 
  754.    --  Type:  Boolean 
  755.    --  Descr: Whether to pass a proper state when drawing shadow or background 
  756.    -- 
  757.    --  </style_properties> 
  758.  
  759.    Icon_Prelight_Property   : constant Glib.Properties.Property_Boolean; 
  760.    Progress_Border_Property : constant Glib.Properties.Property_Boxed; 
  761.    State_Hint_Property      : constant Glib.Properties.Property_Boolean; 
  762.  
  763.    ------------- 
  764.    -- Signals -- 
  765.    ------------- 
  766.  
  767.    --  <signals> 
  768.    --  The following new signals are defined for this widget: 
  769.    -- 
  770.    --  - "activate" 
  771.    --    procedure Handler (Ent : access Gtk_Entry_Record'Class); 
  772.    --    Called when the entry is activated, for instance when the user 
  773.    --    presses <enter> while in it 
  774.    -- 
  775.    --  - "populate_popup" 
  776.    --    procedure Handler 
  777.    --       (Ent  : access Gtk_Entry_Record'Class; 
  778.    --        Menu : access Gtk_Menu_Record'Class); 
  779.    --    ??? 
  780.    -- 
  781.    --  - "move_cursor" 
  782.    --    procedure Handler 
  783.    --       (Ent              : access Gtk_Entry_Record'Class; 
  784.    --        Step             : Gtk_Movement_Step; 
  785.    --        Amount           : Gint; 
  786.    --        Extend_Selection : Boolean); 
  787.    --    You should emit this signal to request that the cursor be moved. This 
  788.    --    is mostly used when connected to a keybinding, as is done by default 
  789.    --    for the arrow keys for instance. 
  790.    -- 
  791.    --  - "insert_at_cursor" 
  792.    --    procedure Handler 
  793.    --       (Ent  : access Gtk_Entry_Record'Class; 
  794.    --        Text : String); 
  795.    --    You should emit this signal to request that some text be inserted at 
  796.    --    the current cursor location. This is mostly used from key bindings. 
  797.    -- 
  798.    --  - "delete_from_cursor" 
  799.    --    procedure Handler 
  800.    --       (Ent              : access Gtk_Entry_Record'Class; 
  801.    --        Step             : Gtk_Movement_Step; 
  802.    --        Amount           : Gint); 
  803.    --    You should emit this signal to request that some text be delete from 
  804.    --    the cursor position. 
  805.    -- 
  806.    --  - "cut_clipboard" 
  807.    --    procedure Handler (Ent : access Gtk_Entry_Record'Class); 
  808.    --    You should emit this signal to request that the current selection be 
  809.    --    deleted and copied into the clipboard. This is mostly used from key 
  810.    --    bindings. 
  811.    -- 
  812.    --  - "copy_clipboard" 
  813.    --    procedure Handler (Ent : access Gtk_Entry_Record'Class); 
  814.    --    You should emit this signal to request that the current selection be 
  815.    --    copied into the clipboard. This is mostly used from key 
  816.    --    bindings. 
  817.    -- 
  818.    --  - "paste_clipboard" 
  819.    --    procedure Handler (Ent : access Gtk_Entry_Record'Class); 
  820.    --    You should emit this signal to request that the clipboard be inserted 
  821.    --    at the current cursor location. This is mostly used from key bindings. 
  822.    -- 
  823.    --  - "toggle_overwrite" 
  824.    --    procedure Handler (Ent : access Gtk_Entry_Record'Class); 
  825.    --    You should emit this signal to request that the insertion mode be 
  826.    --    changed. This is mostly used from a key binding, as is done by default 
  827.    --    for the Insert key. 
  828.    --  </signals> 
  829.  
  830.    Signal_Activate           : constant Glib.Signal_Name := 
  831.                                  "activate"; 
  832.    Signal_Backspace          : constant Glib.Signal_Name := 
  833.                                  "backspace"; 
  834.    Signal_Copy_Clipboard     : constant Glib.Signal_Name := 
  835.                                  "copy_clipboard"; 
  836.    Signal_Cut_Clipboard      : constant Glib.Signal_Name := 
  837.                                  "cut_clipboard"; 
  838.    Signal_Delete_From_Cursor : constant Glib.Signal_Name := 
  839.                                  "delete_from_cursor"; 
  840.    Signal_Insert_At_Cursor   : constant Glib.Signal_Name := 
  841.                                  "insert_at_cursor"; 
  842.    Signal_Move_Cursor        : constant Glib.Signal_Name := 
  843.                                  "move_cursor"; 
  844.    Signal_Paste_Clipboard    : constant Glib.Signal_Name := 
  845.                                  "paste_clipboard"; 
  846.    Signal_Populate_Popup     : constant Glib.Signal_Name := 
  847.                                  "populate_popup"; 
  848.    Signal_Toggle_Overwrite   : constant Glib.Signal_Name := 
  849.                                  "toggle_overwrite"; 
  850.  
  851. private 
  852.    type Gtk_Entry_Record is new 
  853.      Gtk.Editable.Gtk_Editable_Record with null record; 
  854.  
  855.    --  properties 
  856.    Activates_Default_Property : constant Glib.Properties.Property_Boolean := 
  857.      Glib.Properties.Build ("activates_default"); 
  858.    Caps_Lock_Warning_Property : constant Glib.Properties.Property_Boolean := 
  859.      Glib.Properties.Build ("caps-lock-warning"); 
  860.    Cursor_Position_Property : constant Glib.Properties.Property_Int := 
  861.      Glib.Properties.Build ("cursor-position"); 
  862.    Editable_Property : constant Glib.Properties.Property_Boolean := 
  863.      Glib.Properties.Build ("editable"); 
  864.    Has_Frame_Property : constant Glib.Properties.Property_Boolean := 
  865.      Glib.Properties.Build ("has-frame"); 
  866.    Im_Module_Property : constant Glib.Properties.Property_String := 
  867.      Glib.Properties.Build ("im-module"); 
  868.    Inner_Border_Property : constant Glib.Properties.Property_Boxed := 
  869.      Glib.Properties.Build ("inner-border"); 
  870.    Invisible_Char_Property : constant Glib.Properties.Property_Unichar := 
  871.      Glib.Properties.Build ("invisible_char"); 
  872.    Invisible_Char_Set_Property : constant Glib.Properties.Property_Boolean := 
  873.      Glib.Properties.Build ("invisible-char-set"); 
  874.    Max_Length_Property : constant Glib.Properties.Property_Int := 
  875.      Glib.Properties.Build ("max_length"); 
  876.    Overwrite_Mode_Property : constant Glib.Properties.Property_Boolean := 
  877.      Glib.Properties.Build ("overwrite-mode"); 
  878.    Primary_Icon_Activatable_Property : 
  879.      constant Glib.Properties.Property_Boolean := 
  880.      Glib.Properties.Build ("primary-icon-activatable"); 
  881.    Primary_Icon_Gicon_Property : constant Glib.Properties.Property_Object := 
  882.      Glib.Properties.Build ("primary-icon-gicon"); 
  883.    Primary_Icon_Name_Property : constant Glib.Properties.Property_String := 
  884.      Glib.Properties.Build ("primary-icon-name"); 
  885.    Primary_Icon_Pixbuf_Property : constant Glib.Properties.Property_Object := 
  886.      Glib.Properties.Build ("primary-icon-pixbuf"); 
  887.    Primary_Icon_Sensitive_Property : 
  888.      constant Glib.Properties.Property_Boolean := 
  889.      Glib.Properties.Build ("primary-icon-sensitive"); 
  890.    Primary_Icon_Stock_Property : constant Glib.Properties.Property_String := 
  891.      Glib.Properties.Build ("primary-icon-stock"); 
  892.    Primary_Icon_Storage_Type_Property : 
  893.      constant Glib.Properties.Property_Enum := 
  894.      Glib.Properties.Build ("primary-icon-storage-type"); 
  895.    Primary_Icon_Tooltip_Markup_Property : 
  896.      constant Glib.Properties.Property_String := 
  897.      Glib.Properties.Build ("primary-icon-tooltip-markup"); 
  898.    Primary_Icon_Tooltip_Text_Property : 
  899.      constant Glib.Properties.Property_String := 
  900.      Glib.Properties.Build ("primary-icon-tooltip-text"); 
  901.    Progress_Fraction_Property : constant Glib.Properties.Property_Double := 
  902.      Glib.Properties.Build ("progress-fraction"); 
  903.    Progress_Pulse_Step_Property : constant Glib.Properties.Property_Double := 
  904.      Glib.Properties.Build ("progress-pulse-step"); 
  905.    Scroll_Offset_Property : constant Glib.Properties.Property_Int := 
  906.      Glib.Properties.Build ("scroll_offset"); 
  907.    Secondary_Icon_Activatable_Property : 
  908.      constant Glib.Properties.Property_Boolean := 
  909.      Glib.Properties.Build ("secondary-icon-activatable"); 
  910.    Secondary_Icon_Gicon_Property : constant Glib.Properties.Property_Object := 
  911.      Glib.Properties.Build ("secondary-icon-gicon"); 
  912.    Secondary_Icon_Name_Property : constant Glib.Properties.Property_String := 
  913.      Glib.Properties.Build ("secondary-icon-name"); 
  914.    Secondary_Icon_Pixbuf_Property : constant Glib.Properties.Property_Object := 
  915.      Glib.Properties.Build ("secondary-icon-pixbuf"); 
  916.    Secondary_Icon_Sensitive_Property : 
  917.      constant Glib.Properties.Property_Boolean := 
  918.      Glib.Properties.Build ("secondary-icon-sensitive"); 
  919.    Secondary_Icon_Stock_Property : constant Glib.Properties.Property_String := 
  920.      Glib.Properties.Build ("secondary-icon-stock"); 
  921.    Secondary_Icon_Storage_Type_Property : 
  922.      constant Glib.Properties.Property_Enum := 
  923.      Glib.Properties.Build ("secondary-icon-storage-type"); 
  924.    Secondary_Icon_Tooltip_Markup_Property : 
  925.      constant Glib.Properties.Property_String := 
  926.      Glib.Properties.Build ("secondary-icon-tooltip-markup"); 
  927.    Secondary_Icon_Tooltip_Text_Property : 
  928.      constant Glib.Properties.Property_String := 
  929.      Glib.Properties.Build ("secondary-icon-tooltip-text"); 
  930.    Selection_Bound_Property : constant Glib.Properties.Property_Int := 
  931.      Glib.Properties.Build ("selection-bound"); 
  932.    Shadow_Type_Property : constant Glib.Properties.Property_Enum := 
  933.      Glib.Properties.Build ("shadow-type"); 
  934.    Text_Length_Property : constant Glib.Properties.Property_Uint := 
  935.      Glib.Properties.Build ("text-length"); 
  936.    Text_Position_Property : constant Glib.Properties.Property_Int := 
  937.      Glib.Properties.Build ("text_position"); 
  938.    Text_Property : constant Glib.Properties.Property_String := 
  939.      Glib.Properties.Build ("text"); 
  940.    Truncate_Multiline_Property : constant Glib.Properties.Property_Boolean := 
  941.      Glib.Properties.Build ("truncate-multiline"); 
  942.    Visibility_Property : constant Glib.Properties.Property_Boolean := 
  943.      Glib.Properties.Build ("visibility"); 
  944.    Width_Chars_Property : constant Glib.Properties.Property_Int := 
  945.      Glib.Properties.Build ("width_chars"); 
  946.    Xalign_Property : constant Glib.Properties.Property_Float := 
  947.      Glib.Properties.Build ("xalign"); 
  948.  
  949.    --  style properties 
  950.    Icon_Prelight_Property : constant Glib.Properties.Property_Boolean := 
  951.      Glib.Properties.Build ("icon-prelight"); 
  952.    Progress_Border_Property : constant Glib.Properties.Property_Boxed := 
  953.      Glib.Properties.Build ("progress-border"); 
  954.    State_Hint_Property : constant Glib.Properties.Property_Boolean := 
  955.      Glib.Properties.Build ("state-hint"); 
  956.  
  957.    pragma Import (C, Get_Type, "gtk_entry_get_type"); 
  958. end Gtk.GEntry; 
  959.  
  960. --  This subprogram was never bound, and is now obsolescent: 
  961. --  No binding: gtk_entry_select_region 
  962. --  No binding: gtk_entry_set_position