|
|
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: B T
Length: 4727 (0x1277)
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_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;
with Xlbmt_Network_Types;
use Xlbmt_Network_Types;
package body Xlbp_Pointer_Motion is
------------------------------------------------------------------------------
-- X Library Pointer Motion
--
-- Xlbp_Pointer_Motion - Obtaining pointer motion history.
------------------------------------------------------------------------------
-- 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
function X_Display_Motion_Buffer_Size (Display : X_Display) return S_Long is
begin
return Display.Motion_Buffer;
end X_Display_Motion_Buffer_Size;
--\f
function X_Get_Motion_Events (Display : X_Display;
Window : X_Window;
Start : X_Time;
Stop : X_Time) return X_Time_Coord_List is
Rep : X_Reply_Contents;
Succ : X_Status;
begin
----Lock the display;
Lock_Display (Display);
begin
----Send the request.
Put_X_Get_Motion_Events_Request
(Display, (Kind => Get_Motion_Events,
Length => X_Get_Motion_Events_Request'Size / 32,
Pad => 0,
Start => Start,
Stop => Stop,
Window => Window));
----Read the reply.
Get_Reply (Display => Display,
Code => Get_Motion_Events,
Reply => Rep,
Extra => 0,
Discard => False,
Status => Succ);
if Succ = Failed or else
Rep.Get_Motion_Events.N_Events = 0 then
Unlock_Display (Display);
Sync_Handle (Display);
return None_X_Time_Coord_List;
----Read the extra data.
else
declare
List : X_Time_Coord_List;
begin
begin
List := new X_Time_Coord_Array
(1 .. S_Natural (Rep.Get_Motion_Events.
N_Events));
exception
when others =>
Eat_Raw_Data
(Display, S_Natural
(Rep.Get_Motion_Events.Length) *
(32 / 8));
raise;
end;
Get_X_Time_Coord_Array (Display, List.all);
Unlock_Display (Display);
Sync_Handle (Display);
return List;
exception
when others =>
Free_X_Time_Coord_List (List);
raise;
end;
end if;
----Catch exceptions.
exception
when others =>
Unlock_Display (Display);
raise;
end;
end X_Get_Motion_Events;
--\f
end Xlbp_Pointer_Motion;