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. -- As a special exception, if other files instantiate generics from  -- 
  22. -- this unit, or you link this unit with other files to produce an   -- 
  23. -- executable, this  unit  does not  by itself cause  the resulting  -- 
  24. -- executable to be covered by the GNU General Public License. This  -- 
  25. -- exception does not however invalidate any other reasons why the   -- 
  26. -- executable file  might be covered by the  GNU Public License.     -- 
  27. ----------------------------------------------------------------------- 
  28.  
  29. --  <description> 
  30. --  The Gtk_Cell_Editable interface must be implemented for widgets to be 
  31. --  usable when editing the contents of a Gtk_Tree_View cell. 
  32. --  </description> 
  33. --  <c_version>2.8.17</c_version> 
  34. --  <group>Trees and Lists</group> 
  35.  
  36. with Gtk; 
  37. with Gdk.Event; 
  38. with Glib.Types; 
  39.  
  40. package Gtk.Cell_Editable is 
  41.  
  42.    type Gtk_Cell_Editable is new Glib.Types.GType_Interface; 
  43.  
  44.    function Get_Type return Gtk.Gtk_Type; 
  45.    --  Return the internal value associated with a Gtk_Cell_Editable. 
  46.  
  47.    procedure Start_Editing 
  48.      (Cell_Editable : Gtk_Cell_Editable; 
  49.       Event         : Gdk.Event.Gdk_Event); 
  50.    --  Begin editing on a Gtk_Cell_Editable. 
  51.    --  Event is the Gdk_Event that began the editing process. It may be null, 
  52.    --  if the instance that editing was initiated through programatic means. 
  53.  
  54.    procedure Editing_Done (Cell_Editable : Gtk_Cell_Editable); 
  55.    --  Emit the "editing_done" signal. 
  56.    --  This signal is a sign for the cell renderer to update its value from the 
  57.    --  cell. 
  58.  
  59.    procedure Remove_Widget (Cell_Editable : Gtk_Cell_Editable); 
  60.    --  Emit the "remove_widget" signal. 
  61.    --  This signal is meant to indicate that the cell is finished editing, and 
  62.    --  the widget may now be destroyed. 
  63.  
  64.    ------------- 
  65.    -- Signals -- 
  66.    ------------- 
  67.  
  68.    --  <signals> 
  69.    --  The following new signals are defined for this widget: 
  70.    -- 
  71.    --  - "editing_done" 
  72.    --    procedure Handler (Editable : Gtk_Cell_Editable); 
  73.    --    Should be emitted when the user has finished editing 
  74.    -- 
  75.    --  - "remove_widget" 
  76.    --    procedure Handler (Editable : Gtk_Cell_Editable); 
  77.    --    Emitted when the widget is about to be removed 
  78.    -- 
  79.    --  </signals> 
  80.  
  81.    Signal_Editing_Done  : constant Glib.Signal_Name := "editing_done"; 
  82.    Signal_Remove_Widget : constant Glib.Signal_Name := "remove_widget"; 
  83.  
  84. private 
  85.    type Gtk_Cell_Editable_Record is 
  86.      new Glib.Object.GObject_Record with null record; 
  87.  
  88.    pragma Import (C, Get_Type,      "gtk_cell_editable_get_type"); 
  89.    pragma Import (C, Start_Editing, "gtk_cell_editable_start_editing"); 
  90.    pragma Import (C, Editing_Done,  "gtk_cell_editable_editing_done"); 
  91.    pragma Import (C, Remove_Widget, "gtk_cell_editable_remove_widget"); 
  92. end Gtk.Cell_Editable;