DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about Rational R1000/400

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download

⟦3a0b83853⟧ Ada Source

    Length: 7168 (0x1c00)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Xlbp_Pointer_Motion, seg_004f7d

Derivation

└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
    └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« 
        └─⟦this⟧ 

E3 Source Code



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.
------------------------------------------------------------------------------

--\x0c
    function X_Display_Motion_Buffer_Size (Display : X_Display) return S_Long is  
    begin  
        return Display.Motion_Buffer;  
    end X_Display_Motion_Buffer_Size;

--\x0c
    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;

--\x0c
end Xlbp_Pointer_Motion;  

E3 Meta Data

    nblk1=6
    nid=0
    hdr6=c
        [0x00] rec0=23 rec1=00 rec2=01 rec3=01a
        [0x01] rec0=11 rec1=00 rec2=02 rec3=02c
        [0x02] rec0=1f rec1=00 rec2=03 rec3=008
        [0x03] rec0=00 rec1=00 rec2=06 rec3=002
        [0x04] rec0=18 rec1=00 rec2=04 rec3=036
        [0x05] rec0=1d rec1=00 rec2=05 rec3=000
    tail 0x217006e6a819782f887e6 0x42a00088462063203