------------------------------------------------------------------------------ -- -- -- XVIEW ADA LIBRARY COMPONENTS -- -- -- -- XV_NOTICE_PACKAGE -- -- -- -- S p e c -- -- -- -- Copyright (c) 1995 Andreas Almroth, All Rights Reserved -- -- -- -- The XVIEW ADA library is free software; you can redistribute it and/or -- -- modify it under terms of the GNU Library General Public License as -- -- published by the Free Software Foundation; either version 2, or (at your -- -- option) any later version. The XVIEW ADA 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 the XVIEW ADA library; see the file COPYING.LIB. If -- -- not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, -- -- MA 02139, USA. -- -- -- ------------------------------------------------------------------------------ with Ada.Finalization,Xv_Base_Package,Xv_Frame_Package,Xv_Font_Package; use Ada.Finalization,Xv_Base_Package,Xv_Frame_Package,Xv_Font_Package; with Ada.Strings.Unbounded; use Ada.Strings.Unbounded; package Xv_Notice_Package is type Notice is new Xv_Opaque; type Callback_Notice_Ptr is access procedure (Item : Notice; Value : Integer; Event : Integer); type Integer_Ptr is access all Integer; type Xv_Notice (Owner : Xv_Opaque; Ini_State : Integer) is new Controlled with private; type Xv_Notice_Ptr is access all Xv_Notice; type Notice_Buttons (Size : Positive) is new Controlled with private; type Notice_Buttons_Ptr is access all Notice_Buttons; procedure Set_Text (V : in Xv_Notice; Txt : Xv_Base_Package.Strings); procedure Set_Buttons (V : in Xv_Notice; Buttons : Notice_Buttons_ptr); procedure Set_Callback (V : in Xv_Notice; func : callback_notice_ptr); procedure Set_Lock_Screen (V : in Xv_Notice; State : Boolean); procedure Set_Block_Thread (V : in Xv_Notice; State : Boolean); procedure Show_Notice (V : in Xv_Notice); function Get_Choosen (V : in Xv_Notice) return Integer; function Get_Notice (V : in Xv_Notice) return Notice; procedure Set_Text (V : in Notice_Buttons_Ptr; Idx : Positive; txt : String); procedure Set_Value (V : in Notice_Buttons_Ptr; Idx : Positive; num : Integer); function Get_Size (V : in Notice_Buttons_Ptr) return Positive; function Get_Text (V : in Notice_Buttons_Ptr; Idx : Positive) return Unbounded_String; function Get_Value (V : in Notice_Buttons_Ptr; Idx : Positive) return Integer; private function ComposeString(Txt : in Xv_Base_Package.Strings) return String; type Xv_Notice (Owner : Xv_Opaque; Ini_State : Integer) is new Controlled with record Parent : Xv_Opaque := Owner; Base : Notice; State : Integer := Ini_State; Text : Xv_Base_Package.Strings_Ptr; end record; procedure Initialize (V : in out Xv_Notice); procedure Finalize (V : in out Xv_Notice); type Notice_Data is record Txt : Unbounded_String; Value : Integer; end record; type Notice_Data_Ptr is access all Notice_Data; type Notice_Data_Array is array (Positive range<>) of Notice_Data_Ptr; type Notice_Buttons (Size : Positive) is new Controlled with record Data : Notice_Data_Array (1..Size); end record; procedure Initialize (V : in out Notice_Buttons); procedure Finalize (V : in out Notice_Buttons); end Xv_Notice_Package;