|
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 - downloadIndex: ┃ B T ┃
Length: 15588 (0x3ce4) Types: TextFile Names: »B«
└─⟦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_Basic2; use Xlbt_Basic2; with Xlbt_Key; use Xlbt_Key; with Xlbt_Grab; use Xlbt_Grab; with Xlbt_Misc; use Xlbt_Misc; with Xlbt_Pointer; use Xlbt_Pointer; with Xlbt_Reply; use Xlbt_Reply; with Xlbt_Request; use Xlbt_Request; with Xlbip_Get_Reply; use Xlbip_Get_Reply; with Xlbip_Internal; use Xlbip_Internal; with Xlbip_Put_Request; use Xlbip_Put_Request; package body Xlbp_Grab is ------------------------------------------------------------------------------ -- X Library Grabs - Keyboard, Pointer, Server -- -- Xlbp_Grab - Controls for "grabs" ------------------------------------------------------------------------------ -- 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 procedure X_Allow_Events (Display : X_Display; Mode : X_Allow_Event_Mode; Time : X_Time) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Allow_Events_Request (Display, (Kind => Allow_Events, Length => X_Allow_Events_Request'Size / 32, Mode => Mode, Time => Time)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Allow_Events; --\f procedure X_Change_Active_Pointer_Grab (Display : X_Display; Event_Mask : X_Event_Mask; Cursor : X_Cursor; Time : X_Time) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Change_Active_Pointer_Grab_Request (Display, (Kind => Change_Active_Pointer_Grab, Length => X_Change_Active_Pointer_Grab_Request'Size / 32, Pad => 0, Cursor => Cursor, Time => Time, Event_Mask => Event_Mask)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Change_Active_Pointer_Grab; --\f procedure X_Grab_Button (Display : X_Display; Button : X_Button_Name; Modifiers : X_Key_Button_Mask; Grab_Window : X_Window; Owner_Events : Boolean; Event_Mask : X_Event_Mask; Pointer_Mode : X_Grab_Mode; Keyboard_Mode : X_Grab_Mode; Confine_To : X_Window; Cursor : X_Cursor) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Grab_Button_Request (Display, (Kind => Grab_Button, Length => X_Grab_Button_Request'Size / 32, Pad => 0, Modifiers => Modifiers, Button => Button, Grab_Window => Grab_Window, Owner_Events => From_Boolean (Owner_Events), Event_Mask => X_Event_Mask_Short (Event_Mask (X_Event_Mask_Short'Range)), Pointer_Mode => Pointer_Mode, Keyboard_Mode => Keyboard_Mode, Confine_To => Confine_To, Cursor => Cursor)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Grab_Button; --\f function X_Grab_Keyboard (Display : X_Display; Grab_Window : X_Window; Owner_Events : Boolean; Pointer_Mode : X_Grab_Mode; Keyboard_Mode : X_Grab_Mode; Time : X_Time) return X_Grab_Status is Rep : X_Reply_Contents; Succ : X_Status; begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Grab_Keyboard_Request (Display, (Kind => Grab_Keyboard, Length => X_Grab_Keyboard_Request'Size / 32, Pad => 0, Grab_Window => Grab_Window, Owner_Events => From_Boolean (Owner_Events), Pointer_Mode => Pointer_Mode, Keyboard_Mode => Keyboard_Mode, Time => Time)); -- If we ever return, suppress any error. Get_Reply (Display => Display, Code => Grab_Keyboard, Reply => Rep, Extra => 0, Discard => True, Status => Succ); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); return Grab_Success; end X_Grab_Keyboard; --\f procedure X_Grab_Key (Display : X_Display; Key : X_Key_Code; Modifiers : X_Key_Button_Mask; Grab_Window : X_Window; Owner_Events : Boolean; Pointer_Mode : X_Grab_Mode; Keyboard_Mode : X_Grab_Mode) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Grab_Key_Request (Display, (Kind => Grab_Key, Length => X_Grab_Key_Request'Size / 32, Pad1 => 0, Pad2 => 0, Pad3 => 0, Owner_Events => From_Boolean (Owner_Events), Grab_Window => Grab_Window, Modifiers => Modifiers, Key => Key, Pointer_Mode => Pointer_Mode, Keyboard_Mode => Keyboard_Mode)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Grab_Key; --\f function X_Grab_Pointer (Display : X_Display; Grab_Window : X_Window; Owner_Events : Boolean; Event_Mask : X_Event_Mask; Pointer_Mode : X_Grab_Mode; Keyboard_Mode : X_Grab_Mode; Confine_To : X_Window; Cursor : X_Cursor; Time : X_Time) return X_Grab_Status is Rep : X_Reply_Contents; Succ : X_Status; begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Grab_Pointer_Request (Display, (Kind => Grab_Pointer, Length => X_Grab_Pointer_Request'Size / 32, Grab_Window => Grab_Window, Owner_Events => From_Boolean (Owner_Events), Event_Mask => X_Event_Mask_Short (Event_Mask (X_Event_Mask_Short'Range)), Pointer_Mode => Pointer_Mode, Keyboard_Mode => Keyboard_Mode, Confine_To => Confine_To, Cursor => Cursor, Time => Time)); -- if we ever return, suppress the error Get_Reply (Display => Display, Code => Grab_Pointer, Reply => Rep, Extra => 0, Discard => True, Status => Succ); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); return Grab_Success; end X_Grab_Pointer; --\f procedure X_Grab_Server (Display : X_Display) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Grab_Server_Request (Display, (Kind => Grab_Server, Length => X_Grab_Server_Request'Size / 32, Pad => 0)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Grab_Server; --\f procedure X_Ungrab_Button (Display : X_Display; Button : X_Button_Name; Modifiers : X_Key_Button_Mask; Grab_Window : X_Window) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Ungrab_Button_Request (Display, (Kind => Ungrab_Button, Length => X_Ungrab_Button_Request'Size / 32, Pad => 0, Button => Button, Modifiers => Modifiers, Grab_Window => Grab_Window)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Ungrab_Button; --\f procedure X_Ungrab_Keyboard (Display : X_Display; Time : X_Time) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Ungrab_Keyboard_Request (Display, (Kind => Ungrab_Keyboard, Length => X_Ungrab_Keyboard_Request'Size / 32, Pad => 0, Time => Time)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Ungrab_Keyboard; --\f procedure X_Ungrab_Key (Display : X_Display; Key : X_Key_Code; Modifiers : X_Key_Button_Mask; Grab_Window : X_Window) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Ungrab_Key_Request (Display, (Kind => Ungrab_Key, Length => X_Ungrab_Key_Request'Size / 32, Pad => 0, Grab_Window => Grab_Window, Modifiers => Modifiers, Key => Key)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Ungrab_Key; --\f procedure X_Ungrab_Pointer (Display : X_Display; Time : X_Time) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Ungrab_Pointer_Request (Display, (Kind => Ungrab_Pointer, Length => X_Ungrab_Pointer_Request'Size / 32, Pad => 0, Time => Time)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Ungrab_Pointer; --\f procedure X_Ungrab_Server (Display : X_Display) is begin ----Lock the display. Lock_Display (Display); begin ----Send the request. Put_X_Ungrab_Server_Request (Display, (Kind => Ungrab_Server, Length => X_Ungrab_Server_Request'Size / 32, Pad => 0)); ----Catch exceptions. exception when others => Unlock_Display (Display); raise; end; ----Unlock; sync; and return. Unlock_Display (Display); Sync_Handle (Display); end X_Ungrab_Server; --\f end Xlbp_Grab;