1. ----------------------------------------------------------------------- 
  2. --              GtkAda - Ada95 binding for Gtk+/Gnome                -- 
  3. --                                                                   -- 
  4. --                Copyright (C) 2001-2007 AdaCore                    -- 
  5. --                                                                   -- 
  6. -- This library is free software; you can redistribute it and/or     -- 
  7. -- modify it under the terms of the GNU General Public               -- 
  8. -- License as published by the Free Software Foundation; either      -- 
  9. -- version 2 of the License, or (at your option) any later version.  -- 
  10. --                                                                   -- 
  11. -- This library is distributed in the hope that it will be useful,   -- 
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of    -- 
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU -- 
  14. -- General Public License for more details.                          -- 
  15. --                                                                   -- 
  16. -- You should have received a copy of the GNU General Public         -- 
  17. -- License along with this library; if not, write to the             -- 
  18. -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      -- 
  19. -- Boston, MA 02111-1307, USA.                                       -- 
  20. --                                                                   -- 
  21. -- -- -- -- -- -- -- -- -- -- -- --
  22. ----------------------------------------------------------------------- 
  23.  
  24. --  <description> 
  25. --  The Gtk_Cell_Editable interface must be implemented for widgets to be 
  26. --  usable when editing the contents of a Gtk_Tree_View cell. 
  27. --  </description> 
  28. --  <c_version>2.8.17</c_version> 
  29. --  <group>Trees and Lists</group> 
  30.  
  31. with Gtk; 
  32. with Gdk.Event; 
  33. with Glib.Types; 
  34.  
  35. package Gtk.Cell_Editable is 
  36.  
  37.    type Gtk_Cell_Editable is new Glib.Types.GType_Interface; 
  38.  
  39.    function Get_Type return Gtk.Gtk_Type; 
  40.    --  Return the internal value associated with a Gtk_Cell_Editable. 
  41.  
  42.    procedure Start_Editing 
  43.      (Cell_Editable : Gtk_Cell_Editable; 
  44.       Event         : Gdk.Event.Gdk_Event); 
  45.    --  Begin editing on a Gtk_Cell_Editable. 
  46.    --  Event is the Gdk_Event that began the editing process. It may be null, 
  47.    --  if the instance that editing was initiated through programatic means. 
  48.  
  49.    procedure Editing_Done (Cell_Editable : Gtk_Cell_Editable); 
  50.    --  Emit the "editing_done" signal. 
  51.    --  This signal is a sign for the cell renderer to update its value from the 
  52.    --  cell. 
  53.  
  54.    procedure Remove_Widget (Cell_Editable : Gtk_Cell_Editable); 
  55.    --  Emit the "remove_widget" signal. 
  56.    --  This signal is meant to indicate that the cell is finished editing, and 
  57.    --  the widget may now be destroyed. 
  58.  
  59.    ------------- 
  60.    -- Signals -- 
  61.    ------------- 
  62.  
  63.    --  <signals> 
  64.    --  The following new signals are defined for this widget: 
  65.    -- 
  66.    --  - "editing_done" 
  67.    --    procedure Handler (Editable : Gtk_Cell_Editable); 
  68.    --    Should be emitted when the user has finished editing 
  69.    -- 
  70.    --  - "remove_widget" 
  71.    --    procedure Handler (Editable : Gtk_Cell_Editable); 
  72.    --    Emitted when the widget is about to be removed 
  73.    -- 
  74.    --  </signals> 
  75.  
  76.    Signal_Editing_Done  : constant Glib.Signal_Name := "editing_done"; 
  77.    Signal_Remove_Widget : constant Glib.Signal_Name := "remove_widget"; 
  78.  
  79. private 
  80.    type Gtk_Cell_Editable_Record is 
  81.      new Glib.Object.GObject_Record with null record; 
  82.  
  83.    pragma Import (C, Get_Type,      "gtk_cell_editable_get_type"); 
  84.    pragma Import (C, Start_Editing, "gtk_cell_editable_start_editing"); 
  85.    pragma Import (C, Editing_Done,  "gtk_cell_editable_editing_done"); 
  86.    pragma Import (C, Remove_Widget, "gtk_cell_editable_remove_widget"); 
  87. end Gtk.Cell_Editable;