1. ------------------------------------------------------------------------------ 
  2. --                                                                          -- 
  3. --      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       -- 
  4. --                     Copyright (C) 2000-2014, 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.  
  24. --  <description> 
  25. --  GtkStyleProvider is an interface used to provide style information to a 
  26. --  Gtk.Style_Context.Gtk_Style_Context. See Gtk.Style_Context.Add_Provider and 
  27. --  Gtk.Style_Context.Add_Provider_For_Screen. 
  28. -- 
  29. --  </description> 
  30. pragma Ada_2005; 
  31.  
  32. pragma Warnings (Off, "*is already use-visible*"); 
  33. with Glib;        use Glib; 
  34. with Glib.Types;  use Glib.Types; 
  35. with Glib.Values; use Glib.Values; 
  36. with Gtk.Enums;   use Gtk.Enums; 
  37. with Gtk.Widget;  use Gtk.Widget; 
  38.  
  39. package Gtk.Style_Provider is 
  40.  
  41.    type Gtk_Style_Provider is new Glib.Types.GType_Interface; 
  42.    Null_Gtk_Style_Provider : constant Gtk_Style_Provider; 
  43.  
  44.    ------------------ 
  45.    -- Constructors -- 
  46.    ------------------ 
  47.  
  48.    function Get_Type return Glib.GType; 
  49.    pragma Import (C, Get_Type, "gtk_style_provider_get_type"); 
  50.  
  51.    ------------- 
  52.    -- Methods -- 
  53.    ------------- 
  54.  
  55.    procedure Get_Style_Property 
  56.       (Self  : Gtk_Style_Provider; 
  57.        Path  : Gtk.Widget.Gtk_Widget_Path; 
  58.        State : Gtk.Enums.Gtk_State_Flags; 
  59.        Pspec : in out Glib.Param_Spec; 
  60.        Value : out Glib.Values.GValue; 
  61.        Found : out Boolean); 
  62.    --  Looks up a widget style property as defined by Provider for the widget 
  63.    --  represented by Path. 
  64.    --  Since: gtk+ 3.0 
  65.    --  "path": Gtk.Widget.Gtk_Widget_Path to query 
  66.    --  "state": state to query the style property for 
  67.    --  "pspec": The Glib.Param_Spec to query 
  68.    --  "value": return location for the property value 
  69.  
  70.    ---------------------- 
  71.    -- GtkAda additions -- 
  72.    ---------------------- 
  73.  
  74.    subtype Priority is Glib.Guint; 
  75.  
  76.    Priority_Fallback : constant Priority := 1; 
  77.    --  Used when no theme is defined 
  78.  
  79.    Priority_Theme : constant Priority := 200; 
  80.    --  Used for style information provided by the theme 
  81.  
  82.    Priority_Settings : constant Priority := 400; 
  83.    --  Used for information provided via Gtk_Settings 
  84.  
  85.    Priority_Application : constant Priority := 600; 
  86.    --  For application-specific information 
  87.  
  88.    Priority_User : constant Priority := 800; 
  89.    --  Used for the style information from ~/.gtk-3.0.css 
  90.  
  91.    ---------------- 
  92.    -- Interfaces -- 
  93.    ---------------- 
  94.    --  This class implements several interfaces. See Glib.Types 
  95.    -- 
  96.    --  - "Gtk_Style_Provider" 
  97.  
  98.    function "+" (W : Gtk_Style_Provider) return Gtk_Style_Provider; 
  99.    pragma Inline ("+"); 
  100.  
  101. private 
  102.  
  103. Null_Gtk_Style_Provider : constant Gtk_Style_Provider := 
  104.    Gtk_Style_Provider (Glib.Types.Null_Interface); 
  105. end Gtk.Style_Provider;