/usr/share/ada/adainclude/gnomeada/gnome-dialog.adb is in libgnomeada2.24.1-dev 2.24.1-14.
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 | -----------------------------------------------------------------------
-- GtkAda - Ada95 binding for the Gimp Toolkit --
-- --
-- Copyright (C) 2000 Helix Code, Inc. --
-- Copyright (C) 2000-2006 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. --
-- --
-----------------------------------------------------------------------
with System;
with Gtk; use Gtk;
package body Gnome.Dialog is
---------------
-- Gnome_New --
---------------
procedure Gnome_New
(Dialog : out Gnome_Dialog;
Title : String;
Buttons : Chars_Ptr_Array) is
begin
Dialog := new Gnome_Dialog_Record;
Initialize (Dialog, Title, Buttons);
end Gnome_New;
----------------
-- Initialize --
----------------
procedure Initialize
(Dialog : access Gnome_Dialog_Record'Class;
Title : String;
Buttons : Chars_Ptr_Array)
is
function Internal
(Title : String; Buttons : Chars_Ptr_Array) return System.Address;
pragma Import (C, Internal, "gnome_dialog_newv");
begin
Set_Object (Dialog, Internal (Title & ASCII.NUL, Buttons + Null_Ptr));
end Initialize;
-------------------
-- Append_Button --
-------------------
procedure Append_Button
(Dialog : access Gnome_Dialog_Record;
Name : String)
is
procedure Internal (Dialog : System.Address; Name : String);
pragma Import (C, Internal, "gnome_dialog_append_button");
begin
Internal (Get_Object (Dialog), Name & ASCII.NUL);
end Append_Button;
procedure Append_Button
(Dialog : access Gnome_Dialog_Record;
Name : String;
Pixmap : String)
is
procedure Internal
(Dialog : System.Address;
Name : String;
Pixmap : String);
pragma Import (C, Internal, "gnome_dialog_append_button_with_pixmap");
begin
Internal (Get_Object (Dialog), Name & ASCII.NUL, Pixmap & ASCII.NUL);
end Append_Button;
--------------------
-- Append_Buttons --
--------------------
procedure Append_Buttons
(Dialog : access Gnome_Dialog_Record;
Names : Chars_Ptr_Array;
Pixmaps : Chars_Ptr_Array)
is
procedure Internal
(Dialog : System.Address;
Names : Chars_Ptr_Array;
Pixmaps : Chars_Ptr_Array);
pragma Import (C, Internal, "gnome_dialog_append_buttons_with_pixmaps");
begin
Internal (Get_Object (Dialog),
Names + Null_Ptr,
Pixmaps + Null_Ptr);
end Append_Buttons;
procedure Append_Buttons
(Dialog : access Gnome_Dialog_Record;
Buttons : Chars_Ptr_Array)
is
procedure Internal
(Dialog : System.Address;
Buttons : Chars_Ptr_Array);
pragma Import (C, Internal, "gnome_dialog_append_buttonsv");
begin
Internal (Get_Object (Dialog), Buttons + Null_Ptr);
end Append_Buttons;
-----------
-- Close --
-----------
procedure Close (Dialog : access Gnome_Dialog_Record) is
procedure Internal (Dialog : System.Address);
pragma Import (C, Internal, "gnome_dialog_close");
begin
Internal (Get_Object (Dialog));
end Close;
-----------------
-- Close_Hides --
-----------------
procedure Close_Hides
(Dialog : access Gnome_Dialog_Record;
Just_Hide : Boolean)
is
procedure Internal
(Dialog : System.Address;
Just_Hide : Gint);
pragma Import (C, Internal, "gnome_dialog_close_hides");
begin
Internal (Get_Object (Dialog), Boolean'Pos (Just_Hide));
end Close_Hides;
---------------------
-- Editable_Enters --
---------------------
procedure Editable_Enters
(Dialog : access Gnome_Dialog_Record;
Editable : access Gtk.Editable.Gtk_Editable_Record'Class)
is
procedure Internal
(Dialog : System.Address;
Editable : System.Address);
pragma Import (C, Internal, "gnome_dialog_editable_enters");
begin
Internal (Get_Object (Dialog), Get_Object (Editable));
end Editable_Enters;
----------------
-- Grab_Focus --
----------------
procedure Grab_Focus (Dialog : access Gnome_Dialog_Record; Button : Gint) is
procedure Internal
(Dialog : System.Address;
Button : Gint);
pragma Import (C, Internal, "gnome_dialog_grab_focus");
begin
Internal (Get_Object (Dialog), Button);
end Grab_Focus;
---------
-- Run --
---------
function Run (Dialog : access Gnome_Dialog_Record) return Gint is
function Internal (Dialog : System.Address) return Gint;
pragma Import (C, Internal, "gnome_dialog_run");
begin
return Internal (Get_Object (Dialog));
end Run;
-------------------
-- Run_And_Close --
-------------------
function Run_And_Close (Dialog : access Gnome_Dialog_Record) return Gint is
function Internal (Dialog : System.Address) return Gint;
pragma Import (C, Internal, "gnome_dialog_run_and_close");
begin
return Internal (Get_Object (Dialog));
end Run_And_Close;
---------------------
-- Set_Accelerator --
---------------------
procedure Set_Accelerator
(Dialog : access Gnome_Dialog_Record;
Button : Gint;
Accel_Key : Gdk.Types.Gdk_Key_Type;
Accel_Mods : Gdk.Types.Gdk_Modifier_Type)
is
procedure Internal
(Dialog : System.Address;
Button : Gint;
Accel_Key : Gint;
Accel_Mods : Gint);
pragma Import (C, Internal, "gnome_dialog_set_accelerator");
begin
Internal
(Get_Object (Dialog), Button,
Gdk.Types.Gdk_Key_Type'Pos (Accel_Key),
Gdk.Types.Gdk_Modifier_Type'Pos (Accel_Mods));
end Set_Accelerator;
---------------
-- Set_Close --
---------------
procedure Set_Close
(Dialog : access Gnome_Dialog_Record;
Click_Closes : Boolean)
is
procedure Internal
(Dialog : System.Address;
Click_Closes : Gint);
pragma Import (C, Internal, "gnome_dialog_set_close");
begin
Internal (Get_Object (Dialog), Boolean'Pos (Click_Closes));
end Set_Close;
-----------------
-- Set_Default --
-----------------
procedure Set_Default
(Dialog : access Gnome_Dialog_Record;
Button : Gint)
is
procedure Internal
(Dialog : System.Address;
Button : Gint);
pragma Import (C, Internal, "gnome_dialog_set_default");
begin
Internal (Get_Object (Dialog), Button);
end Set_Default;
----------------
-- Set_Parent --
----------------
procedure Set_Parent
(Dialog : access Gnome_Dialog_Record;
Parent : access Gtk.Window.Gtk_Window_Record'Class)
is
procedure Internal
(Dialog : System.Address;
Parent : System.Address);
pragma Import (C, Internal, "gnome_dialog_set_parent");
begin
Internal (Get_Object (Dialog), Get_Object (Parent));
end Set_Parent;
-------------------
-- Set_Sensitive --
-------------------
procedure Set_Sensitive
(Dialog : access Gnome_Dialog_Record;
Button : Gint;
Setting : Boolean)
is
procedure Internal
(Dialog : System.Address;
Button : Gint;
Setting : Gint);
pragma Import (C, Internal, "gnome_dialog_set_sensitive");
begin
Internal (Get_Object (Dialog), Button, Boolean'Pos (Setting));
end Set_Sensitive;
end Gnome.Dialog;
|