1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --                    Copyright (C) 2010, 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. --  A Gtk_Cell_Renderer_Accel displays a keyboard accelerator (i.e. a key 
  26. --  combination like <Control>-a). If the cell renderer is editable, the 
  27. --  accelerator can be changed by simply typing the new combination. 
  28. -- 
  29. --  The Gtk_Cell_Renderer_Accel cell renderer was added in GTK+ 2.10. 
  30. --  </description> 
  31. --  <c_version>2.16.6</c_version> 
  32.  
  33. with Glib.Properties; 
  34. with Gtk.Cell_Renderer_Text; 
  35.  
  36. package Gtk.Cell_Renderer_Accel is 
  37.  
  38.    type Gtk_Cell_Renderer_Accel_Record is 
  39.      new Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record with private; 
  40.    type Gtk_Cell_Renderer_Accel is 
  41.      access all Gtk_Cell_Renderer_Accel_Record'Class; 
  42.  
  43.    procedure Gtk_New (Widget : out Gtk_Cell_Renderer_Accel); 
  44.    --  Creates a new Gtk_Cell_Renderer_Accel. 
  45.  
  46.    procedure Initialize 
  47.      (Widget : access Gtk_Cell_Renderer_Accel_Record'Class); 
  48.    --  Creates a new Gtk_Cell_Renderer_Accel. 
  49.  
  50.    function Get_Type return GType; 
  51.    --  Return the internal value associated with this widget. 
  52.  
  53.    ---------------- 
  54.    -- Properties -- 
  55.    ---------------- 
  56.  
  57.    --  <properties> 
  58.    --  Name:  Accel_Key_Property 
  59.    --  Type:  Uint 
  60.    --  Descr: The keyval of the accelerator 
  61.    -- 
  62.    --  Name:  Accel_Mode_Property 
  63.    --  Type:  Enum 
  64.    --  Descr: The type of accelerators 
  65.    -- 
  66.    --  Name:  Accel_Mods_Property 
  67.    --  Type:  Flags 
  68.    --  Descr: The modifier mask of the accelerator 
  69.    -- 
  70.    --  Name:  Keycode_Property 
  71.    --  Type:  Uint 
  72.    --  Descr: The hardware keycode of the accelerator 
  73.    -- 
  74.    --  </properties> 
  75.  
  76.    Accel_Key_Property  : constant Glib.Properties.Property_Uint; 
  77.    Accel_Mode_Property : constant Glib.Properties.Property_Enum; 
  78.    --  Accel_Mods_Property : constant Glib.Properties.Property_Flags; 
  79.    Keycode_Property    : constant Glib.Properties.Property_Uint; 
  80.  
  81. private 
  82.    type Gtk_Cell_Renderer_Accel_Record is 
  83.      new Gtk.Cell_Renderer_Text.Gtk_Cell_Renderer_Text_Record with null record; 
  84.  
  85.    Accel_Key_Property : constant Glib.Properties.Property_Uint := 
  86.      Glib.Properties.Build ("accel-key"); 
  87.    Accel_Mode_Property : constant Glib.Properties.Property_Enum := 
  88.      Glib.Properties.Build ("accel-mode"); 
  89.    --  Accel_Mods_Property : constant Glib.Properties.Property_Flags := 
  90.    --    Glib.Properties.Build ("accel-mods"); 
  91.    Keycode_Property : constant Glib.Properties.Property_Uint := 
  92.      Glib.Properties.Build ("keycode"); 
  93.  
  94.    pragma Import (C, Get_Type, "gtk_cell_renderer_accel_get_type"); 
  95. end Gtk.Cell_Renderer_Accel;