----------------------------------------------------------------------- -- asf-events -- ASF Events -- Copyright (C) 2010 Stephane Carrez -- Written by Stephane Carrez (Stephane.Carrez@gmail.com) -- SPDX-License-Identifier: Apache-2.0 ----------------------------------------------------------------------- -- with Util.Events; -- with ASF.Lifecycles; -- with ASF.Components.Base; -- -- with Ada.Containers.Vectors; -- The ASF.Events package defines the application events that an ASF -- application can receive. Events are queued while processing the JSF phases -- (See UIComponent.Queue_Event). They are dispatched after each phase -- (See UIComponent.Broadcast). -- -- This package is an Ada adaptation for the Java Server Faces Specification -- JSR 314 - 3.4.2 Application Events. package ASF.Events is -- ------------------------------ -- Faces event -- ------------------------------ -- The Faces_Event represents the root type for ASF events. -- The event is associated with a component and a lifecycle phase after -- which it will be processed. -- type Faces_Event is new Util.Events.Event with private; -- Get the lifecycle phase where the event must be processed. -- function Get_Phase (Event : in Faces_Event) return ASF.Lifecycles.Phase_Type; -- Set the lifecycle phase when this event must be processed. -- procedure Set_Phase (Event : in out Faces_Event; -- Phase : in ASF.Lifecycles.Phase_Type); -- Get the component onto which the event was posted. -- function Get_Component (Event : in Faces_Event) return Components.Base.UIComponent_Access; -- private -- -- type Faces_Event_Access is access all Faces_Event'Class; -- -- package Event_Vectors is new Ada.Containers.Vectors (Index_Type => Natural, -- Element_Type => Faces_Event_Access); -- -- type Faces_Event is new Util.Events.Event with record -- Phase : ASF.Lifecycles.Phase_Type := ASF.Lifecycles.RESTORE_VIEW; -- Component : Components.Base.UIComponent_Access := null; -- end record; end ASF.Events;