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. --  Gtk.Style_Context.Gtk_Style_Context is an object that stores styling 
  26. --  information affecting a widget defined by Gtk.Widget.Gtk_Widget_Path. 
  27. -- 
  28. --  In order to construct the final style information, 
  29. --  Gtk.Style_Context.Gtk_Style_Context queries information from all attached 
  30. --  Gtk_Style_Providers. Style providers can be either attached explicitly to 
  31. --  the context through Gtk.Style_Context.Add_Provider, or to the screen 
  32. --  through Gtk.Style_Context.Add_Provider_For_Screen. The resulting style is a 
  33. --  combination of all providers' information in priority order. 
  34. -- 
  35. --  For GTK+ widgets, any Gtk.Style_Context.Gtk_Style_Context returned by 
  36. --  gtk_widget_get_style_context will already have a 
  37. --  Gtk.Widget.Gtk_Widget_Path, a Gdk.Screen.Gdk_Screen and RTL/LTR information 
  38. --  set. The style context will be also updated automatically if any of these 
  39. --  settings change on the widget. 
  40. -- 
  41. --  If you are using the theming layer standalone, you will need to set a 
  42. --  widget path and a screen yourself to the created style context through 
  43. --  Gtk.Style_Context.Set_Path and Gtk.Style_Context.Set_Screen, as well as 
  44. --  updating the context yourself using Gtk.Style_Context.Invalidate whenever 
  45. --  any of the conditions change, such as a change in the 
  46. --  Gtk.Settings.Gtk_Settings:gtk-theme-name setting or a hierarchy change in 
  47. --  the rendered widget. 
  48. -- 
  49. --  == Transition animations == 
  50. -- 
  51. --  Gtk.Style_Context.Gtk_Style_Context has built-in support for state change 
  52. --  transitions. Note that these animations respect the 
  53. --  Gtk.Settings.Gtk_Settings:gtk-enable-animations setting. 
  54. -- 
  55. --  For simple widgets where state changes affect the whole widget area, 
  56. --  calling Gtk.Style_Context.Notify_State_Change with a null region is 
  57. --  sufficient to trigger the transition animation. And GTK+ already does that 
  58. --  when Gtk.Widget.Set_State or Gtk.Widget.Set_State_Flags are called. 
  59. -- 
  60. --  If a widget needs to declare several animatable regions (i.e. not 
  61. --  affecting the whole widget area), its Gtk.Widget.Gtk_Widget::draw signal 
  62. --  handler needs to wrap the render operations for the different regions with 
  63. --  calls to Gtk.Style_Context.Push_Animatable_Region and 
  64. --  Gtk.Style_Context.Pop_Animatable_Region. These functions take an identifier 
  65. --  for the region which must be unique within the style context. For simple 
  66. --  widgets with a fixed set of animatable regions, using an enumeration works 
  67. --  well: 
  68. -- 
  69. --  == Using an enumeration to identify animatable regions == 
  70. -- 
  71. --    enum { 
  72. --       REGION_ENTRY, 
  73. --       REGION_BUTTON_UP, 
  74. --       REGION_BUTTON_DOWN 
  75. --    }; 
  76. --    ... 
  77. --    gboolean 
  78. --    spin_button_draw (GtkWidget *widget, 
  79. --       cairo_t   *cr) 
  80. --    { 
  81. --       GtkStyleContext *context; 
  82. --       context = gtk_widget_get_style_context (widget); 
  83. --       gtk_style_context_push_animatable_region (context, 
  84. --          GUINT_TO_POINTER (REGION_ENTRY)); 
  85. --       gtk_render_background (cr, 0, 0, 100, 30); 
  86. --       gtk_render_frame (cr, 0, 0, 100, 30); 
  87. --       gtk_style_context_pop_animatable_region (context); 
  88. --       ... 
  89. --    } 
  90. -- 
  91. --  For complex widgets with an arbitrary number of animatable regions, it is 
  92. --  up to the implementation to come up with a way to uniquely identify each 
  93. --  animatable region. Using pointers to internal structs is one way to achieve 
  94. --  this: 
  95. -- 
  96. --  == Using struct pointers to identify animatable regions == 
  97. -- 
  98. --    void 
  99. --    notebook_draw_tab (GtkWidget    *widget, 
  100. --       NotebookPage *page, 
  101. --       cairo_t      *cr) 
  102. --    { 
  103. --       gtk_style_context_push_animatable_region (context, page); 
  104. --       gtk_render_extension (cr, page->x, page->y, page->width, page->height); 
  105. --       gtk_style_context_pop_animatable_region (context); 
  106. --    } 
  107. -- 
  108. --  The widget also needs to notify the style context about a state change for 
  109. --  a given animatable region so the animation is triggered. 
  110. -- 
  111. --  == Triggering a state change animation on a region == 
  112. -- 
  113. --    gboolean 
  114. --    notebook_motion_notify (GtkWidget      *widget, 
  115. --       GdkEventMotion *event) 
  116. --    { 
  117. --       GtkStyleContext *context; 
  118. --       NotebookPage *page; 
  119. --       context = gtk_widget_get_style_context (widget); 
  120. --       page = find_page_under_pointer (widget, event); 
  121. --       gtk_style_context_notify_state_change (context, 
  122. --          gtk_widget_get_window (widget), 
  123. --          page, 
  124. --          GTK_STATE_PRELIGHT, 
  125. --          TRUE); 
  126. --       ... 
  127. --    } 
  128. -- 
  129. --  Gtk.Style_Context.Notify_State_Change accepts null region IDs as a special 
  130. --  value, in this case, the whole widget area will be updated by the 
  131. --  animation. 
  132. -- 
  133. --  == Style classes and regions == 
  134. -- 
  135. --  Widgets can add style classes to their context, which can be used to 
  136. --  associate different styles by class (see <xref 
  137. --  linkend="gtkcssprovider-selectors"/>). Theme engines can also use style 
  138. --  classes to vary their rendering. GTK+ has a number of predefined style 
  139. --  classes: GTK_STYLE_CLASS_CELL, GTK_STYLE_CLASS_ENTRY, 
  140. --  GTK_STYLE_CLASS_BUTTON, GTK_STYLE_CLASS_COMBOBOX_ENTRY, 
  141. --  GTK_STYLE_CLASS_CALENDAR, GTK_STYLE_CLASS_SLIDER, 
  142. --  GTK_STYLE_CLASS_BACKGROUND, GTK_STYLE_CLASS_RUBBERBAND, 
  143. --  GTK_STYLE_CLASS_TOOLTIP, GTK_STYLE_CLASS_MENU, GTK_STYLE_CLASS_MENUBAR, 
  144. --  GTK_STYLE_CLASS_MENUITEM, GTK_STYLE_CLASS_TOOLBAR, 
  145. --  GTK_STYLE_CLASS_PRIMARY_TOOLBAR, GTK_STYLE_CLASS_INLINE_TOOLBAR, 
  146. --  GTK_STYLE_CLASS_RADIO, GTK_STYLE_CLASS_CHECK, GTK_STYLE_CLASS_TROUGH, 
  147. --  GTK_STYLE_CLASS_SCROLLBAR, GTK_STYLE_CLASS_SCALE, 
  148. --  GTK_STYLE_CLASS_SCALE_HAS_MARKS_ABOVE, 
  149. --  GTK_STYLE_CLASS_SCALE_HAS_MARKS_BELOW, GTK_STYLE_CLASS_HEADER, 
  150. --  GTK_STYLE_CLASS_ACCELERATOR, GTK_STYLE_CLASS_GRIP, GTK_STYLE_CLASS_DOCK, 
  151. --  GTK_STYLE_CLASS_PROGRESSBAR, GTK_STYLE_CLASS_SPINNER, 
  152. --  GTK_STYLE_CLASS_EXPANDER, GTK_STYLE_CLASS_SPINBUTTON, 
  153. --  GTK_STYLE_CLASS_NOTEBOOK, GTK_STYLE_CLASS_VIEW, GTK_STYLE_CLASS_SIDEBAR, 
  154. --  GTK_STYLE_CLASS_IMAGE, GTK_STYLE_CLASS_HIGHLIGHT, GTK_STYLE_CLASS_FRAME, 
  155. --  GTK_STYLE_CLASS_DND, GTK_STYLE_CLASS_PANE_SEPARATOR, 
  156. --  GTK_STYLE_CLASS_SEPARATOR, GTK_STYLE_CLASS_INFO, GTK_STYLE_CLASS_WARNING, 
  157. --  GTK_STYLE_CLASS_QUESTION, GTK_STYLE_CLASS_ERROR, 
  158. --  GTK_STYLE_CLASS_HORIZONTAL, GTK_STYLE_CLASS_VERTICAL, GTK_STYLE_CLASS_TOP, 
  159. --  GTK_STYLE_CLASS_BOTTOM, GTK_STYLE_CLASS_LEFT, GTK_STYLE_CLASS_RIGHT, 
  160. -- 
  161. --  Widgets can also add regions with flags to their context. The regions used 
  162. --  by GTK+ widgets are: 
  163. -- 
  164. --  <thead> 
  165. --  Region 
  166. -- 
  167. --  Flags 
  168. -- 
  169. --  Macro 
  170. -- 
  171. --  Used by </thead> 
  172. -- 
  173. --  row 
  174. -- 
  175. --  even, odd 
  176. -- 
  177. --  GTK_STYLE_REGION_ROW 
  178. -- 
  179. --  Gtk.Tree_View.Gtk_Tree_View 
  180. -- 
  181. --  column 
  182. -- 
  183. --  first, last, sorted 
  184. -- 
  185. --  GTK_STYLE_REGION_COLUMN 
  186. -- 
  187. --  Gtk.Tree_View.Gtk_Tree_View 
  188. -- 
  189. --  column-header 
  190. -- 
  191. --  
  192. -- 
  193. --  GTK_STYLE_REGION_COLUMN_HEADER 
  194. -- 
  195. --  
  196. -- 
  197. --  tab 
  198. -- 
  199. --  even, odd, first, last 
  200. -- 
  201. --  GTK_STYLE_REGION_TAB 
  202. -- 
  203. --  Gtk.Notebook.Gtk_Notebook 
  204. -- 
  205. --  == Custom styling in UI libraries and applications == 
  206. -- 
  207. --  If you are developing a library with custom Gtk.Widget.Gtk_Widget<!-- -->s 
  208. --  that render differently than standard components, you may need to add a 
  209. --  Gtk.Style_Provider.Gtk_Style_Provider yourself with the 
  210. --  GTK_STYLE_PROVIDER_PRIORITY_FALLBACK priority, either a 
  211. --  Gtk.Css_Provider.Gtk_Css_Provider or a custom object implementing the 
  212. --  Gtk.Style_Provider.Gtk_Style_Provider interface. This way theming engines 
  213. --  may still attempt to style your UI elements in a different way if needed 
  214. --  so. 
  215. -- 
  216. --  If you are using custom styling on an applications, you probably want then 
  217. --  to make your style information prevail to the theme's, so you must use a 
  218. --  Gtk.Style_Provider.Gtk_Style_Provider with the 
  219. --  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION priority, keep in mind that the 
  220. --  user settings in 
  221. --  '<replaceable>XDG_CONFIG_HOME</replaceable>/gtk-3.0/gtk.css' will still 
  222. --  take precedence over your changes, as it uses the 
  223. --  GTK_STYLE_PROVIDER_PRIORITY_USER priority. 
  224. -- 
  225. --  If a custom theming engine is needed, you probably want to implement a 
  226. --  Gtk.Style_Provider.Gtk_Style_Provider yourself so it points to your 
  227. --  Gtk.Theming_Engine.Gtk_Theming_Engine implementation, as 
  228. --  Gtk.Css_Provider.Gtk_Css_Provider uses Gtk.Theming_Engine.Load which loads 
  229. --  the theming engine module from the standard paths. 
  230. -- 
  231. -- 
  232. --  </description> 
  233. pragma Ada_2005; 
  234.  
  235. pragma Warnings (Off, "*is already use-visible*"); 
  236. with Cairo;              use Cairo; 
  237. with Gdk;                use Gdk; 
  238. with Gdk.Frame_Clock;    use Gdk.Frame_Clock; 
  239. with Gdk.Pixbuf;         use Gdk.Pixbuf; 
  240. with Gdk.RGBA;           use Gdk.RGBA; 
  241. with Gdk.Screen;         use Gdk.Screen; 
  242. with Glib;               use Glib; 
  243. with Glib.Object;        use Glib.Object; 
  244. with Glib.Properties;    use Glib.Properties; 
  245. with Glib.Values;        use Glib.Values; 
  246. with Gtk.Css_Section;    use Gtk.Css_Section; 
  247. with Gtk.Enums;          use Gtk.Enums; 
  248. with Gtk.Style;          use Gtk.Style; 
  249. with Gtk.Style_Provider; use Gtk.Style_Provider; 
  250. with Gtk.Widget;         use Gtk.Widget; 
  251. with Pango.Font;         use Pango.Font; 
  252. with Pango.Layout;       use Pango.Layout; 
  253.  
  254. package Gtk.Style_Context is 
  255.  
  256.    type Gtk_Style_Context_Record is new GObject_Record with null record; 
  257.    type Gtk_Style_Context is access all Gtk_Style_Context_Record'Class; 
  258.  
  259.    ------------------ 
  260.    -- Constructors -- 
  261.    ------------------ 
  262.  
  263.    procedure Gtk_New (Self : out Gtk_Style_Context); 
  264.    procedure Initialize 
  265.       (Self : not null access Gtk_Style_Context_Record'Class); 
  266.    --  Creates a standalone Gtk.Style_Context.Gtk_Style_Context, this style 
  267.    --  context won't be attached to any widget, so you may want to call 
  268.    --  Gtk.Style_Context.Set_Path yourself. 
  269.    --  Note: This function is only useful when using the theming layer 
  270.    --  separated from GTK+, if you are using 
  271.    --  Gtk.Style_Context.Gtk_Style_Context to theme Gtk.Widget.Gtk_Widget<!-- 
  272.    --  -->s, use gtk_widget_get_style_context in order to get a style context 
  273.    --  ready to theme the widget. 
  274.  
  275.    function Gtk_Style_Context_New return Gtk_Style_Context; 
  276.    --  Creates a standalone Gtk.Style_Context.Gtk_Style_Context, this style 
  277.    --  context won't be attached to any widget, so you may want to call 
  278.    --  Gtk.Style_Context.Set_Path yourself. 
  279.    --  Note: This function is only useful when using the theming layer 
  280.    --  separated from GTK+, if you are using 
  281.    --  Gtk.Style_Context.Gtk_Style_Context to theme Gtk.Widget.Gtk_Widget<!-- 
  282.    --  -->s, use gtk_widget_get_style_context in order to get a style context 
  283.    --  ready to theme the widget. 
  284.  
  285.    function Get_Type return Glib.GType; 
  286.    pragma Import (C, Get_Type, "gtk_style_context_get_type"); 
  287.  
  288.    ------------- 
  289.    -- Methods -- 
  290.    ------------- 
  291.  
  292.    procedure Add_Class 
  293.       (Self       : not null access Gtk_Style_Context_Record; 
  294.        Class_Name : UTF8_String); 
  295.    --  Adds a style class to Context, so posterior calls to 
  296.    --  gtk_style_context_get or any of the gtk_render_* functions will make use 
  297.    --  of this new class for styling. 
  298.    --  In the CSS file format, a Gtk.GEntry.Gtk_Entry defining an "entry" 
  299.    --  class, would be matched by: 
  300.    --    GtkEntry.entry { ... } 
  301.    --  While any widget defining an "entry" class would be matched by: 
  302.    --    .entry { ... } 
  303.    --  Since: gtk+ 3.0 
  304.    --  "class_name": class name to use in styling 
  305.  
  306.    procedure Add_Provider 
  307.       (Self     : not null access Gtk_Style_Context_Record; 
  308.        Provider : Gtk.Style_Provider.Gtk_Style_Provider; 
  309.        Priority : Guint); 
  310.    --  Adds a style provider to Context, to be used in style construction. 
  311.    --  Note that a style provider added by this function only affects the style 
  312.    --  of the widget to which Context belongs. If you want to affect the style 
  313.    --  of all widgets, use Gtk.Style_Context.Add_Provider_For_Screen. 
  314.    --  Note: 
  315.    --  If both priorities are the same, A 
  316.    --  Gtk.Style_Provider.Gtk_Style_Provider added through this function takes 
  317.    --  precedence over another added through 
  318.    --  Gtk.Style_Context.Add_Provider_For_Screen. 
  319.    --  Since: gtk+ 3.0 
  320.    --  "provider": a Gtk.Style_Provider.Gtk_Style_Provider 
  321.    --  "priority": the priority of the style provider. The lower it is, the 
  322.    --  earlier it will be used in the style construction. Typically this will 
  323.    --  be in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and 
  324.    --  GTK_STYLE_PROVIDER_PRIORITY_USER 
  325.  
  326.    procedure Add_Region 
  327.       (Self        : not null access Gtk_Style_Context_Record; 
  328.        Region_Name : UTF8_String; 
  329.        Flags       : Gtk.Enums.Gtk_Region_Flags); 
  330.    --  Adds a region to Context, so posterior calls to gtk_style_context_get 
  331.    --  or any of the gtk_render_* functions will make use of this new region 
  332.    --  for styling. 
  333.    --  In the CSS file format, a Gtk.Tree_View.Gtk_Tree_View defining a "row" 
  334.    --  region, would be matched by: 
  335.    --    GtkTreeView row { ... } 
  336.    --  Pseudo-classes are used for matching Flags, so the two following rules: 
  337.    --    GtkTreeView row:nth-child(even) { ... } 
  338.    --    GtkTreeView row:nth-child(odd) { ... } 
  339.    --  would apply to even and odd rows, respectively. 
  340.    --  Note: 
  341.    --  Region names must only contain lowercase letters and '-', starting 
  342.    --  always with a lowercase letter. 
  343.    --  Since: gtk+ 3.0 
  344.    --  "region_name": region name to use in styling 
  345.    --  "flags": flags that apply to the region 
  346.  
  347.    procedure Cancel_Animations 
  348.       (Self      : not null access Gtk_Style_Context_Record; 
  349.        Region_Id : System.Address); 
  350.    pragma Obsolescent (Cancel_Animations); 
  351.    --  Stops all running animations for Region_Id and all animatable regions 
  352.    --  underneath. 
  353.    --  A null Region_Id will stop all ongoing animations in Context, when 
  354.    --  dealing with a Gtk.Style_Context.Gtk_Style_Context obtained through 
  355.    --  gtk_widget_get_style_context, this is normally done for you in all 
  356.    --  circumstances you would expect all widget to be stopped, so this should 
  357.    --  be only used in complex widgets with different animatable regions. 
  358.    --  Since: gtk+ 3.0 
  359.    --  Deprecated since 3.6, This function does nothing. 
  360.    --  "region_id": animatable region to stop, or null. See 
  361.    --  Gtk.Style_Context.Push_Animatable_Region 
  362.  
  363.    procedure Get_Background_Color 
  364.       (Self  : not null access Gtk_Style_Context_Record; 
  365.        State : Gtk.Enums.Gtk_State_Flags; 
  366.        Color : out Gdk.RGBA.Gdk_RGBA); 
  367.    --  Gets the background color for a given state. 
  368.    --  Since: gtk+ 3.0 
  369.    --  "state": state to retrieve the color for 
  370.    --  "color": return value for the background color 
  371.  
  372.    procedure Get_Border 
  373.       (Self   : not null access Gtk_Style_Context_Record; 
  374.        State  : Gtk.Enums.Gtk_State_Flags; 
  375.        Border : out Gtk.Style.Gtk_Border); 
  376.    --  Gets the border for a given state as a Gtk.Style.Gtk_Border. See 
  377.    --  GTK_STYLE_PROPERTY_BORDER_WIDTH. 
  378.    --  Since: gtk+ 3.0 
  379.    --  "state": state to retrieve the border for 
  380.    --  "border": return value for the border settings 
  381.  
  382.    procedure Get_Border_Color 
  383.       (Self  : not null access Gtk_Style_Context_Record; 
  384.        State : Gtk.Enums.Gtk_State_Flags; 
  385.        Color : out Gdk.RGBA.Gdk_RGBA); 
  386.    --  Gets the border color for a given state. 
  387.    --  Since: gtk+ 3.0 
  388.    --  "state": state to retrieve the color for 
  389.    --  "color": return value for the border color 
  390.  
  391.    procedure Get_Color 
  392.       (Self  : not null access Gtk_Style_Context_Record; 
  393.        State : Gtk.Enums.Gtk_State_Flags; 
  394.        Color : out Gdk.RGBA.Gdk_RGBA); 
  395.    --  Gets the foreground color for a given state. 
  396.    --  Since: gtk+ 3.0 
  397.    --  "state": state to retrieve the color for 
  398.    --  "color": return value for the foreground color 
  399.  
  400.    function Get_Direction 
  401.       (Self : not null access Gtk_Style_Context_Record) 
  402.        return Gtk.Enums.Gtk_Text_Direction; 
  403.    pragma Obsolescent (Get_Direction); 
  404.    --  Returns the widget direction used for rendering. 
  405.    --  Since: gtk+ 3.0 
  406.    --  Deprecated since 3.8, Use Gtk.Style_Context.Get_State and check for 
  407.    --  GTK_STATE_FLAG_DIR_LTR and GTK_STATE_FLAG_DIR_RTL instead. 
  408.  
  409.    procedure Set_Direction 
  410.       (Self      : not null access Gtk_Style_Context_Record; 
  411.        Direction : Gtk.Enums.Gtk_Text_Direction); 
  412.    pragma Obsolescent (Set_Direction); 
  413.    --  Sets the reading direction for rendering purposes. 
  414.    --  If you are using a Gtk.Style_Context.Gtk_Style_Context returned from 
  415.    --  gtk_widget_get_style_context, you do not need to call this yourself. 
  416.    --  Since: gtk+ 3.0 
  417.    --  Deprecated since 3.8, Use Gtk.Style_Context.Set_State with 
  418.    --  GTK_STATE_FLAG_DIR_LTR and GTK_STATE_FLAG_DIR_RTL instead. 
  419.    --  "direction": the new direction. 
  420.  
  421.    function Get_Font 
  422.       (Self  : not null access Gtk_Style_Context_Record; 
  423.        State : Gtk.Enums.Gtk_State_Flags) 
  424.        return Pango.Font.Pango_Font_Description; 
  425.    pragma Obsolescent (Get_Font); 
  426.    --  Returns the font description for a given state. The returned object is 
  427.    --  const and will remain valid until the 
  428.    --  Gtk.Style_Context.Gtk_Style_Context::changed signal happens. 
  429.    --  Since: gtk+ 3.0 
  430.    --  Deprecated since 3.8, Use gtk_style_context_get for "font" or 
  431.    --  subproperties instead. 
  432.    --  "state": state to retrieve the font for 
  433.  
  434.    function Get_Frame_Clock 
  435.       (Self : not null access Gtk_Style_Context_Record) 
  436.        return Gdk.Frame_Clock.Gdk_Frame_Clock; 
  437.    --  Returns the Gdk.Frame_Clock.Gdk_Frame_Clock to which Context is 
  438.    --  attached. 
  439.    --  Since: gtk+ 3.8 
  440.  
  441.    procedure Set_Frame_Clock 
  442.       (Self        : not null access Gtk_Style_Context_Record; 
  443.        Frame_Clock : not null access Gdk.Frame_Clock.Gdk_Frame_Clock_Record'Class); 
  444.    --  Attaches Context to the given frame clock. 
  445.    --  The frame clock is used for the timing of animations. 
  446.    --  If you are using a Gtk.Style_Context.Gtk_Style_Context returned from 
  447.    --  gtk_widget_get_style_context, you do not need to call this yourself. 
  448.    --  Since: gtk+ 3.8 
  449.    --  "frame_clock": a Gdk.Frame_Clock.Gdk_Frame_Clock 
  450.  
  451.    function Get_Junction_Sides 
  452.       (Self : not null access Gtk_Style_Context_Record) 
  453.        return Gtk.Enums.Gtk_Junction_Sides; 
  454.    --  Returns the sides where rendered elements connect visually with others. 
  455.    --  Since: gtk+ 3.0 
  456.  
  457.    procedure Set_Junction_Sides 
  458.       (Self  : not null access Gtk_Style_Context_Record; 
  459.        Sides : Gtk.Enums.Gtk_Junction_Sides); 
  460.    --  Sets the sides where rendered elements (mostly through 
  461.    --  Gtk.Style_Context.Render_Frame) will visually connect with other visual 
  462.    --  elements. 
  463.    --  This is merely a hint that may or may not be honored by theming 
  464.    --  engines. 
  465.    --  Container widgets are expected to set junction hints as appropriate for 
  466.    --  their children, so it should not normally be necessary to call this 
  467.    --  function manually. 
  468.    --  Since: gtk+ 3.0 
  469.    --  "sides": sides where rendered elements are visually connected to other 
  470.    --  elements 
  471.  
  472.    procedure Get_Margin 
  473.       (Self   : not null access Gtk_Style_Context_Record; 
  474.        State  : Gtk.Enums.Gtk_State_Flags; 
  475.        Margin : out Gtk.Style.Gtk_Border); 
  476.    --  Gets the margin for a given state as a Gtk.Style.Gtk_Border. See 
  477.    --  GTK_STYLE_PROPERTY_MARGIN. 
  478.    --  Since: gtk+ 3.0 
  479.    --  "state": state to retrieve the border for 
  480.    --  "margin": return value for the margin settings 
  481.  
  482.    procedure Get_Padding 
  483.       (Self    : not null access Gtk_Style_Context_Record; 
  484.        State   : Gtk.Enums.Gtk_State_Flags; 
  485.        Padding : out Gtk.Style.Gtk_Border); 
  486.    --  Gets the padding for a given state as a Gtk.Style.Gtk_Border. See 
  487.    --  GTK_STYLE_PROPERTY_PADDING. 
  488.    --  Since: gtk+ 3.0 
  489.    --  "state": state to retrieve the padding for 
  490.    --  "padding": return value for the padding settings 
  491.  
  492.    function Get_Parent 
  493.       (Self : not null access Gtk_Style_Context_Record) 
  494.        return Gtk_Style_Context; 
  495.    --  Gets the parent context set via Gtk.Style_Context.Set_Parent. See that 
  496.    --  function for details. 
  497.    --  Since: gtk+ 3.4 
  498.  
  499.    procedure Set_Parent 
  500.       (Self   : not null access Gtk_Style_Context_Record; 
  501.        Parent : access Gtk_Style_Context_Record'Class); 
  502.    --  Sets the parent style context for Context. The parent style context is 
  503.    --  used to implement <ulink 
  504.    --  url="http://www.w3.org/TR/css3-cascade/inheritance">inheritance</ulink> 
  505.    --  of properties. 
  506.    --  If you are using a Gtk.Style_Context.Gtk_Style_Context returned from 
  507.    --  gtk_widget_get_style_context, the parent will be set for you. 
  508.    --  Since: gtk+ 3.4 
  509.    --  "parent": the new parent or null 
  510.  
  511.    function Get_Path 
  512.       (Self : not null access Gtk_Style_Context_Record) 
  513.        return Gtk.Widget.Gtk_Widget_Path; 
  514.    --  Returns the widget path used for style matching. 
  515.    --  Since: gtk+ 3.0 
  516.  
  517.    procedure Set_Path 
  518.       (Self : not null access Gtk_Style_Context_Record; 
  519.        Path : Gtk.Widget.Gtk_Widget_Path); 
  520.    --  Sets the Gtk.Widget.Gtk_Widget_Path used for style matching. As a 
  521.    --  consequence, the style will be regenerated to match the new given path. 
  522.    --  If you are using a Gtk.Style_Context.Gtk_Style_Context returned from 
  523.    --  gtk_widget_get_style_context, you do not need to call this yourself. 
  524.    --  Since: gtk+ 3.0 
  525.    --  "path": a Gtk.Widget.Gtk_Widget_Path 
  526.  
  527.    procedure Get_Property 
  528.       (Self     : not null access Gtk_Style_Context_Record; 
  529.        Property : UTF8_String; 
  530.        State    : Gtk.Enums.Gtk_State_Flags; 
  531.        Value    : out Glib.Values.GValue); 
  532.    --  Gets a style property from Context for the given state. 
  533.    --  When Value is no longer needed, g_value_unset must be called to free 
  534.    --  any allocated memory. 
  535.    --  Since: gtk+ 3.0 
  536.    --  "property": style property name 
  537.    --  "state": state to retrieve the property value for 
  538.    --  "value": return location for the style property value 
  539.  
  540.    function Get_Screen 
  541.       (Self : not null access Gtk_Style_Context_Record) 
  542.        return Gdk.Screen.Gdk_Screen; 
  543.    --  Returns the Gdk.Screen.Gdk_Screen to which Context is attached. 
  544.  
  545.    procedure Set_Screen 
  546.       (Self   : not null access Gtk_Style_Context_Record; 
  547.        Screen : not null access Gdk.Screen.Gdk_Screen_Record'Class); 
  548.    --  Attaches Context to the given screen. 
  549.    --  The screen is used to add style information from 'global' style 
  550.    --  providers, such as the screens Gtk.Settings.Gtk_Settings instance. 
  551.    --  If you are using a Gtk.Style_Context.Gtk_Style_Context returned from 
  552.    --  gtk_widget_get_style_context, you do not need to call this yourself. 
  553.    --  Since: gtk+ 3.0 
  554.    --  "screen": a Gdk.Screen.Gdk_Screen 
  555.  
  556.    function Get_Section 
  557.       (Self     : not null access Gtk_Style_Context_Record; 
  558.        Property : UTF8_String) return Gtk.Css_Section.Gtk_Css_Section; 
  559.    --  Queries the location in the CSS where Property was defined for the 
  560.    --  current Context. Note that the state to be queried is taken from 
  561.    --  Gtk.Style_Context.Get_State. 
  562.    --  If the location is not available, null will be returned. The location 
  563.    --  might not be available for various reasons, such as the property being 
  564.    --  overridden, Property not naming a supported CSS property or tracking of 
  565.    --  definitions being disabled for performance reasons. 
  566.    --  Shorthand CSS properties cannot be queried for a location and will 
  567.    --  always return null. 
  568.    --  "property": style property name 
  569.  
  570.    function Get_State 
  571.       (Self : not null access Gtk_Style_Context_Record) 
  572.        return Gtk.Enums.Gtk_State_Flags; 
  573.    --  Returns the state used when rendering. 
  574.    --  Since: gtk+ 3.0 
  575.  
  576.    procedure Set_State 
  577.       (Self  : not null access Gtk_Style_Context_Record; 
  578.        Flags : Gtk.Enums.Gtk_State_Flags); 
  579.    --  Sets the state to be used when rendering with any of the gtk_render_* 
  580.    --  functions. 
  581.    --  Since: gtk+ 3.0 
  582.    --  "flags": state to represent 
  583.  
  584.    procedure Get_Style_Property 
  585.       (Self          : not null access Gtk_Style_Context_Record; 
  586.        Property_Name : UTF8_String; 
  587.        Value         : in out Glib.Values.GValue); 
  588.    --  Gets the value for a widget style property. 
  589.    --  When Value is no longer needed, g_value_unset must be called to free 
  590.    --  any allocated memory. 
  591.    --  "property_name": the name of the widget style property 
  592.    --  "value": Return location for the property value 
  593.  
  594.    function Has_Class 
  595.       (Self       : not null access Gtk_Style_Context_Record; 
  596.        Class_Name : UTF8_String) return Boolean; 
  597.    --  Returns True if Context currently has defined the given class name 
  598.    --  Since: gtk+ 3.0 
  599.    --  "class_name": a class name 
  600.  
  601.    procedure Has_Region 
  602.       (Self         : not null access Gtk_Style_Context_Record; 
  603.        Region_Name  : UTF8_String; 
  604.        Flags_Return : out Gtk.Enums.Gtk_Region_Flags; 
  605.        Is_Defined   : out Boolean); 
  606.    --  Returns True if Context has the region defined. If Flags_Return is not 
  607.    --  null, it is set to the flags affecting the region. 
  608.    --  Since: gtk+ 3.0 
  609.    --  "region_name": a region name 
  610.    --  "flags_return": return location for region flags 
  611.  
  612.    procedure Invalidate (Self : not null access Gtk_Style_Context_Record); 
  613.    --  Invalidates Context style information, so it will be reconstructed 
  614.    --  again. 
  615.    --  If you're using a Gtk.Style_Context.Gtk_Style_Context returned from 
  616.    --  gtk_widget_get_style_context, you do not need to call this yourself. 
  617.    --  Since: gtk+ 3.0 
  618.  
  619.    function List_Classes 
  620.       (Self : not null access Gtk_Style_Context_Record) 
  621.        return Gtk.Enums.String_List.Glist; 
  622.    --  Returns the list of classes currently defined in Context. 
  623.    --  Since: gtk+ 3.0 
  624.  
  625.    function List_Regions 
  626.       (Self : not null access Gtk_Style_Context_Record) 
  627.        return Gtk.Enums.String_List.Glist; 
  628.    --  Returns the list of regions currently defined in Context. 
  629.    --  Since: gtk+ 3.0 
  630.  
  631.    procedure Lookup_Color 
  632.       (Self       : not null access Gtk_Style_Context_Record; 
  633.        Color_Name : UTF8_String; 
  634.        Color      : out Gdk.RGBA.Gdk_RGBA; 
  635.        Found      : out Boolean); 
  636.    --  Looks up and resolves a color name in the Context color map. 
  637.    --  "color_name": color name to lookup 
  638.    --  "color": Return location for the looked up color 
  639.  
  640.    procedure Notify_State_Change 
  641.       (Self        : not null access Gtk_Style_Context_Record; 
  642.        Window      : Gdk.Gdk_Window; 
  643.        Region_Id   : System.Address; 
  644.        State       : Gtk.Enums.Gtk_State_Type; 
  645.        State_Value : Boolean); 
  646.    pragma Obsolescent (Notify_State_Change); 
  647.    --  Notifies a state change on Context, so if the current style makes use 
  648.    --  of transition animations, one will be started so all rendered elements 
  649.    --  under Region_Id are animated for state State being set to value 
  650.    --  State_Value. 
  651.    --  The Window parameter is used in order to invalidate the rendered area 
  652.    --  as the animation runs, so make sure it is the same window that is being 
  653.    --  rendered on by the gtk_render_* functions. 
  654.    --  If Region_Id is null, all rendered elements using Context will be 
  655.    --  affected by this state transition. 
  656.    --  As a practical example, a Gtk.Button.Gtk_Button notifying a state 
  657.    --  transition on the prelight state: 
  658.    --    gtk_style_context_notify_state_change (context, 
  659.    --       gtk_widget_get_window (widget), 
  660.    --       NULL, 
  661.    --       GTK_STATE_PRELIGHT, 
  662.    --       button->in_button); 
  663.    --  Can be handled in the CSS file like this: 
  664.    --    GtkButton { 
  665.    --       background-color: &num;f00 
  666.    --    } 
  667.    --    GtkButton:hover { 
  668.    --       background-color: &num;fff; 
  669.    --       transition: 200ms linear 
  670.    --    } 
  671.    --  This combination will animate the button background from red to white 
  672.    --  if a pointer enters the button, and back to red if the pointer leaves 
  673.    --  the button. 
  674.    --  Note that State is used when finding the transition parameters, which 
  675.    --  is why the style places the transition under the :hover pseudo-class. 
  676.    --  Since: gtk+ 3.0 
  677.    --  Deprecated since 3.6, This function does nothing. 
  678.    --  "window": a Gdk.Gdk_Window 
  679.    --  "region_id": animatable region to notify on, or null. See 
  680.    --  Gtk.Style_Context.Push_Animatable_Region 
  681.    --  "state": state to trigger transition for 
  682.    --  "state_value": True if State is the state we are changing to, False if 
  683.    --  we are changing away from it 
  684.  
  685.    procedure Pop_Animatable_Region 
  686.       (Self : not null access Gtk_Style_Context_Record); 
  687.    pragma Obsolescent (Pop_Animatable_Region); 
  688.    --  Pops an animatable region from Context. See 
  689.    --  Gtk.Style_Context.Push_Animatable_Region. 
  690.    --  Since: gtk+ 3.0 
  691.    --  Deprecated since 3.6, This function does nothing. 
  692.  
  693.    procedure Push_Animatable_Region 
  694.       (Self      : not null access Gtk_Style_Context_Record; 
  695.        Region_Id : System.Address); 
  696.    pragma Obsolescent (Push_Animatable_Region); 
  697.    --  Pushes an animatable region, so all further gtk_render_* calls between 
  698.    --  this call and the following Gtk.Style_Context.Pop_Animatable_Region will 
  699.    --  potentially show transition animations for this region if 
  700.    --  Gtk.Style_Context.Notify_State_Change is called for a given state, and 
  701.    --  the current theme/style defines transition animations for state changes. 
  702.    --  The Region_Id used must be unique in Context so the theming engine can 
  703.    --  uniquely identify rendered elements subject to a state transition. 
  704.    --  Since: gtk+ 3.0 
  705.    --  Deprecated since 3.6, This function does nothing. 
  706.    --  "region_id": unique identifier for the animatable region 
  707.  
  708.    procedure Remove_Class 
  709.       (Self       : not null access Gtk_Style_Context_Record; 
  710.        Class_Name : UTF8_String); 
  711.    --  Removes Class_Name from Context. 
  712.    --  Since: gtk+ 3.0 
  713.    --  "class_name": class name to remove 
  714.  
  715.    procedure Remove_Provider 
  716.       (Self     : not null access Gtk_Style_Context_Record; 
  717.        Provider : Gtk.Style_Provider.Gtk_Style_Provider); 
  718.    --  Removes Provider from the style providers list in Context. 
  719.    --  Since: gtk+ 3.0 
  720.    --  "provider": a Gtk.Style_Provider.Gtk_Style_Provider 
  721.  
  722.    procedure Remove_Region 
  723.       (Self        : not null access Gtk_Style_Context_Record; 
  724.        Region_Name : UTF8_String); 
  725.    --  Removes a region from Context. 
  726.    --  Since: gtk+ 3.0 
  727.    --  "region_name": region name to unset 
  728.  
  729.    procedure Restore (Self : not null access Gtk_Style_Context_Record); 
  730.    --  Restores Context state to a previous stage. See Gtk.Style_Context.Save. 
  731.    --  Since: gtk+ 3.0 
  732.  
  733.    procedure Save (Self : not null access Gtk_Style_Context_Record); 
  734.    --  Saves the Context state, so all modifications done through 
  735.    --  Gtk.Style_Context.Add_Class, Gtk.Style_Context.Remove_Class, 
  736.    --  Gtk.Style_Context.Add_Region, Gtk.Style_Context.Remove_Region or 
  737.    --  Gtk.Style_Context.Set_Junction_Sides can be reverted in one go through 
  738.    --  Gtk.Style_Context.Restore. 
  739.    --  Since: gtk+ 3.0 
  740.  
  741.    procedure Scroll_Animations 
  742.       (Self   : not null access Gtk_Style_Context_Record; 
  743.        Window : Gdk.Gdk_Window; 
  744.        Dx     : Gint; 
  745.        Dy     : Gint); 
  746.    pragma Obsolescent (Scroll_Animations); 
  747.    --  This function is analogous to Gdk.Window.Scroll, and should be called 
  748.    --  together with it so the invalidation areas for any ongoing animation are 
  749.    --  scrolled together with it. 
  750.    --  Since: gtk+ 3.0 
  751.    --  Deprecated since 3.6, This function does nothing. 
  752.    --  "window": a Gdk.Gdk_Window used previously in 
  753.    --  Gtk.Style_Context.Notify_State_Change 
  754.    --  "dx": Amount to scroll in the X axis 
  755.    --  "dy": Amount to scroll in the Y axis 
  756.  
  757.    procedure Set_Background 
  758.       (Self   : not null access Gtk_Style_Context_Record; 
  759.        Window : Gdk.Gdk_Window); 
  760.    --  Sets the background of Window to the background pattern or color 
  761.    --  specified in Context for its current state. 
  762.    --  Since: gtk+ 3.0 
  763.    --  "window": a Gdk.Gdk_Window 
  764.  
  765.    procedure State_Is_Running 
  766.       (Self       : not null access Gtk_Style_Context_Record; 
  767.        State      : Gtk.Enums.Gtk_State_Type; 
  768.        Progress   : out Gdouble; 
  769.        Is_Running : out Boolean); 
  770.    pragma Obsolescent (State_Is_Running); 
  771.    --  Returns True if there is a transition animation running for the current 
  772.    --  region (see Gtk.Style_Context.Push_Animatable_Region). 
  773.    --  If Progress is not null, the animation progress will be returned there, 
  774.    --  0.0 means the state is closest to being unset, while 1.0 means it's 
  775.    --  closest to being set. This means transition animation will run from 0 to 
  776.    --  1 when State is being set and from 1 to 0 when it's being unset. 
  777.    --  Since: gtk+ 3.0 
  778.    --  Deprecated since 3.6, This function always returns False 
  779.    --  "state": a widget state 
  780.    --  "progress": return location for the transition progress 
  781.  
  782.    ---------------------- 
  783.    -- GtkAda additions -- 
  784.    ---------------------- 
  785.  
  786.    function Get_Style_Context 
  787.      (Widget : not null access Gtk_Widget_Record'Class) 
  788.    return Gtk_Style_Context; 
  789.    --  Returns the style context associated to Widget. 
  790.    --  must not be freed. 
  791.  
  792.    --------------- 
  793.    -- Functions -- 
  794.    --------------- 
  795.  
  796.    procedure Add_Provider_For_Screen 
  797.       (Screen   : not null access Gdk.Screen.Gdk_Screen_Record'Class; 
  798.        Provider : Gtk.Style_Provider.Gtk_Style_Provider; 
  799.        Priority : Guint); 
  800.    --  Adds a global style provider to Screen, which will be used in style 
  801.    --  construction for all Gtk_Style_Contexts under Screen. 
  802.    --  GTK+ uses this to make styling information from 
  803.    --  Gtk.Settings.Gtk_Settings available. 
  804.    --  Note: 
  805.    --  If both priorities are the same, A 
  806.    --  Gtk.Style_Provider.Gtk_Style_Provider added through 
  807.    --  Gtk.Style_Context.Add_Provider takes precedence over another added 
  808.    --  through this function. 
  809.    --  Since: gtk+ 3.0 
  810.    --  "screen": a Gdk.Screen.Gdk_Screen 
  811.    --  "provider": a Gtk.Style_Provider.Gtk_Style_Provider 
  812.    --  "priority": the priority of the style provider. The lower it is, the 
  813.    --  earlier it will be used in the style construction. Typically this will 
  814.    --  be in the range between GTK_STYLE_PROVIDER_PRIORITY_FALLBACK and 
  815.    --  GTK_STYLE_PROVIDER_PRIORITY_USER 
  816.  
  817.    procedure Remove_Provider_For_Screen 
  818.       (Screen   : not null access Gdk.Screen.Gdk_Screen_Record'Class; 
  819.        Provider : Gtk.Style_Provider.Gtk_Style_Provider); 
  820.    --  Removes Provider from the global style providers list in Screen. 
  821.    --  Since: gtk+ 3.0 
  822.    --  "screen": a Gdk.Screen.Gdk_Screen 
  823.    --  "provider": a Gtk.Style_Provider.Gtk_Style_Provider 
  824.  
  825.    procedure Reset_Widgets 
  826.       (Screen : not null access Gdk.Screen.Gdk_Screen_Record'Class); 
  827.    --  This function recomputes the styles for all widgets under a particular 
  828.    --  Gdk.Screen.Gdk_Screen. This is useful when some global parameter has 
  829.    --  changed that affects the appearance of all widgets, because when a 
  830.    --  widget gets a new style, it will both redraw and recompute any cached 
  831.    --  information about its appearance. As an example, it is used when the 
  832.    --  color scheme changes in the related Gtk.Settings.Gtk_Settings object. 
  833.    --  Since: gtk+ 3.0 
  834.    --  "screen": a Gdk.Screen.Gdk_Screen 
  835.  
  836.    procedure Render_Handle 
  837.       (Context : not null access Gtk_Style_Context_Record'Class; 
  838.        Cr      : Cairo.Cairo_Context; 
  839.        X       : Gdouble; 
  840.        Y       : Gdouble; 
  841.        Width   : Gdouble; 
  842.        Height  : Gdouble); 
  843.    --  Renders a handle (as in Gtk.Handle_Box.Gtk_Handle_Box, 
  844.    --  Gtk.Paned.Gtk_Paned and Gtk.Window.Gtk_Window<!-- -->'s resize grip), in 
  845.    --  the rectangle determined by X, Y, Width, Height. 
  846.    --  == Handles rendered for the paned and grip classes == 
  847.    --  <inlinegraphic fileref="handles.png" format="PNG"/> 
  848.    --  Since: gtk+ 3.0 
  849.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  850.    --  "cr": a cairo_t 
  851.    --  "x": X origin of the rectangle 
  852.    --  "y": Y origin of the rectangle 
  853.    --  "width": rectangle width 
  854.    --  "height": rectangle height 
  855.  
  856.    procedure Render_Check 
  857.       (Context : not null access Gtk_Style_Context_Record'Class; 
  858.        Cr      : Cairo.Cairo_Context; 
  859.        X       : Gdouble; 
  860.        Y       : Gdouble; 
  861.        Width   : Gdouble; 
  862.        Height  : Gdouble); 
  863.    --  Renders a checkmark (as in a Gtk.Check_Button.Gtk_Check_Button). 
  864.    --  The Gtk.Enums.Gtk_State_Flag_Active state determines whether the check 
  865.    --  is on or off, and Gtk.Enums.Gtk_State_Flag_Inconsistent determines 
  866.    --  whether it should be marked as undefined. 
  867.    --  == Typical checkmark rendering == 
  868.    --  <inlinegraphic fileref="checks.png" format="PNG"/> 
  869.    --  Since: gtk+ 3.0 
  870.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  871.    --  "cr": a cairo_t 
  872.    --  "x": X origin of the rectangle 
  873.    --  "y": Y origin of the rectangle 
  874.    --  "width": rectangle width 
  875.    --  "height": rectangle height 
  876.  
  877.    procedure Render_Option 
  878.       (Context : not null access Gtk_Style_Context_Record'Class; 
  879.        Cr      : Cairo.Cairo_Context; 
  880.        X       : Gdouble; 
  881.        Y       : Gdouble; 
  882.        Width   : Gdouble; 
  883.        Height  : Gdouble); 
  884.    --  Renders an option mark (as in a Gtk.Radio_Button.Gtk_Radio_Button), the 
  885.    --  Gtk.Enums.Gtk_State_Flag_Active state will determine whether the option 
  886.    --  is on or off, and Gtk.Enums.Gtk_State_Flag_Inconsistent whether it 
  887.    --  should be marked as undefined. 
  888.    --  == Typical option mark rendering == 
  889.    --  <inlinegraphic fileref="options.png" format="PNG"/> 
  890.    --  Since: gtk+ 3.0 
  891.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  892.    --  "cr": a cairo_t 
  893.    --  "x": X origin of the rectangle 
  894.    --  "y": Y origin of the rectangle 
  895.    --  "width": rectangle width 
  896.    --  "height": rectangle height 
  897.  
  898.    procedure Render_Arrow 
  899.       (Context : not null access Gtk_Style_Context_Record'Class; 
  900.        Cr      : Cairo.Cairo_Context; 
  901.        Angle   : Gdouble; 
  902.        X       : Gdouble; 
  903.        Y       : Gdouble; 
  904.        Size    : Gdouble); 
  905.    --  Renders an arrow pointing to Angle. 
  906.    --  == Typical arrow rendering at 0, 1&solidus;2 &pi;, &pi; and 3&solidus;2 
  907.    --  &pi; == 
  908.    --  <inlinegraphic fileref="arrows.png" format="PNG"/> 
  909.    --  Since: gtk+ 3.0 
  910.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  911.    --  "cr": a cairo_t 
  912.    --  "angle": arrow angle from 0 to 2 * G_PI, being 0 the arrow pointing to 
  913.    --  the north 
  914.    --  "x": X origin of the render area 
  915.    --  "y": Y origin of the render area 
  916.    --  "size": square side for render area 
  917.  
  918.    procedure Render_Background 
  919.       (Context : not null access Gtk_Style_Context_Record'Class; 
  920.        Cr      : Cairo.Cairo_Context; 
  921.        X       : Gdouble; 
  922.        Y       : Gdouble; 
  923.        Width   : Gdouble; 
  924.        Height  : Gdouble); 
  925.    --  Renders the background of an element. 
  926.    --  <title>Typical background rendering, showing the effect of 
  927.    --  'background-image', 'border-width' and 'border-radius'</title> 
  928.    --  <inlinegraphic fileref="background.png" format="PNG"/> 
  929.    --  Since: gtk+ 3.0. 
  930.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  931.    --  "cr": a cairo_t 
  932.    --  "x": X origin of the rectangle 
  933.    --  "y": Y origin of the rectangle 
  934.    --  "width": rectangle width 
  935.    --  "height": rectangle height 
  936.  
  937.    procedure Render_Frame 
  938.       (Context : not null access Gtk_Style_Context_Record'Class; 
  939.        Cr      : Cairo.Cairo_Context; 
  940.        X       : Gdouble; 
  941.        Y       : Gdouble; 
  942.        Width   : Gdouble; 
  943.        Height  : Gdouble); 
  944.    --  Renders a frame around the rectangle defined by X, Y, Width, Height. 
  945.    --  <title>Examples of frame rendering, showing the effect of 
  946.    --  'border-image', 'border-color', 'border-width', 'border-radius' and 
  947.    --  junctions</title> <inlinegraphic fileref="frames.png" format="PNG"/> 
  948.    --  Since: gtk+ 3.0 
  949.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  950.    --  "cr": a cairo_t 
  951.    --  "x": X origin of the rectangle 
  952.    --  "y": Y origin of the rectangle 
  953.    --  "width": rectangle width 
  954.    --  "height": rectangle height 
  955.  
  956.    procedure Render_Expander 
  957.       (Context : not null access Gtk_Style_Context_Record'Class; 
  958.        Cr      : Cairo.Cairo_Context; 
  959.        X       : Gdouble; 
  960.        Y       : Gdouble; 
  961.        Width   : Gdouble; 
  962.        Height  : Gdouble); 
  963.    --  Renders an expander (as used in Gtk.Tree_View.Gtk_Tree_View and 
  964.    --  Gtk.Expander.Gtk_Expander) in the area defined by X, Y, Width, Height. 
  965.    --  The state Gtk.Enums.Gtk_State_Flag_Active determines whether the 
  966.    --  expander is collapsed or expanded. 
  967.    --  == Typical expander rendering == 
  968.    --  <inlinegraphic fileref="expanders.png" format="PNG"/> 
  969.    --  Since: gtk+ 3.0 
  970.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  971.    --  "cr": a cairo_t 
  972.    --  "x": X origin of the rectangle 
  973.    --  "y": Y origin of the rectangle 
  974.    --  "width": rectangle width 
  975.    --  "height": rectangle height 
  976.  
  977.    procedure Render_Focus 
  978.       (Context : not null access Gtk_Style_Context_Record'Class; 
  979.        Cr      : Cairo.Cairo_Context; 
  980.        X       : Gdouble; 
  981.        Y       : Gdouble; 
  982.        Width   : Gdouble; 
  983.        Height  : Gdouble); 
  984.    --  Renders a focus indicator on the rectangle determined by X, Y, Width, 
  985.    --  Height. 
  986.    --  == Typical focus rendering == 
  987.    --  <inlinegraphic fileref="focus.png" format="PNG"/> 
  988.    --  Since: gtk+ 3.0 
  989.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  990.    --  "cr": a cairo_t 
  991.    --  "x": X origin of the rectangle 
  992.    --  "y": Y origin of the rectangle 
  993.    --  "width": rectangle width 
  994.    --  "height": rectangle height 
  995.  
  996.    procedure Render_Layout 
  997.       (Context : not null access Gtk_Style_Context_Record'Class; 
  998.        Cr      : Cairo.Cairo_Context; 
  999.        X       : Gdouble; 
  1000.        Y       : Gdouble; 
  1001.        Layout  : not null access Pango.Layout.Pango_Layout_Record'Class); 
  1002.    --  Renders Layout on the coordinates X, Y 
  1003.    --  Since: gtk+ 3.0 
  1004.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1005.    --  "cr": a cairo_t 
  1006.    --  "x": X origin 
  1007.    --  "y": Y origin 
  1008.    --  "layout": the Pango.Layout.Pango_Layout to render 
  1009.  
  1010.    procedure Render_Line 
  1011.       (Context : not null access Gtk_Style_Context_Record'Class; 
  1012.        Cr      : Cairo.Cairo_Context; 
  1013.        X0      : Gdouble; 
  1014.        Y0      : Gdouble; 
  1015.        X1      : Gdouble; 
  1016.        Y1      : Gdouble); 
  1017.    --  Renders a line from (x0, y0) to (x1, y1). 
  1018.    --  Since: gtk+ 3.0 
  1019.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1020.    --  "cr": a cairo_t 
  1021.    --  "x0": X coordinate for the origin of the line 
  1022.    --  "y0": Y coordinate for the origin of the line 
  1023.    --  "x1": X coordinate for the end of the line 
  1024.    --  "y1": Y coordinate for the end of the line 
  1025.  
  1026.    procedure Render_Slider 
  1027.       (Context     : not null access Gtk_Style_Context_Record'Class; 
  1028.        Cr          : Cairo.Cairo_Context; 
  1029.        X           : Gdouble; 
  1030.        Y           : Gdouble; 
  1031.        Width       : Gdouble; 
  1032.        Height      : Gdouble; 
  1033.        Orientation : Gtk.Enums.Gtk_Orientation); 
  1034.    --  Renders a slider (as in Gtk.Scale.Gtk_Scale) in the rectangle defined 
  1035.    --  by X, Y, Width, Height. Orientation defines whether the slider is 
  1036.    --  vertical or horizontal. 
  1037.    --  == Typical slider rendering == 
  1038.    --  <inlinegraphic fileref="sliders.png" format="PNG"/> 
  1039.    --  Since: gtk+ 3.0 
  1040.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1041.    --  "cr": a cairo_t 
  1042.    --  "x": X origin of the rectangle 
  1043.    --  "y": Y origin of the rectangle 
  1044.    --  "width": rectangle width 
  1045.    --  "height": rectangle height 
  1046.    --  "orientation": orientation of the slider 
  1047.  
  1048.    procedure Render_Frame_Gap 
  1049.       (Context  : not null access Gtk_Style_Context_Record'Class; 
  1050.        Cr       : Cairo.Cairo_Context; 
  1051.        X        : Gdouble; 
  1052.        Y        : Gdouble; 
  1053.        Width    : Gdouble; 
  1054.        Height   : Gdouble; 
  1055.        Gap_Side : Gtk.Enums.Gtk_Position_Type; 
  1056.        Xy0_Gap  : Gdouble; 
  1057.        Xy1_Gap  : Gdouble); 
  1058.    --  Renders a frame around the rectangle defined by (X, Y, Width, Height), 
  1059.    --  leaving a gap on one side. Xy0_Gap and Xy1_Gap will mean X coordinates 
  1060.    --  for Gtk.Enums.Pos_Top and Gtk.Enums.Pos_Bottom gap sides, and Y 
  1061.    --  coordinates for Gtk.Enums.Pos_Left and Gtk.Enums.Pos_Right. 
  1062.    --  == Typical rendering of a frame with a gap == 
  1063.    --  <inlinegraphic fileref="frame-gap.png" format="PNG"/> 
  1064.    --  Since: gtk+ 3.0 
  1065.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1066.    --  "cr": a cairo_t 
  1067.    --  "x": X origin of the rectangle 
  1068.    --  "y": Y origin of the rectangle 
  1069.    --  "width": rectangle width 
  1070.    --  "height": rectangle height 
  1071.    --  "gap_side": side where the gap is 
  1072.    --  "xy0_gap": initial coordinate (X or Y depending on Gap_Side) for the 
  1073.    --  gap 
  1074.    --  "xy1_gap": end coordinate (X or Y depending on Gap_Side) for the gap 
  1075.  
  1076.    procedure Render_Extension 
  1077.       (Context  : not null access Gtk_Style_Context_Record'Class; 
  1078.        Cr       : Cairo.Cairo_Context; 
  1079.        X        : Gdouble; 
  1080.        Y        : Gdouble; 
  1081.        Width    : Gdouble; 
  1082.        Height   : Gdouble; 
  1083.        Gap_Side : Gtk.Enums.Gtk_Position_Type); 
  1084.    --  Renders a extension (as in a Gtk.Notebook.Gtk_Notebook tab) in the 
  1085.    --  rectangle defined by X, Y, Width, Height. The side where the extension 
  1086.    --  connects to is defined by Gap_Side. 
  1087.    --  == Typical extension rendering == 
  1088.    --  <inlinegraphic fileref="extensions.png" format="PNG"/> 
  1089.    --  Since: gtk+ 3.0 
  1090.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1091.    --  "cr": a cairo_t 
  1092.    --  "x": X origin of the rectangle 
  1093.    --  "y": Y origin of the rectangle 
  1094.    --  "width": rectangle width 
  1095.    --  "height": rectangle height 
  1096.    --  "gap_side": side where the gap is 
  1097.  
  1098.    procedure Render_Activity 
  1099.       (Context : not null access Gtk_Style_Context_Record'Class; 
  1100.        Cr      : Cairo.Cairo_Context; 
  1101.        X       : Gdouble; 
  1102.        Y       : Gdouble; 
  1103.        Width   : Gdouble; 
  1104.        Height  : Gdouble); 
  1105.    --  Renders an activity area (Such as in Gtk.Spinner.Gtk_Spinner or the 
  1106.    --  fill line in Gtk.GRange.Gtk_Range), the state 
  1107.    --  Gtk.Enums.Gtk_State_Flag_Active determines whether there is activity 
  1108.    --  going on. 
  1109.    --  Since: gtk+ 3.0 
  1110.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1111.    --  "cr": a cairo_t 
  1112.    --  "x": X origin of the rectangle 
  1113.    --  "y": Y origin of the rectangle 
  1114.    --  "width": rectangle width 
  1115.    --  "height": rectangle height 
  1116.  
  1117.    procedure Render_Icon 
  1118.       (Context : not null access Gtk_Style_Context_Record'Class; 
  1119.        Cr      : Cairo.Cairo_Context; 
  1120.        Pixbuf  : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class; 
  1121.        X       : Gdouble; 
  1122.        Y       : Gdouble); 
  1123.    --  Renders the icon in Pixbuf at the specified X and Y coordinates. 
  1124.    --  Since: gtk+ 3.2 
  1125.    --  "context": a Gtk.Style_Context.Gtk_Style_Context 
  1126.    --  "cr": a cairo_t 
  1127.    --  "pixbuf": a Gdk.Pixbuf.Gdk_Pixbuf containing the icon to draw 
  1128.    --  "x": X position for the Pixbuf 
  1129.    --  "y": Y position for the Pixbuf 
  1130.  
  1131.    ---------------- 
  1132.    -- Properties -- 
  1133.    ---------------- 
  1134.    --  The following properties are defined for this widget. See 
  1135.    --  Glib.Properties for more information on properties) 
  1136.  
  1137.    Direction_Property : constant Gtk.Enums.Property_Gtk_Text_Direction; 
  1138.  
  1139.    Paint_Clock_Property : constant Glib.Properties.Property_Boxed; 
  1140.    --  Type: Gdk.Frame_Clock 
  1141.  
  1142.    Parent_Property : constant Glib.Properties.Property_Object; 
  1143.    --  Type: Gtk_Style_Context 
  1144.    --  Sets or gets the style context's parent. See 
  1145.    --  Gtk.Style_Context.Set_Parent for details. 
  1146.  
  1147.    Screen_Property : constant Glib.Properties.Property_Object; 
  1148.    --  Type: Gdk.Screen.Gdk_Screen 
  1149.  
  1150.    ------------- 
  1151.    -- Signals -- 
  1152.    ------------- 
  1153.  
  1154.    type Cb_Gtk_Style_Context_Void is not null access procedure 
  1155.      (Self : access Gtk_Style_Context_Record'Class); 
  1156.  
  1157.    type Cb_GObject_Void is not null access procedure 
  1158.      (Self : access Glib.Object.GObject_Record'Class); 
  1159.  
  1160.    Signal_Changed : constant Glib.Signal_Name := "changed"; 
  1161.    procedure On_Changed 
  1162.       (Self  : not null access Gtk_Style_Context_Record; 
  1163.        Call  : Cb_Gtk_Style_Context_Void; 
  1164.        After : Boolean := False); 
  1165.    procedure On_Changed 
  1166.       (Self  : not null access Gtk_Style_Context_Record; 
  1167.        Call  : Cb_GObject_Void; 
  1168.        Slot  : not null access Glib.Object.GObject_Record'Class; 
  1169.        After : Boolean := False); 
  1170.  
  1171. private 
  1172.    Screen_Property : constant Glib.Properties.Property_Object := 
  1173.      Glib.Properties.Build ("screen"); 
  1174.    Parent_Property : constant Glib.Properties.Property_Object := 
  1175.      Glib.Properties.Build ("parent"); 
  1176.    Paint_Clock_Property : constant Glib.Properties.Property_Boxed := 
  1177.      Glib.Properties.Build ("paint-clock"); 
  1178.    Direction_Property : constant Gtk.Enums.Property_Gtk_Text_Direction := 
  1179.      Gtk.Enums.Build ("direction"); 
  1180. end Gtk.Style_Context;