/usr/share/ada/adainclude/gtkada/gtk-overlay.ads 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 | ------------------------------------------------------------------------------
-- --
-- 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/>. --
-- --
------------------------------------------------------------------------------
-- <description>
-- GtkOverlay is a container which contains a single main child, on top of
-- which it can place "overlay" widgets. The position of each overlay widget
-- is determined by its Gtk.Widget.Gtk_Widget:halign and
-- Gtk.Widget.Gtk_Widget:valign properties. E.g. a widget with both alignments
-- set to Gtk.Widget.Align_Start will be placed at the top left corner of the
-- main widget, whereas an overlay with halign set to Gtk.Widget.Align_Center
-- and valign set to Gtk.Widget.Align_End will be placed a the bottom edge of
-- the main widget, horizontally centered. The position can be adjusted by
-- setting the margin properties of the child to non-zero values.
--
-- More complicated placement of overlays is possible by connecting to the
-- Gtk.Overlay.Gtk_Overlay::get-child-position signal.
--
-- # GtkOverlay as GtkBuildable
--
-- The GtkOverlay implementation of the GtkBuildable interface supports
-- placing a child as an overlay by specifying "overlay" as the "type"
-- attribute of a `<child>` element.
--
-- </description>
pragma Ada_2005;
pragma Warnings (Off, "*is already use-visible*");
with Gdk.Rectangle; use Gdk.Rectangle;
with Glib; use Glib;
with Glib.Object; use Glib.Object;
with Glib.Types; use Glib.Types;
with Gtk.Bin; use Gtk.Bin;
with Gtk.Buildable; use Gtk.Buildable;
with Gtk.Widget; use Gtk.Widget;
package Gtk.Overlay is
type Gtk_Overlay_Record is new Gtk_Bin_Record with null record;
type Gtk_Overlay is access all Gtk_Overlay_Record'Class;
------------------
-- Constructors --
------------------
procedure Gtk_New (Self : out Gtk_Overlay);
procedure Initialize (Self : not null access Gtk_Overlay_Record'Class);
-- Creates a new Gtk.Overlay.Gtk_Overlay.
-- Since: gtk+ 3.2
-- Initialize does nothing if the object was already created with another
-- call to Initialize* or G_New.
function Gtk_Overlay_New return Gtk_Overlay;
-- Creates a new Gtk.Overlay.Gtk_Overlay.
-- Since: gtk+ 3.2
function Get_Type return Glib.GType;
pragma Import (C, Get_Type, "gtk_overlay_get_type");
-------------
-- Methods --
-------------
procedure Add_Overlay
(Self : not null access Gtk_Overlay_Record;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class);
-- Adds Widget to Overlay.
-- The widget will be stacked on top of the main widget added with
-- Gtk.Container.Add.
-- The position at which Widget is placed is determined from its
-- Gtk.Widget.Gtk_Widget:halign and Gtk.Widget.Gtk_Widget:valign
-- properties.
-- Since: gtk+ 3.2
-- "widget": a Gtk.Widget.Gtk_Widget to be added to the container
-------------
-- Signals --
-------------
type Cb_Gtk_Overlay_Gtk_Widget_Gdk_Rectangle_Boolean is not null access function
(Self : access Gtk_Overlay_Record'Class;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Allocation : access Gdk.Rectangle.Gdk_Rectangle)
return Boolean;
type Cb_GObject_Gtk_Widget_Gdk_Rectangle_Boolean is not null access function
(Self : access Glib.Object.GObject_Record'Class;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class;
Allocation : access Gdk.Rectangle.Gdk_Rectangle)
return Boolean;
Signal_Get_Child_Position : constant Glib.Signal_Name := "get-child-position";
procedure On_Get_Child_Position
(Self : not null access Gtk_Overlay_Record;
Call : Cb_Gtk_Overlay_Gtk_Widget_Gdk_Rectangle_Boolean;
After : Boolean := False);
procedure On_Get_Child_Position
(Self : not null access Gtk_Overlay_Record;
Call : Cb_GObject_Gtk_Widget_Gdk_Rectangle_Boolean;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False);
-- The ::get-child-position signal is emitted to determine the position
-- and size of any overlay child widgets. A handler for this signal should
-- fill Allocation with the desired position and size for Widget, relative
-- to the 'main' child of Overlay.
--
-- The default handler for this signal uses the Widget's halign and valign
-- properties to determine the position and gives the widget its natural
-- size (except that an alignment of Gtk.Widget.Align_Fill will cause the
-- overlay to be full-width/height). If the main child is a
-- Gtk.Scrolled_Window.Gtk_Scrolled_Window, the overlays are placed
-- relative to its contents.
--
-- Callback parameters:
-- -- "widget": the child widget to position
-- -- "allocation": return location for the allocation
-- -- Returns True if the Allocation has been filled
----------------
-- Interfaces --
----------------
-- This class implements several interfaces. See Glib.Types
--
-- - "Buildable"
package Implements_Gtk_Buildable is new Glib.Types.Implements
(Gtk.Buildable.Gtk_Buildable, Gtk_Overlay_Record, Gtk_Overlay);
function "+"
(Widget : access Gtk_Overlay_Record'Class)
return Gtk.Buildable.Gtk_Buildable
renames Implements_Gtk_Buildable.To_Interface;
function "-"
(Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Overlay
renames Implements_Gtk_Buildable.To_Object;
end Gtk.Overlay;
|