1. ----------------------------------------------------------------------- 
  2. --               GtkAda - Ada95 binding for Gtk+/Gnome               -- 
  3. --                                                                   -- 
  4. --                   Copyright (C) 2001 ACT-Europe                   -- 
  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. -- 
  31. --  This package provides all the required subprograms to create and 
  32. --  manipulate new properties associated with new widget types. 
  33. -- 
  34. --  You do not have to be familiar with this package in order to use 
  35. --  properties. See Glib.Object instead, that provides the minimal 
  36. --  subprograms to get and set properties. 
  37. -- 
  38. --  This package is only intended for writers of new widgets. You will need 
  39. --  this function to create new properties. 
  40. -- 
  41. --  Each object in gtk+ has a set of so-called properties. These are 
  42. --  attributes that can be accessed, and possibly modified, by names. 
  43. --  They provide introspection, that is an object can specify which 
  44. --  properties it knows about, which can be modified,..., and thus provide a 
  45. --  huge support for special applications like GUI-Builders that need to act 
  46. --  on any kind of widgets, even those it doesn't know about yet. 
  47. -- 
  48. --  However, for efficiency reasons, the properties are only names, and are 
  49. --  not the only way to modify attributes of objects. It is often more 
  50. --  efficient to use the alternate method, as documented in the GtkAda 
  51. --  documentation for each property. 
  52. -- 
  53. --  Another interesting feature of properties is that every time a property 
  54. --  is modified, a signal "property_changed" or "notify" is emitted, and 
  55. --  it is thus easy to keep track of attributes in objects. 
  56. -- 
  57. --  </description> 
  58. --  <group>Glib, the general-purpose library</group> 
  59.  
  60. with Glib.Object; 
  61. with Glib.Values; 
  62. with Interfaces.C.Strings; 
  63.  
  64. package Glib.Properties.Creation is 
  65.  
  66.    --  subtype Param_Spec is Glib.Param_Spec; 
  67.  
  68.    --  This type is the internal representation for properties. It contains all 
  69.    --  the required information about it, including some help string or the 
  70.    --  range of values it recognizes. 
  71.    -- 
  72.    --  All the values contained in a param_spec are typed. However, since these 
  73.    --  are not implemented as tagged types, it is your responsability to 
  74.    --  convert the param_specs to the appropriate type, based on the value 
  75.    --  returned by Value_Type. Most of the time, you won't need to use these 
  76.    --  functions at all, unless you are programming some self-inspection 
  77.    --  application, like a GUI-Builder for instance, or creating new properties 
  78.    --  for a new widget. 
  79.  
  80.    procedure Unref (Param : Param_Spec); 
  81.    --  Decrement the reference counter. If it reaches 0, the memory is freed. 
  82.  
  83.    ------------------ 
  84.    -- Enum classes -- 
  85.    ------------------ 
  86.    --  gtk+, a C library, has a whole system to describe its enumeration types, 
  87.    --  similar to what is available from the start in Ada ('Image and 'Value 
  88.    --  for instance). All enumerations are represented internally as 
  89.    --  Enum_Classes. However, there is no easy conversion between such an 
  90.    --  enum class and a GtkAda enumeration type. 
  91.    --  Most of the time, this has no impact on your work, since you know 
  92.    --  what type you need to use when calling an Ada function. However, you 
  93.    --  will need to manipulate these enumeration classes when interfacing 
  94.    --  with ParamSpecs and dealing with properties. 
  95.  
  96.    type Enum_Class is new Glib.C_Proxy; 
  97.    type Enum_Value is new Glib.C_Proxy; 
  98.  
  99.    function Get_Value (Klass : Enum_Class; Value : Glib.Gint) 
  100.       return Enum_Value; 
  101.    --  Return the value in Klass that is Value (equivalent of 'Val in Ada) 
  102.  
  103.    function Nth_Value (Klass : Enum_Class; Nth : Glib.Guint) return Enum_Value; 
  104.    --  Return the Nth-th value in Klass, or null if there is no such value. 
  105.  
  106.    function Value (Val : Enum_Value) return Glib.Gint; 
  107.    --  Return the numeric value for a specific enumeration. Use the matching 
  108.    --  Ada type and 'Val to convert it to a valid Ada enumeration 
  109.  
  110.    function Name (Val : Enum_Value) return String; 
  111.    --  Return the name of Val. This is the equivalent of 'Image in Ada. 
  112.  
  113.    function Nick (Val : Enum_Value) return String; 
  114.    --  Return a displayable string for Val. 
  115.  
  116.    function Register_Static_Enum 
  117.      (Name   : String; 
  118.       Values : Interfaces.C.Strings.chars_ptr_array) return Glib.GType; 
  119.    --  Create a new enumeration class from a list of valid values. 
  120.    --  Values must be freed by the caller. 
  121.  
  122.    function Enum_Class_From_Type (Typ : Glib.GType) return Enum_Class; 
  123.    --  Return the enumeration class corresponding to a type 
  124.  
  125.    ------------------- 
  126.    -- Flags classes -- 
  127.    ------------------- 
  128.    --  These are very similar to Enum Classes. However, the actual value 
  129.    --  of an instance of this type is a combination of a set of flags, rather 
  130.    --  than one single enumeration value. 
  131.    --  For instance, a Gdk_Event_Mask is a Flags_Class 
  132.  
  133.    type Flags_Class is new Glib.C_Proxy; 
  134.    type Flags_Value is new Glib.C_Proxy; 
  135.    type Flags_Int_Value is mod Glib.Gint'Last; 
  136.  
  137.    function Nth_Value (Klass : Flags_Class; Nth : Glib.Guint) 
  138.       return Flags_Value; 
  139.    --  Return the Nth-th value in Klass, or null if there is no such value. 
  140.  
  141.    function Value (Val : Flags_Value) return Flags_Int_Value; 
  142.    --  Return the numeric value for a specific enumeration. Use the matching 
  143.    --  Ada type and 'Val to convert it to a valid Ada enumeration 
  144.  
  145.    function Name (Val : Flags_Value) return String; 
  146.    --  Return the name of Val. This is the equivalent of 'Image in Ada. 
  147.  
  148.    function Nick (Val : Flags_Value) return String; 
  149.    --  Return a displayable string for Val. 
  150.  
  151.    --------------- 
  152.    -- ParamSpec -- 
  153.    --------------- 
  154.  
  155.    function Pspec_Name (Param : Param_Spec) return String; 
  156.    --  Return the name of the property. 
  157.    --  This is the internal string representing the property. It 
  158.    --  Should probably not be displayed on 
  159.  
  160.    function Nick_Name (Param : Param_Spec) return String; 
  161.    --  Return the nickname of the property. This is a string 
  162.    --  that can be displayed to represent the property, and is 
  163.    --  more user-friendly than the result of Name. 
  164.  
  165.    function Flags (Param : Param_Spec) return Param_Flags; 
  166.    --  Return the flags for the property 
  167.  
  168.    function Owner_Type (Param : Param_Spec) return Glib.GType; 
  169.    --  The type that defined Param. If you look for instance at all properties 
  170.    --  provides by a type, they will also include properties provided by the 
  171.    --  parents of the type. This function can be used to find those declared 
  172.    --  with that type only 
  173.  
  174.    function Description (Param : Param_Spec) return String; 
  175.    --  Return the description (ie the help string) for Param 
  176.  
  177.    function Value_Type (Param : Param_Spec) return Glib.GType; 
  178.    --  Return the type of param 
  179.  
  180.    procedure Set_Value_Type (Param : Param_Spec; Typ : Glib.GType); 
  181.    --  Override the type of param. You should only use this function when 
  182.    --  creating new Param_Spec types based on existing types. You should not 
  183.    --  change the type if you haven't created param yourself. 
  184.  
  185.    function Get_Qdata (Param : Param_Spec; Quark : GQuark) return Glib.C_Proxy; 
  186.    --  Return the user data set for Param 
  187.  
  188.    procedure Set_Qdata 
  189.      (Param   : Param_Spec; 
  190.       Quark   : GQuark; 
  191.       Data    : Glib.C_Proxy; 
  192.       Destroy : G_Destroy_Notify := null); 
  193.    --  Associate some named data with Param. Destroy is called when Param is 
  194.    --  destroyed. 
  195.  
  196.    --  Value_Type returns GType_Char 
  197.    type Param_Spec_Char is new Param_Spec; 
  198.    function Minimum (Param : Param_Spec_Char) return Glib.Gint8; 
  199.    function Maximum (Param : Param_Spec_Char) return Glib.Gint8; 
  200.    function Default (Param : Param_Spec_Char) return Glib.Gint8; 
  201.    function Gnew_Char 
  202.      (Name, Nick, Blurb         : String; 
  203.       Minimum, Maximum, Default : Glib.Gint8; 
  204.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  205.       return Param_Spec; 
  206.  
  207.    --  Value_Type returns GType_UChar 
  208.    type Param_Spec_Uchar is new Param_Spec; 
  209.    function Minimum (Param : Param_Spec_Uchar) return Glib.Guint8; 
  210.    function Maximum (Param : Param_Spec_Uchar) return Glib.Guint8; 
  211.    function Default (Param : Param_Spec_Uchar) return Glib.Guint8; 
  212.    function Gnew_Uchar 
  213.      (Name, Nick, Blurb         : String; 
  214.       Minimum, Maximum, Default : Glib.Guint8; 
  215.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  216.       return Param_Spec; 
  217.  
  218.    --  Value_Type returns GType_Bool 
  219.    type Param_Spec_Boolean is new Param_Spec; 
  220.    function Default (Param : Param_Spec_Boolean) return Boolean; 
  221.    function Gnew_Boolean 
  222.      (Name, Nick, Blurb : String; 
  223.       Default           : Boolean; 
  224.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  225.       return Param_Spec; 
  226.  
  227.    --  Value_Type returns GType_Int 
  228.    type Param_Spec_Int is new Param_Spec; 
  229.    function Minimum (Param : Param_Spec_Int) return Glib.Gint; 
  230.    function Maximum (Param : Param_Spec_Int) return Glib.Gint; 
  231.    function Default (Param : Param_Spec_Int) return Glib.Gint; 
  232.    function Gnew_Int 
  233.      (Name, Nick, Blurb         : String; 
  234.       Minimum, Maximum, Default : Glib.Gint; 
  235.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  236.       return Param_Spec; 
  237.  
  238.    --  Value_Type returns GType_Uint 
  239.    type Param_Spec_Uint is new Param_Spec; 
  240.    function Minimum (Param : Param_Spec_Uint) return Glib.Guint; 
  241.    function Maximum (Param : Param_Spec_Uint) return Glib.Guint; 
  242.    function Default (Param : Param_Spec_Uint) return Glib.Guint; 
  243.    function Gnew_Uint 
  244.      (Name, Nick, Blurb         : String; 
  245.       Minimum, Maximum, Default : Glib.Guint; 
  246.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  247.       return Param_Spec; 
  248.  
  249.    --  Value_Type returns GType_Long 
  250.    type Param_Spec_Long is new Param_Spec; 
  251.    function Minimum (Param : Param_Spec_Long) return Glib.Glong; 
  252.    function Maximum (Param : Param_Spec_Long) return Glib.Glong; 
  253.    function Default (Param : Param_Spec_Long) return Glib.Glong; 
  254.    function Gnew_Long 
  255.      (Name, Nick, Blurb         : String; 
  256.       Minimum, Maximum, Default : Glib.Glong; 
  257.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  258.       return Param_Spec; 
  259.  
  260.    --  Value_Type returns GType_ULong 
  261.    type Param_Spec_Ulong is new Param_Spec; 
  262.    function Minimum (Param : Param_Spec_Ulong) return Glib.Gulong; 
  263.    function Maximum (Param : Param_Spec_Ulong) return Glib.Gulong; 
  264.    function Default (Param : Param_Spec_Ulong) return Glib.Gulong; 
  265.    function Gnew_Ulong 
  266.      (Name, Nick, Blurb         : String; 
  267.       Minimum, Maximum, Default : Glib.Gulong; 
  268.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  269.       return Param_Spec; 
  270.  
  271.    --  Value_Type returns ??? 
  272.    type Param_Spec_Unichar is new Param_Spec; 
  273.    function Default (Param : Param_Spec_Unichar) return Gunichar; 
  274.    function Gnew_Unichar 
  275.      (Name, Nick, Blurb : String; 
  276.       Default           : Gunichar; 
  277.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  278.       return Param_Spec; 
  279.  
  280.    --  Value_Type returns GType_Enum 
  281.    --  See also the package Generic_Enumeration_Property on how to create 
  282.    --  properties based on an Ada enumeration type. 
  283.    type Param_Spec_Enum is new Param_Spec; 
  284.    function Enumeration (Param : Param_Spec_Enum) return Enum_Class; 
  285.    function Default (Param : Param_Spec_Enum) return Glib.Gint; 
  286.    function Gnew_Enum 
  287.      (Name, Nick, Blurb : String; 
  288.       Enum_Type         : GType; 
  289.       Default           : Gint := 0; 
  290.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  291.       return Param_Spec; 
  292.    --  See Glib.Properties.Creation.Register_Static_Enum on how to create 
  293.    --  Enum_Type 
  294.  
  295.    --  Value_Type returns GType_Flags 
  296.    type Param_Spec_Flags is new Param_Spec; 
  297.    function Flags_Enumeration (Param : Param_Spec_Flags) return Flags_Class; 
  298.    function Default (Param : Param_Spec_Flags) return Glong; 
  299.    function Gnew_Flags 
  300.      (Name, Nick, Blurb : String; 
  301.       Flags_Type        : Glib.GType; 
  302.       Default           : Guint; 
  303.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  304.       return Param_Spec; 
  305.  
  306.    --  Value_Type returns GType_Float 
  307.    type Param_Spec_Float is new Param_Spec; 
  308.    function Minimum (Param : Param_Spec_Float) return Gfloat; 
  309.    function Maximum (Param : Param_Spec_Float) return Gfloat; 
  310.    function Default (Param : Param_Spec_Float) return Gfloat; 
  311.    function Epsilon (Param : Param_Spec_Float) return Gfloat; 
  312.    function Gnew_Float 
  313.      (Name, Nick, Blurb         : String; 
  314.       Minimum, Maximum, Default : Glib.Gfloat; 
  315.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  316.       return Param_Spec; 
  317.  
  318.    --  Value_Type returns GType_Double 
  319.    type Param_Spec_Double is new Param_Spec; 
  320.    function Minimum (Param : Param_Spec_Double) return Gdouble; 
  321.    function Maximum (Param : Param_Spec_Double) return Gdouble; 
  322.    function Default (Param : Param_Spec_Double) return Gdouble; 
  323.    function Epsilon (Param : Param_Spec_Double) return Gdouble; 
  324.    function Gnew_Double 
  325.      (Name, Nick, Blurb         : String; 
  326.       Minimum, Maximum, Default : Glib.Gdouble; 
  327.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  328.       return Param_Spec; 
  329.  
  330.    --  Value_Type returns GType_String 
  331.    type Param_Spec_String is new Param_Spec; 
  332.    function Default (Param : Param_Spec_String) return String; 
  333.    function Cset_First (Param : Param_Spec_String) return String; 
  334.    function Cset_Nth (Param : Param_Spec_String) return String; 
  335.    function Substitutor (Param : Param_Spec_String) return Character; 
  336.    function Ensure_Non_Null (Param : Param_Spec_String) return Boolean; 
  337.    function Gnew_String 
  338.      (Name, Nick, Blurb : String; 
  339.       Default           : String; 
  340.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  341.       return Param_Spec; 
  342.  
  343.    --  Value_Type returns GType_Param 
  344.    type Param_Spec_Param is new Param_Spec; 
  345.    function Gnew_Param 
  346.      (Name, Nick, Blurb : String; 
  347.       Param_Type        : Glib.GType; 
  348.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  349.       return Param_Spec; 
  350.  
  351.    --  Value_Type returns GType_Boxed 
  352.    type Param_Spec_Boxed is new Param_Spec; 
  353.    function Gnew_Boxed 
  354.      (Name, Nick, Blurb : String; 
  355.       Boxed_Type        : Glib.GType; 
  356.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  357.       return Param_Spec; 
  358.  
  359.    --  Value_Type returns GType_Pointer 
  360.    type Param_Spec_Pointer is new Param_Spec; 
  361.    function Gnew_Pointer 
  362.      (Name, Nick, Blurb : String; 
  363.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  364.       return Param_Spec; 
  365.  
  366.    --  Value_Type returns GType_Param_Value_Array 
  367.    --  type Param_Spec_Value_Array is new Param_Spec; 
  368.  
  369.    --  Value_Type returns GType_Object 
  370.    type Param_Spec_Object is new Param_Spec; 
  371.    function Gnew_Object 
  372.      (Name, Nick, Blurb : String; 
  373.       Object_Type       : Glib.GType; 
  374.       Flags : Param_Flags := Param_Readable or Param_Writable) 
  375.       return Param_Spec; 
  376.  
  377.    ----------------------------- 
  378.    -- Creating new properties -- 
  379.    ----------------------------- 
  380.    --  There are several things that need to be done when creating a property. 
  381.    --  For one thing, you need to create the string that represents the 
  382.    --  property. This is the only item that needs to go in the specifications 
  383.    --  of your page. 
  384.    --  You then need to describe the type of the property, and the values it 
  385.    --  allows. This is very simple for simple types, and a generic packages is 
  386.    --  provided to handle the more complex enumeration-based properties. 
  387.    -- 
  388.    --  Your widget needs to define two handlers, Set_Property_Handler and 
  389.    --  Get_Property_Handler, that are called every time the user accesses the 
  390.    --  value of a property through a call to Glib.Object.Set_Property or 
  391.    --  Glib.Object.Get_Property. 
  392.    -- 
  393.    --  For efficiency reasons, a property is also associated with an integer 
  394.    --  value, that you must provide when creating the property. This value is 
  395.    --  completely free, and is passed to the two handlers described above. 
  396.    -- 
  397.    --  The two handlers manipulate Glib.Values.GValue values, so that they 
  398.    --  can get and return various types. 
  399.  
  400.    type Property_Id is new Guint; 
  401.  
  402.    type Set_Property_Handler is access procedure 
  403.      (Object        : access Glib.Object.GObject_Record'Class; 
  404.       Prop_Id       : Property_Id; 
  405.       Value         : Glib.Values.GValue; 
  406.       Property_Spec : Param_Spec); 
  407.    --  This handler is called every time the user has asked for a new 
  408.    --  property to be changed. 
  409.    --  Prop_Id is the id you used when creating the property. 
  410.    --  Value is the new value that should be set. It is your responsability 
  411.    --  to extract the actual value from it. However, consistency has already 
  412.    --  been checked by gtk+, so we know the type is correct. 
  413.    --  Property_Spec is the definition of the property. 
  414.    -- 
  415.    --  Note: It is your responsability to emit the "notify" signal after a 
  416.    --  property has been modified. The recommended way is to emit this signal 
  417.    --  from the internal function that actually modified the property, not 
  418.    --  directly from the Set_Propert_Handler itself. This will ensure that 
  419.    --  even if the user doesn't modify the attribute through a property but 
  420.    --  directly by calling the lower-level subprogram, the signal will still 
  421.    --  be emitted. 
  422.  
  423.    type Get_Property_Handler is access procedure 
  424.      (Object        : access Glib.Object.GObject_Record'Class; 
  425.       Prop_Id       : Property_Id; 
  426.       Value         : out Glib.Values.GValue; 
  427.       Property_Spec : Param_Spec); 
  428.    --  This handler is called when the application needs to retrive the value 
  429.    --  of a property. You should set the value in Value 
  430.  
  431.    procedure Set_Properties_Handlers 
  432.      (Class_Record : Glib.Object.GObject_Class; 
  433.       Set_Property : Set_Property_Handler; 
  434.       Get_Property : Get_Property_Handler); 
  435.    --  Set the two functions used to set and retrieve properties. You 
  436.    --  should never call this function on the class record of the standard 
  437.    --  gtk+ widgets, since this will break their behavior. You should first 
  438.    --  create a new class record through Initialize_Class_Record, and then 
  439.    --  use the returned Class_Record as a parameter to this subprogram. 
  440.    -- 
  441.    --  You cannot pass null to either of the two parameters, or you won't 
  442.    --  be able to install new properties afterwards 
  443.  
  444.    procedure Install_Property 
  445.      (Class_Record  : Glib.Object.GObject_Class; 
  446.       Prop_Id       : Property_Id; 
  447.       Property_Spec : Param_Spec); 
  448.    --  Adds a new property to Class_Record. You should use this function only 
  449.    --  on class records you have created yourself, not on one of the standard 
  450.    --  widgets. 
  451.    --  Prop_Id is the internal representation for properties, that will be 
  452.    --  passed to the Set_Property and Get_Property_Handlers (see above) to set 
  453.    --  and retrieve the value of a property. 
  454.    --  Property_Spec should be the result of one of the GNew_* subprograms for 
  455.    --  Param_Spec, and this defines the type of the property. 
  456.  
  457. private 
  458.    pragma Import (C, Flags, "ada_gparam_get_flags"); 
  459.    pragma Import (C, Owner_Type, "ada_gparam_get_owner_type"); 
  460.    pragma Import (C, Value_Type, "ada_gparam_get_value_type"); 
  461.    pragma Import (C, Set_Value_Type, "ada_gparam_set_value_type"); 
  462.    pragma Import (C, Get_Value, "g_enum_get_value"); 
  463.    pragma Import (C, Flags_Enumeration, "ada_gparam_get_flags_flags"); 
  464.    pragma Import (C, Enumeration, "ada_gparam_get_enum_class_enum"); 
  465.    pragma Import (C, Install_Property, "g_object_class_install_property"); 
  466.    pragma Import (C, Unref, "g_param_spec_unref"); 
  467.    pragma Import (C, Get_Qdata, "g_param_spec_get_qdata"); 
  468.    pragma Import (C, Set_Qdata, "g_param_spec_set_qdata_full"); 
  469.    pragma Import (C, Enum_Class_From_Type, "g_type_class_ref"); 
  470.    pragma Inline (Description); 
  471.    pragma Inline (Name); 
  472.  
  473.    pragma Inline (Minimum); 
  474.    pragma Inline (Maximum); 
  475.    pragma Inline (Default); 
  476.    pragma Inline (Epsilon); 
  477.    pragma Inline (Substitutor); 
  478.    pragma Inline (Cset_Nth); 
  479.    pragma Inline (Cset_First); 
  480.    pragma Inline (Ensure_Non_Null); 
  481. end Glib.Properties.Creation;