This file is indexed.

/usr/share/ada/adainclude/gtkada/pango-context.adb is in libgtkada16.1.0-dev 17.0.2017-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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
------------------------------------------------------------------------------
--                                                                          --
--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
--                     Copyright (C) 2000-2017, AdaCore                     --
--                                                                          --
-- This library is free software;  you can redistribute it and/or modify it --
-- under terms of the  GNU General Public License  as published by the Free --
-- Software  Foundation;  either version 3,  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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
------------------------------------------------------------------------------

pragma Style_Checks (Off);
pragma Warnings (Off, "*is already use-visible*");
with Glib.Type_Conversion_Hooks; use Glib.Type_Conversion_Hooks;

package body Pango.Context is

   package Type_Conversion_Pango_Context is new Glib.Type_Conversion_Hooks.Hook_Registrator
     (Get_Type'Access, Pango_Context_Record);
   pragma Unreferenced (Type_Conversion_Pango_Context);

   -------------
   -- Gdk_New --
   -------------

   procedure Gdk_New (Self : out Pango_Context) is
   begin
      Self := new Pango_Context_Record;
      Pango.Context.Initialize (Self);
   end Gdk_New;

   ----------------
   -- Initialize --
   ----------------

   procedure Initialize (Self : not null access Pango_Context_Record'Class) is
      function Internal return System.Address;
      pragma Import (C, Internal, "pango_context_new");
   begin
      if not Self.Is_Created then
         Set_Object (Self, Internal);
      end if;
   end Initialize;

   -----------------------
   -- Pango_Context_New --
   -----------------------

   function Pango_Context_New return Pango_Context is
      Self : constant Pango_Context := new Pango_Context_Record;
   begin
      Pango.Context.Initialize (Self);
      return Self;
   end Pango_Context_New;

   -------------
   -- Changed --
   -------------

   procedure Changed (Self : not null access Pango_Context_Record) is
      procedure Internal (Self : System.Address);
      pragma Import (C, Internal, "pango_context_changed");
   begin
      Internal (Get_Object (Self));
   end Changed;

   ------------------
   -- Get_Base_Dir --
   ------------------

   function Get_Base_Dir
      (Self : not null access Pango_Context_Record)
       return Pango.Enums.Direction
   is
      function Internal (Self : System.Address) return Pango.Enums.Direction;
      pragma Import (C, Internal, "pango_context_get_base_dir");
   begin
      return Internal (Get_Object (Self));
   end Get_Base_Dir;

   ----------------------
   -- Get_Base_Gravity --
   ----------------------

   function Get_Base_Gravity
      (Self : not null access Pango_Context_Record)
       return Pango.Enums.Gravity
   is
      function Internal (Self : System.Address) return Pango.Enums.Gravity;
      pragma Import (C, Internal, "pango_context_get_base_gravity");
   begin
      return Internal (Get_Object (Self));
   end Get_Base_Gravity;

   --------------------------
   -- Get_Font_Description --
   --------------------------

   function Get_Font_Description
      (Self : not null access Pango_Context_Record)
       return Pango.Font.Pango_Font_Description
   is
      function Internal
         (Self : System.Address) return Pango.Font.Pango_Font_Description;
      pragma Import (C, Internal, "pango_context_get_font_description");
   begin
      return Internal (Get_Object (Self));
   end Get_Font_Description;

   -----------------
   -- Get_Gravity --
   -----------------

   function Get_Gravity
      (Self : not null access Pango_Context_Record)
       return Pango.Enums.Gravity
   is
      function Internal (Self : System.Address) return Pango.Enums.Gravity;
      pragma Import (C, Internal, "pango_context_get_gravity");
   begin
      return Internal (Get_Object (Self));
   end Get_Gravity;

   ----------------------
   -- Get_Gravity_Hint --
   ----------------------

   function Get_Gravity_Hint
      (Self : not null access Pango_Context_Record)
       return Pango.Enums.GravityHint
   is
      function Internal
         (Self : System.Address) return Pango.Enums.GravityHint;
      pragma Import (C, Internal, "pango_context_get_gravity_hint");
   begin
      return Internal (Get_Object (Self));
   end Get_Gravity_Hint;

   ------------------
   -- Get_Language --
   ------------------

   function Get_Language
      (Self : not null access Pango_Context_Record)
       return Pango.Language.Pango_Language
   is
      function Internal (Self : System.Address) return System.Address;
      pragma Import (C, Internal, "pango_context_get_language");
   begin
      return From_Object (Internal (Get_Object (Self)));
   end Get_Language;

   ----------------
   -- Get_Matrix --
   ----------------

   function Get_Matrix
      (Self : not null access Pango_Context_Record)
       return Pango.Matrix.Pango_Matrix
   is
      function Internal
         (Self : System.Address) return access Pango.Matrix.Pango_Matrix;
      pragma Import (C, Internal, "pango_context_get_matrix");
   begin
      return Internal (Get_Object (Self)).all;
   end Get_Matrix;

   -----------------
   -- Get_Metrics --
   -----------------

   function Get_Metrics
      (Self     : not null access Pango_Context_Record;
       Desc     : Pango.Font.Pango_Font_Description;
       Language : Pango.Language.Pango_Language)
       return Pango.Font_Metrics.Pango_Font_Metrics
   is
      function Internal
         (Self     : System.Address;
          Desc     : Pango.Font.Pango_Font_Description;
          Language : System.Address) return System.Address;
      pragma Import (C, Internal, "pango_context_get_metrics");
   begin
      return From_Object (Internal (Get_Object (Self), Desc, Get_Object (Language)));
   end Get_Metrics;

   ----------------
   -- Get_Serial --
   ----------------

   function Get_Serial
      (Self : not null access Pango_Context_Record) return Guint
   is
      function Internal (Self : System.Address) return Guint;
      pragma Import (C, Internal, "pango_context_get_serial");
   begin
      return Internal (Get_Object (Self));
   end Get_Serial;

   -------------------
   -- List_Families --
   -------------------

   function List_Families
      (Self : not null access Pango_Context_Record)
       return Pango_Font_Family_Array
   is
      type font_family_array_bounded is array (Natural) of System.Address;

      procedure Internal
         (Self     : System.Address;
          Families : System.Address;
          Size     : access Gint);
      pragma Import (C, Internal, "pango_context_list_families");

      procedure g_free (s : access font_family_array_bounded);
      pragma Import (C, g_free, "g_free");

      Families : aliased access font_family_array_bounded;
      Size : aliased Gint;
      Tmplt : Pango_Font_Family_Record;
   begin
      Internal (Get_Object (Self), Families'Address, Size'Access);

      declare
         Result : Pango_Font_Family_Array (1 .. Integer (Size));
      begin
         for R in 0 .. Integer (Size) - 1 loop
             Result (R + 1) := Pango_Font_Family
                (Get_User_Data (Families (R), Tmplt));
         end loop;
         g_free (Families);

         return Result;
      end;
   end List_Families;

   ---------------
   -- Load_Font --
   ---------------

   function Load_Font
      (Self : not null access Pango_Context_Record;
       Desc : Pango.Font.Pango_Font_Description)
       return Pango.Font.Pango_Font
   is
      function Internal
         (Self : System.Address;
          Desc : Pango.Font.Pango_Font_Description) return System.Address;
      pragma Import (C, Internal, "pango_context_load_font");
      Stub_Pango_Font : Pango.Font.Pango_Font_Record;
   begin
      return Pango.Font.Pango_Font (Get_User_Data (Internal (Get_Object (Self), Desc), Stub_Pango_Font));
   end Load_Font;

   ------------------
   -- Load_Fontset --
   ------------------

   function Load_Fontset
      (Self     : not null access Pango_Context_Record;
       Desc     : Pango.Font.Pango_Font_Description;
       Language : Pango.Language.Pango_Language)
       return Pango.Fontset.Pango_Fontset
   is
      function Internal
         (Self     : System.Address;
          Desc     : Pango.Font.Pango_Font_Description;
          Language : System.Address) return System.Address;
      pragma Import (C, Internal, "pango_context_load_fontset");
      Stub_Pango_Fontset : Pango.Fontset.Pango_Fontset_Record;
   begin
      return Pango.Fontset.Pango_Fontset (Get_User_Data (Internal (Get_Object (Self), Desc, Get_Object (Language)), Stub_Pango_Fontset));
   end Load_Fontset;

   ------------------
   -- Set_Base_Dir --
   ------------------

   procedure Set_Base_Dir
      (Self      : not null access Pango_Context_Record;
       Direction : Pango.Enums.Direction)
   is
      procedure Internal
         (Self      : System.Address;
          Direction : Pango.Enums.Direction);
      pragma Import (C, Internal, "pango_context_set_base_dir");
   begin
      Internal (Get_Object (Self), Direction);
   end Set_Base_Dir;

   ----------------------
   -- Set_Base_Gravity --
   ----------------------

   procedure Set_Base_Gravity
      (Self    : not null access Pango_Context_Record;
       Gravity : Pango.Enums.Gravity)
   is
      procedure Internal
         (Self    : System.Address;
          Gravity : Pango.Enums.Gravity);
      pragma Import (C, Internal, "pango_context_set_base_gravity");
   begin
      Internal (Get_Object (Self), Gravity);
   end Set_Base_Gravity;

   --------------------------
   -- Set_Font_Description --
   --------------------------

   procedure Set_Font_Description
      (Self : not null access Pango_Context_Record;
       Desc : Pango.Font.Pango_Font_Description)
   is
      procedure Internal
         (Self : System.Address;
          Desc : Pango.Font.Pango_Font_Description);
      pragma Import (C, Internal, "pango_context_set_font_description");
   begin
      Internal (Get_Object (Self), Desc);
   end Set_Font_Description;

   ----------------------
   -- Set_Gravity_Hint --
   ----------------------

   procedure Set_Gravity_Hint
      (Self : not null access Pango_Context_Record;
       Hint : Pango.Enums.GravityHint)
   is
      procedure Internal
         (Self : System.Address;
          Hint : Pango.Enums.GravityHint);
      pragma Import (C, Internal, "pango_context_set_gravity_hint");
   begin
      Internal (Get_Object (Self), Hint);
   end Set_Gravity_Hint;

   ------------------
   -- Set_Language --
   ------------------

   procedure Set_Language
      (Self     : not null access Pango_Context_Record;
       Language : Pango.Language.Pango_Language)
   is
      procedure Internal (Self : System.Address; Language : System.Address);
      pragma Import (C, Internal, "pango_context_set_language");
   begin
      Internal (Get_Object (Self), Get_Object (Language));
   end Set_Language;

   ----------------
   -- Set_Matrix --
   ----------------

   procedure Set_Matrix
      (Self   : not null access Pango_Context_Record;
       Matrix : Pango.Matrix.Pango_Matrix)
   is
      procedure Internal
         (Self   : System.Address;
          Matrix : Pango.Matrix.Pango_Matrix);
      pragma Import (C, Internal, "pango_context_set_matrix");
   begin
      Internal (Get_Object (Self), Matrix);
   end Set_Matrix;

end Pango.Context;