DataMuseum.dk

Presents historical artifacts from the history of:

Rational R1000/400 Tapes

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 Tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ B T

⟦62d8095e1⟧ TextFile

    Length: 5870 (0x16ee)
    Types: TextFile
    Names: »B«

Derivation

└─⟦85b835f43⟧ Bits:30000549 8mm tape, Rational 1000, Xlib rev 6.00
    └─ ⟦0c20f784e⟧ »DATA« 
        └─⟦1abbe589f⟧ 
            └─⟦059497ac5⟧ 
                └─⟦this⟧ 

TextFile

with Xlbt_Arithmetic;  
use Xlbt_Arithmetic;  
with Xlbt_Basic;  
use Xlbt_Basic;  
with Xlbt_Input_Focus;  
use Xlbt_Input_Focus;  
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_Input_Focus is
------------------------------------------------------------------------------
-- X Library Input Focus Control
--
-- Xlbp_Input_Focus - Controls for setting and changing the server's input focus
------------------------------------------------------------------------------
-- 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_Get_Input_Focus (Display   :     X_Display;  
                                 Focus     : out X_Window;  
                                 Revert_To : out X_Revert_Focus_Mode) is  
        Rep  : X_Reply_Contents;  
        Succ : X_Status;  
    begin

----Lock the display.

        Lock_Display (Display);  
        begin

----Send the request.

            Put_X_Get_Input_Focus_Request  
               (Display, (Kind   => Get_Input_Focus,  
                          Length => X_Get_Input_Focus_Request'Size / 32,  
                          Pad    => 0));

----Get the reply.

            Get_Reply (Display => Display,  
                       Code    => Get_Input_Focus,  
                       Reply   => Rep,  
                       Extra   => 0,  
                       Discard => True,  
                       Status  => Succ);  
            if Succ /= Failed then  
                Focus     := Rep.Get_Input_Focus.Focus;  
                Revert_To := Rep.Get_Input_Focus.Revert_To;  
            else  
                Focus     := None_X_Window;  
                Revert_To := None_X_Revert_Focus_Mode;  
            end if;

----Catch exceptions.

        exception  
            when others =>  
                Unlock_Display (Display);  
                raise;  
        end;

----Unlock; sync; return.

        Unlock_Display (Display);  
        Sync_Handle (Display);

    end X_Get_Input_Focus;

--\f

    procedure X_Set_Input_Focus (Display   : X_Display;  
                                 Focus     : X_Window;  
                                 Revert_To : X_Revert_Focus_Mode;  
                                 Time      : X_Time) is  
    begin

----Lock the display.

        Lock_Display (Display);  
        begin

----Send the request.

            Put_X_Set_Input_Focus_Request  
               (Display, (Kind      => Set_Input_Focus,  
                          Length    => X_Set_Input_Focus_Request'Size / 32,  
                          Focus     => Focus,  
                          Revert_To => Revert_To,  
                          Time      => Time));

----Catch exceptions.

        exception  
            when others =>  
                Unlock_Display (Display);  
                raise;  
        end;

----Unlock; sync; return.

        Unlock_Display (Display);  
        Sync_Handle (Display);

    end X_Set_Input_Focus;

--\f

    procedure X_Warp_Pointer (Display       : X_Display;  
                              Source        : X_Window;  
                              Destination   : X_Window;  
                              Source_X      : S_Short;  
                              Source_Y      : S_Short;  
                              Source_Width  : U_Short;  
                              Source_Height : U_Short;  
                              Destination_X : S_Short;  
                              Destination_Y : S_Short) is  
    begin

----Lock the display;

        Lock_Display (Display);  
        begin

----Send the request.

            Put_X_Warp_Pointer_Request  
               (Display, (Kind       => Warp_Pointer,  
                          Length     => X_Warp_Pointer_Request'Size / 32,  
                          Pad        => 0,  
                          Src_Window => Source,  
                          Dst_Window => Destination,  
                          Src_X      => Source_X,  
                          Src_Y      => Source_Y,  
                          Src_Width  => Source_Width,  
                          Src_Height => Source_Height,  
                          Dst_X      => Destination_X,  
                          Dst_Y      => Destination_Y));

----Catch exceptions.

        exception  
            when others =>  
                Unlock_Display (Display);  
                raise;  
        end;

----Unlock; sync; return.

        Unlock_Display (Display);  
        Sync_Handle (Display);

    end X_Warp_Pointer;

--\f

end Xlbp_Input_Focus;