/usr/share/ada/adainclude/gtkada/gtk-assistant.ads is in libgtkada2.24.4-dev 2.24.4dfsg-1.
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 | -----------------------------------------------------------------------
-- GtkAda - Ada95 binding for Gtk+/Gnome --
-- --
-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet --
-- Copyright (C) 2000-2013, 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. --
-- --
-----------------------------------------------------------------------
-- <description>
-- A Gtk_Assistant is a widget used to represent a generally complex
-- operation split into several steps, guiding the user through its pages and
-- controlling the page flow to collect the necessary data.
--
-- </description>
-- <group>Windows</group>
-- <testgtk>create_assistant.adb</testgtk>
pragma Warnings (Off, "*is already use-visible*");
with Gdk.Pixbuf; use Gdk.Pixbuf;
with Glib; use Glib;
with Glib.Types; use Glib.Types;
with Gtk.Buildable; use Gtk.Buildable;
with Gtk.Widget; use Gtk.Widget;
with Gtk.Window; use Gtk.Window;
package Gtk.Assistant is
type Gtk_Assistant_Record is new Gtk_Window_Record with null record;
type Gtk_Assistant is access all Gtk_Assistant_Record'Class;
type Gtk_Assistant_Page_Type is
(Gtk_Assistant_Page_Content,
Gtk_Assistant_Page_Intro,
Gtk_Assistant_Page_Confirm,
Gtk_Assistant_Page_Summary,
Gtk_Assistant_Page_Progress);
-- Definition of various page types. See Get_Page_Type/Set_Page_Type
-- for more info.
type Gtk_Assistant_Page_Func is access function
(Current_Page : Gint;
D : System.Address) return Gint;
pragma Convention (C, Gtk_Assistant_Page_Func);
------------------
-- Constructors --
------------------
procedure Gtk_New (Assistant : out Gtk_Assistant);
procedure Initialize (Assistant : access Gtk_Assistant_Record'Class);
-- Creates a new Gtk.Assistant.Gtk_Assistant.
-- Since: gtk+ 2.10
function Get_Type return Glib.GType;
pragma Import (C, Get_Type, "gtk_assistant_get_type");
-------------
-- Methods --
-------------
procedure Add_Action_Widget
(Assistant : access Gtk_Assistant_Record;
Child : access Gtk.Widget.Gtk_Widget_Record'Class);
-- Adds a widget to the action area of a Gtk.Assistant.Gtk_Assistant.
-- Since: gtk+ 2.10
-- "child": a Gtk.Widget.Gtk_Widget
function Append_Page
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class) return Gint;
-- Appends a page to the Assistant.
-- Since: gtk+ 2.10
-- "page": a Gtk.Widget.Gtk_Widget
procedure Commit (Assistant : access Gtk_Assistant_Record);
-- Erases the visited page history so the back button is not shown on the
-- current page, and removes the cancel button from subsequent pages. Use
-- this when the information provided up to the current page is hereafter
-- deemed permanent and cannot be modified or undone. For example, showing
-- a progress page to track a long-running, unreversible operation after
-- the user has clicked apply on a confirmation page.
-- Since: gtk+ 2.22
function Get_Current_Page
(Assistant : access Gtk_Assistant_Record) return Gint;
procedure Set_Current_Page
(Assistant : access Gtk_Assistant_Record;
Page_Num : Gint);
-- Switches the page to Page_Num. Note that this will only be necessary in
-- custom buttons, as the Assistant flow can be set with
-- Gtk.Assistant.Set_Forward_Page_Func.
-- Since: gtk+ 2.10
-- "page_num": index of the page to switch to, starting from 0. If
-- negative, the last page will be used. If greater than the number of
-- pages in the Assistant, nothing will be done.
function Get_N_Pages
(Assistant : access Gtk_Assistant_Record) return Gint;
-- Returns the number of pages in the Assistant
-- Since: gtk+ 2.10
function Get_Nth_Page
(Assistant : access Gtk_Assistant_Record;
Page_Num : Gint) return Gtk.Widget.Gtk_Widget;
-- Returns the child widget contained in page number Page_Num. if Page_Num
-- is out of bounds.
-- Since: gtk+ 2.10
-- "page_num": The index of a page in the Assistant, or -1 to get the last
-- page;
function Get_Page_Complete
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class) return Boolean;
procedure Set_Page_Complete
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
Complete : Boolean);
-- Sets whether Page contents are complete. This will make
-- Since: gtk+ 2.10
-- "page": a page of Assistant
-- "complete": the completeness status of the page
function Get_Page_Header_Image
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class)
return Gdk.Pixbuf.Gdk_Pixbuf;
procedure Set_Page_Header_Image
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
Pixbuf : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);
-- Sets a header image for Page. This image is displayed in the header
-- area of the assistant when Page is the current page.
-- Since: gtk+ 2.10
-- "page": a page of Assistant
-- "pixbuf": the new header image Page
function Get_Page_Side_Image
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class)
return Gdk.Pixbuf.Gdk_Pixbuf;
procedure Set_Page_Side_Image
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
Pixbuf : access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);
-- Sets a header image for Page. This image is displayed in the side area
-- of the assistant when Page is the current page.
-- Since: gtk+ 2.10
-- "page": a page of Assistant
-- "pixbuf": the new header image Page
function Get_Page_Title
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class)
return UTF8_String;
procedure Set_Page_Title
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
Title : UTF8_String);
-- Sets a title for Page. The title is displayed in the header area of the
-- assistant when Page is the current page.
-- Since: gtk+ 2.10
-- "page": a page of Assistant
-- "title": the new title for Page
function Get_Page_Type
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class)
return Gtk_Assistant_Page_Type;
procedure Set_Page_Type
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
The_Type : Gtk_Assistant_Page_Type);
-- Sets the page type for Page. The page type determines the page behavior
-- in the Assistant.
-- Since: gtk+ 2.10
-- "page": a page of Assistant
-- "type": the new type for Page
function Insert_Page
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class;
Position : Gint) return Gint;
-- Inserts a page in the Assistant at a given position.
-- Since: gtk+ 2.10
-- "page": a Gtk.Widget.Gtk_Widget
-- "position": the index (starting at 0) at which to insert the page, or
-- -1 to append the page to the Assistant
function Prepend_Page
(Assistant : access Gtk_Assistant_Record;
Page : access Gtk.Widget.Gtk_Widget_Record'Class) return Gint;
-- Prepends a page to the Assistant.
-- Since: gtk+ 2.10
-- "page": a Gtk.Widget.Gtk_Widget
procedure Remove_Action_Widget
(Assistant : access Gtk_Assistant_Record;
Child : access Gtk.Widget.Gtk_Widget_Record'Class);
-- Removes a widget from the action area of a Gtk.Assistant.Gtk_Assistant.
-- Since: gtk+ 2.10
-- "child": a Gtk.Widget.Gtk_Widget
procedure Set_Forward_Page_Func
(Assistant : access Gtk_Assistant_Record;
Page_Func : Gtk_Assistant_Page_Func;
Data : System.Address;
Destroy : Glib.G_Destroy_Notify_Address);
-- Sets the page forwarding function to be Page_Func, this function will
-- be used to determine what will be the next page when the user presses
-- the forward button. Setting Page_Func to null will make the assistant to
-- use the default forward function, which just goes to the next visible
-- page.
-- Since: gtk+ 2.10
-- "page_func": the Gtk_Assistant_Page_Func, or null to use the default
-- one
-- "data": user data for Page_Func
-- "destroy": destroy notifier for Data
procedure Update_Buttons_State (Assistant : access Gtk_Assistant_Record);
-- Forces Assistant to recompute the buttons state. GTK+ automatically
-- takes care of this in most situations, e.g. when the user goes to a
-- different page, or when the visibility or completeness of a page
-- changes. One situation where it can be necessary to call this function
-- is when changing a value on the current page affects the future page
-- flow of the assistant.
-- Since: gtk+ 2.10
----------------------
-- GtkAda additions --
----------------------
generic
type Data_Type (<>) is private;
package Generic_Assistant_Functions is
type Page_Func is access function
(Current_Page : Gint;
User_Data : Data_Type)
return Gint;
-- Spec for page forwarding function.
type Destroy_Notify is access procedure (User_Data : in out Data_Type);
-- Destroy_Notify is called just prior to the destruction of
-- User_Data.
procedure Set_Forward_Page_Func
(Assistant : Gtk_Assistant;
Func : Page_Func;
User_Data : Data_Type;
Destroy : Destroy_Notify := null);
-- Sets the Assistant's page forwarding function to be Func. This
-- function will be used to determine what will be the next page when
-- the user presses the forward button. Setting Func to null will make
-- the assistant use the default forward function, which just goes
-- to the next visible page.
end Generic_Assistant_Functions;
----------------
-- Interfaces --
----------------
-- This class implements several interfaces. See Glib.Types
--
-- - "Buildable"
package Implements_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Assistant_Record, Gtk_Assistant);
function "+"
(Widget : access Gtk_Assistant_Record'Class)
return Gtk.Buildable.Gtk_Buildable
renames Implements_Buildable.To_Interface;
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Assistant
renames Implements_Buildable.To_Object;
-------------
-- Signals --
-------------
-- The following new signals are defined for this widget:
--
-- "apply"
-- procedure Handler (Self : access Gtk_Assistant_Record'Class);
-- The ::apply signal is emitted when the apply button is clicked. The
-- default behavior of the Gtk.Assistant.Gtk_Assistant is to switch to the
-- page after the current page, unless the current page is the last one. A
-- handler for the ::apply signal should carry out the actions for which
-- the wizard has collected data. If the action takes a long time to
-- complete, you might consider putting a page of type
-- %GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle this
-- operation within the Gtk.Assistant.Gtk_Assistant::prepare signal of the
-- progress page.
--
-- "cancel"
-- procedure Handler (Self : access Gtk_Assistant_Record'Class);
-- The ::cancel signal is emitted when then the cancel button is clicked.
--
-- "close"
-- procedure Handler (Self : access Gtk_Assistant_Record'Class);
-- The ::close signal is emitted either when the close button of a summary
-- page is clicked, or when the apply button in the last page in the flow
-- (of type %GTK_ASSISTANT_PAGE_CONFIRM) is clicked.
--
-- "prepare"
-- procedure Handler
-- (Self : access Gtk_Assistant_Record'Class;
-- Page : Gtk.Widget.Gtk_Widget);
-- -- "page": the current page
-- The ::prepare signal is emitted when a new page is set as the
-- assistant's current page, before making the new page visible. A handler
-- for this signal can do any preparation which are necessary before
-- showing Page.
Signal_Apply : constant Glib.Signal_Name := "apply";
Signal_Cancel : constant Glib.Signal_Name := "cancel";
Signal_Close : constant Glib.Signal_Name := "close";
Signal_Prepare : constant Glib.Signal_Name := "prepare";
end Gtk.Assistant;
|