/usr/share/ada/adainclude/gtkada/gtkada-bindings.ads is in libgtkada2.24.1-dev 2.24.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | -----------------------------------------------------------------------
-- GtkAda - Ada95 binding for the Gimp Toolkit --
-- --
-- Copyright (C) 2006-2010, AdaCore --
-- --
-- This library is free software; you can redistribute it and/or --
-- modify it under the terms of the GNU General Public --
-- License as published by the Free Software Foundation; either --
-- version 2 of the License, or (at your option) any later version. --
-- --
-- This library is distributed in the hope that it will be useful, --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU --
-- General Public License for more details. --
-- --
-- You should have received a copy of the GNU General Public --
-- License along with this library; if not, write to the --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330, --
-- Boston, MA 02111-1307, USA. --
-- --
-----------------------------------------------------------------------
-- This is a unit purely internal to GtkAda, to ease binding and avoid code
-- duplication.
-- Do not use in your own applications, since the interface might change from
-- release to release.
-- See also Gtkada.Types
-- with Gdk.Color;
-- with Gdk.Types;
with Glib;
-- with Glib.Object;
with Gtkada.C;
with GNAT.Strings;
with Interfaces.C.Strings;
package Gtkada.Bindings is
package ICS renames Interfaces.C.Strings;
-------------
-- Strings --
-------------
function String_Or_Null (S : String) return ICS.chars_ptr;
-- Return Null_Ptr if S is the empty string, or a newly allocated string
-- otherwise. This is intended mostly for the binding itself.
type chars_ptr_array_access
is access ICS.chars_ptr_array (Interfaces.C.size_t);
pragma Convention (C, chars_ptr_array_access);
-- Suitable for a C function that returns a gchar**
procedure g_strfreev (Str_Array : in out chars_ptr_array_access);
-- Thin binding to C function of the same name. Frees a null-terminated
-- array of strings, and the array itself. If called on a null value,
-- simply return.
function To_String_List
(C : ICS.chars_ptr_array) return GNAT.Strings.String_List;
-- Converts C into a String_List. Returned value must be freed by caller,
-- as well as C. C is NULL terminated.
function To_String_List
(C : ICS.chars_ptr_array; N : Glib.Gint)
return GNAT.Strings.String_List;
-- Converts C into a String_List. N is the number of elements in C.
-- Returned value must be freed by caller, as well as C.
function From_String_List
(C : GNAT.Strings.String_List) return ICS.chars_ptr_array;
-- Converts C into a chars_ptr_array. Returned value must be freed by
-- caller, as well as C.
function To_Chars_Ptr
(C : chars_ptr_array_access) return ICS.chars_ptr_array;
-- Return a bounded array that contains the same strings as C (so you
-- shouldn't free C). 'Last applies to the result, whereas it doesn't to C.
------------
-- Arrays --
------------
-- See Gtkada.C for more information.
-- The packages that are commented out are instanciated in various,
-- possibly duplicated places. This is because of elaboration circularity
-- issues.
package Gint_Arrays is new Gtkada.C.Unbounded_Arrays
(Glib.Gint, 0, Natural, Glib.Gint_Array);
-- package Points_Arrays is new Gtkada.C.Unbounded_Arrays
-- (Gdk.Types.Gdk_Point, (0, 0), Positive, Gdk.Types.Gdk_Points_Array);
-- package Atom_Arrays is new Gtkada.C.Unbounded_Arrays
-- (Gdk.Types.Gdk_Atom, Gdk.Types.Gdk_None,
-- Natural, Gdk.Types.Gdk_Atom_Array);
package Pspec_Arrays is new Gtkada.C.Unbounded_Arrays
(Glib.Param_Spec, null, Natural, Glib.Param_Spec_Array);
-- package Signal_Id_Arrays is new Gtkada.C.Unbounded_Arrays
-- (Glib.Signal_Id, Glib.Null_Signal_Id, Glib.Guint,
-- Glib.Object.Signal_Id_Array);
package GType_Arrays is new Gtkada.C.Unbounded_Arrays
(Glib.GType, Glib.GType_None, Glib.Guint, Glib.GType_Array);
-- package Color_Arrays is new Gtkada.C.Unbounded_Arrays
-- (Gdk.Color.Gdk_Color, Gdk.Color.Null_Color, Natural,
-- Gdk.Color.Gdk_Color_Array);
-- type Unbounded_Gint_Array is array (Natural) of Glib.Gint;
-- pragma Convention (C, Unbounded_Gint_Array);
-- type Unbounded_Gint_Array_Access is access Unbounded_Gint_Array;
-- procedure G_Free (Arr : in out Unbounded_Gint_Array_Access);
-- function To_Gint_Array
-- (Arr : Unbounded_Gint_Array_Access; N : Glib.Gint)
-- return Glib.Gint_Array;
function To_Gint_Array_Zero_Terminated
(Arr : Gint_Arrays.Unbounded_Array_Access)
return Glib.Gint_Array;
-- Converts Arr, stopping at the first 0 encountered
-- type Unbounded_Points_Array is array (Natural) of Gdk.Types.Gdk_Point;
-- pragma Convention (C, Unbounded_Points_Array);
-- type Unbounded_Points_Array_Access is access Unbounded_Points_Array;
-- procedure G_Free (Arr : in out Unbounded_Points_Array_Access);
-- function To_Point_Array
-- (Arr : Unbounded_Points_Array_Access; N : Glib.Gint)
-- return Gdk.Types.Gdk_Points_Array;
-- type Unbounded_Atom_Array is array (Natural) of Gdk.Types.Gdk_Atom;
-- pragma Convention (C, Unbounded_Atom_Array);
-- type Unbounded_Atom_Array_Access is access Unbounded_Atom_Array;
-- procedure G_Free (Arr : in out Unbounded_Atom_Array_Access);
-- function To_Atom_Array
-- (Arr : Unbounded_Atom_Array_Access; N : Glib.Gint)
-- return Gdk.Types.Gdk_Atom_Array;
-- type Unbounded_Pspec_Array is array (Natural) of Glib.Param_Spec;
-- pragma Convention (C, Unbounded_Pspec_Array);
-- type Unbounded_Pspec_Array_Access is access Unbounded_Pspec_Array;
-- procedure G_Free (Arr : in out Unbounded_Pspec_Array_Access);
-- function To_Pspec_Array
-- (Arr : Unbounded_Pspec_Array_Access; N : Glib.Gint)
-- return Glib.Param_Spec_Array;
-- type Unbounded_Signal_Id_Array is array (Natural) of Glib.Signal_Id;
-- pragma Convention (C, Unbounded_Signal_Id_Array);
-- type Unbounded_Signal_Id_Array_Access is access Unbounded_Signal_Id_Array;
-- procedure G_Free (Arr : in out Unbounded_Signal_Id_Array_Access);
-- function To_Signal_Id_Array
-- (Arr : Unbounded_Signal_Id_Array_Access; N : Glib.Guint)
-- return Glib.Object.Signal_Id_Array;
-- type Unbounded_GType_Array is array (Natural) of Glib.GType;
-- pragma Convention (C, Unbounded_GType_Array);
-- type Unbounded_GType_Array_Access is access Unbounded_GType_Array;
-- procedure G_Free (Arr : in out Unbounded_GType_Array_Access);
-- function To_GType_Array
-- (Arr : Unbounded_GType_Array_Access; N : Glib.Guint)
-- return Glib.GType_Array;
-- type Unbounded_Color_Array is array (Natural) of Gdk.Color.Gdk_Color;
-- pragma Convention (C, Unbounded_Color_Array);
-- type Unbounded_Color_Array_Access is access Unbounded_Color_Array;
-- procedure G_Free (Arr : in out Unbounded_Color_Array_Access);
-- function To_Color_Array
-- (Arr : Unbounded_Color_Array_Access; N : Glib.Gint)
-- return Gdk.Color.Gdk_Color_Array;
-- function Convert is new Ada.Unchecked_Conversion
-- (System.Address, Unbounded_Color_Array_Access);
private
-- pragma Import (C, g_free, "g_free");
pragma Import (C, g_strfreev, "g_strfreev");
end Gtkada.Bindings;
|