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

⟦d3726c438⟧ Ada Source

    Length: 13312 (0x3400)
    Types: Ada Source
    Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Main, seg_0052ec, separate Xev_Main

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 Xlbp_Proc_Var;  
use Xlbp_Proc_Var;

separate (Xev_Main)  
procedure Main (Display       : X_String             := "";  
                Geometry      : X_String             := "";  
                Backing_Store : X_Backing_Store_Hint := Not_Useful;  
                Save_Under    : Boolean              := False;  
                Border_Width  : U_Short              := 2;  
                Sync          : Boolean              := False) is

    Hints   : Xlbt_Hint.X_Size_Hints;  
    W       : X_Window;  
    Subw    : X_Window;  
    Attr    : X_Set_Window_Attributes;  
    Mask    : X_New_Window_Attributes := None_X_New_Window_Attributes;  
    Done    : Boolean;  
    Error   : X_Error_String;  
    Screen  : X_Screen_Number;  
    Event   : X_Event;  
    Success : X_Status;  
    Env     : constant X_String       :=  
       X_Display_Name (Display);  
begin


    Attr.Backing_Store      := Backing_Store;  
    Mask (Cw_Backing_Store) := True;

    if Save_Under then  
        Attr.Save_Under      := True;  
        Mask (Cw_Save_Under) := True;  
    end if;

    X_Open_Display (Env, Dpy, Error);  
    if Dpy = null then  
        Text_Io.Put_Line ("xev: unable to open display {" &  
                          To_String (Display) & "}: " &  
                          To_String (Err (Error)));  
        return;  
    end if;  
    if Sync then  
        declare  
            Pv : Proc_Var_X_Synchandler.Pv;  
        begin  
            Pv := X_Synchronize (Dpy, False);  
        end;  
    end if;

    Set_Sizehints (Hints, Outer_Window_Min_Width, Outer_Window_Min_Height,  
                   Outer_Window_Def_Width, Outer_Window_Def_Height,  
                   Outer_Window_Def_X, Outer_Window_Def_Y, Geometry);

    Screen := X_Default_Screen (Dpy);

    Attr.Background_Pixel  := X_Black_Pixel (Dpy, Screen);  
    Mask (Cw_Back_Pixel)   := True;  
    Attr.Border_Pixel      := X_White_Pixel (Dpy, Screen);  
    Mask (Cw_Border_Pixel) := True;

----Select for all events.

    Attr.Event_Mask      :=  
       X_Event_Mask'  
          (Key_Press_Mask | Key_Release_Mask | Button_Press_Mask |  
           Button_Release_Mask | Enter_Window_Mask | Leave_Window_Mask |  
           Pointer_Motion_Mask | Pointer_Motion_Hint_Mask |  
           Button_1_Motion_Mask | Button_2_Motion_Mask | Button_3_Motion_Mask |  
           Button_4_Motion_Mask | Button_5_Motion_Mask |  
           Button_Motion_Mask | Keymap_State_Mask | Exposure_Mask |  
           Visibility_Change_Mask | Structure_Notify_Mask |  
           Substructure_Notify_Mask | Substructure_Redirect_Mask |  
           Focus_Change_Mask | Property_Change_Mask |  
           Colormap_Change_Mask | Owner_Grab_Button_Mask => True,  
           Resize_Redirect_Mask => False,  
           others => False);  
    Mask (Cw_Event_Mask) := True;

    W := X_Create_Window (Dpy, X_Root_Window (Dpy, Screen),  
                          S_Short (Hints.X), S_Short (Hints.Y),  
                          U_Short (Hints.Width), U_Short (Hints.Height),  
                          Border_Width, 0, Input_Output,  
                          Copy_From_Parent_Visual, Mask, Attr);

    X_Set_Wm_Properties (Dpy, W, "Event Tester", "", (1 .. 0 => null), Hints,  
                         None_X_Wm_Hints, None_X_Class_Hint, Success);

