|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 Tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T V
Length: 16020 (0x3e94)
Types: TextFile
Names: »V«
└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
└─⟦0c20f784e⟧ »DATA«
└─⟦1abbe589f⟧
└─⟦059497ac5⟧
└─⟦this⟧
with Xlbt_Arithmetic;
use Xlbt_Arithmetic;
with Xlbt_Basic;
use Xlbt_Basic;
with Xlbt_Event;
use Xlbt_Event;
package Xlbp_Event is
------------------------------------------------------------------------------
-- X Library Event Handling
--
-- Xlbp_Event - Routines for reading, writing, and handling X events.
------------------------------------------------------------------------------
-- Copyright 1989 - 1991 by Rational, Santa Clara, California.
-- Copyright 1985 - 1989 by the Massachusetts Institute of Technology
--
-- All Rights Reserved.
--
-- Permission to use, copy, modify, and distribute this software and its
-- documentation for any purpose and without fee is hereby granted,
-- provided that the above copyright notice(s) appear in all copies and that
-- both that copyright notice(s) and this permission notice appear in
-- supporting documentation, and that the names of MIT or Rational not be
-- used in advertising or publicity pertaining to distribution of the software
-- without specific, written prior permission.
--
-- MIT and Rational disclaim all warranties with regard to this software,
-- including all implied warranties of merchantability and fitness, in no
-- event shall MIT or Rational be liable for any special, 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.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- Event Controls
------------------------------------------------------------------------------
procedure X_Flush (Display : X_Display);
------------------------------------------------------------------------------
-- Display - Specifies the display to be flushed.
--
-- Force any buffered server requests to be transmitted immediately.
------------------------------------------------------------------------------
procedure X_Put_Back_Event (Display : X_Display;
Event : X_Event);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- event - Specifies the event to return.
--
-- Puts an event back onto the head of the queue.
------------------------------------------------------------------------------
procedure X_Select_Input (Display : X_Display;
Window : X_Window;
Event_Mask : X_Event_Mask);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to use.
-- Event_Mask - Specifies the event mask.
--
-- Selects the events to be reported to this client by the specified window.
------------------------------------------------------------------------------
procedure X_Send_Event (Display : X_Display;
Window : X_Window;
Propagate : Boolean;
Event_Mask : X_Event_Mask;
Event : X_Event;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window for the event.
-- Propagate - Specifies True to cause propagation of the event
-- Event_Mask - Specifies the types of events to send.
-- Event - Specifies the event to send.
-- Status - Receives Successful or Failed.
--
-- Sends an event to other applications.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- Event Queue Information
------------------------------------------------------------------------------
function X_Events_Queued (Display : X_Display;
Mode : X_Event_Queuing) return S_Long;
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Mode - Specifies the event queuing mode.
--
-- If Mode = Queued_Already then returns the number of events already in
-- the event queue (and never makes a system call).
--
-- If Mode = Queued_After_Flush then returns the number of events already in
-- the event queue if non-zero and if there are no events in the queue then
-- it flushes the output buffer, attempts to read events from the input
-- connection, and returns the number read.
--
-- If Mode = Queued_After_Reading then returns the number of events already in
-- the event queue if non-zero and if there are no events in the queue then
-- it attempts to read new events from the connection without flushing the
-- output buffer and returns the number read.
--
-- Always returns immediately without doing I/O if there are events in the
-- queue.
------------------------------------------------------------------------------
function X_Pending (Display : X_Display) return S_Long;
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
--
-- Just like X_Event_Queued with Mode = Queued_After_Flush.
------------------------------------------------------------------------------
--\f
------------------------------------------------------------------------------
-- Event Retrieval
------------------------------------------------------------------------------
generic
type Predicate_Argument_Type is limited private;
with procedure Predicate
(Display : X_Display;
Event : X_Event;
Args : in out Predicate_Argument_Type;
Success : out X_Status);
procedure X_Check_If_Event (Display : X_Display;
Event : in out X_Event;
Args : in out Predicate_Argument_Type;
Status : out X_Status);
------------------------------------------------------------------------------
-- Predicate_Argument_Type - The type of the predicates extra data.
-- Predicate - Boolean function taking an X_Display, an
-- X_Event, and argument data.
--
-- Display - Specifies the display to use.
-- event - Receives the event from the queue.
-- Args - Specifies the predicate argument data.
-- Status - Receives Successful or Failed.
--
-- Returns the next event that passes the indicated predicate test. The first
-- event that causes the Predicate to return True will be removed from the
-- queue and returned. Each event in the queue is checked. If none of them
-- works then the output buffer is flushed and the routine returns Failed.
------------------------------------------------------------------------------
procedure X_Check_Mask_Event (Display : X_Display;
Event_Mask : X_Event_Mask;
Event : in out X_Event;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Event_Mask - Specifies the event types to look for.
-- Event - Receives the event from the queue.
-- Status - Receives Successful or Failed.
--
-- Returns the next event that matches the event mask. Each event in the
-- queue is checked. If none of them works then the output buffer is flushed
-- and the routine returns Failed.
------------------------------------------------------------------------------
procedure X_Check_Typed_Event (Display : X_Display;
Kind : X_Event_Code;
Event : in out X_Event;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Kind - Specifies the event type to be returned.
-- Event - Receives the event from the queue.
-- Status - Receives Successful or Failed.
--
-- Returns the next event that matches with the same Kind. Each event in the
-- queue is checked. If none of them works then the output buffer is flushed
-- and the routine returns Failed.
------------------------------------------------------------------------------
procedure X_Check_Typed_Window_Event
(Display : X_Display;
Window : X_Window;
Kind : X_Event_Code;
Event : in out X_Event;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to look for.
-- Kind - Specifies the event type to be returned.
-- Event - Receives the event from the queue.
-- Status - Receives Successful or Failed.
--
-- Returns the next event that matches both the window and the even type.
-- Each event in the queue is checked. If none of them works then the output
-- buffer is flushed and the routine returns Failed.
------------------------------------------------------------------------------
procedure X_Check_Window_Event (Display : X_Display;
Window : X_Window;
Event_Mask : X_Event_Mask;
Event : in out X_Event;
Status : out X_Status);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to look for.
-- Event_Mask - Specifies the event types to look for.
-- Event - Receives the event from the queue.
-- Status - Receives Successful or Failed.
--
-- Returns the next event that matches both the window and the event mask.
-- Each event in the queue is checked. If none of them works then the output
-- buffer is flushed and the routine returns Failed.
------------------------------------------------------------------------------
generic
type Predicate_Argument_Type is limited private;
with procedure Predicate
(Display : X_Display;
Event : X_Event;
Args : in out Predicate_Argument_Type;
Success : out X_Status);
procedure X_If_Event (Display : X_Display;
Event : out X_Event;
Args : in out Predicate_Argument_Type);
------------------------------------------------------------------------------
-- Predicate_Argument_Type - The type of the predicates extra data.
-- Predicate - Boolean function taking an X_Display, an
-- X_Event, and argument data.
--
-- Display - Specifies the display to use.
-- Event - Receives the event from the queue.
-- Args - Specifies the predicate argument data.
--
-- Returns the next event that passes the indicated predicate test. The first
-- event that causes the Predicate to return True will be removed from the
-- queue and returned. Each event in the queue is checked. If none of them
-- works then the output buffer is flushed and the routine blocks waiting for
-- further events to arrive.
------------------------------------------------------------------------------
procedure X_Mask_Event (Display : X_Display;
Event_Mask : X_Event_Mask;
Event : out X_Event);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Event_Mask - Specifies the event types to look for.
-- Event - Returns the event from the queue.
--
-- Returns the next event that matches the event mask. Each event in the
-- queue is checked. If none of them works then the output buffer is flushed
-- and the routine blocks waiting for further events to arrive.
------------------------------------------------------------------------------
procedure X_Next_Event (Display : X_Display;
Event : out X_Event);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Event - Receives the event from the queue.
--
-- Returns the next event in the event queue. If the event queue is empty
-- then it flushes the output buffer and waits for an event.
------------------------------------------------------------------------------
procedure X_Peek_Event (Display : X_Display;
Event : out X_Event);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Event - Receives the event from the queue.
--
-- Just like X_Next_Event except that the event is not removed from the
-- queue.
------------------------------------------------------------------------------
generic
type Predicate_Argument_Type is limited private;
with procedure Predicate
(Display : X_Display;
Event : X_Event;
Args : in out Predicate_Argument_Type;
Success : out X_Status);
procedure X_Peek_If_Event (Display : X_Display;
Event : out X_Event;
Args : in out Predicate_Argument_Type);
------------------------------------------------------------------------------
-- Predicate_Argument_Type - The type of the predicates extra data.
-- Predicate - Boolean function taking an X_Display, an
-- X_Event, and argument data.
--
-- Display - Specifies the display to use.
-- Event - Receives the event from the queue.
-- Args - Specifies the predicate argument data.
--
-- Returns the next event that passes the indicated predicate test. The first
-- event that causes the Predicate to return True will be returned without
-- removing it from the queue. Each event in the queue is checked. If none
-- of them works then the output buffer is flushed and the routine blocks
-- waiting for further events to arrive.
------------------------------------------------------------------------------
procedure X_Window_Event (Display : X_Display;
Window : X_Window;
Event_Mask : X_Event_Mask;
Event : out X_Event);
------------------------------------------------------------------------------
-- Display - Specifies the display to use.
-- Window - Specifies the window to look for.
-- Event_Mask - Specifies the event types to look for.
-- Event - Receives the event from the queue.
--
-- Returns the next event that matches both the window and the event mask.
-- Each event in the queue is checked. If none of them works then the output
-- buffer is flushed and the routine blocks waiting for further events to
-- arrive.
------------------------------------------------------------------------------
--\f
end Xlbp_Event;