|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 20480 (0x5000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Xlbp_Grab, seg_004f67
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦cfc2e13cd⟧ »Space Info Vol 2«
└─⟦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.
------------------------------------------------------------------------------
--\x0c
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;
--\x0c
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;
--\x0c
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;
--\x0c
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, supprss 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;
--\x0c
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;
--\x0c
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_Pointe,
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;
--\x0c
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;
--\x0c
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;
--\x0c
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;
--\x0c
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;
--\x0c
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;
--\x0c
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;
--\x0c
end Xlbp_Grab;
nblk1=13
nid=0
hdr6=26
[0x00] rec0=27 rec1=00 rec2=01 rec3=008
[0x01] rec0=0f rec1=00 rec2=02 rec3=038
[0x02] rec0=26 rec1=00 rec2=03 rec3=008
[0x03] rec0=20 rec1=00 rec2=04 rec3=03e
[0x04] rec0=1b rec1=00 rec2=05 rec3=03c
[0x05] rec0=1e rec1=00 rec2=06 rec3=040
[0x06] rec0=19 rec1=00 rec2=07 rec3=04e
[0x07] rec0=00 rec1=00 rec2=13 rec3=002
[0x08] rec0=1f rec1=00 rec2=08 rec3=038
[0x09] rec0=1d rec1=00 rec2=09 rec3=016
[0x0a] rec0=20 rec1=00 rec2=0a rec3=05a
[0x0b] rec0=00 rec1=00 rec2=12 rec3=002
[0x0c] rec0=18 rec1=00 rec2=0b rec3=056
[0x0d] rec0=2d rec1=00 rec2=0c rec3=034
[0x0e] rec0=24 rec1=00 rec2=0d rec3=00e
[0x0f] rec0=24 rec1=00 rec2=0e rec3=01c
[0x10] rec0=26 rec1=00 rec2=0f rec3=020
[0x11] rec0=29 rec1=00 rec2=10 rec3=070
[0x12] rec0=14 rec1=00 rec2=11 rec3=000
tail 0x217006c98819782650563 0x42a00088462063203