----GEB 10/3/89
    declare  
        H : Xlbt_Hint.X_Wm_Hints;  
    begin  
        H.Flags (Input_Hint) := True;  
        H.Input              := True;  
        X_Set_Wm_Hints (Dpy, W, H, Success);  
    end;

    Subw := X_Create_Simple_Window  
               (Dpy, W, Inner_Window_X, Inner_Window_Y, Inner_Window_Width,  
                Inner_Window_Height, Inner_Window_Border,  
                Attr.Border_Pixel, Attr.Background_Pixel);

    X_Map_Window (Dpy, Subw);           -- map before w so that it appears
    X_Map_Window (Dpy, W);

    Text_Io.Put ("Outer window is ");  
    S_Long_Io.Put (W.Drawable.Id.Number, Base => 16);  
    Text_Io.Put (", inner window is ");  
    S_Long_Io.Put (Subw.Drawable.Id.Number, Base => 16);  
    Text_Io.New_Line;

    Done := False;  
    while not Done loop

        Xlbp_Event.X_Next_Event (Dpy, Event);  
        Prologue (Event, X_Event_Code'Image (Event.Kind));

        begin  
            case Event.Kind is  
                when Key_Press =>  
                    Do_Keypress (Event);

                when Key_Release =>  
                    Do_Keyrelease (Event);

                when Button_Press =>  
                    Do_Buttonpress (Event);

                when Button_Release =>  
                    Do_Buttonrelease (Event);

                when Motion_Notify =>  
                    Do_Motionnotify (Event);

                when Enter_Notify =>  
                    Do_Enternotify (Event);

                when Leave_Notify =>  
                    Do_Leavenotify (Event);

                when Focus_In =>  
                    Do_Focusin (Event);

                when Focus_Out =>  
                    Do_Focusout (Event);

                when Keymap_Notify =>  
                    Do_Keymapnotify (Event);

                when Expose =>  
                    Do_Expose (Event);

                when Graphics_Expose =>  
                    Do_Graphicsexpose (Event);

                when No_Expose =>  
                    Do_Noexpose (Event);

                when Visibility_Notify =>  
                    Do_Visibilitynotify (Event);

                when Create_Notify =>  
                    Do_Createnotify (Event);

                when Destroy_Notify =>  
                    Do_Destroynotify (Event);

                when Unmap_Notify =>  
                    Do_Unmapnotify (Event);

                when Map_Notify =>  
                    Do_Mapnotify (Event);

                when Map_Request =>  
                    Do_Maprequest (Event);

                when Reparent_Notify =>  
                    Do_Reparentnotify (Event);

                when Configure_Notify =>  
                    Do_Configurenotify (Event);

                when Configure_Request =>  
                    Do_Configurerequest (Event);

                when Gravity_Notify =>  
                    Do_Gravitynotify (Event);

                when Resize_Request =>  
                    Do_Resizerequest (Event);

                when Circulate_Notify =>  
                    Do_Circulatenotify (Event);

                when Circulate_Request =>  
                    Do_Circulaterequest (Event);

                when Property_Notify =>  
                    Do_Propertynotify (Event);

                when Selection_Clear =>  
                    Do_Selectionclear (Event);

                when Selection_Request =>  
                    Do_Selectionrequest (Event);

                when Selection_Notify =>  
                    Do_Selectionnotify (Event);

                when Colormap_Notify =>  
                    Do_Colormapnotify (Event);

                when Client_Message =>  
                    Do_Clientmessage (Event);

                when Mapping_Notify =>  
                    Do_Mappingnotify (Event);

                when others =>  
                    Text_Io.Put_Line ("Unknown event type " &  
                                      X_Event_Code'Image (Event.Kind) & ".");

            end case;  
        exception  
            when others =>  
                Text_Io.Put_Line ("Exception raised during event type " &  
                                  X_Event_Code'Image (Event.Kind));
--/ if R1000 then
                Text_Io.Put_Line (Debug_Tools.Get_Exception_Name & " at " &  
                                  Debug_Tools.Get_Raise_Location);
--/ end if;
        end;  
    end loop;

    X_Close_Display (Dpy);

end Main;  

E3 Meta Data

    nblk1=c
    nid=0
    hdr6=18
        [0x00] rec0=1d rec1=00 rec2=01 rec3=038
        [0x01] rec0=02 rec1=00 rec2=0b rec3=02a
        [0x02] rec0=1c rec1=00 rec2=0c rec3=078
        [0x03] rec0=01 rec1=00 rec2=02 rec3=024
        [0x04] rec0=15 rec1=00 rec2=03 rec3=03e
        [0x05] rec0=19 rec1=00 rec2=0a rec3=038
        [0x06] rec0=01 rec1=00 rec2=04 rec3=008
        [0x07] rec0=20 rec1=00 rec2=05 rec3=042
        [0x08] rec0=23 rec1=00 rec2=06 rec3=02c
        [0x09] rec0=1f rec1=00 rec2=07 rec3=042
        [0x0a] rec0=1c rec1=00 rec2=08 rec3=006
        [0x0b] rec0=05 rec1=00 rec2=09 rec3=000
    tail 0x217008778819786e65529 0x42a00088462063203