This file is indexed.

/usr/share/ada/adainclude/gtkada/cairo.adb 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
-----------------------------------------------------------------------
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
--                                                                   --
--                    Copyright (C) 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.                                       --
--                                                                   --
-----------------------------------------------------------------------

package body Cairo is

   --------------
   -- Set_Dash --
   --------------

   procedure Set_Dash
     (Cr         : Cairo_Context;
      Dashes     : Dash_Array;
      Offset     : Gdouble)
   is
      procedure C_Set_Dash
        (Cr         : Cairo_Context;
         Dashes     : System.Address;
         Num_Dashes : Gint;
         Offset     : Gdouble);
      pragma Import (C, C_Set_Dash, "cairo_set_dash");

      Len : constant Natural := Dashes'Length;
   begin
      if Len = 0 then
         C_Set_Dash (Cr, System.Null_Address, 0, Offset);
      else
         C_Set_Dash (Cr, Dashes (Dashes'First)'Address, Dashes'Length, Offset);
      end if;
   end Set_Dash;

   --------------
   -- Get_Dash --
   --------------

   procedure Get_Dash
     (Cr     : Cairo_Context;
      Dashes : out Dash_Array_Access;
      Offset : out Gdouble)
   is
      procedure C_Get_Dash
        (Cr     : Cairo_Context;
         Dashes : System.Address;
         Offset : access Gdouble);
      pragma Import (C, C_Get_Dash, "cairo_get_dash");

      Count : constant Integer := Integer (Get_Dash_Count (Cr));
      G     : aliased Gdouble;
   begin
      if Count = 0 then
         Offset := 0.0;
         Dashes := null;
         return;
      end if;

      Dashes := new Dash_Array (1 .. Count);

      C_Get_Dash (Cr, Dashes (Dashes'First)'Address, G'Access);
      Offset := G;
   end Get_Dash;

   ----------------------
   -- Select_Font_Face --
   ----------------------

   procedure Select_Font_Face
     (Cr     : Cairo_Context;
      Family : String;
      Slant  : Cairo_Font_Slant;
      Weight : Cairo_Font_Weight)
   is
      procedure C_Select_Font_Face
        (Cr     : Cairo_Context;
         Family : System.Address;
         Slant  : Cairo_Font_Slant;
         Weight : Cairo_Font_Weight);

      pragma Import (C, C_Select_Font_Face, "cairo_select_font_face");

      Tmp : constant String := Family & ASCII.NUL;
   begin
      C_Select_Font_Face (Cr, Tmp'Address, Slant, Weight);
   end Select_Font_Face;

   ---------------
   -- Show_Text --
   ---------------

   procedure Show_Text
     (Cr   : Cairo_Context;
      Utf8 : String)
   is
      procedure C_Show_Text (Cr : Cairo_Context; Utf8 : System.Address);
      pragma Import (C, C_Show_Text, "cairo_show_text");
      Tmp : constant String := Utf8 & ASCII.NUL;
   begin
      C_Show_Text (Cr, Tmp'Address);
   end Show_Text;

   ---------------
   -- Text_Path --
   ---------------

   procedure Text_Path
     (Cr   : Cairo_Context;
      Utf8 : String)
   is
      procedure C_Text_Path (Cr : Cairo_Context; Utf8 : System.Address);
      pragma Import (C, C_Text_Path, "cairo_text_path");
      Tmp : constant String := Utf8 & ASCII.NUL;
   begin
      C_Text_Path (Cr, Tmp'Address);
   end Text_Path;

end Cairo;