repo_name
stringlengths 9
74
| language
stringclasses 1
value | length_bytes
int64 11
9.34M
| extension
stringclasses 2
values | content
stringlengths 11
9.34M
|
---|---|---|---|---|
reznikmm/matreshka | Ada | 9,379 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- XML Processor --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2010-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Ada.Unchecked_Deallocation;
package body Matreshka.Internals.XML.Element_Tables is
procedure Free is
new Ada.Unchecked_Deallocation (Element_Array, Element_Array_Access);
----------------
-- Attributes --
----------------
function Attributes
(Self : Element_Table;
Element : Element_Identifier) return Attribute_Identifier is
begin
return Self.Table (Element).Attributes;
end Attributes;
--------------
-- Finalize --
--------------
procedure Finalize (Self : in out Element_Table) is
begin
Free (Self.Table);
end Finalize;
-------------------
-- First_Element --
-------------------
function First_Element (Self : Element_Table) return Element_Identifier is
begin
if Self.Last /= No_Element then
return No_Element + 1;
-- First element of Self.Table has index No_Element + 1 by
-- convention.
else
return No_Element;
end if;
end First_Element;
------------------
-- Has_Children --
------------------
function Has_Children
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Has_Children;
end Has_Children;
------------
-- Is_Any --
------------
function Is_Any
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Is_Any;
end Is_Any;
----------------------------
-- Is_Attributes_Declared --
----------------------------
function Is_Attributes_Declared
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Is_Attributes_Declared;
end Is_Attributes_Declared;
-----------------
-- Is_Declared --
-----------------
function Is_Declared
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Is_Declared;
end Is_Declared;
--------------
-- Is_Empty --
--------------
function Is_Empty
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Is_Empty;
end Is_Empty;
----------------------
-- Is_Mixed_Content --
----------------------
function Is_Mixed_Content
(Self : Element_Table;
Element : Element_Identifier) return Boolean is
begin
return Self.Table (Element).Is_Mixed_Content;
end Is_Mixed_Content;
-----------------
-- New_Element --
-----------------
procedure New_Element
(Self : in out Element_Table;
Element : out Element_Identifier) is
begin
Self.Last := Self.Last + 1;
if Self.Last > Self.Table'Last then
declare
Old : Element_Array_Access := Self.Table;
begin
Self.Table := new Element_Array (1 .. Old'Last + 16);
Self.Table (Old'Range) := Old.all;
Free (Old);
end;
end if;
Element := Self.Last;
Self.Table (Element) :=
(Attributes => No_Attribute,
Is_Declared => False,
Is_Attributes_Declared => False,
Is_Empty => False,
Is_Any => False,
Is_Mixed_Content => False,
Has_Children => False);
end New_Element;
------------------
-- Next_Element --
------------------
procedure Next_Element
(Self : Element_Table;
Element : in out Element_Identifier) is
begin
if Element = Self.Last then
Element := No_Element;
else
Element := Element + 1;
end if;
end Next_Element;
-----------
-- Reset --
-----------
procedure Reset (Self : in out Element_Table) is
begin
Self.Last := No_Element;
end Reset;
--------------------
-- Set_Attributes --
--------------------
procedure Set_Attributes
(Self : in out Element_Table;
Element : Element_Identifier;
Attribute : Attribute_Identifier) is
begin
Self.Table (Element).Attributes := Attribute;
end Set_Attributes;
----------------------
-- Set_Has_Children --
----------------------
procedure Set_Has_Children
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean) is
begin
Self.Table (Element).Has_Children := Value;
end Set_Has_Children;
----------------
-- Set_Is_Any --
----------------
procedure Set_Is_Any
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean) is
begin
Self.Table (Element).Is_Any := Value;
end Set_Is_Any;
--------------------------------
-- Set_Is_Attributes_Declared --
--------------------------------
procedure Set_Is_Attributes_Declared
(Self : in out Element_Table;
Element : Element_Identifier;
Declared : Boolean) is
begin
Self.Table (Element).Is_Attributes_Declared := Declared;
end Set_Is_Attributes_Declared;
---------------------
-- Set_Is_Declared --
---------------------
procedure Set_Is_Declared
(Self : in out Element_Table;
Element : Element_Identifier;
Declared : Boolean) is
begin
Self.Table (Element).Is_Declared := Declared;
end Set_Is_Declared;
------------------
-- Set_Is_Empty --
------------------
procedure Set_Is_Empty
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean) is
begin
Self.Table (Element).Is_Empty := Value;
end Set_Is_Empty;
--------------------------
-- Set_Is_Mixed_Content --
--------------------------
procedure Set_Is_Mixed_Content
(Self : in out Element_Table;
Element : Element_Identifier;
Value : Boolean) is
begin
Self.Table (Element).Is_Mixed_Content := Value;
end Set_Is_Mixed_Content;
end Matreshka.Internals.XML.Element_Tables;
|
charlie5/lace | Ada | 7,502 | adb | with
bullet_c.Binding,
c_math_c.Vector_2,
c_math_c.Vector_3,
c_math_c.Conversion,
c_math_c.Triangle,
ada.unchecked_Deallocation,
ada.Unchecked_Conversion,
interfaces.C;
package body bullet_Physics.Shape
is
use c_math_c.Conversion,
bullet_c.Binding,
Interfaces;
---------
-- Forge
--
overriding
procedure define (Self : in out Item)
is
begin
raise Error with "Bullet shape not supported.";
end define;
overriding
procedure destruct (Self : in out Item)
is
begin
null;
end destruct;
-------
--- Box
--
type Box_view is access Box;
function new_box_Shape (half_Extents : in Vector_3) return physics.Shape.view
is
Self : constant Box_view := new Box;
c_half_Extents : aliased c_math_c.Vector_3.item := +half_Extents;
begin
Self.C := b3d_new_Box (c_half_Extents'unchecked_Access);
return physics.Shape.view (Self);
end new_box_Shape;
-----------
--- Capsule
--
type Capsule_view is access Capsule;
function new_capsule_Shape (Radii : in Vector_2;
Height : in Real) return physics.Shape.view
is
Self : constant Capsule_view := new Capsule;
c_Radii : aliased c_math_c.Vector_2.item := +Radii;
begin
Self.C := b3d_new_Capsule (c_Radii'unchecked_Access, +Height);
return physics.Shape.view (Self);
end new_capsule_Shape;
--------
--- Cone
--
type Cone_view is access Cone;
function new_cone_Shape (Radius,
Height : in Real) return physics.Shape.view
is
Self : constant Cone_view := new Cone;
begin
Self.C := b3d_new_Cone (+Radius, +Height);
return physics.Shape.view (Self);
end new_cone_Shape;
---------------
--- convex_Hull
--
type convex_Hull_view is access convex_Hull;
function new_convex_hull_Shape (Points : in physics.Vector_3_array) return physics.Shape.view
is
Self : constant convex_Hull_view := new convex_Hull;
c_Points : array (1 .. Points'Length) of aliased c_math_c.Vector_3.item;
begin
for i in c_Points'Range
loop
c_Points (i) := +Points (i);
end loop;
Self.C := b3d_new_convex_Hull (c_Points (1)'unchecked_Access,
c_Points'Length);
return physics.Shape.view (Self);
end new_convex_hull_Shape;
--------
--- Mesh
--
type Mesh_view is access Mesh;
function new_mesh_Shape (Model : access math.Geometry.d3.a_Model) return physics.Shape.view
is
Self : constant Mesh_view := new Mesh;
c_Points : array (1 .. Model.site_Count) of aliased c_math_c.Vector_3.item;
type Triangles is array (1 .. Model.tri_Count) of aliased c_math_c.Triangle.item;
pragma Pack (Triangles);
c_Triangles : Triangles;
begin
for i in c_Points'Range
loop
c_Points (i) := +Model.Sites (i);
end loop;
for i in c_Triangles'Range
loop
c_Triangles (i) := (a => C.int (Model.Triangles (i)(1)),
b => C.int (Model.Triangles (i)(2)),
c => C.int (Model.Triangles (i)(3)));
end loop;
Self.C := b3d_new_Mesh (Points => c_Points (c_Points'First)'unchecked_Access,
point_Count => 0,
Triangles => c_Triangles (c_Triangles'First)'unchecked_Access,
triangle_Count => C.int (Model.tri_Count));
return physics.Shape.view (Self);
end new_mesh_Shape;
------------
--- Cylinder
--
type Cylinder_view is access Cylinder;
function new_cylinder_Shape (half_Extents : in Vector_3) return physics.Shape.view
is
Self : constant Cylinder_view := new Cylinder;
c_half_Extents : aliased c_math_c.Vector_3.item := +half_Extents;
begin
Self.C := b3d_new_Cylinder (c_half_Extents'unchecked_Access);
return physics.Shape.view (Self);
end new_cylinder_Shape;
---------------
--- Heightfield
--
type Heightfield_view is access Heightfield;
function new_heightfield_Shape (Width,
Depth : in Positive;
Heights : in c_math_c.Pointers.Real_Pointer;
min_Height,
max_Height : in Real;
Scale : in Vector_3) return physics.Shape.view
is
use c_math_c.Pointers;
Self : constant Heightfield_view := new Heightfield;
c_Scale : aliased c_math_c.Vector_3.item := +Scale;
begin
Self.C := b3d_new_Heightfield (+Width,
+Depth,
Heights,
c_math_c.Real (min_Height),
c_math_c.Real (max_Height),
c_Scale'unchecked_Access);
return physics.Shape.view (Self);
end new_heightfield_Shape;
---------------
--- multiSphere
--
type multiSphere_view is access multiSphere;
function new_multiSphere_Shape (Positions : in physics.Vector_3_array;
Radii : in math.Vector) return physics.Shape.view
is
pragma Assert (Positions'Length = Radii'Length);
Self : constant multiSphere_view := new multiSphere;
c_Positions : array (1 .. Positions'Length) of aliased c_math_c.Vector_3.item;
c_Radii : array (1 .. Radii 'Length) of aliased c_math_c.Real;
begin
for i in c_Radii'Range
loop
c_Positions (i) := +Positions (i);
c_Radii (i) := +Radii (i);
end loop;
Self.C := b3d_new_multiSphere (c_Positions (1)'unchecked_Access,
c_Radii (1)'unchecked_Access,
Radii'Length);
return physics.Shape.view (Self);
end new_multiSphere_Shape;
---------
--- Plane
--
type Plane_view is access Plane;
function new_plane_Shape (Normal : in Vector_3;
Offset : in Real) return physics.Shape.view
is
Self : constant Plane_view := new Plane;
c_Vector : aliased c_math_c.Vector_3.item := +Normal;
begin
Self.C := b3d_new_Plane (c_Vector'unchecked_Access, +Offset);
return physics.Shape.view (Self);
end new_plane_Shape;
----------
--- Sphere
--
type Sphere_view is access Sphere;
function new_sphere_Shape (Radius : in math.Real) return physics.Shape.view
is
Self : constant Sphere_view := new Sphere;
begin
Self.C := b3d_new_Sphere (+Radius);
return physics.Shape.view (Self);
end new_sphere_Shape;
---------------
--- Attributes
--
overriding
procedure Scale_is (Self : in out Item; Now : Vector_3)
is
begin
null;
end Scale_is;
--------
--- Free
--
procedure free (the_Shape : in out physics.Shape.view)
is
procedure deallocate is new ada.unchecked_Deallocation (physics.Shape.item'Class,
physics.Shape.view);
begin
the_Shape.destruct;
deallocate (the_Shape);
end free;
end bullet_Physics.Shape;
|
ptrebuc/ewok-kernel | Ada | 11,180 | adb | --
-- Copyright 2018 The wookey project team <[email protected]>
-- - Ryad Benadjila
-- - Arnauld Michelizza
-- - Mathieu Renard
-- - Philippe Thierry
-- - Philippe Trebuchet
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
--
with ewok.debug;
with ewok.tasks; use ewok.tasks;
with ewok.tasks_shared; use ewok.tasks_shared;
with ewok.exported.devices; use ewok.exported.devices;
with ewok.devices_shared; use ewok.devices_shared;
with ewok.devices;
package body ewok.syscalls.cfg.dev
with spark_mode => off
is
--pragma debug_policy (IGNORE);
package TSK renames ewok.tasks;
procedure svc_dev_map
(caller_id : in ewok.tasks_shared.t_task_id;
params : in out t_parameters;
mode : in ewok.tasks_shared.t_task_mode)
is
dev_descriptor : unsigned_8
with address => params(1)'address;
dev_id : ewok.devices_shared.t_device_id;
dev : ewok.devices.t_checked_user_device_access;
ok : boolean;
begin
--
-- Checking user inputs
--
-- Task must not be in ISR mode
-- NOTE
-- The reasons to forbid a task in ISR mode to map/unmap some devices
-- are not technical. An ISR *must* be a minimal piece of code that
-- manage only the interrupts provided by a specific hardware.
if mode = ewok.tasks_shared.TASK_MODE_ISRTHREAD then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): forbidden in ISR mode"));
goto ret_denied;
end if;
-- No map/unmap before end of initialization
if not is_init_done (caller_id) then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): forbidden during init sequence"));
goto ret_denied;
end if;
-- Valid device descriptor ?
if dev_descriptor not in TSK.tasks_list(caller_id).device_id'range
then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): invalid device descriptor"));
goto ret_inval;
end if;
dev_id := TSK.tasks_list(caller_id).device_id (dev_descriptor);
-- Used device descriptor ?
if dev_id = ID_DEV_UNUSED then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): unused device"));
goto ret_inval;
end if;
-- Defensive programming. Verifying that the device really belongs to the
-- task
if ewok.devices.get_task_from_id (dev_id) /= caller_id then
raise program_error;
end if;
-- Verifying that the device may be voluntary mapped by the task
dev := ewok.devices.get_user_device (dev_id);
if dev.map_mode /= ewok.exported.devices.DEV_MAP_VOLUNTARY then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): not a DEV_MAP_VOLUNTARY device"));
goto ret_denied;
end if;
-- Verifying that the device is not already mapped
if TSK.is_mounted (caller_id, dev_id) then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): the device is already mapped"));
goto ret_denied;
end if;
--
-- Mapping the device
--
TSK.mount_device (caller_id, dev_id, ok);
if not ok then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_map(): mount_device() failed (no free region?)"));
goto ret_busy;
end if;
-- We enable the device if its not already enabled
-- FIXME - That code should not be here.
-- Should create a special syscall for enabling/disabling
-- devices (cf. ewok-syscalls-init.adb)
ewok.devices.enable_device (dev_id, ok);
if not ok then
goto ret_denied;
end if;
set_return_value (caller_id, mode, SYS_E_DONE);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_inval>>
set_return_value (caller_id, mode, SYS_E_INVAL);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_denied>>
set_return_value (caller_id, mode, SYS_E_DENIED);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_busy>>
set_return_value (caller_id, mode, SYS_E_BUSY);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
end svc_dev_map;
procedure svc_dev_unmap
(caller_id : in ewok.tasks_shared.t_task_id;
params : in out t_parameters;
mode : in ewok.tasks_shared.t_task_mode)
is
dev_descriptor : unsigned_8
with address => params(1)'address;
dev_id : ewok.devices_shared.t_device_id;
dev : ewok.devices.t_checked_user_device_access;
ok : boolean;
begin
--
-- Checking user inputs
--
-- Task must not be in ISR mode
-- NOTE
-- The reasons to forbid a task in ISR mode to map/unmap some devices
-- are not technical. An ISR *must* be a minimal piece of code that
-- manage only the interrupts provided by a specific hardware.
if mode = ewok.tasks_shared.TASK_MODE_ISRTHREAD then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): forbidden in ISR mode"));
goto ret_denied;
end if;
-- No unmap before end of initialization
if not is_init_done (caller_id) then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): forbidden during init sequence"));
goto ret_denied;
end if;
-- Valid device descriptor ?
if dev_descriptor not in TSK.tasks_list(caller_id).device_id'range
then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): invalid device descriptor"));
goto ret_inval;
end if;
dev_id := TSK.tasks_list(caller_id).device_id (dev_descriptor);
-- Used device descriptor ?
if dev_id = ID_DEV_UNUSED then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): unused device"));
goto ret_inval;
end if;
-- Defensive programming. Verifying that the device really belongs to the
-- task
if ewok.devices.get_task_from_id (dev_id) /= caller_id then
raise program_error;
end if;
-- Verifying that the device may be voluntary unmapped by the task
dev := ewok.devices.get_user_device (dev_id);
if dev.map_mode /= ewok.exported.devices.DEV_MAP_VOLUNTARY then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): not a DEV_MAP_VOLUNTARY device"));
goto ret_denied;
end if;
--
-- Unmapping the device
--
TSK.unmount_device (caller_id, dev_id, ok);
if not ok then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_unmap(): device is not mapped"));
goto ret_denied;
end if;
set_return_value (caller_id, mode, SYS_E_DONE);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_inval>>
set_return_value (caller_id, mode, SYS_E_INVAL);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_denied>>
set_return_value (caller_id, mode, SYS_E_DENIED);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
end svc_dev_unmap;
procedure svc_dev_release
(caller_id : in ewok.tasks_shared.t_task_id;
params : in out t_parameters;
mode : in ewok.tasks_shared.t_task_mode)
is
dev_descriptor : unsigned_8
with address => params(1)'address;
dev_id : ewok.devices_shared.t_device_id;
ok : boolean;
begin
-- No release before end of initialization
if not is_init_done (caller_id) then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_release(): forbidden during init sequence"));
goto ret_denied;
end if;
-- Valid device descriptor ?
if dev_descriptor not in TSK.tasks_list(caller_id).device_id'range
then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_release(): invalid device descriptor"));
goto ret_inval;
end if;
dev_id := TSK.tasks_list(caller_id).device_id (dev_descriptor);
-- Used device descriptor ?
if dev_id = ID_DEV_UNUSED then
pragma DEBUG (debug.log (debug.ERROR,
ewok.tasks.tasks_list(caller_id).name
& ": dev_release(): unused device"));
goto ret_inval;
end if;
-- Defensive programming. Verifying that the device really belongs to the
-- task
if ewok.devices.get_task_from_id (dev_id) /= caller_id then
raise program_error;
end if;
--
-- Releasing the device
--
-- Unmounting the device
if TSK.is_mounted (caller_id, dev_id) then
TSK.unmount_device (caller_id, dev_id, ok);
if not ok then
raise program_error; -- Should never happen
end if;
end if;
-- Removing it from the task's list of used devices
TSK.remove_device (caller_id, dev_id, ok);
if not ok then
raise program_error; -- Should never happen
end if;
-- Release GPIOs, EXTIs and interrupts
ewok.devices.release_device (caller_id, dev_id, ok);
set_return_value (caller_id, mode, SYS_E_DONE);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_inval>>
set_return_value (caller_id, mode, SYS_E_INVAL);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
<<ret_denied>>
set_return_value (caller_id, mode, SYS_E_DENIED);
TSK.set_state (caller_id, mode, TASK_STATE_RUNNABLE);
return;
end svc_dev_release;
end ewok.syscalls.cfg.dev;
|
reznikmm/matreshka | Ada | 16,116 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with AMF.Elements;
with AMF.Internals.Element_Collections;
with AMF.Internals.Helpers;
with AMF.Internals.Tables.UML_Attributes;
with AMF.Visitors.UML_Iterators;
with AMF.Visitors.UML_Visitors;
with League.Strings.Internals;
with Matreshka.Internals.Strings;
package body AMF.Internals.UML_Literal_Reals is
-------------------
-- Enter_Element --
-------------------
overriding procedure Enter_Element
(Self : not null access constant UML_Literal_Real_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Enter_Literal_Real
(AMF.UML.Literal_Reals.UML_Literal_Real_Access (Self),
Control);
end if;
end Enter_Element;
-------------------
-- Leave_Element --
-------------------
overriding procedure Leave_Element
(Self : not null access constant UML_Literal_Real_Proxy;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Visitor in AMF.Visitors.UML_Visitors.UML_Visitor'Class then
AMF.Visitors.UML_Visitors.UML_Visitor'Class
(Visitor).Leave_Literal_Real
(AMF.UML.Literal_Reals.UML_Literal_Real_Access (Self),
Control);
end if;
end Leave_Element;
-------------------
-- Visit_Element --
-------------------
overriding procedure Visit_Element
(Self : not null access constant UML_Literal_Real_Proxy;
Iterator : in out AMF.Visitors.Abstract_Iterator'Class;
Visitor : in out AMF.Visitors.Abstract_Visitor'Class;
Control : in out AMF.Visitors.Traverse_Control) is
begin
if Iterator in AMF.Visitors.UML_Iterators.UML_Iterator'Class then
AMF.Visitors.UML_Iterators.UML_Iterator'Class
(Iterator).Visit_Literal_Real
(Visitor,
AMF.UML.Literal_Reals.UML_Literal_Real_Access (Self),
Control);
end if;
end Visit_Element;
---------------
-- Get_Value --
---------------
overriding function Get_Value
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.Real is
begin
return
AMF.Internals.Tables.UML_Attributes.Internal_Get_Value
(Self.Element);
end Get_Value;
---------------
-- Set_Value --
---------------
overriding procedure Set_Value
(Self : not null access UML_Literal_Real_Proxy;
To : AMF.Real) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Value
(Self.Element, To);
end Set_Value;
--------------
-- Get_Type --
--------------
overriding function Get_Type
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Types.UML_Type_Access is
begin
return
AMF.UML.Types.UML_Type_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Type
(Self.Element)));
end Get_Type;
--------------
-- Set_Type --
--------------
overriding procedure Set_Type
(Self : not null access UML_Literal_Real_Proxy;
To : AMF.UML.Types.UML_Type_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Type
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Type;
---------------------------
-- Get_Client_Dependency --
---------------------------
overriding function Get_Client_Dependency
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Dependencies.Collections.Set_Of_UML_Dependency is
begin
return
AMF.UML.Dependencies.Collections.Wrap
(AMF.Internals.Element_Collections.Wrap
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Client_Dependency
(Self.Element)));
end Get_Client_Dependency;
-------------------------
-- Get_Name_Expression --
-------------------------
overriding function Get_Name_Expression
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.String_Expressions.UML_String_Expression_Access is
begin
return
AMF.UML.String_Expressions.UML_String_Expression_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Name_Expression
(Self.Element)));
end Get_Name_Expression;
-------------------------
-- Set_Name_Expression --
-------------------------
overriding procedure Set_Name_Expression
(Self : not null access UML_Literal_Real_Proxy;
To : AMF.UML.String_Expressions.UML_String_Expression_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Name_Expression
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Name_Expression;
-------------------
-- Get_Namespace --
-------------------
overriding function Get_Namespace
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
return
AMF.UML.Namespaces.UML_Namespace_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Namespace
(Self.Element)));
end Get_Namespace;
------------------------
-- Get_Qualified_Name --
------------------------
overriding function Get_Qualified_Name
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.Optional_String is
begin
declare
use type Matreshka.Internals.Strings.Shared_String_Access;
Aux : constant Matreshka.Internals.Strings.Shared_String_Access
:= AMF.Internals.Tables.UML_Attributes.Internal_Get_Qualified_Name (Self.Element);
begin
if Aux = null then
return (Is_Empty => True);
else
return (False, League.Strings.Internals.Create (Aux));
end if;
end;
end Get_Qualified_Name;
-----------------------------------
-- Get_Owning_Template_Parameter --
-----------------------------------
overriding function Get_Owning_Template_Parameter
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Owning_Template_Parameter
(Self.Element)));
end Get_Owning_Template_Parameter;
-----------------------------------
-- Set_Owning_Template_Parameter --
-----------------------------------
overriding procedure Set_Owning_Template_Parameter
(Self : not null access UML_Literal_Real_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Owning_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Owning_Template_Parameter;
----------------------------
-- Get_Template_Parameter --
----------------------------
overriding function Get_Template_Parameter
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Template_Parameters.UML_Template_Parameter_Access is
begin
return
AMF.UML.Template_Parameters.UML_Template_Parameter_Access
(AMF.Internals.Helpers.To_Element
(AMF.Internals.Tables.UML_Attributes.Internal_Get_Template_Parameter
(Self.Element)));
end Get_Template_Parameter;
----------------------------
-- Set_Template_Parameter --
----------------------------
overriding procedure Set_Template_Parameter
(Self : not null access UML_Literal_Real_Proxy;
To : AMF.UML.Template_Parameters.UML_Template_Parameter_Access) is
begin
AMF.Internals.Tables.UML_Attributes.Internal_Set_Template_Parameter
(Self.Element,
AMF.Internals.Helpers.To_Element
(AMF.Elements.Element_Access (To)));
end Set_Template_Parameter;
-------------------
-- Is_Computable --
-------------------
overriding function Is_Computable
(Self : not null access constant UML_Literal_Real_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Computable unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Is_Computable";
return Is_Computable (Self);
end Is_Computable;
----------------
-- Real_Value --
----------------
overriding function Real_Value
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.Real is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Real_Value unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Real_Value";
return Real_Value (Self);
end Real_Value;
------------------------
-- Is_Compatible_With --
------------------------
overriding function Is_Compatible_With
(Self : not null access constant UML_Literal_Real_Proxy;
P : AMF.UML.Parameterable_Elements.UML_Parameterable_Element_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Compatible_With unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Is_Compatible_With";
return Is_Compatible_With (Self, P);
end Is_Compatible_With;
----------------
-- Real_Value --
----------------
overriding function Real_Value
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.Optional_Real is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Real_Value unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Real_Value";
return Real_Value (Self);
end Real_Value;
-------------------------
-- All_Owning_Packages --
-------------------------
overriding function All_Owning_Packages
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Packages.Collections.Set_Of_UML_Package is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "All_Owning_Packages unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.All_Owning_Packages";
return All_Owning_Packages (Self);
end All_Owning_Packages;
-----------------------------
-- Is_Distinguishable_From --
-----------------------------
overriding function Is_Distinguishable_From
(Self : not null access constant UML_Literal_Real_Proxy;
N : AMF.UML.Named_Elements.UML_Named_Element_Access;
Ns : AMF.UML.Namespaces.UML_Namespace_Access)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Distinguishable_From unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Is_Distinguishable_From";
return Is_Distinguishable_From (Self, N, Ns);
end Is_Distinguishable_From;
---------------
-- Namespace --
---------------
overriding function Namespace
(Self : not null access constant UML_Literal_Real_Proxy)
return AMF.UML.Namespaces.UML_Namespace_Access is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Namespace unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Namespace";
return Namespace (Self);
end Namespace;
---------------------------
-- Is_Template_Parameter --
---------------------------
overriding function Is_Template_Parameter
(Self : not null access constant UML_Literal_Real_Proxy)
return Boolean is
begin
-- Generated stub: replace with real body!
pragma Compile_Time_Warning (Standard.True, "Is_Template_Parameter unimplemented");
raise Program_Error with "Unimplemented procedure UML_Literal_Real_Proxy.Is_Template_Parameter";
return Is_Template_Parameter (Self);
end Is_Template_Parameter;
end AMF.Internals.UML_Literal_Reals;
|
faelys/natools | Ada | 1,906 | ads | ------------------------------------------------------------------------------
-- Copyright (c) 2014, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.S_Expressions.Templates.Tests gathers all test suites for the --
-- S-expression template systems. --
------------------------------------------------------------------------------
with Natools.Tests;
package Natools.S_Expressions.Templates.Tests is
package NT renames Natools.Tests;
procedure All_Tests (Report : in out NT.Reporter'Class);
procedure Test_Date (Report : in out NT.Reporter'Class);
procedure Test_Discrete (Report : in out NT.Reporter'Class);
procedure Test_Integers (Report : in out NT.Reporter'Class);
end Natools.S_Expressions.Templates.Tests;
|
AdaCore/libadalang | Ada | 266 | adb | procedure Main is
package P is
private
type T;
procedure F (X : access T);
type T is null record;
end P;
package body P is
function F (X : access T) is
begin
null;
end F;
end P;
begin
null;
end Main;
|
faelys/natools | Ada | 5,018 | ads | ------------------------------------------------------------------------------
-- Copyright (c) 2016, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Smaz_Implementations.Base_64 provides the subprograms needed to --
-- instantiate Natools.Smaz_Generic into a variant of the Smaz compression --
-- algorithm that output directly base-64 printable symbols, but with a --
-- dictionary containing at most 61 elements. --
-- --
-- Similarly to original Smaz, low-numbered base-64 digit are indices in --
-- the static dictionary, while high-numbered ones are verbatim headers. --
-- The verbatim headers all indicate a number of bytes in the decoded --
-- stream, and it is encoded without padding characters in the output (e.g. --
-- a two-byte verbatim sequence would be encoded as only three base-64 --
-- symbols). --
-- --
-- When Variable_Length_Verbatim is True, the same scheme as original Smaz --
-- is used: 62 means one verbatim byte (encoded in two base-64 digits), 61 --
-- means two verbatim bytes, and so on, while 63 is followed by the number --
-- of bytes on top of the hardcoded ones. For example, with a 60-entry --
-- dictionary, 59 means the last dictionary entry, and 60 means 3-byte --
-- verbatim string, and 63, 0 means 4-byte verbatim string. --
-- --
-- When Variable_Length_Verbatim is False, another variable-length scheme --
-- is used, where the number of extra blocks is stored in the padding bits. --
-- * 111111 nnnnnn ... means (n+1) 3-byte blocks of verbatim data, --
-- * 111110 AAAAAA AAnnnn ... means n 3-byte blocks and 1 byte (A), --
-- * 111101 AAAAAA AABBBB BBBBnn ... means n 3-byte blocks and 2 bytes --
-- If the dictionary is smaller, the extra codes are used for further 3n+2 --
-- blocks. For example, 60 would then mean 3(n+4)+2 bytes of verbatim data. --
------------------------------------------------------------------------------
with Ada.Streams;
with Natools.Smaz_Implementations.Base_64_Tools;
package Natools.Smaz_Implementations.Base_64 is
pragma Pure;
procedure Read_Code
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Code : out Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit;
Verbatim_Length : out Natural;
Last_Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit;
Variable_Length_Verbatim : in Boolean);
procedure Read_Verbatim
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Output : out String);
procedure Skip_Verbatim
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Verbatim_Length : in Positive);
function Verbatim_Size
(Input_Length : in Positive;
Last_Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit;
Variable_Length_Verbatim : in Boolean)
return Ada.Streams.Stream_Element_Count;
procedure Write_Code
(Output : in out Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit);
procedure Write_Verbatim
(Output : in out Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Input : in String;
Last_Code : in Natools.Smaz_Implementations.Base_64_Tools.Base_64_Digit;
Variable_Length_Verbatim : in Boolean);
end Natools.Smaz_Implementations.Base_64;
|
stcarrez/ada-asf | Ada | 999 | ads | -----------------------------------------------------------------------
-- nodes-factory -- Tag Factory
-- Copyright (C) 2009, 2010 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with EL.Functions;
package ASF.Views.Nodes.Factory is
function Functions return EL.Functions.Function_Mapper_Access;
end ASF.Views.Nodes.Factory;
|
reznikmm/matreshka | Ada | 4,724 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A classifier has the ability to own ports as specific and type checked
-- interaction points.
------------------------------------------------------------------------------
limited with AMF.UML.Ports.Collections;
with AMF.UML.Structured_Classifiers;
package AMF.UML.Encapsulated_Classifiers is
pragma Preelaborate;
type UML_Encapsulated_Classifier is limited interface
and AMF.UML.Structured_Classifiers.UML_Structured_Classifier;
type UML_Encapsulated_Classifier_Access is
access all UML_Encapsulated_Classifier'Class;
for UML_Encapsulated_Classifier_Access'Storage_Size use 0;
not overriding function Get_Owned_Port
(Self : not null access constant UML_Encapsulated_Classifier)
return AMF.UML.Ports.Collections.Set_Of_UML_Port is abstract;
-- Getter of EncapsulatedClassifier::ownedPort.
--
-- References a set of ports that an encapsulated classifier owns.
not overriding function Owned_Port
(Self : not null access constant UML_Encapsulated_Classifier)
return AMF.UML.Ports.Collections.Set_Of_UML_Port is abstract;
-- Operation EncapsulatedClassifier::ownedPort.
--
-- Missing derivation for EncapsulatedClassifier::/ownedPort : Port
end AMF.UML.Encapsulated_Classifiers;
|
erik/adabot | Ada | 2,256 | adb | package body Commands is
procedure Install_Bot_Commands (Conn : in out Connection) is
begin
Irc.Commands.Install_Commands (Conn);
-- PRIVMSG commands
Conn.On_Privmsg ("$join ", Join_Channel'Access);
Conn.On_Privmsg ("$part ", Part_Channel'Access);
Conn.On_Privmsg ("$ping", Ping_Pong'Access);
Conn.On_Privmsg ("$slowpoke", Slowpoke'Access);
end Install_Bot_Commands;
----------------------------
-- Begin PRIVMSG commands --
----------------------------
procedure Join_Channel (Conn : in out Connection;
Msg : IrcMessage) is
Channel : String
:= SU.To_String (Msg.Privmsg.Target);
Target : String
:= SU.Slice (Msg.Privmsg.Content,
SU.Index (Msg.Privmsg.Content, " "),
SU.Length (Msg.Privmsg.Content));
begin
if Conn.Is_Admin (Msg.Sender) then
Conn.Privmsg (Channel, "yeah, sure");
Conn.Join (Target);
else
Conn.Privmsg (Channel, "absolutely not.");
end if;
end Join_Channel;
procedure Part_Channel (Conn : in out Connection;
Msg : IrcMessage) is
Channel : String
:= SU.To_String (Msg.Privmsg.Target);
Target : String
:= SU.Slice (Msg.Privmsg.Content,
SU.Index (Msg.Privmsg.Content, " "),
SU.Length (Msg.Privmsg.Content));
begin
if Conn.Is_Admin (Msg.Sender) then
Conn.Privmsg (Channel, "yeah, sure");
Conn.Command (Cmd => "PART", Args => Target);
else
Conn.Privmsg (Channel, "absolutely not.");
end if;
end Part_Channel;
procedure Ping_Pong (Conn : in out Connection;
Msg : IrcMessage) is
Nick : String
:= SU.Slice (Msg.Sender, 1, SU.Index (Msg.Sender, "!") - 1);
begin
Conn.Privmsg (SU.To_String (Msg.Privmsg.Target), Nick & ": pong");
end Ping_Pong;
procedure Slowpoke (Conn : in out Connection;
Msg : IrcMessage) is
begin
delay 5.0;
Conn.Privmsg (SU.To_String (Msg.Privmsg.Target),
"...poke.");
end Slowpoke;
end Commands;
|
mirror/ncurses | Ada | 3,632 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT ncurses Binding Samples --
-- --
-- Status --
-- --
-- S P E C --
-- --
------------------------------------------------------------------------------
-- Copyright 2020 Thomas E. Dickey --
-- Copyright 1998-2002,2003 Free Software Foundation, Inc. --
-- --
-- Permission is hereby granted, free of charge, to any person obtaining a --
-- copy of this software and associated documentation files (the --
-- "Software"), to deal in the Software without restriction, including --
-- without limitation the rights to use, copy, modify, merge, publish, --
-- distribute, distribute with modifications, sublicense, and/or sell --
-- copies of the Software, and to permit persons to whom the Software is --
-- furnished to do so, subject to the following conditions: --
-- --
-- The above copyright notice and this permission notice shall be included --
-- in all copies or substantial portions of the Software. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS --
-- OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF --
-- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. --
-- IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, --
-- DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR --
-- OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR --
-- THE USE OR OTHER DEALINGS IN THE SOFTWARE. --
-- --
-- Except as contained in this notice, the name(s) of the above copyright --
-- holders shall not be used in advertising or otherwise to promote the --
-- sale, use or other dealings in this Software without prior written --
-- authorization. --
------------------------------------------------------------------------------
-- Author: Laurent Pautet <[email protected]>
-- Modified by: Juergen Pfeifer, 1997
-- Version Control
-- $Revision: 1.11 $
-- Binding Version 01.00
------------------------------------------------------------------------------
-- This package has been contributed by Laurent Pautet <[email protected]> --
-- --
with Ada.Interrupts.Names;
package Status is
pragma Warnings (Off); -- the next pragma exists since 3.11p
pragma Unreserve_All_Interrupts;
pragma Warnings (On);
protected Process is
procedure Stop;
function Continue return Boolean;
pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
private
Done : Boolean := False;
end Process;
end Status;
|
rogermc2/GA_Ada | Ada | 10,191 | ads |
with Interfaces;
with GL.Types;
with GA_Maths;
with Blade_Types;
with E3GA;
with Multivectors;
with Multivector_Type_Base;
package C3GA is
-- Vector_E3 corresponds to c3ga.vectorE3GA coordinate storage float m_c[3]
subtype Vector_E3 is GL.Types.Singles.Vector3;
subtype Vector_E3_Array is GL.Types.Singles.Vector3_Array;
subtype MV_Type is Multivector_Type_Base.MV_Typebase;
-- subtype Circle_Coords is E2GA.Coords_Continuous_Array (1 .. 10);
-- subtype Dual_Plane_Coords is E2GA.Coords_Continuous_Array (1 .. 4);
-- subtype Line_Coords is E2GA.Coords_Continuous_Array (1 .. 6);
-- subtype Sphere_Coords is E2GA.Coords_Continuous_Array (1 .. 5);
-- user constants
-- __ni_ct__ ni; declared in c3ga.cpp infinitiy
-- __no_ct__ no; declared in c3ga.cpp origin
-- type Point is private; -- 5D conformal null vector
-- type Scalar is private;
-- type Vector_C3GA is private;
-- subtype Point is Multivectors.Multivector;
subtype Sphere is Multivectors.Multivector;
subtype Dual_Sphere is Multivectors.Multivector;
type Dual_Sphere_Array is array (integer range <>) of Dual_Sphere;
type C3GA_Normalized_Point is array (1 .. 5) of Float;
MV_Basis_Vector_Names : constant array (0 .. 4) of String (1 .. 2) :=
("no", "e1", "e2", "e3", "ni");
-- MV_Basis_Elements contains the order of basis elements
-- in the general multivector
MV_Basis_Elements : constant array (1 .. 32, 1 .. 6) of integer :=
((-1, 0, 0, 0, 0, 0),
(0, -1, 0, 0, 0, 0),
(1, -1, 0, 0, 0, 0),
(2, -1, 0, 0, 0, 0),
(3, -1, 0, 0, 0, 0),
(4, -1, 0, 0, 0, 0),
(0, 1, -1, 0, 0, 0),
(0, 2, -1, 0, 0, 0),
(0, 3, -1, 0, 0, 0),
(1, 2, -1, 0, 0, 0),
(2, 3, -1, 0, 0, 0),
(1, 3, -1, 0, 0, 0),
(1, 4, -1, 0, 0, 0),
(2, 4, -1, 0, 0, 0),
(3, 4, -1, 0, 0, 0),
(0, 4, -1, 0, 0, 0),
(2, 3, 4, -1, 0, 0),
(1, 3, 4, -1, 0, 0),
(1, 2, 4, -1, 0, 0),
(0, 3, 4, -1, 0, 0),
(0, 1, 4, -1, 0, 0),
(0, 2, 4, -1, 0, 0),
(0, 2, 3, -1, 0, 0),
(0, 1, 3, -1, 0, 0),
(0, 1, 2, -1, 0, 0),
(1, 2, 3, -1, 0, 0),
(1, 2, 3, 4, -1, 0),
(0, 2, 3, 4, -1, 0),
(0, 1, 3, 4, -1, 0),
(0, 1, 2, 4, -1, 0),
(0, 1, 2, 3, -1, 0),
(0, 1, 2, 3, 4, -1));
-- MV_Grade_Size can be used to lookup the number of coordinates
-- for a grade part of a general multivector
-- MV_Grade_Size : constant array (0 .. 5) of Integer := (1, 5, 10, 10, 5, 1);
-- This array of integers contains the 'sign' (even/odd permutation of the canonical order)
-- of basis elements in the general multivector
-- Use it to answer 'what is the permutation of the coordinate at index [x]'?
MV_Basis_Element_Sign_By_Index : constant array (1 .. 32) of Float :=
(1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, -1.0, 1.0,
1.0, 1.0, 1.0, 1.0, -1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
1.0, 1.0, -1.0, 1.0, 1.0, 1.0);
-- Joinable grade definitions
Grade_0 : constant Interfaces.Unsigned_32 := 1;
Grade_1 : constant Interfaces.Unsigned_32 := 2;
Grade_2 : constant Interfaces.Unsigned_32 := 4;
Grade_3 : constant Interfaces.Unsigned_32 := 8;
Grade_4 : constant Interfaces.Unsigned_32 := 16;
Grade_5 : constant Interfaces.Unsigned_32 := 32;
-- function "+" (L, R : Vector_E3) return Vector_E3;
-- function "-" (L, R : Vector_E3) return Vector_E3;
function "*" (L : float; R : Vector_E3) return Vector_E3;
-- function "*" (L : Vector_E3; R : float) return Vector_E3;
-- function Coord (S : Multivectors.Scalar) return float;
-- function Init (MV : Multivectors.Multivector; Epsilon : float:= 0.0) return MV_Type;
-- Basis Vectors
function e1 return Multivectors.Multivector;
function e2 return Multivectors.Multivector;
function e3 return Multivectors.Multivector;
function ni return Multivectors.Multivector;
function no return Multivectors.Multivector;
-- Component getters
function e1 (MV : Multivectors.Multivector) return float;
function e2 (MV : Multivectors.Multivector) return float;
function e3 (MV : Multivectors.Multivector) return float;
function e1_e2 (MV : Multivectors.Multivector) return float;
function e1_e3 (MV : Multivectors.Multivector) return float;
function e2_e3 (MV : Multivectors.Multivector) return float;
function E1_E2_NI (C : Multivectors.Multivector) return float;
function E1_E2_E3 (MV : Multivectors.Multivector) return float;
function E1_E3_NI (C : Multivectors.Multivector) return float;
function E2_E3_NI (C : Multivectors.Multivector) return float;
function Get_Coords (V : Vector_E3) return GA_Maths.Float_3D;
function Get_Coords (NP : Multivectors.Normalized_Point)
return GA_Maths.Coords_Continuous_Array;
function NO_E1_E2 (C : Multivectors.Multivector) return float;
function NO_E1_E3 (C : Multivectors.Multivector) return float;
function NO_E1_NI (C : Multivectors.Multivector) return float;
function NO_E2_E3 (C : Multivectors.Multivector) return float;
function NO_E2_NI (C : Multivectors.Multivector) return float;
function NO_E3_NI (C : Multivectors.Multivector) return float;
function NO_E1_E2_E3_NI (MV : Multivectors.Multivector) return float;
function E1b (NP : Multivectors.Normalized_Point) return float;
function E2b (NP : Multivectors.Normalized_Point) return float;
function E3b (NP : Multivectors.Normalized_Point) return float;
function NIb (NP : Multivectors.Normalized_Point) return Float;
function NOb (NP : Multivectors.Normalized_Point) return Float;
function C3GA_Point (V : Vector_E3) return C3GA_Normalized_Point;
function Multivector_String (MV : Multivectors.Multivector) return String;
function Norm_E2 (V : Vector_E3) return Float;
function Norm_R (V : Vector_E3) return Float;
function Norm_R2 (V : Vector_E3) return Float;
function Probe (Pr : Blade_Types.C3_Base) return Multivectors.Normalized_Point;
function Set_Circle (P1, P2, P3 : Multivectors.Normalized_Point)
return Multivectors.Circle;
procedure Set_Coords (V : out Vector_E3; C1, C2, C3 : float);
function Set_Dual_Plane (P1 : Multivectors.Normalized_Point;
Dir : Multivectors.M_Vector)
return Multivectors.Dual_Plane;
-- procedure Set_Multivector (MV : out Multivectors.Multivector; NP : Normalized_Point);
-- procedure Set_Multivector (MV : out Multivectors.Multivector; N : GA_Base_Types.NO_T);
-- procedure Set_Multivector (MV : out Multivectors.Multivector; N : GA_Base_Types.NI_T);
-- function Set_Line (E1_E2_NI, E1_E3_NI, E2_E3_NI,
-- E1_NO_NI, E2_NO_NI, E3_NO_NI : Float) return Multivectors.Line;
function Set_Line (P1, P2 : Multivectors.Normalized_Point)
return Multivectors.Line;
function Set_Normalized_Point (E1, E2, E3 : Float)
return Multivectors.Normalized_Point;
function Set_Normalized_Point (V : Vector_E3)
return Multivectors.Normalized_Point;
function Set_Normalized_Point (Point : GA_Maths.Float_3D)
return Multivectors.Normalized_Point;
-- function Outer_Product (MV1, MV2 : Multivectors.Multivector) return Multivectors.Multivector;
-- function Unit_R (L : Multivectors.Line) return Multivectors.Line;
-- Underscore constructors
function To_VectorE3GA (MV : Multivectors.Multivector) return Vector_E3;
function To_VectorE3GA (Vec : E3GA.E3_Vector) return Vector_E3;
function NP_To_VectorE3GA (NP : Multivectors.Normalized_Point) return Vector_E3;
-- function US_Normalized_Point (N : Normalized_Point) return Normalized_Point;
-- function US_Set_Normalized_Point (Point : Vector_E3) return Normalized_Point;
-- function US_Set_Normalized_Point (E1, E2, E3 : Float) return Normalized_Point;
function Unit_E (X : C3GA.Vector_E3) return GL.Types.Singles.Vector3;
private
-- type Scalar is record
-- Coordinates : GA_Maths.Scalar_Coords; -- m_c[1]
-- end record;
-- type Circle is record -- m_c[10]
-- E1_E2_NI, E1_E2_E3, E2_E3_NI, E3_E1_NI, NO_E1_E2 : float := 0.0;
-- NO_E1_E3, NO_E1_NI, NO_E2_E3, NO_E2_NI, NO_E3_NI : float := 0.0;
-- end record;
-- type Dual_Sphere is record -- m_c[4]
-- NO, E1, E2, E3, NI : float := 0.0;
-- Inf : GA_Base_Types.NI_T;
-- end record;
-- type Line is record -- m_c[6]
-- E1_E2_NI, E1_E3_NI, E2_E3_NI : float := 0.0;
-- E1_NO_NI, E2_NO_NI, E3_NO_NI : float := 0.0;
-- end record;
-- type Normalized_Point is record -- m_c[4
-- -- Origin : float := 1.0; constant
-- E1, E2, E3 : float := 0.0;
-- Inf : float := 0.0;
-- end record;
-- type Point is record -- m_c[5]
-- Origin : GA_Base_Types.NO_T;
-- E1, E2, E3 : float := 0.0;
-- Inf : float := 0.0;
-- end record;
-- type Sphere is record -- m_c[5]
-- E1_E2_E3_NI, E1_E2_NO_NI, E1_E3_NO_NI : float := 0.0;
-- E2_E3_NO_NI, E1_E2_E3_NO : float := 0.0;
-- end record;
type Vector_C3GA is new GA_Maths.Coords_Continuous_Array (1 .. 5);
end C3GA;
|
skill-lang/adaCommon | Ada | 3,919 | ads | -- ___ _ ___ _ _ --
-- / __| |/ (_) | | Common SKilL implementation --
-- \__ \ ' <| | | |__ skill containers collection --
-- |___/_|\_\_|_|____| by: Timm Felden --
-- --
pragma Ada_2012;
limited with Skill.Types;
-- this packe solves most of ada container's shortcomings
package Skill.Containers is
-- boxed array access
type Array_Iterator_T is abstract tagged null record;
type Array_Iterator is access all Array_Iterator_T'Class;
function Has_Next (This : access Array_Iterator_T) return Boolean is abstract;
function Next
(This : access Array_Iterator_T) return Skill.Types.Box is abstract;
procedure Free (This : access Array_Iterator_T) is abstract;
-- dispatching arrays
type Boxed_Array_T is abstract tagged null record;
type Boxed_Array is access all Boxed_Array_T'Class;
procedure Append
(This : access Boxed_Array_T;
V : Skill.Types.Box) is abstract;
-- same as append; used for uniformity
procedure Add
(This : access Boxed_Array_T;
V : Skill.Types.Box) is abstract;
function Get
(This : access Boxed_Array_T;
I : Natural) return Skill.Types.Box is abstract;
procedure Update
(This : access Boxed_Array_T;
I : Natural;
V : Skill.Types.Box) is abstract;
procedure Ensure_Size
(This : access Boxed_Array_T;
I : Natural) is abstract;
function Length (This : access Boxed_Array_T) return Natural is abstract;
function Iterator
(This : access Boxed_Array_T) return Array_Iterator is abstract;
-- boxed set access
type Set_Iterator_T is abstract tagged null record;
type Set_Iterator is access all Set_Iterator_T'Class;
function Has_Next (This : access Set_Iterator_T) return Boolean is abstract;
function Next
(This : access Set_Iterator_T) return Skill.Types.Box is abstract;
procedure Free (This : access Set_Iterator_T) is abstract;
-- dispatching sets
type Boxed_Set_T is abstract tagged null record;
type Boxed_Set is access all Boxed_Set_T'Class;
procedure Add (This : access Boxed_Set_T; V : Skill.Types.Box) is abstract;
function Contains
(This : access Boxed_Set_T;
V : Skill.Types.Box) return Boolean is abstract;
function Length (This : access Boxed_Set_T) return Natural is abstract;
function Iterator
(This : access Boxed_Set_T) return Set_Iterator is abstract;
-- boxed map access
type Map_Iterator_T is abstract tagged null record;
type Map_Iterator is access all Map_Iterator_T'Class;
function Has_Next (This : access Map_Iterator_T) return Boolean is abstract;
function Key
(This : access Map_Iterator_T) return Skill.Types.Box is abstract;
function Value
(This : access Map_Iterator_T) return Skill.Types.Box is abstract;
procedure Advance (This : access Map_Iterator_T) is abstract;
procedure Free (This : access Map_Iterator_T) is abstract;
-- dispatching maps
type Boxed_Map_T is abstract tagged null record;
type Boxed_Map is access all Boxed_Map_T'Class;
function Contains
(This : access Boxed_Map_T;
V : Skill.Types.Box) return Boolean is abstract;
function Get
(This : access Boxed_Map_T;
K : Skill.Types.Box) return Skill.Types.Box is abstract;
procedure Update
(This : access Boxed_Map_T;
K : Skill.Types.Box;
V : Skill.Types.Box) is abstract;
procedure Remove
(This : access Boxed_Map_T;
K : Skill.Types.Box) is abstract;
function Length (This : access Boxed_Map_T) return Natural is abstract;
function Iterator
(This : access Boxed_Map_T) return Map_Iterator is abstract;
end Skill.Containers;
|
tum-ei-rcs/StratoX | Ada | 34,687 | ads | -- This spec has been automatically generated from STM32F429x.svd
pragma Restrictions (No_Elaboration_Code);
pragma Ada_2012;
with HAL;
with System;
package STM32_SVD.LTDC is
pragma Preelaborate;
---------------
-- Registers --
---------------
-------------------
-- SSCR_Register --
-------------------
subtype SSCR_VSH_Field is HAL.UInt11;
subtype SSCR_HSW_Field is HAL.UInt12;
-- Synchronization Size Configuration Register
type SSCR_Register is record
-- Vertical Synchronization Height (in units of horizontal scan line)
VSH : SSCR_VSH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Horizontal Synchronization Width (in units of pixel clock period)
HSW : SSCR_HSW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SSCR_Register use record
VSH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
HSW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-------------------
-- BPCR_Register --
-------------------
subtype BPCR_AVBP_Field is HAL.UInt11;
subtype BPCR_AHBP_Field is HAL.UInt12;
-- Back Porch Configuration Register
type BPCR_Register is record
-- Accumulated Vertical back porch (in units of horizontal scan line)
AVBP : BPCR_AVBP_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Accumulated Horizontal back porch (in units of pixel clock period)
AHBP : BPCR_AHBP_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BPCR_Register use record
AVBP at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
AHBP at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-------------------
-- AWCR_Register --
-------------------
subtype AWCR_AAH_Field is HAL.UInt11;
subtype AWCR_AAW_Field is HAL.UInt12;
-- Active Width Configuration Register
type AWCR_Register is record
-- Accumulated Active Height (in units of horizontal scan line)
AAH : AWCR_AAH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Accumulated Active Width (in units of pixel clock period)
AAW : AWCR_AAW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for AWCR_Register use record
AAH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
AAW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
-------------------
-- TWCR_Register --
-------------------
subtype TWCR_TOTALH_Field is HAL.UInt11;
subtype TWCR_TOTALW_Field is HAL.UInt12;
-- Total Width Configuration Register
type TWCR_Register is record
-- Total Height (in units of horizontal scan line)
TOTALH : TWCR_TOTALH_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Total Width (in units of pixel clock period)
TOTALW : TWCR_TOTALW_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for TWCR_Register use record
TOTALH at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
TOTALW at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
------------------
-- GCR_Register --
------------------
subtype GCR_DBW_Field is HAL.UInt3;
subtype GCR_DGW_Field is HAL.UInt3;
subtype GCR_DRW_Field is HAL.UInt3;
-- Global Control Register
type GCR_Register is record
-- LCD-TFT controller enable bit
LTDCEN : Boolean := False;
-- unspecified
Reserved_1_3 : HAL.UInt3 := 16#0#;
-- Read-only. Dither Blue Width
DBW : GCR_DBW_Field := 16#2#;
-- unspecified
Reserved_7_7 : HAL.Bit := 16#0#;
-- Read-only. Dither Green Width
DGW : GCR_DGW_Field := 16#2#;
-- unspecified
Reserved_11_11 : HAL.Bit := 16#0#;
-- Read-only. Dither Red Width
DRW : GCR_DRW_Field := 16#2#;
-- unspecified
Reserved_15_15 : HAL.Bit := 16#0#;
-- Dither Enable
DEN : Boolean := False;
-- unspecified
Reserved_17_27 : HAL.UInt11 := 16#0#;
-- Pixel Clock Polarity
PCPOL : Boolean := False;
-- Data Enable Polarity
DEPOL : Boolean := False;
-- Vertical Synchronization Polarity
VSPOL : Boolean := False;
-- Horizontal Synchronization Polarity
HSPOL : Boolean := False;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for GCR_Register use record
LTDCEN at 0 range 0 .. 0;
Reserved_1_3 at 0 range 1 .. 3;
DBW at 0 range 4 .. 6;
Reserved_7_7 at 0 range 7 .. 7;
DGW at 0 range 8 .. 10;
Reserved_11_11 at 0 range 11 .. 11;
DRW at 0 range 12 .. 14;
Reserved_15_15 at 0 range 15 .. 15;
DEN at 0 range 16 .. 16;
Reserved_17_27 at 0 range 17 .. 27;
PCPOL at 0 range 28 .. 28;
DEPOL at 0 range 29 .. 29;
VSPOL at 0 range 30 .. 30;
HSPOL at 0 range 31 .. 31;
end record;
-------------------
-- SRCR_Register --
-------------------
-- Shadow Reload Configuration Register
type SRCR_Register is record
-- Immediate Reload
IMR : Boolean := False;
-- Vertical Blanking Reload
VBR : Boolean := False;
-- unspecified
Reserved_2_31 : HAL.UInt30 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for SRCR_Register use record
IMR at 0 range 0 .. 0;
VBR at 0 range 1 .. 1;
Reserved_2_31 at 0 range 2 .. 31;
end record;
-------------------
-- BCCR_Register --
-------------------
subtype BCCR_BC_Field is HAL.UInt24;
-- Background Color Configuration Register
type BCCR_Register is record
-- Background Color Red value
BC : BCCR_BC_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for BCCR_Register use record
BC at 0 range 0 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
------------------
-- IER_Register --
------------------
-- Interrupt Enable Register
type IER_Register is record
-- Line Interrupt Enable
LIE : Boolean := False;
-- FIFO Underrun Interrupt Enable
FUIE : Boolean := False;
-- Transfer Error Interrupt Enable
TERRIE : Boolean := False;
-- Register Reload interrupt enable
RRIE : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for IER_Register use record
LIE at 0 range 0 .. 0;
FUIE at 0 range 1 .. 1;
TERRIE at 0 range 2 .. 2;
RRIE at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
------------------
-- ISR_Register --
------------------
-- Interrupt Status Register
type ISR_Register is record
-- Read-only. Line Interrupt flag
LIF : Boolean;
-- Read-only. FIFO Underrun Interrupt flag
FUIF : Boolean;
-- Read-only. Transfer Error interrupt flag
TERRIF : Boolean;
-- Read-only. Register Reload Interrupt Flag
RRIF : Boolean;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ISR_Register use record
LIF at 0 range 0 .. 0;
FUIF at 0 range 1 .. 1;
TERRIF at 0 range 2 .. 2;
RRIF at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
------------------
-- ICR_Register --
------------------
-- Interrupt Clear Register
type ICR_Register is record
-- Write-only. Clears the Line Interrupt Flag
CLIF : Boolean := False;
-- Write-only. Clears the FIFO Underrun Interrupt flag
CFUIF : Boolean := False;
-- Write-only. Clears the Transfer Error Interrupt Flag
CTERRIF : Boolean := False;
-- Write-only. Clears Register Reload Interrupt Flag
CRRIF : Boolean := False;
-- unspecified
Reserved_4_31 : HAL.UInt28 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for ICR_Register use record
CLIF at 0 range 0 .. 0;
CFUIF at 0 range 1 .. 1;
CTERRIF at 0 range 2 .. 2;
CRRIF at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
--------------------
-- LIPCR_Register --
--------------------
subtype LIPCR_LIPOS_Field is HAL.UInt11;
-- Line Interrupt Position Configuration Register
type LIPCR_Register is record
-- Line Interrupt Position
LIPOS : LIPCR_LIPOS_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for LIPCR_Register use record
LIPOS at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-------------------
-- CPSR_Register --
-------------------
subtype CPSR_CYPOS_Field is HAL.Short;
subtype CPSR_CXPOS_Field is HAL.Short;
-- Current Position Status Register
type CPSR_Register is record
-- Read-only. Current Y Position
CYPOS : CPSR_CYPOS_Field;
-- Read-only. Current X Position
CXPOS : CPSR_CXPOS_Field;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CPSR_Register use record
CYPOS at 0 range 0 .. 15;
CXPOS at 0 range 16 .. 31;
end record;
-------------------
-- CDSR_Register --
-------------------
-- Current Display Status Register
type CDSR_Register is record
-- Read-only. Vertical Data Enable display Status
VDES : Boolean;
-- Read-only. Horizontal Data Enable display Status
HDES : Boolean;
-- Read-only. Vertical Synchronization display Status
VSYNCS : Boolean;
-- Read-only. Horizontal Synchronization display Status
HSYNCS : Boolean;
-- unspecified
Reserved_4_31 : HAL.UInt28;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for CDSR_Register use record
VDES at 0 range 0 .. 0;
HDES at 0 range 1 .. 1;
VSYNCS at 0 range 2 .. 2;
HSYNCS at 0 range 3 .. 3;
Reserved_4_31 at 0 range 4 .. 31;
end record;
-------------------
-- L1CR_Register --
-------------------
-- Layerx Control Register
type L1CR_Register is record
-- Layer Enable
LEN : Boolean := False;
-- Color Keying Enable
COLKEN : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Color Look-Up Table Enable
CLUTEN : Boolean := False;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CR_Register use record
LEN at 0 range 0 .. 0;
COLKEN at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
CLUTEN at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
----------------------
-- L1WHPCR_Register --
----------------------
subtype L1WHPCR_WHSTPOS_Field is HAL.UInt12;
subtype L1WHPCR_WHSPPOS_Field is HAL.UInt12;
-- Layerx Window Horizontal Position Configuration Register
type L1WHPCR_Register is record
-- Window Horizontal Start Position
WHSTPOS : L1WHPCR_WHSTPOS_Field := 16#0#;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Window Horizontal Stop Position
WHSPPOS : L1WHPCR_WHSPPOS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1WHPCR_Register use record
WHSTPOS at 0 range 0 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
WHSPPOS at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
----------------------
-- L1WVPCR_Register --
----------------------
subtype L1WVPCR_WVSTPOS_Field is HAL.UInt11;
subtype L1WVPCR_WVSPPOS_Field is HAL.UInt11;
-- Layerx Window Vertical Position Configuration Register
type L1WVPCR_Register is record
-- Window Vertical Start Position
WVSTPOS : L1WVPCR_WVSTPOS_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Window Vertical Stop Position
WVSPPOS : L1WVPCR_WVSPPOS_Field := 16#0#;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1WVPCR_Register use record
WVSTPOS at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
WVSPPOS at 0 range 16 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
---------------------
-- L1CKCR_Register --
---------------------
subtype L1CKCR_CKBLUE_Field is HAL.Byte;
subtype L1CKCR_CKGREEN_Field is HAL.Byte;
subtype L1CKCR_CKRED_Field is HAL.Byte;
-- Layerx Color Keying Configuration Register
type L1CKCR_Register is record
-- Color Key Blue value
CKBLUE : L1CKCR_CKBLUE_Field := 16#0#;
-- Color Key Green value
CKGREEN : L1CKCR_CKGREEN_Field := 16#0#;
-- Color Key Red value
CKRED : L1CKCR_CKRED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CKCR_Register use record
CKBLUE at 0 range 0 .. 7;
CKGREEN at 0 range 8 .. 15;
CKRED at 0 range 16 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
---------------------
-- L1PFCR_Register --
---------------------
subtype L1PFCR_PF_Field is HAL.UInt3;
-- Layerx Pixel Format Configuration Register
type L1PFCR_Register is record
-- Pixel Format
PF : L1PFCR_PF_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1PFCR_Register use record
PF at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
---------------------
-- L1CACR_Register --
---------------------
subtype L1CACR_CONSTA_Field is HAL.Byte;
-- Layerx Constant Alpha Configuration Register
type L1CACR_Register is record
-- Constant Alpha
CONSTA : L1CACR_CONSTA_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CACR_Register use record
CONSTA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
---------------------
-- L1DCCR_Register --
---------------------
subtype L1DCCR_DCBLUE_Field is HAL.Byte;
subtype L1DCCR_DCGREEN_Field is HAL.Byte;
subtype L1DCCR_DCRED_Field is HAL.Byte;
subtype L1DCCR_DCALPHA_Field is HAL.Byte;
-- Layerx Default Color Configuration Register
type L1DCCR_Register is record
-- Default Color Blue
DCBLUE : L1DCCR_DCBLUE_Field := 16#0#;
-- Default Color Green
DCGREEN : L1DCCR_DCGREEN_Field := 16#0#;
-- Default Color Red
DCRED : L1DCCR_DCRED_Field := 16#0#;
-- Default Color Alpha
DCALPHA : L1DCCR_DCALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1DCCR_Register use record
DCBLUE at 0 range 0 .. 7;
DCGREEN at 0 range 8 .. 15;
DCRED at 0 range 16 .. 23;
DCALPHA at 0 range 24 .. 31;
end record;
---------------------
-- L1BFCR_Register --
---------------------
subtype L1BFCR_BF2_Field is HAL.UInt3;
subtype L1BFCR_BF1_Field is HAL.UInt3;
-- Layerx Blending Factors Configuration Register
type L1BFCR_Register is record
-- Blending Factor 2
BF2 : L1BFCR_BF2_Field := 16#7#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Blending Factor 1
BF1 : L1BFCR_BF1_Field := 16#6#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1BFCR_Register use record
BF2 at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
BF1 at 0 range 8 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
----------------------
-- L1CFBLR_Register --
----------------------
subtype L1CFBLR_CFBLL_Field is HAL.UInt13;
subtype L1CFBLR_CFBP_Field is HAL.UInt13;
-- Layerx Color Frame Buffer Length Register
type L1CFBLR_Register is record
-- Color Frame Buffer Line Length
CFBLL : L1CFBLR_CFBLL_Field := 16#0#;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- Color Frame Buffer Pitch in bytes
CFBP : L1CFBLR_CFBP_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CFBLR_Register use record
CFBLL at 0 range 0 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
CFBP at 0 range 16 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-----------------------
-- L1CFBLNR_Register --
-----------------------
subtype L1CFBLNR_CFBLNBR_Field is HAL.UInt11;
-- Layerx ColorFrame Buffer Line Number Register
type L1CFBLNR_Register is record
-- Frame Buffer Line Number
CFBLNBR : L1CFBLNR_CFBLNBR_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CFBLNR_Register use record
CFBLNBR at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-----------------------
-- L1CLUTWR_Register --
-----------------------
subtype L1CLUTWR_BLUE_Field is HAL.Byte;
subtype L1CLUTWR_GREEN_Field is HAL.Byte;
subtype L1CLUTWR_RED_Field is HAL.Byte;
subtype L1CLUTWR_CLUTADD_Field is HAL.Byte;
-- Layerx CLUT Write Register
type L1CLUTWR_Register is record
-- Write-only. Blue value
BLUE : L1CLUTWR_BLUE_Field := 16#0#;
-- Write-only. Green value
GREEN : L1CLUTWR_GREEN_Field := 16#0#;
-- Write-only. Red value
RED : L1CLUTWR_RED_Field := 16#0#;
-- Write-only. CLUT Address
CLUTADD : L1CLUTWR_CLUTADD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L1CLUTWR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
CLUTADD at 0 range 24 .. 31;
end record;
-------------------
-- L2CR_Register --
-------------------
-- Layerx Control Register
type L2CR_Register is record
-- Layer Enable
LEN : Boolean := False;
-- Color Keying Enable
COLKEN : Boolean := False;
-- unspecified
Reserved_2_3 : HAL.UInt2 := 16#0#;
-- Color Look-Up Table Enable
CLUTEN : Boolean := False;
-- unspecified
Reserved_5_31 : HAL.UInt27 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CR_Register use record
LEN at 0 range 0 .. 0;
COLKEN at 0 range 1 .. 1;
Reserved_2_3 at 0 range 2 .. 3;
CLUTEN at 0 range 4 .. 4;
Reserved_5_31 at 0 range 5 .. 31;
end record;
----------------------
-- L2WHPCR_Register --
----------------------
subtype L2WHPCR_WHSTPOS_Field is HAL.UInt12;
subtype L2WHPCR_WHSPPOS_Field is HAL.UInt12;
-- Layerx Window Horizontal Position Configuration Register
type L2WHPCR_Register is record
-- Window Horizontal Start Position
WHSTPOS : L2WHPCR_WHSTPOS_Field := 16#0#;
-- unspecified
Reserved_12_15 : HAL.UInt4 := 16#0#;
-- Window Horizontal Stop Position
WHSPPOS : L2WHPCR_WHSPPOS_Field := 16#0#;
-- unspecified
Reserved_28_31 : HAL.UInt4 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2WHPCR_Register use record
WHSTPOS at 0 range 0 .. 11;
Reserved_12_15 at 0 range 12 .. 15;
WHSPPOS at 0 range 16 .. 27;
Reserved_28_31 at 0 range 28 .. 31;
end record;
----------------------
-- L2WVPCR_Register --
----------------------
subtype L2WVPCR_WVSTPOS_Field is HAL.UInt11;
subtype L2WVPCR_WVSPPOS_Field is HAL.UInt11;
-- Layerx Window Vertical Position Configuration Register
type L2WVPCR_Register is record
-- Window Vertical Start Position
WVSTPOS : L2WVPCR_WVSTPOS_Field := 16#0#;
-- unspecified
Reserved_11_15 : HAL.UInt5 := 16#0#;
-- Window Vertical Stop Position
WVSPPOS : L2WVPCR_WVSPPOS_Field := 16#0#;
-- unspecified
Reserved_27_31 : HAL.UInt5 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2WVPCR_Register use record
WVSTPOS at 0 range 0 .. 10;
Reserved_11_15 at 0 range 11 .. 15;
WVSPPOS at 0 range 16 .. 26;
Reserved_27_31 at 0 range 27 .. 31;
end record;
---------------------
-- L2CKCR_Register --
---------------------
subtype L2CKCR_CKBLUE_Field is HAL.Byte;
subtype L2CKCR_CKGREEN_Field is HAL.UInt7;
subtype L2CKCR_CKRED_Field is HAL.UInt9;
-- Layerx Color Keying Configuration Register
type L2CKCR_Register is record
-- Color Key Blue value
CKBLUE : L2CKCR_CKBLUE_Field := 16#0#;
-- Color Key Green value
CKGREEN : L2CKCR_CKGREEN_Field := 16#0#;
-- Color Key Red value
CKRED : L2CKCR_CKRED_Field := 16#0#;
-- unspecified
Reserved_24_31 : HAL.Byte := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CKCR_Register use record
CKBLUE at 0 range 0 .. 7;
CKGREEN at 0 range 8 .. 14;
CKRED at 0 range 15 .. 23;
Reserved_24_31 at 0 range 24 .. 31;
end record;
---------------------
-- L2PFCR_Register --
---------------------
subtype L2PFCR_PF_Field is HAL.UInt3;
-- Layerx Pixel Format Configuration Register
type L2PFCR_Register is record
-- Pixel Format
PF : L2PFCR_PF_Field := 16#0#;
-- unspecified
Reserved_3_31 : HAL.UInt29 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2PFCR_Register use record
PF at 0 range 0 .. 2;
Reserved_3_31 at 0 range 3 .. 31;
end record;
---------------------
-- L2CACR_Register --
---------------------
subtype L2CACR_CONSTA_Field is HAL.Byte;
-- Layerx Constant Alpha Configuration Register
type L2CACR_Register is record
-- Constant Alpha
CONSTA : L2CACR_CONSTA_Field := 16#0#;
-- unspecified
Reserved_8_31 : HAL.UInt24 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CACR_Register use record
CONSTA at 0 range 0 .. 7;
Reserved_8_31 at 0 range 8 .. 31;
end record;
---------------------
-- L2DCCR_Register --
---------------------
subtype L2DCCR_DCBLUE_Field is HAL.Byte;
subtype L2DCCR_DCGREEN_Field is HAL.Byte;
subtype L2DCCR_DCRED_Field is HAL.Byte;
subtype L2DCCR_DCALPHA_Field is HAL.Byte;
-- Layerx Default Color Configuration Register
type L2DCCR_Register is record
-- Default Color Blue
DCBLUE : L2DCCR_DCBLUE_Field := 16#0#;
-- Default Color Green
DCGREEN : L2DCCR_DCGREEN_Field := 16#0#;
-- Default Color Red
DCRED : L2DCCR_DCRED_Field := 16#0#;
-- Default Color Alpha
DCALPHA : L2DCCR_DCALPHA_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2DCCR_Register use record
DCBLUE at 0 range 0 .. 7;
DCGREEN at 0 range 8 .. 15;
DCRED at 0 range 16 .. 23;
DCALPHA at 0 range 24 .. 31;
end record;
---------------------
-- L2BFCR_Register --
---------------------
subtype L2BFCR_BF2_Field is HAL.UInt3;
subtype L2BFCR_BF1_Field is HAL.UInt3;
-- Layerx Blending Factors Configuration Register
type L2BFCR_Register is record
-- Blending Factor 2
BF2 : L2BFCR_BF2_Field := 16#7#;
-- unspecified
Reserved_3_7 : HAL.UInt5 := 16#0#;
-- Blending Factor 1
BF1 : L2BFCR_BF1_Field := 16#6#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2BFCR_Register use record
BF2 at 0 range 0 .. 2;
Reserved_3_7 at 0 range 3 .. 7;
BF1 at 0 range 8 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
----------------------
-- L2CFBLR_Register --
----------------------
subtype L2CFBLR_CFBLL_Field is HAL.UInt13;
subtype L2CFBLR_CFBP_Field is HAL.UInt13;
-- Layerx Color Frame Buffer Length Register
type L2CFBLR_Register is record
-- Color Frame Buffer Line Length
CFBLL : L2CFBLR_CFBLL_Field := 16#0#;
-- unspecified
Reserved_13_15 : HAL.UInt3 := 16#0#;
-- Color Frame Buffer Pitch in bytes
CFBP : L2CFBLR_CFBP_Field := 16#0#;
-- unspecified
Reserved_29_31 : HAL.UInt3 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CFBLR_Register use record
CFBLL at 0 range 0 .. 12;
Reserved_13_15 at 0 range 13 .. 15;
CFBP at 0 range 16 .. 28;
Reserved_29_31 at 0 range 29 .. 31;
end record;
-----------------------
-- L2CFBLNR_Register --
-----------------------
subtype L2CFBLNR_CFBLNBR_Field is HAL.UInt11;
-- Layerx ColorFrame Buffer Line Number Register
type L2CFBLNR_Register is record
-- Frame Buffer Line Number
CFBLNBR : L2CFBLNR_CFBLNBR_Field := 16#0#;
-- unspecified
Reserved_11_31 : HAL.UInt21 := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CFBLNR_Register use record
CFBLNBR at 0 range 0 .. 10;
Reserved_11_31 at 0 range 11 .. 31;
end record;
-----------------------
-- L2CLUTWR_Register --
-----------------------
subtype L2CLUTWR_BLUE_Field is HAL.Byte;
subtype L2CLUTWR_GREEN_Field is HAL.Byte;
subtype L2CLUTWR_RED_Field is HAL.Byte;
subtype L2CLUTWR_CLUTADD_Field is HAL.Byte;
-- Layerx CLUT Write Register
type L2CLUTWR_Register is record
-- Write-only. Blue value
BLUE : L2CLUTWR_BLUE_Field := 16#0#;
-- Write-only. Green value
GREEN : L2CLUTWR_GREEN_Field := 16#0#;
-- Write-only. Red value
RED : L2CLUTWR_RED_Field := 16#0#;
-- Write-only. CLUT Address
CLUTADD : L2CLUTWR_CLUTADD_Field := 16#0#;
end record
with Volatile_Full_Access, Size => 32,
Bit_Order => System.Low_Order_First;
for L2CLUTWR_Register use record
BLUE at 0 range 0 .. 7;
GREEN at 0 range 8 .. 15;
RED at 0 range 16 .. 23;
CLUTADD at 0 range 24 .. 31;
end record;
-----------------
-- Peripherals --
-----------------
-- LCD-TFT Controller
type LTDC_Peripheral is record
-- Synchronization Size Configuration Register
SSCR : SSCR_Register;
-- Back Porch Configuration Register
BPCR : BPCR_Register;
-- Active Width Configuration Register
AWCR : AWCR_Register;
-- Total Width Configuration Register
TWCR : TWCR_Register;
-- Global Control Register
GCR : GCR_Register;
-- Shadow Reload Configuration Register
SRCR : SRCR_Register;
-- Background Color Configuration Register
BCCR : BCCR_Register;
-- Interrupt Enable Register
IER : IER_Register;
-- Interrupt Status Register
ISR : ISR_Register;
-- Interrupt Clear Register
ICR : ICR_Register;
-- Line Interrupt Position Configuration Register
LIPCR : LIPCR_Register;
-- Current Position Status Register
CPSR : CPSR_Register;
-- Current Display Status Register
CDSR : CDSR_Register;
-- Layerx Control Register
L1CR : L1CR_Register;
-- Layerx Window Horizontal Position Configuration Register
L1WHPCR : L1WHPCR_Register;
-- Layerx Window Vertical Position Configuration Register
L1WVPCR : L1WVPCR_Register;
-- Layerx Color Keying Configuration Register
L1CKCR : L1CKCR_Register;
-- Layerx Pixel Format Configuration Register
L1PFCR : L1PFCR_Register;
-- Layerx Constant Alpha Configuration Register
L1CACR : L1CACR_Register;
-- Layerx Default Color Configuration Register
L1DCCR : L1DCCR_Register;
-- Layerx Blending Factors Configuration Register
L1BFCR : L1BFCR_Register;
-- Layerx Color Frame Buffer Address Register
L1CFBAR : HAL.Word;
-- Layerx Color Frame Buffer Length Register
L1CFBLR : L1CFBLR_Register;
-- Layerx ColorFrame Buffer Line Number Register
L1CFBLNR : L1CFBLNR_Register;
-- Layerx CLUT Write Register
L1CLUTWR : L1CLUTWR_Register;
-- Layerx Control Register
L2CR : L2CR_Register;
-- Layerx Window Horizontal Position Configuration Register
L2WHPCR : L2WHPCR_Register;
-- Layerx Window Vertical Position Configuration Register
L2WVPCR : L2WVPCR_Register;
-- Layerx Color Keying Configuration Register
L2CKCR : L2CKCR_Register;
-- Layerx Pixel Format Configuration Register
L2PFCR : L2PFCR_Register;
-- Layerx Constant Alpha Configuration Register
L2CACR : L2CACR_Register;
-- Layerx Default Color Configuration Register
L2DCCR : L2DCCR_Register;
-- Layerx Blending Factors Configuration Register
L2BFCR : L2BFCR_Register;
-- Layerx Color Frame Buffer Address Register
L2CFBAR : HAL.Word;
-- Layerx Color Frame Buffer Length Register
L2CFBLR : L2CFBLR_Register;
-- Layerx ColorFrame Buffer Line Number Register
L2CFBLNR : L2CFBLNR_Register;
-- Layerx CLUT Write Register
L2CLUTWR : L2CLUTWR_Register;
end record
with Volatile;
for LTDC_Peripheral use record
SSCR at 8 range 0 .. 31;
BPCR at 12 range 0 .. 31;
AWCR at 16 range 0 .. 31;
TWCR at 20 range 0 .. 31;
GCR at 24 range 0 .. 31;
SRCR at 36 range 0 .. 31;
BCCR at 44 range 0 .. 31;
IER at 52 range 0 .. 31;
ISR at 56 range 0 .. 31;
ICR at 60 range 0 .. 31;
LIPCR at 64 range 0 .. 31;
CPSR at 68 range 0 .. 31;
CDSR at 72 range 0 .. 31;
L1CR at 132 range 0 .. 31;
L1WHPCR at 136 range 0 .. 31;
L1WVPCR at 140 range 0 .. 31;
L1CKCR at 144 range 0 .. 31;
L1PFCR at 148 range 0 .. 31;
L1CACR at 152 range 0 .. 31;
L1DCCR at 156 range 0 .. 31;
L1BFCR at 160 range 0 .. 31;
L1CFBAR at 172 range 0 .. 31;
L1CFBLR at 176 range 0 .. 31;
L1CFBLNR at 180 range 0 .. 31;
L1CLUTWR at 196 range 0 .. 31;
L2CR at 260 range 0 .. 31;
L2WHPCR at 264 range 0 .. 31;
L2WVPCR at 268 range 0 .. 31;
L2CKCR at 272 range 0 .. 31;
L2PFCR at 276 range 0 .. 31;
L2CACR at 280 range 0 .. 31;
L2DCCR at 284 range 0 .. 31;
L2BFCR at 288 range 0 .. 31;
L2CFBAR at 300 range 0 .. 31;
L2CFBLR at 304 range 0 .. 31;
L2CFBLNR at 308 range 0 .. 31;
L2CLUTWR at 324 range 0 .. 31;
end record;
-- LCD-TFT Controller
LTDC_Periph : aliased LTDC_Peripheral
with Import, Address => LTDC_Base;
end STM32_SVD.LTDC;
|
AdaCore/libadalang | Ada | 774 | adb | procedure Test is
package Big_Ints is
type Big_Int is private
with Integer_Literal => To_Big_Int;
function To_Big_Int (X : String) return Big_Int;
private
type Big_Int is record
V : Integer; -- just kidding
end record;
end Big_Ints;
package body Big_Ints is
function To_Big_Int (X : String) return Big_Int is
begin
return (V => Integer'Value (X));
end To_Big_Int;
end Big_Ints;
X : Big_Ints.Big_Int := 2;
pragma Test_Statement;
N : constant := 3;
Y : Big_Ints.Big_Int := N;
pragma Test_Statement;
subtype Big_Pos is Big_Ints.Big_Int;
Z : Big_Pos := 4;
pragma Test_Statement;
XX : Big_Ints.Big_Int := X;
pragma Test_Statement;
begin
null;
end Test;
|
charlie5/lace | Ada | 8,573 | adb | with
Ahven,
float_Math.Algebra.linear.d3;
-- with Ada.Text_IO; use Ada.Text_IO;
package body math_Tests.linear_Algebra_3d
is
use Ahven,
float_Math;
function almost_Equal (Left, Right : in Real) return Boolean
is
Tolerance : constant := 0.00_000_1;
begin
return abs (Left - Right) <= Tolerance;
end almost_Equal;
function almost_Equal (Left, Right : in Vector_3) return Boolean
is
begin
return almost_Equal (Left (1), Right (1))
and almost_Equal (Left (2), Right (2))
and almost_Equal (Left (3), Right (3));
end almost_Equal;
function almost_Equal (Left, Right : in Quaternion) return Boolean
is
begin
return almost_Equal (Left.R, Right.R)
and almost_Equal (Left.V (1), Right.V (1))
and almost_Equal (Left.V (2), Right.V (2))
and almost_Equal (Left.V (3), Right.V (3));
end almost_Equal;
procedure translation_Matrix_Test
is
use float_Math.Algebra.linear.d3;
From : constant Vector_3 := [0.0, 0.0, 0.0];
To : Vector_3;
begin
To := From * to_translation_Matrix ([1.0, 0.0, 0.0]);
assert (To (1) = 1.0, Image (To) & " translation (a) failed !");
assert (To (2) = 0.0, Image (To) & " translation (b) failed !");
assert (To (3) = 0.0, Image (To) & " translation (c) failed !");
To := From * to_translation_Matrix ([0.0, 1.0, 0.0]);
assert (To (1) = 0.0, Image (To) & " translation (d) failed !");
assert (To (2) = 1.0, Image (To) & " translation (e) failed !");
assert (To (3) = 0.0, Image (To) & " translation (f) failed !");
To := From * to_translation_Matrix ([-1.0, 0.0, 0.0]);
assert (To (1) = -1.0, Image (To) & " translation (g) failed !");
assert (To (2) = 0.0, Image (To) & " translation (h) failed !");
assert (To (3) = 0.0, Image (To) & " translation (i) failed !");
To := From * to_translation_Matrix ([0.0, -1.0, 0.0]);
assert (To (1) = 0.0, Image (To) & " translation (j) failed !");
assert (To (2) = -1.0, Image (To) & " translation (k) failed !");
assert (To (3) = 0.0, Image (To) & " translation (l) failed !");
To := From * to_translation_Matrix ([1.0, 1.0, 0.0]);
assert (To (1) = 1.0, Image (To) & " translation (m) failed !");
assert (To (2) = 1.0, Image (To) & " translation (n) failed !");
assert (To (3) = 0.0, Image (To) & " translation (o) failed !");
To := From * to_translation_Matrix ([-1.0, -1.0, 0.0]);
assert (To (1) = -1.0, Image (To) & " translation (p) failed !");
assert (To (2) = -1.0, Image (To) & " translation (q) failed !");
assert (To (3) = 0.0, Image (To) & " translation (r) failed !");
end translation_Matrix_Test;
procedure rotation_Matrix_Test
is
use float_Math.Algebra.linear.d3;
From : constant Vector_3 := [1.0, 0.0, 0.0];
To : Vector_3;
begin
To := From * z_Rotation_from (to_Radians (90.0));
assert (almost_Equal (To, [0.0, -1.0, 0.0]),
Image (To, 16) & " rotation (90) failed !");
To := From * z_Rotation_from (to_Radians (-90.0));
assert (almost_Equal (To, [0.0, 1.0, 0.0]),
Image (To, 16) & " rotation (-90) failed !");
To := From * z_Rotation_from (to_Radians (180.0));
assert (almost_Equal (To, [-1.0, 0.0, 0.0]),
Image (To, 16) & " rotation (180) failed !");
To := From * z_Rotation_from (to_Radians (-180.0));
assert (almost_Equal (To, [-1.0, 0.0, 0.0]),
Image (To, 16) & " rotation (-180) failed !");
To := From * z_Rotation_from (to_Radians (270.0));
assert (almost_Equal (To, [0.0, 1.0, 0.0]),
Image (To, 16) & " rotation (270) failed !");
To := From * z_Rotation_from (to_Radians (-270.0));
assert (almost_Equal (To, [0.0, -1.0, 0.0]),
Image (To, 16) & " rotation (-270) failed !");
end rotation_Matrix_Test;
procedure transform_Test
is
use float_Math.Algebra.linear.d3;
From : constant Vector_3 := [1.0, 0.0, 0.0];
To : Vector_3;
Transform : Transform_3d := (rotation => z_Rotation_from (to_Radians (90.0)),
translation => [0.0, 0.0, 0.0]);
begin
To := From * Transform;
assert (almost_Equal (To, [0.0, 1.0, 0.0]),
Image (To, 16) & " transform () failed !");
Transform.Translation := [1.0, 0.0, 0.0];
To := From * Transform;
assert (almost_Equal (To, [1.0, 1.0, 0.0]),
Image (To, 16) & " transform () failed !");
end transform_Test;
procedure quaternion_interpolation_Test
is
use float_Math.Algebra.linear.d3;
Initial : constant Quaternion := to_Quaternion (z_Rotation_from (to_Radians ( 90.0)));
Desired : constant Quaternion := to_Quaternion (z_Rotation_from (to_Radians (180.0)));
begin
-- put_Line (Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, 0.0)))));
-- put_Line (Degrees'Image (to_Degrees (Angle (Initial))));
assert (almost_Equal (Interpolated (Initial, Desired, 0.0), Initial), "almost_Equal (Interpolated (Initial, Desired, 0.0), Initial) ... failed !");
assert (almost_Equal (Interpolated (Initial, Desired, 100.0), Desired), "almost_Equal (Interpolated (Initial, Desired, 1.0), Desired) ... failed !");
-- new_Line;
-- put_Line ("0.01 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.01))))));
-- put_Line ("0.1 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.1))))));
-- put_Line ("0.2 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.2))))));
-- put_Line ("0.3 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.3))))));
-- put_Line ("0.4 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.4))))));
-- put_Line ("0.5 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.5))))));
-- put_Line ("0.6 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.6))))));
-- put_Line ("0.7 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.7))))));
-- put_Line ("0.8 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.8))))));
-- put_Line ("0.9 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.9))))));
-- put_Line ("0.99 " & Degrees'Image (to_Degrees (Angle (Interpolated (Initial, Desired, to_Percentage (0.99))))));
-- put_Line (Degrees'Image (to_Degrees (to_Radians (90.0))));
assert (almost_Equal (Angle (Interpolated (Initial, Desired, 50.0)),
to_Radians (135.0)),
"Angle (Interpolated (Initial, Desired, 0.5)) = to_Radians (135.0) ... failed !");
end quaternion_interpolation_Test;
procedure inverse_transform_Test
is
use float_Math.Algebra.linear.d3;
From : constant Vector_3 := [1.0, 1.0, 1.0];
To : Vector_3;
Transform : constant Matrix_4x4 := to_transform_Matrix (Rotation => z_Rotation_from (to_Radians (90.0)),
Translation => [5.0, 5.0, 5.0]);
begin
To := From * Transform;
To := To * inverse_Transform (Transform);
assert (almost_Equal (To, From),
Image (To, 16) & " inverse_Transform failed !");
end inverse_transform_Test;
overriding
procedure Initialize (T : in out Test) is
begin
T.set_Name ("Linear Algebra (3D) Tests");
Framework.add_test_Routine (T, translation_Matrix_Test'Access, "translation_Matrix_Test");
Framework.add_test_Routine (T, rotation_Matrix_Test'Access, "rotation_Matrix_Test");
Framework.add_test_Routine (T, transform_Test'Access, "transform_Test");
Framework.add_test_Routine (T, inverse_transform_Test'Access, "inverse_transform_Test");
Framework.add_test_Routine (T, quaternion_interpolation_Test'Access, "quaternion_interpolation_Test");
end Initialize;
end math_Tests.linear_Algebra_3d;
|
AdaCore/libadalang | Ada | 136 | ads | with Data_Pkg;
generic
with package Pkg is new Data_Pkg (<>);
package PT is
procedure Get (Value : Pkg.Value_T) is null;
end PT;
|
AdaCore/Ada_Drivers_Library | Ada | 3,052 | adb | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This version of the LCH only toggles the Red LED.
-- Note this version is for use with the ravenscar-sfp runtime.
with STM32.Board; use STM32.Board;
with Ada.Real_Time; use Ada.Real_Time;
package body Last_Chance_Handler is
-------------------------
-- Last_Chance_Handler --
-------------------------
procedure Last_Chance_Handler (Msg : System.Address; Line : Integer) is
pragma Unreferenced (Msg, Line);
begin
Initialize_LEDs;
All_LEDs_Off;
-- No-return procedure...
loop
Toggle (LCH_LED);
delay until Clock + Milliseconds (500);
end loop;
end Last_Chance_Handler;
end Last_Chance_Handler;
|
yannickmoy/SPARKNaCl | Ada | 1,474 | adb | with Ada.Text_IO; use Ada.Text_IO;
package body SPARKNaCl.Debug
with SPARK_Mode => Off
is
On : constant Boolean := True;
package I64IO is new Ada.Text_IO.Integer_IO (Integer_64);
type BToCT is array (Byte range 0 .. 15) of Character;
BToC : constant BToCT :=
('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'A', 'B', 'C', 'D', 'E', 'F');
procedure PB (X : in Byte);
procedure PB (X : in Byte)
is
begin
if On then
Put ("16#");
Put (BToC (X / 16));
Put (BToC (X mod 16));
Put ("# ");
end if;
end PB;
procedure DH (S : in String; D : in Byte_Seq)
is
begin
if On then
Put_Line (S);
for I in D'Range loop
PB (D (I));
if I mod 8 = 7 then
New_Line;
end if;
end loop;
New_Line;
end if;
end DH;
procedure DH (S : in String; D : in I64)
is
begin
if On then
Put (S & ' ');
I64IO.Put (D, Width => 0);
New_Line;
end if;
end DH;
procedure DH (S : in String; D : in Boolean)
is
begin
if On then
Put_Line (S);
Put (Boolean'Image (D));
New_Line;
end if;
end DH;
procedure DHH (S : in String; D : in I64)
is
begin
if On then
Put_Line (S);
I64IO.Put (D, Width => 0, Base => 16);
New_Line;
end if;
end DHH;
end SPARKNaCl.Debug;
|
Vovanium/Encodings | Ada | 1,204 | adb | package body Encodings.Utility.Generic_Sequence_Buffers is
procedure Write_Buffered(
Buffer: in out Sequence_Buffer;
Target: in out String_Type;
Target_Last: in out Natural
) is
Remaining : Natural := Remaining_Length(Target, Target'Last - Target_Last);
Buffered : Natural := Length(Buffer);
Write_Length : Natural := Natural'Min(Remaining, Buffered);
New_Target_Last : Natural := Target_Last + Write_Length;
New_Buffer_First : Positive := Buffer.First + Write_Length;
begin
Target(Target_Last + 1 .. New_Target_Last) := Buffer.Data(Buffer.First .. New_Buffer_First - 1);
Target_Last := New_Target_Last;
Buffer.First := New_Buffer_First;
end Write_Buffered;
procedure Set_Buffer(
Buffer: in out Sequence_Buffer;
Source: in String_Type
) is
begin
Buffer.Data(1 .. Source'Length) := Source;
Buffer.First := 1;
Buffer.Last := Source'Length;
end Set_Buffer;
procedure Write(
Buffer: in out Sequence_Buffer;
Source: in String_Type;
Target: in out String_Type;
Target_Last: in out Natural
) is
begin
Set_Buffer(Buffer, Source);
Write_Buffered(Buffer, Target, Target_Last);
end;
end Encodings.Utility.Generic_Sequence_Buffers; |
charlie5/cBound | Ada | 1,359 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with xcb.xcb_glx_generic_error_t;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_glx_bad_pbuffer_error_t is
-- Item
--
subtype Item is xcb.xcb_glx_generic_error_t.Item;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_bad_pbuffer_error_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_bad_pbuffer_error_t.Item,
Element_Array => xcb.xcb_glx_bad_pbuffer_error_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb.xcb_glx_bad_pbuffer_error_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_glx_bad_pbuffer_error_t.Pointer,
Element_Array => xcb.xcb_glx_bad_pbuffer_error_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_glx_bad_pbuffer_error_t;
|
AdaCore/gpr | Ada | 144,004 | adb | --
-- Copyright (C) 2019-2023, AdaCore
--
-- SPDX-License-Identifier: Apache-2.0 WITH LLVM-Exception
--
with Ada.Containers.Indefinite_Holders;
with Ada.Directories;
with Ada.IO_Exceptions;
with Ada.Strings.Fixed;
with Ada.Strings.Maps;
with Ada.Text_IO;
with GPR2.Project.Parser.Create;
with GPR2.Project.Attribute_Index;
with GPR2.Project.Attribute.Set;
with GPR2.Project.Import.Set;
with GPR2.Project.Parser;
with GPR2.Project.Registry.Pack;
with GPR2.Project.Tree.View_Builder;
with GPR2.Source_Reference.Attribute;
with GPR2.Source_Reference.Value;
with GPR2.Unit;
with GPR2.View_Ids.Set;
with GPR2.View_Ids.Vector;
with GNAT.OS_Lib;
with GNAT.Regexp;
with GNAT.String_Split;
with GNATCOLL.OS.Constants;
package body GPR2.Project.Tree is
use GNAT;
use type GPR2.Path_Name.Object;
use type GNATCOLL.OS.OS_Type;
package PRP renames Project.Registry.Pack;
package IDS renames GPR2.View_Ids;
Is_Windows_Host : constant Boolean :=
GNATCOLL.OS.Constants.OS = GNATCOLL.OS.Windows
with Warnings => Off;
Wildcards : constant Strings.Maps.Character_Set :=
Strings.Maps.To_Set ("?*[]");
-- Wild chars for filename pattern
procedure Error
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class);
-- Append an error to Self.Messages
procedure Warning
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class);
-- Append a warning to Self.Messages
procedure Lint
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class);
-- Append a lint message to Self.Messages
function Register_View
(Def : in out Definition.Data) return Project.View.Object
with Post => Register_View'Result.Is_Defined;
-- Register view definition in the Tree and return the View object
procedure Set_Context
(Self : in out Object;
Changed : access procedure (Project : View.Object) := null);
-- Update project tree with updated context
function Get_Context
(View : Project.View.Object) return GPR2.Context.Object
is
(View.Tree.Context (View.Context));
-- Returns context of the project view
type Iterator is new Project_Iterator.Forward_Iterator with record
Views : Project_View_Store.Vector;
Tree : access Object;
end record;
overriding function First
(Iter : Iterator) return Cursor;
overriding function Next
(Iter : Iterator; Position : Cursor) return Cursor;
function Recursive_Load
(Self : in out Object;
Root_Project : Project_Descriptor;
Context : Context_Kind;
Starting_From : View.Object := View.Undefined) return View.Object
with Pre =>
(if Starting_From.Is_Defined
then Starting_From.Qualifier in Aggregate_Kind);
-- Load a project Filename recursively and returns the corresponding root
-- view.
-- Context indicates if project is loaded using the root context or the
-- root aggregate context.
-- Starting_From if set is the aggregate or aggregate library starting
-- point for the parsing.
function Create_Runtime_View (Self : Object) return View.Object
with Pre => Self.Is_Defined
and then Self.Has_Configuration;
-- Create the runtime view given the configuration project
function Get_View
(Tree : Project.Tree.Object;
Id : IDS.View_Id)
return Project.View.Object;
-- Given a View_Id Id returns the associated view if it exists. Returns
-- Project.View.Undefined otherwise.
procedure Update_Context
(Context : in out GPR2.Context.Object;
Externals : Containers.Name_List;
Environment : GPR2.Environment.Object);
-- For all externals in Externals, if external is not already present in
-- the context, fetch its value from the environment and insert it into the
-- context.
procedure Update_Project_Search_Path_From_Config
(Self : in out Object;
Conf : Project.Configuration.Object)
with Pre => Conf.Is_Defined;
-- Update project search path with directories relevant to
procedure Process_Subtree
(Self : Object;
View : Project.View.Object := Project.View.Undefined;
Externally_Built : Boolean := False;
Do_Action : not null access procedure
(View : Project.View.Object))
with Pre => Self.Is_Defined;
-- Call Do_Action for View & View's subtree
procedure Prepend_Search_Paths
(Self : in out Object; Dir : GPR2.Path_Name.Object)
with Pre => Dir.Is_Defined;
procedure Append_Search_Paths
(Self : in out Object; Dir : GPR2.Path_Name.Object)
with Pre => Dir.Is_Defined;
procedure Update_Search_Paths (Self : in out Object);
-- Update Self.Search_Paths after Prepend, Append & Environment changes
---------------------
-- Add_Tool_Prefix --
---------------------
function Add_Tool_Prefix
(Self : Object;
Tool_Name : Name_Type) return Name_Type
is
Not_Defined : constant Optional_Name_Type := " ";
-- Value returned when GNAT_Compilers_Prefix cannot find Compiler
-- Driver in View.
function GNAT_Compilers_Prefix
(View : Project.View.Object) return Optional_Name_Type
with Pre => View.Is_Defined;
-- Returns prefix found in Compiler package's Driver attribute for gcc
-- or g++ tools. Returns Not_Defined if no attribute was defined.
---------------------------
-- GNAT_Compilers_Prefix --
---------------------------
function GNAT_Compilers_Prefix
(View : Project.View.Object) return Optional_Name_Type
is
package PRP renames Project.Registry.Pack;
package PRA renames Project.Registry.Attribute;
begin
if View.Is_Defined
and then View.Has_Package (PRP.Compiler)
and then View.Has_Languages
then
for Language of View.Languages loop
declare
Index : constant Attribute_Index.Object :=
Attribute_Index.Create (Language.Text);
Attr : constant Attribute.Object :=
(if View.Has_Attribute (PRA.Compiler.Driver,
Index)
then View.Attribute (PRA.Compiler.Driver, Index)
else Attribute.Undefined);
Driver : constant String :=
(if Attr.Is_Defined
then String
(Path_Name.Create_File
(Filename_Type (Attr.Value.Text)).Base_Name)
else "");
begin
if Driver'Length > 2 then
declare
subtype Last_3_Chars_Range is Positive range
Driver'Last - 2 .. Driver'Last;
Last_3_Chars : constant String :=
(if Is_Windows_Host
then Characters.Handling.To_Lower
(Driver (Last_3_Chars_Range))
else Driver (Last_3_Chars_Range));
begin
if Last_3_Chars = "gcc"
or else Last_3_Chars = "g++"
then
if Driver'Length = 3 then
return No_Name;
else
return Optional_Name_Type
(Driver (Driver'First .. Driver'Last - 3));
end if;
end if;
end;
end if;
end;
end loop;
end if;
return Not_Defined;
end GNAT_Compilers_Prefix;
Prefix_From_Root : constant Optional_Name_Type :=
GNAT_Compilers_Prefix (Self.Root);
-- Try to find prefix from root project compiler package or from its
-- associated configuration project.
begin
if Prefix_From_Root = Not_Defined then
-- Use Target as prefix if not defined in project and no
-- configuration file was loaded.
return Name_Type (String (Self.Target) & "-" & String (Tool_Name));
else
return Name_Type (String (Prefix_From_Root) & String (Tool_Name));
end if;
end Add_Tool_Prefix;
--------------------
-- Append_Message --
--------------------
procedure Append_Message
(Self : in out Object;
Message : GPR2.Message.Object) is
begin
Self.Messages.Append (Message);
end Append_Message;
-------------------------
-- Append_Search_Paths --
-------------------------
procedure Append_Search_Paths
(Self : in out Object; Dir : GPR2.Path_Name.Object) is
begin
Self.Search_Paths.Appended.Append (Dir);
Self.Update_Search_Paths;
end Append_Search_Paths;
--------------------
-- Artifacts_Dir --
--------------------
function Artifacts_Dir (Self : Object) return Path_Name.Object is
begin
if Self.Root_Project.Kind in With_Object_Dir_Kind then
return Self.Root_Project.Object_Directory;
else
return Self.Root_Project.Apply_Root_And_Subdirs (PRA.Object_Dir);
end if;
end Artifacts_Dir;
-- Object_Directory has a precondition to prevent its use when the view
-- don't expect one (aggregate, abstract). But Apply_Root_And_Subdirs
-- doesn't, and object_directory will default to Project_Dir in such case.
----------------
-- Clear_View --
----------------
procedure Clear_View
(Self : in out Object;
Unit : Unit_Info.Object) is
begin
-- Clear the corresponding sources
if Unit.Spec.Source.Is_Defined then
Self.Sources.Exclude
(Filename_Type (Unit.Spec.Source.Value));
end if;
if Unit.Main_Body.Source.Is_Defined then
Self.Sources.Exclude
(Filename_Type (Unit.Main_Body.Source.Value));
end if;
for S of Unit.Separates loop
Self.Sources.Exclude (Filename_Type (S.Source.Value));
end loop;
end Clear_View;
-------------------
-- Configuration --
-------------------
function Configuration (Self : Object) return PC.Object is
begin
return Self.Conf;
end Configuration;
------------------------
-- Constant_Reference --
------------------------
function Constant_Reference
(Self : aliased Object;
Position : Cursor) return Constant_Reference_Type
is
Views_Curs : constant View.Set.Set.Cursor :=
Self.Views_Set.Find
(Project_View_Store.Element (Position.Current));
Ref : View.Set.Set.Constant_Reference_Type renames
Self.Views_Set.Constant_Reference (Views_Curs);
begin
-- Constant reference is given by the constant reference of the
-- element contained in the Views set at the current location.
return Constant_Reference_Type'
(View => Ref.Element.all'Unrestricted_Access,
Ref => Ref);
end Constant_Reference;
-------------
-- Context --
-------------
function Context (Self : Object) return GPR2.Context.Object is
begin
return Self.Root.Context;
end Context;
-------------------------
-- Create_Runtime_View --
-------------------------
function Create_Runtime_View (Self : Object) return View.Object is
CV : constant View.Object := Self.Conf.Corresponding_View;
DS : Character renames OS_Lib.Directory_Separator;
Data : Project.Definition.Data;
RTD : Attribute.Object;
RTF : Path_Name.Object;
procedure Add_Attribute (Name : Q_Attribute_Id; Value : Value_Type);
-- Add builtin attribute into Data.Attrs
-------------------
-- Add_Attribute --
-------------------
procedure Add_Attribute (Name : Q_Attribute_Id; Value : Value_Type) is
begin
Data.Attrs.Insert
(Project.Attribute.Create
(Name => Source_Reference.Attribute.Object
(Source_Reference.Attribute.Create
(Source_Reference.Builtin, Name)),
Value => Source_Reference.Value.Object
(Source_Reference.Value.Create
(Source_Reference.Object
(Source_Reference.Create (RTF.Value, 0, 0)),
Value))));
end Add_Attribute;
begin
-- Check runtime path
RTD := CV.Attribute (Name => PRA.Runtime_Dir,
Index => Attribute_Index.Create (Ada_Language));
if RTD.Is_Defined and then RTD.Value.Text /= "" then
-- Runtime_Dir (Ada) exists, this is used to compute the Source_Dirs
-- and Object_Dir for the Runtime project view.
RTF := Path_Name.Create_File
("runtime.gpr", Directory => Filename_Optional (RTD.Value.Text));
declare
Dirs : Containers.Source_Value_List;
procedure Add_If_Exists (Dir_Name : String);
-- Add directory name into Dirs if it exists
-------------------
-- Add_If_Exists --
-------------------
procedure Add_If_Exists (Dir_Name : String) is
begin
if Directories.Exists (Dir_Name) then
Dirs.Append
(Source_Reference.Value.Object
(Source_Reference.Value.Create
(Source_Reference.Object
(Source_Reference.Create (RTF.Value, 0, 0)),
Dir_Name)));
end if;
end Add_If_Exists;
function With_RTD_Prefix (Name : String) return String is
(Directories.Compose (RTD.Value.Text, Name));
-- Prepend the Name with
Ada_Source_Path : constant String :=
With_RTD_Prefix ("ada_source_path");
use Ada.Text_IO;
File : File_Type;
begin
if Directories.Exists (Ada_Source_Path) then
Open (File, Text_IO.In_File, Ada_Source_Path);
while not End_Of_File (File) loop
declare
Line : constant String := Get_Line (File);
begin
if Line /= "" then
Add_If_Exists
(if OS_Lib.Is_Absolute_Path (Line) then Line
else With_RTD_Prefix (Line));
end if;
end;
end loop;
Close (File);
else
Add_If_Exists (With_RTD_Prefix ("adainclude"));
end if;
Data.Attrs.Insert
(Project.Attribute.Create
(Name => Source_Reference.Attribute.Object
(Source_Reference.Attribute.Create
(Source_Reference.Builtin, PRA.Source_Dirs)),
Values => Dirs));
end;
Add_Attribute (PRA.Object_Dir, RTD.Value.Text & DS & "adalib");
-- The only language supported is Ada
Add_Attribute (PRA.Languages, "ada");
Data.Tree := Self.Self;
Data.Kind := K_Standard;
Data.Path := Path_Name.Create_Directory
(Filename_Type (RTD.Value.Text));
Data.Is_Root := True;
Data.Unique_Id := GPR2.View_Ids.Runtime_View_Id;
Data.Trees.Project := Project.Parser.Create
(Name => Name (PRA.Runtime.Attr),
File => RTF,
Qualifier => K_Standard);
return Result : View.Object := Register_View (Data) do
-- If we simply return Register_View (Data) the reference counter
-- will be one more than should be, see T709-001.
-- It is not actual for now because line below is added after the
-- T709-001 bug detected.
-- ??? We shouldn't consider the runtime view as a root view, but
-- instead add it as implicitly limited withed project for all
-- views that have Ada sources.
Definition.Get_RW (Result).Root_Views.Append
(View_Ids.Runtime_View_Id);
end return;
else
return Project.View.Undefined;
end if;
end Create_Runtime_View;
-------------
-- Element --
-------------
function Element (Position : Cursor) return View.Object is
begin
return Project_View_Store.Element (Position.Current);
end Element;
-----------
-- Error --
-----------
procedure Error
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class) is
begin
Self.Messages.Append (Message.Create (Message.Error, Msg, Sloc));
end Error;
-----------
-- First --
-----------
overriding function First (Iter : Iterator) return Cursor is
begin
if Iter.Views.Is_Empty then
return No_Element;
else
return (Current => Iter.Views.First,
Tree => Iter.Tree);
end if;
end First;
---------------------
-- For_Each_Source --
---------------------
procedure For_Each_Source
(Self : Object;
View : Project.View.Object := Project.View.Undefined;
Action : access procedure (Source : Project.Source.Object);
Language : Language_Id := No_Language;
Externally_Built : Boolean := False) is
procedure Do_Action (View : Project.View.Object)
with Pre => View.Is_Defined;
-- Call Action for all View's source object having a valid language
---------------
-- Do_Action --
---------------
procedure Do_Action (View : Project.View.Object) is
begin
for S of View.Sources loop
if Language = No_Language or else S.Language = Language then
Action (S);
end if;
end loop;
end Do_Action;
begin
Process_Subtree (Self, View, Externally_Built, Do_Action'Access);
end For_Each_Source;
--------------
-- Get_File --
--------------
function Get_File
(Self : Object;
Base_Name : Simple_Name;
View : Project.View.Object := Project.View.Undefined;
Use_Source_Path : Boolean := True;
Use_Object_Path : Boolean := True;
Predefined_Only : Boolean := False;
Return_Ambiguous : Boolean := True) return Path_Name.Object
is
File_Name : Path_Name.Object;
Source_Name : Project.Source.Object;
Ambiguous : Boolean;
procedure Add_File
(Name : Path_Name.Object; Check_Exist : Boolean := True);
-- Add Name to matching files, when Check_Exist is True file existence
-- is checked before Path is added to matching files.
procedure Add_Source (Name : Project.Source.Object);
-- Add new candidate source and check for overriding
procedure Handle_Object_File;
-- Set Full_Path with matching object file
procedure Handle_Project_File;
-- Set Full_Path with the first matching project
procedure Handle_Source_File;
-- Set Full_Path with matching source file
--------------
-- Add_File --
--------------
procedure Add_File
(Name : Path_Name.Object; Check_Exist : Boolean := True) is
begin
if Check_Exist and then not Name.Exists then
return;
end if;
if not File_Name.Is_Defined then
File_Name := Name;
else
Ambiguous := True;
end if;
end Add_File;
----------------
-- Add_Source --
----------------
procedure Add_Source (Name : Project.Source.Object) is
begin
if not Source_Name.Is_Defined then
Source_Name := Name;
elsif Source_Name.View.Is_Extending (Name.View) then
-- We already have the overriding source
return;
elsif Name.View.Is_Extending (Source_Name.View) then
Source_Name := Name;
else
Ambiguous := True;
end if;
end Add_Source;
------------------------
-- Handle_Object_File --
------------------------
procedure Handle_Object_File is
procedure Handle_Object_File_In_View (View : Project.View.Object);
-- Set Full_Path with matching View's object file
--------------------------------
-- Handle_Object_File_In_View --
--------------------------------
procedure Handle_Object_File_In_View (View : Project.View.Object) is
begin
if View.Is_Library then
Add_File (View.Object_Directory.Compose (Base_Name));
if not File_Name.Is_Defined then
Add_File (View.Library_Directory.Compose (Base_Name));
end if;
if not File_Name.Is_Defined then
Add_File (View.Library_Ali_Directory.Compose (Base_Name));
end if;
elsif View.Kind = K_Standard then
Add_File (View.Object_Directory.Compose (Base_Name));
end if;
end Handle_Object_File_In_View;
begin
if not Predefined_Only then
if View.Is_Defined then
Handle_Object_File_In_View (View);
else
for V in Self.Iterate
(Status => (Project.S_Externally_Built => Indeterminate))
loop
Handle_Object_File_In_View (Project.Tree.Element (V));
end loop;
end if;
end if;
if not File_Name.Is_Defined then
if Self.Has_Runtime_Project then
Handle_Object_File_In_View (Self.Runtime_Project);
end if;
end if;
end Handle_Object_File;
-------------------------
-- Handle_Project_File --
-------------------------
procedure Handle_Project_File is
begin
for V in Self.Iterate
(Status => (Project.S_Externally_Built => Indeterminate))
loop
declare
View : constant Project.View.Object := Project.Tree.Element (V);
begin
if View.Path_Name.Simple_Name = Base_Name then
File_Name := View.Path_Name;
end if;
end;
end loop;
end Handle_Project_File;
------------------------
-- Handle_Source_File --
------------------------
procedure Handle_Source_File is
procedure Handle_Source_File_In_View (View : Project.View.Object);
-- Set Full_Path with matching View's source file
--------------------------------
-- Handle_Source_File_In_View --
--------------------------------
procedure Handle_Source_File_In_View (View : Project.View.Object) is
Full_Path : constant Project.Source.Object :=
View.Source (Base_Name);
begin
if Full_Path.Is_Defined then
Add_Source (Full_Path);
end if;
end Handle_Source_File_In_View;
begin
if not Predefined_Only then
if View.Is_Defined then
Handle_Source_File_In_View (View);
else
for V in Self.Iterate
(Status => (Project.S_Externally_Built => Indeterminate))
loop
Handle_Source_File_In_View (Project.Tree.Element (V));
end loop;
end if;
end if;
if not File_Name.Is_Defined then
if Self.Has_Runtime_Project then
Handle_Source_File_In_View (Self.Runtime_Project);
end if;
end if;
end Handle_Source_File;
begin
-- Initialize return values
Ambiguous := False;
File_Name := Path_Name.Undefined;
-- Handle project file
if Project.Ensure_Extension (Base_Name) = Base_Name then
Handle_Project_File;
else
-- Handle source file
if Use_Source_Path then
Handle_Source_File;
if Source_Name.Is_Defined then
File_Name := Source_Name.Path_Name;
end if;
end if;
-- Handle object file
if not File_Name.Is_Defined and then Use_Object_Path then
Handle_Object_File;
end if;
end if;
if Ambiguous and then not Return_Ambiguous then
return Path_Name.Undefined;
else
return File_Name;
end if;
end Get_File;
--------------
-- Get_View --
--------------
function Get_View
(Self : Object;
Source : Path_Name.Object) return Project.View.Object
is
Pos : constant Filename_View.Cursor :=
Self.Sources.Find
(if Source.Has_Dir_Name
then Filename_Type (Source.Value)
else Source.Simple_Name);
begin
if Filename_View.Has_Element (Pos) then
return Filename_View.Element (Pos);
end if;
return Project.View.Undefined;
end Get_View;
function Get_View
(Self : Object;
Unit : Name_Type) return Project.View.Object
is
Pos : constant Name_View.Cursor := Self.Units.Find (Unit);
begin
if Name_View.Has_Element (Pos) then
return Name_View.Element (Pos);
end if;
return Project.View.Undefined;
end Get_View;
function Get_View
(Tree : Project.Tree.Object;
Id : IDS.View_Id) return Project.View.Object
is
CV : constant Id_Maps.Cursor := Tree.View_Ids.Find (Id);
begin
if Id_Maps.Has_Element (CV) then
return Id_Maps.Element (CV);
else
return Project.View.Undefined;
end if;
end Get_View;
-----------------------
-- Has_Configuration --
-----------------------
function Has_Configuration (Self : Object) return Boolean is
begin
return Self.Conf.Is_Defined;
end Has_Configuration;
-----------------
-- Has_Context --
-----------------
function Has_Context (Self : Object) return Boolean is
begin
return not Self.Root.Context.Is_Empty;
end Has_Context;
-----------------
-- Has_Element --
-----------------
function Has_Element (Position : Cursor) return Boolean is
begin
return Project_View_Store.Has_Element (Position.Current);
end Has_Element;
------------------
-- Has_Messages --
------------------
function Has_Messages (Self : Object) return Boolean is
begin
return not Self.Messages.Is_Empty;
end Has_Messages;
-------------------------
-- Has_Runtime_Project --
-------------------------
function Has_Runtime_Project (Self : Object) return Boolean is
begin
return Self.Runtime.Is_Defined;
end Has_Runtime_Project;
---------------------
-- Has_Src_Subdirs --
---------------------
function Has_Src_Subdirs (Self : Object) return Boolean is
begin
return Self.Src_Subdirs /= Null_Unbounded_String;
end Has_Src_Subdirs;
-----------------
-- Instance_Of --
-----------------
function Instance_Of
(Self : Object;
Instance_Id : GPR2.View_Ids.View_Id) return View.Object is
begin
return Self.View_Ids.Element (Instance_Id);
end Instance_Of;
------------------------
-- Invalidate_Sources --
------------------------
procedure Invalidate_Sources
(Self : Object;
View : Project.View.Object := Project.View.Undefined) is
begin
if not View.Is_Defined then
for V of Self.Views_Set loop
Definition.Get (V).Sources_Signature :=
GPR2.Context.Default_Signature;
end loop;
Self.Self.Sources_Loaded := False;
else
Definition.Get (View).Sources_Signature :=
GPR2.Context.Default_Signature;
if View.Is_Aggregated_In_Library then
for Agg of View.Aggregate_Libraries loop
Self.Invalidate_Sources (Agg);
end loop;
end if;
end if;
end Invalidate_Sources;
-------------
-- Is_Root --
-------------
function Is_Root (Position : Cursor) return Boolean is
V : constant View.Object := Element (Position);
begin
return Position.Tree.Root = V;
end Is_Root;
-------------
-- Iterate --
-------------
function Iterate
(Self : Object;
Kind : Iterator_Control := Default_Iterator;
Filter : Filter_Control := Default_Filter;
Status : Status_Control := Default_Status)
return Project_Iterator.Forward_Iterator'Class
is
Iter : Iterator;
-- The returned object
Seen : GPR2.Project.View.Set.Object;
-- Keep track of already seen projects. Better than using the P vector
-- which is not efficient when checking if an element exists.
P_Set : GPR2.Project.View.Set.Object;
-- Set of projects for the iterator which is returned in the Cursor and
-- fill by the recursive procedure For_Project and For_Imports. P_Set is
-- used to have a fast check on views already in Projects.
procedure Append (View : Project.View.Object)
with Post => P_Set.Contains (View);
-- Append into P if not already seen and View matches the filter
procedure For_Project (View : Project.View.Object);
-- Handle project node
procedure For_Imports (View : Project.View.Object);
-- Handle import nodes
procedure For_Aggregated (View : Project.View.Object);
-- Handle aggregated nodes
------------
-- Append --
------------
procedure Append (View : Project.View.Object) is
begin
if not P_Set.Contains (View) then
if Equal
(Status (S_Externally_Built),
View.Is_Externally_Built) in True | Indeterminate
then
declare
Qualifier : constant Project_Kind := View.Kind;
begin
-- Check if it corresponds to the current filter
if (Qualifier = K_Library and then Filter (F_Library))
or else
(Qualifier = K_Standard and then Filter (F_Standard))
or else
(Qualifier = K_Abstract and then Filter (F_Abstract))
or else
(Qualifier = K_Aggregate and then Filter (F_Aggregate))
or else
(Qualifier = K_Aggregate_Library
and then Filter (F_Aggregate_Library))
then
Iter.Views.Append (View);
end if;
end;
end if;
P_Set.Insert (View);
end if;
end Append;
--------------------
-- For_Aggregated --
--------------------
procedure For_Aggregated (View : Project.View.Object) is
begin
if View.Kind in Aggregate_Kind then
for A of Definition.Get_RO (View).Aggregated loop
if Kind (I_Recursive) then
For_Project (A);
else
Append (A);
end if;
end loop;
end if;
end For_Aggregated;
-----------------
-- For_Imports --
-----------------
procedure For_Imports (View : Project.View.Object) is
begin
for I of Definition.Get_RO (View).Imports loop
if Kind (I_Recursive) then
For_Project (I);
else
Append (I);
end if;
end loop;
for I of Definition.Get_RO (View).Limited_Imports loop
if Kind (I_Recursive) then
For_Project (I);
else
Append (I);
end if;
end loop;
end For_Imports;
-----------------
-- For_Project --
-----------------
procedure For_Project (View : Project.View.Object) is
Position : Project.View.Set.Set.Cursor;
Inserted : Boolean;
begin
Seen.Insert (View, Position, Inserted);
if Inserted then
-- Handle imports
if Kind (I_Imported) or else Kind (I_Recursive) then
For_Imports (View);
end if;
-- Handle extended if any
if Kind (I_Extended) then
declare
Data : constant Definition.Const_Ref :=
Definition.Get_RO (View);
begin
if Data.Extended_Root.Is_Defined then
if Kind (I_Recursive) then
For_Project (Data.Extended_Root);
else
Append (Data.Extended_Root);
end if;
end if;
end;
end if;
-- The project itself
Append (View);
-- Now if View is an aggregate or aggregate library project we
-- need to run through all aggregated projects.
if Kind (I_Aggregated) then
For_Aggregated (View);
end if;
end if;
end For_Project;
begin
Iter := (Project_View_Store.Empty, Self.Self);
For_Project (Self.Root);
if Self.Has_Runtime_Project and then Kind (I_Runtime) then
For_Project (Self.Runtime);
end if;
if Self.Has_Configuration and then Kind (I_Configuration) then
For_Project (Self.Configuration.Corresponding_View);
end if;
return Iter;
end Iterate;
----------
-- Lint --
----------
procedure Lint
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class) is
begin
Self.Messages.Append (Message.Create (Message.Lint, Msg, Sloc));
end Lint;
----------
-- Load --
----------
procedure Load
(Self : in out Object;
Root_Project : Project_Descriptor;
Context : GPR2.Context.Object;
Config : PC.Object := PC.Undefined;
Build_Path : Path_Name.Object := Path_Name.Undefined;
Subdirs : Optional_Name_Type := No_Name;
Src_Subdirs : Optional_Name_Type := No_Name;
Check_Shared_Lib : Boolean := True;
Absent_Dir_Error : Error_Level := Warning;
Implicit_With : GPR2.Path_Name.Set.Object :=
GPR2.Path_Name.Set.Empty_Set;
Pre_Conf_Mode : Boolean := False;
File_Reader : GPR2.File_Readers.File_Reader_Reference :=
GPR2.File_Readers.No_File_Reader_Reference;
Environment : GPR2.Environment.Object :=
GPR2.Environment.Process_Environment)
is
Gpr_Path : Path_Name.Object;
Root_Context : GPR2.Context.Object := Context;
Def : Definition.Ref;
begin
Self.Self := Self'Unchecked_Access;
Self.Set_Environment (Environment);
-- Let ada or gpr parser use this reader
Self.File_Reader_Ref := File_Reader;
-- If re-loading, invalidate the views cache
for V of Self.Views_Set loop
Definition.Get (V).Clear_Cache;
end loop;
-- First record and parse the configuration object, this is needed as
-- used to check the target in Set_Project_Search_Paths above.
if Config.Is_Defined then
-- Set Tree for this config project
Self.Conf := Config;
for M of Config.Log_Messages loop
Self.Messages.Append (M);
end loop;
if Self.Messages.Has_Error then
raise Project_Error with "configuration project has errors";
end if;
if Config.Has_Externals then
Update_Context (Root_Context, Config.Externals, Environment);
end if;
Definition.Bind_Configuration_To_Tree (Self.Conf, Self.Self);
declare
C_View : GPR2.Project.View.Object := Self.Conf.Corresponding_View;
P_Data : constant Definition.Ref := Definition.Get_RW (C_View);
begin
-- Set and record the tree now, needed for the parsing
P_Data.Tree := Self.Self;
P_Data.Is_Root := True;
-- Parse the configuration project, no need for full/complex
-- parsing as a configuration project is a simple project no
-- with clauses.
GPR2.Project.Parser.Process
(P_Data.Trees.Project,
Self,
Root_Context,
C_View,
Ext_Conf_Mode => True);
if Self.Conf.Is_Defined then
Update_Project_Search_Path_From_Config
(Self, Self.Conf);
end if;
pragma Assert
(P_Data.Kind = K_Configuration,
"expected K_Configuration, found : " & P_Data.Kind'Img);
end;
end if;
Self.Build_Path := Build_Path;
Self.Subdirs := To_Unbounded_String (String (Subdirs));
Self.Src_Subdirs := To_Unbounded_String (String (Src_Subdirs));
Self.Check_Shared_Lib := Check_Shared_Lib;
Self.Implicit_With := Implicit_With;
Self.Absent_Dir_Error := Absent_Dir_Error;
Self.Pre_Conf_Mode := Pre_Conf_Mode;
if Root_Project.Kind = Project_Definition then
Gpr_Path := Root_Project.Data.Trees.Project.Path_Name;
elsif Root_Project.Path.Has_Dir_Name then
Gpr_Path := Root_Project.Path;
else
-- If project directory still not defined, search it in full set
-- of search paths.
Gpr_Path := Create
(Root_Project.Path.Name, Self.Search_Paths.All_Paths);
if not Build_Path.Is_Defined then
Self.Build_Path := Path_Name.Create_Directory
(Filename_Type (Gpr_Path.Dir_Name));
end if;
end if;
-- Add full project path in the message log
Self.Messages.Append
(Message.Create
(Message.Information,
"Parsing """ & Gpr_Path.Value & """",
Source_Reference.Create (Gpr_Path.Value, 0, 0)));
-- Add all search paths into the message log
declare
Search_Paths : Unbounded_String;
begin
for P of Self.Search_Paths.All_Paths loop
Append (Search_Paths, GNAT.OS_Lib.Path_Separator & P.Value);
end loop;
-- Remove first path separator
Delete (Search_Paths, 1, 1);
Self.Messages.Append
(Message.Create
(Message.Information,
"project search path: " & To_String (Search_Paths),
Source_Reference.Create (Gpr_Path.Value, 0, 0)));
end;
Self.Root := Recursive_Load
(Self,
Root_Project => (if Root_Project.Kind = Project_Definition
then Root_Project
else (Project_Path, Gpr_Path)),
Context => Root);
-- Do nothing more if there are errors during the parsing
if not Self.Messages.Has_Error then
-- Add to root view's externals, configuration project externals
Def := Definition.Get (Self.Root);
if Config.Is_Defined and then Config.Has_Externals then
for E of Config.Externals loop
if not Def.Externals.Contains (E) then
Def.Externals.Append (E);
end if;
end loop;
end if;
for V_Data of Self.Views_Set loop
-- Compute the external dependencies for the views. This
-- is the set of external used in the project and in all
-- imported/extended project.
for E of Definition.Get_RO (V_Data).Externals loop
if not Def.Externals.Contains (E) then
-- Note that if we have an aggregate project, then
-- we are not dependent on the external if it is
-- statically redefined in the aggregate project. But
-- at this point we have not yet parsed the project.
--
-- The externals will be removed in Set_Context when
-- the parsing is done.
Def.Externals.Append (E);
end if;
end loop;
end loop;
if Config.Is_Defined and then Config.Has_Externals
and then Self.Root.Kind in Aggregate_Kind
then
Update_Context
(Self.Context (Aggregate), Config.Externals, Environment);
end if;
Set_Context (Self, Context);
Definition.Check_Same_Name_Extended (Self.Root);
if not Self.Pre_Conf_Mode then
-- We only need those checks if we are not in pre-configuration
-- stage, otherwise we might have errors if a project references
-- corresponding attributes from a not yet found project and their
-- values default to empty ones.
Definition.Check_Aggregate_Library_Dirs (Self.Root);
Definition.Check_Package_Naming (Self.Root);
Definition.Check_Excluded_Source_Dirs (Self.Root);
end if;
end if;
if not Self.Pre_Conf_Mode and then Self.Messages.Has_Error then
raise Project_Error
with Gpr_Path.Value & ": fatal error, cannot load the project tree";
end if;
end Load;
----------
-- Load --
----------
procedure Load
(Self : in out Object;
Filename : Path_Name.Object;
Context : GPR2.Context.Object;
Config : PC.Object := PC.Undefined;
Build_Path : Path_Name.Object := Path_Name.Undefined;
Subdirs : Optional_Name_Type := No_Name;
Src_Subdirs : Optional_Name_Type := No_Name;
Check_Shared_Lib : Boolean := True;
Absent_Dir_Error : Error_Level := Warning;
Implicit_With : GPR2.Path_Name.Set.Object :=
GPR2.Path_Name.Set.Empty_Set;
Pre_Conf_Mode : Boolean := False;
File_Reader : GPR2.File_Readers.File_Reader_Reference :=
GPR2.File_Readers.No_File_Reader_Reference;
Environment : GPR2.Environment.Object :=
GPR2.Environment.Process_Environment) is
begin
if not Filename.Is_Directory then
GPR2.Project.Parser.Clear_Cache;
Self.Load
(Project_Descriptor'(Project_Path, Filename),
Context => Context,
Config => Config,
Build_Path => Build_Path,
Subdirs => Subdirs,
Src_Subdirs => Src_Subdirs,
Check_Shared_Lib => Check_Shared_Lib,
Absent_Dir_Error => Absent_Dir_Error,
Implicit_With => Implicit_With,
Pre_Conf_Mode => Pre_Conf_Mode,
File_Reader => File_Reader,
Environment => Environment);
GPR2.Project.Parser.Clear_Cache;
else
-- Load an empty project in directory "Filename"
View_Builder.Load
(Self,
View_Builder.Create (Filename, "Default"),
Context => Context,
Config => Config,
Build_Path => Build_Path,
Subdirs => Subdirs,
Src_Subdirs => Src_Subdirs,
Check_Shared_Lib => Check_Shared_Lib,
Absent_Dir_Error => Absent_Dir_Error,
Implicit_With => Implicit_With,
Pre_Conf_Mode => Pre_Conf_Mode,
File_Reader => File_Reader,
Environment => Environment);
end if;
end Load;
-------------------
-- Load_Autoconf --
-------------------
procedure Load_Autoconf
(Self : in out Object;
Root_Project : Project_Descriptor;
Context : GPR2.Context.Object;
Build_Path : Path_Name.Object := Path_Name.Undefined;
Subdirs : Optional_Name_Type := No_Name;
Src_Subdirs : Optional_Name_Type := No_Name;
Check_Shared_Lib : Boolean := True;
Absent_Dir_Error : Error_Level := Warning;
Implicit_With : GPR2.Path_Name.Set.Object :=
GPR2.Path_Name.Set.Empty_Set;
Target : Optional_Name_Type := No_Name;
Language_Runtimes : Containers.Lang_Value_Map :=
Containers.Lang_Value_Maps.Empty_Map;
Base : GPR2.KB.Object := GPR2.KB.Undefined;
Config_Project : GPR2.Path_Name.Object :=
GPR2.Path_Name.Undefined;
File_Reader : GPR2.File_Readers.File_Reader_Reference :=
GPR2.File_Readers.No_File_Reader_Reference;
Environment : GPR2.Environment.Object :=
GPR2.Environment.Process_Environment)
is separate;
procedure Load_Autoconf
(Self : in out Object;
Filename : Path_Name.Object;
Context : GPR2.Context.Object;
Build_Path : Path_Name.Object := Path_Name.Undefined;
Subdirs : Optional_Name_Type := No_Name;
Src_Subdirs : Optional_Name_Type := No_Name;
Check_Shared_Lib : Boolean := True;
Absent_Dir_Error : Error_Level := Warning;
Implicit_With : GPR2.Path_Name.Set.Object :=
GPR2.Path_Name.Set.Empty_Set;
Target : Optional_Name_Type := No_Name;
Language_Runtimes : Containers.Lang_Value_Map :=
Containers.Lang_Value_Maps.Empty_Map;
Base : GPR2.KB.Object := GPR2.KB.Undefined;
Config_Project : GPR2.Path_Name.Object := GPR2.Path_Name.Undefined;
File_Reader : GPR2.File_Readers.File_Reader_Reference :=
GPR2.File_Readers.No_File_Reader_Reference;
Environment : GPR2.Environment.Object :=
GPR2.Environment.Process_Environment) is
begin
if not Filename.Is_Directory then
Self.Load_Autoconf
(Root_Project => (Project_Path, Filename),
Context => Context,
Build_Path => Build_Path,
Subdirs => Subdirs,
Src_Subdirs => Src_Subdirs,
Check_Shared_Lib => Check_Shared_Lib,
Absent_Dir_Error => Absent_Dir_Error,
Implicit_With => Implicit_With,
Target => Target,
Language_Runtimes => Language_Runtimes,
Base => Base,
Config_Project => Config_Project,
File_Reader => File_Reader,
Environment => Environment);
else
View_Builder.Load_Autoconf
(Self,
View_Builder.Create (Filename, "Default"),
Context => Context,
Build_Path => Build_Path,
Subdirs => Subdirs,
Src_Subdirs => Src_Subdirs,
Check_Shared_Lib => Check_Shared_Lib,
Absent_Dir_Error => Absent_Dir_Error,
Implicit_With => Implicit_With,
Target => Target,
Language_Runtimes => Language_Runtimes,
Base => Base,
Config_Project => Config_Project,
File_Reader => File_Reader,
Environment => Environment);
end if;
end Load_Autoconf;
------------------------
-- Load_Configuration --
------------------------
procedure Load_Configuration
(Self : in out Object;
Filename : Path_Name.Object) is
begin
pragma Assert (Self.Self = Self'Unrestricted_Access);
Self.Conf := PC.Load (Filename);
Definition.Bind_Configuration_To_Tree (Self.Conf, Self.Self);
-- Copy all configuration message into the main tree's log message list
for M of Self.Conf.Log_Messages loop
Self.Messages.Append (M);
end loop;
if not Self.Messages.Has_Error then
Set_Context (Self);
end if;
end Load_Configuration;
------------------
-- Log_Messages --
------------------
function Log_Messages (Self : Object) return not null access Log.Object is
begin
return Self.Self.Messages'Access;
end Log_Messages;
----------
-- Next --
----------
overriding function Next
(Iter : Iterator; Position : Cursor) return Cursor
is
begin
return (Current => Project_View_Store.Next (Position.Current),
Tree => Position.Tree);
end Next;
-------------------
-- Ordered_Views --
-------------------
function Ordered_Views (Self : Object) return View.Vector.Object is
use GPR2.View_Ids;
use GPR2.View_Ids.DAGs;
Result : View.Vector.Object;
begin
for Id of Self.View_DAG.Topological_Sort loop
Result.Append (Self.Instance_Of (Id));
end loop;
return Result;
end Ordered_Views;
--------------------------
-- Prepend_Search_Paths --
--------------------------
procedure Prepend_Search_Paths
(Self : in out Object; Dir : GPR2.Path_Name.Object) is
begin
Self.Search_Paths.Prepended.Prepend (Dir);
Self.Update_Search_Paths;
end Prepend_Search_Paths;
---------------------
-- Process_Subtree --
---------------------
procedure Process_Subtree
(Self : Object;
View : Project.View.Object := Project.View.Undefined;
Externally_Built : Boolean := False;
Do_Action : not null access procedure
(View : Project.View.Object)) is
Processed : GPR2.Project.View.Set.Object;
procedure Process (View : Project.View.Object)
with Pre => View.Is_Defined;
-- If not yet processed, then Do_Action for view & parse View's subtree
-------------
-- Process --
-------------
procedure Process (View : Project.View.Object) is
begin
if Processed.Contains (View) then
return;
end if;
Processed.Insert (View);
if Externally_Built or else not View.Is_Externally_Built then
if View.Qualifier in K_Standard | K_Library then
Do_Action (View);
end if;
end if;
if View.Qualifier in Aggregate_Kind then
for Aggregated of View.Aggregated loop
Process (Aggregated);
end loop;
end if;
if View.Qualifier /= K_Aggregate then
for Imported of View.Imports loop
Process (Imported);
end loop;
for Limited_Imported of View.Limited_Imports loop
Process (Limited_Imported);
end loop;
if View.Is_Extending then
Process (View.Extended_Root);
end if;
end if;
end Process;
begin
Process ((if View.Is_Defined then View else Self.Root_Project));
end Process_Subtree;
--------------------------
-- Project_Search_Paths --
--------------------------
function Project_Search_Paths (Self : Object) return Path_Name.Set.Object is
begin
return Self.Search_Paths.All_Paths;
end Project_Search_Paths;
-----------------
-- Record_View --
-----------------
procedure Record_View
(Self : in out Object;
View : GPR2.Project.View.Object;
Source : Path_Name.Object;
Unit : Name_Type) is
begin
if not View.Is_Extended then
Self.Units.Include (Unit, View);
Self.Sources.Include (Filename_Type (Source.Value), View);
Self.Sources.Include (Source.Simple_Name, View);
end if;
end Record_View;
--------------------
-- Recursive_Load --
--------------------
function Recursive_Load
(Self : in out Object;
Root_Project : Project_Descriptor;
Context : Context_Kind;
Starting_From : View.Object := View.Undefined) return View.Object
is
type Relation_Status is
(Root, -- Root project
Extended, -- Extended project
Aggregated, -- In an aggregate project
Simple); -- Import, Limited import or aggregate library
P_Names : Containers.Name_Value_Map;
-- Used to check for duplicate project names possibly in
-- different (inconsistent naming) filenames.
Search_Path : Path_Name.Set.Object := Self.Search_Paths.All_Paths;
PP : Attribute.Object;
function Load (Filename : Path_Name.Object) return Definition.Data;
-- Returns the Data definition for the given project
function Internal
(Project : Project_Descriptor;
Aggregate : View.Object;
Status : Relation_Status;
Parent : View.Object;
Extends_Ctx : View.Vector.Object) return View.Object;
-- Internal function doing the actual load of the tree.
-- Project: the project to load
-- Aggregate: if defines, is set to the aggregate project that includes
-- "Filename".
-- Status: denotes the context of the load.
-- "root": the root project is being loaded.
-- "extended": the current project is extending "Filename"
-- "aggregated": the current project is aggregating
-- "filename". It can be either an aggregate project or
-- an aggregate library project.
-- "simple": a regular import.
-- Parent: the loading project.
-- Extends_Ctx: In case the project is loaded in a subtree of an
-- extends all, the extending project is .
function Is_Limited
(View : GPR2.Project.View.Object;
Import_Path : Path_Name.Object) return Boolean;
-- Returns True if the Import_Path is a limited with in View
procedure Propagate_Aggregate
(View : in out GPR2.Project.View.Object;
Root : GPR2.View_Ids.View_Id;
Is_Aggregate_Library : Boolean) with Inline;
-- Make sure that all views in the subtree of View reference the
-- Aggregate Library (if set), or set their namespace root to Root.
--
-- In case of Aggregate Libraries, this is needed if several aggregate
-- libraries exist in the tree and they reference the same project.
--
-- This is also needed for both aggregate and aggregate library cases
-- if a subproject is withed from several subtrees of the aggregate.
--------------
-- Internal --
--------------
function Internal
(Project : Project_Descriptor;
Aggregate : View.Object;
Status : Relation_Status;
Parent : View.Object;
Extends_Ctx : View.Vector.Object) return View.Object
is
Extending : constant IDS.View_Id :=
(if Status = Extended then Parent.Id
elsif not Extends_Ctx.Is_Empty
then Extends_Ctx.First_Element.Id
else View_Ids.Undefined);
-- A project can be extended either explicitly (Status is then
-- Extended and the parent points to the extending project), or
-- implicitly (withed unit of the extending project replaces withed
-- using of the extended project, creating an implicit extension).
-- In this case Extends_Ctx is not empty.
Filename : constant GPR2.Path_Name.Object :=
(if Project.Kind = Project_Definition
then Project.Data.Trees.Project.Path_Name
else Project.Path);
Id : constant IDS.View_Id :=
IDS.Create
(Project_File => Filename,
Context => Context,
Extending => Extending);
View : GPR2.Project.View.Object := Self.Get_View (Id);
begin
-- If the view is already defined just return it
if not View.Is_Defined then
declare
Data : Definition.Data := (if Project.Kind = Project_Definition
then Project.Data
else Load (Filename));
begin
-- If there are parsing errors, do not go further
if Self.Messages.Has_Error then
return View;
end if;
-- Compute directory used as project file directory
-- This is influenced by the Project_Dir parameters used on
-- load to simulate that a project is in another location.
Data.Path := Path_Name.Create_Directory
(Filename_Type (Filename.Dir_Name));
-- If parent view is an extending project keep track of the
-- relationship.
if Status = Extended then
Data.Extending := Definition.Weak (Parent);
elsif not Extends_Ctx.Is_Empty then
Data.Extending :=
Definition.Weak (Extends_Ctx.First_Element);
end if;
-- Update context associated with the the list of externals
-- defined in that project file.
Update_Context
(Self.Context (Context), Data.Externals, Self.Environment);
-- At this stage even if not complete we can create the view
-- and register it so that we can have references to it.
Data.Tree := Self.Self;
Data.Context := Context;
Data.Is_Root := Status = Root;
Data.Unique_Id := Id;
View := Register_View (Data);
-- Check if we already have a project recorded with the same
-- name. Issue an error if it is on a different filename.
declare
Full_Name : constant String :=
OS_Lib.Normalize_Pathname
(View.Path_Name.Value);
begin
if P_Names.Contains (View.Name) then
if P_Names (View.Name) /= Full_Name then
Self.Messages.Append
(GPR2.Message.Create
(Level => Message.Error,
Message => "duplicate project name """
& String (View.Name) & """ in """
& P_Names (View.Name)
& """",
Sloc => Source_Reference.Create
(Full_Name, 1, 1)));
end if;
else
P_Names.Insert (View.Name, Full_Name);
end if;
end;
end;
declare
Data : constant Definition.Ref :=
Definition.Get_RW (View);
New_Extends_Ctx : GPR2.Project.View.Vector.Object :=
Extends_Ctx;
-- Extends all context for the extended project if any
begin
-- Set the root view(s), so the view that is at the top level
-- of a standalone hierarchy (so either the root project,
-- or the top-level aggregated projects.
--
-- Note that in case of aggregated projects, a view can have
-- several root views.
if not Parent.Is_Defined
or else View.Kind = K_Aggregate
or else Parent.Kind = K_Aggregate
then
-- This is the root project or an aggregated project. This
-- creates a new namespace (i.e. root in the subtree)
Data.Root_Views.Append (View.Id);
else
Data.Root_Views :=
Definition.Get_RO (Parent).Root_Views;
Data.Agg_Libraries :=
Definition.Get_RO (Parent).Agg_Libraries;
if Parent.Kind = K_Aggregate_Library
and then Status = Aggregated
then
Data.Agg_Libraries.Include (Parent.Id);
end if;
end if;
-- Update the extends all view
if not Extends_Ctx.Is_Empty then
declare
-- We need to add the current view to the extended
-- property of the extends all view. To this end, we
-- use a local variable that will allow us to write
-- its definition
Temp_View : GPR2.Project.View.Object :=
Extends_Ctx.First_Element;
begin
Definition.Get_RW (Temp_View).Extended.Include (View);
end;
end if;
-- Load all imported projects
if Status = Extended then
-- Temporarily add the parent to the list of
-- extending projects so that we can simply loop over
-- those to gather all the imports of extending projects
New_Extends_Ctx.Prepend (Parent);
end if;
for Prj of Data.Trees.Imports loop
declare
Imported_View : GPR2.Project.View.Object;
Limited_With : Boolean := False;
begin
-- Look for the list of imported projects from the
-- extending project to see if we need to substitute
-- regular imports with their extended view.
Extends_Loop : for Ext of New_Extends_Ctx loop
Import_Loop : for Imp of Ext.Imports loop
if Imp.Is_Extending
and then
Imp.Extended_Root.Path_Name = Prj.Path_Name
then
Imported_View := Imp;
exit Extends_Loop;
end if;
end loop Import_Loop;
end loop Extends_Loop;
if not Imported_View.Is_Defined then
Imported_View :=
Internal
((Project_Path, Prj.Path_Name),
Aggregate => GPR2.Project.View.Undefined,
Status => Simple,
Parent => View,
Extends_Ctx => Extends_Ctx);
if not Imported_View.Is_Defined then
-- Some issue happened
pragma Assert (Self.Messages.Has_Error);
return GPR2.Project.View.Undefined;
end if;
-- limited with and with are tracked separately due
-- their very distinct nature.
if Is_Limited (View, Prj.Path_Name) then
Limited_With := True;
end if;
end if;
if Data.Limited_Imports.Contains (Prj.Name)
or else Data.Imports.Contains (Prj.Name)
then
-- Do not try to insert the project below as it is
-- a duplicate import. The error will be reported
-- later, so here we do nothing.
null;
else
if Limited_With then
Data.Limited_Imports.Insert
(Prj.Name, Imported_View);
else
Data.Imports.Insert (Prj.Name, Imported_View);
end if;
end if;
Data.Closure.Include (Prj.Name, Imported_View);
for C in
Definition.Get_RO (Imported_View).Closure.Iterate
loop
Data.Closure.Include
(Definition.Project_View_Store.Key (C),
Definition.Project_View_Store.Element (C));
end loop;
end;
end loop;
if Status = Extended then
-- Remove Parent from New_Extends_Ctx: simple extension
-- don't propagate to the subtree.
New_Extends_Ctx.Delete_First;
end if;
-- Load the extended project if any:
if Data.Trees.Extended.Is_Defined then
if Data.Trees.Project.Is_Extending_All then
-- Update the extends context in case we do an
-- extends all: this is applied to the whole sub-tree.
New_Extends_Ctx.Prepend (View);
end if;
declare
Extended_View : constant GPR2.Project.View.Object :=
Internal
((Project_Path,
Data.Trees.Extended.Path_Name),
Aggregate =>
GPR2.Project.View.Undefined,
Status => Extended,
Parent => View,
Extends_Ctx => New_Extends_Ctx);
begin
if Extended_View.Is_Defined then
Data.Extended.Include (Extended_View);
Data.Extended_Root := Extended_View;
end if;
end;
end if;
end;
-- At this stage the view is complete. Update mappings
-- (i.e effective view for extends and extends all) and DAG to
-- order the views.
declare
use IDS;
Unique_ID : constant View_Id := View.Id;
begin
pragma Assert (Is_Defined (Unique_ID));
-- Finally update the DAG structure that will define the
-- processing order for the views.
declare
Predecessors : GPR2.View_Ids.Set.Set;
begin
for Import of View.Imports loop
Predecessors.Include (Import.Id);
end loop;
View.Tree.View_DAG.Update_Vertex
(Vertex => Unique_ID,
Predecessors => Predecessors);
end;
-- Add aggregate dependency
if Status = Aggregated then
-- inclusion of a project by an aggregate/aggregate library
-- project.
if Parent.Is_Defined then
View.Tree.View_DAG.Update_Vertex
(Vertex => Parent.Id,
Predecessor => Unique_ID);
else
-- Inclusion from the root aggregate project
View.Tree.View_DAG.Update_Vertex
(Vertex => Aggregate.Id,
Predecessor => Unique_ID);
end if;
end if;
-- Add dependency on extended if not a "extends all"
if View.Is_Extending then
View.Tree.View_DAG.Update_Vertex
(Vertex => Unique_ID,
Predecessor => View.Extended_Root.Id);
end if;
end;
elsif Parent.Is_Defined then
if Parent.Kind = K_Aggregate_Library
and then Status = Aggregated
then
-- We need to keep track of aggregate libraries
-- closure, and namespace root views
Propagate_Aggregate (View, Parent.Id, True);
end if;
if Parent.Kind /= K_Aggregate then
for Root of Parent.Namespace_Roots loop
Propagate_Aggregate (View, Root.Id, False);
end loop;
elsif Status = Aggregated then
Propagate_Aggregate (View, View.Id, False);
end if;
end if;
return View;
end Internal;
----------------
-- Is_Limited --
----------------
function Is_Limited
(View : GPR2.Project.View.Object;
Import_Path : Path_Name.Object) return Boolean is
begin
return Definition.Get_RO
(View).Trees.Project.Imports.Element (Import_Path).Is_Limited;
end Is_Limited;
----------
-- Load --
----------
function Load (Filename : Path_Name.Object) return Definition.Data is
Paths : constant Path_Name.Set.Object :=
GPR2.Project.Search_Paths (Filename, Search_Path);
Project : constant GPR2.Project.Parser.Object :=
GPR2.Project.Parser.Parse
(Filename,
Self.Implicit_With,
Self.Messages,
GPR2.File_Readers.Convert (Self.File_Reader));
Data : Definition.Data;
begin
Data.Trees.Project := Project;
-- Record the project tree for this view
Data.Tree := Self.Self;
Data.Kind := K_Standard;
-- Do the following only if there are no error messages
if not Self.Messages.Has_Error then
Data.Kind := Project.Qualifier;
Data.Externals := Data.Trees.Project.Externals;
-- Now load all imported projects if any
for Import of Data.Trees.Project.Imports loop
declare
Import_Filename : constant Path_Name.Object :=
Create (Import.Path_Name.Name, Paths);
begin
if Import_Filename.Exists then
Data.Trees.Imports.Insert
(Import_Filename,
GPR2.Project.Parser.Parse
(Import_Filename,
Self.Implicit_With,
Self.Messages,
GPR2.File_Readers.Convert (Self.File_Reader)));
else
Self.Messages.Append
(GPR2.Message.Create
(Level => (if Self.Pre_Conf_Mode
then Message.Warning
else Message.Error),
Message => "imported project file """
& String (Import.Path_Name.Name)
& """ not found",
Sloc => Import));
end if;
end;
end loop;
if Data.Trees.Project.Has_Extended then
declare
Extended : constant GPR2.Project.Import.Object :=
Data.Trees.Project.Extended;
Extended_Name : constant Filename_Type :=
Extended.Path_Name.Name;
Extended_Filename : constant Path_Name.Object :=
Create (Extended_Name, Paths);
begin
if Extended_Filename.Exists then
Data.Trees.Extended := GPR2.Project.Parser.Parse
(Extended_Filename,
Self.Implicit_With,
Self.Messages,
GPR2.File_Readers.Convert (Self.File_Reader));
else
Self.Messages.Append
(GPR2.Message.Create
(Level => (if Self.Pre_Conf_Mode
then Message.Warning
else Message.Error),
Message => "extended project file """
& String (Extended_Name)
& """ not found",
Sloc => Data.Trees.Project.Extended));
end if;
end;
end if;
end if;
return Data;
end Load;
-------------------------
-- Propagate_Aggregate --
-------------------------
procedure Propagate_Aggregate
(View : in out GPR2.Project.View.Object;
Root : GPR2.View_Ids.View_Id;
Is_Aggregate_Library : Boolean)
is
Data : constant GPR2.Project.Definition.Ref :=
Definition.Get_RW (View);
Position : GPR2.View_Ids.Set.Cursor;
Inserted : Boolean := False;
begin
if Is_Aggregate_Library then
Data.Agg_Libraries.Insert (Root, Position, Inserted);
elsif not Data.Root_Views.Contains (Root) then
Data.Root_Views.Append (Root);
Inserted := True;
end if;
if not Inserted then
return;
end if;
if Data.Extended_Root.Is_Defined then
Propagate_Aggregate
(Data.Extended_Root, Root, Is_Aggregate_Library);
end if;
for Import of Data.Imports loop
Propagate_Aggregate (Import, Root, Is_Aggregate_Library);
end loop;
for Import of Data.Limited_Imports loop
Propagate_Aggregate (Import, Root, Is_Aggregate_Library);
end loop;
if not Is_Aggregate_Library
and then Data.Kind = K_Aggregate_Library
then
-- Propagate the namespace root
for Agg of Data.Aggregated loop
Propagate_Aggregate (Agg, Root, False);
end loop;
end if;
end Propagate_Aggregate;
begin
if Starting_From.Is_Defined then
PP := Starting_From.Attribute (PRA.Project_Path);
end if;
if PP.Is_Defined then
declare
Prepend : Boolean := False;
Path : Path_Name.Object;
begin
for P of PP.Values loop
if P.Text = "-" then
Prepend := True;
else
Path := Path_Name.Create_Directory
(Filename_Type (P.Text),
Filename_Type (Starting_From.Dir_Name.Value));
if Prepend then
Search_Path.Prepend (Path);
else
Search_Path.Append (Path);
end if;
end if;
end loop;
end;
end if;
declare
Aggregate : GPR2.Project.View.Object;
Parent : GPR2.Project.View.Object;
Status : Relation_Status;
Result : View.Object;
begin
if Context = GPR2.Context.Aggregate then
-- In the closure of an aggregate project
-- Take care of nested aggregates: only the root aggregate project
-- defines the context.
if Starting_From.Context = Root then
-- Starting_From is the root aggregate project, and the view
-- being loaded will thus define a new namespace for its
-- subtree.
Aggregate := Starting_From;
Parent := GPR2.Project.View.Undefined;
Status := Aggregated;
else
-- Nested aggregate, or inclusion from an aggregate context:
-- we retrieve the Aggregate from the parent view, or
-- inclusion from an aggregate context
Parent := Starting_From;
if Parent.Kind in Aggregate_Kind then
Aggregate := Parent;
Status := Aggregated;
else
Aggregate := GPR2.Project.View.Undefined;
Status := Simple;
end if;
end if;
else
-- Root context: no aggregate project
Aggregate := GPR2.Project.View.Undefined;
Parent := Starting_From;
-- Parent may be an aggregate library project, we need to set
-- the status to Aggregate in this case
if not Parent.Is_Defined then
Status := Root;
elsif Parent.Kind in Aggregate_Kind then
-- Aggregate library project
Status := Aggregated;
else
Status := Simple;
end if;
end if;
Result := Internal
(Project => Root_Project,
Aggregate => Aggregate,
Status => Status,
Parent => Parent,
Extends_Ctx => View.Vector.Empty_Vector);
-- Update the DAG with the newly loaded tree.
--
-- ??? This is certainly not optimal, in particular when there's
-- a lot of aggregates, potentially nested, in the final tree, as
-- Recursive_Load will be called for each aggregated project. However
-- that's convenient to do it there as we have a single entry point
-- to handle circularity issues. If performance becomes an issue, we
-- would need to move this DAG update to the upper level to have a
-- smarter handling of aggregated projects, so in Set_Context and
-- Load (and of course we need to propagate the list to this upper
-- level handling)
declare
Cycle : GPR2.View_Ids.Vector.Vector;
Prev : View.Object;
Current : View.Object;
Circularity : Boolean;
begin
Self.View_DAG.Update (Circularity);
if Circularity then
Cycle := Self.View_DAG.Shortest_Circle;
Self.Messages.Append
(Message.Create
(Message.Error, "circular dependency detected",
Source_Reference.Create
(Result.Path_Name.Value, 0, 0)));
Prev := View.Undefined;
for Id of reverse Cycle loop
Current := Self.Instance_Of (Id);
if Prev.Is_Defined then
Self.Messages.Append
(Message.Create
(Message.Error,
"depends on " &
String (Current.Path_Name.Value),
Source_Reference.Create
(Prev.Path_Name.Value, 0, 0)));
end if;
Prev := Current;
end loop;
end if;
end;
return Result;
end;
end Recursive_Load;
----------------------------------
-- Register_Project_Search_Path --
----------------------------------
procedure Register_Project_Search_Path
(Self : in out Object; Dir : Path_Name.Object) is
begin
Prepend_Search_Paths (Self, Dir);
end Register_Project_Search_Path;
-------------------
-- Register_View --
-------------------
function Register_View
(Def : in out Definition.Data) return Project.View.Object
is
View : Project.View.Object;
begin
-- Is the Id actually needed here?
Def.Id := Natural (Def.Tree.Views_Set.Length) + 1;
-- Populate the view with its definitions
Definition.Set (View, Def);
-- Ensure Views_Set and View_Ids know about it
Def.Tree.Views_Set.Insert (View);
pragma Assert (Definition.Refcount (View) = 2);
Def.Tree.View_Ids.Include (Def.Unique_Id, View);
pragma Assert (Definition.Refcount (View) = 3);
return View;
end Register_View;
------------------
-- Reindex_Unit --
------------------
procedure Reindex_Unit (Self : in out Object; From, To : Name_Type) is
C : Name_View.Cursor := Self.Units.Find (From);
begin
if Name_View.Has_Element (C) then
Self.Units.Include (To, Name_View.Element (C));
Self.Units.Delete (C);
end if;
end Reindex_Unit;
------------------------------------
-- Restrict_Autoconf_To_Languages --
------------------------------------
procedure Restrict_Autoconf_To_Languages
(Self : in out Object;
Langs : Containers.Language_Set) is
begin
Self.Langs_Of_Interest := Langs;
end Restrict_Autoconf_To_Languages;
------------------
-- Root_Project --
------------------
function Root_Project (Self : Object) return View.Object is
begin
return Self.Root;
end Root_Project;
-------------
-- Runtime --
-------------
function Runtime
(Self : Object; Language : Language_Id) return Optional_Name_Type
is
TA : Attribute.Object;
begin
if Self.Root.Is_Defined then
TA := Self.Root.Attribute
(PRA.Runtime, Index => Attribute_Index.Create (Language));
if TA.Is_Defined then
return Optional_Name_Type (TA.Value.Text);
end if;
end if;
return No_Name;
end Runtime;
---------------------
-- Runtime_Project --
---------------------
function Runtime_Project (Self : Object) return View.Object is
begin
return Self.Runtime;
end Runtime_Project;
-----------------
-- Set_Context --
-----------------
procedure Set_Context
(Self : in out Object;
Context : GPR2.Context.Object;
Changed : access procedure (Project : View.Object) := null)
is
Root : constant Definition.Ref := Definition.Get_RW (Self.Root);
Def : Definition.Ref;
Attr : Attribute.Object;
begin
-- Register the root context for this project tree
Self.Context (GPR2.Context.Root) := Context;
-- Take missing external values from environment
Update_Context
(Self.Context (GPR2.Context.Root), Root.Externals, Self.Environment);
Set_Context (Self, Changed);
for V of Self.Views_Set loop
Def := Definition.Get (V);
Def.Clear_Cache;
if Self.Has_Src_Subdirs
and then V.Kind not in K_Configuration | K_Abstract | Aggregate_Kind
and then V /= Self.Runtime
then
-- ensure we don't cache the value of Source_Dirs
Def.Disable_Cache;
declare
SD : constant Attribute.Object :=
V.Attribute (PRA.Source_Dirs);
SV : Containers.Source_Value_List := SD.Values;
begin
SV.Prepend
(Source_Reference.Value.Object
(Source_Reference.Value.Create
(Source_Reference.Object (SD),
V.Source_Subdirectory.Value)));
Def.Attrs.Include (Attribute.Create (SD.Name, SV));
end;
Def.Enable_Cache;
end if;
if V.Is_Library then
Def.Interface_Units.Clear;
Def.Interface_Sources.Clear;
if V.Check_Attribute (PRA.Library_Interface, Result => Attr) then
for Val of Attr.Values loop
Def.Interface_Units.Insert
(Name_Type (Val.Text), Source_Reference.Object (Val));
end loop;
end if;
if V.Check_Attribute (PRA.Interfaces, Result => Attr) then
for Val of Attr.Values loop
Def.Interface_Sources.Insert
(Filename_Type (Val.Text), Source_Reference.Object (Val));
end loop;
end if;
end if;
end loop;
end Set_Context;
procedure Set_Context
(Self : in out Object;
Changed : access procedure (Project : View.Object) := null)
is
procedure Set_View (View : Project.View.Object);
-- Set the context for the given view
procedure Validity_Check (View : Project.View.Object);
-- Do validity check on the given view
function Has_Error return Boolean is
(Self.Messages.Has_Error);
--------------
-- Set_View --
--------------
procedure Set_View (View : Project.View.Object) is
use type GPR2.Context.Binary_Signature;
P_Data : constant Definition.Ref := Definition.Get (View);
Agg_Paths : GPR2.Containers.Filename_Set;
Old_Signature : constant GPR2.Context.Binary_Signature :=
P_Data.Signature;
New_Signature : GPR2.Context.Binary_Signature;
Paths : Path_Name.Set.Object;
Tmp_Attr : Project.Attribute.Object;
function Get_Matching_Files
(Projects : Source_Reference.Value.Object)
return Path_Name.Set.Object;
-- Return all gpr files matching Source_Reference text
------------------------
-- Get_Matching_Files --
------------------------
function Get_Matching_Files
(Projects : Source_Reference.Value.Object)
return Path_Name.Set.Object
is
Files : GPR2.Path_Name.Set.Object;
-- matching files
procedure Get_Files;
procedure Log (Level : GPR2.Message.Level_Value; Msg : String);
---------------
-- Get_Files --
---------------
procedure Get_Files is
View_Dir : constant GPR2.Path_Name.Object :=
Path_Name.Create_Directory
(Filename_Optional
(View.Path_Name.Dir_Name));
-- View root directory
Pattern : constant GPR2.Path_Name.Object :=
(if OS_Lib.Is_Absolute_Path (Projects.Text)
then Path_Name.Create_File
(Filename_Optional (Projects.Text),
Path_Name.No_Resolution)
else View_Dir.Compose
(Filename_Optional (Projects.Text)));
-- The absolute path pattern to get matching files
Dir_Part : constant Filename_Optional :=
Filename_Optional
(Pattern.Containing_Directory.Relative_Path
(View_Dir).Value);
-- The dir part without the trailing directory separator
Filename_Part : constant Filename_Optional :=
Filename_Optional (Pattern.Simple_Name);
-- The filename pattern of matching files
Filename : constant Filename_Optional :=
(if Strings.Fixed.Index
(String (Filename_Part),
Wildcards,
Going => Strings.Backward) = 0
then Filename_Part
else "");
-- "" if Filename part is a regular expression otherwise the
-- filename to locate.
Filename_Regexp : constant GNAT.Regexp.Regexp :=
GPR2.Compile_Regexp (Filename_Part);
-- regexp pattern for matching Filename
procedure Handle_File
(File : GPR2.Path_Name.Object;
Timestamp : Ada.Calendar.Time);
procedure Is_Directory_Handled
(Directory : GPR2.Path_Name.Object;
Is_Root_Dir : Boolean;
Do_Dir_Visit : in out Boolean;
Do_Subdir_Visit : in out Boolean);
-----------------
-- Handle_File --
-----------------
procedure Handle_File
(File : GPR2.Path_Name.Object;
Timestamp : Ada.Calendar.Time)
is
pragma Unreferenced (Timestamp);
begin
if GNAT.Regexp.Match (String (File.Simple_Name),
Filename_Regexp)
and then not Files.Contains (File)
then
Files.Append (File);
end if;
end Handle_File;
--------------------------
-- Is_Directory_Handled --
--------------------------
procedure Is_Directory_Handled
(Directory : GPR2.Path_Name.Object;
Is_Root_Dir : Boolean;
Do_Dir_Visit : in out Boolean;
Do_Subdir_Visit : in out Boolean)
is
pragma Unreferenced (Is_Root_Dir, Do_Subdir_Visit);
begin
if Filename /= "" then
Do_Dir_Visit := False;
declare
File : constant GPR2.Path_Name.Object :=
Directory.Compose (Filename);
use Ada.Directories;
begin
if File.Exists
and then not Files.Contains (File)
and then Kind (File.Value) /= Directories.Directory
then
Files.Append (File);
end if;
end;
end if;
end Is_Directory_Handled;
begin
Definition.Foreach
(Base_Dir => View.Dir_Name,
Messages => View.Tree.Log_Messages.all,
Directory_Pattern => Dir_Part,
Source => Projects,
File_CB => Handle_File'Access,
Directory_CB => Is_Directory_Handled'Access);
end Get_Files;
---------
-- Log --
---------
procedure Log (Level : GPR2.Message.Level_Value; Msg : String) is
begin
Self.Append_Message (Message.Create (Level, Msg, Projects));
end Log;
begin
if Projects.Text /= "" then
Get_Files;
end if;
if Files.Is_Empty then
Log (Message.Error, "file """ & Projects.Text & """ not found");
end if;
return Files;
exception
when IO_Exceptions.Name_Error =>
Log (Message.Error,
Projects.Text & " contains an invalid directory");
return Files;
end Get_Matching_Files;
function Is_Implicitly_Abstract
(View : Project.View.Object) return Boolean;
-- Returns True if project can be recognized as abstract project.
-- I.e. not inherited from non abstract project and one of
-- source list defining attributes is empty.
----------------------------
-- Is_Implicitly_Abstract --
----------------------------
function Is_Implicitly_Abstract
(View : Project.View.Object) return Boolean
is
function Is_Defined_Empty (Attr : Q_Attribute_Id) return Boolean;
-- Returns True if attribute defined as empty list in view
----------------------
-- Is_Defined_Empty --
----------------------
function Is_Defined_Empty (Attr : Q_Attribute_Id) return Boolean is
begin
Tmp_Attr := View.Attribute (Attr);
return Tmp_Attr.Is_Defined and then Tmp_Attr.Values.Is_Empty;
end Is_Defined_Empty;
begin
if View.Is_Abstract then
return True;
end if;
if (View.Is_Extending
and then not Is_Implicitly_Abstract (View.Extended_Root))
or else View.Is_Externally_Built
then
-- Project extending non abstract one is not abstract
return False;
end if;
-- We need at least Source_Dirs, Source_Files, or Languages
-- explicitly empty.
return Is_Defined_Empty (PRA.Source_Dirs)
or else Is_Defined_Empty (PRA.Source_Files)
or else Is_Defined_Empty (PRA.Languages);
end Is_Implicitly_Abstract;
begin
GPR2.Project.Parser.Process
(P_Data.Trees.Project,
Self,
(if View.Kind = K_Configuration
and then Self.Root.Kind in Aggregate_Kind
then Self.Context (Aggregate)
else View.Context),
View,
Self.Pre_Conf_Mode);
if Self.Messages.Has_Error then
return;
end if;
if View.Qualifier not in Aggregate_Kind then
New_Signature := View.Context.Signature (P_Data.Externals);
elsif not P_Data.Attrs.Contains (PRA.Project_Files.Attr) then
-- Aggregate project must have Project_Files attribute
Self.Error
("attribute ""Project_Files"" must be defined in"
& " an aggregate project",
Source_Reference.Create (View.Path_Name.Value, 0, 0));
else
-- If an aggregate project and an attribute external is defined
-- then remove the dependency on the corresponding externals.
if P_Data.Is_Root then
for C in P_Data.Attrs.Iterate (Name => PRA.External.Attr) loop
declare
P : Containers.Name_Type_List.Cursor :=
P_Data.Externals.Find
(Name_Type (P_Data.Attrs (C).Index.Text));
begin
if Containers.Name_Type_List.Has_Element (P) then
P_Data.Externals.Delete (P);
end if;
end;
end loop;
end if;
if P_Data.Is_Root then
-- This is the root aggregate project which defines the context
-- for all aggregated projects.
-- Starts from the root context
Self.Context (Aggregate) := Self.Context (GPR2.Context.Root);
-- And then adjust context based on External attribute values
-- inside the root aggregate project.
for C in P_Data.Attrs.Iterate (PRA.External.Attr) loop
declare
use all type PRA.Value_Kind;
External : constant Attribute.Object := P_Data.Attrs (C);
Position : GPR2.Context.Key_Value.Cursor;
Inserted : Boolean;
begin
-- Check for the validity of the external attribute here
-- as the validity check will come after it is fully
-- loaded/resolved.
if External.Kind = Single then
Self.Context (Aggregate).Insert
(Name_Type (External.Index.Text),
External.Value.Text,
Position, Inserted);
end if;
end;
end loop;
end if;
-- Now we can record the aggregated projects based on the possibly
-- new Project_Files attribute value. This attribute may be set
-- depending on the parsing of the imported projects.
P_Data.Aggregated.Clear;
Agg_Paths.Clear;
-- Pathname for Project_Files projects are relative to the
-- aggregate project only.
Paths.Append (View.Path_Name);
for Project of P_Data.Attrs.Element (PRA.Project_Files.Attr).Values
loop
declare
Found : Boolean := False;
begin
for Pathname of Get_Matching_Files (Project) loop
if Pathname = View.Path_Name then
-- We are loading recursively the aggregate project
-- As in GPR1 ignore it.
Found := True;
elsif Agg_Paths.Contains
(Filename_Type (Pathname.Value))
then
-- Duplicate in the project_files attribute
Self.Messages.Append
(Message.Create
(Message.Warning,
"duplicate aggregated project "
& String (Pathname.Base_Name),
Project));
Found := True;
elsif Pathname.Exists then
declare
Context : constant Context_Kind :=
(if View.Kind = K_Aggregate_Library
then Definition.Get_RO
(View).Context
else Aggregate);
A_View : constant GPR2.Project.View.Object :=
Recursive_Load
(Self => Self,
Root_Project => (Project_Path,
Pathname),
Context => Context,
Starting_From => View);
begin
-- If there was error messages during the parsing
-- of the aggregated project, just exit now.
if Self.Messages.Has_Error then
raise Project_Error with Pathname.Value;
end if;
-- Record aggregated view into the aggregate's view
P_Data.Aggregated.Append (A_View);
Agg_Paths.Insert (Filename_Type (Pathname.Value));
end;
Found := True;
end if;
end loop;
if not Found then
Self.Error
("file """ & Project.Text & """ not found", Project);
end if;
end;
end loop;
New_Signature := View.Context.Signature (P_Data.Externals);
end if;
if not Has_Error
and then P_Data.Kind not in K_Abstract | K_Configuration
then
P_Data.Signature := New_Signature;
-- Let's compute the project kind if needed. A project without an
-- explicit qualifier may actually be an abstract project or a
-- library project.
P_Data.Kind := P_Data.Trees.Project.Qualifier;
if P_Data.Kind = K_Standard then
if Is_Implicitly_Abstract (View) then
if P_Data.Trees.Project.Explicit_Qualifier then
-- Error message depend on Tmp_Attr because this
-- attribute was used to detect that project has no
-- sources.
Self.Messages.Append
(Message.Create
(Message.Error,
"a standard project must have "
& (if Tmp_Attr.Name.Id = PRA.Source_Dirs
then "source directories"
elsif Tmp_Attr.Name.Id = PRA.Languages
then "languages"
else "sources"),
Tmp_Attr));
else
P_Data.Kind := K_Abstract;
end if;
elsif View.Check_Attribute
(PRA.Library_Name, Result => Tmp_Attr)
and then (Tmp_Attr.Value.Text /= ""
or else Tmp_Attr.Value.Is_From_Default)
and then View.Check_Attribute
(PRA.Library_Dir, Result => Tmp_Attr)
and then (Tmp_Attr.Value.Text /= ""
or else Tmp_Attr.Value.Is_From_Default)
then
-- If Library_Name, Library_Dir are declared, then the
-- project is a library project.
-- Note: Library_Name may be inherited from an extended
-- project while Library_Dir has to be defined in the
-- project.
if P_Data.Trees.Project.Explicit_Qualifier then
Self.Messages.Append
(Message.Create
(Message.Error,
"a standard project cannot be a library project",
Tmp_Attr));
else
P_Data.Kind := K_Library;
end if;
elsif View.Is_Extending and then View.Extended_Root.Is_Library
and then P_Data.Trees.Project.Explicit_Qualifier
then
Self.Messages.Append
(Message.Create
(Message.Error,
"a standard project cannot extend a library project",
P_Data.Trees.Project.Extended));
end if;
end if;
-- Signal project change if we have different signature.
-- That is if there is at least some external used otherwise the
-- project is stable and won't change.
if Old_Signature /= New_Signature then
if Changed /= null then
Changed (View);
end if;
Self.Invalidate_Sources (View);
end if;
end if;
end Set_View;
--------------------
-- Validity_Check --
--------------------
procedure Validity_Check (View : Project.View.Object) is
use type PRA.Index_Value_Type;
P_Kind : constant Project_Kind := View.Kind;
P_Data : constant Definition.Const_Ref := Definition.Get_RO (View);
begin
-- Check global properties
if View.Kind /= View.Qualifier then
Self.Lint
("project qualifier could be explicitly set to "
& Image (View.Kind),
Source_Reference.Create (View.Path_Name.Value, 0, 0));
end if;
-- Check packages
for P of P_Data.Packs loop
if Registry.Pack.Exists (P.Id) then
-- Check the package itself
if not Registry.Pack.Is_Allowed_In (P.Id, P_Kind) then
Self.Warning
("package """ & Image (P.Id)
& """ cannot be used in " & Image (P_Kind) & 's',
P);
end if;
-- Check package's attributes
for A of P.Attrs loop
declare
Q_Name : constant Q_Attribute_Id :=
(P.Id, A.Name.Id.Attr);
Def : constant PRA.Def := PRA.Get (Q_Name);
begin
if not Def.Is_Allowed_In (P_Kind) then
Self.Warning
("attribute """ & Image (Q_Name)
& """ cannot be used in " & Image (P_Kind),
A);
end if;
-- In aggregate project, the Builder package only
-- accepts the index "others" for file globs.
if P_Data.Kind in Aggregate_Kind
and then P.Id = PRP.Builder
and then Def.Index_Type in
PRA.FileGlob_Index | PRA.FileGlob_Or_Language_Index
and then A.Index.Is_Defined
and then not A.Index.Is_Others
then
Self.Warning
("attribute """ & Image (Q_Name)
& """ only supports index ""others"""
& " in aggregate projects",
A);
end if;
end;
end loop;
end if;
end loop;
-- Check top level attributes
for A of P_Data.Attrs loop
declare
Q_Name : constant Q_Attribute_Id := A.Name.Id;
begin
declare
Allowed : constant PRA.Allowed_In :=
PRA.Get (Q_Name).Is_Allowed_In;
Found : Natural := 0;
Allow : Project_Kind;
begin
if not Allowed (P_Kind) then
for A in Allowed'Range loop
if Allowed (A) then
Found := Found + 1;
exit when Found > 1;
Allow := A;
end if;
end loop;
pragma Assert (Found > 0);
if Found = 1 or else Allow = K_Aggregate then
-- If one or Aggregate_Kind allowed use including
-- error message.
Self.Warning
('"' & Image (A.Name.Id) & """ is only valid in "
& Image (Allow) & 's',
A);
else
-- If more than one is allowed use excluding
-- error message.
Self.Warning
("attribute """ & Image (A.Name.Id)
& """ cannot be used in "
& Image (P_Kind) & 's',
A);
end if;
end if;
end;
end;
end loop;
-- Check Library_Version attribute format
declare
procedure Check_Directory
(Name : Q_Attribute_Id;
Human_Name : String;
Get_Directory : not null access function
(Self : Project.View.Object)
return Path_Name.Object;
Mandatory : Boolean := False;
Must_Exist : Boolean := True);
-- Check is directory exists and warn if there is try to relocate
-- absolute path with --relocate-build-tree gpr tool command line
-- parameter. Similar check for attributes with directory names.
--
-- Mandatory: when set, check that the attribute is defined.
-- Must_Exist: when set, check that the directory exists on the
-- filesystem.
Attr : Attribute.Object;
---------------------
-- Check_Directory --
---------------------
procedure Check_Directory
(Name : Q_Attribute_Id;
Human_Name : String;
Get_Directory : not null access function
(Self : Project.View.Object)
return Path_Name.Object;
Mandatory : Boolean := False;
Must_Exist : Boolean := True) is
begin
-- We don't warn for default attributes (such as exec dir
-- defaulting to a non-existing object dir), as we already
-- warn for the referenced attribute.
if View.Check_Attribute (Name, Result => Attr)
and then not Attr.Is_Default
then
declare
AV : constant Source_Reference.Value.Object := Attr.Value;
PN : constant Path_Name.Object := Get_Directory (View);
begin
if Must_Exist
and then Self.Absent_Dir_Error /= No_Error
and then not PN.Exists
then
Self.Messages.Append
(Message.Create
((if Self.Absent_Dir_Error = Error
then Message.Error
else Message.Warning),
(if Human_Name = ""
then "D"
else Human_Name & " d") & "irectory """
& AV.Text & """ not found",
Sloc => AV));
elsif Self.Build_Path.Is_Defined
and then OS_Lib.Is_Absolute_Path (AV.Text)
and then Self.Root.Is_Defined
and then Self.Build_Path /= Self.Root.Dir_Name
then
Self.Messages.Append
(Message.Create
(Message.Warning,
'"'
& PN.Relative_Path (Self.Root.Path_Name).Value
& """ cannot relocate absolute "
& (if Human_Name = ""
then ""
else Human_Name & ' ')
& "directory",
Sloc => AV));
end if;
end;
elsif Mandatory then
Self.Messages.Append
(Message.Create
(Message.Error,
"attribute " & Image (Name.Attr) & " not declared",
Source_Reference.Create (View.Path_Name.Value, 0, 0)));
end if;
end Check_Directory;
begin
if View.Kind in K_Standard | K_Library | K_Aggregate_Library
and then not View.Is_Aggregated_In_Library
then
Check_Directory
(PRA.Object_Dir,
"object",
Project.View.Object_Directory'Access,
Must_Exist => not View.Is_Aggregated_In_Library
and then not View.Is_Extended);
end if;
if View.Is_Library
and then not View.Is_Aggregated_In_Library
then
Check_Directory
(PRA.Library_Dir,
"library",
Project.View.Library_Directory'Access,
Mandatory => True,
Must_Exist => not View.Is_Aggregated_In_Library
and then not View.Is_Extended);
Check_Directory
(PRA.Library_Ali_Dir,
"library ALI",
Project.View.Library_Ali_Directory'Access,
Must_Exist => not View.Is_Aggregated_In_Library
and then not View.Is_Extended);
if View.Has_Library_Interface
or else View.Has_Attribute (PRA.Interfaces)
then
Check_Directory
(PRA.Library_Src_Dir,
"",
Project.View.Library_Src_Directory'Access);
end if;
if not View.Check_Attribute (PRA.Library_Name, Result => Attr)
then
Self.Messages.Append
(Message.Create
(Message.Error,
"attribute Library_Name not declared",
Source_Reference.Create (View.Path_Name.Value, 0, 0)));
end if;
end if;
case View.Kind is
when K_Standard =>
if not View.Is_Aggregated_In_Library then
Check_Directory
(PRA.Exec_Dir,
"exec",
Project.View.Executable_Directory'Access);
end if;
when Aggregate_Kind =>
for Agg of View.Aggregated loop
if Agg.Is_Externally_Built then
Self.Messages.Append
(Message.Create
(Message.Error,
"cannot aggregate externally built project """
& String (Agg.Name) & '"',
Sloc => View.Attribute_Location
(PRA.Project_Files)));
end if;
end loop;
-- aggregate library project can have regular imports,
-- while aggregate projects can't.
if View.Kind = K_Aggregate and then View.Has_Imports then
for Imported of View.Imports loop
if not Imported.Is_Abstract then
Self.Messages.Append
(Message.Create
(Message.Error,
"can only import abstract projects, not """
& String (Imported.Name) & '"',
Sloc => View.Attribute_Location
(PRA.Project_Files)));
end if;
end loop;
end if;
when K_Abstract =>
declare
A1 : Attribute.Object;
H1 : constant Boolean :=
View.Check_Attribute
(PRA.Source_Dirs, Result => A1);
A2 : Attribute.Object;
H2 : constant Boolean :=
View.Check_Attribute
(PRA.Source_Files, Result => A2);
A3 : Attribute.Object;
H3 : constant Boolean :=
View.Check_Attribute
(PRA.Languages, Result => A3);
begin
if (H1 or else H2 or else H3)
and then not (H1 and then A1.Values.Is_Empty)
and then not (H2 and then A2.Values.Is_Empty)
and then not (H3 and then A3.Values.Is_Empty)
then
Self.Messages.Append
(Message.Create
(Message.Error,
"non-empty set of sources can't be defined in an"
& " abstract project",
Source_Reference.Create
(View.Path_Name.Value, 0, 0)));
end if;
end;
when others =>
null;
end case;
end;
-- Check source list files
if View.Kind in K_Standard | K_Library then
declare
Att : Attribute.Object;
File : Path_Name.Object;
begin
if View.Check_Attribute
(PRA.Source_List_File, Result => Att)
then
File := Path_Name.Create_File
(Filename_Type (Att.Value.Text),
Filename_Type (View.Path_Name.Dir_Name));
if not File.Exists or else File.Is_Directory then
Self.Messages.Append
(Message.Create
(Message.Error,
"source list file " & File.Value & " not found",
Sloc => View.Attribute_Location
(PRA.Source_List_File)));
end if;
end if;
if View.Check_Attribute
(PRA.Excluded_Source_List_File, Result => Att)
then
File := Path_Name.Create_File
(Filename_Type (Att.Value.Text),
Filename_Type (View.Path_Name.Dir_Name));
if not File.Exists or else File.Is_Directory then
Self.Messages.Append
(Message.Create
(Message.Error,
"excluded source list file "
& File.Value & " not found",
Sloc => View.Attribute_Location
(PRA.Excluded_Source_List_File)));
end if;
end if;
end;
end if;
end Validity_Check;
begin
-- Clear attribute value cache
for V of Self.Views_Set loop
Definition.Get (V).Clear_Cache;
end loop;
-- Now the first step is to set the configuration project view if any
-- and to create the runtime project if possible.
if Self.Has_Configuration then
Set_View (Self.Conf.Corresponding_View);
Self.Runtime := Create_Runtime_View (Self);
end if;
declare
Closure_Found : Boolean := True;
Closure : GPR2.View_Ids.Set.Set;
Position : GPR2.View_Ids.Set.Cursor;
Inserted : Boolean;
begin
-- First do a pass on the subtree that starts from root of
-- projects not part of any aggregates. In case there is an
-- aggregate, the root project will be an aggregate and after
-- processing that subtree we are sure that aggregate context is
-- set correctly.
for View of Self.Ordered_Views loop
if not View.Has_Aggregate_Context then
Set_View (View);
Closure.Insert (View.Id);
exit when Has_Error;
end if;
end loop;
-- Now evaluate the remaining views
if not Has_Error then
Closure_Loop :
loop
for View of Self.Ordered_Views loop
Closure.Insert (View.Id, Position, Inserted);
if Inserted then
Closure_Found := False;
Set_View (View);
exit Closure_Loop when Has_Error;
end if;
end loop;
exit Closure_Loop when Closure_Found;
Closure_Found := True;
end loop Closure_Loop;
end if;
end;
if not Has_Error and then not Self.Pre_Conf_Mode then
-- We now have an up-to-date tree, do some validity checks if there
-- is no issue detected yet.
for View of Self.Ordered_Views loop
Validity_Check (View);
end loop;
end if;
if Has_Error and then not Self.Pre_Conf_Mode then
raise Project_Error
with Self.Root.Path_Name.Value & " semantic error";
end if;
end Set_Context;
---------------------
-- Set_Environment --
---------------------
procedure Set_Environment
(Self : in out Object; Environment : GPR2.Environment.Object) is
begin
Self.Environment := Environment;
Self.Search_Paths.Default := Default_Search_Paths (True, Environment);
Self.Update_Search_Paths;
end Set_Environment;
------------------------
-- Source_Directories --
------------------------
function Source_Directories
(Self : Object;
View : Project.View.Object := Project.View.Undefined;
Externally_Built : Boolean := False) return GPR2.Path_Name.Set.Object
is
Result : GPR2.Path_Name.Set.Object;
procedure Do_Action (View : Project.View.Object)
with Pre => View.Is_Defined;
-- Add to Result all view's source directories
---------------
-- Do_Action --
---------------
procedure Do_Action (View : Project.View.Object) is
begin
for Directory of View.Source_Directories loop
if not Result.Contains (Directory) then
Result.Append (Directory);
end if;
end loop;
end Do_Action;
begin
Process_Subtree (Self, View, Externally_Built, Do_Action'Access);
return Result;
end Source_Directories;
------------
-- Target --
------------
function Target
(Self : Object; Canonical : Boolean := False) return Name_Type
is
function Normalized (Target : Name_Type) return Name_Type
with Inline;
----------------
-- Normalized --
----------------
function Normalized (Target : Name_Type) return Name_Type is
begin
if Self.Base.Is_Defined then
declare
Ret : constant Name_Type :=
Self.Base.Normalized_Target (Target);
begin
if Ret /= "unknown" then
return Ret;
end if;
end;
end if;
return Target;
end Normalized;
TA : Attribute.Object;
begin
if Self.Has_Configuration
and then Self.Configuration.Corresponding_View.Check_Attribute
((if Canonical then PRA.Canonical_Target else PRA.Target),
Result => TA)
then
return Name_Type (TA.Value.Text);
elsif Self.Root.Is_Defined
and then Self.Root.Check_Attribute (PRA.Target, Result => TA)
then
return Name_Type (TA.Value.Text);
elsif Self.Base.Is_Defined then
return Normalized (Target_Name);
else
-- Target name as specified during the build
return Target_Name;
end if;
end Target;
------------------------------
-- Target_From_Command_Line --
------------------------------
function Target_From_Command_Line
(Self : Object;
Normalized : Boolean := False) return Name_Type
is
Target : constant Optional_Name_Type :=
Optional_Name_Type (-Self.Explicit_Target);
begin
if Target = No_Name then
return "all";
end if;
if Normalized and then Self.Base.Is_Defined then
declare
Ret : constant Name_Type :=
Self.Base.Normalized_Target (Target);
begin
if Ret /= "unknown" then
return Ret;
end if;
end;
end if;
return Target;
end Target_From_Command_Line;
------------
-- Unload --
------------
procedure Unload
(Self : in out Object;
Full : Boolean := True) is
begin
if Full then
GPR2.Project.Parser.Clear_Cache;
end if;
Self.Self := Undefined.Self;
Self.Root := Undefined.Root;
Self.Conf := Undefined.Conf;
Self.Runtime := Undefined.Runtime;
Self.Search_Paths := Undefined.Search_Paths;
Self.Implicit_With := Undefined.Implicit_With;
Self.Build_Path := Undefined.Build_Path;
Self.Subdirs := Undefined.Subdirs;
Self.Src_Subdirs := Undefined.Src_Subdirs;
Self.Check_Shared_Lib := Undefined.Check_Shared_Lib;
Self.Absent_Dir_Error := Undefined.Absent_Dir_Error;
Self.Pre_Conf_Mode := Undefined.Pre_Conf_Mode;
Self.Sources_Loaded := Undefined.Sources_Loaded;
Self.Explicit_Target := Undefined.Explicit_Target;
Self.File_Reader_Ref := Undefined.File_Reader_Ref;
Self.Environment := Undefined.Environment;
Self.Units.Clear;
Self.Sources.Clear;
Self.Messages.Clear;
Self.Views_Set.Clear;
Self.View_Ids.Clear;
Self.View_DAG.Clear;
Self.Explicit_Runtimes.Clear;
end Unload;
--------------------
-- Update_Context --
--------------------
procedure Update_Context
(Context : in out GPR2.Context.Object;
Externals : Containers.Name_List;
Environment : GPR2.Environment.Object) is
begin
for External of Externals loop
declare
External_Value : constant String :=
Environment.Value
(String (External), "");
Position : GPR2.Context.Key_Value.Cursor;
Inserted : Boolean;
begin
if External_Value /= "" then
-- The external is not present in the current context. Try to
-- fetch its value from the environment and insert it in the
-- context.
Context.Insert
(External, External_Value, Position, Inserted);
end if;
end;
end loop;
end Update_Context;
--------------------------------------------
-- Update_Project_Search_Path_From_Config --
--------------------------------------------
procedure Update_Project_Search_Path_From_Config
(Self : in out Object;
Conf : Project.Configuration.Object)
is
use OS_Lib;
Drivers : Attribute.Set.Object;
PATH : constant String := Self.Environment.Value ("PATH");
PATH_Subs : String_Split.Slice_Set;
Given_Target : Project.Attribute.Object;
Canon_Target : Project.Attribute.Object;
Canon_Set : Boolean;
Given_Set : Boolean;
Unique : Containers.Filename_Set;
function Is_Bin_Path (T_Path : String) return Boolean;
procedure Append (Dir : String);
------------
-- Append --
------------
procedure Append (Dir : String) is
Position : Containers.Filename_Type_Set.Cursor;
Inserted : Boolean;
begin
Unique.Insert (Filename_Type (Dir), Position, Inserted);
if Inserted then
Append_Search_Paths
(Self, Path_Name.Create_Directory (Filename_Type (Dir)));
end if;
end Append;
-----------------
-- Is_Bin_Path --
-----------------
function Is_Bin_Path (T_Path : String) return Boolean is
begin
return Directories.Simple_Name (T_Path) = "bin";
exception
when IO_Exceptions.Name_Error =>
return False;
end Is_Bin_Path;
begin
if not Conf.Corresponding_View.Has_Package (Registry.Pack.Compiler) then
return;
end if;
Canon_Set := Conf.Corresponding_View.Check_Attribute
(PRA.Canonical_Target, Result => Canon_Target);
Given_Set := Conf.Corresponding_View.Check_Attribute
(PRA.Target, Result => Given_Target);
String_Split.Create
(PATH_Subs,
PATH,
(1 => Path_Separator),
String_Split.Multiple);
Drivers := Conf.Corresponding_View.Attributes (PRA.Compiler.Driver);
-- We need to arrange toolchains in the order of appearance on PATH
for Sub of PATH_Subs loop
if Is_Bin_Path (Sub) then
for Driver of Drivers loop
if Driver.Value.Text /= "" then
declare
Driver_Dir : constant String :=
Normalize_Pathname
(Directories.Containing_Directory
(String (Driver.Value.Text)),
Case_Sensitive => False);
Toolchain_Dir : constant String :=
Directories.Containing_Directory
(Driver_Dir);
Index : constant Language_Id :=
+Name_Type (Driver.Index.Value);
begin
if Driver_Dir =
Normalize_Pathname (Sub, Case_Sensitive => False)
then
if Given_Set then
-- We only care for runtime if it is a simple
-- name. Runtime specific names go with explicitly
-- specified target (if it has been specified).
if Conf.Runtime (Index) /= No_Name
and then not
(for some C of Conf.Runtime (Index) =>
C in '/' | '\')
then
Append
(Toolchain_Dir
& Directory_Separator
& (String (Given_Target.Value.Text))
& Directory_Separator
& String (Conf.Runtime (Index))
& Directory_Separator
& "share"
& Directory_Separator
& "gpr");
Append
(Toolchain_Dir
& Directory_Separator
& (String (Given_Target.Value.Text))
& Directory_Separator
& String (Conf.Runtime (Index))
& Directory_Separator
& "lib"
& Directory_Separator
& "gnat");
end if;
-- Explicitly specified target may be not in
-- canonical form.
Append
(Toolchain_Dir
& Directory_Separator
& (String (Given_Target.Value.Text))
& Directory_Separator
& "share"
& Directory_Separator
& "gpr");
Append
(Toolchain_Dir
& Directory_Separator
& (String (Given_Target.Value.Text))
& Directory_Separator
& "lib"
& Directory_Separator
& "gnat");
end if;
if Canon_Set then
-- Old cgpr files can miss Canonical_Target
Append
(Toolchain_Dir
& Directory_Separator
& (String (Canon_Target.Value.Text))
& Directory_Separator
& "share"
& Directory_Separator
& "gpr");
Append
(Toolchain_Dir
& Directory_Separator
& (String (Canon_Target.Value.Text))
& Directory_Separator
& "lib"
& Directory_Separator
& "gnat");
end if;
Append
(Toolchain_Dir
& Directory_Separator
& "share"
& Directory_Separator
& "gpr");
Append
(Toolchain_Dir
& Directory_Separator
& "lib"
& Directory_Separator
& "gnat");
end if;
end;
end if;
end loop;
end if;
end loop;
end Update_Project_Search_Path_From_Config;
-------------------------
-- Update_Search_Paths --
-------------------------
procedure Update_Search_Paths (Self : in out Object) is
begin
Self.Search_Paths.All_Paths := Self.Search_Paths.Prepended;
for P of Self.Search_Paths.Default loop
Self.Search_Paths.All_Paths.Append (P);
end loop;
for P of Self.Search_Paths.Appended loop
Self.Search_Paths.All_Paths.Append (P);
end loop;
end Update_Search_Paths;
--------------------
-- Update_Sources --
--------------------
procedure Update_Sources
(Self : Object;
Stop_On_Error : Boolean := True;
With_Runtime : Boolean := False;
Backends : Source_Info.Backend_Set := Source_Info.All_Backends)
is
Has_RT : Boolean := False;
Views : View.Vector.Object renames Self.Ordered_Views;
begin
Self.Self.Sources_Loaded := True;
for V of reverse Views loop
Definition.Get (V).Update_Sources_List (V, Stop_On_Error);
if V.Is_Runtime then
Has_RT := True;
end if;
end loop;
-- Make sure the runtime is taken care of first : it is most certainly
-- involved in source dependencies at one point or another.
if not Has_RT
and then With_Runtime
and then Self.Runtime.Is_Defined
then
Definition.Get (Self.Runtime).Update_Sources_List
(Self.Runtime, Stop_On_Error);
Definition.Get (Self.Runtime).Update_Sources_Parse (Backends);
end if;
for V of reverse Views loop
-- We list the views in reverse topological order so that we never
-- end up having a dependency external to the view that's not
-- already parsed.
if With_Runtime or else not V.Is_Runtime then
Definition.Get (V).Update_Sources_Parse (Backends);
else
Definition.Get (V).Update_Sources_Parse (Source_Info.No_Backends);
end if;
end loop;
if Self.Check_Shared_Lib then
for View of Self.Views_Set loop
declare
procedure Check_Shared_Lib (PV : Project.View.Object);
-- Check that shared library project does not have in imports
-- static library or standard projects.
----------------------
-- Check_Shared_Lib --
----------------------
procedure Check_Shared_Lib (PV : Project.View.Object) is
P_Data : constant Definition.Const_Ref :=
Definition.Get_RO (PV);
function Has_Essential_Sources
(V : Project.View.Object) return Boolean;
-- Returns True if V has Ada sources or non ada bodies
function Source_Loc
(Imp : Project.View.Object)
return Source_Reference.Object'Class;
-- Returns a source location for the import.
--
-- Can't rely on P_Data.Trees.Project.Imports as
-- in case of extended projects the import may be
-- implicit, so retrieval of the source location is not
-- easy.
---------------------------
-- Has_Essential_Sources --
---------------------------
function Has_Essential_Sources
(V : Project.View.Object) return Boolean is
begin
for S of V.Sources loop
if S.Language = Ada_Language
or else S.Kind not in GPR2.Unit.Spec_Kind
then
return True;
end if;
end loop;
return False;
end Has_Essential_Sources;
----------------
-- Source_Loc --
----------------
function Source_Loc
(Imp : Project.View.Object)
return Source_Reference.Object'Class
is
Imports : constant Project.Import.Set.Object :=
P_Data.Trees.Project.Imports;
Position : constant Project.Import.Set.Cursor :=
Imports.Find (Imp.Path_Name);
begin
if Project.Import.Set.Has_Element (Position) then
return Project.Import.Set.Element (Position);
else
return Source_Reference.Create
(P_Data.Trees.Project.Path_Name.Value, 0, 0);
end if;
end Source_Loc;
begin
for Imp of P_Data.Imports loop
if Imp.Kind = K_Abstract
or else not Has_Essential_Sources (Imp)
then
-- Check imports further in recursion
Check_Shared_Lib (Imp);
elsif not Imp.Is_Library then
Self.Self.Messages.Append
(Message.Create
(Message.Error,
"shared library project """ & String (View.Name)
& """ cannot import project """
& String (Imp.Name)
& """ that is not a shared library project",
Source_Loc (Imp)));
elsif Imp.Is_Static_Library
and then View.Library_Standalone /= Encapsulated
then
Self.Self.Messages.Append
(Message.Create
(Message.Error,
"shared library project """ &
String (View.Name)
& """ cannot import static library project """
& String (Imp.Name) & '"',
Source_Loc (Imp)));
elsif Imp.Is_Shared_Library
and then View.Library_Standalone = Encapsulated
then
Self.Self.Messages.Append
(Message.Create
(Message.Error,
"encapsulated library project """
& String (View.Name)
& """ cannot import shared library project """
& String (Imp.Name) & '"',
Source_Loc (Imp)));
end if;
end loop;
if PV.Is_Library and then PV.Is_Shared_Library then
-- Also check value of liobrary_standalone if any
if PV.Has_Any_Interfaces
and then PV.Library_Standalone = No
then
Self.Self.Messages.Append
(Message.Create
(Message.Error,
"wrong value for Library_Standalone when"
& " Library_Interface defined",
PV.Attribute_Location (PRA.Library_Standalone)));
end if;
-- And if a standalone library has interfaces
if not PV.Has_Any_Interfaces
and then PV.Library_Standalone /= No
then
Self.Self.Messages.Append
(Message.Create
(Message.Error,
"Library_Standalone valid only if library"
& " has interfaces",
PV.Attribute_Location (PRA.Library_Standalone)));
end if;
end if;
end Check_Shared_Lib;
begin
if View.Is_Library and then View.Is_Shared_Library then
Check_Shared_Lib (View);
end if;
end;
end loop;
if Stop_On_Error and then Self.Messages.Has_Error then
raise Project_Error;
end if;
end if;
end Update_Sources;
-------------
-- Warning --
-------------
procedure Warning
(Self : in out Object;
Msg : String;
Sloc : Source_Reference.Object'Class) is
begin
Self.Messages.Append (Message.Create (Message.Warning, Msg, Sloc));
end Warning;
begin
-- Export routines to Definitions to avoid cyclic dependencies
Definition.Register := Register_View'Access;
Definition.Get_Context := Get_Context'Access;
Definition.Are_Sources_Loaded := Are_Sources_Loaded'Access;
end GPR2.Project.Tree;
|
faelys/natools | Ada | 3,154 | ads | ------------------------------------------------------------------------------
-- Copyright (c) 2016-2017, Natacha Porté --
-- --
-- Permission to use, copy, modify, and distribute this software for any --
-- purpose with or without fee is hereby granted, provided that the above --
-- copyright notice and this permission notice appear in all copies. --
-- --
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES --
-- WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF --
-- MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR --
-- ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES --
-- WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN --
-- ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF --
-- OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. --
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Natools.Smaz_Implementations.Base_4096 provides the subprograms needed --
-- to instantiate Natools.Smaz_Generic into a variant of the Smaz --
-- compression algorithm that output directly base-64 printable symbols, --
-- but with a dictionary indexed by two symbols, allowing a maximum size of --
-- 4095 entries. --
------------------------------------------------------------------------------
with Ada.Streams;
package Natools.Smaz_Implementations.Base_4096 is
pragma Pure;
type Base_4096_Digit is range 0 .. 4095;
procedure Read_Code
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Code : out Base_4096_Digit;
Verbatim_Length : out Natural;
Last_Code : in Base_4096_Digit;
Variable_Length_Verbatim : in Boolean);
procedure Read_Verbatim
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Output : out String);
procedure Skip_Verbatim
(Input : in Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Verbatim_Length : in Positive);
function Verbatim_Size
(Input_Length : in Positive;
Last_Code : in Base_4096_Digit;
Variable_Length_Verbatim : in Boolean)
return Ada.Streams.Stream_Element_Count;
procedure Write_Code
(Output : in out Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Code : in Base_4096_Digit);
procedure Write_Verbatim
(Output : in out Ada.Streams.Stream_Element_Array;
Offset : in out Ada.Streams.Stream_Element_Offset;
Input : in String;
Last_Code : in Base_4096_Digit;
Variable_Length_Verbatim : in Boolean);
end Natools.Smaz_Implementations.Base_4096;
|
strenkml/EE368 | Ada | 1,519 | ads |
with Memory.Container; use Memory.Container;
package Memory.Perfect_Prefetch is
type Perfect_Prefetch_Type is new Container_Type with private;
type Perfect_Prefetch_Pointer is access all Perfect_Prefetch_Type'Class;
function Create_Perfect_Prefetch(mem : access Memory_Type'Class)
return Perfect_Prefetch_Pointer;
overriding
function Clone(mem : Perfect_Prefetch_Type) return Memory_Pointer;
overriding
procedure Reset(mem : in out Perfect_Prefetch_Type;
context : in Natural);
overriding
procedure Read(mem : in out Perfect_Prefetch_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Write(mem : in out Perfect_Prefetch_Type;
address : in Address_Type;
size : in Positive);
overriding
procedure Idle(mem : in out Perfect_Prefetch_Type;
cycles : in Time_Type);
overriding
function To_String(mem : Perfect_Prefetch_Type) return Unbounded_String;
overriding
function Get_Cost(mem : Perfect_Prefetch_Type) return Cost_Type;
overriding
procedure Generate(mem : in Perfect_Prefetch_Type;
sigs : in out Unbounded_String;
code : in out Unbounded_String);
private
type Perfect_Prefetch_Type is new Container_Type with record
pending : Time_Type := 0;
end record;
end Memory.Perfect_Prefetch;
|
reznikmm/matreshka | Ada | 5,262 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Generic_Collections;
package AMF.UML.Value_Specifications.Collections is
pragma Preelaborate;
package UML_Value_Specification_Collections is
new AMF.Generic_Collections
(UML_Value_Specification,
UML_Value_Specification_Access);
type Set_Of_UML_Value_Specification is
new UML_Value_Specification_Collections.Set with null record;
Empty_Set_Of_UML_Value_Specification : constant Set_Of_UML_Value_Specification;
type Ordered_Set_Of_UML_Value_Specification is
new UML_Value_Specification_Collections.Ordered_Set with null record;
Empty_Ordered_Set_Of_UML_Value_Specification : constant Ordered_Set_Of_UML_Value_Specification;
type Bag_Of_UML_Value_Specification is
new UML_Value_Specification_Collections.Bag with null record;
Empty_Bag_Of_UML_Value_Specification : constant Bag_Of_UML_Value_Specification;
type Sequence_Of_UML_Value_Specification is
new UML_Value_Specification_Collections.Sequence with null record;
Empty_Sequence_Of_UML_Value_Specification : constant Sequence_Of_UML_Value_Specification;
private
Empty_Set_Of_UML_Value_Specification : constant Set_Of_UML_Value_Specification
:= (UML_Value_Specification_Collections.Set with null record);
Empty_Ordered_Set_Of_UML_Value_Specification : constant Ordered_Set_Of_UML_Value_Specification
:= (UML_Value_Specification_Collections.Ordered_Set with null record);
Empty_Bag_Of_UML_Value_Specification : constant Bag_Of_UML_Value_Specification
:= (UML_Value_Specification_Collections.Bag with null record);
Empty_Sequence_Of_UML_Value_Specification : constant Sequence_Of_UML_Value_Specification
:= (UML_Value_Specification_Collections.Sequence with null record);
end AMF.UML.Value_Specifications.Collections;
|
reznikmm/matreshka | Ada | 3,691 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Attributes;
package ODF.DOM.Attributes.Style.Use_Window_Font_Color is
type ODF_Style_Use_Window_Font_Color is
new XML.DOM.Attributes.DOM_Attribute with private;
private
type ODF_Style_Use_Window_Font_Color is
new XML.DOM.Attributes.DOM_Attribute with null record;
end ODF.DOM.Attributes.Style.Use_Window_Font_Color;
|
joakim-strandberg/wayland_ada_binding | Ada | 6,290 | ads | with C_Binding.Linux.Files;
with Interfaces.C;
package C_Binding.Linux.File_Status is
use all type C_Binding.Linux.Files.File;
type Time_Seconds is new Interfaces.C.long;
type Time_Nano_Seconds is new Interfaces.C.long;
type Status_Time is record
Seconds : Time_Seconds;
Nano_Seconds : Time_Nano_Seconds;
end record;
type Status_Device_Id is new Interfaces.C.unsigned_long;
type Status_Inode_Number is new Interfaces.C.unsigned_long;
type Status_Hard_Link_Count is new Interfaces.C.unsigned_long;
type Status_Mode is new Interfaces.C.unsigned;
type Status_User_Id is new Interfaces.C.unsigned;
type Status_Group_Id is new Interfaces.C.unsigned;
type Status_Block_Size is new Interfaces.C.long;
type Status_Block_Count is new Interfaces.C.long;
type Status is limited private;
procedure Get_File_Status
(File : in C_Binding.Linux.Files.File;
This : in out Status) with
Global => null,
Pre => Is_Open (File);
function Is_Valid (This : Status) return Boolean with
Global => null;
function Device_Id (This : Status) return Status_Device_Id with
Global => null,
Pre => Is_Valid (This);
function Inode_Number (This : Status) return Status_Inode_Number with
Global => null,
Pre => Is_Valid (This);
function Hard_Link_Count
(This : Status) return Status_Hard_Link_Count with
Global => null,
Pre => Is_Valid (This);
function Mode (This : Status) return Status_Mode with
Global => null,
Pre => Is_Valid (This);
function User_Id (This : Status) return Status_User_Id with
Global => null,
Pre => Is_Valid (This);
function Group_Id (This : Status) return Status_Group_Id with
Global => null,
Pre => Is_Valid (This);
function Special_Device_Id (This : Status) return Status_Device_Id with
Global => null,
Pre => Is_Valid (This);
function Size (This : Status) return Ada.Streams.Stream_Element_Count with
Global => null,
Pre => Is_Valid (This);
-- The file size in bytes.
function Block_Size (This : Status) return Status_Block_Size with
Global => null,
Pre => Is_Valid (This);
-- Number of 512B blocks allocated
function Block_Count (This : Status) return Status_Block_Count with
Global => null,
Pre => Is_Valid (This);
function Last_Access_Time (This : Status) return Status_Time with
Global => null,
Pre => Is_Valid (This);
function Modification_Time (This : Status) return Status_Time with
Global => null,
Pre => Is_Valid (This);
-- Last status change time
function Change_Time (This : Status) return Status_Time with
Global => null,
Pre => Is_Valid (This);
private
type Status_Size is new Interfaces.C.long;
type C_Time is record
Sec : aliased Time_Seconds;
Nano_Sec : aliased Time_Nano_Seconds;
end record with
Convention => C_Pass_By_Copy;
type File_Status_T is record
-- ID of device containing file
Device_Id : aliased Status_Device_Id;
Inode_Number : aliased Status_Inode_Number;
Hard_Link_Count : aliased Status_Hard_Link_Count;
-- Protection
Mode : aliased Status_Mode;
User_Id : aliased Status_User_Id;
Group_Id : aliased Status_Group_Id;
Padding_0 : aliased Interfaces.C.int;
-- Device ID (if special file)
Special_Device_Id : aliased Status_Device_Id;
-- Total size, in bytes
Size : aliased Status_Size;
-- Blocksize for file system I/O
Block_Size : aliased Status_Block_Size;
-- Number of 512B blocks allocated
Block_Count : aliased Status_Block_Count;
-- Time of last access
Access_Time : aliased C_Time;
-- Time of last modification
Modification_Time : aliased C_Time;
-- Time of last status change
Change_Time : aliased C_Time;
Padding_1 : Interfaces.C.long;
Padding_2 : Interfaces.C.long;
Padding_3 : Interfaces.C.long;
end record with
Convention => C_Pass_By_Copy;
type Status is limited record
My_Status : aliased File_Status_T;
My_Is_Valid : Boolean := False;
end record;
function Is_Valid
(This : Status) return Boolean is
(This.My_Is_Valid);
function Device_Id
(This : Status) return Status_Device_Id is
(This.My_Status.Device_Id);
function Inode_Number
(This : Status) return Status_Inode_Number is
(This.My_Status.Inode_Number);
function Hard_Link_Count
(This : Status) return Status_Hard_Link_Count is
(This.My_Status.Hard_Link_Count);
function Mode
(This : Status) return Status_Mode is (This.My_Status.Mode);
function User_Id
(This : Status) return Status_User_Id is
(This.My_Status.User_Id);
function Group_Id
(This : Status) return Status_Group_Id is
(This.My_Status.Group_Id);
function Special_Device_Id
(This : Status) return Status_Device_Id is
(This.My_Status.Special_Device_Id);
function Size
(This : Status) return Ada.Streams.Stream_Element_Count is
(Ada.Streams.Stream_Element_Count (This.My_Status.Size));
function Block_Size
(This : Status) return Status_Block_Size is
(This.My_Status.Block_Size);
function Block_Count
(This : Status) return Status_Block_Count is
(This.My_Status.Block_Count);
function Last_Access_Time
(This : Status) return Status_Time is
((Seconds => This.My_Status.Access_Time.Sec,
Nano_Seconds => This.My_Status.Access_Time.Nano_Sec));
function Modification_Time
(This : Status) return Status_Time is
((Seconds => This.My_Status.Modification_Time.Sec,
Nano_Seconds => This.My_Status.Modification_Time.Nano_Sec));
function Change_Time
(This : Status) return Status_Time is
((Seconds => This.My_Status.Change_Time.Sec,
Nano_Seconds => This.My_Status.Change_Time.Nano_Sec));
function C_Get_File_Status
(Fd : Interfaces.C.int;
Status : access File_Status_T) return Interfaces.C.int with
Import => True,
Convention => C,
External_Name => "fstat";
end C_Binding.Linux.File_Status;
|
AdaCore/training_material | Ada | 545 | ads | pragma Ada_2005;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with SDL_SDL_stdinc_h;
package SDL_SDL_active_h is
SDL_APPMOUSEFOCUS : constant := 16#01#; -- ../include/SDL/SDL_active.h:42
SDL_APPINPUTFOCUS : constant := 16#02#; -- ../include/SDL/SDL_active.h:43
SDL_APPACTIVE : constant := 16#04#; -- ../include/SDL/SDL_active.h:44
function SDL_GetAppState return SDL_SDL_stdinc_h.Uint8; -- ../include/SDL/SDL_active.h:54
pragma Import (C, SDL_GetAppState, "SDL_GetAppState");
end SDL_SDL_active_h;
|
zhmu/ananas | Ada | 74 | ads | package Generic_Inst3_Traits is
pragma Pure;
end Generic_Inst3_Traits;
|
twdroeger/ada-awa | Ada | 17,047 | ads | -----------------------------------------------------------------------
-- AWA.Tags.Models -- AWA.Tags.Models
-----------------------------------------------------------------------
-- File generated by ada-gen DO NOT MODIFY
-- Template used: templates/model/package-spec.xhtml
-- Ada Generator: https://ada-gen.googlecode.com/svn/trunk Revision 1095
-----------------------------------------------------------------------
-- Copyright (C) 2019 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
pragma Warnings (Off);
with ADO.Sessions;
with ADO.Objects;
with ADO.Statements;
with ADO.SQL;
with ADO.Schemas;
with ADO.Queries;
with ADO.Queries.Loaders;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Basic.Lists;
pragma Warnings (On);
package AWA.Tags.Models is
pragma Style_Checks ("-mr");
type Tag_Ref is new ADO.Objects.Object_Ref with null record;
type Tagged_Entity_Ref is new ADO.Objects.Object_Ref with null record;
-- --------------------
-- The tag definition.
-- --------------------
-- Create an object key for Tag.
function Tag_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Tag from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Tag_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Tag : constant Tag_Ref;
function "=" (Left, Right : Tag_Ref'Class) return Boolean;
-- Set the tag identifier
procedure Set_Id (Object : in out Tag_Ref;
Value : in ADO.Identifier);
-- Get the tag identifier
function Get_Id (Object : in Tag_Ref)
return ADO.Identifier;
-- Set the tag name
procedure Set_Name (Object : in out Tag_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Name (Object : in out Tag_Ref;
Value : in String);
-- Get the tag name
function Get_Name (Object : in Tag_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Name (Object : in Tag_Ref)
return String;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Tag_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Tag_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Tag_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Tag_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Tag_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Tag_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
TAG_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Tag_Ref);
-- Copy of the object.
procedure Copy (Object : in Tag_Ref;
Into : in out Tag_Ref);
package Tag_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Tag_Ref,
"=" => "=");
subtype Tag_Vector is Tag_Vectors.Vector;
procedure List (Object : in out Tag_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- Create an object key for Tagged_Entity.
function Tagged_Entity_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Tagged_Entity from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Tagged_Entity_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Tagged_Entity : constant Tagged_Entity_Ref;
function "=" (Left, Right : Tagged_Entity_Ref'Class) return Boolean;
-- Set the tag entity identifier
procedure Set_Id (Object : in out Tagged_Entity_Ref;
Value : in ADO.Identifier);
-- Get the tag entity identifier
function Get_Id (Object : in Tagged_Entity_Ref)
return ADO.Identifier;
-- Set Title: Tag model
-- Date: 2013-02-23the database entity to which the tag is associated
procedure Set_For_Entity_Id (Object : in out Tagged_Entity_Ref;
Value : in ADO.Identifier);
-- Get Title: Tag model
-- Date: 2013-02-23the database entity to which the tag is associated
function Get_For_Entity_Id (Object : in Tagged_Entity_Ref)
return ADO.Identifier;
-- Set the entity type
procedure Set_Entity_Type (Object : in out Tagged_Entity_Ref;
Value : in ADO.Entity_Type);
-- Get the entity type
function Get_Entity_Type (Object : in Tagged_Entity_Ref)
return ADO.Entity_Type;
--
procedure Set_Tag (Object : in out Tagged_Entity_Ref;
Value : in AWA.Tags.Models.Tag_Ref'Class);
--
function Get_Tag (Object : in Tagged_Entity_Ref)
return AWA.Tags.Models.Tag_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Tagged_Entity_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Tagged_Entity_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Tagged_Entity_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Tagged_Entity_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Tagged_Entity_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Tagged_Entity_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
TAGGED_ENTITY_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Tagged_Entity_Ref);
-- Copy of the object.
procedure Copy (Object : in Tagged_Entity_Ref;
Into : in out Tagged_Entity_Ref);
package Tagged_Entity_Vectors is
new Ada.Containers.Vectors (Index_Type => Natural,
Element_Type => Tagged_Entity_Ref,
"=" => "=");
subtype Tagged_Entity_Vector is Tagged_Entity_Vectors.Vector;
procedure List (Object : in out Tagged_Entity_Vector;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class);
-- --------------------
-- The tag information.
-- --------------------
type Tag_Info is
new Util.Beans.Basic.Bean with record
-- the tag name.
Tag : Ada.Strings.Unbounded.Unbounded_String;
-- the number of references for the tag.
Count : Natural;
end record;
-- Get the bean attribute identified by the name.
overriding
function Get_Value (From : in Tag_Info;
Name : in String) return Util.Beans.Objects.Object;
-- Set the bean attribute identified by the name.
overriding
procedure Set_Value (Item : in out Tag_Info;
Name : in String;
Value : in Util.Beans.Objects.Object);
package Tag_Info_Beans is
new Util.Beans.Basic.Lists (Element_Type => Tag_Info);
package Tag_Info_Vectors renames Tag_Info_Beans.Vectors;
subtype Tag_Info_List_Bean is Tag_Info_Beans.List_Bean;
type Tag_Info_List_Bean_Access is access all Tag_Info_List_Bean;
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
procedure List (Object : in out Tag_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class);
subtype Tag_Info_Vector is Tag_Info_Vectors.Vector;
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
procedure List (Object : in out Tag_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class);
Query_Check_Tag : constant ADO.Queries.Query_Definition_Access;
Query_Tag_List : constant ADO.Queries.Query_Definition_Access;
Query_Tag_Search : constant ADO.Queries.Query_Definition_Access;
Query_Tag_List_All : constant ADO.Queries.Query_Definition_Access;
Query_Tag_List_For_Entities : constant ADO.Queries.Query_Definition_Access;
private
TAG_NAME : aliased constant String := "awa_tag";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "name";
TAG_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 2,
Table => TAG_NAME'Access,
Members => (
1 => COL_0_1_NAME'Access,
2 => COL_1_1_NAME'Access)
);
TAG_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= TAG_DEF'Access;
Null_Tag : constant Tag_Ref
:= Tag_Ref'(ADO.Objects.Object_Ref with null record);
type Tag_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => TAG_DEF'Access)
with record
Name : Ada.Strings.Unbounded.Unbounded_String;
end record;
type Tag_Access is access all Tag_Impl;
overriding
procedure Destroy (Object : access Tag_Impl);
overriding
procedure Find (Object : in out Tag_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Tag_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Tag_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Tag_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Tag_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Tag_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Tag_Ref'Class;
Impl : out Tag_Access);
TAGGED_ENTITY_NAME : aliased constant String := "awa_tagged_entity";
COL_0_2_NAME : aliased constant String := "id";
COL_1_2_NAME : aliased constant String := "for_entity_id";
COL_2_2_NAME : aliased constant String := "entity_type";
COL_3_2_NAME : aliased constant String := "tag_id";
TAGGED_ENTITY_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 4,
Table => TAGGED_ENTITY_NAME'Access,
Members => (
1 => COL_0_2_NAME'Access,
2 => COL_1_2_NAME'Access,
3 => COL_2_2_NAME'Access,
4 => COL_3_2_NAME'Access)
);
TAGGED_ENTITY_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= TAGGED_ENTITY_DEF'Access;
Null_Tagged_Entity : constant Tagged_Entity_Ref
:= Tagged_Entity_Ref'(ADO.Objects.Object_Ref with null record);
type Tagged_Entity_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => TAGGED_ENTITY_DEF'Access)
with record
For_Entity_Id : ADO.Identifier;
Entity_Type : ADO.Entity_Type;
Tag : AWA.Tags.Models.Tag_Ref;
end record;
type Tagged_Entity_Access is access all Tagged_Entity_Impl;
overriding
procedure Destroy (Object : access Tagged_Entity_Impl);
overriding
procedure Find (Object : in out Tagged_Entity_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Tagged_Entity_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Tagged_Entity_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Tagged_Entity_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Create (Object : in out Tagged_Entity_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Tagged_Entity_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Tagged_Entity_Ref'Class;
Impl : out Tagged_Entity_Access);
package File_1 is
new ADO.Queries.Loaders.File (Path => "tag-queries.xml",
Sha1 => "BFA439EF20901C425F86DB33AD8870BADB46FBEB");
package Def_Taginfo_Check_Tag is
new ADO.Queries.Loaders.Query (Name => "check-tag",
File => File_1.File'Access);
Query_Check_Tag : constant ADO.Queries.Query_Definition_Access
:= Def_Taginfo_Check_Tag.Query'Access;
package Def_Taginfo_Tag_List is
new ADO.Queries.Loaders.Query (Name => "tag-list",
File => File_1.File'Access);
Query_Tag_List : constant ADO.Queries.Query_Definition_Access
:= Def_Taginfo_Tag_List.Query'Access;
package Def_Taginfo_Tag_Search is
new ADO.Queries.Loaders.Query (Name => "tag-search",
File => File_1.File'Access);
Query_Tag_Search : constant ADO.Queries.Query_Definition_Access
:= Def_Taginfo_Tag_Search.Query'Access;
package Def_Taginfo_Tag_List_All is
new ADO.Queries.Loaders.Query (Name => "tag-list-all",
File => File_1.File'Access);
Query_Tag_List_All : constant ADO.Queries.Query_Definition_Access
:= Def_Taginfo_Tag_List_All.Query'Access;
package Def_Taginfo_Tag_List_For_Entities is
new ADO.Queries.Loaders.Query (Name => "tag-list-for-entities",
File => File_1.File'Access);
Query_Tag_List_For_Entities : constant ADO.Queries.Query_Definition_Access
:= Def_Taginfo_Tag_List_For_Entities.Query'Access;
end AWA.Tags.Models;
|
danva994/AdaSDL2 | Ada | 6,188 | ads | package SDL.Image is
SDL_IMAGE_MAJOR_VERSION : constant Uint8 := 2;
SDL_IMAGE_MINOR_VERSION : constant Uint8 := 0;
SDL_IMAGE_PATCHLEVEL : constant Uint8 := 0;
procedure SDL_IMAGE_VERSION (X : access SDL_version);
pragma Inline (SDL_IMAGE_VERSION);
function IMG_Linked_Version return SDL_version;
pragma Import (C, IMG_Linked_Version, "IMG_Linked_Version");
subtype IMG_InitFlags is C.unsigned;
IMG_INIT_JPG : constant IMG_InitFlags := 16#00000001#;
IMG_INIT_PNG : constant IMG_InitFlags := 16#00000002#;
IMG_INIT_TIF : constant IMG_InitFlags := 16#00000004#;
IMG_INIT_WEBP : constant IMG_InitFlags := 16#00000008#;
function IMG_Init (flags : C.int) return C.int;
pragma Import (C, IMG_Init, "IMG_Init");
procedure IMG_Quit;
pragma Import (C, IMG_Quit, "IMG_Quit");
function IMG_LoadTyped_RW
(src : access SDL_RWops;
freesrc : C.int;
kind : C.char_array) return access SDL_Surface;
pragma Import (C, IMG_LoadTyped_RW, "IMG_LoadTyped_RW");
function IMG_Load (file : C.char_array) return access SDL_Surface;
pragma Import (C, IMG_Load, "IMG_Load");
function IMG_Load_RW
(src : access SDL_RWops;
freesrc : C.int) return access SDL_Surface;
pragma Import (C, IMG_Load_RW, "IMG_Load_RW");
function IMG_LoadTexture
(renderer : access SDL_Renderer;
file : C.char_array) return access SDL_Texture;
pragma Import (C, IMG_LoadTexture, "IMG_LoadTexture");
function IMG_LoadTexture_RW
(renderer : access SDL_Renderer;
src : access SDL_RWops;
freesrc : C.int) return access SDL_Texture;
pragma Import (C, IMG_LoadTexture_RW, "IMG_LoadTexture_RW");
function IMG_LoadTextureTyped_RW
(renderer : access SDL_Renderer;
src : access SDL_RWops;
freesrc : C.int;
kind : C.char_array) return access SDL_Texture;
pragma Import (C, IMG_LoadTextureTyped_RW, "IMG_LoadTextureTyped_RW");
function IMG_isICO (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isICO, "IMG_isICO");
function IMG_isCUR (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isCUR, "IMG_isCUR");
function IMG_isBMP (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isBMP, "IMG_isBMP");
function IMG_isGIF (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isGIF, "IMG_isGIF");
function IMG_isJPG (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isJPG, "IMG_isJPG");
function IMG_isLBM (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isLBM, "IMG_isLBM");
function IMG_isPCX (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isPCX, "IMG_isPCX");
function IMG_isPNG (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isPNG, "IMG_isPNG");
function IMG_isPNM (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isPNM, "IMG_isPNM");
function IMG_isTIF (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isTIF, "IMG_isTIF");
function IMG_isXCF (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isXCF, "IMG_isXCF");
function IMG_isXPM (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isXPM, "IMG_isXPM");
function IMG_isXV (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isXV, "IMG_isXV");
function IMG_isWEBP (src : access SDL_RWops) return C.int;
pragma Import (C, IMG_isWEBP, "IMG_isWEBP");
function IMG_LoadICO_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadICO_RW, "IMG_LoadICO_RW");
function IMG_LoadCUR_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadCUR_RW, "IMG_LoadCUR_RW");
function IMG_LoadBMP_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadBMP_RW, "IMG_LoadBMP_RW");
function IMG_LoadGIF_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadGIF_RW, "IMG_LoadGIF_RW");
function IMG_LoadJPG_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadJPG_RW, "IMG_LoadJPG_RW");
function IMG_LoadLBM_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadLBM_RW, "IMG_LoadLBM_RW");
function IMG_LoadPCX_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadPCX_RW, "IMG_LoadPCX_RW");
function IMG_LoadPNG_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadPNG_RW, "IMG_LoadPNG_RW");
function IMG_LoadPNM_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadPNM_RW, "IMG_LoadPNM_RW");
function IMG_LoadTGA_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadTGA_RW, "IMG_LoadTGA_RW");
function IMG_LoadTIF_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadTIF_RW, "IMG_LoadTIF_RW");
function IMG_LoadXCF_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadXCF_RW, "IMG_LoadXCF_RW");
function IMG_LoadXPM_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadXPM_RW, "IMG_LoadXPM_RW");
function IMG_LoadXV_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadXV_RW, "IMG_LoadXV_RW");
function IMG_LoadWEBP_RW (src : access SDL_RWops) return access SDL_Surface;
pragma Import (C, IMG_LoadWEBP_RW, "IMG_LoadWEBP_RW");
function IMG_ReadXPMFromArray
(xpm : System.Address) return access SDL_Surface;
pragma Import (C, IMG_ReadXPMFromArray, "IMG_ReadXPMFromArray");
function IMG_SavePNG
(surface : access SDL_Surface;
file : C.char_array) return C.int;
pragma Import (C, IMG_SavePNG, "IMG_SavePNG");
function IMG_SavePNG_RW
(surface : access SDL_Surface;
dst : access SDL_RWops;
freedst : C.int) return C.int;
pragma Import (C, IMG_SavePNG_RW, "IMG_SavePNG_RW");
procedure IMG_SetError (text : C.char_array) renames SDL_SetError;
function IMG_GetError return C.Strings.chars_ptr renames SDL_GetError;
end SDL.Image;
|
godunko/adawebpack | Ada | 4,954 | adb | ------------------------------------------------------------------------------
-- --
-- AdaWebPack --
-- --
------------------------------------------------------------------------------
-- Copyright © 2020-2021, Vadim Godunko --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
------------------------------------------------------------------------------
with WASM.Attributes;
with WASM.Objects.Attributes;
package body Web.DOM.Elements is
--------------------
-- Get_Class_List --
--------------------
function Get_Class_List
(Self : Element'Class) return Web.DOM.Token_Lists.DOM_Token_List
is
function Imported
(Element : WASM.Objects.Object_Identifier)
return WASM.Objects.Object_Identifier
with Import => True,
Convention => C,
Link_Name =>
"__adawebpack__dom__Element__classList_getter";
begin
return Web.DOM.Token_Lists.Instantiate (Imported (Self.Identifier));
end Get_Class_List;
----------------------
-- Get_Client_Height --
----------------------
function Get_Client_Height (Self : Element'Class) return Web.DOM_Long is
function Imported
(Element : WASM.Objects.Object_Identifier)
return Interfaces.Integer_32
with Import => True,
Convention => C,
Link_Name =>
"__adawebpack__cssom__Element__clientHeight_getter";
begin
return Imported (Self.Identifier);
end Get_Client_Height;
----------------------
-- Get_Client_Width --
----------------------
function Get_Client_Width (Self : Element'Class) return Web.DOM_Long is
function Imported
(Element : WASM.Objects.Object_Identifier)
return Interfaces.Integer_32
with Import => True,
Convention => C,
Link_Name =>
"__adawebpack__cssom__Element__clientWidth_getter";
begin
return Imported (Self.Identifier);
end Get_Client_Width;
------------
-- Get_Id --
------------
function Get_Id (Self : Element'Class) return Web.Strings.Web_String is
begin
return WASM.Objects.Attributes.Get_String (Self, WASM.Attributes.Id);
end Get_Id;
------------
-- Set_Id --
------------
procedure Set_Id
(Self : in out Element'Class;
To : Web.Strings.Web_String) is
begin
WASM.Objects.Attributes.Set_String (Self, WASM.Attributes.Id, To);
end Set_Id;
end Web.DOM.Elements;
|
AdaCore/libadalang | Ada | 1,327 | adb | procedure Test is
type R (A : Integer; B : Integer) is tagged limited record
X : Integer;
case A is
when 1 .. 10 =>
Y_1 : Integer;
case B is
when 2 .. 8 =>
Z_1 : Integer;
when others => null;
end case;
when 11 .. 20 =>
Y_2 : Integer;
case B is
when 2 .. 8 =>
Z_2 : Integer;
when others => null;
end case;
when others =>
null;
end case;
end record;
type S is new R with record
V : Integer;
end record;
type T (A : Integer; B : Integer) is new R (A, B) with record
W : Integer;
case A is
when 1 .. 10 =>
M : Integer;
when others =>
null;
end case;
end record;
-- This case is not handled accurately: we output some shapes that are
-- infeasible in practice. Indeed, since the condition for M to exist
-- is the same as the condition for Z_1 to exist, returned shapes should
-- either include both or none of them. However, our approximation here
-- will also include cases where M appears but not Z_1 and conversely.
subtype SS is R;
type No_Shapes is new Integer;
begin
null;
end Test;
|
AdaCore/Ada_Drivers_Library | Ada | 4,439 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2015-2016, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- AK8963 I2C device class package
with HAL.I2C; use HAL;
with HAL.Time;
package AK8963 is
type AK8963_Address_Selector is (Add_00, Add_01, Add_10, Add_11);
type AK8963_Sampling_Mode is (Mode_14bit, Mode_16bit);
subtype Gauss is Float;
type AK8963_Operation_Mode is
(Power_Down,
Single_Measurement,
Continuous_1,
External_Trigger,
Continuous_2,
Self_Test,
Fuse_ROM_Access);
type AK8963_Device (I2C_Port : not null HAL.I2C.Any_I2C_Port;
Address_Selector : AK8963_Address_Selector;
Time : not null HAL.Time.Any_Delays) is private;
procedure Initialize (Device : in out AK8963_Device);
function Test_Connection (Device : AK8963_Device) return Boolean;
function Self_Test (Device : in out AK8963_Device) return Boolean;
procedure Set_Mode
(Device : in out AK8963_Device;
Operation_Mode : AK8963_Operation_Mode;
Sampling_Mode : AK8963_Sampling_Mode);
procedure Set_Mode
(Device : in out AK8963_Device;
Operation_Mode : AK8963_Operation_Mode);
function Get_Data_Ready (Device : AK8963_Device) return Boolean;
procedure Get_Heading
(Device : AK8963_Device;
Mx, My, Mz : out Gauss);
function Get_Overflow_Status (Device : AK8963_Device) return Boolean;
private
type AK8963_Device (I2C_Port : not null HAL.I2C.Any_I2C_Port;
Address_Selector : AK8963_Address_Selector;
Time : not null HAL.Time.Any_Delays)
is record
Address : UInt10;
Is_Init : Boolean := False;
end record;
for AK8963_Sampling_Mode use
(Mode_14bit => 16#00#,
Mode_16bit => 16#10#);
for AK8963_Operation_Mode use
(Power_Down => 16#00#,
Single_Measurement => 16#01#,
Continuous_1 => 16#02#,
External_Trigger => 16#04#,
Continuous_2 => 16#06#,
Self_Test => 16#08#,
Fuse_ROM_Access => 16#0F#);
end AK8963;
|
bkold/RISC-CPU-Assembler | Ada | 1,946 | adb | with Ada.Text_IO;
with Assemble_Functions;
with Ada.Directories;
with GNAT.Command_Line;
with Ada.Strings.Bounded;
use GNAT.Command_Line;
use Ada.Text_IO;
--main function controls reading and writing
--assemble package handles each line
procedure Compiler is
package SB is new Ada.Strings.Bounded.Generic_Bounded_Length(Max => 50);
Mode : Integer := 0;
Source_File : File_Type;
Output_File : File_Type;
Error_Flag : Boolean := True;
Output_File_Name : SB.Bounded_String;
Input_File_Name : SB.Bounded_String;
begin
loop
case Getopt ("a d o:") is
when 'a' =>
if Mode = 0 then
Mode:=2;
else
Put_Line("Conflicting agument : '-a'");
return;
end if;
when 'd' =>
if Mode = 0 then
Mode:=1;
else
Put_Line("Conflicting agument : '-d'");
return;
end if;
when 'o' =>
Output_File_Name := SB.To_Bounded_String(Parameter);
when others =>
exit;
end case;
end loop;
Input_File_Name := SB.To_Bounded_String(Get_Argument);
if SB.Length(Input_File_Name) = 0 then
Put_Line("No file name given");
return;
end if;
--open files
Open(Source_File, In_File, SB.To_String(Input_File_Name));
Create(File=>Output_File, Name=>"~Out.s");
if Mode = 0 or else Mode = 2 then
Error_Flag := Assemble_Functions.Build(Source_File, Output_File);
elsif Mode = 1 then
Put_Line("Disassemble is not supported yet");
end if;
Close(Source_File);
Close(Output_File);
if Error_Flag = False then
if SB.Length(Output_File_Name) > 0 then
if Ada.Directories.Exists(SB.To_String(Output_File_Name)) then
Ada.Directories.Delete_File(SB.To_String(Output_File_Name));
end if;
Ada.Directories.Rename("~Out.s", SB.To_String(Output_File_Name));
else
if Ada.Directories.Exists("Out.s") then
Ada.Directories.Delete_File("Out.s");
end if;
Ada.Directories.Rename("~Out.s", "Out.s");
end if;
else
Ada.Directories.Delete_File("~Out.s");
end if;
end Compiler;
|
stcarrez/ada-util | Ada | 2,369 | ads | -----------------------------------------------------------------------
-- util-stacks -- Simple stack
-- Copyright (C) 2010, 2011, 2013, 2022 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Ada.Finalization;
generic
type Element_Type is private;
type Element_Type_Access is access all Element_Type;
package Util.Stacks is
pragma Preelaborate;
type Stack is limited private;
-- Get access to the current stack element.
function Current (Container : in Stack) return Element_Type_Access;
-- Push an element on top of the stack making the new element the current one.
procedure Push (Container : in out Stack);
-- Pop the top element.
procedure Pop (Container : in out Stack);
-- Clear the stack.
procedure Clear (Container : in out Stack);
-- Returns true if the stack is empty.
function Is_Empty (Container : in out Stack) return Boolean;
-- Get the access to the stack element at the given position.
function Get (Container : in Stack;
Position : in Positive) return Element_Type_Access;
type Element_Type_Array is array (Natural range <>) of aliased Element_Type;
procedure Read (Container : in Stack;
Process : not null
access procedure (Content : in Element_Type_Array));
private
type Element_Type_Array_Access is access all Element_Type_Array;
type Stack is new Ada.Finalization.Limited_Controlled with record
Current : Element_Type_Access := null;
Stack : Element_Type_Array_Access := null;
Pos : Natural := 0;
end record;
-- Release the stack
overriding
procedure Finalize (Obj : in out Stack);
end Util.Stacks;
|
zrmyers/VulkanAda | Ada | 5,887 | ads | --------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2020 Zane Myers
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
--------------------------------------------------------------------------------
with Vulkan.Math.GenDMatrix;
with Vulkan.Math.Dvec2;
use Vulkan.Math.GenDMatrix;
use Vulkan.Math.Dvec2;
--------------------------------------------------------------------------------
--< @group Vulkan Math Basic Types
--------------------------------------------------------------------------------
--< @summary
--< This package provides a single precision floating point matrix with 3 rows
--< and 2 columns.
--------------------------------------------------------------------------------
package Vulkan.Math.Dmat3x2 is
pragma Preelaborate;
pragma Pure;
--< A 3x2 matrix of single-precision floating point numbers.
subtype Vkm_Dmat3x2 is Vkm_Dmat(
last_row_index => 2, last_column_index => 1);
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Dmat3x2 type.
--<
--< @description
--< Construct a 3x2 matrix with each component set to 0.0
--<
--< @return
--< A 3x2 matrix.
----------------------------------------------------------------------------
function Make_Dmat3x2 return Vkm_Dmat3x2 is
(GDM.Make_GenMatrix(cN => 1, rN => 2)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Dmat3x2 type.
--<
--< @description
--< Construct a 3x2 matrix with each component set to a different value.
--<
--< | value1 value4 |
--< | value2 value5 |
--< | value3 value6 |
--<
--< @param value1
--< The first value to set for the matrix.
--<
--< @param value2
--< The second value to set for the matrix.
--<
--< @param value3
--< The third value to set for the matrix.
--<
--< @param value4
--< The fourth value to set for the matrix.
--<
--< @param value5
--< The fifth value to set for the matrix.
--<
--< @param value6
--< The sixth value to set for the matrix.
--<
--< @return
--< A 3x2 matrix.
----------------------------------------------------------------------------
function Make_Dmat3x2 (
value1, value2, value3,
value4, value5, value6 : in Vkm_Double) return Vkm_Dmat3x2 is
(GDM.Make_GenMatrix(
cN => 1, rN => 2,
c0r0_val => value1, c0r1_val => value3, c0r2_val => value5,
c1r0_val => value2, c1r1_val => value4, c1r2_val => value6)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Dmat3x2 type.
--<
--< @description
--< Construct a 3x2 matrix with each row set to the value of a 2 dimmensional
--< vector.
--<
--< @param value1
--< The first value to set for the matrix.
--<
--< @param value2
--< The second value to set for the matrix.
--<
--< @param value3
--< The third value to set for the matrix.
--<
--< @return
--< A 3x2 matrix.
----------------------------------------------------------------------------
function Make_Dmat3x2 (
value1, value2, value3 : in Vkm_Dvec2) return Vkm_Dmat3x2 is
(GDM.Make_GenMatrix(
cN => 1, rN => 2,
c0r0_val => value1.x, c0r1_val => value2.x, c0r2_val => value3.x,
c1r0_val => value1.y, c1r1_val => value2.y, c1r2_val => value3.y)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Dmat3x2 type.
--<
--< @description
--< Construct a 3x2 matrix using values from an existing matrix.
--<
--< If the provided matrix has dimmensions that are not the same as this
--< matrix, the corresponding element in the 4x4 identity matrix is used for
--< out of bounds accesses.
--<
--< @param value1
--< The submatrix to extract values from.
--<
--< @return
--< A 3x2 matrix.
----------------------------------------------------------------------------
function Make_Dmat3x2 (
value1 : in Vkm_Dmat) return Vkm_Dmat3x2 is
(GDM.Make_GenMatrix(
cN => 1, rN => 2,
c0r0_val => value1.c0r0, c0r1_val => value1.c0r1, c0r2_val => value1.c0r2,
c1r0_val => value1.c1r0, c1r1_val => value1.c1r1, c1r2_val => value1.c1r2)) with Inline;
end Vulkan.Math.Dmat3x2;
|
sungyeon/drake | Ada | 1,956 | ads | pragma License (Unrestricted);
with Ada.Finalization;
with System.Storage_Elements;
package System.Storage_Pools is
pragma Preelaborate;
type Root_Storage_Pool is
abstract limited new Ada.Finalization.Limited_Controlled with private;
pragma Preelaborable_Initialization (Root_Storage_Pool);
procedure Allocate (
Pool : in out Root_Storage_Pool;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count) is abstract;
procedure Deallocate (
Pool : in out Root_Storage_Pool;
Storage_Address : Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count) is abstract;
function Storage_Size (Pool : Root_Storage_Pool)
return Storage_Elements.Storage_Count is abstract;
-- to use in System.Finalization_Masters
type Storage_Pool_Access is access all Root_Storage_Pool'Class;
for Storage_Pool_Access'Storage_Size use 0;
private
type Root_Storage_Pool is
abstract limited new Ada.Finalization.Limited_Controlled
with null record;
-- required for allocation with explicit 'Storage_Pool by compiler
-- (s-stopoo.ads)
procedure Allocate_Any (
Pool : in out Root_Storage_Pool'Class;
Storage_Address : out Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
-- required for deallocation with explicit 'Storage_Pool by compiler
-- (s-stopoo.ads)
procedure Deallocate_Any (
Pool : in out Root_Storage_Pool'Class;
Storage_Address : Address;
Size_In_Storage_Elements : Storage_Elements.Storage_Count;
Alignment : Storage_Elements.Storage_Count);
-- required for extra parameter of built-in-place (s-stopoo.ads)
subtype Root_Storage_Pool_Ptr is Storage_Pool_Access;
end System.Storage_Pools;
|
RREE/ada-util | Ada | 1,070 | ads | -----------------------------------------------------------------------
-- util-http-clients-curl-tests -- HTTP unit tests for AWS implementation
-- Copyright (C) 2012, 2019 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Http.Clients.AWS;
with Util.Http.Clients.Tests;
package Util.Http.Clients.AWS.Tests is
new Util.Http.Clients.Tests.Http_Tests (Util.Http.Clients.AWS.Register, "aws");
|
alvaromb/Compilemon | Ada | 3,077 | ads | -- Copyright (c) 1990 Regents of the University of California.
-- All rights reserved.
--
-- This software was developed by John Self of the Arcadia project
-- at the University of California, Irvine.
--
-- Redistribution and use in source and binary forms are permitted
-- provided that the above copyright notice and this paragraph are
-- duplicated in all such forms and that any documentation,
-- advertising materials, and other materials related to such
-- distribution and use acknowledge that the software was developed
-- by the University of California, Irvine. The name of the
-- University may not be used to endorse or promote products derived
-- from this software without specific prior written permission.
-- THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
-- IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
-- WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
-- TITLE miscellaneous aflex routines
-- AUTHOR: John Self (UCI)
-- DESCRIPTION
-- NOTES contains functions used in various places throughout aflex.
-- $Header: /co/ua/self/arcadia/aflex/ada/src/RCS/miscS.a,v 1.9 90/01/12 15:20:19 self Exp Locker: self $
with misc_defs, tstring, text_io;
package misc is
use MISC_DEFS;
use TSTRING;
use TEXT_IO;
procedure ACTION_OUT;
procedure BUBBLE(V : in INT_PTR;
N : in INTEGER);
function CLOWER(C : in INTEGER) return INTEGER;
procedure CSHELL(V : in out CHAR_ARRAY;
N : in INTEGER);
procedure DATAEND;
procedure DATAFLUSH;
procedure DATAFLUSH(FILE : in FILE_TYPE);
function AFLEX_GETTIME return VSTRING;
procedure AFLEXERROR(MSG : in VSTRING);
procedure AFLEXERROR(MSG : in STRING);
function ALL_UPPER(STR : in VSTRING) return BOOLEAN;
function ALL_LOWER(STR : in VSTRING) return BOOLEAN;
procedure AFLEXFATAL(MSG : in VSTRING);
procedure AFLEXFATAL(MSG : in STRING);
procedure LINE_DIRECTIVE_OUT;
procedure LINE_DIRECTIVE_OUT(OUTPUT_FILE_NAME : in FILE_TYPE);
procedure MK2DATA(VALUE : in INTEGER);
procedure MK2DATA(FILE : in FILE_TYPE;
VALUE : in INTEGER);
procedure MKDATA(VALUE : in INTEGER);
function MYCTOI(NUM_ARRAY : in VSTRING) return INTEGER;
function MYESC(ARR : in VSTRING) return CHARACTER;
function OTOI(STR : in VSTRING) return CHARACTER;
function READABLE_FORM(C : in CHARACTER) return VSTRING;
procedure SYNERR(STR : in STRING);
procedure TRANSITION_STRUCT_OUT(ELEMENT_V, ELEMENT_N : in INTEGER);
function SET_YY_TRAILING_HEAD_MASK(SRC : in INTEGER) return INTEGER;
function CHECK_YY_TRAILING_HEAD_MASK(SRC : in INTEGER) return INTEGER;
function SET_YY_TRAILING_MASK(SRC : in INTEGER) return INTEGER;
function CHECK_YY_TRAILING_MASK(SRC : in INTEGER) return INTEGER;
function ISLOWER(C : in CHARACTER) return BOOLEAN;
function ISUPPER(C : in CHARACTER) return BOOLEAN;
function ISDIGIT(C : in CHARACTER) return BOOLEAN;
function TOLOWER(C : in INTEGER) return INTEGER;
function BASENAME return VSTRING;
end misc;
|
AaronC98/PlaneSystem | Ada | 4,510 | adb | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2003-2012, 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 --
-- MERCHANTABILITY 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/>. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
------------------------------------------------------------------------------
with AWS.Dispatchers.Callback;
with AWS.Messages;
with AWS.Resources.Streams;
with AWS.Services.Transient_Pages;
package body AWS.Services.Dispatchers.Transient_Pages is
use AWS.Dispatchers;
use type AWS.Resources.Streams.Stream_Access;
-----------
-- Clone --
-----------
overriding function Clone (Dispatcher : Handler) return Handler is
New_Dispatcher : Handler;
begin
if Dispatcher.Action /= null then
New_Dispatcher.Action :=
new AWS.Dispatchers.Handler'Class'
(AWS.Dispatchers.Handler'Class (Dispatcher.Action.Clone));
end if;
return New_Dispatcher;
end Clone;
--------------
-- Dispatch --
--------------
overriding function Dispatch
(Dispatcher : Handler;
Request : Status.Data) return Response.Data
is
use type Messages.Status_Code;
Result : Response.Data;
begin
Result := Dispatch (Dispatcher.Action.all, Request);
if Response.Status_Code (Result) = Messages.S404 then
-- Page not found, look if this is a transient page
declare
URI : constant String := Status.URI (Request);
Stream : constant AWS.Resources.Streams.Stream_Access :=
Services.Transient_Pages.Get (URI);
begin
if Stream = null then
-- This page is not a transient one
return Result;
else
return Response.Stream
(Status.Content_Type (Request),
Stream,
Server_Close => False);
end if;
end;
else
return Result;
end if;
end Dispatch;
--------------
-- Register --
--------------
procedure Register
(Dispatcher : in out Handler;
Action : AWS.Dispatchers.Handler'Class) is
begin
if Dispatcher.Action /= null then
Free (Dispatcher.Action);
end if;
Dispatcher.Action := new AWS.Dispatchers.Handler'Class'(Action);
end Register;
procedure Register
(Dispatcher : in out Handler;
Action : Response.Callback) is
begin
Register (Dispatcher, AWS.Dispatchers.Callback.Create (Action));
end Register;
end AWS.Services.Dispatchers.Transient_Pages;
|
reznikmm/matreshka | Ada | 3,642 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.Elements.Generic_Hash;
function AMF.UMLDI.UML_Use_Case_Diagrams.Hash is
new AMF.Elements.Generic_Hash (UMLDI_UML_Use_Case_Diagram, UMLDI_UML_Use_Case_Diagram_Access);
|
pchapin/augusta | Ada | 8,583 | adb | ---------------------------------------------------------------------------
-- FILE : augusta-strings-fixed.adb
-- SUBJECT : Augusta standard library fixed length string handling package.
-- AUTHOR : (C) Copyright 2013 by Peter C. Chapin
--
-- Please send comments or bug reports to
--
-- Peter C. Chapin <[email protected]>
---------------------------------------------------------------------------
package body Augusta.Strings.Fixed is
-- TODO: FINISH ME!
-- "Copy" procedure for strings of possibly different lengths
procedure Move
(Source : in String;
Target : out String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Character := Space) is
Workspace : String(1 .. Target'Length) := (others => Pad);
begin
-- This works only if Source and Target are the same size.
Workspace := Source;
Target := Workspace;
end Move;
function Index
(Source : in String;
Pattern : in String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index
(Source : in String;
Pattern : in String;
From : in Positive;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index
(Source : in String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index
(Source : in String;
Pattern : in String;
Going : in Direction := Forward;
Mapping : in Maps.Character_Mapping_Function) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index
(Source : in String;
Set : in Maps.Character_Set;
From : in Positive;
Test : in Membership := Inside;
Going : in Direction := Forward) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index
(Source : in String;
Set : in Maps.Character_Set;
Test : in Membership := Inside;
Going : in Direction := Forward) return Natural is
begin
raise Not_Implemented;
return 0;
end Index;
function Index_Non_Blank
(Source : in String;
From : in Positive;
Going : in Direction := Forward) return Natural is
begin
raise Not_Implemented;
return 0;
end Index_Non_Blank;
function Index_Non_Blank
(Source : in String;
Going : in Direction := Forward) return Natural is
begin
raise Not_Implemented;
return 0;
end Index_Non_Blank;
function Count
(Source : in String;
Pattern : in String;
Mapping : in Maps.Character_Mapping := Maps.Identity) return Natural is
begin
raise Not_Implemented;
return 0;
end Count;
function Count
(Source : in String;
Pattern : in String;
Mapping : in Maps.Character_Mapping_Function) return Natural is
begin
raise Not_Implemented;
return 0;
end Count;
function Count
(Source : in String;
Set : in Maps.Character_Set) return Natural is
begin
raise Not_Implemented;
return 0;
end Count;
procedure Find_Token
(Source : in String;
Set : in Maps.Character_Set;
From : in Positive;
Test : in Membership;
First : out Positive;
Last : out Natural) is
begin
raise Not_Implemented;
end Find_Token;
procedure Find_Token
(Source : in String;
Set : in Maps.Character_Set;
Test : in Membership;
First : out Positive;
Last : out Natural) is
begin
raise Not_Implemented;
end Find_Token;
function Translate
(Source : in String;
Mapping : in Maps.Character_Mapping) return String is
begin
raise Not_Implemented;
return "";
end Translate;
procedure Translate
(Source : in out String;
Mapping : in Maps.Character_Mapping) is
begin
raise Not_Implemented;
end Translate;
function Translate
(Source : in String;
Mapping : in Maps.Character_Mapping_Function) return String is
begin
raise Not_Implemented;
return "";
end Translate;
procedure Translate
(Source : in out String;
Mapping : in Maps.Character_Mapping_Function) is
begin
raise Not_Implemented;
end Translate;
function Replace_Slice
(Source : in String;
Low : in Positive;
High : in Natural;
By : in String) return String is
begin
raise Not_Implemented;
return "";
end Replace_Slice;
procedure Replace_Slice
(Source : in out String;
Low : in Positive;
High : in Natural;
By : in String;
Drop : in Truncation := Error;
Justify : in Alignment := Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Replace_Slice;
function Insert
(Source : in String;
Before : in Positive;
New_Item : in String) return String is
begin
raise Not_Implemented;
return "";
end Insert;
procedure Insert
(Source : in out String;
Before : in Positive;
New_Item : in String;
Drop : in Truncation := Error) is
begin
raise Not_Implemented;
end Insert;
function Overwrite
(Source : in String;
Position : in Positive;
New_Item : in String) return string is
begin
raise Not_Implemented;
return "";
end Overwrite;
procedure Overwrite
(Source : in out String;
Position : in Positive;
New_Item : in String;
Drop : in Truncation := Right) is
begin
raise Not_Implemented;
end Overwrite;
function Delete
(Source : in String;
From : in Positive;
Throught : in Natural) return String is
begin
raise Not_Implemented;
return "";
end Delete;
procedure Delete
(Source : in out String;
From : in Positive;
Through : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Delete;
function Trim
(Source : in String;
Side : in Trim_End) return String is
begin
raise Not_Implemented;
return "";
end Trim;
procedure Trim
(Source : in out String;
Side : in Trim_end;
Justify : in Alignment := Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Trim;
function Trim
(Source : in String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set) return String is
begin
raise Not_Implemented;
return "";
end Trim;
procedure Trim
(Source : in out String;
Left : in Maps.Character_Set;
Right : in Maps.Character_Set;
Justify : in Alignment := Strings.Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Trim;
function Head
(Source : in String;
Count : in Natural;
Pad : in Character := Space) return String is
begin
raise Not_Implemented;
return "";
end Head;
procedure Head
(Source : in out String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Head;
function Tail
(Source : in String;
Count : in Natural;
Pad : in Character := Space) return String is
begin
raise Not_Implemented;
return "";
end Tail;
procedure Tail
(Source : in out String;
Count : in Natural;
Justify : in Alignment := Left;
Pad : in Character := Space) is
begin
raise Not_Implemented;
end Tail;
function "*"
(Left : in Natural;
Right : in Character) return String is
begin
raise Not_Implemented;
return "";
end "*";
function "*"
(Left : in Natural;
Right : in String) return String is
begin
raise Not_Implemented;
return "";
end "*";
end Augusta.Strings.Fixed;
|
charlie5/lace | Ada | 545 | ads | with
lace.Event;
package lace.Response
--
-- Provides a base class for all derived event 'response' classes.
--
is
pragma remote_Types;
type Item is abstract tagged limited private;
type View is access all Item'class;
-------------
-- Attributes
--
function Name (Self : in Item) return String;
-------------
-- Operations
--
procedure respond (Self : in out Item; to_Event : in Event.item'Class) is abstract;
private
type Item is abstract tagged limited null record;
end lace.Response;
|
AdaCore/gpr | Ada | 159 | adb | with Ada.Text_IO; use Ada.Text_IO;
package body Pack1 is
procedure Dummy is
begin
Put_Line (Item => "from Pack1.Dummy");
end Dummy;
end Pack1;
|
docandrew/troodon | Ada | 15,416 | ads | pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with stdint_h;
with Interfaces.C.Strings;
with System;
package inttypes_h is
PRId8 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:54
PRId16 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:55
PRId32 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:56
-- unsupported macro: PRId64 __PRI64_PREFIX "d"
PRIdLEAST8 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:59
PRIdLEAST16 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:60
PRIdLEAST32 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:61
-- unsupported macro: PRIdLEAST64 __PRI64_PREFIX "d"
PRIdFAST8 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:64
-- unsupported macro: PRIdFAST16 __PRIPTR_PREFIX "d"
-- unsupported macro: PRIdFAST32 __PRIPTR_PREFIX "d"
-- unsupported macro: PRIdFAST64 __PRI64_PREFIX "d"
PRIi8 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:70
PRIi16 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:71
PRIi32 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:72
-- unsupported macro: PRIi64 __PRI64_PREFIX "i"
PRIiLEAST8 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:75
PRIiLEAST16 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:76
PRIiLEAST32 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:77
-- unsupported macro: PRIiLEAST64 __PRI64_PREFIX "i"
PRIiFAST8 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:80
-- unsupported macro: PRIiFAST16 __PRIPTR_PREFIX "i"
-- unsupported macro: PRIiFAST32 __PRIPTR_PREFIX "i"
-- unsupported macro: PRIiFAST64 __PRI64_PREFIX "i"
PRIo8 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:86
PRIo16 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:87
PRIo32 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:88
-- unsupported macro: PRIo64 __PRI64_PREFIX "o"
PRIoLEAST8 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:91
PRIoLEAST16 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:92
PRIoLEAST32 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:93
-- unsupported macro: PRIoLEAST64 __PRI64_PREFIX "o"
PRIoFAST8 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:96
-- unsupported macro: PRIoFAST16 __PRIPTR_PREFIX "o"
-- unsupported macro: PRIoFAST32 __PRIPTR_PREFIX "o"
-- unsupported macro: PRIoFAST64 __PRI64_PREFIX "o"
PRIu8 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:102
PRIu16 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:103
PRIu32 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:104
-- unsupported macro: PRIu64 __PRI64_PREFIX "u"
PRIuLEAST8 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:107
PRIuLEAST16 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:108
PRIuLEAST32 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:109
-- unsupported macro: PRIuLEAST64 __PRI64_PREFIX "u"
PRIuFAST8 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:112
-- unsupported macro: PRIuFAST16 __PRIPTR_PREFIX "u"
-- unsupported macro: PRIuFAST32 __PRIPTR_PREFIX "u"
-- unsupported macro: PRIuFAST64 __PRI64_PREFIX "u"
PRIx8 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:118
PRIx16 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:119
PRIx32 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:120
-- unsupported macro: PRIx64 __PRI64_PREFIX "x"
PRIxLEAST8 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:123
PRIxLEAST16 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:124
PRIxLEAST32 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:125
-- unsupported macro: PRIxLEAST64 __PRI64_PREFIX "x"
PRIxFAST8 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:128
-- unsupported macro: PRIxFAST16 __PRIPTR_PREFIX "x"
-- unsupported macro: PRIxFAST32 __PRIPTR_PREFIX "x"
-- unsupported macro: PRIxFAST64 __PRI64_PREFIX "x"
PRIX8 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:134
PRIX16 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:135
PRIX32 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:136
-- unsupported macro: PRIX64 __PRI64_PREFIX "X"
PRIXLEAST8 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:139
PRIXLEAST16 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:140
PRIXLEAST32 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:141
-- unsupported macro: PRIXLEAST64 __PRI64_PREFIX "X"
PRIXFAST8 : aliased constant String := "X" & ASCII.NUL; -- /usr/include/inttypes.h:144
-- unsupported macro: PRIXFAST16 __PRIPTR_PREFIX "X"
-- unsupported macro: PRIXFAST32 __PRIPTR_PREFIX "X"
-- unsupported macro: PRIXFAST64 __PRI64_PREFIX "X"
-- unsupported macro: PRIdMAX __PRI64_PREFIX "d"
-- unsupported macro: PRIiMAX __PRI64_PREFIX "i"
-- unsupported macro: PRIoMAX __PRI64_PREFIX "o"
-- unsupported macro: PRIuMAX __PRI64_PREFIX "u"
-- unsupported macro: PRIxMAX __PRI64_PREFIX "x"
-- unsupported macro: PRIXMAX __PRI64_PREFIX "X"
-- unsupported macro: PRIdPTR __PRIPTR_PREFIX "d"
-- unsupported macro: PRIiPTR __PRIPTR_PREFIX "i"
-- unsupported macro: PRIoPTR __PRIPTR_PREFIX "o"
-- unsupported macro: PRIuPTR __PRIPTR_PREFIX "u"
-- unsupported macro: PRIxPTR __PRIPTR_PREFIX "x"
-- unsupported macro: PRIXPTR __PRIPTR_PREFIX "X"
SCNd8 : aliased constant String := "hhd" & ASCII.NUL; -- /usr/include/inttypes.h:171
SCNd16 : aliased constant String := "hd" & ASCII.NUL; -- /usr/include/inttypes.h:172
SCNd32 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:173
-- unsupported macro: SCNd64 __PRI64_PREFIX "d"
SCNdLEAST8 : aliased constant String := "hhd" & ASCII.NUL; -- /usr/include/inttypes.h:176
SCNdLEAST16 : aliased constant String := "hd" & ASCII.NUL; -- /usr/include/inttypes.h:177
SCNdLEAST32 : aliased constant String := "d" & ASCII.NUL; -- /usr/include/inttypes.h:178
-- unsupported macro: SCNdLEAST64 __PRI64_PREFIX "d"
SCNdFAST8 : aliased constant String := "hhd" & ASCII.NUL; -- /usr/include/inttypes.h:181
-- unsupported macro: SCNdFAST16 __PRIPTR_PREFIX "d"
-- unsupported macro: SCNdFAST32 __PRIPTR_PREFIX "d"
-- unsupported macro: SCNdFAST64 __PRI64_PREFIX "d"
SCNi8 : aliased constant String := "hhi" & ASCII.NUL; -- /usr/include/inttypes.h:187
SCNi16 : aliased constant String := "hi" & ASCII.NUL; -- /usr/include/inttypes.h:188
SCNi32 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:189
-- unsupported macro: SCNi64 __PRI64_PREFIX "i"
SCNiLEAST8 : aliased constant String := "hhi" & ASCII.NUL; -- /usr/include/inttypes.h:192
SCNiLEAST16 : aliased constant String := "hi" & ASCII.NUL; -- /usr/include/inttypes.h:193
SCNiLEAST32 : aliased constant String := "i" & ASCII.NUL; -- /usr/include/inttypes.h:194
-- unsupported macro: SCNiLEAST64 __PRI64_PREFIX "i"
SCNiFAST8 : aliased constant String := "hhi" & ASCII.NUL; -- /usr/include/inttypes.h:197
-- unsupported macro: SCNiFAST16 __PRIPTR_PREFIX "i"
-- unsupported macro: SCNiFAST32 __PRIPTR_PREFIX "i"
-- unsupported macro: SCNiFAST64 __PRI64_PREFIX "i"
SCNu8 : aliased constant String := "hhu" & ASCII.NUL; -- /usr/include/inttypes.h:203
SCNu16 : aliased constant String := "hu" & ASCII.NUL; -- /usr/include/inttypes.h:204
SCNu32 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:205
-- unsupported macro: SCNu64 __PRI64_PREFIX "u"
SCNuLEAST8 : aliased constant String := "hhu" & ASCII.NUL; -- /usr/include/inttypes.h:208
SCNuLEAST16 : aliased constant String := "hu" & ASCII.NUL; -- /usr/include/inttypes.h:209
SCNuLEAST32 : aliased constant String := "u" & ASCII.NUL; -- /usr/include/inttypes.h:210
-- unsupported macro: SCNuLEAST64 __PRI64_PREFIX "u"
SCNuFAST8 : aliased constant String := "hhu" & ASCII.NUL; -- /usr/include/inttypes.h:213
-- unsupported macro: SCNuFAST16 __PRIPTR_PREFIX "u"
-- unsupported macro: SCNuFAST32 __PRIPTR_PREFIX "u"
-- unsupported macro: SCNuFAST64 __PRI64_PREFIX "u"
SCNo8 : aliased constant String := "hho" & ASCII.NUL; -- /usr/include/inttypes.h:219
SCNo16 : aliased constant String := "ho" & ASCII.NUL; -- /usr/include/inttypes.h:220
SCNo32 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:221
-- unsupported macro: SCNo64 __PRI64_PREFIX "o"
SCNoLEAST8 : aliased constant String := "hho" & ASCII.NUL; -- /usr/include/inttypes.h:224
SCNoLEAST16 : aliased constant String := "ho" & ASCII.NUL; -- /usr/include/inttypes.h:225
SCNoLEAST32 : aliased constant String := "o" & ASCII.NUL; -- /usr/include/inttypes.h:226
-- unsupported macro: SCNoLEAST64 __PRI64_PREFIX "o"
SCNoFAST8 : aliased constant String := "hho" & ASCII.NUL; -- /usr/include/inttypes.h:229
-- unsupported macro: SCNoFAST16 __PRIPTR_PREFIX "o"
-- unsupported macro: SCNoFAST32 __PRIPTR_PREFIX "o"
-- unsupported macro: SCNoFAST64 __PRI64_PREFIX "o"
SCNx8 : aliased constant String := "hhx" & ASCII.NUL; -- /usr/include/inttypes.h:235
SCNx16 : aliased constant String := "hx" & ASCII.NUL; -- /usr/include/inttypes.h:236
SCNx32 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:237
-- unsupported macro: SCNx64 __PRI64_PREFIX "x"
SCNxLEAST8 : aliased constant String := "hhx" & ASCII.NUL; -- /usr/include/inttypes.h:240
SCNxLEAST16 : aliased constant String := "hx" & ASCII.NUL; -- /usr/include/inttypes.h:241
SCNxLEAST32 : aliased constant String := "x" & ASCII.NUL; -- /usr/include/inttypes.h:242
-- unsupported macro: SCNxLEAST64 __PRI64_PREFIX "x"
SCNxFAST8 : aliased constant String := "hhx" & ASCII.NUL; -- /usr/include/inttypes.h:245
-- unsupported macro: SCNxFAST16 __PRIPTR_PREFIX "x"
-- unsupported macro: SCNxFAST32 __PRIPTR_PREFIX "x"
-- unsupported macro: SCNxFAST64 __PRI64_PREFIX "x"
-- unsupported macro: SCNdMAX __PRI64_PREFIX "d"
-- unsupported macro: SCNiMAX __PRI64_PREFIX "i"
-- unsupported macro: SCNoMAX __PRI64_PREFIX "o"
-- unsupported macro: SCNuMAX __PRI64_PREFIX "u"
-- unsupported macro: SCNxMAX __PRI64_PREFIX "x"
-- unsupported macro: SCNdPTR __PRIPTR_PREFIX "d"
-- unsupported macro: SCNiPTR __PRIPTR_PREFIX "i"
-- unsupported macro: SCNoPTR __PRIPTR_PREFIX "o"
-- unsupported macro: SCNuPTR __PRIPTR_PREFIX "u"
-- unsupported macro: SCNxPTR __PRIPTR_PREFIX "x"
-- Copyright (C) 1997-2021 Free Software Foundation, Inc.
-- This file is part of the GNU C Library.
-- The GNU C Library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
-- The GNU C 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
-- Lesser General Public License for more details.
-- You should have received a copy of the GNU Lesser General Public
-- License along with the GNU C Library; if not, see
-- <https://www.gnu.org/licenses/>.
-- * ISO C99: 7.8 Format conversion of integer types <inttypes.h>
--
-- Get the type definitions.
-- Get a definition for wchar_t. But we must not define wchar_t itself.
-- Macros for printing format specifiers.
-- Decimal notation.
-- Octal notation.
-- Unsigned integers.
-- lowercase hexadecimal notation.
-- UPPERCASE hexadecimal notation.
-- Macros for printing `intmax_t' and `uintmax_t'.
-- Macros for printing `intptr_t' and `uintptr_t'.
-- Macros for scanning format specifiers.
-- Signed decimal notation.
-- Signed decimal notation.
-- Unsigned decimal notation.
-- Octal notation.
-- Hexadecimal notation.
-- Macros for scanning `intmax_t' and `uintmax_t'.
-- Macros for scaning `intptr_t' and `uintptr_t'.
-- We have to define the `uintmax_t' type using `ldiv_t'.
-- Quotient.
-- skipped anonymous struct anon_108
type imaxdiv_t is record
quot : aliased long; -- /usr/include/inttypes.h:273
c_rem : aliased long; -- /usr/include/inttypes.h:274
end record
with Convention => C_Pass_By_Copy; -- /usr/include/inttypes.h:275
-- Remainder.
-- We have to define the `uintmax_t' type using `lldiv_t'.
-- Quotient.
-- Remainder.
-- Compute absolute value of N.
function imaxabs (uu_n : stdint_h.intmax_t) return stdint_h.intmax_t -- /usr/include/inttypes.h:290
with Import => True,
Convention => C,
External_Name => "imaxabs";
-- Return the `imaxdiv_t' representation of the value of NUMER over DENOM.
function imaxdiv (uu_numer : stdint_h.intmax_t; uu_denom : stdint_h.intmax_t) return imaxdiv_t -- /usr/include/inttypes.h:293
with Import => True,
Convention => C,
External_Name => "imaxdiv";
-- Like `strtol' but convert to `intmax_t'.
function strtoimax
(uu_nptr : Interfaces.C.Strings.chars_ptr;
uu_endptr : System.Address;
uu_base : int) return stdint_h.intmax_t -- /usr/include/inttypes.h:297
with Import => True,
Convention => C,
External_Name => "strtoimax";
-- Like `strtoul' but convert to `uintmax_t'.
function strtoumax
(uu_nptr : Interfaces.C.Strings.chars_ptr;
uu_endptr : System.Address;
uu_base : int) return stdint_h.uintmax_t -- /usr/include/inttypes.h:301
with Import => True,
Convention => C,
External_Name => "strtoumax";
-- Like `wcstol' but convert to `intmax_t'.
function wcstoimax
(uu_nptr : access wchar_t;
uu_endptr : System.Address;
uu_base : int) return stdint_h.intmax_t -- /usr/include/inttypes.h:305
with Import => True,
Convention => C,
External_Name => "wcstoimax";
-- Like `wcstoul' but convert to `uintmax_t'.
function wcstoumax
(uu_nptr : access wchar_t;
uu_endptr : System.Address;
uu_base : int) return stdint_h.uintmax_t -- /usr/include/inttypes.h:310
with Import => True,
Convention => C,
External_Name => "wcstoumax";
end inttypes_h;
|
icefoxen/lang | Ada | 527 | adb | -- io.adb
-- Plays with console IO.
-- Note that Ada is case-INSENSITIVE.
--
-- Simon Heath
-- 19/7/2004
with Ada.Text_Io;
use Ada.Text_Io;
procedure Io is
C : Character;
S : String(1..32);
begin
Put_Line( "This reads information and then displays it." );
Put_Line( "Please type a character then 'enter'" );
New_Line;
Get( C );
Put_Line( "You typed '" & C & "'" );
--Put_Line( "Now type a string, then 'enter'" );
--Get_Line( S, 32 );
--Put_Line( "You typed:" );
--Put_Line( S );
end Io;
|
optikos/oasis | Ada | 10,182 | adb | -- Copyright (c) 2019 Maxim Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
-- License-Filename: LICENSE
-------------------------------------------------------------
package body Program.Nodes.Formal_Procedure_Declarations is
function Create
(With_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Procedure_Token : not null Program.Lexical_Elements
.Lexical_Element_Access;
Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Left_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Right_Bracket_Token : Program.Lexical_Elements.Lexical_Element_Access;
Is_Token : Program.Lexical_Elements.Lexical_Element_Access;
Abstract_Token : Program.Lexical_Elements.Lexical_Element_Access;
Null_Token : Program.Lexical_Elements.Lexical_Element_Access;
Subprogram_Default : Program.Elements.Expressions.Expression_Access;
Box_Token : Program.Lexical_Elements.Lexical_Element_Access;
With_Token_2 : Program.Lexical_Elements.Lexical_Element_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Semicolon_Token : not null Program.Lexical_Elements
.Lexical_Element_Access)
return Formal_Procedure_Declaration is
begin
return Result : Formal_Procedure_Declaration :=
(With_Token => With_Token, Procedure_Token => Procedure_Token,
Name => Name, Left_Bracket_Token => Left_Bracket_Token,
Parameters => Parameters, Right_Bracket_Token => Right_Bracket_Token,
Is_Token => Is_Token, Abstract_Token => Abstract_Token,
Null_Token => Null_Token, Subprogram_Default => Subprogram_Default,
Box_Token => Box_Token, With_Token_2 => With_Token_2,
Aspects => Aspects, Semicolon_Token => Semicolon_Token,
Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
function Create
(Name : not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access;
Parameters : Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access;
Subprogram_Default : Program.Elements.Expressions.Expression_Access;
Aspects : Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access;
Is_Part_Of_Implicit : Boolean := False;
Is_Part_Of_Inherited : Boolean := False;
Is_Part_Of_Instance : Boolean := False;
Has_Abstract : Boolean := False;
Has_Null : Boolean := False;
Has_Box : Boolean := False)
return Implicit_Formal_Procedure_Declaration is
begin
return Result : Implicit_Formal_Procedure_Declaration :=
(Name => Name, Parameters => Parameters,
Subprogram_Default => Subprogram_Default, Aspects => Aspects,
Is_Part_Of_Implicit => Is_Part_Of_Implicit,
Is_Part_Of_Inherited => Is_Part_Of_Inherited,
Is_Part_Of_Instance => Is_Part_Of_Instance,
Has_Abstract => Has_Abstract, Has_Null => Has_Null,
Has_Box => Has_Box, Enclosing_Element => null)
do
Initialize (Result);
end return;
end Create;
overriding function Name
(Self : Base_Formal_Procedure_Declaration)
return not null Program.Elements.Defining_Identifiers
.Defining_Identifier_Access is
begin
return Self.Name;
end Name;
overriding function Parameters
(Self : Base_Formal_Procedure_Declaration)
return Program.Elements.Parameter_Specifications
.Parameter_Specification_Vector_Access is
begin
return Self.Parameters;
end Parameters;
overriding function Subprogram_Default
(Self : Base_Formal_Procedure_Declaration)
return Program.Elements.Expressions.Expression_Access is
begin
return Self.Subprogram_Default;
end Subprogram_Default;
overriding function Aspects
(Self : Base_Formal_Procedure_Declaration)
return Program.Elements.Aspect_Specifications
.Aspect_Specification_Vector_Access is
begin
return Self.Aspects;
end Aspects;
overriding function With_Token
(Self : Formal_Procedure_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.With_Token;
end With_Token;
overriding function Procedure_Token
(Self : Formal_Procedure_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Procedure_Token;
end Procedure_Token;
overriding function Left_Bracket_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Left_Bracket_Token;
end Left_Bracket_Token;
overriding function Right_Bracket_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Right_Bracket_Token;
end Right_Bracket_Token;
overriding function Is_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Is_Token;
end Is_Token;
overriding function Abstract_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Abstract_Token;
end Abstract_Token;
overriding function Null_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Null_Token;
end Null_Token;
overriding function Box_Token
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Box_Token;
end Box_Token;
overriding function With_Token_2
(Self : Formal_Procedure_Declaration)
return Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.With_Token_2;
end With_Token_2;
overriding function Semicolon_Token
(Self : Formal_Procedure_Declaration)
return not null Program.Lexical_Elements.Lexical_Element_Access is
begin
return Self.Semicolon_Token;
end Semicolon_Token;
overriding function Has_Abstract
(Self : Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Abstract_Token.Assigned;
end Has_Abstract;
overriding function Has_Null
(Self : Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Null_Token.Assigned;
end Has_Null;
overriding function Has_Box
(Self : Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Box_Token.Assigned;
end Has_Box;
overriding function Is_Part_Of_Implicit
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Implicit;
end Is_Part_Of_Implicit;
overriding function Is_Part_Of_Inherited
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Inherited;
end Is_Part_Of_Inherited;
overriding function Is_Part_Of_Instance
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Is_Part_Of_Instance;
end Is_Part_Of_Instance;
overriding function Has_Abstract
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Has_Abstract;
end Has_Abstract;
overriding function Has_Null
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Has_Null;
end Has_Null;
overriding function Has_Box
(Self : Implicit_Formal_Procedure_Declaration)
return Boolean is
begin
return Self.Has_Box;
end Has_Box;
procedure Initialize
(Self : aliased in out Base_Formal_Procedure_Declaration'Class) is
begin
Set_Enclosing_Element (Self.Name, Self'Unchecked_Access);
for Item in Self.Parameters.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
if Self.Subprogram_Default.Assigned then
Set_Enclosing_Element
(Self.Subprogram_Default, Self'Unchecked_Access);
end if;
for Item in Self.Aspects.Each_Element loop
Set_Enclosing_Element (Item.Element, Self'Unchecked_Access);
end loop;
null;
end Initialize;
overriding function Is_Formal_Procedure_Declaration_Element
(Self : Base_Formal_Procedure_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Formal_Procedure_Declaration_Element;
overriding function Is_Declaration_Element
(Self : Base_Formal_Procedure_Declaration)
return Boolean is
pragma Unreferenced (Self);
begin
return True;
end Is_Declaration_Element;
overriding procedure Visit
(Self : not null access Base_Formal_Procedure_Declaration;
Visitor : in out Program.Element_Visitors.Element_Visitor'Class) is
begin
Visitor.Formal_Procedure_Declaration (Self);
end Visit;
overriding function To_Formal_Procedure_Declaration_Text
(Self : aliased in out Formal_Procedure_Declaration)
return Program.Elements.Formal_Procedure_Declarations
.Formal_Procedure_Declaration_Text_Access is
begin
return Self'Unchecked_Access;
end To_Formal_Procedure_Declaration_Text;
overriding function To_Formal_Procedure_Declaration_Text
(Self : aliased in out Implicit_Formal_Procedure_Declaration)
return Program.Elements.Formal_Procedure_Declarations
.Formal_Procedure_Declaration_Text_Access is
pragma Unreferenced (Self);
begin
return null;
end To_Formal_Procedure_Declaration_Text;
end Program.Nodes.Formal_Procedure_Declarations;
|
zhmu/ananas | Ada | 27,951 | ads | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- A D A . C O N T A I N E R S . B O U N D E D _ H A S H E D _ S E T S --
-- --
-- S p e c --
-- --
-- Copyright (C) 2004-2022, Free Software Foundation, Inc. --
-- --
-- This specification is derived from the Ada Reference Manual for use with --
-- GNAT. The copyright notice above, and the license provisions that follow --
-- apply solely to the contents of the part following the private keyword. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- 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/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Iterator_Interfaces;
private with Ada.Containers.Hash_Tables;
with Ada.Containers.Helpers;
private with Ada.Streams;
private with Ada.Finalization;
private with Ada.Strings.Text_Buffers;
generic
type Element_Type is private;
with function Hash (Element : Element_Type) return Hash_Type;
with function Equivalent_Elements
(Left, Right : Element_Type) return Boolean;
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Ada.Containers.Bounded_Hashed_Sets with
SPARK_Mode => Off
is
pragma Annotate (CodePeer, Skip_Analysis);
pragma Pure;
pragma Remote_Types;
type Set (Capacity : Count_Type; Modulus : Hash_Type) is tagged private
with Constant_Indexing => Constant_Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type,
Aggregate => (Empty => Empty,
Add_Unnamed => Include),
Preelaborable_Initialization
=> Element_Type'Preelaborable_Initialization;
type Cursor is private with Preelaborable_Initialization;
Empty_Set : constant Set;
-- Set objects declared without an initialization expression are
-- initialized to the value Empty_Set.
function Empty (Capacity : Count_Type := 10) return Set;
No_Element : constant Cursor;
-- Cursor objects declared without an initialization expression are
-- initialized to the value No_Element.
function Has_Element (Position : Cursor) return Boolean;
-- Equivalent to Position /= No_Element
package Set_Iterator_Interfaces is new
Ada.Iterator_Interfaces (Cursor, Has_Element);
function "=" (Left, Right : Set) return Boolean;
-- For each element in Left, set equality attempts to find the equal
-- element in Right; if a search fails, then set equality immediately
-- returns False. The search works by calling Hash to find the bucket in
-- the Right set that corresponds to the Left element. If the bucket is
-- non-empty, the search calls the generic formal element equality operator
-- to compare the element (in Left) to the element of each node in the
-- bucket (in Right); the search terminates when a matching node in the
-- bucket is found, or the nodes in the bucket are exhausted. (Note that
-- element equality is called here, not Equivalent_Elements. Set equality
-- is the only operation in which element equality is used. Compare set
-- equality to Equivalent_Sets, which does call Equivalent_Elements.)
function Equivalent_Sets (Left, Right : Set) return Boolean;
-- Similar to set equality, with the difference that the element in Left is
-- compared to the elements in Right using the generic formal
-- Equivalent_Elements operation instead of element equality.
function To_Set (New_Item : Element_Type) return Set;
-- Constructs a singleton set comprising New_Element. To_Set calls Hash to
-- determine the bucket for New_Item.
function Capacity (Container : Set) return Count_Type;
-- Returns the current capacity of the set. Capacity is the maximum length
-- before which rehashing in guaranteed not to occur.
procedure Reserve_Capacity (Container : in out Set; Capacity : Count_Type);
-- If the value of the Capacity actual parameter is less or equal to
-- Container.Capacity, then the operation has no effect. Otherwise it
-- raises Capacity_Error (as no expansion of capacity is possible for a
-- bounded form).
function Default_Modulus (Capacity : Count_Type) return Hash_Type;
-- Returns a modulus value (hash table size) which is optimal for the
-- specified capacity (which corresponds to the maximum number of items).
function Length (Container : Set) return Count_Type;
-- Returns the number of items in the set
function Is_Empty (Container : Set) return Boolean;
-- Equivalent to Length (Container) = 0
procedure Clear (Container : in out Set);
-- Removes all of the items from the set. This will deallocate all memory
-- associated with this set.
function Element (Position : Cursor) return Element_Type;
-- Returns the element of the node designated by the cursor
procedure Replace_Element
(Container : in out Set;
Position : Cursor;
New_Item : Element_Type);
-- If New_Item is equivalent (as determined by calling Equivalent_Elements)
-- to the element of the node designated by Position, then New_Element is
-- assigned to that element. Otherwise, it calls Hash to determine the
-- bucket for New_Item. If the bucket is not empty, then it calls
-- Equivalent_Elements for each node in that bucket to determine whether
-- New_Item is equivalent to an element in that bucket. If
-- Equivalent_Elements returns True then Program_Error is raised (because
-- an element may appear only once in the set); otherwise, New_Item is
-- assigned to the node designated by Position, and the node is moved to
-- its new bucket.
procedure Query_Element
(Position : Cursor;
Process : not null access procedure (Element : Element_Type));
-- Calls Process with the element (having only a constant view) of the node
-- designated by the cursor.
type Constant_Reference_Type
(Element : not null access constant Element_Type) is private
with Implicit_Dereference => Element;
function Constant_Reference
(Container : aliased Set;
Position : Cursor) return Constant_Reference_Type;
procedure Assign (Target : in out Set; Source : Set);
-- If Target denotes the same object as Source, then the operation has no
-- effect. If the Target capacity is less than the Source length, then
-- Assign raises Capacity_Error. Otherwise, Assign clears Target and then
-- copies the (active) elements from Source to Target.
function Copy
(Source : Set;
Capacity : Count_Type := 0;
Modulus : Hash_Type := 0) return Set;
-- Constructs a new set object whose elements correspond to Source. If the
-- Capacity parameter is 0, then the capacity of the result is the same as
-- the length of Source. If the Capacity parameter is equal or greater than
-- the length of Source, then the capacity of the result is the specified
-- value. Otherwise, Copy raises Capacity_Error. If the Modulus parameter
-- is 0, then the modulus of the result is the value returned by a call to
-- Default_Modulus with the capacity parameter determined as above;
-- otherwise the modulus of the result is the specified value.
procedure Move (Target : in out Set; Source : in out Set);
-- Clears Target (if it's not empty), and then moves (not copies) the
-- buckets array and nodes from Source to Target.
procedure Insert
(Container : in out Set;
New_Item : Element_Type;
Position : out Cursor;
Inserted : out Boolean);
-- Conditionally inserts New_Item into the set. If New_Item is already in
-- the set, then Inserted returns False and Position designates the node
-- containing the existing element (which is not modified). If New_Item is
-- not already in the set, then Inserted returns True and Position
-- designates the newly-inserted node containing New_Item. The search for
-- an existing element works as follows. Hash is called to determine
-- New_Item's bucket; if the bucket is non-empty, then Equivalent_Elements
-- is called to compare New_Item to the element of each node in that
-- bucket. If the bucket is empty, or there were no equivalent elements in
-- the bucket, the search "fails" and the New_Item is inserted in the set
-- (and Inserted returns True); otherwise, the search "succeeds" (and
-- Inserted returns False).
procedure Insert (Container : in out Set; New_Item : Element_Type);
-- Attempts to insert New_Item into the set, performing the usual insertion
-- search (which involves calling both Hash and Equivalent_Elements); if
-- the search succeeds (New_Item is equivalent to an element already in the
-- set, and so was not inserted), then this operation raises
-- Constraint_Error. (This version of Insert is similar to Replace, but
-- having the opposite exception behavior. It is intended for use when you
-- want to assert that the item is not already in the set.)
procedure Include (Container : in out Set; New_Item : Element_Type);
-- Attempts to insert New_Item into the set. If an element equivalent to
-- New_Item is already in the set (the insertion search succeeded, and
-- hence New_Item was not inserted), then the value of New_Item is assigned
-- to the existing element. (This insertion operation only raises an
-- exception if cursor tampering occurs. It is intended for use when you
-- want to insert the item in the set, and you don't care whether an
-- equivalent element is already present.)
procedure Replace (Container : in out Set; New_Item : Element_Type);
-- Searches for New_Item in the set; if the search fails (because an
-- equivalent element was not in the set), then it raises
-- Constraint_Error. Otherwise, the existing element is assigned the value
-- New_Item. (This is similar to Insert, but with the opposite exception
-- behavior. It is intended for use when you want to assert that the item
-- is already in the set.)
procedure Exclude (Container : in out Set; Item : Element_Type);
-- Searches for Item in the set, and if found, removes its node from the
-- set and then deallocates it. The search works as follows. The operation
-- calls Hash to determine the item's bucket; if the bucket is not empty,
-- it calls Equivalent_Elements to compare Item to the element of each node
-- in the bucket. (This is the deletion analog of Include. It is intended
-- for use when you want to remove the item from the set, but don't care
-- whether the item is already in the set.)
procedure Delete (Container : in out Set; Item : Element_Type);
-- Searches for Item in the set (which involves calling both Hash and
-- Equivalent_Elements). If the search fails, then the operation raises
-- Constraint_Error. Otherwise it removes the node from the set and then
-- deallocates it. (This is the deletion analog of non-conditional
-- Insert. It is intended for use when you want to assert that the item is
-- already in the set.)
procedure Delete (Container : in out Set; Position : in out Cursor);
-- Removes the node designated by Position from the set, and then
-- deallocates the node. The operation calls Hash to determine the bucket,
-- and then compares Position to each node in the bucket until there's a
-- match (it does not call Equivalent_Elements).
procedure Union (Target : in out Set; Source : Set);
-- Iterates over the Source set, and conditionally inserts each element
-- into Target.
function Union (Left, Right : Set) return Set;
-- The operation first copies the Left set to the result, and then iterates
-- over the Right set to conditionally insert each element into the result.
function "or" (Left, Right : Set) return Set renames Union;
procedure Intersection (Target : in out Set; Source : Set);
-- Iterates over the Target set (calling First and Next), calling Find to
-- determine whether the element is in Source. If an equivalent element is
-- not found in Source, the element is deleted from Target.
function Intersection (Left, Right : Set) return Set;
-- Iterates over the Left set, calling Find to determine whether the
-- element is in Right. If an equivalent element is found, it is inserted
-- into the result set.
function "and" (Left, Right : Set) return Set renames Intersection;
procedure Difference (Target : in out Set; Source : Set);
-- Iterates over the Source (calling First and Next), calling Find to
-- determine whether the element is in Target. If an equivalent element is
-- found, it is deleted from Target.
function Difference (Left, Right : Set) return Set;
-- Iterates over the Left set, calling Find to determine whether the
-- element is in the Right set. If an equivalent element is not found, the
-- element is inserted into the result set.
function "-" (Left, Right : Set) return Set renames Difference;
procedure Symmetric_Difference (Target : in out Set; Source : Set);
-- The operation iterates over the Source set, searching for the element
-- in Target (calling Hash and Equivalent_Elements). If an equivalent
-- element is found, it is removed from Target; otherwise it is inserted
-- into Target.
function Symmetric_Difference (Left, Right : Set) return Set;
-- The operation first iterates over the Left set. It calls Find to
-- determine whether the element is in the Right set. If no equivalent
-- element is found, the element from Left is inserted into the result. The
-- operation then iterates over the Right set, to determine whether the
-- element is in the Left set. If no equivalent element is found, the Right
-- element is inserted into the result.
function "xor" (Left, Right : Set) return Set
renames Symmetric_Difference;
function Overlap (Left, Right : Set) return Boolean;
-- Iterates over the Left set (calling First and Next), calling Find to
-- determine whether the element is in the Right set. If an equivalent
-- element is found, the operation immediately returns True. The operation
-- returns False if the iteration over Left terminates without finding any
-- equivalent element in Right.
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean;
-- Iterates over Subset (calling First and Next), calling Find to determine
-- whether the element is in Of_Set. If no equivalent element is found in
-- Of_Set, the operation immediately returns False. The operation returns
-- True if the iteration over Subset terminates without finding an element
-- not in Of_Set (that is, every element in Subset is equivalent to an
-- element in Of_Set).
function First (Container : Set) return Cursor;
-- Returns a cursor that designates the first non-empty bucket, by
-- searching from the beginning of the buckets array.
function Next (Position : Cursor) return Cursor;
-- Returns a cursor that designates the node that follows the current one
-- designated by Position. If Position designates the last node in its
-- bucket, the operation calls Hash to compute the index of this bucket,
-- and searches the buckets array for the first non-empty bucket, starting
-- from that index; otherwise, it simply follows the link to the next node
-- in the same bucket.
procedure Next (Position : in out Cursor);
-- Equivalent to Position := Next (Position)
function Find
(Container : Set;
Item : Element_Type) return Cursor;
-- Searches for Item in the set. Find calls Hash to determine the item's
-- bucket; if the bucket is not empty, it calls Equivalent_Elements to
-- compare Item to each element in the bucket. If the search succeeds, Find
-- returns a cursor designating the node containing the equivalent element;
-- otherwise, it returns No_Element.
function Contains (Container : Set; Item : Element_Type) return Boolean;
-- Equivalent to Find (Container, Item) /= No_Element
function Equivalent_Elements (Left, Right : Cursor) return Boolean;
-- Returns the result of calling Equivalent_Elements with the elements of
-- the nodes designated by cursors Left and Right.
function Equivalent_Elements
(Left : Cursor;
Right : Element_Type) return Boolean;
-- Returns the result of calling Equivalent_Elements with element of the
-- node designated by Left and element Right.
function Equivalent_Elements
(Left : Element_Type;
Right : Cursor) return Boolean;
-- Returns the result of calling Equivalent_Elements with element Left and
-- the element of the node designated by Right.
procedure Iterate
(Container : Set;
Process : not null access procedure (Position : Cursor));
-- Calls Process for each node in the set
function Iterate
(Container : Set)
return Set_Iterator_Interfaces.Forward_Iterator'Class;
generic
type Key_Type (<>) is private;
with function Key (Element : Element_Type) return Key_Type;
with function Hash (Key : Key_Type) return Hash_Type;
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
package Generic_Keys is
function Key (Position : Cursor) return Key_Type;
-- Applies generic formal operation Key to the element of the node
-- designated by Position.
function Element (Container : Set; Key : Key_Type) return Element_Type;
-- Searches (as per the key-based Find) for the node containing Key, and
-- returns the associated element.
procedure Replace
(Container : in out Set;
Key : Key_Type;
New_Item : Element_Type);
-- Searches (as per the key-based Find) for the node containing Key, and
-- then replaces the element of that node (as per the element-based
-- Replace_Element).
procedure Exclude (Container : in out Set; Key : Key_Type);
-- Searches for Key in the set, and if found, removes its node from the
-- set and then deallocates it. The search works by first calling Hash
-- (on Key) to determine the bucket; if the bucket is not empty, it
-- calls Equivalent_Keys to compare parameter Key to the value of
-- generic formal operation Key applied to element of each node in the
-- bucket.
procedure Delete (Container : in out Set; Key : Key_Type);
-- Deletes the node containing Key as per Exclude, with the difference
-- that Constraint_Error is raised if Key is not found.
function Find (Container : Set; Key : Key_Type) return Cursor;
-- Searches for the node containing Key, and returns a cursor
-- designating the node. The search works by first calling Hash (on Key)
-- to determine the bucket. If the bucket is not empty, the search
-- compares Key to the element of each node in the bucket, and returns
-- the matching node. The comparison itself works by applying the
-- generic formal Key operation to the element of the node, and then
-- calling generic formal operation Equivalent_Keys.
function Contains (Container : Set; Key : Key_Type) return Boolean;
-- Equivalent to Find (Container, Key) /= No_Element
procedure Update_Element_Preserving_Key
(Container : in out Set;
Position : Cursor;
Process : not null access
procedure (Element : in out Element_Type));
-- Calls Process with the element of the node designated by Position,
-- but with the restriction that the key-value of the element is not
-- modified. The operation first makes a copy of the value returned by
-- applying generic formal operation Key on the element of the node, and
-- then calls Process with the element. The operation verifies that the
-- key-part has not been modified by calling generic formal operation
-- Equivalent_Keys to compare the saved key-value to the value returned
-- by applying generic formal operation Key to the post-Process value of
-- element. If the key values compare equal then the operation
-- completes. Otherwise, the node is removed from the map and
-- Program_Error is raised.
type Reference_Type (Element : not null access Element_Type) is private
with Implicit_Dereference => Element;
function Reference_Preserving_Key
(Container : aliased in out Set;
Position : Cursor) return Reference_Type;
function Constant_Reference
(Container : aliased Set;
Key : Key_Type) return Constant_Reference_Type;
function Reference_Preserving_Key
(Container : aliased in out Set;
Key : Key_Type) return Reference_Type;
private
type Set_Access is access all Set;
for Set_Access'Storage_Size use 0;
package Impl is new Helpers.Generic_Implementation;
type Reference_Control_Type is
new Impl.Reference_Control_Type with
record
Container : Set_Access;
Index : Hash_Type;
Old_Pos : Cursor;
Old_Hash : Hash_Type;
end record;
overriding procedure Finalize (Control : in out Reference_Control_Type);
pragma Inline (Finalize);
type Reference_Type (Element : not null access Element_Type) is record
Control : Reference_Control_Type;
end record;
use Ada.Streams;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Reference_Type);
for Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Reference_Type);
for Reference_Type'Write use Write;
end Generic_Keys;
private
pragma Inline (Next);
type Node_Type is record
Element : aliased Element_Type;
Next : Count_Type;
end record;
package HT_Types is
new Hash_Tables.Generic_Bounded_Hash_Table_Types (Node_Type);
type Set (Capacity : Count_Type; Modulus : Hash_Type) is
new HT_Types.Hash_Table_Type (Capacity, Modulus)
with null record with Put_Image => Put_Image;
procedure Put_Image
(S : in out Ada.Strings.Text_Buffers.Root_Buffer_Type'Class; V : Set);
use HT_Types, HT_Types.Implementation;
use Ada.Streams;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Container : Set);
for Set'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Container : out Set);
for Set'Read use Read;
type Set_Access is access all Set;
for Set_Access'Storage_Size use 0;
-- Note: If a Cursor object has no explicit initialization expression,
-- it must default initialize to the same value as constant No_Element.
-- The Node component of type Cursor has scalar type Count_Type, so it
-- requires an explicit initialization expression of its own declaration,
-- in order for objects of record type Cursor to properly initialize.
type Cursor is record
Container : Set_Access;
Node : Count_Type := 0;
end record;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Cursor);
for Cursor'Write use Write;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Cursor);
for Cursor'Read use Read;
subtype Reference_Control_Type is Implementation.Reference_Control_Type;
-- It is necessary to rename this here, so that the compiler can find it
type Constant_Reference_Type
(Element : not null access constant Element_Type) is
record
Control : Reference_Control_Type :=
raise Program_Error with "uninitialized reference";
-- The RM says, "The default initialization of an object of
-- type Constant_Reference_Type or Reference_Type propagates
-- Program_Error."
end record;
procedure Read
(Stream : not null access Root_Stream_Type'Class;
Item : out Constant_Reference_Type);
for Constant_Reference_Type'Read use Read;
procedure Write
(Stream : not null access Root_Stream_Type'Class;
Item : Constant_Reference_Type);
for Constant_Reference_Type'Write use Write;
-- Three operations are used to optimize in the expansion of "for ... of"
-- loops: the Next(Cursor) procedure in the visible part, and the following
-- Pseudo_Reference and Get_Element_Access functions. See Sem_Ch5 for
-- details.
function Pseudo_Reference
(Container : aliased Set'Class) return Reference_Control_Type;
pragma Inline (Pseudo_Reference);
-- Creates an object of type Reference_Control_Type pointing to the
-- container, and increments the Lock. Finalization of this object will
-- decrement the Lock.
type Element_Access is access all Element_Type with
Storage_Size => 0;
function Get_Element_Access
(Position : Cursor) return not null Element_Access;
-- Returns a pointer to the element designated by Position.
Empty_Set : constant Set :=
(Hash_Table_Type with Capacity => 0, Modulus => 0);
No_Element : constant Cursor := (Container => null, Node => 0);
type Iterator is new Ada.Finalization.Limited_Controlled and
Set_Iterator_Interfaces.Forward_Iterator with
record
Container : Set_Access;
end record
with Disable_Controlled => not T_Check;
overriding procedure Finalize (Object : in out Iterator);
overriding function First (Object : Iterator) return Cursor;
overriding function Next
(Object : Iterator;
Position : Cursor) return Cursor;
end Ada.Containers.Bounded_Hashed_Sets;
|
zhmu/ananas | Ada | 3,764 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT RUN-TIME COMPONENTS --
-- --
-- S Y S T E M . I M A G E _ U --
-- --
-- B o d y --
-- --
-- Copyright (C) 1992-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- 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/>. --
-- --
-- GNAT was originally developed by the GNAT team at New York University. --
-- Extensive contributions were provided by Ada Core Technologies Inc. --
-- --
------------------------------------------------------------------------------
package body System.Image_U is
--------------------
-- Image_Unsigned --
--------------------
procedure Image_Unsigned
(V : Uns;
S : in out String;
P : out Natural)
is
pragma Assert (S'First = 1);
begin
S (1) := ' ';
P := 1;
Set_Image_Unsigned (V, S, P);
end Image_Unsigned;
------------------------
-- Set_Image_Unsigned --
------------------------
procedure Set_Image_Unsigned
(V : Uns;
S : in out String;
P : in out Natural)
is
Nb_Digits : Natural := 0;
Value : Uns := V;
begin
pragma Assert (P >= S'First - 1 and then P < S'Last and then
P < Natural'Last);
-- No check is done since, as documented in the specification, the
-- caller guarantees that S is long enough to hold the result.
-- First we compute the number of characters needed for representing
-- the number.
loop
Value := Value / 10;
Nb_Digits := Nb_Digits + 1;
exit when Value = 0;
end loop;
Value := V;
-- We now populate digits from the end of the string to the beginning
for J in reverse 1 .. Nb_Digits loop
S (P + J) := Character'Val (48 + (Value rem 10));
Value := Value / 10;
end loop;
P := P + Nb_Digits;
end Set_Image_Unsigned;
end System.Image_U;
|
docandrew/troodon | Ada | 33,348 | ads | pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with System;
with bits_stdint_uintn_h;
with Interfaces.C.Strings;
limited with xproto;
package xcb is
-- unsupported macro: XCB_PACKED __attribute__((__packed__))
X_TCP_PORT : constant := 6000; -- /usr/include/xcb/xcb.h:72
XCB_CONN_ERROR : constant := 1; -- /usr/include/xcb/xcb.h:75
XCB_CONN_CLOSED_EXT_NOTSUPPORTED : constant := 2; -- /usr/include/xcb/xcb.h:78
XCB_CONN_CLOSED_MEM_INSUFFICIENT : constant := 3; -- /usr/include/xcb/xcb.h:81
XCB_CONN_CLOSED_REQ_LEN_EXCEED : constant := 4; -- /usr/include/xcb/xcb.h:84
XCB_CONN_CLOSED_PARSE_ERR : constant := 5; -- /usr/include/xcb/xcb.h:87
XCB_CONN_CLOSED_INVALID_SCREEN : constant := 6; -- /usr/include/xcb/xcb.h:90
XCB_CONN_CLOSED_FDPASSING_FAILED : constant := 7; -- /usr/include/xcb/xcb.h:93
-- arg-macro: function XCB_TYPE_PAD (T, I)
-- return -(I) and (sizeof(T) > 4 ? 3 : sizeof(T) - 1);
XCB_NONE : constant := 0; -- /usr/include/xcb/xcb.h:209
XCB_COPY_FROM_PARENT : constant := 0; -- /usr/include/xcb/xcb.h:212
XCB_CURRENT_TIME : constant := 0; -- /usr/include/xcb/xcb.h:215
XCB_NO_SYMBOL : constant := 0; -- /usr/include/xcb/xcb.h:218
-- * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
-- * All Rights Reserved.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a
-- * copy of this software and associated documentation files (the "Software"),
-- * to deal in the Software without restriction, including without limitation
-- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- * and/or sell copies of the Software, and to permit persons to whom the
-- * Software is furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included in
-- * all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- * Except as contained in this notice, the names of the authors or their
-- * institutions shall not be used in advertising or otherwise to promote the
-- * sale, use or other dealings in this Software without prior written
-- * authorization from the authors.
--
--*
-- * @file xcb.h
--
--*
-- * @defgroup XCB_Core_API XCB Core API
-- * @brief Core API of the XCB library.
-- *
-- * @{
--
-- Pre-defined constants
--* Current protocol version
--* Current minor version
--* X_TCP_PORT + display number = server port for TCP transport
--* xcb connection errors because of socket, pipe and other stream errors.
--* xcb connection shutdown because of extension not supported
--* malloc(), calloc() and realloc() error upon failure, for eg ENOMEM
--* Connection closed, exceeding request length that server accepts.
--* Connection closed, error during parsing display string.
--* Connection closed because the server does not have a screen matching the display.
--* Connection closed because some FD passing operation failed
-- Opaque structures
--*
-- * @brief XCB Connection structure.
-- *
-- * A structure that contain all data that XCB needs to communicate with an X server.
--
--*< Opaque structure containing all data that XCB needs to communicate with an X server.
type xcb_connection_t is null record; -- incomplete struct
-- Other types
--*
-- * @brief Generic iterator.
-- *
-- * A generic iterator structure.
--
--*< Data of the current iterator
-- skipped anonymous struct anon_28
type xcb_generic_iterator_t is record
data : System.Address; -- /usr/include/xcb/xcb.h:115
c_rem : aliased int; -- /usr/include/xcb/xcb.h:116
index : aliased int; -- /usr/include/xcb/xcb.h:117
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:118
--*< remaining elements
--*< index of the current iterator
--*
-- * @brief Generic reply.
-- *
-- * A generic reply structure.
--
--*< Type of the response
-- skipped anonymous struct anon_29
type xcb_generic_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:126
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:127
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:128
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:129
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:130
--*< Padding
--*< Sequence number
--*< Length of the response
--*
-- * @brief Generic event.
-- *
-- * A generic event structure.
--
--*< Type of the response
-- skipped anonymous struct anon_30
type xcb_generic_event_t_array1650 is array (0 .. 6) of aliased bits_stdint_uintn_h.uint32_t;
type xcb_generic_event_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:138
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:139
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:140
pad : aliased xcb_generic_event_t_array1650; -- /usr/include/xcb/xcb.h:141
full_sequence : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:142
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:143
--*< Padding
--*< Sequence number
--*< Padding
--*< full sequence
--*
-- * @brief Raw Generic event.
-- *
-- * A generic event structure as used on the wire, i.e., without the full_sequence field
--
--*< Type of the response
-- skipped anonymous struct anon_31
type xcb_raw_generic_event_t_array1650 is array (0 .. 6) of aliased bits_stdint_uintn_h.uint32_t;
type xcb_raw_generic_event_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:151
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:152
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:153
pad : aliased xcb_raw_generic_event_t_array1650; -- /usr/include/xcb/xcb.h:154
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:155
--*< Padding
--*< Sequence number
--*< Padding
--*
-- * @brief GE event
-- *
-- * An event as sent by the XGE extension. The length field specifies the
-- * number of 4-byte blocks trailing the struct.
-- *
-- * @deprecated Since some fields in this struct have unfortunate names, it is
-- * recommended to use xcb_ge_generic_event_t instead.
--
--*< Type of the response
-- skipped anonymous struct anon_32
type xcb_ge_event_t_array1657 is array (0 .. 4) of aliased bits_stdint_uintn_h.uint32_t;
type xcb_ge_event_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:167
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:168
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:169
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:170
event_type : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:171
pad1 : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:172
pad : aliased xcb_ge_event_t_array1657; -- /usr/include/xcb/xcb.h:173
full_sequence : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:174
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:175
--*< Padding
--*< Sequence number
--*< Padding
--*< full sequence
--*
-- * @brief Generic error.
-- *
-- * A generic error structure.
--
--*< Type of the response
-- skipped anonymous struct anon_33
type xcb_generic_error_t_array1657 is array (0 .. 4) of aliased bits_stdint_uintn_h.uint32_t;
type xcb_generic_error_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:183
error_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:184
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:185
resource_id : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:186
minor_code : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/xcb.h:187
major_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:188
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/xcb.h:189
pad : aliased xcb_generic_error_t_array1657; -- /usr/include/xcb/xcb.h:190
full_sequence : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/xcb.h:191
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:192
--*< Error code
--*< Sequence number
--* < Resource ID for requests with side effects only
--* < Minor opcode of the failed request
--* < Major opcode of the failed request
--*< Padding
--*< full sequence
--*
-- * @brief Generic cookie.
-- *
-- * A generic cookie structure.
--
--*< Sequence number
-- * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett.
-- * All Rights Reserved.
-- *
-- * Permission is hereby granted, free of charge, to any person obtaining a
-- * copy of this software and associated documentation files (the "Software"),
-- * to deal in the Software without restriction, including without limitation
-- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
-- * and/or sell copies of the Software, and to permit persons to whom the
-- * Software is furnished to do so, subject to the following conditions:
-- *
-- * The above copyright notice and this permission notice shall be included in
-- * all copies or substantial portions of the Software.
-- *
-- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-- *
-- * Except as contained in this notice, the names of the authors or their
-- * institutions shall not be used in advertising or otherwise to promote the
-- * sale, use or other dealings in this Software without prior written
-- * authorization from the authors.
--
-- skipped anonymous struct anon_34
type xcb_void_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/xcb.h:200
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:201
--* XCB_NONE is the universal null resource or null atom parameter value for many core X requests
--* XCB_COPY_FROM_PARENT can be used for many xcb_create_window parameters
--* XCB_CURRENT_TIME can be used in most requests that take an xcb_timestamp_t
--* XCB_NO_SYMBOL fills in unused entries in xcb_keysym_t tables
-- xcb_auth.c
--*
-- * @brief Container for authorization information.
-- *
-- * A container for authorization information to be sent to the X server.
--
--*< Length of the string name (as returned by strlen).
type xcb_auth_info_t is record
namelen : aliased int; -- /usr/include/xcb/xcb.h:229
name : Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xcb.h:230
datalen : aliased int; -- /usr/include/xcb/xcb.h:231
data : Interfaces.C.Strings.chars_ptr; -- /usr/include/xcb/xcb.h:232
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/xcb.h:228
--*< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1".
--*< Length of the data member.
--*< Data interpreted in a protocol-specific manner.
-- xcb_out.c
--*
-- * @brief Forces any buffered output to be written to the server.
-- * @param c The connection to the X server.
-- * @return > @c 0 on success, <= @c 0 otherwise.
-- *
-- * Forces any buffered output to be written to the server. Blocks
-- * until the write is complete.
--
function xcb_flush (c : access xcb_connection_t) return int -- /usr/include/xcb/xcb.h:246
with Import => True,
Convention => C,
External_Name => "xcb_flush";
--*
-- * @brief Returns the maximum request length that this server accepts.
-- * @param c The connection to the X server.
-- * @return The maximum request length field.
-- *
-- * In the absence of the BIG-REQUESTS extension, returns the
-- * maximum request length field from the connection setup data, which
-- * may be as much as 65535. If the server supports BIG-REQUESTS, then
-- * the maximum request length field from the reply to the
-- * BigRequestsEnable request will be returned instead.
-- *
-- * Note that this length is measured in four-byte units, making the
-- * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and
-- * 16GB with.
--
function xcb_get_maximum_request_length (c : access xcb_connection_t) return bits_stdint_uintn_h.uint32_t -- /usr/include/xcb/xcb.h:263
with Import => True,
Convention => C,
External_Name => "xcb_get_maximum_request_length";
--*
-- * @brief Prefetch the maximum request length without blocking.
-- * @param c The connection to the X server.
-- *
-- * Without blocking, does as much work as possible toward computing
-- * the maximum request length accepted by the X server.
-- *
-- * Invoking this function may cause a call to xcb_big_requests_enable,
-- * but will not block waiting for the reply.
-- * xcb_get_maximum_request_length will return the prefetched data
-- * after possibly blocking while the reply is retrieved.
-- *
-- * Note that in order for this function to be fully non-blocking, the
-- * application must previously have called
-- * xcb_prefetch_extension_data(c, &xcb_big_requests_id) and the reply
-- * must have already arrived.
--
procedure xcb_prefetch_maximum_request_length (c : access xcb_connection_t) -- /usr/include/xcb/xcb.h:282
with Import => True,
Convention => C,
External_Name => "xcb_prefetch_maximum_request_length";
-- xcb_in.c
--*
-- * @brief Returns the next event or error from the server.
-- * @param c The connection to the X server.
-- * @return The next event from the server.
-- *
-- * Returns the next event or error from the server, or returns null in
-- * the event of an I/O error. Blocks until either an event or error
-- * arrive, or an I/O error occurs.
--
function xcb_wait_for_event (c : access xcb_connection_t) return access xcb_generic_event_t -- /usr/include/xcb/xcb.h:296
with Import => True,
Convention => C,
External_Name => "xcb_wait_for_event";
--*
-- * @brief Returns the next event or error from the server.
-- * @param c The connection to the X server.
-- * @return The next event from the server.
-- *
-- * Returns the next event or error from the server, if one is
-- * available, or returns @c NULL otherwise. If no event is available, that
-- * might be because an I/O error like connection close occurred while
-- * attempting to read the next event, in which case the connection is
-- * shut down when this function returns.
--
function xcb_poll_for_event (c : access xcb_connection_t) return access xcb_generic_event_t -- /usr/include/xcb/xcb.h:309
with Import => True,
Convention => C,
External_Name => "xcb_poll_for_event";
--*
-- * @brief Returns the next event without reading from the connection.
-- * @param c The connection to the X server.
-- * @return The next already queued event from the server.
-- *
-- * This is a version of xcb_poll_for_event that only examines the
-- * event queue for new events. The function doesn't try to read new
-- * events from the connection if no queued events are found.
-- *
-- * This function is useful for callers that know in advance that all
-- * interesting events have already been read from the connection. For
-- * example, callers might use xcb_wait_for_reply and be interested
-- * only of events that preceded a specific reply.
--
function xcb_poll_for_queued_event (c : access xcb_connection_t) return access xcb_generic_event_t -- /usr/include/xcb/xcb.h:325
with Import => True,
Convention => C,
External_Name => "xcb_poll_for_queued_event";
type xcb_special_event is null record; -- incomplete struct
subtype xcb_special_event_t is xcb_special_event; -- /usr/include/xcb/xcb.h:327
--*
-- * @brief Returns the next event from a special queue
--
function xcb_poll_for_special_event (c : access xcb_connection_t; se : access xcb_special_event_t) return access xcb_generic_event_t -- /usr/include/xcb/xcb.h:332
with Import => True,
Convention => C,
External_Name => "xcb_poll_for_special_event";
--*
-- * @brief Returns the next event from a special queue, blocking until one arrives
--
function xcb_wait_for_special_event (c : access xcb_connection_t; se : access xcb_special_event_t) return access xcb_generic_event_t -- /usr/include/xcb/xcb.h:338
with Import => True,
Convention => C,
External_Name => "xcb_wait_for_special_event";
--*
-- * @typedef typedef struct xcb_extension_t xcb_extension_t
--
--*< Opaque structure used as key for xcb_get_extension_data_t.
type xcb_extension_t is null record; -- incomplete struct
--*
-- * @brief Listen for a special event
--
function xcb_register_for_special_xge
(c : access xcb_connection_t;
ext : access xcb_extension_t;
eid : bits_stdint_uintn_h.uint32_t;
stamp : access bits_stdint_uintn_h.uint32_t) return access xcb_special_event_t -- /usr/include/xcb/xcb.h:348
with Import => True,
Convention => C,
External_Name => "xcb_register_for_special_xge";
--*
-- * @brief Stop listening for a special event
--
procedure xcb_unregister_for_special_event (c : access xcb_connection_t; se : access xcb_special_event_t) -- /usr/include/xcb/xcb.h:356
with Import => True,
Convention => C,
External_Name => "xcb_unregister_for_special_event";
--*
-- * @brief Return the error for a request, or NULL if none can ever arrive.
-- * @param c The connection to the X server.
-- * @param cookie The request cookie.
-- * @return The error for the request, or NULL if none can ever arrive.
-- *
-- * The xcb_void_cookie_t cookie supplied to this function must have resulted
-- * from a call to xcb_[request_name]_checked(). This function will block
-- * until one of two conditions happens. If an error is received, it will be
-- * returned. If a reply to a subsequent request has already arrived, no error
-- * can arrive for this request, so this function will return NULL.
-- *
-- * Note that this function will perform a sync if needed to ensure that the
-- * sequence number will advance beyond that provided in cookie; this is a
-- * convenience to avoid races in determining whether the sync is needed.
--
function xcb_request_check (c : access xcb_connection_t; cookie : xcb_void_cookie_t) return access xcb_generic_error_t -- /usr/include/xcb/xcb.h:375
with Import => True,
Convention => C,
External_Name => "xcb_request_check";
--*
-- * @brief Discards the reply for a request.
-- * @param c The connection to the X server.
-- * @param sequence The request sequence number from a cookie.
-- *
-- * Discards the reply for a request. Additionally, any error generated
-- * by the request is also discarded (unless it was an _unchecked request
-- * and the error has already arrived).
-- *
-- * This function will not block even if the reply is not yet available.
-- *
-- * Note that the sequence really does have to come from an xcb cookie;
-- * this function is not designed to operate on socket-handoff replies.
--
procedure xcb_discard_reply (c : access xcb_connection_t; sequence : unsigned) -- /usr/include/xcb/xcb.h:391
with Import => True,
Convention => C,
External_Name => "xcb_discard_reply";
--*
-- * @brief Discards the reply for a request, given by a 64bit sequence number
-- * @param c The connection to the X server.
-- * @param sequence 64-bit sequence number as returned by xcb_send_request64().
-- *
-- * Discards the reply for a request. Additionally, any error generated
-- * by the request is also discarded (unless it was an _unchecked request
-- * and the error has already arrived).
-- *
-- * This function will not block even if the reply is not yet available.
-- *
-- * Note that the sequence really does have to come from xcb_send_request64();
-- * the cookie sequence number is defined as "unsigned" int and therefore
-- * not 64-bit on all platforms.
-- * This function is not designed to operate on socket-handoff replies.
-- *
-- * Unlike its xcb_discard_reply() counterpart, the given sequence number is not
-- * automatically "widened" to 64-bit.
--
procedure xcb_discard_reply64 (c : access xcb_connection_t; sequence : bits_stdint_uintn_h.uint64_t) -- /usr/include/xcb/xcb.h:412
with Import => True,
Convention => C,
External_Name => "xcb_discard_reply64";
-- xcb_ext.c
--*
-- * @brief Caches reply information from QueryExtension requests.
-- * @param c The connection.
-- * @param ext The extension data.
-- * @return A pointer to the xcb_query_extension_reply_t for the extension.
-- *
-- * This function is the primary interface to the "extension cache",
-- * which caches reply information from QueryExtension
-- * requests. Invoking this function may cause a call to
-- * xcb_query_extension to retrieve extension information from the
-- * server, and may block until extension data is received from the
-- * server.
-- *
-- * The result must not be freed. This storage is managed by the cache
-- * itself.
--
function xcb_get_extension_data (c : access xcb_connection_t; ext : access xcb_extension_t) return access constant xproto.xcb_query_extension_reply_t -- /usr/include/xcb/xcb.h:432
with Import => True,
Convention => C,
External_Name => "xcb_get_extension_data";
--*
-- * @brief Prefetch of extension data into the extension cache
-- * @param c The connection.
-- * @param ext The extension data.
-- *
-- * This function allows a "prefetch" of extension data into the
-- * extension cache. Invoking the function may cause a call to
-- * xcb_query_extension, but will not block waiting for the
-- * reply. xcb_get_extension_data will return the prefetched data after
-- * possibly blocking while it is retrieved.
--
procedure xcb_prefetch_extension_data (c : access xcb_connection_t; ext : access xcb_extension_t) -- /usr/include/xcb/xcb.h:445
with Import => True,
Convention => C,
External_Name => "xcb_prefetch_extension_data";
-- xcb_conn.c
--*
-- * @brief Access the data returned by the server.
-- * @param c The connection.
-- * @return A pointer to an xcb_setup_t structure.
-- *
-- * Accessor for the data returned by the server when the xcb_connection_t
-- * was initialized. This data includes
-- * - the server's required format for images,
-- * - a list of available visuals,
-- * - a list of available screens,
-- * - the server's maximum request length (in the absence of the
-- * BIG-REQUESTS extension),
-- * - and other assorted information.
-- *
-- * See the X protocol specification for more details.
-- *
-- * The result must not be freed.
--
function xcb_get_setup (c : access xcb_connection_t) return access constant xproto.xcb_setup_t -- /usr/include/xcb/xcb.h:468
with Import => True,
Convention => C,
External_Name => "xcb_get_setup";
--*
-- * @brief Access the file descriptor of the connection.
-- * @param c The connection.
-- * @return The file descriptor.
-- *
-- * Accessor for the file descriptor that was passed to the
-- * xcb_connect_to_fd call that returned @p c.
--
function xcb_get_file_descriptor (c : access xcb_connection_t) return int -- /usr/include/xcb/xcb.h:478
with Import => True,
Convention => C,
External_Name => "xcb_get_file_descriptor";
--*
-- * @brief Test whether the connection has shut down due to a fatal error.
-- * @param c The connection.
-- * @return > 0 if the connection is in an error state; 0 otherwise.
-- *
-- * Some errors that occur in the context of an xcb_connection_t
-- * are unrecoverable. When such an error occurs, the
-- * connection is shut down and further operations on the
-- * xcb_connection_t have no effect, but memory will not be freed until
-- * xcb_disconnect() is called on the xcb_connection_t.
-- *
-- * @return XCB_CONN_ERROR, because of socket errors, pipe errors or other stream errors.
-- * @return XCB_CONN_CLOSED_EXT_NOTSUPPORTED, when extension not supported.
-- * @return XCB_CONN_CLOSED_MEM_INSUFFICIENT, when memory not available.
-- * @return XCB_CONN_CLOSED_REQ_LEN_EXCEED, exceeding request length that server accepts.
-- * @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string.
-- * @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display.
--
function xcb_connection_has_error (c : access xcb_connection_t) return int -- /usr/include/xcb/xcb.h:498
with Import => True,
Convention => C,
External_Name => "xcb_connection_has_error";
--*
-- * @brief Connects to the X server.
-- * @param fd The file descriptor.
-- * @param auth_info Authentication data.
-- * @return A newly allocated xcb_connection_t structure.
-- *
-- * Connects to an X server, given the open socket @p fd and the
-- * xcb_auth_info_t @p auth_info. The file descriptor @p fd is
-- * bidirectionally connected to an X server. If the connection
-- * should be unauthenticated, @p auth_info must be @c
-- * NULL.
-- *
-- * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
-- * Callers need to use xcb_connection_has_error() to check for failure.
-- * When finished, use xcb_disconnect() to close the connection and free
-- * the structure.
--
function xcb_connect_to_fd (fd : int; auth_info : access xcb_auth_info_t) return access xcb_connection_t -- /usr/include/xcb/xcb.h:517
with Import => True,
Convention => C,
External_Name => "xcb_connect_to_fd";
--*
-- * @brief Closes the connection.
-- * @param c The connection.
-- *
-- * Closes the file descriptor and frees all memory associated with the
-- * connection @c c. If @p c is @c NULL, nothing is done.
--
procedure xcb_disconnect (c : access xcb_connection_t) -- /usr/include/xcb/xcb.h:526
with Import => True,
Convention => C,
External_Name => "xcb_disconnect";
-- xcb_util.c
--*
-- * @brief Parses a display string name in the form documented by X(7x).
-- * @param name The name of the display.
-- * @param host A pointer to a malloc'd copy of the hostname.
-- * @param display A pointer to the display number.
-- * @param screen A pointer to the screen number.
-- * @return 0 on failure, non 0 otherwise.
-- *
-- * Parses the display string name @p display_name in the form
-- * documented by X(7x). Has no side effects on failure. If
-- * @p displayname is @c NULL or empty, it uses the environment
-- * variable DISPLAY. @p hostp is a pointer to a newly allocated string
-- * that contain the host name. @p displayp is set to the display
-- * number and @p screenp to the preferred screen number. @p screenp
-- * can be @c NULL. If @p displayname does not contain a screen number,
-- * it is set to @c 0.
--
function xcb_parse_display
(name : Interfaces.C.Strings.chars_ptr;
host : System.Address;
display : access int;
screen : access int) return int -- /usr/include/xcb/xcb.h:548
with Import => True,
Convention => C,
External_Name => "xcb_parse_display";
--*
-- * @brief Connects to the X server.
-- * @param displayname The name of the display.
-- * @param screenp A pointer to a preferred screen number.
-- * @return A newly allocated xcb_connection_t structure.
-- *
-- * Connects to the X server specified by @p displayname. If @p
-- * displayname is @c NULL, uses the value of the DISPLAY environment
-- * variable. If a particular screen on that server is preferred, the
-- * int pointed to by @p screenp (if not @c NULL) will be set to that
-- * screen; otherwise the screen will be set to 0.
-- *
-- * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
-- * Callers need to use xcb_connection_has_error() to check for failure.
-- * When finished, use xcb_disconnect() to close the connection and free
-- * the structure.
--
function xcb_connect (displayname : Interfaces.C.Strings.chars_ptr; screenp : access int) return access xcb_connection_t -- /usr/include/xcb/xcb.h:567
with Import => True,
Convention => C,
External_Name => "xcb_connect";
--*
-- * @brief Connects to the X server, using an authorization information.
-- * @param display The name of the display.
-- * @param auth The authorization information.
-- * @param screen A pointer to a preferred screen number.
-- * @return A newly allocated xcb_connection_t structure.
-- *
-- * Connects to the X server specified by @p displayname, using the
-- * authorization @p auth. If a particular screen on that server is
-- * preferred, the int pointed to by @p screenp (if not @c NULL) will
-- * be set to that screen; otherwise @p screenp will be set to 0.
-- *
-- * Always returns a non-NULL pointer to a xcb_connection_t, even on failure.
-- * Callers need to use xcb_connection_has_error() to check for failure.
-- * When finished, use xcb_disconnect() to close the connection and free
-- * the structure.
--
function xcb_connect_to_display_with_auth_info
(display : Interfaces.C.Strings.chars_ptr;
auth : access xcb_auth_info_t;
screen : access int) return access xcb_connection_t -- /usr/include/xcb/xcb.h:586
with Import => True,
Convention => C,
External_Name => "xcb_connect_to_display_with_auth_info";
-- xcb_xid.c
--*
-- * @brief Allocates an XID for a new object.
-- * @param c The connection.
-- * @return A newly allocated XID.
-- *
-- * Allocates an XID for a new object. Typically used just prior to
-- * various object creation functions, such as xcb_create_window.
--
function xcb_generate_id (c : access xcb_connection_t) return bits_stdint_uintn_h.uint32_t -- /usr/include/xcb/xcb.h:599
with Import => True,
Convention => C,
External_Name => "xcb_generate_id";
--*
-- * @brief Obtain number of bytes read from the connection.
-- * @param c The connection
-- * @return Number of bytes read from the server.
-- *
-- * Returns cumulative number of bytes received from the connection.
-- *
-- * This retrieves the total number of bytes read from this connection,
-- * to be used for diagnostic/monitoring/informative purposes.
--
function xcb_total_read (c : access xcb_connection_t) return bits_stdint_uintn_h.uint64_t -- /usr/include/xcb/xcb.h:614
with Import => True,
Convention => C,
External_Name => "xcb_total_read";
--*
-- *
-- * @brief Obtain number of bytes written to the connection.
-- * @param c The connection
-- * @return Number of bytes written to the server.
-- *
-- * Returns cumulative number of bytes sent to the connection.
-- *
-- * This retrieves the total number of bytes written to this connection,
-- * to be used for diagnostic/monitoring/informative purposes.
--
function xcb_total_written (c : access xcb_connection_t) return bits_stdint_uintn_h.uint64_t -- /usr/include/xcb/xcb.h:629
with Import => True,
Convention => C,
External_Name => "xcb_total_written";
--*
-- * @}
--
end xcb;
|
AaronC98/PlaneSystem | Ada | 3,153 | adb | ------------------------------------------------------------------------------
-- Ada Web Server --
-- --
-- Copyright (C) 2000-2012, 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 --
-- MERCHANTABILITY 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/>. --
-- --
-- --
-- --
-- --
-- --
-- --
-- --
------------------------------------------------------------------------------
with Ada.Strings.Fixed;
with AWS.Client;
with AWS.Net;
with AWS.Utils;
package body AWS.Communication.Client is
------------------
-- Send_Message --
------------------
function Send_Message
(Server : String;
Port : Positive;
Name : String;
Parameters : Parameter_Set := Null_Parameter_Set) return Response.Data
is
URL : Unbounded_String := To_Unbounded_String ("http://");
begin
if Ada.Strings.Fixed.Index (Server, ":") > 0 then
URL := URL & '[' & Server & ']';
else
URL := URL & Server;
end if;
URL := URL & ':' & Utils.Image (Port) & AWS_Com
& "?HOST=" & Net.Host_Name
& "&NAME=" & Name;
for K in Parameters'Range loop
URL := URL & "&P" & Utils.Image (K) & '=' & Parameters (K);
end loop;
return AWS.Client.Get (To_String (URL));
end Send_Message;
end AWS.Communication.Client;
|
reznikmm/matreshka | Ada | 4,107 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Chart_Tick_Marks_Minor_Outer_Attributes;
package Matreshka.ODF_Chart.Tick_Marks_Minor_Outer_Attributes is
type Chart_Tick_Marks_Minor_Outer_Attribute_Node is
new Matreshka.ODF_Chart.Abstract_Chart_Attribute_Node
and ODF.DOM.Chart_Tick_Marks_Minor_Outer_Attributes.ODF_Chart_Tick_Marks_Minor_Outer_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Chart_Tick_Marks_Minor_Outer_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Chart_Tick_Marks_Minor_Outer_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Chart.Tick_Marks_Minor_Outer_Attributes;
|
sungyeon/drake | Ada | 8,735 | ads | pragma License (Unrestricted);
-- extended unit
with Ada.Iterator_Interfaces;
-- diff (Copy_On_Write)
private with Ada.Containers.Hash_Tables;
private with Ada.Finalization;
private with Ada.Streams;
generic
type Element_Type (<>) is limited private;
with function Hash (Element : Element_Type) return Hash_Type;
with function Equivalent_Elements (Left, Right : Element_Type)
return Boolean;
-- diff ("=")
package Ada.Containers.Limited_Hashed_Sets is
pragma Preelaborate;
pragma Remote_Types;
type Set is tagged limited private
with
Constant_Indexing => Constant_Reference,
Default_Iterator => Iterate,
Iterator_Element => Element_Type;
pragma Preelaborable_Initialization (Set);
type Cursor is private;
pragma Preelaborable_Initialization (Cursor);
-- diff
-- Empty_Set : constant Set;
function Empty_Set return Set;
No_Element : constant Cursor;
function Has_Element (Position : Cursor) return Boolean;
package Set_Iterator_Interfaces is
new Iterator_Interfaces (Cursor, Has_Element);
-- diff ("=")
function Equivalent_Sets (Left, Right : Set) return Boolean;
-- diff (To_Set)
-- diff (Generic_Array_To_Set)
--
--
--
--
function Capacity (Container : Set) return Count_Type;
procedure Reserve_Capacity (
Container : in out Set;
Capacity : Count_Type);
function Length (Container : Set) return Count_Type;
function Is_Empty (Container : Set) return Boolean;
procedure Clear (Container : in out Set);
-- diff (Element)
-- diff (Replace_Element)
--
--
--
procedure Query_Element (
Position : Cursor;
Process : not null access procedure (Element : Element_Type));
type Constant_Reference_Type (
Element : not null access constant Element_Type) is private
with Implicit_Dereference => Element;
function Constant_Reference (Container : aliased Set; Position : Cursor)
return Constant_Reference_Type;
-- diff (Assign)
-- diff (Copy)
procedure Move (Target : in out Set; Source : in out Set);
procedure Insert (
Container : in out Set'Class;
New_Item : not null access function return Element_Type;
Position : out Cursor;
Inserted : out Boolean);
procedure Insert (
Container : in out Set'Class;
New_Item : not null access function return Element_Type);
-- diff (Include)
-- diff (Replace)
procedure Exclude (Container : in out Set; Item : Element_Type);
procedure Delete (Container : in out Set; Item : Element_Type);
procedure Delete (Container : in out Set; Position : in out Cursor);
-- diff (Union)
-- diff (Union)
-- diff ("or")
--
procedure Intersection (Target : in out Set; Source : Set);
-- diff (Intersection)
-- diff ("and")
--
procedure Difference (Target : in out Set; Source : Set);
-- diff (Difference)
-- diff ("-")
--
-- diff (Symmetric_Difference)
-- diff (Symmetric_Difference)
-- diff ("xor")
--
function Overlap (Left, Right : Set) return Boolean;
function Is_Subset (Subset : Set; Of_Set : Set) return Boolean;
function First (Container : Set) return Cursor;
function Next (Position : Cursor) return Cursor;
procedure Next (Position : in out Cursor);
function Find (Container : Set; Item : Element_Type) return Cursor;
function Contains (Container : Set; Item : Element_Type) return Boolean;
function Equivalent_Elements (Left, Right : Cursor) return Boolean;
function Equivalent_Elements (Left : Cursor; Right : Element_Type)
return Boolean;
-- function Equivalent_Elements (Left : Element_Type; Right : Cursor)
-- return Boolean;
-- modified
procedure Iterate (
Container : Set'Class; -- not primitive
Process : not null access procedure (Position : Cursor));
-- modified
function Iterate (Container : Set'Class) -- not primitive
return Set_Iterator_Interfaces.Forward_Iterator'Class;
generic
type Key_Type (<>) is private;
with function Key (Element : Element_Type) return Key_Type;
with function Hash (Key : Key_Type) return Hash_Type;
with function Equivalent_Keys (Left, Right : Key_Type) return Boolean;
package Generic_Keys is
function Key (Position : Cursor) return Key_Type;
-- diff (Element)
-- diff (Replace)
--
--
--
procedure Exclude (Container : in out Set; Key : Key_Type);
procedure Delete (Container : in out Set; Key : Key_Type);
function Find (Container : Set; Key : Key_Type) return Cursor;
function Contains (Container : Set; Key : Key_Type) return Boolean;
procedure Update_Element_Preserving_Key (
Container : in out Set;
Position : Cursor;
Process : not null access procedure (
Element : in out Element_Type));
type Reference_Type (
Element : not null access Element_Type) is private
with Implicit_Dereference => Element;
function Reference_Preserving_Key (
Container : aliased in out Set;
Position : Cursor)
return Reference_Type;
function Constant_Reference (Container : aliased Set; Key : Key_Type)
return Constant_Reference_Type;
function Reference_Preserving_Key (
Container : aliased in out Set;
Key : Key_Type)
return Reference_Type;
private
type Reference_Type (
Element : not null access Element_Type) is null record;
-- dummy 'Read and 'Write
procedure Missing_Read (
Stream : access Streams.Root_Stream_Type'Class;
Item : out Reference_Type)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
procedure Missing_Write (
Stream : access Streams.Root_Stream_Type'Class;
Item : Reference_Type)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
for Reference_Type'Read use Missing_Read;
for Reference_Type'Write use Missing_Write;
end Generic_Keys;
-- extended
generic
with function "=" (Left, Right : Element_Type) return Boolean is <>;
package Equivalents is
function "=" (Left, Right : Set) return Boolean;
end Equivalents;
private
type Element_Access is access Element_Type;
type Node is limited record
Super : aliased Hash_Tables.Node;
Element : Element_Access;
end record;
-- place Super at first whether Element_Type is controlled-type
for Node use record
Super at 0 range 0 .. Hash_Tables.Node_Size - 1;
end record;
-- diff (Data)
--
--
--
--
-- diff (Data_Access)
type Set is limited new Finalization.Limited_Controlled with record
Table : Hash_Tables.Table_Access;
Length : Count_Type := 0;
end record;
-- diff (Adjust)
overriding procedure Finalize (Object : in out Set)
renames Clear;
type Cursor is access Node;
type Constant_Reference_Type (
Element : not null access constant Element_Type) is null record;
type Set_Access is access constant Set;
for Set_Access'Storage_Size use 0;
type Set_Iterator is
new Set_Iterator_Interfaces.Forward_Iterator with
record
First : Cursor;
end record;
overriding function First (Object : Set_Iterator) return Cursor;
overriding function Next (Object : Set_Iterator; Position : Cursor)
return Cursor;
package Streaming is
-- diff (Read)
--
--
-- diff (Write)
--
--
procedure Missing_Read (
Stream : access Streams.Root_Stream_Type'Class;
Item : out Cursor)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
procedure Missing_Write (
Stream : access Streams.Root_Stream_Type'Class;
Item : Cursor)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
procedure Missing_Read (
Stream : access Streams.Root_Stream_Type'Class;
Item : out Constant_Reference_Type)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
procedure Missing_Write (
Stream : access Streams.Root_Stream_Type'Class;
Item : Constant_Reference_Type)
with Import,
Convention => Ada, External_Name => "__drake_program_error";
end Streaming;
-- diff ('Read)
-- diff ('Write)
for Cursor'Read use Streaming.Missing_Read;
for Cursor'Write use Streaming.Missing_Write;
for Constant_Reference_Type'Read use Streaming.Missing_Read;
for Constant_Reference_Type'Write use Streaming.Missing_Write;
No_Element : constant Cursor := null;
end Ada.Containers.Limited_Hashed_Sets;
|
crssnky/Ada | Ada | 370 | adb | with Ada.Text_IO;
procedure double_1_20 is
package T_IO renames Ada.Text_IO;
package I_IO is new Ada.Text_IO.Integer_IO(Integer);
procedure Power(Item : in out Integer)is
begin
Item:=Item*2;
end Power;
X:Integer := 1;
begin
for i in Integer range 1..30 loop
I_IO.Put(X);
T_IO.New_Line;
Power(X);
end loop;
end double_1_20;
|
persan/A-gst | Ada | 2,161 | ads | pragma Ada_2005;
pragma Style_Checks (Off);
pragma Warnings (Off);
with Interfaces.C; use Interfaces.C;
limited with GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpad_h;
with System;
package GStreamer.GST_Low_Level.gstreamer_0_10_gst_check_gstconsistencychecker_h is
-- GStreamer
-- *
-- * unit testing helper lib
-- *
-- * Copyright (C) 2009 Edward Hervey <[email protected]>
-- *
-- * This library is free software; you can redistribute it and/or
-- * modify it under the terms of the GNU Library 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
-- * Library General Public License for more details.
-- *
-- * You should have received a copy of the GNU Library 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.
--
--*
-- * GstStreamConsistency:
-- *
-- * Opaque consistency checker handle.
-- *
-- * Since: 0.10.24
--
-- skipped empty struct u_GstStreamConsistency
-- skipped empty struct GstStreamConsistency
function gst_consistency_checker_new (pad : access GStreamer.GST_Low_Level.gstreamer_0_10_gst_gstpad_h.GstPad) return System.Address; -- gst/check/gstconsistencychecker.h:40
pragma Import (C, gst_consistency_checker_new, "gst_consistency_checker_new");
procedure gst_consistency_checker_reset (consist : System.Address); -- gst/check/gstconsistencychecker.h:42
pragma Import (C, gst_consistency_checker_reset, "gst_consistency_checker_reset");
procedure gst_consistency_checker_free (consist : System.Address); -- gst/check/gstconsistencychecker.h:44
pragma Import (C, gst_consistency_checker_free, "gst_consistency_checker_free");
end GStreamer.GST_Low_Level.gstreamer_0_10_gst_check_gstconsistencychecker_h;
|
reznikmm/matreshka | Ada | 4,289 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
limited with AMF.UML.Literal_Specifications;
package AMF.Utp.Literal_Anies is
pragma Preelaborate;
type Utp_Literal_Any is limited interface;
type Utp_Literal_Any_Access is
access all Utp_Literal_Any'Class;
for Utp_Literal_Any_Access'Storage_Size use 0;
not overriding function Get_Base_Literal_Specification
(Self : not null access constant Utp_Literal_Any)
return AMF.UML.Literal_Specifications.UML_Literal_Specification_Access is abstract;
-- Getter of LiteralAny::base_LiteralSpecification.
--
not overriding procedure Set_Base_Literal_Specification
(Self : not null access Utp_Literal_Any;
To : AMF.UML.Literal_Specifications.UML_Literal_Specification_Access) is abstract;
-- Setter of LiteralAny::base_LiteralSpecification.
--
end AMF.Utp.Literal_Anies;
|
oresat/oresat-c3-rf | Ada | 33,193 | adb | M:main
F:Fmain$pwrmgmt_irq$0$0({2}DF,SV:S),C,0,0,1,6,0
F:Fmain$transmit_packet$0$0({2}DF,SV:S),C,0,0,0,0,0
F:Fmain$display_transmit_packet$0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$axradio_statuschange$0$0({2}DF,SV:S),Z,0,0,0,0,0
F:G$enable_radio_interrupt_in_mcu_pin$0$0({2}DF,SV:S),Z,0,0,0,0,0
F:G$disable_radio_interrupt_in_mcu_pin$0$0({2}DF,SV:S),Z,0,0,0,0,0
F:Fmain$wakeup_callback$0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$_sdcc_external_startup$0$0({2}DF,SC:U),C,0,0,0,0,0
F:Fmain$si_write_reg$0$0({2}DF,SV:S),C,0,0,0,0,0
F:Fmain$synth_init$0$0({2}DF,SV:S),C,0,0,0,0,0
F:G$main$0$0({2}DF,SI:S),C,0,0,0,0,0
F:G$main$0$0({2}DF,SI:S),C,0,0,0,0,0
T:Fmain$wtimer_callback[({0}S:S$next$0$0({2}DX,STwtimer_callback:S),Z,0,0)({2}S:S$handler$0$0({2}DC,DF,SV:S),Z,0,0)]
T:Fmain$axradio_status_receive[({0}S:S$phy$0$0({10}STaxradio_status_receive_phy:S),Z,0,0)({10}S:S$mac$0$0({12}STaxradio_status_receive_mac:S),Z,0,0)({22}S:S$pktdata$0$0({2}DX,SC:U),Z,0,0)({24}S:S$pktlen$0$0({2}SI:U),Z,0,0)]
T:Fmain$axradio_address[({0}S:S$addr$0$0({5}DA5d,SC:U),Z,0,0)]
T:Fmain$axradio_address_mask[({0}S:S$addr$0$0({5}DA5d,SC:U),Z,0,0)({5}S:S$mask$0$0({5}DA5d,SC:U),Z,0,0)]
T:Fmain$__00000000[({0}S:S$rx$0$0({26}STaxradio_status_receive:S),Z,0,0)({0}S:S$cs$0$0({3}STaxradio_status_channelstate:S),Z,0,0)]
T:Fmain$axradio_status_channelstate[({0}S:S$rssi$0$0({2}SI:S),Z,0,0)({2}S:S$busy$0$0({1}SC:U),Z,0,0)]
T:Fmain$u32endian[({0}S:S$b0$0$0({1}SC:U),Z,0,0)({1}S:S$b1$0$0({1}SC:U),Z,0,0)({2}S:S$b2$0$0({1}SC:U),Z,0,0)({3}S:S$b3$0$0({1}SC:U),Z,0,0)]
T:Fmain$u16endian[({0}S:S$b0$0$0({1}SC:U),Z,0,0)({1}S:S$b1$0$0({1}SC:U),Z,0,0)]
T:Fmain$wtimer_desc[({0}S:S$next$0$0({2}DX,STwtimer_desc:S),Z,0,0)({2}S:S$handler$0$0({2}DC,DF,SV:S),Z,0,0)({4}S:S$time$0$0({4}SL:U),Z,0,0)]
T:Fmain$axradio_status_receive_mac[({0}S:S$remoteaddr$0$0({5}DA5d,SC:U),Z,0,0)({5}S:S$localaddr$0$0({5}DA5d,SC:U),Z,0,0)({10}S:S$raw$0$0({2}DX,SC:U),Z,0,0)]
T:Fmain$calsector[({0}S:S$id$0$0({5}DA5d,SC:U),Z,0,0)({5}S:S$len$0$0({1}SC:U),Z,0,0)({6}S:S$devid$0$0({6}DA6d,SC:U),Z,0,0)({12}S:S$calg00gain$0$0({2}DA2d,SC:U),Z,0,0)({14}S:S$calg01gain$0$0({2}DA2d,SC:U),Z,0,0)({16}S:S$calg10gain$0$0({2}DA2d,SC:U),Z,0,0)({18}S:S$caltempgain$0$0({2}DA2d,SC:U),Z,0,0)({20}S:S$caltempoffs$0$0({2}DA2d,SC:U),Z,0,0)({22}S:S$frcoscfreq$0$0({2}DA2d,SC:U),Z,0,0)({24}S:S$lposcfreq$0$0({2}DA2d,SC:U),Z,0,0)({26}S:S$lposcfreq_fast$0$0({2}DA2d,SC:U),Z,0,0)({28}S:S$powctrl0$0$0({1}SC:U),Z,0,0)({29}S:S$powctrl1$0$0({1}SC:U),Z,0,0)({30}S:S$ref$0$0({1}SC:U),Z,0,0)]
T:Fmain$axradio_status_receive_phy[({0}S:S$rssi$0$0({2}SI:S),Z,0,0)({2}S:S$offset$0$0({4}SL:S),Z,0,0)({6}S:S$timeoffset$0$0({2}SI:S),Z,0,0)({8}S:S$period$0$0({2}SI:S),Z,0,0)]
T:Fmain$axradio_status[({0}S:S$status$0$0({1}SC:U),Z,0,0)({1}S:S$error$0$0({1}SC:U),Z,0,0)({2}S:S$time$0$0({4}SL:U),Z,0,0)({6}S:S$u$0$0({26}ST__00000000:S),Z,0,0)]
S:G$random_seed$0$0({2}SI:U),E,0,0
S:G$wtimer0_clksrc$0$0({1}SC:U),E,0,0
S:G$wtimer1_clksrc$0$0({1}SC:U),E,0,0
S:G$wtimer1_prescaler$0$0({1}SC:U),E,0,0
S:G$init_synth_only_once$0$0({1}SC:U),E,0,0
S:G$_start__stack$0$0({0}DA0d,SC:U),E,0,0
S:G$pkt_counter$0$0({2}SI:U),E,0,0
S:G$coldstart$0$0({1}SC:U),E,0,0
S:Lmain.enter_critical$crit$1$29({1}SC:U),E,0,0
S:Lmain.exit_critical$crit$1$30({1}SC:U),E,0,0
S:Lmain.pwrmgmt_irq$pc$1$364({1}SC:U),R,0,0,[r7]
S:Lmain.wakeup_callback$desc$1$398({2}DX,STwtimer_desc:S),R,0,0,[]
S:Lmain._sdcc_external_startup$c$2$402({1}SC:U),R,0,0,[]
S:Lmain._sdcc_external_startup$p$2$402({1}SC:U),R,0,0,[]
S:Lmain._sdcc_external_startup$c$2$403({1}SC:U),R,0,0,[]
S:Lmain._sdcc_external_startup$p$2$403({1}SC:U),R,0,0,[]
S:Lmain.si_write_reg$data$1$404({4}SL:U),E,0,0
S:Lmain.si_write_reg$address$1$404({1}SC:U),R,0,0,[r7]
S:Lmain.si_write_reg$i$1$405({2}SI:S),R,0,0,[r6,r7]
S:Lmain.si_write_reg$sdata$1$405({4}SL:U),R,0,0,[]
S:Lmain.si_write_reg$mask$1$405({4}SL:U),R,0,0,[]
S:Lmain.synth_init$freq$1$422({4}SL:U),R,0,0,[]
S:Lmain.synth_init$phase$1$422({2}SI:U),R,0,0,[]
S:Lmain.synth_init$pllref$1$422({1}SC:U),R,0,0,[]
S:Lmain.synth_init$ndiv$1$422({4}SL:U),R,0,0,[]
S:Lmain.synth_init$rdiv$1$422({4}SL:U),R,0,0,[]
S:Lmain.main$saved_button_state$1$436({1}SC:U),E,0,0
S:Lmain.main$i$1$436({1}SC:U),R,0,0,[r7]
S:Lmain.main$x$3$448({1}SC:U),R,0,0,[r6]
S:Lmain.main$flg$3$453({1}SC:U),R,0,0,[r6]
S:Lmain.main$flg$3$455({1}SC:U),R,0,0,[r7]
S:Lmain._sdcc_external_startup$sloc0$1$0({1}SB0$0:S),H,0,0
S:G$ADCCH0VAL0$0$0({1}SC:U),F,0,0
S:G$ADCCH0VAL1$0$0({1}SC:U),F,0,0
S:G$ADCCH0VAL$0$0({2}SI:U),F,0,0
S:G$ADCCH1VAL0$0$0({1}SC:U),F,0,0
S:G$ADCCH1VAL1$0$0({1}SC:U),F,0,0
S:G$ADCCH1VAL$0$0({2}SI:U),F,0,0
S:G$ADCCH2VAL0$0$0({1}SC:U),F,0,0
S:G$ADCCH2VAL1$0$0({1}SC:U),F,0,0
S:G$ADCCH2VAL$0$0({2}SI:U),F,0,0
S:G$ADCCH3VAL0$0$0({1}SC:U),F,0,0
S:G$ADCCH3VAL1$0$0({1}SC:U),F,0,0
S:G$ADCCH3VAL$0$0({2}SI:U),F,0,0
S:G$ADCTUNE0$0$0({1}SC:U),F,0,0
S:G$ADCTUNE1$0$0({1}SC:U),F,0,0
S:G$ADCTUNE2$0$0({1}SC:U),F,0,0
S:G$DMA0ADDR0$0$0({1}SC:U),F,0,0
S:G$DMA0ADDR1$0$0({1}SC:U),F,0,0
S:G$DMA0ADDR$0$0({2}SI:U),F,0,0
S:G$DMA0CONFIG$0$0({1}SC:U),F,0,0
S:G$DMA1ADDR0$0$0({1}SC:U),F,0,0
S:G$DMA1ADDR1$0$0({1}SC:U),F,0,0
S:G$DMA1ADDR$0$0({2}SI:U),F,0,0
S:G$DMA1CONFIG$0$0({1}SC:U),F,0,0
S:G$FRCOSCCONFIG$0$0({1}SC:U),F,0,0
S:G$FRCOSCCTRL$0$0({1}SC:U),F,0,0
S:G$FRCOSCFREQ0$0$0({1}SC:U),F,0,0
S:G$FRCOSCFREQ1$0$0({1}SC:U),F,0,0
S:G$FRCOSCFREQ$0$0({2}SI:U),F,0,0
S:G$FRCOSCKFILT0$0$0({1}SC:U),F,0,0
S:G$FRCOSCKFILT1$0$0({1}SC:U),F,0,0
S:G$FRCOSCKFILT$0$0({2}SI:U),F,0,0
S:G$FRCOSCPER0$0$0({1}SC:U),F,0,0
S:G$FRCOSCPER1$0$0({1}SC:U),F,0,0
S:G$FRCOSCPER$0$0({2}SI:U),F,0,0
S:G$FRCOSCREF0$0$0({1}SC:U),F,0,0
S:G$FRCOSCREF1$0$0({1}SC:U),F,0,0
S:G$FRCOSCREF$0$0({2}SI:U),F,0,0
S:G$ANALOGA$0$0({1}SC:U),F,0,0
S:G$GPIOENABLE$0$0({1}SC:U),F,0,0
S:G$EXTIRQ$0$0({1}SC:U),F,0,0
S:G$INTCHGA$0$0({1}SC:U),F,0,0
S:G$INTCHGB$0$0({1}SC:U),F,0,0
S:G$INTCHGC$0$0({1}SC:U),F,0,0
S:G$PALTA$0$0({1}SC:U),F,0,0
S:G$PALTB$0$0({1}SC:U),F,0,0
S:G$PALTC$0$0({1}SC:U),F,0,0
S:G$PALTRADIO$0$0({1}SC:U),F,0,0
S:G$PINCHGA$0$0({1}SC:U),F,0,0
S:G$PINCHGB$0$0({1}SC:U),F,0,0
S:G$PINCHGC$0$0({1}SC:U),F,0,0
S:G$PINSEL$0$0({1}SC:U),F,0,0
S:G$LPOSCCONFIG$0$0({1}SC:U),F,0,0
S:G$LPOSCFREQ0$0$0({1}SC:U),F,0,0
S:G$LPOSCFREQ1$0$0({1}SC:U),F,0,0
S:G$LPOSCFREQ$0$0({2}SI:U),F,0,0
S:G$LPOSCKFILT0$0$0({1}SC:U),F,0,0
S:G$LPOSCKFILT1$0$0({1}SC:U),F,0,0
S:G$LPOSCKFILT$0$0({2}SI:U),F,0,0
S:G$LPOSCPER0$0$0({1}SC:U),F,0,0
S:G$LPOSCPER1$0$0({1}SC:U),F,0,0
S:G$LPOSCPER$0$0({2}SI:U),F,0,0
S:G$LPOSCREF0$0$0({1}SC:U),F,0,0
S:G$LPOSCREF1$0$0({1}SC:U),F,0,0
S:G$LPOSCREF$0$0({2}SI:U),F,0,0
S:G$LPXOSCGM$0$0({1}SC:U),F,0,0
S:G$MISCCTRL$0$0({1}SC:U),F,0,0
S:G$OSCCALIB$0$0({1}SC:U),F,0,0
S:G$OSCFORCERUN$0$0({1}SC:U),F,0,0
S:G$OSCREADY$0$0({1}SC:U),F,0,0
S:G$OSCRUN$0$0({1}SC:U),F,0,0
S:G$RADIOFDATAADDR0$0$0({1}SC:U),F,0,0
S:G$RADIOFDATAADDR1$0$0({1}SC:U),F,0,0
S:G$RADIOFDATAADDR$0$0({2}SI:U),F,0,0
S:G$RADIOFSTATADDR0$0$0({1}SC:U),F,0,0
S:G$RADIOFSTATADDR1$0$0({1}SC:U),F,0,0
S:G$RADIOFSTATADDR$0$0({2}SI:U),F,0,0
S:G$RADIOMUX$0$0({1}SC:U),F,0,0
S:G$SCRATCH0$0$0({1}SC:U),F,0,0
S:G$SCRATCH1$0$0({1}SC:U),F,0,0
S:G$SCRATCH2$0$0({1}SC:U),F,0,0
S:G$SCRATCH3$0$0({1}SC:U),F,0,0
S:G$SILICONREV$0$0({1}SC:U),F,0,0
S:G$XTALAMPL$0$0({1}SC:U),F,0,0
S:G$XTALOSC$0$0({1}SC:U),F,0,0
S:G$XTALREADY$0$0({1}SC:U),F,0,0
S:Fmain$flash_deviceid$0$0({6}DA6d,SC:U),F,0,0
S:Fmain$flash_calsector$0$0({31}STcalsector:S),F,0,0
S:G$radio_lcd_display$0$0({0}DA0d,SC:U),F,0,0
S:G$radio_not_found_lcd_display$0$0({0}DA0d,SC:U),F,0,0
S:G$wakeup_desc$0$0({8}STwtimer_desc:S),F,0,0
S:Lmain.transmit_packet$demo_packet_$1$366({72}DA72d,SC:U),F,0,0
S:G$ACC$0$0({1}SC:U),I,0,0
S:G$B$0$0({1}SC:U),I,0,0
S:G$DPH$0$0({1}SC:U),I,0,0
S:G$DPH1$0$0({1}SC:U),I,0,0
S:G$DPL$0$0({1}SC:U),I,0,0
S:G$DPL1$0$0({1}SC:U),I,0,0
S:G$DPTR0$0$0({2}SI:U),I,0,0
S:G$DPTR1$0$0({2}SI:U),I,0,0
S:G$DPS$0$0({1}SC:U),I,0,0
S:G$E2IE$0$0({1}SC:U),I,0,0
S:G$E2IP$0$0({1}SC:U),I,0,0
S:G$EIE$0$0({1}SC:U),I,0,0
S:G$EIP$0$0({1}SC:U),I,0,0
S:G$IE$0$0({1}SC:U),I,0,0
S:G$IP$0$0({1}SC:U),I,0,0
S:G$PCON$0$0({1}SC:U),I,0,0
S:G$PSW$0$0({1}SC:U),I,0,0
S:G$SP$0$0({1}SC:U),I,0,0
S:G$XPAGE$0$0({1}SC:U),I,0,0
S:G$_XPAGE$0$0({1}SC:U),I,0,0
S:G$ADCCH0CONFIG$0$0({1}SC:U),I,0,0
S:G$ADCCH1CONFIG$0$0({1}SC:U),I,0,0
S:G$ADCCH2CONFIG$0$0({1}SC:U),I,0,0
S:G$ADCCH3CONFIG$0$0({1}SC:U),I,0,0
S:G$ADCCLKSRC$0$0({1}SC:U),I,0,0
S:G$ADCCONV$0$0({1}SC:U),I,0,0
S:G$ANALOGCOMP$0$0({1}SC:U),I,0,0
S:G$CLKCON$0$0({1}SC:U),I,0,0
S:G$CLKSTAT$0$0({1}SC:U),I,0,0
S:G$CODECONFIG$0$0({1}SC:U),I,0,0
S:G$DBGLNKBUF$0$0({1}SC:U),I,0,0
S:G$DBGLNKSTAT$0$0({1}SC:U),I,0,0
S:G$DIRA$0$0({1}SC:U),I,0,0
S:G$DIRB$0$0({1}SC:U),I,0,0
S:G$DIRC$0$0({1}SC:U),I,0,0
S:G$DIRR$0$0({1}SC:U),I,0,0
S:G$PINA$0$0({1}SC:U),I,0,0
S:G$PINB$0$0({1}SC:U),I,0,0
S:G$PINC$0$0({1}SC:U),I,0,0
S:G$PINR$0$0({1}SC:U),I,0,0
S:G$PORTA$0$0({1}SC:U),I,0,0
S:G$PORTB$0$0({1}SC:U),I,0,0
S:G$PORTC$0$0({1}SC:U),I,0,0
S:G$PORTR$0$0({1}SC:U),I,0,0
S:G$IC0CAPT0$0$0({1}SC:U),I,0,0
S:G$IC0CAPT1$0$0({1}SC:U),I,0,0
S:G$IC0CAPT$0$0({2}SI:U),I,0,0
S:G$IC0MODE$0$0({1}SC:U),I,0,0
S:G$IC0STATUS$0$0({1}SC:U),I,0,0
S:G$IC1CAPT0$0$0({1}SC:U),I,0,0
S:G$IC1CAPT1$0$0({1}SC:U),I,0,0
S:G$IC1CAPT$0$0({2}SI:U),I,0,0
S:G$IC1MODE$0$0({1}SC:U),I,0,0
S:G$IC1STATUS$0$0({1}SC:U),I,0,0
S:G$NVADDR0$0$0({1}SC:U),I,0,0
S:G$NVADDR1$0$0({1}SC:U),I,0,0
S:G$NVADDR$0$0({2}SI:U),I,0,0
S:G$NVDATA0$0$0({1}SC:U),I,0,0
S:G$NVDATA1$0$0({1}SC:U),I,0,0
S:G$NVDATA$0$0({2}SI:U),I,0,0
S:G$NVKEY$0$0({1}SC:U),I,0,0
S:G$NVSTATUS$0$0({1}SC:U),I,0,0
S:G$OC0COMP0$0$0({1}SC:U),I,0,0
S:G$OC0COMP1$0$0({1}SC:U),I,0,0
S:G$OC0COMP$0$0({2}SI:U),I,0,0
S:G$OC0MODE$0$0({1}SC:U),I,0,0
S:G$OC0PIN$0$0({1}SC:U),I,0,0
S:G$OC0STATUS$0$0({1}SC:U),I,0,0
S:G$OC1COMP0$0$0({1}SC:U),I,0,0
S:G$OC1COMP1$0$0({1}SC:U),I,0,0
S:G$OC1COMP$0$0({2}SI:U),I,0,0
S:G$OC1MODE$0$0({1}SC:U),I,0,0
S:G$OC1PIN$0$0({1}SC:U),I,0,0
S:G$OC1STATUS$0$0({1}SC:U),I,0,0
S:G$RADIOACC$0$0({1}SC:U),I,0,0
S:G$RADIOADDR0$0$0({1}SC:U),I,0,0
S:G$RADIOADDR1$0$0({1}SC:U),I,0,0
S:G$RADIOADDR$0$0({2}SI:U),I,0,0
S:G$RADIODATA0$0$0({1}SC:U),I,0,0
S:G$RADIODATA1$0$0({1}SC:U),I,0,0
S:G$RADIODATA2$0$0({1}SC:U),I,0,0
S:G$RADIODATA3$0$0({1}SC:U),I,0,0
S:G$RADIODATA$0$0({4}SL:U),I,0,0
S:G$RADIOSTAT0$0$0({1}SC:U),I,0,0
S:G$RADIOSTAT1$0$0({1}SC:U),I,0,0
S:G$RADIOSTAT$0$0({2}SI:U),I,0,0
S:G$SPCLKSRC$0$0({1}SC:U),I,0,0
S:G$SPMODE$0$0({1}SC:U),I,0,0
S:G$SPSHREG$0$0({1}SC:U),I,0,0
S:G$SPSTATUS$0$0({1}SC:U),I,0,0
S:G$T0CLKSRC$0$0({1}SC:U),I,0,0
S:G$T0CNT0$0$0({1}SC:U),I,0,0
S:G$T0CNT1$0$0({1}SC:U),I,0,0
S:G$T0CNT$0$0({2}SI:U),I,0,0
S:G$T0MODE$0$0({1}SC:U),I,0,0
S:G$T0PERIOD0$0$0({1}SC:U),I,0,0
S:G$T0PERIOD1$0$0({1}SC:U),I,0,0
S:G$T0PERIOD$0$0({2}SI:U),I,0,0
S:G$T0STATUS$0$0({1}SC:U),I,0,0
S:G$T1CLKSRC$0$0({1}SC:U),I,0,0
S:G$T1CNT0$0$0({1}SC:U),I,0,0
S:G$T1CNT1$0$0({1}SC:U),I,0,0
S:G$T1CNT$0$0({2}SI:U),I,0,0
S:G$T1MODE$0$0({1}SC:U),I,0,0
S:G$T1PERIOD0$0$0({1}SC:U),I,0,0
S:G$T1PERIOD1$0$0({1}SC:U),I,0,0
S:G$T1PERIOD$0$0({2}SI:U),I,0,0
S:G$T1STATUS$0$0({1}SC:U),I,0,0
S:G$T2CLKSRC$0$0({1}SC:U),I,0,0
S:G$T2CNT0$0$0({1}SC:U),I,0,0
S:G$T2CNT1$0$0({1}SC:U),I,0,0
S:G$T2CNT$0$0({2}SI:U),I,0,0
S:G$T2MODE$0$0({1}SC:U),I,0,0
S:G$T2PERIOD0$0$0({1}SC:U),I,0,0
S:G$T2PERIOD1$0$0({1}SC:U),I,0,0
S:G$T2PERIOD$0$0({2}SI:U),I,0,0
S:G$T2STATUS$0$0({1}SC:U),I,0,0
S:G$U0CTRL$0$0({1}SC:U),I,0,0
S:G$U0MODE$0$0({1}SC:U),I,0,0
S:G$U0SHREG$0$0({1}SC:U),I,0,0
S:G$U0STATUS$0$0({1}SC:U),I,0,0
S:G$U1CTRL$0$0({1}SC:U),I,0,0
S:G$U1MODE$0$0({1}SC:U),I,0,0
S:G$U1SHREG$0$0({1}SC:U),I,0,0
S:G$U1STATUS$0$0({1}SC:U),I,0,0
S:G$WDTCFG$0$0({1}SC:U),I,0,0
S:G$WDTRESET$0$0({1}SC:U),I,0,0
S:G$WTCFGA$0$0({1}SC:U),I,0,0
S:G$WTCFGB$0$0({1}SC:U),I,0,0
S:G$WTCNTA0$0$0({1}SC:U),I,0,0
S:G$WTCNTA1$0$0({1}SC:U),I,0,0
S:G$WTCNTA$0$0({2}SI:U),I,0,0
S:G$WTCNTB0$0$0({1}SC:U),I,0,0
S:G$WTCNTB1$0$0({1}SC:U),I,0,0
S:G$WTCNTB$0$0({2}SI:U),I,0,0
S:G$WTCNTR1$0$0({1}SC:U),I,0,0
S:G$WTEVTA0$0$0({1}SC:U),I,0,0
S:G$WTEVTA1$0$0({1}SC:U),I,0,0
S:G$WTEVTA$0$0({2}SI:U),I,0,0
S:G$WTEVTB0$0$0({1}SC:U),I,0,0
S:G$WTEVTB1$0$0({1}SC:U),I,0,0
S:G$WTEVTB$0$0({2}SI:U),I,0,0
S:G$WTEVTC0$0$0({1}SC:U),I,0,0
S:G$WTEVTC1$0$0({1}SC:U),I,0,0
S:G$WTEVTC$0$0({2}SI:U),I,0,0
S:G$WTEVTD0$0$0({1}SC:U),I,0,0
S:G$WTEVTD1$0$0({1}SC:U),I,0,0
S:G$WTEVTD$0$0({2}SI:U),I,0,0
S:G$WTIRQEN$0$0({1}SC:U),I,0,0
S:G$WTSTAT$0$0({1}SC:U),I,0,0
S:G$ACC_0$0$0({1}SX:U),J,0,0
S:G$ACC_1$0$0({1}SX:U),J,0,0
S:G$ACC_2$0$0({1}SX:U),J,0,0
S:G$ACC_3$0$0({1}SX:U),J,0,0
S:G$ACC_4$0$0({1}SX:U),J,0,0
S:G$ACC_5$0$0({1}SX:U),J,0,0
S:G$ACC_6$0$0({1}SX:U),J,0,0
S:G$ACC_7$0$0({1}SX:U),J,0,0
S:G$B_0$0$0({1}SX:U),J,0,0
S:G$B_1$0$0({1}SX:U),J,0,0
S:G$B_2$0$0({1}SX:U),J,0,0
S:G$B_3$0$0({1}SX:U),J,0,0
S:G$B_4$0$0({1}SX:U),J,0,0
S:G$B_5$0$0({1}SX:U),J,0,0
S:G$B_6$0$0({1}SX:U),J,0,0
S:G$B_7$0$0({1}SX:U),J,0,0
S:G$E2IE_0$0$0({1}SX:U),J,0,0
S:G$E2IE_1$0$0({1}SX:U),J,0,0
S:G$E2IE_2$0$0({1}SX:U),J,0,0
S:G$E2IE_3$0$0({1}SX:U),J,0,0
S:G$E2IE_4$0$0({1}SX:U),J,0,0
S:G$E2IE_5$0$0({1}SX:U),J,0,0
S:G$E2IE_6$0$0({1}SX:U),J,0,0
S:G$E2IE_7$0$0({1}SX:U),J,0,0
S:G$E2IP_0$0$0({1}SX:U),J,0,0
S:G$E2IP_1$0$0({1}SX:U),J,0,0
S:G$E2IP_2$0$0({1}SX:U),J,0,0
S:G$E2IP_3$0$0({1}SX:U),J,0,0
S:G$E2IP_4$0$0({1}SX:U),J,0,0
S:G$E2IP_5$0$0({1}SX:U),J,0,0
S:G$E2IP_6$0$0({1}SX:U),J,0,0
S:G$E2IP_7$0$0({1}SX:U),J,0,0
S:G$EIE_0$0$0({1}SX:U),J,0,0
S:G$EIE_1$0$0({1}SX:U),J,0,0
S:G$EIE_2$0$0({1}SX:U),J,0,0
S:G$EIE_3$0$0({1}SX:U),J,0,0
S:G$EIE_4$0$0({1}SX:U),J,0,0
S:G$EIE_5$0$0({1}SX:U),J,0,0
S:G$EIE_6$0$0({1}SX:U),J,0,0
S:G$EIE_7$0$0({1}SX:U),J,0,0
S:G$EIP_0$0$0({1}SX:U),J,0,0
S:G$EIP_1$0$0({1}SX:U),J,0,0
S:G$EIP_2$0$0({1}SX:U),J,0,0
S:G$EIP_3$0$0({1}SX:U),J,0,0
S:G$EIP_4$0$0({1}SX:U),J,0,0
S:G$EIP_5$0$0({1}SX:U),J,0,0
S:G$EIP_6$0$0({1}SX:U),J,0,0
S:G$EIP_7$0$0({1}SX:U),J,0,0
S:G$IE_0$0$0({1}SX:U),J,0,0
S:G$IE_1$0$0({1}SX:U),J,0,0
S:G$IE_2$0$0({1}SX:U),J,0,0
S:G$IE_3$0$0({1}SX:U),J,0,0
S:G$IE_4$0$0({1}SX:U),J,0,0
S:G$IE_5$0$0({1}SX:U),J,0,0
S:G$IE_6$0$0({1}SX:U),J,0,0
S:G$IE_7$0$0({1}SX:U),J,0,0
S:G$EA$0$0({1}SX:U),J,0,0
S:G$IP_0$0$0({1}SX:U),J,0,0
S:G$IP_1$0$0({1}SX:U),J,0,0
S:G$IP_2$0$0({1}SX:U),J,0,0
S:G$IP_3$0$0({1}SX:U),J,0,0
S:G$IP_4$0$0({1}SX:U),J,0,0
S:G$IP_5$0$0({1}SX:U),J,0,0
S:G$IP_6$0$0({1}SX:U),J,0,0
S:G$IP_7$0$0({1}SX:U),J,0,0
S:G$P$0$0({1}SX:U),J,0,0
S:G$F1$0$0({1}SX:U),J,0,0
S:G$OV$0$0({1}SX:U),J,0,0
S:G$RS0$0$0({1}SX:U),J,0,0
S:G$RS1$0$0({1}SX:U),J,0,0
S:G$F0$0$0({1}SX:U),J,0,0
S:G$AC$0$0({1}SX:U),J,0,0
S:G$CY$0$0({1}SX:U),J,0,0
S:G$PINA_0$0$0({1}SX:U),J,0,0
S:G$PINA_1$0$0({1}SX:U),J,0,0
S:G$PINA_2$0$0({1}SX:U),J,0,0
S:G$PINA_3$0$0({1}SX:U),J,0,0
S:G$PINA_4$0$0({1}SX:U),J,0,0
S:G$PINA_5$0$0({1}SX:U),J,0,0
S:G$PINA_6$0$0({1}SX:U),J,0,0
S:G$PINA_7$0$0({1}SX:U),J,0,0
S:G$PINB_0$0$0({1}SX:U),J,0,0
S:G$PINB_1$0$0({1}SX:U),J,0,0
S:G$PINB_2$0$0({1}SX:U),J,0,0
S:G$PINB_3$0$0({1}SX:U),J,0,0
S:G$PINB_4$0$0({1}SX:U),J,0,0
S:G$PINB_5$0$0({1}SX:U),J,0,0
S:G$PINB_6$0$0({1}SX:U),J,0,0
S:G$PINB_7$0$0({1}SX:U),J,0,0
S:G$PINC_0$0$0({1}SX:U),J,0,0
S:G$PINC_1$0$0({1}SX:U),J,0,0
S:G$PINC_2$0$0({1}SX:U),J,0,0
S:G$PINC_3$0$0({1}SX:U),J,0,0
S:G$PINC_4$0$0({1}SX:U),J,0,0
S:G$PINC_5$0$0({1}SX:U),J,0,0
S:G$PINC_6$0$0({1}SX:U),J,0,0
S:G$PINC_7$0$0({1}SX:U),J,0,0
S:G$PORTA_0$0$0({1}SX:U),J,0,0
S:G$PORTA_1$0$0({1}SX:U),J,0,0
S:G$PORTA_2$0$0({1}SX:U),J,0,0
S:G$PORTA_3$0$0({1}SX:U),J,0,0
S:G$PORTA_4$0$0({1}SX:U),J,0,0
S:G$PORTA_5$0$0({1}SX:U),J,0,0
S:G$PORTA_6$0$0({1}SX:U),J,0,0
S:G$PORTA_7$0$0({1}SX:U),J,0,0
S:G$PORTB_0$0$0({1}SX:U),J,0,0
S:G$PORTB_1$0$0({1}SX:U),J,0,0
S:G$PORTB_2$0$0({1}SX:U),J,0,0
S:G$PORTB_3$0$0({1}SX:U),J,0,0
S:G$PORTB_4$0$0({1}SX:U),J,0,0
S:G$PORTB_5$0$0({1}SX:U),J,0,0
S:G$PORTB_6$0$0({1}SX:U),J,0,0
S:G$PORTB_7$0$0({1}SX:U),J,0,0
S:G$PORTC_0$0$0({1}SX:U),J,0,0
S:G$PORTC_1$0$0({1}SX:U),J,0,0
S:G$PORTC_2$0$0({1}SX:U),J,0,0
S:G$PORTC_3$0$0({1}SX:U),J,0,0
S:G$PORTC_4$0$0({1}SX:U),J,0,0
S:G$PORTC_5$0$0({1}SX:U),J,0,0
S:G$PORTC_6$0$0({1}SX:U),J,0,0
S:G$PORTC_7$0$0({1}SX:U),J,0,0
S:G$delay$0$0({2}DF,SV:S),C,0,0
S:G$random$0$0({2}DF,SI:U),C,0,0
S:G$signextend12$0$0({2}DF,SL:S),C,0,0
S:G$signextend16$0$0({2}DF,SL:S),C,0,0
S:G$signextend20$0$0({2}DF,SL:S),C,0,0
S:G$signextend24$0$0({2}DF,SL:S),C,0,0
S:G$hweight8$0$0({2}DF,SC:U),C,0,0
S:G$hweight16$0$0({2}DF,SC:U),C,0,0
S:G$hweight32$0$0({2}DF,SC:U),C,0,0
S:G$signedlimit16$0$0({2}DF,SI:S),C,0,0
S:G$checksignedlimit16$0$0({2}DF,SC:U),C,0,0
S:G$signedlimit32$0$0({2}DF,SL:S),C,0,0
S:G$checksignedlimit32$0$0({2}DF,SC:U),C,0,0
S:G$gray_encode8$0$0({2}DF,SC:U),C,0,0
S:G$gray_decode8$0$0({2}DF,SC:U),C,0,0
S:G$rev8$0$0({2}DF,SC:U),C,0,0
S:G$fmemset$0$0({2}DF,SV:S),C,0,0
S:G$fmemcpy$0$0({2}DF,SV:S),C,0,0
S:G$get_startcause$0$0({2}DF,SC:U),C,0,0
S:G$wtimer_standby$0$0({2}DF,SV:S),C,0,0
S:G$enter_standby$0$0({2}DF,SV:S),C,0,0
S:G$enter_deepsleep$0$0({2}DF,SV:S),C,0,0
S:G$enter_sleep$0$0({2}DF,SV:S),C,0,0
S:G$enter_sleep_cont$0$0({2}DF,SV:S),C,0,0
S:G$reset_cpu$0$0({2}DF,SV:S),C,0,0
S:G$enter_critical$0$0({2}DF,SC:U),C,0,0
S:G$exit_critical$0$0({2}DF,SV:S),C,0,0
S:G$reenter_critical$0$0({2}DF,SV:S),C,0,0
S:G$__enable_irq$0$0({2}DF,SV:S),C,0,0
S:G$__disable_irq$0$0({2}DF,SV:S),C,0,0
S:G$axradio_init$0$0({2}DF,SC:U),C,0,0
S:G$axradio_cansleep$0$0({2}DF,SC:U),C,0,0
S:G$axradio_set_mode$0$0({2}DF,SC:U),C,0,0
S:G$axradio_get_mode$0$0({2}DF,SC:U),C,0,0
S:G$axradio_set_channel$0$0({2}DF,SC:U),C,0,0
S:G$axradio_get_channel$0$0({2}DF,SC:U),C,0,0
S:G$axradio_get_pllrange$0$0({2}DF,SI:U),C,0,0
S:G$axradio_get_pllvcoi$0$0({2}DF,SC:U),C,0,0
S:G$axradio_set_local_address$0$0({2}DF,SV:S),C,0,0
S:G$axradio_get_local_address$0$0({2}DF,SV:S),C,0,0
S:G$axradio_set_default_remote_address$0$0({2}DF,SV:S),C,0,0
S:G$axradio_get_default_remote_address$0$0({2}DF,SV:S),C,0,0
S:G$axradio_transmit$0$0({2}DF,SC:U),C,0,0
S:G$axradio_set_freqoffset$0$0({2}DF,SC:U),C,0,0
S:G$axradio_get_freqoffset$0$0({2}DF,SL:S),C,0,0
S:G$axradio_conv_freq_tohz$0$0({2}DF,SL:S),C,0,0
S:G$axradio_conv_freq_fromhz$0$0({2}DF,SL:S),C,0,0
S:G$axradio_conv_timeinterval_totimer0$0$0({2}DF,SL:S),C,0,0
S:G$axradio_conv_time_totimer0$0$0({2}DF,SL:U),C,0,0
S:G$axradio_agc_freeze$0$0({2}DF,SC:U),C,0,0
S:G$axradio_agc_thaw$0$0({2}DF,SC:U),C,0,0
S:G$axradio_calibrate_lposc$0$0({2}DF,SV:S),C,0,0
S:G$axradio_check_fourfsk_modulation$0$0({2}DF,SC:U),C,0,0
S:G$axradio_get_transmitter_pa_type$0$0({2}DF,SC:U),C,0,0
S:G$axradio_setup_pincfg1$0$0({2}DF,SV:S),C,0,0
S:G$axradio_setup_pincfg2$0$0({2}DF,SV:S),C,0,0
S:G$axradio_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$axradio_dbgpkt_enableIRQ$0$0({2}DF,SV:S),C,0,0
S:G$axradio_isr$0$0({2}DF,SV:S),C,0,0
S:G$radio_read16$0$0({2}DF,SI:U),C,0,0
S:G$radio_read24$0$0({2}DF,SL:U),C,0,0
S:G$radio_read32$0$0({2}DF,SL:U),C,0,0
S:G$radio_write16$0$0({2}DF,SV:S),C,0,0
S:G$radio_write24$0$0({2}DF,SV:S),C,0,0
S:G$radio_write32$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_comminit$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_reset$0$0({2}DF,SC:U),C,0,0
S:G$ax5031_rclk_enable$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_rclk_disable$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_readfifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5031_writefifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_comminit$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_reset$0$0({2}DF,SC:U),C,0,0
S:G$ax5042_rclk_enable$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_rclk_disable$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_readfifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5042_writefifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_comminit$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_reset$0$0({2}DF,SC:U),C,0,0
S:G$ax5043_enter_deepsleep$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_wakeup_deepsleep$0$0({2}DF,SC:U),C,0,0
S:G$ax5043_rclk_enable$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_rclk_disable$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_rclk_wait_stable$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_readfifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_writefifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_set_pwramp_pin$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_get_pwramp_pin$0$0({2}DF,SC:U),C,0,0
S:G$ax5043_set_antsel_pin$0$0({2}DF,SV:S),C,0,0
S:G$ax5043_get_antsel_pin$0$0({2}DF,SC:U),C,0,0
S:G$ax5044_45_comminit$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_reset$0$0({2}DF,SC:U),C,0,0
S:G$ax5044_45_enter_deepsleep$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_wakeup_deepsleep$0$0({2}DF,SC:U),C,0,0
S:G$ax5044_45_rclk_enable$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_rclk_disable$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_rclk_wait_stable$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_readfifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_writefifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_set_pwramp_pin$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_get_pwramp_pin$0$0({2}DF,SC:U),C,0,0
S:G$ax5044_45_set_antsel_pin$0$0({2}DF,SV:S),C,0,0
S:G$ax5044_45_get_antsel_pin$0$0({2}DF,SC:U),C,0,0
S:G$ax5051_comminit$0$0({2}DF,SV:S),C,0,0
S:G$ax5051_commsleepexit$0$0({2}DF,SV:S),C,0,0
S:G$ax5051_reset$0$0({2}DF,SC:U),C,0,0
S:G$ax5051_rclk_enable$0$0({2}DF,SV:S),C,0,0
S:G$ax5051_rclk_disable$0$0({2}DF,SV:S),C,0,0
S:G$ax5051_readfifo$0$0({2}DF,SV:S),C,0,0
S:G$ax5051_writefifo$0$0({2}DF,SV:S),C,0,0
S:G$flash_unlock$0$0({2}DF,SV:S),C,0,0
S:G$flash_lock$0$0({2}DF,SV:S),C,0,0
S:G$flash_wait$0$0({2}DF,SC:S),C,0,0
S:G$flash_pageerase$0$0({2}DF,SC:S),C,0,0
S:G$flash_write$0$0({2}DF,SC:S),C,0,0
S:G$flash_read$0$0({2}DF,SI:U),C,0,0
S:G$flash_apply_calibration$0$0({2}DF,SC:U),C,0,0
S:G$wtimer0_setconfig$0$0({2}DF,SV:S),C,0,0
S:G$wtimer1_setconfig$0$0({2}DF,SV:S),C,0,0
S:G$wtimer_init$0$0({2}DF,SV:S),C,0,0
S:G$wtimer_init_deepsleep$0$0({2}DF,SV:S),C,0,0
S:G$wtimer_idle$0$0({2}DF,SC:U),C,0,0
S:G$wtimer_runcallbacks$0$0({2}DF,SC:U),C,0,0
S:G$wtimer0_curtime$0$0({2}DF,SL:U),C,0,0
S:G$wtimer1_curtime$0$0({2}DF,SL:U),C,0,0
S:G$wtimer0_addabsolute$0$0({2}DF,SV:S),C,0,0
S:G$wtimer1_addabsolute$0$0({2}DF,SV:S),C,0,0
S:G$wtimer0_addrelative$0$0({2}DF,SV:S),C,0,0
S:G$wtimer1_addrelative$0$0({2}DF,SV:S),C,0,0
S:G$wtimer_remove$0$0({2}DF,SC:U),C,0,0
S:G$wtimer0_remove$0$0({2}DF,SC:U),C,0,0
S:G$wtimer1_remove$0$0({2}DF,SC:U),C,0,0
S:G$wtimer_add_callback$0$0({2}DF,SV:S),C,0,0
S:G$wtimer_remove_callback$0$0({2}DF,SC:U),C,0,0
S:G$wtimer_cansleep$0$0({2}DF,SC:U),C,0,0
S:G$wtimer_irq$0$0({2}DF,SV:S),C,0,0
S:G$turn_off_xosc$0$0({2}DF,SV:S),C,0,0
S:G$turn_off_lpxosc$0$0({2}DF,SV:S),C,0,0
S:G$wtimer0_correctinterval$0$0({2}DF,SL:U),C,0,0
S:G$wtimer1_correctinterval$0$0({2}DF,SL:U),C,0,0
S:G$setup_xosc$0$0({2}DF,SV:S),C,0,0
S:G$setup_lpxosc$0$0({2}DF,SV:S),C,0,0
S:G$setup_osc_calibration$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_irq$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_poll$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_txbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$lcd2_txfreelinear$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_txidle$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_txfree$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_txbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_txpokecmd$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_txpoke$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_txpokehex$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_txadvance$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_init$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_portinit$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_wait_txdone$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_wait_txfree$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_tx$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_txcmdshort$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_txcmdlong$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_setpos$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_cleardisplay$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_clear$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_writestr$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_writenum16$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_writehex16$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_writenum32$0$0({2}DF,SC:U),C,0,0
S:G$lcd2_writehex32$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_irq$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_poll$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_txbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$dbglink_txfreelinear$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_txidle$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_txfree$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_rxbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$dbglink_rxcountlinear$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_rxcount$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_txbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_rxbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_rxpeek$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_txpoke$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_txpokehex$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_rxadvance$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_txadvance$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_init$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_wait_txdone$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_wait_txfree$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_wait_rxcount$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_rx$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_tx$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_writestr$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_writenum16$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_writehex16$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_writenum32$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_writehex32$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_writehexu16$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_writehexu32$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_writeu16$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_writeu32$0$0({2}DF,SV:S),C,0,0
S:G$crc_ccitt_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_ccitt_msb_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_ccitt$0$0({2}DF,SI:U),C,0,0
S:G$crc_ccitt_msb$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16_msb_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16_msb$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16dnp_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16dnp_msb_byte$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16dnp$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc16dnp_msb$0$0({2}DF,SI:U),C,0,0
S:G$crc_crc32_byte$0$0({2}DF,SL:U),C,0,0
S:G$crc_crc32_msb_byte$0$0({2}DF,SL:U),C,0,0
S:G$crc_crc32$0$0({2}DF,SL:U),C,0,0
S:G$crc_crc32_msb$0$0({2}DF,SL:U),C,0,0
S:G$crc_crc8ccitt_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8ccitt_msb_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8ccitt$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8ccitt_msb$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8onewire_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8onewire_msb_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8onewire$0$0({2}DF,SC:U),C,0,0
S:G$crc_crc8onewire_msb$0$0({2}DF,SC:U),C,0,0
S:G$crc8_ccitt_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc8_ccitt$0$0({2}DF,SC:U),C,0,0
S:G$crc8_onewire_byte$0$0({2}DF,SC:U),C,0,0
S:G$crc8_onewire$0$0({2}DF,SC:U),C,0,0
S:G$pn9_advance$0$0({2}DF,SI:U),C,0,0
S:G$pn9_advance_bit$0$0({2}DF,SI:U),C,0,0
S:G$pn9_advance_bits$0$0({2}DF,SI:U),C,0,0
S:G$pn9_advance_byte$0$0({2}DF,SI:U),C,0,0
S:G$pn9_buffer$0$0({2}DF,SI:U),C,0,0
S:G$pn15_advance$0$0({2}DF,SI:U),C,0,0
S:G$pn15_output$0$0({2}DF,SC:U),C,0,0
S:G$uart_timer0_baud$0$0({2}DF,SV:S),C,0,0
S:G$uart_timer1_baud$0$0({2}DF,SV:S),C,0,0
S:G$uart_timer2_baud$0$0({2}DF,SV:S),C,0,0
S:G$adc_measure_temperature$0$0({2}DF,SI:S),C,0,0
S:G$adc_calibrate_gain$0$0({2}DF,SV:S),C,0,0
S:G$adc_calibrate_temp$0$0({2}DF,SV:S),C,0,0
S:G$adc_calibrate$0$0({2}DF,SV:S),C,0,0
S:G$adc_uncalibrate$0$0({2}DF,SV:S),C,0,0
S:G$adc_singleended_offset_x01$0$0({2}DF,SI:U),C,0,0
S:G$adc_singleended_offset_x1$0$0({2}DF,SI:U),C,0,0
S:G$adc_singleended_offset_x10$0$0({2}DF,SI:U),C,0,0
S:G$bch3121_syndrome$0$0({2}DF,SI:U),C,0,0
S:G$bch3121_encode$0$0({2}DF,SL:U),C,0,0
S:G$bch3121_encode_parity$0$0({2}DF,SL:U),C,0,0
S:G$bch3121_decode$0$0({2}DF,SL:U),C,0,0
S:G$bch3121_decode_parity$0$0({2}DF,SL:U),C,0,0
S:G$uart0_irq$0$0({2}DF,SV:S),C,0,0
S:G$uart0_poll$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$uart0_txfreelinear$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txidle$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txbusy$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txfree$0$0({2}DF,SC:U),C,0,0
S:G$uart0_rxbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$uart0_rxcountlinear$0$0({2}DF,SC:U),C,0,0
S:G$uart0_rxcount$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$uart0_rxbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$uart0_rxpeek$0$0({2}DF,SC:U),C,0,0
S:G$uart0_txpoke$0$0({2}DF,SV:S),C,0,0
S:G$uart0_txpokehex$0$0({2}DF,SV:S),C,0,0
S:G$uart0_rxadvance$0$0({2}DF,SV:S),C,0,0
S:G$uart0_txadvance$0$0({2}DF,SV:S),C,0,0
S:G$uart0_init$0$0({2}DF,SV:S),C,0,0
S:G$uart0_stop$0$0({2}DF,SV:S),C,0,0
S:G$uart0_wait_txdone$0$0({2}DF,SV:S),C,0,0
S:G$uart0_wait_txfree$0$0({2}DF,SV:S),C,0,0
S:G$uart0_wait_rxcount$0$0({2}DF,SV:S),C,0,0
S:G$uart0_rx$0$0({2}DF,SC:U),C,0,0
S:G$uart0_tx$0$0({2}DF,SV:S),C,0,0
S:G$uart0_writestr$0$0({2}DF,SV:S),C,0,0
S:G$uart0_writenum16$0$0({2}DF,SC:U),C,0,0
S:G$uart0_writehex16$0$0({2}DF,SC:U),C,0,0
S:G$uart0_writenum32$0$0({2}DF,SC:U),C,0,0
S:G$uart0_writehex32$0$0({2}DF,SC:U),C,0,0
S:G$uart0_writehexu16$0$0({2}DF,SV:S),C,0,0
S:G$uart0_writehexu32$0$0({2}DF,SV:S),C,0,0
S:G$uart0_writeu16$0$0({2}DF,SV:S),C,0,0
S:G$uart0_writeu32$0$0({2}DF,SV:S),C,0,0
S:G$uart1_irq$0$0({2}DF,SV:S),C,0,0
S:G$uart1_poll$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$uart1_txfreelinear$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txidle$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txbusy$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txfree$0$0({2}DF,SC:U),C,0,0
S:G$uart1_rxbufptr$0$0({2}DF,DX,SC:U),C,0,0
S:G$uart1_rxcountlinear$0$0({2}DF,SC:U),C,0,0
S:G$uart1_rxcount$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$uart1_rxbuffersize$0$0({2}DF,SC:U),C,0,0
S:G$uart1_rxpeek$0$0({2}DF,SC:U),C,0,0
S:G$uart1_txpoke$0$0({2}DF,SV:S),C,0,0
S:G$uart1_txpokehex$0$0({2}DF,SV:S),C,0,0
S:G$uart1_rxadvance$0$0({2}DF,SV:S),C,0,0
S:G$uart1_txadvance$0$0({2}DF,SV:S),C,0,0
S:G$uart1_init$0$0({2}DF,SV:S),C,0,0
S:G$uart1_stop$0$0({2}DF,SV:S),C,0,0
S:G$uart1_wait_txdone$0$0({2}DF,SV:S),C,0,0
S:G$uart1_wait_txfree$0$0({2}DF,SV:S),C,0,0
S:G$uart1_wait_rxcount$0$0({2}DF,SV:S),C,0,0
S:G$uart1_rx$0$0({2}DF,SC:U),C,0,0
S:G$uart1_tx$0$0({2}DF,SV:S),C,0,0
S:G$uart1_writestr$0$0({2}DF,SV:S),C,0,0
S:G$uart1_writenum16$0$0({2}DF,SC:U),C,0,0
S:G$uart1_writehex16$0$0({2}DF,SC:U),C,0,0
S:G$uart1_writenum32$0$0({2}DF,SC:U),C,0,0
S:G$uart1_writehex32$0$0({2}DF,SC:U),C,0,0
S:G$uart1_writehexu16$0$0({2}DF,SV:S),C,0,0
S:G$uart1_writehexu32$0$0({2}DF,SV:S),C,0,0
S:G$uart1_writeu16$0$0({2}DF,SV:S),C,0,0
S:G$uart1_writeu32$0$0({2}DF,SV:S),C,0,0
S:G$com0_inituart0$0$0({2}DF,SV:S),C,0,0
S:G$com0_portinit$0$0({2}DF,SV:S),C,0,0
S:G$com0_init$0$0({2}DF,SV:S),C,0,0
S:G$com0_setpos$0$0({2}DF,SV:S),C,0,0
S:G$com0_writestr$0$0({2}DF,SV:S),C,0,0
S:G$com0_tx$0$0({2}DF,SV:S),C,0,0
S:G$com0_clear$0$0({2}DF,SV:S),C,0,0
S:G$memcpy$0$0({2}DF,DG,SV:S),C,0,0
S:G$memmove$0$0({2}DF,DG,SV:S),C,0,0
S:G$strcpy$0$0({2}DF,DG,SC:U),C,0,0
S:G$strncpy$0$0({2}DF,DG,SC:U),C,0,0
S:G$strcat$0$0({2}DF,DG,SC:U),C,0,0
S:G$strncat$0$0({2}DF,DG,SC:U),C,0,0
S:G$memcmp$0$0({2}DF,SI:S),C,0,0
S:G$strcmp$0$0({2}DF,SI:S),C,0,0
S:G$strncmp$0$0({2}DF,SI:S),C,0,0
S:G$strxfrm$0$0({2}DF,SI:U),C,0,0
S:G$memchr$0$0({2}DF,DG,SV:S),C,0,0
S:G$strchr$0$0({2}DF,DG,SC:U),C,0,0
S:G$strcspn$0$0({2}DF,SI:U),C,0,0
S:G$strpbrk$0$0({2}DF,DG,SC:U),C,0,0
S:G$strrchr$0$0({2}DF,DG,SC:U),C,0,0
S:G$strspn$0$0({2}DF,SI:U),C,0,0
S:G$strstr$0$0({2}DF,DG,SC:U),C,0,0
S:G$strtok$0$0({2}DF,DG,SC:U),C,0,0
S:G$memset$0$0({2}DF,DG,SV:S),C,0,0
S:G$strlen$0$0({2}DF,SI:U),C,0,0
S:G$display_received_packet$0$0({2}DF,SC:U),C,0,0
S:G$dbglink_received_packet$0$0({2}DF,SV:S),C,0,0
S:G$delay_ms$0$0({2}DF,SV:S),C,0,0
S:G$lcd2_display_radio_error$0$0({2}DF,SV:S),C,0,0
S:G$com0_display_radio_error$0$0({2}DF,SV:S),C,0,0
S:G$dbglink_display_radio_error$0$0({2}DF,SV:S),C,0,0
S:Fmain$pwrmgmt_irq$0$0({2}DF,SV:S),C,0,0
S:Fmain$transmit_packet$0$0({2}DF,SV:S),C,0,0
S:Fmain$display_transmit_packet$0$0({2}DF,SV:S),C,0,0
S:Fmain$wakeup_callback$0$0({2}DF,SV:S),C,0,0
S:G$_sdcc_external_startup$0$0({2}DF,SC:U),C,0,0
S:Fmain$si_write_reg$0$0({2}DF,SV:S),C,0,0
S:Fmain$synth_init$0$0({2}DF,SV:S),C,0,0
S:G$main$0$0({2}DF,SI:S),C,0,0
S:G$axradio_framing_maclen$0$0({1}SC:U),D,0,0
S:G$axradio_framing_addrlen$0$0({1}SC:U),D,0,0
S:G$remoteaddr$0$0({5}STaxradio_address:S),D,0,0
S:G$localaddr$0$0({10}STaxradio_address_mask:S),D,0,0
S:G$demo_packet$0$0({72}DA72d,SC:U),D,0,0
S:G$framing_insert_counter$0$0({1}SC:U),D,0,0
S:G$framing_counter_pos$0$0({1}SC:U),D,0,0
S:G$lpxosc_settlingtime$0$0({2}SI:U),D,0,0
S:G$crc_ccitt_table$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_ccitt_msbtable$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_crc16_table$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_crc16_msbtable$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_crc16dnp_table$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_crc16dnp_msbtable$0$0({512}DA256d,SI:U),D,0,0
S:G$crc_crc32_table$0$0({1024}DA256d,SL:U),D,0,0
S:G$crc_crc32_msbtable$0$0({1024}DA256d,SL:U),D,0,0
S:G$crc_crc8ccitt_table$0$0({256}DA256d,SC:U),D,0,0
S:G$crc_crc8ccitt_msbtable$0$0({256}DA256d,SC:U),D,0,0
S:G$crc_crc8onewire_table$0$0({256}DA256d,SC:U),D,0,0
S:G$crc_crc8onewire_msbtable$0$0({256}DA256d,SC:U),D,0,0
S:G$pn9_table$0$0({512}DA512d,SC:U),D,0,0
S:G$pn15_adv_table$0$0({512}DA256d,SI:U),D,0,0
S:G$pn15_out_table$0$0({256}DA256d,SC:U),D,0,0
S:G$bch3121_syndrometable$0$0({2048}DA1024d,SI:U),D,0,0
S:Fmain$__str_0$0$0({7}DA7d,SC:S),D,0,0
S:Fmain$__str_1$0$0({5}DA5d,SC:S),D,0,0
S:Fmain$__str_2$0$0({7}DA7d,SC:S),D,0,0
S:Fmain$__str_3$0$0({7}DA7d,SC:S),D,0,0
|
zrmyers/VulkanAda | Ada | 5,896 | ads | --------------------------------------------------------------------------------
-- MIT License
--
-- Copyright (c) 2020 Zane Myers
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions:
--
-- The above copyright notice and this permission notice shall be included in all
-- copies or substantial portions of the Software.
--
-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-- SOFTWARE.
--------------------------------------------------------------------------------
with Vulkan.Math.GenFMatrix;
with Vulkan.Math.Vec3;
use Vulkan.Math.GenFMatrix;
use Vulkan.Math.Vec3;
--------------------------------------------------------------------------------
--< @group Vulkan Math Basic Types
--------------------------------------------------------------------------------
--< @summary
--< This package provides a single precision floating point matrix with 2 rows
--< and 3 columns.
--------------------------------------------------------------------------------
package Vulkan.Math.Mat2x3 is
pragma Preelaborate;
pragma Pure;
--< A 2x3 matrix of single-precision floating point numbers.
subtype Vkm_Mat2x3 is Vkm_Mat(
last_row_index => 1, last_column_index => 2);
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Mat2x3 type.
--<
--< @description
--< Construct a 2x3 matrix with each component set to zero.
--<
--< @return
--< A 2x3 matrix.
----------------------------------------------------------------------------
function Make_Mat2x3 return Vkm_Mat2x3 is
(GFM.Make_GenMatrix(cN => 2, rN => 1)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Mat2x3 type.
--<
--< @description
--< Construct a 2x3 matrix with each component set to a different value.
--<
--< | value1 value3 value5 |
--< | value2 value4 value6 |
--<
--< @param value1
--< The first value to set for the matrix.
--<
--< @param value2
--< The second value to set for the matrix.
--<
--< @param value3
--< The third value to set for the matrix.
--<
--< @param value4
--< The fourth value to set for the matrix.
--<
--< @param value5
--< The fifth value to set for the matrix.
--<
--< @param value6
--< The Sixth value to set for the matrix.
--<
--< @return
--< A 2x3 matrix.
----------------------------------------------------------------------------
function Make_Mat2x3 (
value1, value2,
value3, value4,
value5, value6 : in Vkm_Float) return Vkm_Mat2x3 is
(GFM.Make_GenMatrix(
cN => 2, rN => 1,
c0r0_val => value1, c0r1_val => value4,
c1r0_val => value2, c1r1_val => value5,
c2r0_val => value3, c2r1_val => value6)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Mat2x3 type.
--<
--< @description
--< Construct a 2x3 matrix with each row set to the value of a 3 dimmensional
--< vector.
--<
--< @param value1
--< The first value to set for the matrix.
--<
--< @param value2
--< The second value to set for the matrix.
--<
--< @param value3
--< The third value to set for the matrix.
--<
--< @return
--< A 2x3 matrix.
----------------------------------------------------------------------------
function Make_Mat2x3 (
value1, value2 : in Vkm_Vec3) return Vkm_Mat2x3 is
(GFM.Make_GenMatrix(
cN => 2, rN => 1,
c0r0_val => value1.x, c0r1_val => value2.x,
c1r0_val => value1.y, c1r1_val => value2.y,
c2r0_val => value1.z, c2r1_val => value2.z)) with Inline;
----------------------------------------------------------------------------
--< @summary
--< Constructor for Vkm_Mat2x3 type.
--<
--< @description
--< Construct a 2x3 matrix using values from an existing matrix.
--<
--< If the provided matrix has dimmensions that are not the same as this
--< matrix, the corresponding element in the 4x4 identity matrix is used for
--< out of bounds accesses.
--<
--< @param value1
--< The submatrix to extract values from.
--<
--< @return
--< A 2x3 matrix.
----------------------------------------------------------------------------
function Make_Mat2x3 (
value1 : in Vkm_Mat) return Vkm_Mat2x3 is
(GFM.Make_GenMatrix(
cN => 2, rN => 1,
c0r0_val => value1.c0r0, c0r1_val => value1.c0r1,
c1r0_val => value1.c1r0, c1r1_val => value1.c1r1,
c2r0_val => value1.c2r0, c2r1_val => value1.c2r1)) with Inline;
end Vulkan.Math.Mat2x3;
|
AdaCore/gpr | Ada | 81 | ads |
package PACKAGE_1 is
procedure PUT_LINE (STR : in STRING);
end PACKAGE_1;
|
reznikmm/matreshka | Ada | 4,526 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Svg.Y_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Svg_Y_Attribute_Node is
begin
return Self : Svg_Y_Attribute_Node do
Matreshka.ODF_Svg.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Svg_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Svg_Y_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Y_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Svg_URI,
Matreshka.ODF_String_Constants.Y_Attribute,
Svg_Y_Attribute_Node'Tag);
end Matreshka.ODF_Svg.Y_Attributes;
|
reznikmm/markdown | Ada | 267 | ads | -- SPDX-FileCopyrightText: 2020 Max Reznik <[email protected]>
--
-- SPDX-License-Identifier: MIT
----------------------------------------------------------------
package Markdown is
pragma Pure;
subtype Can_Interrupt_Paragraph is Boolean;
end Markdown;
|
reznikmm/matreshka | Ada | 4,099 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Chart_Error_Upper_Indicator_Attributes;
package Matreshka.ODF_Chart.Error_Upper_Indicator_Attributes is
type Chart_Error_Upper_Indicator_Attribute_Node is
new Matreshka.ODF_Chart.Abstract_Chart_Attribute_Node
and ODF.DOM.Chart_Error_Upper_Indicator_Attributes.ODF_Chart_Error_Upper_Indicator_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Chart_Error_Upper_Indicator_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Chart_Error_Upper_Indicator_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Chart.Error_Upper_Indicator_Attributes;
|
iyan22/AprendeAda | Ada | 2,198 | adb | with Ada.Text_Io, Ada.Integer_Text_Io, Datos;
with Crear_Lista_Vacia, Ins, Esc, Longitud;
use Datos;
use Ada.Text_Io, Ada.Integer_Text_Io;
procedure Prueba_Longitud is
Lis : Lista; -- variable del programa principal
procedure Pedir_Return is
begin
Put_Line("pulsa return para continuar ");
Skip_Line;
end Pedir_Return;
begin -- programa principal
-- Casos de prueba:
-- 1. Lista vacia. Resultado: cero
-- 2. Lista no vacia. Lista de un elemento
-- 3. Lista no vacia. Varios elementos
-- 4. Lista no vacia. Muchos elementos
Put_Line("Programa de prueba: ");
Put_Line("*********");
Crear_Lista_Vacia(Lis);
Put_Line("Caso de prueba 1: Lista vacia ");
Put_Line("Ahora deberia escribir cero: ");
Put(Longitud(Lis));
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 4);
Put_Line("Caso de prueba 2: lista de un solo elemento.");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 1: ");
Put(Longitud(Lis));
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Put_Line("Caso de prueba 3: lista de varios elementos.");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 4: ");
Put(Longitud(Lis));
New_Line;
New_Line;
Pedir_Return;
Crear_Lista_Vacia(Lis);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Ins(Lis, 6);
Ins(Lis, 8);
Ins(Lis, 9);
Ins(Lis, 10);
Put_Line("Caso de prueba 3: lista de varios elementos.");
Put_Line("La lista inicial contiene ");
Esc(Lis);
Put_Line("Ahora deberia escribir 28: ");
Put(Longitud(Lis));
New_Line;
New_Line;
Pedir_Return;
Put_Line("Se acabo la prueba. AGURTZ ");
end Prueba_Longitud;
|
reznikmm/matreshka | Ada | 4,778 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package AMF.Internals is
pragma Preelaborate;
-- XXX All types in this package can be replaced by modular types, but
-- this requires to replace GNAT.Tables package by own implementation.
type AMF_Metamodel is mod 2 ** 8;
for AMF_Metamodel'Size use 8;
-- Identifier of the metamodel. AMF can supports up to 255 metamodels.
--------------------------------------------------------------
-- Element identifier and its subtypes for each metamodel --
--------------------------------------------------------------
type AMF_Element is mod 2 ** 32;
for AMF_Element'Size use 32;
-- Identifier of the element inside metamodel.
No_AMF_Element : constant AMF_Element := AMF_Element'First;
subtype CMOF_Element is AMF_Element range 16#00000000# .. 16#00FFFFFF#;
-----------------------
-- Link identifier --
-----------------------
type AMF_Link is range 0 .. 2 ** 31 - 1;
for AMF_Link'Size use 32;
No_AMF_Link : constant AMF_Link := AMF_Link'First;
type AMF_Collection_Of_Element is range 0 .. 2 ** 31 - 1;
for AMF_Collection_Of_Element'Size use 32;
type AMF_Extent is range 0 .. 2 ** 31 - 1;
for AMF_Extent'Size use 32;
type AMF_Collection_Of_Boolean is range 0 .. 2 ** 31 - 1;
for AMF_Collection_Of_Boolean'Size use 32;
type AMF_Collection_Of_String is range 0 .. 2 ** 31 - 1;
for AMF_Collection_Of_String'Size use 32;
end AMF.Internals;
|
onox/orka | Ada | 1,617 | ads | -- SPDX-License-Identifier: Apache-2.0
--
-- Copyright (c) 2018 onox <[email protected]>
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
with Ada.Containers.Indefinite_Hashed_Maps;
with Ada.Strings.Hash;
package Orka.Resources.Managers is
pragma Preelaborate;
type Manager is tagged limited private;
function Contains (Object : Manager; Name : String) return Boolean;
function Resource (Object : Manager; Name : String) return Resource_Ptr;
procedure Add_Resource
(Object : in out Manager;
Name : String;
Resource : Resource_Ptr);
procedure Remove_Resource (Object : in out Manager; Name : String);
type Manager_Ptr is not null access Manager;
function Create_Manager return Manager_Ptr;
private
package Resource_Maps is new Ada.Containers.Indefinite_Hashed_Maps
(Key_Type => String,
Element_Type => Resource_Ptr,
Hash => Ada.Strings.Hash,
Equivalent_Keys => "=");
type Manager is tagged limited record
Resources : Resource_Maps.Map;
end record;
end Orka.Resources.Managers;
|
sungyeon/drake | Ada | 1,784 | ads | pragma License (Unrestricted);
with Ada.Task_Identification;
with System.Multiprocessors;
package Ada.Execution_Time.Group_Budgets is
type Group_Budget (
CPU : System.Multiprocessors.CPU := System.Multiprocessors.CPU'First) is
tagged limited private;
type Group_Budget_Handler is
access protected procedure (GB : in out Group_Budget);
type Task_Array is array (Positive range <>) of Task_Identification.Task_Id;
-- Min_Handler_Ceiling : constant System.Any_Priority :=
-- implementation-defined;
-- procedure Add_Task (
-- GB : in out Group_Budget;
-- T : Task_Identification.Task_Id);
-- procedure Remove_Task (
-- GB : in out Group_Budget;
-- T : Task_Identification.Task_Id);
-- function Is_Member (
-- GB : Group_Budget;
-- T : Task_Identification.Task_Id)
-- return Boolean;
-- function Is_A_Group_Member (T : Task_Identification.Task_Id)
-- return Boolean;
-- function Members (GB : Group_Budget) return Task_Array;
-- procedure Replenish (GB : in out Group_Budget; To : Real_Time.Time_Span);
-- procedure Add (GB : in out Group_Budget; Interval : Real_Time.Time_Span);
-- function Budget_Has_Expired (GB : Group_Budget) return Boolean;
-- function Budget_Remaining (GB : Group_Budget) return Real_Time.Time_Span;
-- procedure Set_Handler (
-- GB : in out Group_Budget;
-- Handler : Group_Budget_Handler);
-- function Current_Handler (GB : Group_Budget) return Group_Budget_Handler;
-- procedure Cancel_Handler (
-- GB : in out Group_Budget;
-- Cancelled : out Boolean);
Group_Budget_Error : exception;
private
type Group_Budget (
CPU : System.Multiprocessors.CPU := System.Multiprocessors.CPU'First) is
tagged limited null record;
end Ada.Execution_Time.Group_Budgets;
|
reznikmm/matreshka | Ada | 3,838 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
package Matreshka.ODF_Attributes.FO.Hyphenation_Ladder_Count is
type FO_Hyphenation_Ladder_Count_Node is
new Matreshka.ODF_Attributes.FO.FO_Node_Base with null record;
type FO_Hyphenation_Ladder_Count_Access is
access all FO_Hyphenation_Ladder_Count_Node'Class;
overriding function Get_Local_Name
(Self : not null access constant FO_Hyphenation_Ladder_Count_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Attributes.FO.Hyphenation_Ladder_Count;
|
jscparker/math_packages | Ada | 3,539 | adb |
with Predictor_2;
with Text_IO; use Text_IO;
with Sinu_2;
with Ada.Numerics.Generic_Elementary_Functions;
procedure predictor_2_demo_1 is
type Real is digits 15;
package Sinusoid is new Sinu_2 (Real);
use Sinusoid;
package Sin_Integrate is new
Predictor_2 (Real, Dyn_Index, Dynamical_Variable, F, "*", "+", "-");
use Sin_Integrate;
package mth is new Ada.Numerics.Generic_Elementary_Functions(Real);
use mth;
package rio is new Float_IO(Real);
use rio;
package iio is new Integer_IO(Integer);
use iio;
Previous_Y, Newest_Y : Dynamical_Variable;
Previous_Y_dot, Newest_Y_dot : Dynamical_Variable;
Final_Time, Starting_Time : Real;
Previous_t, Newest_t : Real;
Delta_t : Real := 1.0 / 8.0;
Steps : Real := 10_000.0;
begin
new_line;
put ("Test integrates an equation whose solution is Sin(t).");
new_line;
put ("The equation is (d/dt)**2 (Y) = -Y. (Y = Sin(t) has a period of 2*Pi.)");
new_line(2);
put ("Enter number of time steps (try 512): ");
get (Steps);
new_line;
put ("Every time the integration advances this number of steps, ERROR is printed.");
new_line;
-- choose initial conditions
Starting_Time := 0.0;
Final_Time := 64.0;
Previous_Y(0) := 0.0;
Previous_Y_dot(0) := 1.0;
Previous_Y(1) := 0.0; --unused... just too lazy to remove it.
Previous_Y_dot(1) := 0.0; --unused
Previous_t := Starting_Time;
Delta_t := Final_Time - Starting_Time;
for i in 1..28 loop
Newest_t := Previous_t + Delta_t;
Integrate
(Final_Y => Newest_Y, -- the result (output).
Final_deriv_Of_Y => Newest_y_dot,
Final_Time => Newest_t, -- integrate out to here (input).
Initial_Y => Previous_Y, -- input an initial condition (input).
Initial_deriv_Of_Y => Previous_Y_dot,
Initial_Time => Previous_t, -- start integrating here (input).
No_Of_Steps => Steps); -- use this no_of_steps
Previous_Y := Newest_Y;
Previous_Y_dot := Newest_y_dot;
Previous_t := Newest_t;
--put ("Final value of numerically integrated sin: ");
--put (Newest_Y(0), Aft => 7);
new_line;
put ("Time = t =");
put (Newest_t, Aft => 7);
put (", Error = Sin(t)-Y = ");
put (Sin (Real (Newest_t)) - Newest_Y(0), Aft => 7);
end loop;
new_line(2);
put ("Total elapsed time is:");
put (Newest_t / (2.0*3.14159266), Aft => 7);
put (" in units of 2 pi.");
new_line(2);
put ("Final Remark: this (20th order) Predictor-Corrector requires half as many");
new_line;
put ("time steps per interval as the 17th order Predictor-Corrector to get near");
new_line;
put ("machine precision. That means it requires about 1/12th as many evaluations");
new_line;
put ("of F(t, Y) as the 8th order Runge-Kutta, (for this class of equation anyway).");
new_line;
put ("If evaluation of F(t, Y) dominates overhead at run-time, as it does in most");
new_line;
put ("N-body problems, then this specialized Predictor-Corrector is a good idea");
new_line;
put ("here. In fact Predictor-Correctors are still commonly used in these problems.");
new_line;
put ("Of course the 20th order Predictor-Corrector is restricted to a special");
new_line;
put ("class of differential equation: (d/dt)^2 Y = F(t, Y).");
new_line;
new_line(2);
end;
|
Fabien-Chouteau/tiled-code-gen | Ada | 12,594 | adb | ------------------------------------------------------------------------------
-- --
-- tiled-code-gen --
-- --
-- Copyright (C) 2021 Fabien Chouteau --
-- --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
with Ada.Directories; use Ada.Directories;
with Ada.Text_IO; use Ada.Text_IO;
with TCG.Utils; use TCG.Utils;
with TCG.Tilesets;
with TCG.Palette;
use TCG;
package body TCG.Outputs.LibGBA is
use type Tilesets.Master_Tile_Id;
use type Palette.Color_Id;
procedure Generate_Charblock (Filepath : String;
Package_Name : String);
procedure Generate_Tileset_Collisions (Filepath : String;
Package_Name : String);
procedure Generate_Root_Package
(Filename : String;
Package_Name : String;
Format : Palette.Output_Color_Format);
------------------------
-- Generate_Charblock --
------------------------
procedure Generate_Charblock (Filepath : String;
Package_Name : String)
is
Output : Ada.Text_IO.File_Type;
procedure P (Str : String);
procedure PL (Str : String);
procedure NL;
procedure P (Str : String) is
begin
Put (Output, Str);
end P;
procedure PL (Str : String) is
begin
Put_Line (Output, Str);
end PL;
procedure NL is
begin
New_Line (Output);
end NL;
begin
pragma Style_Checks ("M200");
Create (Output, Out_File, Filepath);
PL ("with GBA.Graphics.Charblocks;");
PL ("pragma Style_Checks (Off);");
PL ("package " & Package_Name & " is");
NL;
PL (" Block : aliased constant GBA.Graphics.Charblocks.Charblock_Raw :=");
PL (" (");
for Id in Tilesets.First_Id .. Tilesets.Last_Id loop
for Y in 1 .. Tilesets.Tile_Height loop
P (" ");
for X in 1 .. Tilesets.Tile_Width loop
if Id /= Tilesets.No_Tile and then Id <= Tilesets.Last_Id then
P (Palette.Color_Id'Image ((Tilesets.Pix (Id, X, Y))));
else
P (" 0");
end if;
if X /= Tilesets.Tile_Width then
P (",");
end if;
end loop;
if Y /= Tilesets.Tile_Height then
PL (",");
else
P ("");
end if;
end loop;
if Id /= Tilesets.Last_Id then
PL (",");
else
PL (");");
end if;
end loop;
PL ("end " & Package_Name & ";");
Close (Output);
end Generate_Charblock;
---------------------------------
-- Generate_Tileset_Collisions --
---------------------------------
procedure Generate_Tileset_Collisions (Filepath : String;
Package_Name : String)
is
Output : Ada.Text_IO.File_Type;
procedure P (Str : String);
procedure PL (Str : String);
procedure NL;
procedure P (Str : String) is
begin
Put (Output, Str);
end P;
procedure PL (Str : String) is
begin
Put_Line (Output, Str);
end PL;
procedure NL is
begin
New_Line (Output);
end NL;
begin
Create (Output, Out_File, Filepath);
PL ("with GBA.Graphics.Charblocks;");
PL ("pragma Style_Checks (Off);");
PL ("package " & Package_Name & " is");
NL;
PL (" Block : aliased constant GBA.Graphics.Charblocks.Charblock_Raw :=");
PL (" (");
for Id in Tilesets.First_Id .. Tilesets.Last_Id loop
for Y in 1 .. Tilesets.Tile_Height loop
P (" ");
for X in 1 .. Tilesets.Tile_Width loop
P (if Id /= Tilesets.No_Tile
and then
Id <= Tilesets.Last_Id
and then
Tilesets.Collision (Id, X, Y)
then
"1"
else
"0");
if X /= Tilesets.Tile_Width then
P (",");
end if;
end loop;
if Y /= Tilesets.Tile_Height then
PL (",");
else
P ("");
end if;
end loop;
if Id /= Tilesets.Last_Id then
PL (",");
else
PL (");");
end if;
end loop;
PL ("end " & Package_Name & ";");
Close (Output);
end Generate_Tileset_Collisions;
---------------------------
-- Generate_Root_Package --
---------------------------
procedure Generate_Root_Package
(Filename : String;
Package_Name : String;
Format : Palette.Output_Color_Format)
is
Output : File_Type;
begin
Create (Output, Out_File, Filename);
Put_Line (Output, "with GBA.Graphics.Palettes;");
Put_Line (Output, "with GBA.Graphics.Charblocks;");
New_Line (Output);
Put_Line (Output, "pragma Style_Checks (Off);");
Put_Line (Output, "package " & Package_Name & " is");
New_Line (Output);
New_Line (Output);
Put_Line (Output,
" Palette : aliased GBA.Graphics.Palettes.Palette := (");
declare
use TCG.Palette;
First : constant Color_Id := Palette.First_Id;
Last : constant Color_Id := Palette.Last_Id;
-- The GBA palettes have fixed size 256 colors
Max : constant Color_Id := 255;
begin
if First /= 0 then
raise Program_Error with "expected Palette.First_Id = 0";
end if;
if Last > 255 then
raise Program_Error with "Palette size (" &
Palette.Number_Of_Colors'Img &
") above maximum allowed for LibGBA (256)";
end if;
for Id in First .. Max loop
if Id <= Last then
Put (Output, " " & Id'Img & " => " &
Palette.Image (Palette.Convert (Id), Format));
else
Put (Output, " " & Id'Img & " => 0");
end if;
if Id /= Max then
Put_Line (Output, ",");
end if;
end loop;
end;
Put_Line (Output, ");");
New_Line (Output);
Put_Line (Output, " type Object_Kind is (Rectangle_Obj, Point_Obj,");
Put_Line (Output, " Ellipse_Obj, Polygon_Obj, Tile_Obj, Text_Obj);");
New_Line (Output);
Put_Line (Output, " type String_Access is access all String;");
New_Line (Output);
Put_Line (Output, " type Object");
Put_Line (Output, " (Kind : Object_Kind := Rectangle_Obj)");
Put_Line (Output, " is record");
Put_Line (Output, " Name : String_Access;");
Put_Line (Output, " Id : Natural;");
Put_Line (Output, " X : Float;");
Put_Line (Output, " Y : Float;");
Put_Line (Output, " Width : Float;");
Put_Line (Output, " Height : Float;");
-- Put_Linr (Output, " Points : Polygon_Access;");
Put_Line (Output, " Str : String_Access;");
Put_Line (Output, " Flip_Vertical : Boolean;");
Put_Line (Output, " Flip_Horizontal: Boolean;");
Put_Line
(Output, " Tile_Id : GBA.Graphics.Charblocks.Tile_Id;");
Put_Line (Output, " end record;");
New_Line (Output);
Put_Line (Output, " type Object_Array is array (Natural range <>)");
Put_Line (Output, " of Object;");
New_Line (Output);
Put_Line (Output, "end " & Package_Name & ";");
Close (Output);
end Generate_Root_Package;
-----------------------
-- Gen_LibGBA_Source --
-----------------------
procedure Gen_LibGBA_Source
(Directory : String;
Root_Package_Name : String;
Map_List : TCG.Maps.List.List)
is
Format : constant Palette.Output_Color_Format := Palette.RGB555;
begin
if not TCG.Utils.Make_Dir (Directory) then
Ada.Text_IO.Put_Line
(Ada.Text_IO.Standard_Error,
"Cannot create directory for GESTE code: '" & Directory & "'");
return;
end if;
if Tilesets.Tile_Width /= Tilesets.Tile_Height then
raise Program_Error with "Tiles are not square";
end if;
if Tilesets.Tile_Width /= 8 then
raise Program_Error with "Only 8x8 tiles allowed for LibGBA";
end if;
if Tilesets.Number_Of_Tiles > 512 then
raise Program_Error
with "Number of tiles (" & Tilesets.Number_Of_Tiles'Img &
") above maximum allowed for LibGBA (512)";
end if;
declare
Package_Name : constant String := Root_Package_Name;
Filename : constant String :=
Compose (Directory, To_Ada_Filename (Package_Name));
begin
Generate_Root_Package (Filename, Package_Name, Format);
end;
declare
Package_Name : constant String := Root_Package_Name & ".Charblock";
Filename : constant String :=
Compose (Directory, To_Ada_Filename (Package_Name));
begin
Generate_Charblock (Filename, Package_Name);
end;
declare
Package_Name : constant String :=
Root_Package_Name & ".Collisions";
Filename : constant String :=
Compose (Directory, To_Ada_Filename (Package_Name));
begin
Generate_Tileset_Collisions (Filename, Package_Name);
end;
for Map of Map_List loop
declare
Package_Name : constant String :=
Root_Package_Name & "." & To_Ada_Identifier (Maps.Name (Map));
Filename : constant String :=
Compose (Directory, To_Ada_Filename (Package_Name));
begin
TCG.Maps.Generate_LibGBA_Source (Map, Package_Name, Filename);
end;
end loop;
end Gen_LibGBA_Source;
end TCG.Outputs.LibGBA;
|
jwarwick/aoc_2020 | Ada | 177 | ads | -- AOC 2020, Day 19
package Day is
function count_valid(filename : in String) return Natural;
function count_valid_updated(filename : in String) return Natural;
end Day;
|
charlie5/lace | Ada | 1,060 | ads | with
openGL.Palette,
openGL.Light;
package openGL.Program.lit
--
-- Models an openGL program which uses lighting.
--
is
type Item is new openGL.Program.item with private;
type View is access all Item'Class;
------------
-- Uniforms
--
overriding
procedure camera_Site_is (Self : in out Item; Now : in Vector_3);
overriding
procedure model_Matrix_is (Self : in out Item; Now : in Matrix_4x4);
overriding
procedure Lights_are (Self : in out Item; Now : in Light.items);
overriding
procedure set_Uniforms (Self : in Item);
procedure specular_Color_is (Self : in out Item; Now : in Color);
private
type Item is new openGL.Program.item with
record
Lights : Light.items (1 .. 50);
light_Count : Natural := 0;
specular_Color : Color := Palette.Grey; -- The materials specular color.
camera_Site : Vector_3;
model_Transform : Matrix_4x4 := Identity_4x4;
end record;
end openGL.Program.lit;
|
jrcarter/Ada_GUI | Ada | 19,727 | adb | -- --
-- package Strings_Edit Copyright (c) Dmitry A. Kazakov --
-- Implementation Luebeck --
-- Strings_Edit.Float_Edit Spring, 2000 --
-- --
-- Last revision : 18:40 01 Aug 2019 --
-- --
-- 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. --
-- --
-- As a special exception, if other files instantiate generics from --
-- this unit, or you link this unit with other files to produce an --
-- executable, this unit does not by itself cause the resulting --
-- executable to be covered by the GNU General Public License. This --
-- exception does not however invalidate any other reasons why the --
-- executable file might be covered by the GNU Public License. --
--____________________________________________________________________--
with Ada.IO_Exceptions;
with Ada.Numerics.Elementary_Functions;
with Strings_Edit.Integers;
pragma Elaborate_All (Strings_Edit.Integers);
use Ada.IO_Exceptions;
use Ada.Numerics.Elementary_Functions;
use Strings_Edit.Integers;
package body Strings_Edit.Float_Edit is
--
-- Base-radix logarithms of the number of valid digits in machine
-- radix, i.e. how many base-radix digits one machine radix digit
-- represents.
--
Logs : constant array (NumberBase) of Float :=
( 2 => Log (Float (Number'Machine_Radix), 2.0),
3 => Log (Float (Number'Machine_Radix), 3.0),
4 => Log (Float (Number'Machine_Radix), 4.0),
5 => Log (Float (Number'Machine_Radix), 5.0),
6 => Log (Float (Number'Machine_Radix), 6.0),
7 => Log (Float (Number'Machine_Radix), 7.0),
8 => Log (Float (Number'Machine_Radix), 8.0),
9 => Log (Float (Number'Machine_Radix), 9.0),
10 => Log (Float (Number'Machine_Radix), 10.0),
11 => Log (Float (Number'Machine_Radix), 11.0),
12 => Log (Float (Number'Machine_Radix), 12.0),
13 => Log (Float (Number'Machine_Radix), 13.0),
14 => Log (Float (Number'Machine_Radix), 14.0),
15 => Log (Float (Number'Machine_Radix), 15.0),
16 => Log (Float (Number'Machine_Radix), 16.0)
);
--
-- GetExponentField -- Calculate the length of the exponent
--
-- Base - Of the number
--
-- This function calculates how many digits are necessary to
-- represent any Base-radix exponent in decimal the format.
--
-- Returns :
--
-- The exponent length
--
function GetExponentField (Base : NumberBase) return Natural is
begin
if Number'Machine_Emax > -Number'Machine_Emin then
return
Natural
( Log (Float (Number'Machine_Emax) * Logs (Base), 10.0)
+ 0.5
);
else
return
Natural
( Log (Float (-Number'Machine_Emin) * Logs (Base), 10.0)
+ 0.5
);
end if;
end GetExponentField;
--
-- The exponent lengths for different Bases
--
ExponentField : constant array (NumberBase) of Natural :=
( GetExponentField (2), GetExponentField (3),
GetExponentField (4), GetExponentField (5),
GetExponentField (6), GetExponentField (7),
GetExponentField (8), GetExponentField (9),
GetExponentField (10), GetExponentField (11),
GetExponentField (12), GetExponentField (13),
GetExponentField (14), GetExponentField (15),
GetExponentField (16)
);
--
-- GetExponent -- Get the exponent part from the string
--
-- Source - The string
-- Pointer - Within the string
-- Value - Of the exponent (output)
--
-- This procedure scans the Source string starting from the Pointer
-- position for the exponent part of a number. Spaces are skipped
-- first. The exponent can be introduced by either E or e. Its value
-- is a decimal number returned via Value. If no valid exponent part
-- present Value is set to zero (the Pointer remains intact).
--
procedure GetExponent
( Source : in String;
Pointer : in out Integer;
Value : out Integer
) is
Index : Integer := Pointer;
begin
Get (Source, Index);
if ( Index > Source'Last
or else
( Source (Index) /= 'E'
and
Source (Index) /= 'e'
) )
then
Value := 0;
else
Index := Index + 1;
Get (Source, Index);
Get (Source, Index, Value, 10, -1000, +1000, True, True);
Pointer := Index;
end if;
exception
when End_Error | Data_Error | Layout_Error | Constraint_Error =>
Value := 0;
end GetExponent;
procedure Get
( Source : in String;
Pointer : in out Integer;
Value : out Number'Base;
Base : in NumberBase := 10;
First : in Number'Base := Number'Base'First;
Last : in Number'Base := Number'Base'Last;
ToFirst : in Boolean := False;
ToLast : in Boolean := False
) is
Radix : constant Number'Base := Number'Base (Base);
Digit : Natural;
Exponent : Integer;
ExponentPart : Integer;
Mantissa : Number'Base := 0.0;
Multiplicand : Number'Base := 1.0;
Sign : Integer := 0;
Index : Integer := Pointer;
begin
if ( Pointer < Source'First
or else
( Pointer > Source'Last
and then
Pointer - 1 > Source'Last
) )
then
raise Layout_Error;
end if;
if Pointer <= Source'Last then
case Source (Index) is
when '-' =>
Index := Index + 1;
Sign := -1;
Get (Source, Index);
when '+' =>
Index := Index + 1;
Sign := 1;
Get (Source, Index);
when others =>
null;
end case;
end if;
ExponentPart := Index;
Exponent := Index;
while Index <= Source'Last loop
Digit := GetDigit (Source (Index));
exit when Digit >= Base;
Mantissa := Mantissa + Number'Base (Digit) * Multiplicand;
Multiplicand := Multiplicand / Radix;
Index := Index + 1;
end loop;
Exponent := Index - Exponent - 1;
if Index + 1 <= Source'Last and then Source (Index) = '.' then
Index := Index + 1;
Digit := GetDigit (Source (Index));
if Digit < Base then
loop
Mantissa :=
Mantissa + Number'Base (Digit) * Multiplicand;
Multiplicand := Multiplicand / Radix;
Index := Index + 1;
exit when Index > Source'Last;
Digit := GetDigit (Source (Index));
exit when Digit >= Base;
end loop;
else
Index := Index - 1;
end if;
end if;
if 0 = Sign then
if Pointer = Index then
raise End_Error; -- No fraction part - no number
end if;
Sign := 1;
else
if Pointer = Index - 1 then
raise Data_Error; -- Only a sign
end if;
end if;
if ( ExponentPart = Index - 1
and then
Source (ExponentPart) = '.'
)
then
raise Data_Error; -- Only decimal point is present
end if;
GetExponent (Source, Index, ExponentPart);
if Mantissa > 0.0 then
begin
Mantissa := Number'Base (Sign) * Mantissa;
Exponent := ExponentPart + Exponent;
ExponentPart :=
Integer (Float (Number'Machine_Emax) * Logs (Base) * 0.7);
if Exponent >= ExponentPart then
Multiplicand := Radix ** ExponentPart;
loop
Mantissa := Mantissa * Multiplicand;
Exponent := Exponent - ExponentPart;
exit when Exponent < ExponentPart;
end loop;
elsif Exponent <= -ExponentPart then
ExponentPart := -ExponentPart;
Multiplicand := Radix ** ExponentPart;
loop
Mantissa := Mantissa * Multiplicand;
Exponent := Exponent - ExponentPart;
exit when Exponent > ExponentPart;
end loop;
end if;
Mantissa := Mantissa * Radix ** Exponent;
if not Mantissa'Valid then
if Sign > 0 and ToLast then
Value := Last;
Pointer := Index;
return;
elsif Sign < 0 and ToFirst then
Value := First;
Pointer := Index;
return;
end if;
raise Constraint_Error;
end if;
exception
when Numeric_Error | Constraint_Error =>
if Sign > 0 and ToLast then
Value := Last;
Pointer := Index;
return;
elsif Sign < 0 and ToFirst then
Value := First;
Pointer := Index;
return;
end if;
raise Constraint_Error;
end;
end if;
if Mantissa < First then
if ToFirst then
Mantissa := First;
else
raise Constraint_Error;
end if;
elsif Mantissa > Last then
if ToLast then
Mantissa := Last;
else
raise Constraint_Error;
end if;
end if;
Value := Mantissa;
Pointer := Index;
end Get;
function Value
( Source : in String;
Base : in NumberBase := 10;
First : in Number'Base := Number'First;
Last : in Number'Base := Number'Last;
ToFirst : in Boolean := False;
ToLast : in Boolean := False
) return Number'Base is
Result : Number'Base;
Pointer : Integer := Source'First;
begin
Get (Source, Pointer, SpaceAndTab);
Get (Source, Pointer, Result, Base, First, Last, ToFirst, ToLast);
Get (Source, Pointer, SpaceAndTab);
if Pointer /= Source'Last + 1 then
raise Data_Error;
end if;
return Result;
end Value;
procedure Put
( Destination : in out String;
Pointer : in out Integer;
Value : in Number'Base;
Base : in NumberBase := 10;
PutPlus : in Boolean := False;
RelSmall : in Positive := MaxSmall;
AbsSmall : in Integer := -MaxSmall;
Field : in Natural := 0;
Justify : in Alignment := Left;
Fill : in Character := ' '
) is
--
-- Sign -- Make the sign of a number
--
-- Value - Of the number
-- PutPlus - Always put sign, if true
--
-- Returns :
--
-- The string to be used as the sign
--
function Sign
( Value : Number'Base;
PutPlus : Boolean
) return String is
begin
if Value < 0.0 then
return "-";
elsif PutPlus then
return "+";
else
return "";
end if;
end Sign;
--
-- PutExponent -- Make the exponent part
--
-- Value - Of the exponent part
-- Base - Of the mantissa
--
-- The exponent part is written in the fixed length format. It
-- always has sign. Leading zeros are added to make the length
-- fixed. The space is added in front of the exponent part for
-- bases 15 and 16.
--
-- Returns :
--
-- The string containing the exponent part
--
function PutExponent
( Value : Integer;
Base : NumberBase
) return String is
Result : String (1..32);
Exponent : Integer := Value;
Pointer : Integer := Result'First;
Sign : Character := '+';
begin
if Exponent < 0 then
Sign := '-';
Exponent := -Value;
end if;
Put
( Result,
Pointer,
Exponent,
Field => ExponentField (Base),
PutPlus => False,
Justify => Right,
Fill => '0'
);
if Base >= 15 then
return " e" & Sign & Result (Result'First..Pointer - 1);
else
return 'E' & Sign & Result (Result'First..Pointer - 1);
end if;
end PutExponent;
Precision : Integer := -- The maximal available precision
Integer
( Float (Number'Machine_Mantissa)
* Logs (Base)
);
Mantissa : Number'Base := abs Value;
Exponent : Integer := 0;
Increment : Integer := 0;
Radix : constant Number'Base := Number'Base (Base);
begin
if Mantissa <= 0.0 then
Put (Destination, Pointer, "0", Field, Justify, Fill);
return;
end if;
if RelSmall < Precision then
Precision := RelSmall;
end if;
--
-- Normalization. The goal is to bring the mantissa into the range
-- ]1..1/Base]
--
while Mantissa < 1.0 / Radix loop
Mantissa := Mantissa * Radix;
Exponent := Exponent - 1;
end loop;
while Mantissa >= 1.0 loop
Mantissa := Mantissa / Radix;
Exponent := Exponent + 1;
end loop;
if Exponent - AbsSmall < Precision then
Precision := Exponent - AbsSmall;
Increment := 1;
end if;
--
-- Rounding
--
Mantissa := Mantissa + 0.5 / Radix ** Precision;
if Mantissa >= 1.0 then
Mantissa := Mantissa / Radix;
Exponent := Exponent + 1;
Precision := Precision + Increment;
end if;
if Precision > 0 then
declare
ExponentPart : constant String :=
PutExponent (Exponent - 1, Base);
MantissaPart : String (1..Precision);
Digit : Natural;
begin
--
-- Convert the Mantissa to character string
--
for Index in MantissaPart'range loop
Mantissa := Mantissa * Radix;
Digit := Integer (Mantissa);
if Number'Base (Digit) > Mantissa then
Digit := Digit - 1;
end if;
Mantissa := Mantissa - Number'Base (Digit);
MantissaPart (Index) := Figures (Digit + Figures'First);
end loop;
if ( Exponent < - ExponentPart'Length
or Exponent > Precision
)
then
--
-- Format X.XXXXXeYYY
--
Put
( Destination,
Pointer,
( Sign (Value, PutPlus)
& MantissaPart (MantissaPart'First)
& '.'
& MantissaPart
( MantissaPart'First + 1
.. MantissaPart'Last
)
& ExponentPart
),
Field,
Justify,
Fill
);
elsif Exponent = Precision then
--
-- Format: XXXXXXX
--
Put
( Destination,
Pointer,
Sign (Value, PutPlus) & MantissaPart,
Field,
Justify,
Fill
);
elsif Exponent > 0 then
--
-- Format: XXXX.XXX
--
Put
( Destination,
Pointer,
( Sign (Value, PutPlus)
& MantissaPart
( MantissaPart'First
.. MantissaPart'First + Exponent - 1
)
& '.'
& MantissaPart
( MantissaPart'First + Exponent
.. MantissaPart'Last
) ),
Field,
Justify,
Fill
);
else
--
-- Format: 0.000XXXXX
--
Put
( Destination,
Pointer,
( Sign (Value, PutPlus)
& "0."
& String'(1..-Exponent => '0')
& MantissaPart
),
Field,
Justify,
Fill
);
end if;
end;
else
--
-- Zero
--
Put (Destination, Pointer, "0", Field, Justify, Fill);
end if;
end Put;
function Image
( Value : in Number'Base;
Base : in NumberBase := 10;
PutPlus : in Boolean := False;
RelSmall : in Positive := MaxSmall;
AbsSmall : in Integer := -MaxSmall
) return String is
Text : String (1..80);
Pointer : Integer := Text'First;
begin
Put (Text, Pointer, Value, Base, PutPlus, RelSmall, AbsSmall);
return Text (Text'First..Pointer - 1);
end Image;
end Strings_Edit.Float_Edit;
|
scls19fr/openphysic | Ada | 7,663 | adb | -----------------------------------------------------------------
-- Copyright (c) Drexel University, 1996 --
-- Data Fusion Laboratory --
-- Electrical and Computer Engineering Department --
-- --
-- Permission to use, copy, modify, distribute, and sell this --
-- software and its documentation for any purpose is hereby --
-- granted without fee, provided that the above copyright --
-- notice appear in all copies and that both that copyright --
-- notice and this permission notice appear in supporting --
-- documentation. --
-- --
-- Drexel University disclaims all warranties with regard to --
-- this software, including all implied warranties of --
-- merchantability and fitness, in no event shall Drexel --
-- University be liable for any special, indirect or --
-- consequential damages or any damages whatsoever resulting --
-- from loss of use, data or profits, arising out of or in --
-- connection with the use or performance of this software. --
-----------------------------------------------------------------
--
-- $FILE: generic_complex_arrays-operations.adb
-- $LAST_MODIFIED: 11/20/96
-- $AUTHORS: Chris Papademetrious, Xiaoxun Zhu, Moshe Kam
--
with Ada.Unchecked_Deallocation;
package body Generic_Complex_Arrays.Operations is
Complex_Zero: constant COMPLEX := COMPOSE_FROM_CARTESIAN(0.0, 0.0);
Complex_Unity: constant COMPLEX := COMPOSE_FROM_CARTESIAN(1.0, 0.0);
procedure Free_Matrix is new Ada.Unchecked_Deallocation(Complex_Matrix, Complex_Matrix_Ptr);
procedure Free_Vector is new Ada.Unchecked_Deallocation(Complex_Vector, Complex_Vector_Ptr);
function Create_Vector(First, last: in Integer) return Complex_Vector_Ptr is
begin
return new Complex_Vector(First..Last);
end Create_Vector;
function Create_Vector(First, Last: in Integer;
default_value: in Complex)
return Complex_Vector_Ptr is
Result: Complex_Vector_Ptr;
begin
Result := Create_Vector(First, Last);
Result.all := (others => Default_Value);
return Result;
end Create_Vector;
function Create_Matrix(First_Row, First_Col,
Last_Row, Last_Col: in Integer)
return Complex_Matrix_Ptr is
begin
return new Complex_Matrix(First_Row..Last_Row, First_Col..Last_Col);
end Create_Matrix;
function Create_Matrix(First_Row, First_Col,
Last_Row, Last_Col: in Integer;
Default_Value: in Complex) return Complex_Matrix_Ptr is
Result: Complex_Matrix_Ptr;
begin
Result := Create_Matrix(First_Row, First_Col, Last_Row, Last_Col);
Result.all := (others => (others => Default_Value));
return Result;
end Create_Matrix;
function Create_Matrix(First, Last: in Integer) return Complex_Matrix_Ptr is
Result: Complex_Matrix_Ptr;
begin
return Create_Matrix(First, First, Last,Last);
end Create_Matrix;
function Create_Matrix(First, Last: in Integer;
Default_Value: in Complex) return Complex_Matrix_Ptr is
Result: Complex_Matrix_Ptr;
begin
return Create_Matrix(First, First, Last, Last, Default_Value);
end Create_Matrix;
procedure Destroy_Vector(X: in out Complex_Vector_Ptr) is
begin
Free_Vector(X);
end Destroy_Vector;
procedure Destroy_Matrix(X: in out Complex_Matrix_Ptr) is
begin
Free_Matrix(X);
end Destroy_Matrix;
function Row(X: in Complex_Matrix;
Row: in Integer) return Complex_Vector is
Result: Complex_Vector(X'Range(2));
begin
for I in X'Range(2) loop
Result(I) := X(Row, I);
end loop;
return Result;
end Row;
function Column(X: in Complex_Matrix;
Col: in Integer) return Complex_Vector is
Result: Complex_Vector(X'Range(1));
begin
for I in X'Range(1) loop
Result(I) := X(I, Col);
end loop;
return Result;
end Column;
function Diagonal(X: in Complex_Matrix) return Complex_Vector is
Result: Complex_Vector(X'Range(1));
begin
if X'Length(1) /= X'Length(2) then
raise Array_Index_Error;
end if;
for I in X'Range(1) loop
Result(I) := X(I, (I-X'First(1))+X'First(2));
end loop;
return Result;
end Diagonal;
function SubVector(X: in Complex_Vector; First, Last: in Integer)
return Complex_Vector
is
Result: Complex_Vector(First..Last);
begin
for I in First..Last loop
Result(I) := X(I);
end loop;
return Result;
end SubVector;
function SubVector(X: in Complex_Vector; First, Last: in Integer;
First_index: in Integer)
return Complex_Vector
is
Result: Complex_Vector(First_index..First_index+(Last-First));
begin
for I in First..Last loop
Result(First_index+(I-First)) := X(I);
end loop;
return Result;
end SubVector;
function SubMatrix(X: in Complex_Matrix;
First_Row, First_Col,
Last_Row, Last_Col: in Integer)
return Complex_Matrix
is
Result: Complex_Matrix(First_Row..Last_Row,First_Col..Last_Col);
begin
for R in First_Row..Last_Row loop
for C in First_Col..Last_Col loop
Result(R, C) := X(R, C);
end loop;
end loop;
return Result;
end SubMatrix;
function SubMatrix(X: in Complex_Matrix;
First_Row, First_Col,
Last_Row, Last_Col: in Integer;
First_Row_index, First_Col_index: in Integer)
return Complex_Matrix
is
Result: Complex_Matrix(First_Row_index..First_Row_index+(Last_Row-First_Row),
First_Col_index..First_Col_index+(Last_Col-First_Col));
begin
for R in First_Row..Last_Row loop
for C in First_Col..Last_Col loop
Result(First_Row_index+(R-First_Row),
First_Col_index+(C-First_Col)) := X(R, C);
end loop;
end loop;
return Result;
end SubMatrix;
function Det(X: in Complex_Matrix) return Complex is
Result: Complex;
begin
if X'Length(1) /= X'Length(2) then
raise Array_Index_Error;
end if;
case X'Length(1) is
when 1 =>
Result := X(X'First(1), X'First(2));
when 2 =>
Result := X(X'First(1), X'First(2)) * X(X'Last(1), X'Last(2)) -
X(X'First(1), X'Last(2)) * X(X'Last(1), X'First(2));
when others =>
Result := Complex_Zero;
declare
submat : Complex_Matrix_Ptr :=
new Complex_Matrix(X'First(1)+1..X'Last(1),
X'First(2)..X'Last(2)-1);
unity_sign: Complex := Complex_Unity;
begin
for COL in X'Range(2) loop
if COL /= X'First(2) then
for SUBCOL in X'First(2)..COL-1 loop
for ROW in X'First(1)+1..X'Last(1) loop
submat(ROW,SUBCOL) := X(ROW,SUBCOL);
end loop;
end loop;
end if;
if COL /= X'Last(2) then
for SUBCOL in COL+1..X'Last(2) loop
for ROW in X'First(1)+1..X'Last(1) loop
submat(ROW,SUBCOL-1) := X(ROW,SUBCOL);
end loop;
end loop;
end if;
Result := Result + unity_sign * X(X'First(1), COL) * Det(submat.all);
unity_sign := -unity_sign;
end loop;
Destroy_Matrix(submat);
end;
end case;
return Result;
end Det;
end GENERIC_Complex_Arrays.Operations;
|
reznikmm/matreshka | Ada | 733 | ads | with Ada.Streams;
with League.Strings;
package Styx.Messages.Attaches is
type Attach_Request is new Request with record
FID : Styx.Messages.FID;
Auth_FID : Styx.Messages.FID;
User : League.Strings.Universal_String;
Tree : League.Strings.Universal_String;
end record;
procedure Visit
(Visiter : in out Styx.Request_Visiters.Request_Visiter'Class;
Value : Attach_Request);
type Attach_Request_Access is access all Attach_Request;
type Attach_Reply is new Reply with record
QID : Styx.Messages.QID;
end record;
procedure Visit
(Visiter : in out Styx.Reply_Visiters.Reply_Visiter'Class;
Value : Attach_Reply);
end Styx.Messages.Attaches;
|
jhumphry/parse_args | Ada | 2,170 | adb | -- parse_args-usage.adb
-- A simple command line option parser
-- Copyright (c) 2014 - 2015, James Humphry
--
-- Permission to use, copy, modify, and/or distribute this software for any
-- purpose with or without fee is hereby granted, provided that the above
-- copyright notice and this permission notice appear in all copies.
--
-- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
-- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
-- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-- OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-- PERFORMANCE OF THIS SOFTWARE.
pragma Profile(No_Implementation_Extensions);
with Ada.Text_IO, Ada.Strings;
use Ada.Text_IO, Ada.Strings;
with Ada.Containers;
use type Ada.Containers.Count_Type;
separate (Parse_Args)
procedure Usage(A : in Argument_Parser) is
First_Positional : Boolean := True;
begin
Put("Usage: ");
Put(A.Command_Name);
if A.Option_Help_Details.Length > 0 then
Put(" [OPTIONS]...");
end if;
for I of A.Option_Help_Details loop
if I.Positional then
if First_Positional then
Put(" [--] ");
First_Positional := False;
end if;
Put(" [" & To_String(I.Name) & "]");
end if;
end loop;
if A.Allow_Tail then
Put(" [" & To_String(A.Tail_Usage) & "]...");
end if;
New_Line;
if Length(A.Prologue) > 0 then
Put_Line(To_String(A.Prologue));
end if;
New_Line;
for I of A.Option_Help_Details loop
if not I.Positional then
if I.Short_Option /= '-' then
Set_Col(3);
Put("-" & I.Short_Option & ", ");
end if;
if I.Long_Option /= Null_Unbounded_String then
Set_Col(7);
Put("--" & To_String(I.Long_Option) & " ");
end if;
Set_Col(20);
Put(To_String(I.Usage));
New_Line;
end if;
end loop;
end Usage;
|
reznikmm/matreshka | Ada | 21,822 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2012-2013, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
with AMF.OCL.Any_Types;
with AMF.OCL.Association_Class_Call_Exps;
with AMF.OCL.Bag_Types;
with AMF.OCL.Boolean_Literal_Exps;
with AMF.OCL.Collection_Items;
with AMF.OCL.Collection_Literal_Exps;
with AMF.OCL.Collection_Ranges;
with AMF.OCL.Collection_Types;
with AMF.OCL.Enum_Literal_Exps;
with AMF.OCL.Expression_In_Ocls;
with AMF.OCL.If_Exps;
with AMF.OCL.Integer_Literal_Exps;
with AMF.OCL.Invalid_Literal_Exps;
with AMF.OCL.Invalid_Types;
with AMF.OCL.Iterate_Exps;
with AMF.OCL.Iterator_Exps;
with AMF.OCL.Let_Exps;
with AMF.OCL.Message_Exps;
with AMF.OCL.Message_Types;
with AMF.OCL.Null_Literal_Exps;
with AMF.OCL.Operation_Call_Exps;
with AMF.OCL.Ordered_Set_Types;
with AMF.OCL.Property_Call_Exps;
with AMF.OCL.Real_Literal_Exps;
with AMF.OCL.Sequence_Types;
with AMF.OCL.Set_Types;
with AMF.OCL.State_Exps;
with AMF.OCL.String_Literal_Exps;
with AMF.OCL.Template_Parameter_Types;
with AMF.OCL.Tuple_Literal_Exps;
with AMF.OCL.Tuple_Literal_Parts;
with AMF.OCL.Tuple_Types;
with AMF.OCL.Type_Exps;
with AMF.OCL.Unlimited_Natural_Literal_Exps;
with AMF.OCL.Unspecified_Value_Exps;
with AMF.OCL.Variable_Exps;
with AMF.OCL.Variables;
with AMF.OCL.Void_Types;
package AMF.Visitors.OCL_Visitors is
pragma Preelaborate;
type OCL_Visitor is limited interface and AMF.Visitors.Abstract_Visitor;
not overriding procedure Enter_Any_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Any_Types.OCL_Any_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Any_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Any_Types.OCL_Any_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Association_Class_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Association_Class_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Association_Class_Call_Exps.OCL_Association_Class_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Bag_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Bag_Types.OCL_Bag_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Bag_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Bag_Types.OCL_Bag_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Boolean_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Boolean_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Boolean_Literal_Exps.OCL_Boolean_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Item
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Items.OCL_Collection_Item_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Item
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Items.OCL_Collection_Item_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Literal_Exps.OCL_Collection_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Range
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Range
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Ranges.OCL_Collection_Range_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Collection_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Types.OCL_Collection_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Collection_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Collection_Types.OCL_Collection_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Enum_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Enum_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Enum_Literal_Exps.OCL_Enum_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Expression_In_Ocl
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Expression_In_Ocl
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Expression_In_Ocls.OCL_Expression_In_Ocl_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_If_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.If_Exps.OCL_If_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_If_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.If_Exps.OCL_If_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Integer_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Integer_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Integer_Literal_Exps.OCL_Integer_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Invalid_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Invalid_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Literal_Exps.OCL_Invalid_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Invalid_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Invalid_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Invalid_Types.OCL_Invalid_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Iterate_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Iterate_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterate_Exps.OCL_Iterate_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Iterator_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Iterator_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Iterator_Exps.OCL_Iterator_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Let_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Let_Exps.OCL_Let_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Let_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Let_Exps.OCL_Let_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Message_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Exps.OCL_Message_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Message_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Exps.OCL_Message_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Message_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Types.OCL_Message_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Message_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Message_Types.OCL_Message_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Null_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Null_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Null_Literal_Exps.OCL_Null_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Operation_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Operation_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Operation_Call_Exps.OCL_Operation_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Ordered_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Ordered_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Ordered_Set_Types.OCL_Ordered_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Property_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Property_Call_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Property_Call_Exps.OCL_Property_Call_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Real_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Real_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Real_Literal_Exps.OCL_Real_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Sequence_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Sequence_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Sequence_Types.OCL_Sequence_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Set_Types.OCL_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Set_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Set_Types.OCL_Set_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_State_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.State_Exps.OCL_State_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_State_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.State_Exps.OCL_State_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_String_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_String_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.String_Literal_Exps.OCL_String_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Template_Parameter_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Template_Parameter_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Template_Parameter_Types.OCL_Template_Parameter_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Exps.OCL_Tuple_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Literal_Part
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Literal_Part
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Literal_Parts.OCL_Tuple_Literal_Part_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Tuple_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Tuple_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Tuple_Types.OCL_Tuple_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Type_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Type_Exps.OCL_Type_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Type_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Type_Exps.OCL_Type_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Unlimited_Natural_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Unlimited_Natural_Literal_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unlimited_Natural_Literal_Exps.OCL_Unlimited_Natural_Literal_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Unspecified_Value_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Unspecified_Value_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Unspecified_Value_Exps.OCL_Unspecified_Value_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Variable
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variables.OCL_Variable_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Variable
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variables.OCL_Variable_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Variable_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Variable_Exp
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Variable_Exps.OCL_Variable_Exp_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Enter_Void_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Void_Types.OCL_Void_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
not overriding procedure Leave_Void_Type
(Self : in out OCL_Visitor;
Element : not null AMF.OCL.Void_Types.OCL_Void_Type_Access;
Control : in out AMF.Visitors.Traverse_Control) is null;
end AMF.Visitors.OCL_Visitors;
|
MinimSecure/unum-sdk | Ada | 983 | ads | -- Copyright 2014-2016 Free Software Foundation, Inc.
--
-- This program 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 3 of the License, or
-- (at your option) any later version.
--
-- This program 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 program. If not, see <http://www.gnu.org/licenses/>.
with System;
package Pck is
type Element is abstract tagged null record;
type GADataType is interface;
type Data_Type is new Element and GADataType with record
I : Integer := 42;
end record;
procedure Do_Nothing (A : System.Address);
end Pck;
|
AdaCore/libadalang | Ada | 347 | adb | separate (Invalid)
procedure Sep_Subp is
package Nested is
procedure P;
end Nested;
package body Nested is
procedure P is separate;
--% node.p_syntactic_fully_qualified_name
end Nested;
begin
declare
procedure P is separate;
--% node.p_syntactic_fully_qualified_name
begin
null;
end;
end;
|
annexi-strayline/AURA | Ada | 7,886 | adb | ------------------------------------------------------------------------------
-- --
-- Ada User Repository Annex (AURA) --
-- ANNEXI-STRAYLINE Reference Implementation --
-- --
-- Command Line Interface --
-- --
-- ------------------------------------------------------------------------ --
-- --
-- Copyright (C) 2020, ANNEXI-STRAYLINE Trans-Human Ltd. --
-- All rights reserved. --
-- --
-- Original Contributors: --
-- * Richard Wai (ANNEXI-STRAYLINE) --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- --
-- * Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A --
-- PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
separate (Specification_Scanner)
procedure Scan_Subprogram
(Buffer : in out Ada_Lexical_Parser.Source_Buffer;
Unit_Tree : in out Declaration_Trees.Tree;
Subprogram_Node: in Declaration_Trees.Cursor)
is
use Ada_Lexical_Parser;
use Declaration_Trees;
package Toolkit is new Parse_Toolkit (Buffer); use Toolkit;
use type WWU.Unbounded_Wide_Wide_String;
This_Ent: Declared_Entity renames Unit_Tree(Subprogram_Node);
procedure Add_Parameter is
Parameter_Ent: Declared_Entity;
begin
Parameter_Ent.Kind := Object_Declaration;
Parameter_Ent.Name := Current_Element.Content;
Next_Element;
Assert_Syntax (Category = Delimiter and then Content = ":");
Next_Element;
while Category = Reserved_Word loop
Assert_Syntax (Content in
"in" | "out"
| "not" | "null" | "access"
| "aliased");
Next_Element;
end loop;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Subtype_Mark);
end Add_Parameter;
begin
This_Ent.Kind := Subprogram_Declaration;
Load_Identifier (This_Ent.Name);
Assert_Syntax (Category in Delimiter | Reserved_Word
and then Content in
";" | "(" | "return"
| "is" | "with" | "renames");
if Category = Delimiter and then Content = "(" then
-- Process parameters
loop
Add_Parameter;
Assert_Syntax (Category = Delimiter);
exit when Content = ")";
Assert_Syntax (Content = ";");
end loop;
Next_Element;
end if;
if Category = Delimiter and then Content = ";" then
return;
end if;
Assert_Syntax (Category in Reserved_Word
and then Content in "return" | "is" | "with" | "renames");
if Content = "return" then
-- Record the subtype mark
Next_Element;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Subtype_Mark);
end if;
if Category = Identifier and then Content = ";" then
return;
end if;
Assert_Syntax (Category = Reserved_Word
and then Content in "is" | "with" | "renames");
if Content = "is" then
-- Either a function expression or a null procedure. We allow either
-- without checking if it really is a function or a procedure because
-- this is just a scanner. We care about an "is" only because we want
-- to extract the expression
Next_Element;
Assert_Syntax
((Category = Delimiter and then Content = "(")
or else (Category = Reserved_Word and then Content = "null"));
if Content = "(" then
-- For ease of parsing, we will pull in the expression including
-- the surrouding parenthesis. This allivates us from needing to
-- track depth. We simply go until we hit "with" or ";".
This_Ent.Expression := Current_Element.Content;
loop
Next_Element;
exit when Category = Delimiter and then Content = ";";
exit when Category = Reserved_Word and then Content = "with";
This_Ent.Expression
:= This_Ent.Expression & Current_Element.Content;
end loop;
elsif Content = "null" then
Next_Element;
Assert_Syntax (Category = Delimiter and then Content = ";");
return;
end if;
end if;
if Category = Identifier and then Content = ";" then
return;
end if;
Assert_Syntax (Category = Reserved_Word
and then Content in "with" | "renames");
-- For renames, rename must come before "with"
-- Also, expression functions obviously cannot also be a rename
if Content = "renames" then
Assert_Syntax (WWU.Length (This_Ent.Expression) = 0);
This_Ent.Is_Renaming := True;
Next_Element;
Assert_Syntax (Category = Identifier);
Load_Identifier (This_Ent.Renamed_Entity_Name);
end if;
Assert_Syntax (Category = Reserved_Word and then Content = "with");
-- We're not interested in the aspect_specification part
Skip_To_Semicolon;
end Scan_Subprogram;
|
reznikmm/matreshka | Ada | 4,801 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with XML.DOM.Visitors;
with ODF.DOM.Db_Table_Filter_Pattern_Elements;
package Matreshka.ODF_Db.Table_Filter_Pattern_Elements is
type Db_Table_Filter_Pattern_Element_Node is
new Matreshka.ODF_Db.Abstract_Db_Element_Node
and ODF.DOM.Db_Table_Filter_Pattern_Elements.ODF_Db_Table_Filter_Pattern
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Elements.Element_L2_Parameters)
return Db_Table_Filter_Pattern_Element_Node;
overriding function Get_Local_Name
(Self : not null access constant Db_Table_Filter_Pattern_Element_Node)
return League.Strings.Universal_String;
overriding procedure Enter_Node
(Self : not null access Db_Table_Filter_Pattern_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Leave_Node
(Self : not null access Db_Table_Filter_Pattern_Element_Node;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
overriding procedure Visit_Node
(Self : not null access Db_Table_Filter_Pattern_Element_Node;
Iterator : in out XML.DOM.Visitors.Abstract_Iterator'Class;
Visitor : in out XML.DOM.Visitors.Abstract_Visitor'Class;
Control : in out XML.DOM.Visitors.Traverse_Control);
end Matreshka.ODF_Db.Table_Filter_Pattern_Elements;
|
tbadyal/Ada_Drivers_Library | Ada | 3,063 | ads | -- This package was generated by the Ada_Drivers_Library project wizard script
package ADL_Config is
Board : constant String := "STM32F407_Discovery"; -- From user input
Architecture : constant String := "ARM"; -- From board definition
Vendor : constant String := "STMicro"; -- From board definition
Device_Family : constant String := "STM32F4"; -- From board definition
Device_Name : constant String := "STM32F407VGTx"; -- From board definition
CPU_Core : constant String := "ARM Cortex-M4F"; -- From mcu definition
High_Speed_External_Clock : constant := 8000000; -- From board definition
Number_Of_Interrupts : constant := 0; -- From user input
Has_ZFP_Runtime : constant String := "False"; -- From board definition
Has_Ravenscar_SFP_Runtime : constant String := "True"; -- From board definition
Has_Ravenscar_Full_Runtime : constant String := "True"; -- From board definition
Runtime_Profile : constant String := "ravenscar-full"; -- From user input
Runtime_Name_Suffix : constant String := "stm32f4"; -- From board definition
Runtime_Name : constant String := "ravenscar-full-stm32f4"; -- From user input
Use_Startup_Gen : constant Boolean := True; -- From user input
Has_Custom_Memory_Area_1 : constant Boolean := True; -- From user input
Custom_Mem_1_Kind : constant String := "RAM"; -- From user input
Custom_Mem_1_Addr : constant := 0; -- From user input
Custom_Mem_1_Size : constant := 1; -- From user input
Custom_Mem_1_Name : constant String := "1"; -- From user input
Has_Custom_Memory_Area_2 : constant Boolean := True; -- From user input
Custom_Mem_2_Kind : constant String := "RAM"; -- From user input
Custom_Mem_2_Addr : constant := 1; -- From user input
Custom_Mem_2_Size : constant := 1; -- From user input
Custom_Mem_2_Name : constant String := "1"; -- From user input
Has_Custom_Memory_Area_3 : constant Boolean := False; -- From user input
Boot_Memory : constant String := "n"; -- From user input
Max_Path_Length : constant := 1024; -- From user input
Max_Mount_Points : constant := 2; -- From user input
Max_Mount_Name_Length : constant := 128; -- From user input
end ADL_Config;
|
AdaCore/Ada_Drivers_Library | Ada | 5,387 | ads | ------------------------------------------------------------------------------
-- --
-- Copyright (C) 2017-2018, AdaCore --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions are --
-- met: --
-- 1. Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- 2. Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in --
-- the documentation and/or other materials provided with the --
-- distribution. --
-- 3. Neither the name of the copyright holder nor the names of its --
-- contributors may be used to endorse or promote products derived --
-- from this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT --
-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, --
-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY --
-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT --
-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE --
-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- This package provides a simulation of digital signals on an electric wire.
-- It can be used to test algorithms using GPIO_Point like protocol bit
-- banging.
with HAL.GPIO; use HAL.GPIO;
package Wire_Simulation is
Unknown_State : exception;
Invalid_Configuration : exception;
type Virtual_Wire (Default_Pull : GPIO_Pull_Resistor;
Max_Points : Positive) is
tagged limited private;
type Any_Virtual_Wire is access all Virtual_Wire'Class;
function Point (This : in out Virtual_Wire;
Id : Positive)
return Any_GPIO_Point
with Pre => Id <= This.Max_Points;
-- Return the GPIO_Point coresponding to the Id
private
type Wire_State is (High, Low, Unknown);
type Wire_Point is new HAL.GPIO.GPIO_Point with record
Current_Mode : GPIO_Mode := Input;
Current_Pull : GPIO_Pull_Resistor := Floating;
Current_State : Boolean := False;
Wire : Any_Virtual_Wire := null;
end record;
overriding
function Support (This : Wire_Point;
Capa : HAL.GPIO.Capability)
return Boolean
is (case Capa is
when others => True);
overriding
function Mode (This : Wire_Point) return GPIO_Mode is (This.Current_Mode);
overriding
procedure Set_Mode (This : in out Wire_Point;
Mode : GPIO_Config_Mode);
-- Return False if the mode is not available
overriding
function Pull_Resistor (This : Wire_Point)
return GPIO_Pull_Resistor is (This.Current_Pull);
overriding
procedure Set_Pull_Resistor (This : in out Wire_Point;
Pull : GPIO_Pull_Resistor);
overriding
function Set (This : Wire_Point) return Boolean;
overriding
procedure Set (This : in out Wire_Point);
overriding
procedure Clear (This : in out Wire_Point);
overriding
procedure Toggle (This : in out Wire_Point);
type Wire_Point_Array is array (Natural range <>) of aliased Wire_Point;
type Virtual_Wire (Default_Pull : GPIO_Pull_Resistor;
Max_Points : Positive) is
tagged limited record
State : Wire_State := (case Default_Pull is
when Pull_Down => Low,
when Pull_Up => High,
when Floating => Unknown);
Points : aliased Wire_Point_Array (1 .. Max_Points);
end record;
procedure Update_Wire_State (This : in out Virtual_Wire);
function At_Least_One_Output (This : Virtual_Wire) return Boolean;
-- Return True if at least one GPIO point is configured as output
function At_Least_One_Pull_Up (This : Virtual_Wire) return Boolean;
-- Return True if at least one GPIO point is configured as pull up
function At_Least_One_Pull_Down (This : Virtual_Wire) return Boolean;
-- Return True if at least one GPIO point is configured as pull down
end Wire_Simulation;
|
zhmu/ananas | Ada | 2,600 | adb | ------------------------------------------------------------------------------
-- --
-- GNAT LIBRARY COMPONENTS --
-- --
-- ADA.STRINGS.UNBOUNDED.HASH_CASE_INSENSITIVE --
-- --
-- B o d y --
-- --
-- Copyright (C) 2011-2022, Free Software Foundation, Inc. --
-- --
-- GNAT is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- ware Foundation; either version 3, or (at your option) any later ver- --
-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE. --
-- --
-- As a special exception under Section 7 of GPL version 3, you are granted --
-- additional permissions described in the GCC Runtime Library Exception, --
-- version 3.1, as published by the Free Software Foundation. --
-- --
-- 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/>. --
-- --
-- This unit was originally developed by Matthew J Heaney. --
------------------------------------------------------------------------------
with Ada.Strings.Unbounded.Aux;
with Ada.Strings.Hash_Case_Insensitive;
function Ada.Strings.Unbounded.Hash_Case_Insensitive
(Key : Unbounded.Unbounded_String)
return Containers.Hash_Type
is
S : Aux.Big_String_Access;
L : Natural;
begin
Aux.Get_String (Key, S, L);
return Ada.Strings.Hash_Case_Insensitive (S (1 .. L));
end Ada.Strings.Unbounded.Hash_Case_Insensitive;
|
docandrew/troodon | Ada | 192,827 | ads | pragma Ada_2012;
pragma Style_Checks (Off);
with Interfaces.C; use Interfaces.C;
with xcb;
with bits_stdint_uintn_h;
with xproto;
with bits_stdint_intn_h;
with xcb_render;
with System;
with Interfaces.C.Strings;
package xcb_randr is
XCB_RANDR_MAJOR_VERSION : constant := 1; -- /usr/include/xcb/randr.h:23
XCB_RANDR_MINOR_VERSION : constant := 6; -- /usr/include/xcb/randr.h:24
CONST_XCB_RANDR_BAD_OUTPUT : constant := 0; -- /usr/include/xcb/randr.h:84
CONST_XCB_RANDR_BAD_CRTC : constant := 1; -- /usr/include/xcb/randr.h:96
CONST_XCB_RANDR_BAD_MODE : constant := 2; -- /usr/include/xcb/randr.h:108
CONST_XCB_RANDR_BAD_PROVIDER : constant := 3; -- /usr/include/xcb/randr.h:120
CONST_XCB_RANDR_QUERY_VERSION : constant := 0; -- /usr/include/xcb/randr.h:183
CONST_XCB_RANDR_SET_SCREEN_CONFIG : constant := 2; -- /usr/include/xcb/randr.h:224
CONST_XCB_RANDR_SELECT_INPUT : constant := 4; -- /usr/include/xcb/randr.h:269
CONST_XCB_RANDR_GET_SCREEN_INFO : constant := 5; -- /usr/include/xcb/randr.h:291
CONST_XCB_RANDR_GET_SCREEN_SIZE_RANGE : constant := 6; -- /usr/include/xcb/randr.h:330
CONST_XCB_RANDR_SET_SCREEN_SIZE : constant := 7; -- /usr/include/xcb/randr.h:358
CONST_XCB_RANDR_GET_SCREEN_RESOURCES : constant := 8; -- /usr/include/xcb/randr.h:427
CONST_XCB_RANDR_GET_OUTPUT_INFO : constant := 9; -- /usr/include/xcb/randr.h:470
CONST_XCB_RANDR_LIST_OUTPUT_PROPERTIES : constant := 10; -- /usr/include/xcb/randr.h:512
CONST_XCB_RANDR_QUERY_OUTPUT_PROPERTY : constant := 11; -- /usr/include/xcb/randr.h:544
CONST_XCB_RANDR_CONFIGURE_OUTPUT_PROPERTY : constant := 12; -- /usr/include/xcb/randr.h:572
CONST_XCB_RANDR_CHANGE_OUTPUT_PROPERTY : constant := 13; -- /usr/include/xcb/randr.h:589
CONST_XCB_RANDR_DELETE_OUTPUT_PROPERTY : constant := 14; -- /usr/include/xcb/randr.h:608
CONST_XCB_RANDR_GET_OUTPUT_PROPERTY : constant := 15; -- /usr/include/xcb/randr.h:629
CONST_XCB_RANDR_CREATE_MODE : constant := 16; -- /usr/include/xcb/randr.h:670
CONST_XCB_RANDR_DESTROY_MODE : constant := 17; -- /usr/include/xcb/randr.h:696
CONST_XCB_RANDR_ADD_OUTPUT_MODE : constant := 18; -- /usr/include/xcb/randr.h:709
CONST_XCB_RANDR_DELETE_OUTPUT_MODE : constant := 19; -- /usr/include/xcb/randr.h:723
CONST_XCB_RANDR_GET_CRTC_INFO : constant := 20; -- /usr/include/xcb/randr.h:744
CONST_XCB_RANDR_SET_CRTC_CONFIG : constant := 21; -- /usr/include/xcb/randr.h:785
CONST_XCB_RANDR_GET_CRTC_GAMMA_SIZE : constant := 22; -- /usr/include/xcb/randr.h:824
CONST_XCB_RANDR_GET_CRTC_GAMMA : constant := 23; -- /usr/include/xcb/randr.h:856
CONST_XCB_RANDR_SET_CRTC_GAMMA : constant := 24; -- /usr/include/xcb/randr.h:881
CONST_XCB_RANDR_GET_SCREEN_RESOURCES_CURRENT : constant := 25; -- /usr/include/xcb/randr.h:903
CONST_XCB_RANDR_SET_CRTC_TRANSFORM : constant := 26; -- /usr/include/xcb/randr.h:940
CONST_XCB_RANDR_GET_CRTC_TRANSFORM : constant := 27; -- /usr/include/xcb/randr.h:963
CONST_XCB_RANDR_GET_PANNING : constant := 28; -- /usr/include/xcb/randr.h:1002
CONST_XCB_RANDR_SET_PANNING : constant := 29; -- /usr/include/xcb/randr.h:1045
CONST_XCB_RANDR_SET_OUTPUT_PRIMARY : constant := 30; -- /usr/include/xcb/randr.h:1082
CONST_XCB_RANDR_GET_OUTPUT_PRIMARY : constant := 31; -- /usr/include/xcb/randr.h:1103
CONST_XCB_RANDR_GET_PROVIDERS : constant := 32; -- /usr/include/xcb/randr.h:1134
CONST_XCB_RANDR_GET_PROVIDER_INFO : constant := 33; -- /usr/include/xcb/randr.h:1174
CONST_XCB_RANDR_SET_PROVIDER_OFFLOAD_SINK : constant := 34; -- /usr/include/xcb/randr.h:1205
CONST_XCB_RANDR_SET_PROVIDER_OUTPUT_SOURCE : constant := 35; -- /usr/include/xcb/randr.h:1220
CONST_XCB_RANDR_LIST_PROVIDER_PROPERTIES : constant := 36; -- /usr/include/xcb/randr.h:1242
CONST_XCB_RANDR_QUERY_PROVIDER_PROPERTY : constant := 37; -- /usr/include/xcb/randr.h:1274
CONST_XCB_RANDR_CONFIGURE_PROVIDER_PROPERTY : constant := 38; -- /usr/include/xcb/randr.h:1302
CONST_XCB_RANDR_CHANGE_PROVIDER_PROPERTY : constant := 39; -- /usr/include/xcb/randr.h:1319
CONST_XCB_RANDR_DELETE_PROVIDER_PROPERTY : constant := 40; -- /usr/include/xcb/randr.h:1338
CONST_XCB_RANDR_GET_PROVIDER_PROPERTY : constant := 41; -- /usr/include/xcb/randr.h:1359
CONST_XCB_RANDR_SCREEN_CHANGE_NOTIFY : constant := 0; -- /usr/include/xcb/randr.h:1393
CONST_XCB_RANDR_GET_MONITORS : constant := 42; -- /usr/include/xcb/randr.h:1585
CONST_XCB_RANDR_SET_MONITOR : constant := 43; -- /usr/include/xcb/randr.h:1613
CONST_XCB_RANDR_DELETE_MONITOR : constant := 44; -- /usr/include/xcb/randr.h:1626
CONST_XCB_RANDR_CREATE_LEASE : constant := 45; -- /usr/include/xcb/randr.h:1647
CONST_XCB_RANDR_FREE_LEASE : constant := 46; -- /usr/include/xcb/randr.h:1674
CONST_XCB_RANDR_NOTIFY : constant := 1; -- /usr/include/xcb/randr.h:1730
xcb_randr_id : aliased xcb.xcb_extension_t -- /usr/include/xcb/randr.h:26
with Import => True,
Convention => C,
External_Name => "xcb_randr_id";
subtype xcb_randr_mode_t is bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:28
type xcb_randr_mode_iterator_t is record
data : access xcb_randr_mode_t; -- /usr/include/xcb/randr.h:34
c_rem : aliased int; -- /usr/include/xcb/randr.h:35
index : aliased int; -- /usr/include/xcb/randr.h:36
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:33
subtype xcb_randr_crtc_t is bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:39
type xcb_randr_crtc_iterator_t is record
data : access xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:45
c_rem : aliased int; -- /usr/include/xcb/randr.h:46
index : aliased int; -- /usr/include/xcb/randr.h:47
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:44
subtype xcb_randr_output_t is bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:50
type xcb_randr_output_iterator_t is record
data : access xcb_randr_output_t; -- /usr/include/xcb/randr.h:56
c_rem : aliased int; -- /usr/include/xcb/randr.h:57
index : aliased int; -- /usr/include/xcb/randr.h:58
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:55
subtype xcb_randr_provider_t is bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:61
type xcb_randr_provider_iterator_t is record
data : access xcb_randr_provider_t; -- /usr/include/xcb/randr.h:67
c_rem : aliased int; -- /usr/include/xcb/randr.h:68
index : aliased int; -- /usr/include/xcb/randr.h:69
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:66
subtype xcb_randr_lease_t is bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:72
type xcb_randr_lease_iterator_t is record
data : access xcb_randr_lease_t; -- /usr/include/xcb/randr.h:78
c_rem : aliased int; -- /usr/include/xcb/randr.h:79
index : aliased int; -- /usr/include/xcb/randr.h:80
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:77
type xcb_randr_bad_output_error_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:90
error_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:91
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:92
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:89
type xcb_randr_bad_crtc_error_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:102
error_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:103
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:104
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:101
type xcb_randr_bad_mode_error_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:114
error_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:115
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:116
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:113
type xcb_randr_bad_provider_error_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:126
error_code : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:127
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:128
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:125
subtype xcb_randr_rotation_t is unsigned;
XCB_RANDR_ROTATION_ROTATE_0 : constant unsigned := 1;
XCB_RANDR_ROTATION_ROTATE_90 : constant unsigned := 2;
XCB_RANDR_ROTATION_ROTATE_180 : constant unsigned := 4;
XCB_RANDR_ROTATION_ROTATE_270 : constant unsigned := 8;
XCB_RANDR_ROTATION_REFLECT_X : constant unsigned := 16;
XCB_RANDR_ROTATION_REFLECT_Y : constant unsigned := 32; -- /usr/include/xcb/randr.h:131
type xcb_randr_screen_size_t is record
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:144
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:145
mwidth : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:146
mheight : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:147
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:143
type xcb_randr_screen_size_iterator_t is record
data : access xcb_randr_screen_size_t; -- /usr/include/xcb/randr.h:154
c_rem : aliased int; -- /usr/include/xcb/randr.h:155
index : aliased int; -- /usr/include/xcb/randr.h:156
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:153
type xcb_randr_refresh_rates_t is record
nRates : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:163
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:162
type xcb_randr_refresh_rates_iterator_t is record
data : access xcb_randr_refresh_rates_t; -- /usr/include/xcb/randr.h:170
c_rem : aliased int; -- /usr/include/xcb/randr.h:171
index : aliased int; -- /usr/include/xcb/randr.h:172
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:169
type xcb_randr_query_version_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:179
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:178
type xcb_randr_query_version_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:189
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:190
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:191
major_version : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:192
minor_version : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:193
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:188
type xcb_randr_query_version_reply_t_array4353 is array (0 .. 15) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_query_version_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:200
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:201
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:202
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:203
major_version : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:204
minor_version : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:205
pad1 : aliased xcb_randr_query_version_reply_t_array4353; -- /usr/include/xcb/randr.h:206
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:199
type xcb_randr_set_config_t is
(XCB_RANDR_SET_CONFIG_SUCCESS,
XCB_RANDR_SET_CONFIG_INVALID_CONFIG_TIME,
XCB_RANDR_SET_CONFIG_INVALID_TIME,
XCB_RANDR_SET_CONFIG_FAILED)
with Convention => C; -- /usr/include/xcb/randr.h:209
type xcb_randr_set_screen_config_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:220
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:219
type xcb_randr_set_screen_config_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_screen_config_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:230
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:231
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:232
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:233
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:234
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:235
sizeID : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:236
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:237
rate : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:238
pad0 : aliased xcb_randr_set_screen_config_request_t_array1823; -- /usr/include/xcb/randr.h:239
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:229
type xcb_randr_set_screen_config_reply_t_array5087 is array (0 .. 9) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_screen_config_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:246
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:247
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:248
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:249
new_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:250
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:251
root : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:252
subpixel_order : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:253
pad0 : aliased xcb_randr_set_screen_config_reply_t_array5087; -- /usr/include/xcb/randr.h:254
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:245
subtype xcb_randr_notify_mask_t is unsigned;
XCB_RANDR_NOTIFY_MASK_SCREEN_CHANGE : constant unsigned := 1;
XCB_RANDR_NOTIFY_MASK_CRTC_CHANGE : constant unsigned := 2;
XCB_RANDR_NOTIFY_MASK_OUTPUT_CHANGE : constant unsigned := 4;
XCB_RANDR_NOTIFY_MASK_OUTPUT_PROPERTY : constant unsigned := 8;
XCB_RANDR_NOTIFY_MASK_PROVIDER_CHANGE : constant unsigned := 16;
XCB_RANDR_NOTIFY_MASK_PROVIDER_PROPERTY : constant unsigned := 32;
XCB_RANDR_NOTIFY_MASK_RESOURCE_CHANGE : constant unsigned := 64;
XCB_RANDR_NOTIFY_MASK_LEASE : constant unsigned := 128; -- /usr/include/xcb/randr.h:257
type xcb_randr_select_input_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_select_input_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:275
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:276
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:277
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:278
enable : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:279
pad0 : aliased xcb_randr_select_input_request_t_array1823; -- /usr/include/xcb/randr.h:280
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:274
type xcb_randr_get_screen_info_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:287
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:286
type xcb_randr_get_screen_info_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:297
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:298
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:299
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:300
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:296
type xcb_randr_get_screen_info_reply_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_screen_info_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:307
rotations : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:308
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:309
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:310
root : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:311
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:312
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:313
nSizes : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:314
sizeID : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:315
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:316
rate : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:317
nInfo : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:318
pad0 : aliased xcb_randr_get_screen_info_reply_t_array1823; -- /usr/include/xcb/randr.h:319
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:306
type xcb_randr_get_screen_size_range_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:326
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:325
type xcb_randr_get_screen_size_range_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:336
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:337
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:338
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:339
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:335
type xcb_randr_get_screen_size_range_reply_t_array4353 is array (0 .. 15) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_screen_size_range_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:346
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:347
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:348
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:349
min_width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:350
min_height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:351
max_width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:352
max_height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:353
pad1 : aliased xcb_randr_get_screen_size_range_reply_t_array4353; -- /usr/include/xcb/randr.h:354
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:345
type xcb_randr_set_screen_size_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:364
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:365
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:366
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:367
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:368
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:369
mm_width : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:370
mm_height : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:371
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:363
subtype xcb_randr_mode_flag_t is unsigned;
XCB_RANDR_MODE_FLAG_HSYNC_POSITIVE : constant unsigned := 1;
XCB_RANDR_MODE_FLAG_HSYNC_NEGATIVE : constant unsigned := 2;
XCB_RANDR_MODE_FLAG_VSYNC_POSITIVE : constant unsigned := 4;
XCB_RANDR_MODE_FLAG_VSYNC_NEGATIVE : constant unsigned := 8;
XCB_RANDR_MODE_FLAG_INTERLACE : constant unsigned := 16;
XCB_RANDR_MODE_FLAG_DOUBLE_SCAN : constant unsigned := 32;
XCB_RANDR_MODE_FLAG_CSYNC : constant unsigned := 64;
XCB_RANDR_MODE_FLAG_CSYNC_POSITIVE : constant unsigned := 128;
XCB_RANDR_MODE_FLAG_CSYNC_NEGATIVE : constant unsigned := 256;
XCB_RANDR_MODE_FLAG_HSKEW_PRESENT : constant unsigned := 512;
XCB_RANDR_MODE_FLAG_BCAST : constant unsigned := 1024;
XCB_RANDR_MODE_FLAG_PIXEL_MULTIPLEX : constant unsigned := 2048;
XCB_RANDR_MODE_FLAG_DOUBLE_CLOCK : constant unsigned := 4096;
XCB_RANDR_MODE_FLAG_HALVE_CLOCK : constant unsigned := 8192; -- /usr/include/xcb/randr.h:374
type xcb_randr_mode_info_t is record
id : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:395
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:396
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:397
dot_clock : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:398
hsync_start : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:399
hsync_end : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:400
htotal : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:401
hskew : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:402
vsync_start : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:403
vsync_end : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:404
vtotal : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:405
name_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:406
mode_flags : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:407
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:394
type xcb_randr_mode_info_iterator_t is record
data : access xcb_randr_mode_info_t; -- /usr/include/xcb/randr.h:414
c_rem : aliased int; -- /usr/include/xcb/randr.h:415
index : aliased int; -- /usr/include/xcb/randr.h:416
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:413
type xcb_randr_get_screen_resources_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:423
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:422
type xcb_randr_get_screen_resources_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:433
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:434
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:435
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:436
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:432
type xcb_randr_get_screen_resources_reply_t_array2620 is array (0 .. 7) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_screen_resources_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:443
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:444
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:445
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:446
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:447
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:448
num_crtcs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:449
num_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:450
num_modes : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:451
names_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:452
pad1 : aliased xcb_randr_get_screen_resources_reply_t_array2620; -- /usr/include/xcb/randr.h:453
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:442
type xcb_randr_connection_t is
(XCB_RANDR_CONNECTION_CONNECTED,
XCB_RANDR_CONNECTION_DISCONNECTED,
XCB_RANDR_CONNECTION_UNKNOWN)
with Convention => C; -- /usr/include/xcb/randr.h:456
type xcb_randr_get_output_info_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:466
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:465
type xcb_randr_get_output_info_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:476
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:477
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:478
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:479
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:480
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:475
type xcb_randr_get_output_info_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:487
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:488
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:489
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:490
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:491
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:492
mm_width : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:493
mm_height : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:494
connection : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:495
subpixel_order : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:496
num_crtcs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:497
num_modes : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:498
num_preferred : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:499
num_clones : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:500
name_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:501
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:486
type xcb_randr_list_output_properties_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:508
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:507
type xcb_randr_list_output_properties_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:518
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:519
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:520
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:521
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:517
type xcb_randr_list_output_properties_reply_t_array2015 is array (0 .. 21) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_list_output_properties_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:528
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:529
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:530
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:531
num_atoms : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:532
pad1 : aliased xcb_randr_list_output_properties_reply_t_array2015; -- /usr/include/xcb/randr.h:533
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:527
type xcb_randr_query_output_property_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:540
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:539
type xcb_randr_query_output_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:550
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:551
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:552
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:553
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:554
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:549
type xcb_randr_query_output_property_reply_t_array5167 is array (0 .. 20) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_query_output_property_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:561
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:562
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:563
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:564
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:565
c_range : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:566
immutable : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:567
pad1 : aliased xcb_randr_query_output_property_reply_t_array5167; -- /usr/include/xcb/randr.h:568
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:560
type xcb_randr_configure_output_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_configure_output_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:578
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:579
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:580
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:581
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:582
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:583
c_range : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:584
pad0 : aliased xcb_randr_configure_output_property_request_t_array1823; -- /usr/include/xcb/randr.h:585
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:577
type xcb_randr_change_output_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_change_output_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:595
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:596
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:597
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:598
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:599
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:600
format : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:601
mode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:602
pad0 : aliased xcb_randr_change_output_property_request_t_array1823; -- /usr/include/xcb/randr.h:603
num_units : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:604
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:594
type xcb_randr_delete_output_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:614
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:615
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:616
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:617
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:618
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:613
type xcb_randr_get_output_property_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:625
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:624
type xcb_randr_get_output_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_output_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:635
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:636
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:637
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:638
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:639
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:640
long_offset : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:641
long_length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:642
u_delete : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:643
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:644
pad0 : aliased xcb_randr_get_output_property_request_t_array1823; -- /usr/include/xcb/randr.h:645
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:634
type xcb_randr_get_output_property_reply_t_array2180 is array (0 .. 11) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_output_property_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:652
format : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:653
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:654
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:655
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:656
bytes_after : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:657
num_items : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:658
pad0 : aliased xcb_randr_get_output_property_reply_t_array2180; -- /usr/include/xcb/randr.h:659
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:651
type xcb_randr_create_mode_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:666
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:665
type xcb_randr_create_mode_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:676
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:677
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:678
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:679
mode_info : aliased xcb_randr_mode_info_t; -- /usr/include/xcb/randr.h:680
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:675
type xcb_randr_create_mode_reply_t_array1992 is array (0 .. 19) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_create_mode_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:687
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:688
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:689
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:690
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:691
pad1 : aliased xcb_randr_create_mode_reply_t_array1992; -- /usr/include/xcb/randr.h:692
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:686
type xcb_randr_destroy_mode_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:702
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:703
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:704
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:705
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:701
type xcb_randr_add_output_mode_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:715
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:716
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:717
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:718
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:719
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:714
type xcb_randr_delete_output_mode_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:729
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:730
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:731
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:732
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:733
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:728
type xcb_randr_get_crtc_info_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:740
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:739
type xcb_randr_get_crtc_info_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:750
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:751
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:752
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:753
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:754
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:749
type xcb_randr_get_crtc_info_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:761
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:762
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:763
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:764
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:765
x : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:766
y : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:767
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:768
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:769
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:770
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:771
rotations : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:772
num_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:773
num_possible_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:774
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:760
type xcb_randr_set_crtc_config_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:781
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:780
type xcb_randr_set_crtc_config_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_crtc_config_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:791
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:792
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:793
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:794
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:795
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:796
x : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:797
y : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:798
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:799
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:800
pad0 : aliased xcb_randr_set_crtc_config_request_t_array1823; -- /usr/include/xcb/randr.h:801
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:790
type xcb_randr_set_crtc_config_reply_t_array1992 is array (0 .. 19) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_crtc_config_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:808
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:809
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:810
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:811
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:812
pad0 : aliased xcb_randr_set_crtc_config_reply_t_array1992; -- /usr/include/xcb/randr.h:813
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:807
type xcb_randr_get_crtc_gamma_size_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:820
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:819
type xcb_randr_get_crtc_gamma_size_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:830
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:831
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:832
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:833
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:829
type xcb_randr_get_crtc_gamma_size_reply_t_array2015 is array (0 .. 21) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_crtc_gamma_size_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:840
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:841
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:842
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:843
size : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:844
pad1 : aliased xcb_randr_get_crtc_gamma_size_reply_t_array2015; -- /usr/include/xcb/randr.h:845
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:839
type xcb_randr_get_crtc_gamma_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:852
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:851
type xcb_randr_get_crtc_gamma_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:862
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:863
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:864
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:865
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:861
type xcb_randr_get_crtc_gamma_reply_t_array2015 is array (0 .. 21) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_crtc_gamma_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:872
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:873
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:874
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:875
size : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:876
pad1 : aliased xcb_randr_get_crtc_gamma_reply_t_array2015; -- /usr/include/xcb/randr.h:877
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:871
type xcb_randr_set_crtc_gamma_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_crtc_gamma_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:887
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:888
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:889
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:890
size : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:891
pad0 : aliased xcb_randr_set_crtc_gamma_request_t_array1823; -- /usr/include/xcb/randr.h:892
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:886
type xcb_randr_get_screen_resources_current_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:899
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:898
type xcb_randr_get_screen_resources_current_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:909
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:910
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:911
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:912
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:908
type xcb_randr_get_screen_resources_current_reply_t_array2620 is array (0 .. 7) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_screen_resources_current_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:919
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:920
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:921
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:922
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:923
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:924
num_crtcs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:925
num_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:926
num_modes : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:927
names_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:928
pad1 : aliased xcb_randr_get_screen_resources_current_reply_t_array2620; -- /usr/include/xcb/randr.h:929
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:918
subtype xcb_randr_transform_t is unsigned;
XCB_RANDR_TRANSFORM_UNIT : constant unsigned := 1;
XCB_RANDR_TRANSFORM_SCALE_UP : constant unsigned := 2;
XCB_RANDR_TRANSFORM_SCALE_DOWN : constant unsigned := 4;
XCB_RANDR_TRANSFORM_PROJECTIVE : constant unsigned := 8; -- /usr/include/xcb/randr.h:932
type xcb_randr_set_crtc_transform_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_set_crtc_transform_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:946
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:947
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:948
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:949
transform : aliased xcb_render.xcb_render_transform_t; -- /usr/include/xcb/randr.h:950
filter_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:951
pad0 : aliased xcb_randr_set_crtc_transform_request_t_array1823; -- /usr/include/xcb/randr.h:952
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:945
type xcb_randr_get_crtc_transform_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:959
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:958
type xcb_randr_get_crtc_transform_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:969
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:970
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:971
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:972
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:968
type xcb_randr_get_crtc_transform_reply_t_array1897 is array (0 .. 2) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_crtc_transform_reply_t_array1791 is array (0 .. 3) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_crtc_transform_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:979
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:980
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:981
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:982
pending_transform : aliased xcb_render.xcb_render_transform_t; -- /usr/include/xcb/randr.h:983
has_transforms : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:984
pad1 : aliased xcb_randr_get_crtc_transform_reply_t_array1897; -- /usr/include/xcb/randr.h:985
current_transform : aliased xcb_render.xcb_render_transform_t; -- /usr/include/xcb/randr.h:986
pad2 : aliased xcb_randr_get_crtc_transform_reply_t_array1791; -- /usr/include/xcb/randr.h:987
pending_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:988
pending_nparams : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:989
current_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:990
current_nparams : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:991
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:978
type xcb_randr_get_panning_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:998
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:997
type xcb_randr_get_panning_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1008
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1009
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1010
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:1011
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1007
type xcb_randr_get_panning_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1018
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1019
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1020
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1021
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1022
left : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1023
top : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1024
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1025
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1026
track_left : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1027
track_top : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1028
track_width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1029
track_height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1030
border_left : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1031
border_top : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1032
border_right : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1033
border_bottom : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1034
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1017
type xcb_randr_set_panning_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1041
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1040
type xcb_randr_set_panning_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1051
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1052
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1053
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:1054
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1055
left : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1056
top : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1057
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1058
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1059
track_left : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1060
track_top : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1061
track_width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1062
track_height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1063
border_left : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1064
border_top : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1065
border_right : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1066
border_bottom : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1067
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1050
type xcb_randr_set_panning_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1074
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1075
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1076
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1077
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1078
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1073
type xcb_randr_set_output_primary_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1088
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1089
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1090
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1091
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:1092
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1087
type xcb_randr_get_output_primary_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1099
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1098
type xcb_randr_get_output_primary_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1109
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1110
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1111
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1112
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1108
type xcb_randr_get_output_primary_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1119
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1120
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1121
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1122
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:1123
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1118
type xcb_randr_get_providers_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1130
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1129
type xcb_randr_get_providers_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1140
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1141
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1142
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1143
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1139
type xcb_randr_get_providers_reply_t_array2771 is array (0 .. 17) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_providers_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1150
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1151
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1152
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1153
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1154
num_providers : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1155
pad1 : aliased xcb_randr_get_providers_reply_t_array2771; -- /usr/include/xcb/randr.h:1156
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1149
subtype xcb_randr_provider_capability_t is unsigned;
XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OUTPUT : constant unsigned := 1;
XCB_RANDR_PROVIDER_CAPABILITY_SINK_OUTPUT : constant unsigned := 2;
XCB_RANDR_PROVIDER_CAPABILITY_SOURCE_OFFLOAD : constant unsigned := 4;
XCB_RANDR_PROVIDER_CAPABILITY_SINK_OFFLOAD : constant unsigned := 8; -- /usr/include/xcb/randr.h:1159
type xcb_randr_get_provider_info_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1170
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1169
type xcb_randr_get_provider_info_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1180
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1181
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1182
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1183
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1184
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1179
type xcb_randr_get_provider_info_reply_t_array2620 is array (0 .. 7) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_provider_info_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1191
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1192
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1193
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1194
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1195
capabilities : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1196
num_crtcs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1197
num_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1198
num_associated_providers : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1199
name_len : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1200
pad0 : aliased xcb_randr_get_provider_info_reply_t_array2620; -- /usr/include/xcb/randr.h:1201
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1190
type xcb_randr_set_provider_offload_sink_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1211
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1212
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1213
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1214
sink_provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1215
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1216
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1210
type xcb_randr_set_provider_output_source_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1226
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1227
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1228
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1229
source_provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1230
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1231
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1225
type xcb_randr_list_provider_properties_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1238
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1237
type xcb_randr_list_provider_properties_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1248
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1249
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1250
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1251
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1247
type xcb_randr_list_provider_properties_reply_t_array2015 is array (0 .. 21) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_list_provider_properties_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1258
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1259
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1260
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1261
num_atoms : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1262
pad1 : aliased xcb_randr_list_provider_properties_reply_t_array2015; -- /usr/include/xcb/randr.h:1263
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1257
type xcb_randr_query_provider_property_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1270
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1269
type xcb_randr_query_provider_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1280
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1281
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1282
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1283
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1284
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1279
type xcb_randr_query_provider_property_reply_t_array5167 is array (0 .. 20) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_query_provider_property_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1291
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1292
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1293
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1294
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1295
c_range : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1296
immutable : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1297
pad1 : aliased xcb_randr_query_provider_property_reply_t_array5167; -- /usr/include/xcb/randr.h:1298
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1290
type xcb_randr_configure_provider_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_configure_provider_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1308
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1309
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1310
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1311
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1312
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1313
c_range : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1314
pad0 : aliased xcb_randr_configure_provider_property_request_t_array1823; -- /usr/include/xcb/randr.h:1315
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1307
type xcb_randr_change_provider_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_change_provider_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1325
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1326
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1327
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1328
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1329
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1330
format : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1331
mode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1332
pad0 : aliased xcb_randr_change_provider_property_request_t_array1823; -- /usr/include/xcb/randr.h:1333
num_items : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1334
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1324
type xcb_randr_delete_provider_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1344
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1345
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1346
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1347
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1348
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1343
type xcb_randr_get_provider_property_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1355
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1354
type xcb_randr_get_provider_property_request_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_provider_property_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1365
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1366
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1367
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1368
property : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1369
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1370
long_offset : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1371
long_length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1372
u_delete : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1373
pending : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1374
pad0 : aliased xcb_randr_get_provider_property_request_t_array1823; -- /usr/include/xcb/randr.h:1375
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1364
type xcb_randr_get_provider_property_reply_t_array2180 is array (0 .. 11) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_provider_property_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1382
format : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1383
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1384
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1385
c_type : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1386
bytes_after : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1387
num_items : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1388
pad0 : aliased xcb_randr_get_provider_property_reply_t_array2180; -- /usr/include/xcb/randr.h:1389
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1381
type xcb_randr_screen_change_notify_event_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1399
rotation : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1400
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1401
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1402
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1403
root : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1404
request_window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1405
sizeID : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1406
subpixel_order : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1407
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1408
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1409
mwidth : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1410
mheight : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1411
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1398
type xcb_randr_notify_t is
(XCB_RANDR_NOTIFY_CRTC_CHANGE,
XCB_RANDR_NOTIFY_OUTPUT_CHANGE,
XCB_RANDR_NOTIFY_OUTPUT_PROPERTY,
XCB_RANDR_NOTIFY_PROVIDER_CHANGE,
XCB_RANDR_NOTIFY_PROVIDER_PROPERTY,
XCB_RANDR_NOTIFY_RESOURCE_CHANGE,
XCB_RANDR_NOTIFY_LEASE)
with Convention => C; -- /usr/include/xcb/randr.h:1414
type xcb_randr_crtc_change_t_array1823 is array (0 .. 1) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_crtc_change_t is record
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1428
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1429
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:1430
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:1431
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1432
pad0 : aliased xcb_randr_crtc_change_t_array1823; -- /usr/include/xcb/randr.h:1433
x : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1434
y : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1435
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1436
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1437
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1427
type xcb_randr_crtc_change_iterator_t is record
data : access xcb_randr_crtc_change_t; -- /usr/include/xcb/randr.h:1444
c_rem : aliased int; -- /usr/include/xcb/randr.h:1445
index : aliased int; -- /usr/include/xcb/randr.h:1446
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1443
type xcb_randr_output_change_t is record
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1453
config_timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1454
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1455
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:1456
crtc : aliased xcb_randr_crtc_t; -- /usr/include/xcb/randr.h:1457
mode : aliased xcb_randr_mode_t; -- /usr/include/xcb/randr.h:1458
rotation : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1459
connection : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1460
subpixel_order : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1461
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1452
type xcb_randr_output_change_iterator_t is record
data : access xcb_randr_output_change_t; -- /usr/include/xcb/randr.h:1468
c_rem : aliased int; -- /usr/include/xcb/randr.h:1469
index : aliased int; -- /usr/include/xcb/randr.h:1470
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1467
type xcb_randr_output_property_t_array5387 is array (0 .. 10) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_output_property_t is record
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1477
output : aliased xcb_randr_output_t; -- /usr/include/xcb/randr.h:1478
atom : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1479
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1480
status : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1481
pad0 : aliased xcb_randr_output_property_t_array5387; -- /usr/include/xcb/randr.h:1482
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1476
type xcb_randr_output_property_iterator_t is record
data : access xcb_randr_output_property_t; -- /usr/include/xcb/randr.h:1489
c_rem : aliased int; -- /usr/include/xcb/randr.h:1490
index : aliased int; -- /usr/include/xcb/randr.h:1491
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1488
type xcb_randr_provider_change_t_array4353 is array (0 .. 15) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_provider_change_t is record
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1498
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1499
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1500
pad0 : aliased xcb_randr_provider_change_t_array4353; -- /usr/include/xcb/randr.h:1501
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1497
type xcb_randr_provider_change_iterator_t is record
data : access xcb_randr_provider_change_t; -- /usr/include/xcb/randr.h:1508
c_rem : aliased int; -- /usr/include/xcb/randr.h:1509
index : aliased int; -- /usr/include/xcb/randr.h:1510
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1507
type xcb_randr_provider_property_t_array5387 is array (0 .. 10) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_provider_property_t is record
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1517
provider : aliased xcb_randr_provider_t; -- /usr/include/xcb/randr.h:1518
atom : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1519
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1520
state : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1521
pad0 : aliased xcb_randr_provider_property_t_array5387; -- /usr/include/xcb/randr.h:1522
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1516
type xcb_randr_provider_property_iterator_t is record
data : access xcb_randr_provider_property_t; -- /usr/include/xcb/randr.h:1529
c_rem : aliased int; -- /usr/include/xcb/randr.h:1530
index : aliased int; -- /usr/include/xcb/randr.h:1531
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1528
type xcb_randr_resource_change_t_array1992 is array (0 .. 19) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_resource_change_t is record
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1538
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1539
pad0 : aliased xcb_randr_resource_change_t_array1992; -- /usr/include/xcb/randr.h:1540
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1537
type xcb_randr_resource_change_iterator_t is record
data : access xcb_randr_resource_change_t; -- /usr/include/xcb/randr.h:1547
c_rem : aliased int; -- /usr/include/xcb/randr.h:1548
index : aliased int; -- /usr/include/xcb/randr.h:1549
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1546
type xcb_randr_monitor_info_t is record
name : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1556
primary : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1557
automatic : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1558
nOutput : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1559
x : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1560
y : aliased bits_stdint_intn_h.int16_t; -- /usr/include/xcb/randr.h:1561
width : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1562
height : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1563
width_in_millimeters : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1564
height_in_millimeters : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1565
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1555
type xcb_randr_monitor_info_iterator_t is record
data : access xcb_randr_monitor_info_t; -- /usr/include/xcb/randr.h:1572
c_rem : aliased int; -- /usr/include/xcb/randr.h:1573
index : aliased int; -- /usr/include/xcb/randr.h:1574
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1571
type xcb_randr_get_monitors_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1581
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1580
type xcb_randr_get_monitors_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1591
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1592
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1593
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1594
get_active : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1595
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1590
type xcb_randr_get_monitors_reply_t_array2180 is array (0 .. 11) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_get_monitors_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1602
pad0 : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1603
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1604
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1605
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1606
nMonitors : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1607
nOutputs : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1608
pad1 : aliased xcb_randr_get_monitors_reply_t_array2180; -- /usr/include/xcb/randr.h:1609
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1601
type xcb_randr_set_monitor_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1619
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1620
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1621
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1622
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1618
type xcb_randr_delete_monitor_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1632
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1633
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1634
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1635
name : aliased xproto.xcb_atom_t; -- /usr/include/xcb/randr.h:1636
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1631
type xcb_randr_create_lease_cookie_t is record
sequence : aliased unsigned; -- /usr/include/xcb/randr.h:1643
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1642
type xcb_randr_create_lease_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1653
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1654
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1655
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1656
lid : aliased xcb_randr_lease_t; -- /usr/include/xcb/randr.h:1657
num_crtcs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1658
num_outputs : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1659
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1652
type xcb_randr_create_lease_reply_t_array2717 is array (0 .. 23) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_create_lease_reply_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1666
nfd : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1667
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1668
length : aliased bits_stdint_uintn_h.uint32_t; -- /usr/include/xcb/randr.h:1669
pad0 : aliased xcb_randr_create_lease_reply_t_array2717; -- /usr/include/xcb/randr.h:1670
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1665
type xcb_randr_free_lease_request_t is record
major_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1680
minor_opcode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1681
length : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1682
lid : aliased xcb_randr_lease_t; -- /usr/include/xcb/randr.h:1683
c_terminate : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1684
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1679
type xcb_randr_lease_notify_t_array5457 is array (0 .. 14) of aliased bits_stdint_uintn_h.uint8_t;
type xcb_randr_lease_notify_t is record
timestamp : aliased xproto.xcb_timestamp_t; -- /usr/include/xcb/randr.h:1691
window : aliased xproto.xcb_window_t; -- /usr/include/xcb/randr.h:1692
lease : aliased xcb_randr_lease_t; -- /usr/include/xcb/randr.h:1693
created : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1694
pad0 : aliased xcb_randr_lease_notify_t_array5457; -- /usr/include/xcb/randr.h:1695
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1690
type xcb_randr_lease_notify_iterator_t is record
data : access xcb_randr_lease_notify_t; -- /usr/include/xcb/randr.h:1702
c_rem : aliased int; -- /usr/include/xcb/randr.h:1703
index : aliased int; -- /usr/include/xcb/randr.h:1704
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1701
type xcb_randr_notify_data_t (discr : unsigned := 0) is record
case discr is
when 0 =>
cc : aliased xcb_randr_crtc_change_t; -- /usr/include/xcb/randr.h:1711
when 1 =>
oc : aliased xcb_randr_output_change_t; -- /usr/include/xcb/randr.h:1712
when 2 =>
op : aliased xcb_randr_output_property_t; -- /usr/include/xcb/randr.h:1713
when 3 =>
pc : aliased xcb_randr_provider_change_t; -- /usr/include/xcb/randr.h:1714
when 4 =>
pp : aliased xcb_randr_provider_property_t; -- /usr/include/xcb/randr.h:1715
when 5 =>
rc : aliased xcb_randr_resource_change_t; -- /usr/include/xcb/randr.h:1716
when others =>
lc : aliased xcb_randr_lease_notify_t; -- /usr/include/xcb/randr.h:1717
end case;
end record
with Convention => C_Pass_By_Copy,
Unchecked_Union => True; -- /usr/include/xcb/randr.h:1710
type xcb_randr_notify_data_iterator_t is record
data : access xcb_randr_notify_data_t; -- /usr/include/xcb/randr.h:1724
c_rem : aliased int; -- /usr/include/xcb/randr.h:1725
index : aliased int; -- /usr/include/xcb/randr.h:1726
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1723
type xcb_randr_notify_event_t is record
response_type : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1736
subCode : aliased bits_stdint_uintn_h.uint8_t; -- /usr/include/xcb/randr.h:1737
sequence : aliased bits_stdint_uintn_h.uint16_t; -- /usr/include/xcb/randr.h:1738
u : aliased xcb_randr_notify_data_t; -- /usr/include/xcb/randr.h:1739
end record
with Convention => C_Pass_By_Copy; -- /usr/include/xcb/randr.h:1735
procedure xcb_randr_mode_next (i : access xcb_randr_mode_iterator_t) -- /usr/include/xcb/randr.h:1751
with Import => True,
Convention => C,
External_Name => "xcb_randr_mode_next";
function xcb_randr_mode_end (i : xcb_randr_mode_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1763
with Import => True,
Convention => C,
External_Name => "xcb_randr_mode_end";
procedure xcb_randr_crtc_next (i : access xcb_randr_crtc_iterator_t) -- /usr/include/xcb/randr.h:1774
with Import => True,
Convention => C,
External_Name => "xcb_randr_crtc_next";
function xcb_randr_crtc_end (i : xcb_randr_crtc_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1786
with Import => True,
Convention => C,
External_Name => "xcb_randr_crtc_end";
procedure xcb_randr_output_next (i : access xcb_randr_output_iterator_t) -- /usr/include/xcb/randr.h:1797
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_next";
function xcb_randr_output_end (i : xcb_randr_output_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1809
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_end";
procedure xcb_randr_provider_next (i : access xcb_randr_provider_iterator_t) -- /usr/include/xcb/randr.h:1820
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_next";
function xcb_randr_provider_end (i : xcb_randr_provider_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1832
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_end";
procedure xcb_randr_lease_next (i : access xcb_randr_lease_iterator_t) -- /usr/include/xcb/randr.h:1843
with Import => True,
Convention => C,
External_Name => "xcb_randr_lease_next";
function xcb_randr_lease_end (i : xcb_randr_lease_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1855
with Import => True,
Convention => C,
External_Name => "xcb_randr_lease_end";
procedure xcb_randr_screen_size_next (i : access xcb_randr_screen_size_iterator_t) -- /usr/include/xcb/randr.h:1866
with Import => True,
Convention => C,
External_Name => "xcb_randr_screen_size_next";
function xcb_randr_screen_size_end (i : xcb_randr_screen_size_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1878
with Import => True,
Convention => C,
External_Name => "xcb_randr_screen_size_end";
function xcb_randr_refresh_rates_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:1881
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_sizeof";
function xcb_randr_refresh_rates_rates (R : access constant xcb_randr_refresh_rates_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:1884
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_rates";
function xcb_randr_refresh_rates_rates_length (R : access constant xcb_randr_refresh_rates_t) return int -- /usr/include/xcb/randr.h:1887
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_rates_length";
function xcb_randr_refresh_rates_rates_end (R : access constant xcb_randr_refresh_rates_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1890
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_rates_end";
procedure xcb_randr_refresh_rates_next (i : access xcb_randr_refresh_rates_iterator_t) -- /usr/include/xcb/randr.h:1901
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_next";
function xcb_randr_refresh_rates_end (i : xcb_randr_refresh_rates_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:1913
with Import => True,
Convention => C,
External_Name => "xcb_randr_refresh_rates_end";
function xcb_randr_query_version
(c : access xcb.xcb_connection_t;
major_version : bits_stdint_uintn_h.uint32_t;
minor_version : bits_stdint_uintn_h.uint32_t) return xcb_randr_query_version_cookie_t -- /usr/include/xcb/randr.h:1924
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_version";
function xcb_randr_query_version_unchecked
(c : access xcb.xcb_connection_t;
major_version : bits_stdint_uintn_h.uint32_t;
minor_version : bits_stdint_uintn_h.uint32_t) return xcb_randr_query_version_cookie_t -- /usr/include/xcb/randr.h:1940
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_version_unchecked";
function xcb_randr_query_version_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_query_version_cookie_t;
e : System.Address) return access xcb_randr_query_version_reply_t -- /usr/include/xcb/randr.h:1959
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_version_reply";
function xcb_randr_set_screen_config
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
timestamp : xproto.xcb_timestamp_t;
config_timestamp : xproto.xcb_timestamp_t;
sizeID : bits_stdint_uintn_h.uint16_t;
rotation : bits_stdint_uintn_h.uint16_t;
rate : bits_stdint_uintn_h.uint16_t) return xcb_randr_set_screen_config_cookie_t -- /usr/include/xcb/randr.h:1972
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_screen_config";
function xcb_randr_set_screen_config_unchecked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
timestamp : xproto.xcb_timestamp_t;
config_timestamp : xproto.xcb_timestamp_t;
sizeID : bits_stdint_uintn_h.uint16_t;
rotation : bits_stdint_uintn_h.uint16_t;
rate : bits_stdint_uintn_h.uint16_t) return xcb_randr_set_screen_config_cookie_t -- /usr/include/xcb/randr.h:1992
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_screen_config_unchecked";
function xcb_randr_set_screen_config_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_set_screen_config_cookie_t;
e : System.Address) return access xcb_randr_set_screen_config_reply_t -- /usr/include/xcb/randr.h:2015
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_screen_config_reply";
function xcb_randr_select_input_checked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
enable : bits_stdint_uintn_h.uint16_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2031
with Import => True,
Convention => C,
External_Name => "xcb_randr_select_input_checked";
function xcb_randr_select_input
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
enable : bits_stdint_uintn_h.uint16_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2044
with Import => True,
Convention => C,
External_Name => "xcb_randr_select_input";
function xcb_randr_get_screen_info_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2049
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_sizeof";
function xcb_randr_get_screen_info (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_info_cookie_t -- /usr/include/xcb/randr.h:2060
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info";
function xcb_randr_get_screen_info_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_info_cookie_t -- /usr/include/xcb/randr.h:2075
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_unchecked";
function xcb_randr_get_screen_info_sizes (R : access constant xcb_randr_get_screen_info_reply_t) return access xcb_randr_screen_size_t -- /usr/include/xcb/randr.h:2079
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_sizes";
function xcb_randr_get_screen_info_sizes_length (R : access constant xcb_randr_get_screen_info_reply_t) return int -- /usr/include/xcb/randr.h:2082
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_sizes_length";
function xcb_randr_get_screen_info_sizes_iterator (R : access constant xcb_randr_get_screen_info_reply_t) return xcb_randr_screen_size_iterator_t -- /usr/include/xcb/randr.h:2085
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_sizes_iterator";
function xcb_randr_get_screen_info_rates_length (R : access constant xcb_randr_get_screen_info_reply_t) return int -- /usr/include/xcb/randr.h:2088
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_rates_length";
function xcb_randr_get_screen_info_rates_iterator (R : access constant xcb_randr_get_screen_info_reply_t) return xcb_randr_refresh_rates_iterator_t -- /usr/include/xcb/randr.h:2091
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_rates_iterator";
function xcb_randr_get_screen_info_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_screen_info_cookie_t;
e : System.Address) return access xcb_randr_get_screen_info_reply_t -- /usr/include/xcb/randr.h:2108
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_info_reply";
function xcb_randr_get_screen_size_range (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_size_range_cookie_t -- /usr/include/xcb/randr.h:2121
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_size_range";
function xcb_randr_get_screen_size_range_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_size_range_cookie_t -- /usr/include/xcb/randr.h:2136
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_size_range_unchecked";
function xcb_randr_get_screen_size_range_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_screen_size_range_cookie_t;
e : System.Address) return access xcb_randr_get_screen_size_range_reply_t -- /usr/include/xcb/randr.h:2154
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_size_range_reply";
function xcb_randr_set_screen_size_checked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
width : bits_stdint_uintn_h.uint16_t;
height : bits_stdint_uintn_h.uint16_t;
mm_width : bits_stdint_uintn_h.uint32_t;
mm_height : bits_stdint_uintn_h.uint32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2170
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_screen_size_checked";
function xcb_randr_set_screen_size
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
width : bits_stdint_uintn_h.uint16_t;
height : bits_stdint_uintn_h.uint16_t;
mm_width : bits_stdint_uintn_h.uint32_t;
mm_height : bits_stdint_uintn_h.uint32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2186
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_screen_size";
procedure xcb_randr_mode_info_next (i : access xcb_randr_mode_info_iterator_t) -- /usr/include/xcb/randr.h:2202
with Import => True,
Convention => C,
External_Name => "xcb_randr_mode_info_next";
function xcb_randr_mode_info_end (i : xcb_randr_mode_info_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2214
with Import => True,
Convention => C,
External_Name => "xcb_randr_mode_info_end";
function xcb_randr_get_screen_resources_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2217
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_sizeof";
function xcb_randr_get_screen_resources (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_resources_cookie_t -- /usr/include/xcb/randr.h:2228
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources";
function xcb_randr_get_screen_resources_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_resources_cookie_t -- /usr/include/xcb/randr.h:2243
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_unchecked";
function xcb_randr_get_screen_resources_crtcs (R : access constant xcb_randr_get_screen_resources_reply_t) return access xcb_randr_crtc_t -- /usr/include/xcb/randr.h:2247
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_crtcs";
function xcb_randr_get_screen_resources_crtcs_length (R : access constant xcb_randr_get_screen_resources_reply_t) return int -- /usr/include/xcb/randr.h:2250
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_crtcs_length";
function xcb_randr_get_screen_resources_crtcs_end (R : access constant xcb_randr_get_screen_resources_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2253
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_crtcs_end";
function xcb_randr_get_screen_resources_outputs (R : access constant xcb_randr_get_screen_resources_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:2256
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_outputs";
function xcb_randr_get_screen_resources_outputs_length (R : access constant xcb_randr_get_screen_resources_reply_t) return int -- /usr/include/xcb/randr.h:2259
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_outputs_length";
function xcb_randr_get_screen_resources_outputs_end (R : access constant xcb_randr_get_screen_resources_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2262
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_outputs_end";
function xcb_randr_get_screen_resources_modes (R : access constant xcb_randr_get_screen_resources_reply_t) return access xcb_randr_mode_info_t -- /usr/include/xcb/randr.h:2265
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_modes";
function xcb_randr_get_screen_resources_modes_length (R : access constant xcb_randr_get_screen_resources_reply_t) return int -- /usr/include/xcb/randr.h:2268
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_modes_length";
function xcb_randr_get_screen_resources_modes_iterator (R : access constant xcb_randr_get_screen_resources_reply_t) return xcb_randr_mode_info_iterator_t -- /usr/include/xcb/randr.h:2271
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_modes_iterator";
function xcb_randr_get_screen_resources_names (R : access constant xcb_randr_get_screen_resources_reply_t) return access bits_stdint_uintn_h.uint8_t -- /usr/include/xcb/randr.h:2274
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_names";
function xcb_randr_get_screen_resources_names_length (R : access constant xcb_randr_get_screen_resources_reply_t) return int -- /usr/include/xcb/randr.h:2277
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_names_length";
function xcb_randr_get_screen_resources_names_end (R : access constant xcb_randr_get_screen_resources_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2280
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_names_end";
function xcb_randr_get_screen_resources_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_screen_resources_cookie_t;
e : System.Address) return access xcb_randr_get_screen_resources_reply_t -- /usr/include/xcb/randr.h:2297
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_reply";
function xcb_randr_get_output_info_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2302
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_sizeof";
function xcb_randr_get_output_info
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_output_info_cookie_t -- /usr/include/xcb/randr.h:2313
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info";
function xcb_randr_get_output_info_unchecked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_output_info_cookie_t -- /usr/include/xcb/randr.h:2329
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_unchecked";
function xcb_randr_get_output_info_crtcs (R : access constant xcb_randr_get_output_info_reply_t) return access xcb_randr_crtc_t -- /usr/include/xcb/randr.h:2334
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_crtcs";
function xcb_randr_get_output_info_crtcs_length (R : access constant xcb_randr_get_output_info_reply_t) return int -- /usr/include/xcb/randr.h:2337
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_crtcs_length";
function xcb_randr_get_output_info_crtcs_end (R : access constant xcb_randr_get_output_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2340
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_crtcs_end";
function xcb_randr_get_output_info_modes (R : access constant xcb_randr_get_output_info_reply_t) return access xcb_randr_mode_t -- /usr/include/xcb/randr.h:2343
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_modes";
function xcb_randr_get_output_info_modes_length (R : access constant xcb_randr_get_output_info_reply_t) return int -- /usr/include/xcb/randr.h:2346
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_modes_length";
function xcb_randr_get_output_info_modes_end (R : access constant xcb_randr_get_output_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2349
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_modes_end";
function xcb_randr_get_output_info_clones (R : access constant xcb_randr_get_output_info_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:2352
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_clones";
function xcb_randr_get_output_info_clones_length (R : access constant xcb_randr_get_output_info_reply_t) return int -- /usr/include/xcb/randr.h:2355
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_clones_length";
function xcb_randr_get_output_info_clones_end (R : access constant xcb_randr_get_output_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2358
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_clones_end";
function xcb_randr_get_output_info_name (R : access constant xcb_randr_get_output_info_reply_t) return access bits_stdint_uintn_h.uint8_t -- /usr/include/xcb/randr.h:2361
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_name";
function xcb_randr_get_output_info_name_length (R : access constant xcb_randr_get_output_info_reply_t) return int -- /usr/include/xcb/randr.h:2364
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_name_length";
function xcb_randr_get_output_info_name_end (R : access constant xcb_randr_get_output_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2367
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_name_end";
function xcb_randr_get_output_info_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_output_info_cookie_t;
e : System.Address) return access xcb_randr_get_output_info_reply_t -- /usr/include/xcb/randr.h:2384
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_info_reply";
function xcb_randr_list_output_properties_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2389
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_sizeof";
function xcb_randr_list_output_properties (c : access xcb.xcb_connection_t; output : xcb_randr_output_t) return xcb_randr_list_output_properties_cookie_t -- /usr/include/xcb/randr.h:2400
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties";
function xcb_randr_list_output_properties_unchecked (c : access xcb.xcb_connection_t; output : xcb_randr_output_t) return xcb_randr_list_output_properties_cookie_t -- /usr/include/xcb/randr.h:2415
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_unchecked";
function xcb_randr_list_output_properties_atoms (R : access constant xcb_randr_list_output_properties_reply_t) return access xproto.xcb_atom_t -- /usr/include/xcb/randr.h:2419
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_atoms";
function xcb_randr_list_output_properties_atoms_length (R : access constant xcb_randr_list_output_properties_reply_t) return int -- /usr/include/xcb/randr.h:2422
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_atoms_length";
function xcb_randr_list_output_properties_atoms_end (R : access constant xcb_randr_list_output_properties_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2425
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_atoms_end";
function xcb_randr_list_output_properties_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_list_output_properties_cookie_t;
e : System.Address) return access xcb_randr_list_output_properties_reply_t -- /usr/include/xcb/randr.h:2442
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_output_properties_reply";
function xcb_randr_query_output_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2447
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_sizeof";
function xcb_randr_query_output_property
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t) return xcb_randr_query_output_property_cookie_t -- /usr/include/xcb/randr.h:2458
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property";
function xcb_randr_query_output_property_unchecked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t) return xcb_randr_query_output_property_cookie_t -- /usr/include/xcb/randr.h:2474
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_unchecked";
function xcb_randr_query_output_property_valid_values (R : access constant xcb_randr_query_output_property_reply_t) return access bits_stdint_intn_h.int32_t -- /usr/include/xcb/randr.h:2479
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_valid_values";
function xcb_randr_query_output_property_valid_values_length (R : access constant xcb_randr_query_output_property_reply_t) return int -- /usr/include/xcb/randr.h:2482
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_valid_values_length";
function xcb_randr_query_output_property_valid_values_end (R : access constant xcb_randr_query_output_property_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2485
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_valid_values_end";
function xcb_randr_query_output_property_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_query_output_property_cookie_t;
e : System.Address) return access xcb_randr_query_output_property_reply_t -- /usr/include/xcb/randr.h:2502
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_output_property_reply";
function xcb_randr_configure_output_property_sizeof (u_buffer : System.Address; values_len : bits_stdint_uintn_h.uint32_t) return int -- /usr/include/xcb/randr.h:2507
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property_sizeof";
function xcb_randr_configure_output_property_checked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
pending : bits_stdint_uintn_h.uint8_t;
c_range : bits_stdint_uintn_h.uint8_t;
values_len : bits_stdint_uintn_h.uint32_t;
values : access bits_stdint_intn_h.int32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2522
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property_checked";
function xcb_randr_configure_output_property
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
pending : bits_stdint_uintn_h.uint8_t;
c_range : bits_stdint_uintn_h.uint8_t;
values_len : bits_stdint_uintn_h.uint32_t;
values : access bits_stdint_intn_h.int32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2539
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property";
function xcb_randr_configure_output_property_values (R : access constant xcb_randr_configure_output_property_request_t) return access bits_stdint_intn_h.int32_t -- /usr/include/xcb/randr.h:2548
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property_values";
function xcb_randr_configure_output_property_values_length (R : access constant xcb_randr_configure_output_property_request_t) return int -- /usr/include/xcb/randr.h:2551
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property_values_length";
function xcb_randr_configure_output_property_values_end (R : access constant xcb_randr_configure_output_property_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2554
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_output_property_values_end";
function xcb_randr_change_output_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2557
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property_sizeof";
function xcb_randr_change_output_property_checked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
format : bits_stdint_uintn_h.uint8_t;
mode : bits_stdint_uintn_h.uint8_t;
num_units : bits_stdint_uintn_h.uint32_t;
data : System.Address) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2571
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property_checked";
function xcb_randr_change_output_property
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
format : bits_stdint_uintn_h.uint8_t;
mode : bits_stdint_uintn_h.uint8_t;
num_units : bits_stdint_uintn_h.uint32_t;
data : System.Address) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2589
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property";
function xcb_randr_change_output_property_data (R : access constant xcb_randr_change_output_property_request_t) return System.Address -- /usr/include/xcb/randr.h:2599
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property_data";
function xcb_randr_change_output_property_data_length (R : access constant xcb_randr_change_output_property_request_t) return int -- /usr/include/xcb/randr.h:2602
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property_data_length";
function xcb_randr_change_output_property_data_end (R : access constant xcb_randr_change_output_property_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2605
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_output_property_data_end";
function xcb_randr_delete_output_property_checked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2619
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_output_property_checked";
function xcb_randr_delete_output_property
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2632
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_output_property";
function xcb_randr_get_output_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2637
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_sizeof";
function xcb_randr_get_output_property
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
long_offset : bits_stdint_uintn_h.uint32_t;
long_length : bits_stdint_uintn_h.uint32_t;
u_delete : bits_stdint_uintn_h.uint8_t;
pending : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_output_property_cookie_t -- /usr/include/xcb/randr.h:2648
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property";
function xcb_randr_get_output_property_unchecked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
long_offset : bits_stdint_uintn_h.uint32_t;
long_length : bits_stdint_uintn_h.uint32_t;
u_delete : bits_stdint_uintn_h.uint8_t;
pending : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_output_property_cookie_t -- /usr/include/xcb/randr.h:2669
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_unchecked";
function xcb_randr_get_output_property_data (R : access constant xcb_randr_get_output_property_reply_t) return access bits_stdint_uintn_h.uint8_t -- /usr/include/xcb/randr.h:2679
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_data";
function xcb_randr_get_output_property_data_length (R : access constant xcb_randr_get_output_property_reply_t) return int -- /usr/include/xcb/randr.h:2682
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_data_length";
function xcb_randr_get_output_property_data_end (R : access constant xcb_randr_get_output_property_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2685
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_data_end";
function xcb_randr_get_output_property_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_output_property_cookie_t;
e : System.Address) return access xcb_randr_get_output_property_reply_t -- /usr/include/xcb/randr.h:2702
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_property_reply";
function xcb_randr_create_mode_sizeof (u_buffer : System.Address; name_len : bits_stdint_uintn_h.uint32_t) return int -- /usr/include/xcb/randr.h:2707
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_mode_sizeof";
function xcb_randr_create_mode
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
mode_info : xcb_randr_mode_info_t;
name_len : bits_stdint_uintn_h.uint32_t;
name : Interfaces.C.Strings.chars_ptr) return xcb_randr_create_mode_cookie_t -- /usr/include/xcb/randr.h:2719
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_mode";
function xcb_randr_create_mode_unchecked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
mode_info : xcb_randr_mode_info_t;
name_len : bits_stdint_uintn_h.uint32_t;
name : Interfaces.C.Strings.chars_ptr) return xcb_randr_create_mode_cookie_t -- /usr/include/xcb/randr.h:2737
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_mode_unchecked";
function xcb_randr_create_mode_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_create_mode_cookie_t;
e : System.Address) return access xcb_randr_create_mode_reply_t -- /usr/include/xcb/randr.h:2758
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_mode_reply";
function xcb_randr_destroy_mode_checked (c : access xcb.xcb_connection_t; mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2774
with Import => True,
Convention => C,
External_Name => "xcb_randr_destroy_mode_checked";
function xcb_randr_destroy_mode (c : access xcb.xcb_connection_t; mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2786
with Import => True,
Convention => C,
External_Name => "xcb_randr_destroy_mode";
function xcb_randr_add_output_mode_checked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2801
with Import => True,
Convention => C,
External_Name => "xcb_randr_add_output_mode_checked";
function xcb_randr_add_output_mode
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2814
with Import => True,
Convention => C,
External_Name => "xcb_randr_add_output_mode";
function xcb_randr_delete_output_mode_checked
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2830
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_output_mode_checked";
function xcb_randr_delete_output_mode
(c : access xcb.xcb_connection_t;
output : xcb_randr_output_t;
mode : xcb_randr_mode_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:2843
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_output_mode";
function xcb_randr_get_crtc_info_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:2848
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_sizeof";
function xcb_randr_get_crtc_info
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_crtc_info_cookie_t -- /usr/include/xcb/randr.h:2859
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info";
function xcb_randr_get_crtc_info_unchecked
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_crtc_info_cookie_t -- /usr/include/xcb/randr.h:2875
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_unchecked";
function xcb_randr_get_crtc_info_outputs (R : access constant xcb_randr_get_crtc_info_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:2880
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_outputs";
function xcb_randr_get_crtc_info_outputs_length (R : access constant xcb_randr_get_crtc_info_reply_t) return int -- /usr/include/xcb/randr.h:2883
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_outputs_length";
function xcb_randr_get_crtc_info_outputs_end (R : access constant xcb_randr_get_crtc_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2886
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_outputs_end";
function xcb_randr_get_crtc_info_possible (R : access constant xcb_randr_get_crtc_info_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:2889
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_possible";
function xcb_randr_get_crtc_info_possible_length (R : access constant xcb_randr_get_crtc_info_reply_t) return int -- /usr/include/xcb/randr.h:2892
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_possible_length";
function xcb_randr_get_crtc_info_possible_end (R : access constant xcb_randr_get_crtc_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:2895
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_possible_end";
function xcb_randr_get_crtc_info_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_crtc_info_cookie_t;
e : System.Address) return access xcb_randr_get_crtc_info_reply_t -- /usr/include/xcb/randr.h:2912
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_info_reply";
function xcb_randr_set_crtc_config_sizeof (u_buffer : System.Address; outputs_len : bits_stdint_uintn_h.uint32_t) return int -- /usr/include/xcb/randr.h:2917
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_config_sizeof";
function xcb_randr_set_crtc_config
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
timestamp : xproto.xcb_timestamp_t;
config_timestamp : xproto.xcb_timestamp_t;
x : bits_stdint_intn_h.int16_t;
y : bits_stdint_intn_h.int16_t;
mode : xcb_randr_mode_t;
rotation : bits_stdint_uintn_h.uint16_t;
outputs_len : bits_stdint_uintn_h.uint32_t;
outputs : access xcb_randr_output_t) return xcb_randr_set_crtc_config_cookie_t -- /usr/include/xcb/randr.h:2929
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_config";
function xcb_randr_set_crtc_config_unchecked
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
timestamp : xproto.xcb_timestamp_t;
config_timestamp : xproto.xcb_timestamp_t;
x : bits_stdint_intn_h.int16_t;
y : bits_stdint_intn_h.int16_t;
mode : xcb_randr_mode_t;
rotation : bits_stdint_uintn_h.uint16_t;
outputs_len : bits_stdint_uintn_h.uint32_t;
outputs : access xcb_randr_output_t) return xcb_randr_set_crtc_config_cookie_t -- /usr/include/xcb/randr.h:2952
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_config_unchecked";
function xcb_randr_set_crtc_config_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_set_crtc_config_cookie_t;
e : System.Address) return access xcb_randr_set_crtc_config_reply_t -- /usr/include/xcb/randr.h:2978
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_config_reply";
function xcb_randr_get_crtc_gamma_size (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_gamma_size_cookie_t -- /usr/include/xcb/randr.h:2991
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_size";
function xcb_randr_get_crtc_gamma_size_unchecked (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_gamma_size_cookie_t -- /usr/include/xcb/randr.h:3006
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_size_unchecked";
function xcb_randr_get_crtc_gamma_size_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_crtc_gamma_size_cookie_t;
e : System.Address) return access xcb_randr_get_crtc_gamma_size_reply_t -- /usr/include/xcb/randr.h:3024
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_size_reply";
function xcb_randr_get_crtc_gamma_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3029
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_sizeof";
function xcb_randr_get_crtc_gamma (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_gamma_cookie_t -- /usr/include/xcb/randr.h:3040
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma";
function xcb_randr_get_crtc_gamma_unchecked (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_gamma_cookie_t -- /usr/include/xcb/randr.h:3055
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_unchecked";
function xcb_randr_get_crtc_gamma_red (R : access constant xcb_randr_get_crtc_gamma_reply_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3059
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_red";
function xcb_randr_get_crtc_gamma_red_length (R : access constant xcb_randr_get_crtc_gamma_reply_t) return int -- /usr/include/xcb/randr.h:3062
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_red_length";
function xcb_randr_get_crtc_gamma_red_end (R : access constant xcb_randr_get_crtc_gamma_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3065
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_red_end";
function xcb_randr_get_crtc_gamma_green (R : access constant xcb_randr_get_crtc_gamma_reply_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3068
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_green";
function xcb_randr_get_crtc_gamma_green_length (R : access constant xcb_randr_get_crtc_gamma_reply_t) return int -- /usr/include/xcb/randr.h:3071
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_green_length";
function xcb_randr_get_crtc_gamma_green_end (R : access constant xcb_randr_get_crtc_gamma_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3074
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_green_end";
function xcb_randr_get_crtc_gamma_blue (R : access constant xcb_randr_get_crtc_gamma_reply_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3077
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_blue";
function xcb_randr_get_crtc_gamma_blue_length (R : access constant xcb_randr_get_crtc_gamma_reply_t) return int -- /usr/include/xcb/randr.h:3080
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_blue_length";
function xcb_randr_get_crtc_gamma_blue_end (R : access constant xcb_randr_get_crtc_gamma_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3083
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_blue_end";
function xcb_randr_get_crtc_gamma_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_crtc_gamma_cookie_t;
e : System.Address) return access xcb_randr_get_crtc_gamma_reply_t -- /usr/include/xcb/randr.h:3100
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_gamma_reply";
function xcb_randr_set_crtc_gamma_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3105
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_sizeof";
function xcb_randr_set_crtc_gamma_checked
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
size : bits_stdint_uintn_h.uint16_t;
red : access bits_stdint_uintn_h.uint16_t;
green : access bits_stdint_uintn_h.uint16_t;
blue : access bits_stdint_uintn_h.uint16_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3119
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_checked";
function xcb_randr_set_crtc_gamma
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
size : bits_stdint_uintn_h.uint16_t;
red : access bits_stdint_uintn_h.uint16_t;
green : access bits_stdint_uintn_h.uint16_t;
blue : access bits_stdint_uintn_h.uint16_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3135
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma";
function xcb_randr_set_crtc_gamma_red (R : access constant xcb_randr_set_crtc_gamma_request_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3143
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_red";
function xcb_randr_set_crtc_gamma_red_length (R : access constant xcb_randr_set_crtc_gamma_request_t) return int -- /usr/include/xcb/randr.h:3146
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_red_length";
function xcb_randr_set_crtc_gamma_red_end (R : access constant xcb_randr_set_crtc_gamma_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3149
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_red_end";
function xcb_randr_set_crtc_gamma_green (R : access constant xcb_randr_set_crtc_gamma_request_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3152
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_green";
function xcb_randr_set_crtc_gamma_green_length (R : access constant xcb_randr_set_crtc_gamma_request_t) return int -- /usr/include/xcb/randr.h:3155
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_green_length";
function xcb_randr_set_crtc_gamma_green_end (R : access constant xcb_randr_set_crtc_gamma_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3158
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_green_end";
function xcb_randr_set_crtc_gamma_blue (R : access constant xcb_randr_set_crtc_gamma_request_t) return access bits_stdint_uintn_h.uint16_t -- /usr/include/xcb/randr.h:3161
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_blue";
function xcb_randr_set_crtc_gamma_blue_length (R : access constant xcb_randr_set_crtc_gamma_request_t) return int -- /usr/include/xcb/randr.h:3164
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_blue_length";
function xcb_randr_set_crtc_gamma_blue_end (R : access constant xcb_randr_set_crtc_gamma_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3167
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_gamma_blue_end";
function xcb_randr_get_screen_resources_current_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3170
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_sizeof";
function xcb_randr_get_screen_resources_current (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_resources_current_cookie_t -- /usr/include/xcb/randr.h:3181
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current";
function xcb_randr_get_screen_resources_current_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_screen_resources_current_cookie_t -- /usr/include/xcb/randr.h:3196
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_unchecked";
function xcb_randr_get_screen_resources_current_crtcs (R : access constant xcb_randr_get_screen_resources_current_reply_t) return access xcb_randr_crtc_t -- /usr/include/xcb/randr.h:3200
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_crtcs";
function xcb_randr_get_screen_resources_current_crtcs_length (R : access constant xcb_randr_get_screen_resources_current_reply_t) return int -- /usr/include/xcb/randr.h:3203
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_crtcs_length";
function xcb_randr_get_screen_resources_current_crtcs_end (R : access constant xcb_randr_get_screen_resources_current_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3206
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_crtcs_end";
function xcb_randr_get_screen_resources_current_outputs (R : access constant xcb_randr_get_screen_resources_current_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:3209
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_outputs";
function xcb_randr_get_screen_resources_current_outputs_length (R : access constant xcb_randr_get_screen_resources_current_reply_t) return int -- /usr/include/xcb/randr.h:3212
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_outputs_length";
function xcb_randr_get_screen_resources_current_outputs_end (R : access constant xcb_randr_get_screen_resources_current_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3215
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_outputs_end";
function xcb_randr_get_screen_resources_current_modes (R : access constant xcb_randr_get_screen_resources_current_reply_t) return access xcb_randr_mode_info_t -- /usr/include/xcb/randr.h:3218
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_modes";
function xcb_randr_get_screen_resources_current_modes_length (R : access constant xcb_randr_get_screen_resources_current_reply_t) return int -- /usr/include/xcb/randr.h:3221
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_modes_length";
function xcb_randr_get_screen_resources_current_modes_iterator (R : access constant xcb_randr_get_screen_resources_current_reply_t) return xcb_randr_mode_info_iterator_t -- /usr/include/xcb/randr.h:3224
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_modes_iterator";
function xcb_randr_get_screen_resources_current_names (R : access constant xcb_randr_get_screen_resources_current_reply_t) return access bits_stdint_uintn_h.uint8_t -- /usr/include/xcb/randr.h:3227
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_names";
function xcb_randr_get_screen_resources_current_names_length (R : access constant xcb_randr_get_screen_resources_current_reply_t) return int -- /usr/include/xcb/randr.h:3230
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_names_length";
function xcb_randr_get_screen_resources_current_names_end (R : access constant xcb_randr_get_screen_resources_current_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3233
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_names_end";
function xcb_randr_get_screen_resources_current_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_screen_resources_current_cookie_t;
e : System.Address) return access xcb_randr_get_screen_resources_current_reply_t -- /usr/include/xcb/randr.h:3250
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_screen_resources_current_reply";
function xcb_randr_set_crtc_transform_sizeof (u_buffer : System.Address; filter_params_len : bits_stdint_uintn_h.uint32_t) return int -- /usr/include/xcb/randr.h:3255
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_sizeof";
function xcb_randr_set_crtc_transform_checked
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
transform : xcb_render.xcb_render_transform_t;
filter_len : bits_stdint_uintn_h.uint16_t;
filter_name : Interfaces.C.Strings.chars_ptr;
filter_params_len : bits_stdint_uintn_h.uint32_t;
filter_params : access xcb_render.xcb_render_fixed_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3270
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_checked";
function xcb_randr_set_crtc_transform
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
transform : xcb_render.xcb_render_transform_t;
filter_len : bits_stdint_uintn_h.uint16_t;
filter_name : Interfaces.C.Strings.chars_ptr;
filter_params_len : bits_stdint_uintn_h.uint32_t;
filter_params : access xcb_render.xcb_render_fixed_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3287
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform";
function xcb_randr_set_crtc_transform_filter_name (R : access constant xcb_randr_set_crtc_transform_request_t) return Interfaces.C.Strings.chars_ptr -- /usr/include/xcb/randr.h:3296
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_name";
function xcb_randr_set_crtc_transform_filter_name_length (R : access constant xcb_randr_set_crtc_transform_request_t) return int -- /usr/include/xcb/randr.h:3299
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_name_length";
function xcb_randr_set_crtc_transform_filter_name_end (R : access constant xcb_randr_set_crtc_transform_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3302
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_name_end";
function xcb_randr_set_crtc_transform_filter_params (R : access constant xcb_randr_set_crtc_transform_request_t) return access xcb_render.xcb_render_fixed_t -- /usr/include/xcb/randr.h:3305
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_params";
function xcb_randr_set_crtc_transform_filter_params_length (R : access constant xcb_randr_set_crtc_transform_request_t) return int -- /usr/include/xcb/randr.h:3308
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_params_length";
function xcb_randr_set_crtc_transform_filter_params_end (R : access constant xcb_randr_set_crtc_transform_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3311
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_crtc_transform_filter_params_end";
function xcb_randr_get_crtc_transform_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3314
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_sizeof";
function xcb_randr_get_crtc_transform (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_transform_cookie_t -- /usr/include/xcb/randr.h:3325
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform";
function xcb_randr_get_crtc_transform_unchecked (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_crtc_transform_cookie_t -- /usr/include/xcb/randr.h:3340
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_unchecked";
function xcb_randr_get_crtc_transform_pending_filter_name (R : access constant xcb_randr_get_crtc_transform_reply_t) return Interfaces.C.Strings.chars_ptr -- /usr/include/xcb/randr.h:3344
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_filter_name";
function xcb_randr_get_crtc_transform_pending_filter_name_length (R : access constant xcb_randr_get_crtc_transform_reply_t) return int -- /usr/include/xcb/randr.h:3347
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_filter_name_length";
function xcb_randr_get_crtc_transform_pending_filter_name_end (R : access constant xcb_randr_get_crtc_transform_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3350
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_filter_name_end";
function xcb_randr_get_crtc_transform_pending_params (R : access constant xcb_randr_get_crtc_transform_reply_t) return access xcb_render.xcb_render_fixed_t -- /usr/include/xcb/randr.h:3353
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_params";
function xcb_randr_get_crtc_transform_pending_params_length (R : access constant xcb_randr_get_crtc_transform_reply_t) return int -- /usr/include/xcb/randr.h:3356
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_params_length";
function xcb_randr_get_crtc_transform_pending_params_end (R : access constant xcb_randr_get_crtc_transform_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3359
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_pending_params_end";
function xcb_randr_get_crtc_transform_current_filter_name (R : access constant xcb_randr_get_crtc_transform_reply_t) return Interfaces.C.Strings.chars_ptr -- /usr/include/xcb/randr.h:3362
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_filter_name";
function xcb_randr_get_crtc_transform_current_filter_name_length (R : access constant xcb_randr_get_crtc_transform_reply_t) return int -- /usr/include/xcb/randr.h:3365
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_filter_name_length";
function xcb_randr_get_crtc_transform_current_filter_name_end (R : access constant xcb_randr_get_crtc_transform_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3368
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_filter_name_end";
function xcb_randr_get_crtc_transform_current_params (R : access constant xcb_randr_get_crtc_transform_reply_t) return access xcb_render.xcb_render_fixed_t -- /usr/include/xcb/randr.h:3371
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_params";
function xcb_randr_get_crtc_transform_current_params_length (R : access constant xcb_randr_get_crtc_transform_reply_t) return int -- /usr/include/xcb/randr.h:3374
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_params_length";
function xcb_randr_get_crtc_transform_current_params_end (R : access constant xcb_randr_get_crtc_transform_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3377
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_current_params_end";
function xcb_randr_get_crtc_transform_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_crtc_transform_cookie_t;
e : System.Address) return access xcb_randr_get_crtc_transform_reply_t -- /usr/include/xcb/randr.h:3394
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_crtc_transform_reply";
function xcb_randr_get_panning (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_panning_cookie_t -- /usr/include/xcb/randr.h:3407
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_panning";
function xcb_randr_get_panning_unchecked (c : access xcb.xcb_connection_t; crtc : xcb_randr_crtc_t) return xcb_randr_get_panning_cookie_t -- /usr/include/xcb/randr.h:3422
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_panning_unchecked";
function xcb_randr_get_panning_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_panning_cookie_t;
e : System.Address) return access xcb_randr_get_panning_reply_t -- /usr/include/xcb/randr.h:3440
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_panning_reply";
function xcb_randr_set_panning
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
timestamp : xproto.xcb_timestamp_t;
left : bits_stdint_uintn_h.uint16_t;
top : bits_stdint_uintn_h.uint16_t;
width : bits_stdint_uintn_h.uint16_t;
height : bits_stdint_uintn_h.uint16_t;
track_left : bits_stdint_uintn_h.uint16_t;
track_top : bits_stdint_uintn_h.uint16_t;
track_width : bits_stdint_uintn_h.uint16_t;
track_height : bits_stdint_uintn_h.uint16_t;
border_left : bits_stdint_intn_h.int16_t;
border_top : bits_stdint_intn_h.int16_t;
border_right : bits_stdint_intn_h.int16_t;
border_bottom : bits_stdint_intn_h.int16_t) return xcb_randr_set_panning_cookie_t -- /usr/include/xcb/randr.h:3453
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_panning";
function xcb_randr_set_panning_unchecked
(c : access xcb.xcb_connection_t;
crtc : xcb_randr_crtc_t;
timestamp : xproto.xcb_timestamp_t;
left : bits_stdint_uintn_h.uint16_t;
top : bits_stdint_uintn_h.uint16_t;
width : bits_stdint_uintn_h.uint16_t;
height : bits_stdint_uintn_h.uint16_t;
track_left : bits_stdint_uintn_h.uint16_t;
track_top : bits_stdint_uintn_h.uint16_t;
track_width : bits_stdint_uintn_h.uint16_t;
track_height : bits_stdint_uintn_h.uint16_t;
border_left : bits_stdint_intn_h.int16_t;
border_top : bits_stdint_intn_h.int16_t;
border_right : bits_stdint_intn_h.int16_t;
border_bottom : bits_stdint_intn_h.int16_t) return xcb_randr_set_panning_cookie_t -- /usr/include/xcb/randr.h:3481
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_panning_unchecked";
function xcb_randr_set_panning_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_set_panning_cookie_t;
e : System.Address) return access xcb_randr_set_panning_reply_t -- /usr/include/xcb/randr.h:3512
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_panning_reply";
function xcb_randr_set_output_primary_checked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
output : xcb_randr_output_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3528
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_output_primary_checked";
function xcb_randr_set_output_primary
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
output : xcb_randr_output_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3541
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_output_primary";
function xcb_randr_get_output_primary (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_output_primary_cookie_t -- /usr/include/xcb/randr.h:3554
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_primary";
function xcb_randr_get_output_primary_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_output_primary_cookie_t -- /usr/include/xcb/randr.h:3569
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_primary_unchecked";
function xcb_randr_get_output_primary_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_output_primary_cookie_t;
e : System.Address) return access xcb_randr_get_output_primary_reply_t -- /usr/include/xcb/randr.h:3587
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_output_primary_reply";
function xcb_randr_get_providers_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3592
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_sizeof";
function xcb_randr_get_providers (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_providers_cookie_t -- /usr/include/xcb/randr.h:3603
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers";
function xcb_randr_get_providers_unchecked (c : access xcb.xcb_connection_t; window : xproto.xcb_window_t) return xcb_randr_get_providers_cookie_t -- /usr/include/xcb/randr.h:3618
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_unchecked";
function xcb_randr_get_providers_providers (R : access constant xcb_randr_get_providers_reply_t) return access xcb_randr_provider_t -- /usr/include/xcb/randr.h:3622
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_providers";
function xcb_randr_get_providers_providers_length (R : access constant xcb_randr_get_providers_reply_t) return int -- /usr/include/xcb/randr.h:3625
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_providers_length";
function xcb_randr_get_providers_providers_end (R : access constant xcb_randr_get_providers_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3628
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_providers_end";
function xcb_randr_get_providers_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_providers_cookie_t;
e : System.Address) return access xcb_randr_get_providers_reply_t -- /usr/include/xcb/randr.h:3645
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_providers_reply";
function xcb_randr_get_provider_info_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3650
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_sizeof";
function xcb_randr_get_provider_info
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_provider_info_cookie_t -- /usr/include/xcb/randr.h:3661
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info";
function xcb_randr_get_provider_info_unchecked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb_randr_get_provider_info_cookie_t -- /usr/include/xcb/randr.h:3677
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_unchecked";
function xcb_randr_get_provider_info_crtcs (R : access constant xcb_randr_get_provider_info_reply_t) return access xcb_randr_crtc_t -- /usr/include/xcb/randr.h:3682
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_crtcs";
function xcb_randr_get_provider_info_crtcs_length (R : access constant xcb_randr_get_provider_info_reply_t) return int -- /usr/include/xcb/randr.h:3685
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_crtcs_length";
function xcb_randr_get_provider_info_crtcs_end (R : access constant xcb_randr_get_provider_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3688
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_crtcs_end";
function xcb_randr_get_provider_info_outputs (R : access constant xcb_randr_get_provider_info_reply_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:3691
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_outputs";
function xcb_randr_get_provider_info_outputs_length (R : access constant xcb_randr_get_provider_info_reply_t) return int -- /usr/include/xcb/randr.h:3694
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_outputs_length";
function xcb_randr_get_provider_info_outputs_end (R : access constant xcb_randr_get_provider_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3697
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_outputs_end";
function xcb_randr_get_provider_info_associated_providers (R : access constant xcb_randr_get_provider_info_reply_t) return access xcb_randr_provider_t -- /usr/include/xcb/randr.h:3700
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_providers";
function xcb_randr_get_provider_info_associated_providers_length (R : access constant xcb_randr_get_provider_info_reply_t) return int -- /usr/include/xcb/randr.h:3703
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_providers_length";
function xcb_randr_get_provider_info_associated_providers_end (R : access constant xcb_randr_get_provider_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3706
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_providers_end";
function xcb_randr_get_provider_info_associated_capability (R : access constant xcb_randr_get_provider_info_reply_t) return access bits_stdint_uintn_h.uint32_t -- /usr/include/xcb/randr.h:3709
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_capability";
function xcb_randr_get_provider_info_associated_capability_length (R : access constant xcb_randr_get_provider_info_reply_t) return int -- /usr/include/xcb/randr.h:3712
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_capability_length";
function xcb_randr_get_provider_info_associated_capability_end (R : access constant xcb_randr_get_provider_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3715
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_associated_capability_end";
function xcb_randr_get_provider_info_name (R : access constant xcb_randr_get_provider_info_reply_t) return Interfaces.C.Strings.chars_ptr -- /usr/include/xcb/randr.h:3718
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_name";
function xcb_randr_get_provider_info_name_length (R : access constant xcb_randr_get_provider_info_reply_t) return int -- /usr/include/xcb/randr.h:3721
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_name_length";
function xcb_randr_get_provider_info_name_end (R : access constant xcb_randr_get_provider_info_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3724
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_name_end";
function xcb_randr_get_provider_info_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_provider_info_cookie_t;
e : System.Address) return access xcb_randr_get_provider_info_reply_t -- /usr/include/xcb/randr.h:3741
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_info_reply";
function xcb_randr_set_provider_offload_sink_checked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
sink_provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3757
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_provider_offload_sink_checked";
function xcb_randr_set_provider_offload_sink
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
sink_provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3771
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_provider_offload_sink";
function xcb_randr_set_provider_output_source_checked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
source_provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3788
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_provider_output_source_checked";
function xcb_randr_set_provider_output_source
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
source_provider : xcb_randr_provider_t;
config_timestamp : xproto.xcb_timestamp_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3802
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_provider_output_source";
function xcb_randr_list_provider_properties_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3808
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_sizeof";
function xcb_randr_list_provider_properties (c : access xcb.xcb_connection_t; provider : xcb_randr_provider_t) return xcb_randr_list_provider_properties_cookie_t -- /usr/include/xcb/randr.h:3819
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties";
function xcb_randr_list_provider_properties_unchecked (c : access xcb.xcb_connection_t; provider : xcb_randr_provider_t) return xcb_randr_list_provider_properties_cookie_t -- /usr/include/xcb/randr.h:3834
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_unchecked";
function xcb_randr_list_provider_properties_atoms (R : access constant xcb_randr_list_provider_properties_reply_t) return access xproto.xcb_atom_t -- /usr/include/xcb/randr.h:3838
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_atoms";
function xcb_randr_list_provider_properties_atoms_length (R : access constant xcb_randr_list_provider_properties_reply_t) return int -- /usr/include/xcb/randr.h:3841
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_atoms_length";
function xcb_randr_list_provider_properties_atoms_end (R : access constant xcb_randr_list_provider_properties_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3844
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_atoms_end";
function xcb_randr_list_provider_properties_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_list_provider_properties_cookie_t;
e : System.Address) return access xcb_randr_list_provider_properties_reply_t -- /usr/include/xcb/randr.h:3861
with Import => True,
Convention => C,
External_Name => "xcb_randr_list_provider_properties_reply";
function xcb_randr_query_provider_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3866
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_sizeof";
function xcb_randr_query_provider_property
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t) return xcb_randr_query_provider_property_cookie_t -- /usr/include/xcb/randr.h:3877
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property";
function xcb_randr_query_provider_property_unchecked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t) return xcb_randr_query_provider_property_cookie_t -- /usr/include/xcb/randr.h:3893
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_unchecked";
function xcb_randr_query_provider_property_valid_values (R : access constant xcb_randr_query_provider_property_reply_t) return access bits_stdint_intn_h.int32_t -- /usr/include/xcb/randr.h:3898
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_valid_values";
function xcb_randr_query_provider_property_valid_values_length (R : access constant xcb_randr_query_provider_property_reply_t) return int -- /usr/include/xcb/randr.h:3901
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_valid_values_length";
function xcb_randr_query_provider_property_valid_values_end (R : access constant xcb_randr_query_provider_property_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3904
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_valid_values_end";
function xcb_randr_query_provider_property_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_query_provider_property_cookie_t;
e : System.Address) return access xcb_randr_query_provider_property_reply_t -- /usr/include/xcb/randr.h:3921
with Import => True,
Convention => C,
External_Name => "xcb_randr_query_provider_property_reply";
function xcb_randr_configure_provider_property_sizeof (u_buffer : System.Address; values_len : bits_stdint_uintn_h.uint32_t) return int -- /usr/include/xcb/randr.h:3926
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property_sizeof";
function xcb_randr_configure_provider_property_checked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
pending : bits_stdint_uintn_h.uint8_t;
c_range : bits_stdint_uintn_h.uint8_t;
values_len : bits_stdint_uintn_h.uint32_t;
values : access bits_stdint_intn_h.int32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3941
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property_checked";
function xcb_randr_configure_provider_property
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
pending : bits_stdint_uintn_h.uint8_t;
c_range : bits_stdint_uintn_h.uint8_t;
values_len : bits_stdint_uintn_h.uint32_t;
values : access bits_stdint_intn_h.int32_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3958
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property";
function xcb_randr_configure_provider_property_values (R : access constant xcb_randr_configure_provider_property_request_t) return access bits_stdint_intn_h.int32_t -- /usr/include/xcb/randr.h:3967
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property_values";
function xcb_randr_configure_provider_property_values_length (R : access constant xcb_randr_configure_provider_property_request_t) return int -- /usr/include/xcb/randr.h:3970
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property_values_length";
function xcb_randr_configure_provider_property_values_end (R : access constant xcb_randr_configure_provider_property_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:3973
with Import => True,
Convention => C,
External_Name => "xcb_randr_configure_provider_property_values_end";
function xcb_randr_change_provider_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:3976
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property_sizeof";
function xcb_randr_change_provider_property_checked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
format : bits_stdint_uintn_h.uint8_t;
mode : bits_stdint_uintn_h.uint8_t;
num_items : bits_stdint_uintn_h.uint32_t;
data : System.Address) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:3990
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property_checked";
function xcb_randr_change_provider_property
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
format : bits_stdint_uintn_h.uint8_t;
mode : bits_stdint_uintn_h.uint8_t;
num_items : bits_stdint_uintn_h.uint32_t;
data : System.Address) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4008
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property";
function xcb_randr_change_provider_property_data (R : access constant xcb_randr_change_provider_property_request_t) return System.Address -- /usr/include/xcb/randr.h:4018
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property_data";
function xcb_randr_change_provider_property_data_length (R : access constant xcb_randr_change_provider_property_request_t) return int -- /usr/include/xcb/randr.h:4021
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property_data_length";
function xcb_randr_change_provider_property_data_end (R : access constant xcb_randr_change_provider_property_request_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4024
with Import => True,
Convention => C,
External_Name => "xcb_randr_change_provider_property_data_end";
function xcb_randr_delete_provider_property_checked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4038
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_provider_property_checked";
function xcb_randr_delete_provider_property
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4051
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_provider_property";
function xcb_randr_get_provider_property_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:4056
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_sizeof";
function xcb_randr_get_provider_property
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
long_offset : bits_stdint_uintn_h.uint32_t;
long_length : bits_stdint_uintn_h.uint32_t;
u_delete : bits_stdint_uintn_h.uint8_t;
pending : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_provider_property_cookie_t -- /usr/include/xcb/randr.h:4067
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property";
function xcb_randr_get_provider_property_unchecked
(c : access xcb.xcb_connection_t;
provider : xcb_randr_provider_t;
property : xproto.xcb_atom_t;
c_type : xproto.xcb_atom_t;
long_offset : bits_stdint_uintn_h.uint32_t;
long_length : bits_stdint_uintn_h.uint32_t;
u_delete : bits_stdint_uintn_h.uint8_t;
pending : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_provider_property_cookie_t -- /usr/include/xcb/randr.h:4088
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_unchecked";
function xcb_randr_get_provider_property_data (R : access constant xcb_randr_get_provider_property_reply_t) return System.Address -- /usr/include/xcb/randr.h:4098
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_data";
function xcb_randr_get_provider_property_data_length (R : access constant xcb_randr_get_provider_property_reply_t) return int -- /usr/include/xcb/randr.h:4101
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_data_length";
function xcb_randr_get_provider_property_data_end (R : access constant xcb_randr_get_provider_property_reply_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4104
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_data_end";
function xcb_randr_get_provider_property_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_provider_property_cookie_t;
e : System.Address) return access xcb_randr_get_provider_property_reply_t -- /usr/include/xcb/randr.h:4121
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_provider_property_reply";
procedure xcb_randr_crtc_change_next (i : access xcb_randr_crtc_change_iterator_t) -- /usr/include/xcb/randr.h:4134
with Import => True,
Convention => C,
External_Name => "xcb_randr_crtc_change_next";
function xcb_randr_crtc_change_end (i : xcb_randr_crtc_change_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4146
with Import => True,
Convention => C,
External_Name => "xcb_randr_crtc_change_end";
procedure xcb_randr_output_change_next (i : access xcb_randr_output_change_iterator_t) -- /usr/include/xcb/randr.h:4157
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_change_next";
function xcb_randr_output_change_end (i : xcb_randr_output_change_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4169
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_change_end";
procedure xcb_randr_output_property_next (i : access xcb_randr_output_property_iterator_t) -- /usr/include/xcb/randr.h:4180
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_property_next";
function xcb_randr_output_property_end (i : xcb_randr_output_property_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4192
with Import => True,
Convention => C,
External_Name => "xcb_randr_output_property_end";
procedure xcb_randr_provider_change_next (i : access xcb_randr_provider_change_iterator_t) -- /usr/include/xcb/randr.h:4203
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_change_next";
function xcb_randr_provider_change_end (i : xcb_randr_provider_change_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4215
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_change_end";
procedure xcb_randr_provider_property_next (i : access xcb_randr_provider_property_iterator_t) -- /usr/include/xcb/randr.h:4226
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_property_next";
function xcb_randr_provider_property_end (i : xcb_randr_provider_property_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4238
with Import => True,
Convention => C,
External_Name => "xcb_randr_provider_property_end";
procedure xcb_randr_resource_change_next (i : access xcb_randr_resource_change_iterator_t) -- /usr/include/xcb/randr.h:4249
with Import => True,
Convention => C,
External_Name => "xcb_randr_resource_change_next";
function xcb_randr_resource_change_end (i : xcb_randr_resource_change_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4261
with Import => True,
Convention => C,
External_Name => "xcb_randr_resource_change_end";
function xcb_randr_monitor_info_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:4264
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_sizeof";
function xcb_randr_monitor_info_outputs (R : access constant xcb_randr_monitor_info_t) return access xcb_randr_output_t -- /usr/include/xcb/randr.h:4267
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_outputs";
function xcb_randr_monitor_info_outputs_length (R : access constant xcb_randr_monitor_info_t) return int -- /usr/include/xcb/randr.h:4270
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_outputs_length";
function xcb_randr_monitor_info_outputs_end (R : access constant xcb_randr_monitor_info_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4273
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_outputs_end";
procedure xcb_randr_monitor_info_next (i : access xcb_randr_monitor_info_iterator_t) -- /usr/include/xcb/randr.h:4284
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_next";
function xcb_randr_monitor_info_end (i : xcb_randr_monitor_info_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4296
with Import => True,
Convention => C,
External_Name => "xcb_randr_monitor_info_end";
function xcb_randr_get_monitors_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:4299
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors_sizeof";
function xcb_randr_get_monitors
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
get_active : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_monitors_cookie_t -- /usr/include/xcb/randr.h:4310
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors";
function xcb_randr_get_monitors_unchecked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
get_active : bits_stdint_uintn_h.uint8_t) return xcb_randr_get_monitors_cookie_t -- /usr/include/xcb/randr.h:4326
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors_unchecked";
function xcb_randr_get_monitors_monitors_length (R : access constant xcb_randr_get_monitors_reply_t) return int -- /usr/include/xcb/randr.h:4331
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors_monitors_length";
function xcb_randr_get_monitors_monitors_iterator (R : access constant xcb_randr_get_monitors_reply_t) return xcb_randr_monitor_info_iterator_t -- /usr/include/xcb/randr.h:4334
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors_monitors_iterator";
function xcb_randr_get_monitors_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_get_monitors_cookie_t;
e : System.Address) return access xcb_randr_get_monitors_reply_t -- /usr/include/xcb/randr.h:4351
with Import => True,
Convention => C,
External_Name => "xcb_randr_get_monitors_reply";
function xcb_randr_set_monitor_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:4356
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_monitor_sizeof";
function xcb_randr_set_monitor_checked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
monitorinfo : access xcb_randr_monitor_info_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4370
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_monitor_checked";
function xcb_randr_set_monitor
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
monitorinfo : access xcb_randr_monitor_info_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4383
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_monitor";
function xcb_randr_set_monitor_monitorinfo (R : access constant xcb_randr_set_monitor_request_t) return access xcb_randr_monitor_info_t -- /usr/include/xcb/randr.h:4388
with Import => True,
Convention => C,
External_Name => "xcb_randr_set_monitor_monitorinfo";
function xcb_randr_delete_monitor_checked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
name : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4402
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_monitor_checked";
function xcb_randr_delete_monitor
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
name : xproto.xcb_atom_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4415
with Import => True,
Convention => C,
External_Name => "xcb_randr_delete_monitor";
function xcb_randr_create_lease_sizeof (u_buffer : System.Address) return int -- /usr/include/xcb/randr.h:4420
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_lease_sizeof";
function xcb_randr_create_lease
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
lid : xcb_randr_lease_t;
num_crtcs : bits_stdint_uintn_h.uint16_t;
num_outputs : bits_stdint_uintn_h.uint16_t;
crtcs : access xcb_randr_crtc_t;
outputs : access xcb_randr_output_t) return xcb_randr_create_lease_cookie_t -- /usr/include/xcb/randr.h:4431
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_lease";
function xcb_randr_create_lease_unchecked
(c : access xcb.xcb_connection_t;
window : xproto.xcb_window_t;
lid : xcb_randr_lease_t;
num_crtcs : bits_stdint_uintn_h.uint16_t;
num_outputs : bits_stdint_uintn_h.uint16_t;
crtcs : access xcb_randr_crtc_t;
outputs : access xcb_randr_output_t) return xcb_randr_create_lease_cookie_t -- /usr/include/xcb/randr.h:4451
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_lease_unchecked";
function xcb_randr_create_lease_reply
(c : access xcb.xcb_connection_t;
cookie : xcb_randr_create_lease_cookie_t;
e : System.Address) return access xcb_randr_create_lease_reply_t -- /usr/include/xcb/randr.h:4474
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_lease_reply";
function xcb_randr_create_lease_reply_fds (c : access xcb.xcb_connection_t; reply : access xcb_randr_create_lease_reply_t) return access int -- /usr/include/xcb/randr.h:4488
with Import => True,
Convention => C,
External_Name => "xcb_randr_create_lease_reply_fds";
function xcb_randr_free_lease_checked
(c : access xcb.xcb_connection_t;
lid : xcb_randr_lease_t;
c_terminate : bits_stdint_uintn_h.uint8_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4503
with Import => True,
Convention => C,
External_Name => "xcb_randr_free_lease_checked";
function xcb_randr_free_lease
(c : access xcb.xcb_connection_t;
lid : xcb_randr_lease_t;
c_terminate : bits_stdint_uintn_h.uint8_t) return xcb.xcb_void_cookie_t -- /usr/include/xcb/randr.h:4516
with Import => True,
Convention => C,
External_Name => "xcb_randr_free_lease";
procedure xcb_randr_lease_notify_next (i : access xcb_randr_lease_notify_iterator_t) -- /usr/include/xcb/randr.h:4529
with Import => True,
Convention => C,
External_Name => "xcb_randr_lease_notify_next";
function xcb_randr_lease_notify_end (i : xcb_randr_lease_notify_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4541
with Import => True,
Convention => C,
External_Name => "xcb_randr_lease_notify_end";
procedure xcb_randr_notify_data_next (i : access xcb_randr_notify_data_iterator_t) -- /usr/include/xcb/randr.h:4552
with Import => True,
Convention => C,
External_Name => "xcb_randr_notify_data_next";
function xcb_randr_notify_data_end (i : xcb_randr_notify_data_iterator_t) return xcb.xcb_generic_iterator_t -- /usr/include/xcb/randr.h:4564
with Import => True,
Convention => C,
External_Name => "xcb_randr_notify_data_end";
end xcb_randr;
|
AdaCore/libadalang | Ada | 395 | ads | --
-- Copyright (C) 2014-2022, AdaCore
-- SPDX-License-Identifier: Apache-2.0
--
with Libadalang.Implementation; use Libadalang.Implementation;
private package Libadalang.Internal_Default_Provider is
function Create return Internal_Unit_Provider_Access;
-- Return an internal type for the default unit provider to use in
-- Libadalang.
end Libadalang.Internal_Default_Provider;
|
reznikmm/matreshka | Ada | 4,049 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with ODF.DOM.Text_Placeholder_Type_Attributes;
package Matreshka.ODF_Text.Placeholder_Type_Attributes is
type Text_Placeholder_Type_Attribute_Node is
new Matreshka.ODF_Text.Abstract_Text_Attribute_Node
and ODF.DOM.Text_Placeholder_Type_Attributes.ODF_Text_Placeholder_Type_Attribute
with null record;
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Text_Placeholder_Type_Attribute_Node;
overriding function Get_Local_Name
(Self : not null access constant Text_Placeholder_Type_Attribute_Node)
return League.Strings.Universal_String;
end Matreshka.ODF_Text.Placeholder_Type_Attributes;
|
msrLi/portingSources | Ada | 997 | adb | -- Copyright 2011-2014 Free Software Foundation, Inc.
--
-- This program 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 3 of the License, or
-- (at your option) any later version.
--
-- This program 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 program. If not, see <http://www.gnu.org/licenses/>.
with Dn; use Dn;
package body Pck is
procedure Hello is
procedure Nested is
I : Integer := 0;
begin
Do_Nothing (I'Address);
end Nested;
begin
Nested;
end Hello;
procedure There is
begin
null;
end There;
end Pck;
|
charlie5/cBound | Ada | 1,761 | ads | -- This file is generated by SWIG. Please do not modify by hand.
--
with Interfaces;
with swig;
with Interfaces.C;
with Interfaces.C.Pointers;
package xcb.xcb_render_set_picture_filter_request_t is
-- Item
--
type Item is record
major_opcode : aliased Interfaces.Unsigned_8;
minor_opcode : aliased Interfaces.Unsigned_8;
length : aliased Interfaces.Unsigned_16;
picture : aliased xcb.xcb_render_picture_t;
filter_len : aliased Interfaces.Unsigned_16;
pad0 : aliased swig.int8_t_Array (0 .. 1);
end record;
-- Item_Array
--
type Item_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_render_set_picture_filter_request_t
.Item;
-- Pointer
--
package C_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_set_picture_filter_request_t.Item,
Element_Array => xcb.xcb_render_set_picture_filter_request_t.Item_Array,
Default_Terminator => (others => <>));
subtype Pointer is C_Pointers.Pointer;
-- Pointer_Array
--
type Pointer_Array is
array
(Interfaces.C
.size_t range <>) of aliased xcb
.xcb_render_set_picture_filter_request_t
.Pointer;
-- Pointer_Pointer
--
package C_Pointer_Pointers is new Interfaces.C.Pointers
(Index => Interfaces.C.size_t,
Element => xcb.xcb_render_set_picture_filter_request_t.Pointer,
Element_Array =>
xcb.xcb_render_set_picture_filter_request_t.Pointer_Array,
Default_Terminator => null);
subtype Pointer_Pointer is C_Pointer_Pointers.Pointer;
end xcb.xcb_render_set_picture_filter_request_t;
|
sf17k/sdlada | Ada | 2,836 | ads | --------------------------------------------------------------------------------------------------------------------
-- Copyright (c) 2014 Luke A. Guest
--
-- This software is provided 'as-is', without any express or implied
-- warranty. In no event will the authors be held liable for any damages
-- arising from the use of this software.
--
-- Permission is granted to anyone to use this software for any purpose,
-- including commercial applications, and to alter it and redistribute it
-- freely, subject to the following restrictions:
--
-- 1. The origin of this software must not be misrepresented; you must not
-- claim that you wrote the original software. If you use this software
-- in a product, an acknowledgment in the product documentation would be
-- appreciated but is not required.
--
-- 2. Altered source versions must be plainly marked as such, and must not be
-- misrepresented as being the original software.
--
-- 3. This notice may not be removed or altered from any source
-- distribution.
--------------------------------------------------------------------------------------------------------------------
-- SDL.Events.Windows
--
-- Window specific events.
--------------------------------------------------------------------------------------------------------------------
package SDL.Events.Windows is
-- Window events.
Window : constant Event_Types := 16#0000_0200#;
System_Window_Manager : constant Event_Types := Window + 1;
type Window_Event_ID is
(None,
Shown,
Hidden,
Exposed,
Moved,
Resized,
Size_Changed,
Minimised,
Maximised,
Restored,
Enter,
Leave,
Focus_Gained,
Focus_Lost,
Close) with
Convention => C;
type Window_Events is
record
Event_Type : Event_Types; -- Will be set to Window.
Time_Stamp : Time_Stamps;
ID : SDL.Video.Windows.ID;
Event_ID : Window_Event_ID;
Padding_1 : Padding_8;
Padding_2 : Padding_8;
Padding_3 : Padding_8;
Data_1 : Interfaces.Integer_32;
Data_2 : Interfaces.Integer_32;
end record with
Convention => C;
private
for Window_Events use
record
Event_Type at 0 * SDL.Word range 0 .. 31;
Time_Stamp at 1 * SDL.Word range 0 .. 31;
ID at 2 * SDL.Word range 0 .. 31;
Event_ID at 3 * SDL.Word range 0 .. 7;
Padding_1 at 3 * SDL.Word range 8 .. 15;
Padding_2 at 3 * SDL.Word range 16 .. 23;
Padding_3 at 3 * SDL.Word range 24 .. 31;
Data_1 at 4 * SDL.Word range 0 .. 31;
Data_2 at 5 * SDL.Word range 0 .. 31;
end record;
end SDL.Events.Windows;
|
stcarrez/atlas | Ada | 10,504 | ads | -----------------------------------------------------------------------
-- Atlas.Microblog.Models -- Atlas.Microblog.Models
-----------------------------------------------------------------------
-- File generated by Dynamo DO NOT MODIFY
-- Template used: templates/model/package-spec.xhtml
-- Ada Generator: https://github.com/stcarrez/dynamo Version 1.4.0
-----------------------------------------------------------------------
-- Copyright (C) 2023 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
pragma Warnings (Off);
with ADO.Sessions;
with ADO.Objects;
with ADO.Statements;
with ADO.SQL;
with ADO.Schemas;
with ADO.Queries;
with ADO.Queries.Loaders;
with Ada.Calendar;
with Ada.Containers.Vectors;
with Ada.Strings.Unbounded;
with Util.Beans.Objects;
with Util.Beans.Basic.Lists;
with AWA.Users.Models;
pragma Warnings (On);
package Atlas.Microblog.Models is
pragma Style_Checks ("-mrIu");
type Mblog_Ref is new ADO.Objects.Object_Ref with null record;
-- --------------------
-- The Mblog table holds the message posted by users.
-- Once posted, the message is not supposed to be changed.
-- --------------------
-- Create an object key for Mblog.
function Mblog_Key (Id : in ADO.Identifier) return ADO.Objects.Object_Key;
-- Create an object key for Mblog from a string.
-- Raises Constraint_Error if the string cannot be converted into the object key.
function Mblog_Key (Id : in String) return ADO.Objects.Object_Key;
Null_Mblog : constant Mblog_Ref;
function "=" (Left, Right : Mblog_Ref'Class) return Boolean;
--
procedure Set_Id (Object : in out Mblog_Ref;
Value : in ADO.Identifier);
--
function Get_Id (Object : in Mblog_Ref)
return ADO.Identifier;
--
function Get_Version (Object : in Mblog_Ref)
return Integer;
-- Set the microblog message
procedure Set_Message (Object : in out Mblog_Ref;
Value : in Ada.Strings.Unbounded.Unbounded_String);
procedure Set_Message (Object : in out Mblog_Ref;
Value : in String);
-- Get the microblog message
function Get_Message (Object : in Mblog_Ref)
return Ada.Strings.Unbounded.Unbounded_String;
function Get_Message (Object : in Mblog_Ref)
return String;
--
procedure Set_Creation_Date (Object : in out Mblog_Ref;
Value : in Ada.Calendar.Time);
--
function Get_Creation_Date (Object : in Mblog_Ref)
return Ada.Calendar.Time;
-- Set the post author
procedure Set_Author (Object : in out Mblog_Ref;
Value : in AWA.Users.Models.User_Ref'Class);
-- Get the post author
function Get_Author (Object : in Mblog_Ref)
return AWA.Users.Models.User_Ref'Class;
-- Load the entity identified by 'Id'.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Load (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier);
-- Load the entity identified by 'Id'.
-- Returns True in <b>Found</b> if the object was found and False if it does not exist.
procedure Load (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Session'Class;
Id : in ADO.Identifier;
Found : out Boolean);
-- Reload from the database the same object if it was modified.
-- Returns True in `Updated` if the object was reloaded.
-- Raises the NOT_FOUND exception if it does not exist.
procedure Reload (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Session'Class;
Updated : out Boolean);
-- Find and load the entity.
overriding
procedure Find (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
-- Save the entity. If the entity does not have an identifier, an identifier is allocated
-- and it is inserted in the table. Otherwise, only data fields which have been changed
-- are updated.
overriding
procedure Save (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
-- Delete the entity.
overriding
procedure Delete (Object : in out Mblog_Ref;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
function Get_Value (From : in Mblog_Ref;
Name : in String) return Util.Beans.Objects.Object;
-- Table definition
MBLOG_TABLE : constant ADO.Schemas.Class_Mapping_Access;
-- Internal method to allocate the Object_Record instance
overriding
procedure Allocate (Object : in out Mblog_Ref);
-- Copy of the object.
procedure Copy (Object : in Mblog_Ref;
Into : in out Mblog_Ref);
-- --------------------
-- The list of microblogs.
-- --------------------
type List_Info is
new Util.Beans.Basic.Bean with record
-- the mblog identifier.
Id : ADO.Identifier;
-- the microblog message.
Message : Ada.Strings.Unbounded.Unbounded_String;
-- the microblog creation date.
Create_Date : Ada.Calendar.Time;
-- the author's name.
Name : Ada.Strings.Unbounded.Unbounded_String;
-- the author's email address.
Email : Ada.Strings.Unbounded.Unbounded_String;
end record;
-- Get the bean attribute identified by the name.
overriding
function Get_Value (From : in List_Info;
Name : in String) return Util.Beans.Objects.Object;
-- Set the bean attribute identified by the name.
overriding
procedure Set_Value (Item : in out List_Info;
Name : in String;
Value : in Util.Beans.Objects.Object);
package List_Info_Beans is
new Util.Beans.Basic.Lists (Element_Type => List_Info);
package List_Info_Vectors renames List_Info_Beans.Vectors;
subtype List_Info_List_Bean is List_Info_Beans.List_Bean;
type List_Info_List_Bean_Access is access all List_Info_List_Bean;
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
procedure List (Object : in out List_Info_List_Bean'Class;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class);
subtype List_Info_Vector is List_Info_Vectors.Vector;
-- Run the query controlled by <b>Context</b> and append the list in <b>Object</b>.
procedure List (Object : in out List_Info_Vector;
Session : in out ADO.Sessions.Session'Class;
Context : in out ADO.Queries.Context'Class);
Query_List : constant ADO.Queries.Query_Definition_Access;
private
MBLOG_NAME : aliased constant String := "mblog";
COL_0_1_NAME : aliased constant String := "id";
COL_1_1_NAME : aliased constant String := "version";
COL_2_1_NAME : aliased constant String := "message";
COL_3_1_NAME : aliased constant String := "creation_date";
COL_4_1_NAME : aliased constant String := "author_id";
MBLOG_DEF : aliased constant ADO.Schemas.Class_Mapping :=
(Count => 5,
Table => MBLOG_NAME'Access,
Members => (
1 => COL_0_1_NAME'Access,
2 => COL_1_1_NAME'Access,
3 => COL_2_1_NAME'Access,
4 => COL_3_1_NAME'Access,
5 => COL_4_1_NAME'Access)
);
MBLOG_TABLE : constant ADO.Schemas.Class_Mapping_Access
:= MBLOG_DEF'Access;
Null_Mblog : constant Mblog_Ref
:= Mblog_Ref'(ADO.Objects.Object_Ref with null record);
type Mblog_Impl is
new ADO.Objects.Object_Record (Key_Type => ADO.Objects.KEY_INTEGER,
Of_Class => MBLOG_DEF'Access)
with record
Version : Integer;
Message : Ada.Strings.Unbounded.Unbounded_String;
Creation_Date : Ada.Calendar.Time;
Author : AWA.Users.Models.User_Ref;
end record;
type Mblog_Access is access all Mblog_Impl;
overriding
procedure Destroy (Object : access Mblog_Impl);
overriding
procedure Find (Object : in out Mblog_Impl;
Session : in out ADO.Sessions.Session'Class;
Query : in ADO.SQL.Query'Class;
Found : out Boolean);
overriding
procedure Load (Object : in out Mblog_Impl;
Session : in out ADO.Sessions.Session'Class);
procedure Load (Object : in out Mblog_Impl;
Stmt : in out ADO.Statements.Query_Statement'Class;
Session : in out ADO.Sessions.Session'Class);
overriding
procedure Save (Object : in out Mblog_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Create (Object : in out Mblog_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
overriding
procedure Delete (Object : in out Mblog_Impl;
Session : in out ADO.Sessions.Master_Session'Class);
procedure Set_Field (Object : in out Mblog_Ref'Class;
Impl : out Mblog_Access);
package File_1 is
new ADO.Queries.Loaders.File (Path => "microblog-list.xml",
Sha1 => "47DAA315FBA533BB12DF4F938AE84FF5F78316AD");
package Def_Listinfo_List is
new ADO.Queries.Loaders.Query (Name => "list",
File => File_1.File'Access);
Query_List : constant ADO.Queries.Query_Definition_Access
:= Def_Listinfo_List.Query'Access;
end Atlas.Microblog.Models;
|
reznikmm/matreshka | Ada | 4,681 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Office.Target_Frame_Name_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Office_Target_Frame_Name_Attribute_Node is
begin
return Self : Office_Target_Frame_Name_Attribute_Node do
Matreshka.ODF_Office.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Office_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Office_Target_Frame_Name_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Target_Frame_Name_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Office_URI,
Matreshka.ODF_String_Constants.Target_Frame_Name_Attribute,
Office_Target_Frame_Name_Attribute_Node'Tag);
end Matreshka.ODF_Office.Target_Frame_Name_Attributes;
|
godunko/adawebui | Ada | 3,544 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Web Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2020, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision: 5761 $ $Date: 2017-05-20 11:06:31 +0300 (Sat, 20 May 2017) $
------------------------------------------------------------------------------
with Web.UI.Widgets.Spin_Boxes.Generic_Floats;
generic
package Web.UI.Generic_Float_Spin_Boxes
renames Web.UI.Widgets.Spin_Boxes.Generic_Floats;
|
reznikmm/matreshka | Ada | 15,959 | ads | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Ada Modeling Framework --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2011-2012, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
-- This file is generated, don't edit it.
------------------------------------------------------------------------------
-- A state models a situation during which some (usually implicit) invariant
-- condition holds.
--
-- The states of protocol state machines are exposed to the users of their
-- context classifiers. A protocol state represents an exposed stable
-- situation of its context classifier: when an instance of the classifier is
-- not processing any operation, users of this instance can always know its
-- state configuration.
------------------------------------------------------------------------------
limited with AMF.UML.Behaviors;
limited with AMF.UML.Classifiers;
limited with AMF.UML.Connection_Point_References.Collections;
limited with AMF.UML.Constraints;
with AMF.UML.Namespaces;
limited with AMF.UML.Pseudostates.Collections;
with AMF.UML.Redefinable_Elements;
limited with AMF.UML.Regions.Collections;
limited with AMF.UML.State_Machines;
limited with AMF.UML.Triggers.Collections;
with AMF.UML.Vertexs;
package AMF.UML.States is
pragma Preelaborate;
type UML_State is limited interface
and AMF.UML.Redefinable_Elements.UML_Redefinable_Element
and AMF.UML.Namespaces.UML_Namespace
and AMF.UML.Vertexs.UML_Vertex;
type UML_State_Access is
access all UML_State'Class;
for UML_State_Access'Storage_Size use 0;
not overriding function Get_Connection
(Self : not null access constant UML_State)
return AMF.UML.Connection_Point_References.Collections.Set_Of_UML_Connection_Point_Reference is abstract;
-- Getter of State::connection.
--
-- The entry and exit connection points used in conjunction with this
-- (submachine) state, i.e. as targets and sources, respectively, in the
-- region with the submachine state. A connection point reference
-- references the corresponding definition of a connection point
-- pseudostate in the statemachine referenced by the submachinestate.
not overriding function Get_Connection_Point
(Self : not null access constant UML_State)
return AMF.UML.Pseudostates.Collections.Set_Of_UML_Pseudostate is abstract;
-- Getter of State::connectionPoint.
--
-- The entry and exit pseudostates of a composite state. These can only be
-- entry or exit Pseudostates, and they must have different names. They
-- can only be defined for composite states.
not overriding function Get_Deferrable_Trigger
(Self : not null access constant UML_State)
return AMF.UML.Triggers.Collections.Set_Of_UML_Trigger is abstract;
-- Getter of State::deferrableTrigger.
--
-- A list of triggers that are candidates to be retained by the state
-- machine if they trigger no transitions out of the state (not consumed).
-- A deferred trigger is retained until the state machine reaches a state
-- configuration where it is no longer deferred.
not overriding function Get_Do_Activity
(Self : not null access constant UML_State)
return AMF.UML.Behaviors.UML_Behavior_Access is abstract;
-- Getter of State::doActivity.
--
-- An optional behavior that is executed while being in the state. The
-- execution starts when this state is entered, and stops either by
-- itself, or when the state is exited, whichever comes first.
not overriding procedure Set_Do_Activity
(Self : not null access UML_State;
To : AMF.UML.Behaviors.UML_Behavior_Access) is abstract;
-- Setter of State::doActivity.
--
-- An optional behavior that is executed while being in the state. The
-- execution starts when this state is entered, and stops either by
-- itself, or when the state is exited, whichever comes first.
not overriding function Get_Entry
(Self : not null access constant UML_State)
return AMF.UML.Behaviors.UML_Behavior_Access is abstract;
-- Getter of State::entry.
--
-- An optional behavior that is executed whenever this state is entered
-- regardless of the transition taken to reach the state. If defined,
-- entry actions are always executed to completion prior to any internal
-- behavior or transitions performed within the state.
not overriding procedure Set_Entry
(Self : not null access UML_State;
To : AMF.UML.Behaviors.UML_Behavior_Access) is abstract;
-- Setter of State::entry.
--
-- An optional behavior that is executed whenever this state is entered
-- regardless of the transition taken to reach the state. If defined,
-- entry actions are always executed to completion prior to any internal
-- behavior or transitions performed within the state.
not overriding function Get_Exit
(Self : not null access constant UML_State)
return AMF.UML.Behaviors.UML_Behavior_Access is abstract;
-- Getter of State::exit.
--
-- An optional behavior that is executed whenever this state is exited
-- regardless of which transition was taken out of the state. If defined,
-- exit actions are always executed to completion only after all internal
-- activities and transition actions have completed execution.
not overriding procedure Set_Exit
(Self : not null access UML_State;
To : AMF.UML.Behaviors.UML_Behavior_Access) is abstract;
-- Setter of State::exit.
--
-- An optional behavior that is executed whenever this state is exited
-- regardless of which transition was taken out of the state. If defined,
-- exit actions are always executed to completion only after all internal
-- activities and transition actions have completed execution.
not overriding function Get_Is_Composite
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Getter of State::isComposite.
--
-- A state with isComposite=true is said to be a composite state. A
-- composite state is a state that contains at least one region.
not overriding function Get_Is_Orthogonal
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Getter of State::isOrthogonal.
--
-- A state with isOrthogonal=true is said to be an orthogonal composite
-- state. An orthogonal composite state contains two or more regions.
not overriding function Get_Is_Simple
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Getter of State::isSimple.
--
-- A state with isSimple=true is said to be a simple state. A simple state
-- does not have any regions and it does not refer to any submachine state
-- machine.
not overriding function Get_Is_Submachine_State
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Getter of State::isSubmachineState.
--
-- A state with isSubmachineState=true is said to be a submachine state.
-- Such a state refers to a state machine (submachine).
not overriding function Get_Redefined_State
(Self : not null access constant UML_State)
return AMF.UML.States.UML_State_Access is abstract;
-- Getter of State::redefinedState.
--
-- The state of which this state is a redefinition.
not overriding procedure Set_Redefined_State
(Self : not null access UML_State;
To : AMF.UML.States.UML_State_Access) is abstract;
-- Setter of State::redefinedState.
--
-- The state of which this state is a redefinition.
not overriding function Get_Redefinition_Context
(Self : not null access constant UML_State)
return AMF.UML.Classifiers.UML_Classifier_Access is abstract;
-- Getter of State::redefinitionContext.
--
-- References the classifier in which context this element may be
-- redefined.
not overriding function Get_Region
(Self : not null access constant UML_State)
return AMF.UML.Regions.Collections.Set_Of_UML_Region is abstract;
-- Getter of State::region.
--
-- The regions owned directly by the state.
not overriding function Get_State_Invariant
(Self : not null access constant UML_State)
return AMF.UML.Constraints.UML_Constraint_Access is abstract;
-- Getter of State::stateInvariant.
--
-- Specifies conditions that are always true when this state is the
-- current state. In protocol state machines, state invariants are
-- additional conditions to the preconditions of the outgoing transitions,
-- and to the postcondition of the incoming transitions.
not overriding procedure Set_State_Invariant
(Self : not null access UML_State;
To : AMF.UML.Constraints.UML_Constraint_Access) is abstract;
-- Setter of State::stateInvariant.
--
-- Specifies conditions that are always true when this state is the
-- current state. In protocol state machines, state invariants are
-- additional conditions to the preconditions of the outgoing transitions,
-- and to the postcondition of the incoming transitions.
not overriding function Get_Submachine
(Self : not null access constant UML_State)
return AMF.UML.State_Machines.UML_State_Machine_Access is abstract;
-- Getter of State::submachine.
--
-- The state machine that is to be inserted in place of the (submachine)
-- state.
not overriding procedure Set_Submachine
(Self : not null access UML_State;
To : AMF.UML.State_Machines.UML_State_Machine_Access) is abstract;
-- Setter of State::submachine.
--
-- The state machine that is to be inserted in place of the (submachine)
-- state.
overriding function Containing_State_Machine
(Self : not null access constant UML_State)
return AMF.UML.State_Machines.UML_State_Machine_Access is abstract;
-- Operation State::containingStateMachine.
--
-- The query containingStateMachine() returns the state machine that
-- contains the state either directly or transitively.
not overriding function Is_Composite
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Operation State::isComposite.
--
-- A composite state is a state with at least one region.
overriding function Is_Consistent_With
(Self : not null access constant UML_State;
Redefinee : AMF.UML.Redefinable_Elements.UML_Redefinable_Element_Access)
return Boolean is abstract;
-- Operation State::isConsistentWith.
--
-- The query isConsistentWith() specifies that a redefining state is
-- consistent with a redefined state provided that the redefining state is
-- an extension of the redefined state: A simple state can be redefined
-- (extended) to become a composite state (by adding a region) and a
-- composite state can be redefined (extended) by adding regions and by
-- adding vertices, states, and transitions to inherited regions. All
-- states may add or replace entry, exit, and 'doActivity' actions.
not overriding function Is_Orthogonal
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Operation State::isOrthogonal.
--
-- An orthogonal state is a composite state with at least 2 regions
not overriding function Is_Redefinition_Context_Valid
(Self : not null access constant UML_State;
Redefined : AMF.UML.States.UML_State_Access)
return Boolean is abstract;
-- Operation State::isRedefinitionContextValid.
--
-- The query isRedefinitionContextValid() specifies whether the
-- redefinition contexts of a state are properly related to the
-- redefinition contexts of the specified state to allow this element to
-- redefine the other. The containing region of a redefining state must
-- redefine the containing region of the redefined state.
not overriding function Is_Simple
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Operation State::isSimple.
--
-- A simple state is a state without any regions.
not overriding function Is_Submachine_State
(Self : not null access constant UML_State)
return Boolean is abstract;
-- Operation State::isSubmachineState.
--
-- Only submachine states can have a reference statemachine.
not overriding function Redefinition_Context
(Self : not null access constant UML_State)
return AMF.UML.Classifiers.UML_Classifier_Access is abstract;
-- Operation State::redefinitionContext.
--
-- The redefinition context of a state is the nearest containing
-- statemachine.
end AMF.UML.States;
|
stcarrez/ada-el | Ada | 3,685 | adb | -----------------------------------------------------------------------
-- EL.Beans.Tests - Testsuite for EL.Beans
-- Copyright (C) 2011, 2018 Stephane Carrez
-- Written by Stephane Carrez ([email protected])
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
-----------------------------------------------------------------------
with Util.Test_Caller;
with Test_Bean;
with Util.Beans.Objects;
with EL.Contexts.Default;
package body EL.Beans.Tests is
use Util.Tests;
use Test_Bean;
package Caller is new Util.Test_Caller (Test, "EL.Beans");
procedure Add_Tests (Suite : in Util.Tests.Access_Test_Suite) is
begin
Caller.Add_Test (Suite, "Test EL.Beans.Add_Parameter",
Test_Add_Parameter'Access);
Caller.Add_Test (Suite, "Test EL.Beans.Initialize",
Test_Initialize'Access);
end Add_Tests;
-- ------------------------------
-- Test Add_Parameter
-- ------------------------------
procedure Test_Add_Parameter (T : in out Test) is
P : Param_Vectors.Vector;
Context : EL.Contexts.Default.Default_Context;
begin
-- Add a constant parameter.
Add_Parameter (Container => P,
Name => "firstName",
Value => "my name",
Context => Context);
Assert_Equals (T, 1, Integer (P.Length), "Parameter was not added");
T.Assert_Equals ("firstName", P.Element (1).Name, "Invalid parameter name");
T.Assert (P.Element (1).Value.Is_Constant, "Value should be a constant");
T.Assert_Equals ("my name",
Util.Beans.Objects.To_String (P.Element (1).Value.Get_Value (Context)),
"Invalid value");
-- Add an expression parameter.
Add_Parameter (Container => P,
Name => "lastName",
Value => "#{name}",
Context => Context);
Assert_Equals (T, 2, Integer (P.Length), "Parameter was not added");
end Test_Add_Parameter;
-- ------------------------------
-- Test the Initialize procedure with a set of expressions
-- ------------------------------
procedure Test_Initialize (T : in out Test) is
P : Param_Vectors.Vector;
Context : EL.Contexts.Default.Default_Context;
User : Person_Access := Create_Person ("Joe", "Black", 42);
Bean : Person_Access := Create_Person ("", "", 0);
begin
Context.Set_Variable ("user", User);
Add_Parameter (P, "firstName", "#{user.firstName}", Context);
Add_Parameter (P, "lastName", "#{user.lastName}", Context);
Add_Parameter (P, "age", "#{user.age + 2}", Context);
Initialize (Bean.all, P, Context);
T.Assert_Equals ("Joe", Bean.First_Name, "First name not initialized");
T.Assert_Equals ("Black", Bean.Last_Name, "Last name not initialized");
Assert_Equals (T, 44, Integer (Bean.Age), "Age was not initialized");
Free (Bean);
Free (User);
end Test_Initialize;
end EL.Beans.Tests;
|
reznikmm/gela | Ada | 536 | ads | limited with Gela.Int.Visiters;
with Gela.Interpretations;
package Gela.Int is
pragma Preelaborate;
type Interpretation (Length : Natural) is abstract tagged record
Index : Gela.Interpretations.Interpretation_Index;
Down : Gela.Interpretations.Interpretation_Index_Array (1 .. Length);
end record;
type Interpretation_Access is access Interpretation'Class;
not overriding procedure Visit
(Self : Interpretation;
Visiter : access Gela.Int.Visiters.Visiter'Class) is abstract;
end Gela.Int;
|
burratoo/Acton | Ada | 12,551 | ads | ------------------------------------------------------------------------------------------
-- --
-- OAK PROCESSOR SUPPORT PACKAGE --
-- FREESCALE MPC5544 --
-- --
-- MPC5554.FLASH --
-- --
-- Copyright (C) 2010-2021, Patrick Bernardi --
-- --
------------------------------------------------------------------------------------------
with System; use System;
with Interfaces; use Interfaces;
with System.Storage_Elements; use System.Storage_Elements;
package MPC5554.Flash with Preelaborate is
----------------------------------------------------------------------------
-- Memory Addresses
----------------------------------------------------------------------------
Flash_Base_Address : constant Integer_Address := 16#C3F8_8000#;
MCR_Offset_Address : constant Integer_Address := 16#0000#;
LMLR_Offset_Address : constant Integer_Address := 16#0004#;
HLR_Offset_Address : constant Integer_Address := 16#0008#;
SLMLR_Offset_Address : constant Integer_Address := 16#000C#;
LMSR_Offset_Address : constant Integer_Address := 16#0010#;
HSR_Offset_Address : constant Integer_Address := 16#0014#;
AR_Offset_Address : constant Integer_Address := 16#0018#;
BIUCR_Offset_Address : constant Integer_Address := 16#001C#;
BIUAPR_Offset_Address : constant Integer_Address := 16#0020#;
Array_Bases_Address : constant Integer_Address := 16#0000_0000#;
Shadow_Base_Address : constant Integer_Address := 16#00FF_FFC00#;
----------------------------------------------------------------------------
-- Hardware Features
----------------------------------------------------------------------------
LMLR_Password : constant Unsigned_32 := 16#A1A1_1111#;
SLMLR_Password : constant Unsigned_32 := 16#C3C3_3333#;
HLR_Password : constant Unsigned_32 := 16#B2B2_2222#;
type Address_Space is (Shadow_Primary,
Low_Primary,
Mid_Primary,
Shadow_Secondary,
Low_Secondary,
Mid_Secondary,
High);
----------------------------------------------------------------------------
-- Flash Types
----------------------------------------------------------------------------
-- Module Configuration Register (FLASH_MCR)
type PEAS_Type is (Main_Space_Enabled, Shadow_Space_Enabled);
type Execute_Type is (Not_Executing, Executing);
type Module_Configuration_Type is record
ECC_Error_Event : Occurred_Type;
Read_While_Write_Error_Event : Occurred_Type;
Progream_Erase_Access_Space : PEAS_Type;
Done : Yes_No_Type;
Program_Erase_Good : Yes_No_Type;
Stop_Mode : Enable_Type;
Program : Execute_Type;
Program_Suspend : Yes_No_Type;
Erase : Execute_Type;
Erase_Suspend : Yes_No_Type;
High_Voltage : Enable_Type;
end record;
-- Low-/Mid-Address Space Block Locking Register (FLASH_LMLR)
type Lock_Enable_Type is (Not_Editable, Editable);
type Lock_Type is (Unlocked, Locked);
type Block_Id is (B27, B26, B25, B24, B23, B22, B21, B20, B19, B18, B17,
B16, B15, B14, B13, B12, B11, B10, B9, B8, B7, B6, B5, B4,
B3, B2, B1, B0);
pragma Ordered (Block_Id);
type Block_Lock_Array is array (Block_Id range <>)
of Lock_Type with Pack;
subtype Shadow_Lock_Array is Block_Lock_Array (B0 .. B0);
subtype Low_Address_Lock_Array is Block_Lock_Array (B3 .. B0);
subtype Mid_Address_Lock_Array is Block_Lock_Array (B15 .. B0);
type Low_Mid_Address_Space_Block_Locking_Type is record
Locks : Lock_Enable_Type;
Shadow_Lock : Lock_Type;
Mid_Address_Locks : Low_Address_Lock_Array;
Low_Address_Locks : Mid_Address_Lock_Array;
end record;
-- High-Address Space Block Locking Register (FLASH_LMLR)
subtype High_Address_Lock_Array is Block_Lock_Array (B27 .. B0);
type High_Address_Space_Block_Locking_Type is record
Locks : Lock_Enable_Type;
High_Address_Locks : High_Address_Lock_Array;
end record;
-- Low-/Mid-Address Address Space Block Select Register (FLASH_LMSR)
type Select_Type is (Not_Selected, Selected);
type Block_Select_Array is array (Register_Elements range <>)
of Select_Type with Pack;
type Low_Mid_Address_Space_Block_Select_Type is record
Mid_Address_Blocks : Block_Select_Array (0 .. 3);
Low_Address_Blocks : Block_Select_Array (0 .. 15);
end record;
-- High-Address Address Space Block Select Register (FLASH_HSR)
type High_Address_Space_Block_Select_Type is record
High_Address_Blocks : Block_Select_Array (0 .. 27);
end record;
-- Flash Bus Interface Unit Control Register (FLASH_BIUCR)
type Hold_Cycles is (Reserved,
One_Hold_Cycle,
Two_Hold_Cycle,
Three_Hold_Cycle,
Four_Hold_Cycle,
Five_Hold_Cycle,
Six_Hold_Cycle,
No_Pipelining);
type Wait_States is range 0 .. 7;
subtype Write_Wait_States is Wait_States range 1 .. 3;
type Prefetch_Type is (No_Prefetching, Prefetch_On_Burst, Prefetch_On_Any);
type Prefetch_Limit_Type is range 0 .. 6;
type Flash_Bus_Interface_Unit_Control_Type is record
Master_Prefetch : Enable_Array (0 .. 3);
Address_Pipeline_Control : Hold_Cycles;
Write_Wait_State_Control : Write_Wait_States;
Read_Wait_State_Control : Wait_States;
Data_Prefetch : Prefetch_Type;
Instruction_Prefetch : Prefetch_Type;
Prefetch_Limit : Prefetch_Limit_Type;
FBIU_Line_Read_Buffers : Enable_Type;
end record;
-- Flash Bus Interface Unit Access Protection Register (FLASH_BIUAPR)
type Access_Protection_Type is (No_Access, Read_Access, Write_Access,
Read_Write_Access);
type Access_Protection_Array is array (Integer range <>)
of Access_Protection_Type with Pack;
type Flash_Bus_Interface_Unit_Access_Protection_Type is record
Master_Access_Protection : Access_Protection_Array (0 .. 3);
end record;
----------------------------------------------------------------------------
-- Hardware Respresentations
----------------------------------------------------------------------------
for PEAS_Type use (Main_Space_Enabled => 0, Shadow_Space_Enabled => 1);
for Execute_Type use (Not_Executing => 0, Executing => 1);
for Module_Configuration_Type use record
ECC_Error_Event at 0 range 16 .. 16;
Read_While_Write_Error_Event at 0 range 17 .. 17;
Progream_Erase_Access_Space at 0 range 20 .. 20;
Done at 0 range 21 .. 21;
Program_Erase_Good at 0 range 22 .. 22;
Stop_Mode at 0 range 25 .. 25;
Program at 0 range 27 .. 27;
Program_Suspend at 0 range 28 .. 28;
Erase at 0 range 29 .. 29;
Erase_Suspend at 0 range 30 .. 30;
High_Voltage at 0 range 31 .. 31;
end record;
for Lock_Enable_Type use (Not_Editable => 0, Editable => 1);
for Lock_Type use (Unlocked => 0, Locked => 1);
for Low_Mid_Address_Space_Block_Locking_Type use record
Locks at 0 range 0 .. 0;
Shadow_Lock at 0 range 11 .. 11;
Mid_Address_Locks at 0 range 12 .. 15;
Low_Address_Locks at 0 range 16 .. 31;
end record;
for High_Address_Space_Block_Locking_Type use record
Locks at 0 range 0 .. 0;
High_Address_Locks at 0 range 4 .. 31;
end record;
for Select_Type use (Not_Selected => 0, Selected => 1);
for Low_Mid_Address_Space_Block_Select_Type use record
Mid_Address_Blocks at 0 range 12 .. 15;
Low_Address_Blocks at 0 range 16 .. 31;
end record;
for High_Address_Space_Block_Select_Type use record
High_Address_Blocks at 0 range 4 .. 31;
end record;
for Flash_Bus_Interface_Unit_Control_Type use record
Master_Prefetch at 0 range 12 .. 15;
Address_Pipeline_Control at 0 range 16 .. 18;
Write_Wait_State_Control at 0 range 19 .. 20;
Read_Wait_State_Control at 0 range 21 .. 23;
Data_Prefetch at 0 range 24 .. 25;
Instruction_Prefetch at 0 range 26 .. 27;
Prefetch_Limit at 0 range 28 .. 30;
FBIU_Line_Read_Buffers at 0 range 31 .. 31;
end record;
for Access_Protection_Type use (No_Access => 0, Read_Access => 1,
Write_Access => 2, Read_Write_Access => 3);
for Flash_Bus_Interface_Unit_Access_Protection_Type use record
Master_Access_Protection at 0 range 24 .. 31;
end record;
----------------------------------------------------------------------------
-- Flash Registers
----------------------------------------------------------------------------
Module_Configuration_Register : Module_Configuration_Type
with Address => System'To_Address (Flash_Base_Address +
MCR_Offset_Address);
Low_Mid_Address_Space_Block_Locking_Register :
Low_Mid_Address_Space_Block_Locking_Type
with Address => System'To_Address (Flash_Base_Address +
LMLR_Offset_Address);
High_Address_Space_Block_Locking_Register :
High_Address_Space_Block_Locking_Type
with Address => System'To_Address (Flash_Base_Address +
HLR_Offset_Address);
Secondary_Low_Mid_Address_Space_Block_Locking_Register :
Low_Mid_Address_Space_Block_Locking_Type
with Address => System'To_Address (Flash_Base_Address +
SLMLR_Offset_Address);
Low_Mid_Address_Space_Block_Select_Register :
Low_Mid_Address_Space_Block_Select_Type
with Address => System'To_Address (Flash_Base_Address +
LMSR_Offset_Address);
High_Address_Space_Block_Select_Register :
High_Address_Space_Block_Select_Type
with Address => System'To_Address (Flash_Base_Address +
HSR_Offset_Address);
Address_Register : System.Address
with Address => System'To_Address (Flash_Base_Address +
AR_Offset_Address);
Flash_Bus_Interface_Unit_Control_Register :
Flash_Bus_Interface_Unit_Control_Type
with Address => System'To_Address (Flash_Base_Address +
BIUCR_Offset_Address);
----------------------------------------------------------------------------
-- Helper Subprograms
----------------------------------------------------------------------------
procedure Initialise_For_Flash_Programming;
procedure Completed_Flash_Programming;
procedure Program_Protected_Access
(P : access protected procedure;
Destination : in Address);
procedure Unlock_Space_Block_Locking_Register
(Space : in Address_Space);
procedure Write_Flash_Bus_Interface_Unit_Control_Register
(Contents : in Flash_Bus_Interface_Unit_Control_Type);
procedure Do_Not_Clear_Error_States (MCR : in out Module_Configuration_Type)
with Inline_Always;
Flash_Exception : exception;
Lock_Exception : exception;
private
type Program_Space is array (Integer_Address range <>) of Unsigned_32;
SRAM_LOAD : Program_Space := (16#90E6_0000#, 16#4C00_012C#,
16#4E80_0020#, 16#0000_0000#);
Saved_FBIUCR : Flash.Flash_Bus_Interface_Unit_Control_Type;
end MPC5554.Flash;
|
ytomino/vampire | Ada | 512 | ads | -- The Village of Vampire by YT, このソースコードはNYSLです
-- 医者と探偵の確認用ページ
with Vampire.Villages;
procedure Vampire.R3.Target_Page (
Output : not null access Ada.Streams.Root_Stream_Type'Class;
Form : in Forms.Root_Form_Type'Class;
Template : in String;
Village_Id : in Tabula.Villages.Village_Id;
Village : in Villages.Village_Type;
Player : in Tabula.Villages.Person_Index;
Target : in Tabula.Villages.Person_Index;
User_Id : in String;
User_Password : in String);
|
vfinotti/cortex-m0-blinky-ada | Ada | 1,073 | adb | -------------------------------------------------------------------------------
-- Title : Blinky example for Cortex-M0
--
-- File : main.adb
-- Author : Vitor Finotti
-- Created on : 2019-04-24 19:46:32
-- Description :
--
--
--
-------------------------------------------------------------------------------
pragma Restrictions (No_Exceptions); -- avoid __gnat_last_chance_handler being used
package body Main is
procedure Run is
-- Period : constant Integer := 1000000; -- Synthesis period
Period : constant Integer := 200; -- Simulation period
type Period_Range is range 0 .. Period;
type Uint32 is mod 2**32;
Led_Toggle : constant := 16#f0f0f0f0#;
Counter : Integer := 0;
Dummy : Uint32 := 0;
begin
loop
Counter := 0;
for I in Period_Range loop
Counter := Counter + 1;
end loop;
Dummy := Led_Toggle;
Dummy := Dummy + 1; -- force toggle parameter to change
end loop;
end Run;
end Main;
|
reznikmm/matreshka | Ada | 4,632 | adb | ------------------------------------------------------------------------------
-- --
-- Matreshka Project --
-- --
-- Open Document Toolkit --
-- --
-- Runtime Library Component --
-- --
------------------------------------------------------------------------------
-- --
-- Copyright © 2014, Vadim Godunko <[email protected]> --
-- All rights reserved. --
-- --
-- Redistribution and use in source and binary forms, with or without --
-- modification, are permitted provided that the following conditions --
-- are met: --
-- --
-- * Redistributions of source code must retain the above copyright --
-- notice, this list of conditions and the following disclaimer. --
-- --
-- * Redistributions in binary form must reproduce the above copyright --
-- notice, this list of conditions and the following disclaimer in the --
-- documentation and/or other materials provided with the distribution. --
-- --
-- * Neither the name of the Vadim Godunko, IE nor the names of its --
-- contributors may be used to endorse or promote products derived from --
-- this software without specific prior written permission. --
-- --
-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS --
-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT --
-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR --
-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT --
-- HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, --
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED --
-- TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR --
-- PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF --
-- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING --
-- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS --
-- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --
-- --
------------------------------------------------------------------------------
-- $Revision$ $Date$
------------------------------------------------------------------------------
with Matreshka.DOM_Documents;
with Matreshka.ODF_String_Constants;
with ODF.DOM.Iterators;
with ODF.DOM.Visitors;
package body Matreshka.ODF_Style.Cell_Protect_Attributes is
------------
-- Create --
------------
overriding function Create
(Parameters : not null access Matreshka.DOM_Attributes.Attribute_L2_Parameters)
return Style_Cell_Protect_Attribute_Node is
begin
return Self : Style_Cell_Protect_Attribute_Node do
Matreshka.ODF_Style.Constructors.Initialize
(Self'Unchecked_Access,
Parameters.Document,
Matreshka.ODF_String_Constants.Style_Prefix);
end return;
end Create;
--------------------
-- Get_Local_Name --
--------------------
overriding function Get_Local_Name
(Self : not null access constant Style_Cell_Protect_Attribute_Node)
return League.Strings.Universal_String
is
pragma Unreferenced (Self);
begin
return Matreshka.ODF_String_Constants.Cell_Protect_Attribute;
end Get_Local_Name;
begin
Matreshka.DOM_Documents.Register_Attribute
(Matreshka.ODF_String_Constants.Style_URI,
Matreshka.ODF_String_Constants.Cell_Protect_Attribute,
Style_Cell_Protect_Attribute_Node'Tag);
end Matreshka.ODF_Style.Cell_Protect_Attributes;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.