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: ┃ T V

⟦2f9feb92c⟧ TextFile

    Length: 8754 (0x2232)
    Types: TextFile
    Names: »V«

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_Key3;  
use Xlbt_Key3;

package Xlbt_Keyboard3 is
------------------------------------------------------------------------------
-- X Library Keyboard Structures
--
-- Xlbt_Keyboard - Structures dealing with the keyboard as a unit
------------------------------------------------------------------------------
-- 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

------------------------------------------------------------------------------
-- X_Auto_Repeat_Mode
------------------------------------------------------------------------------

    type X_Auto_Repeat_Mode is (Auto_Repeat_Mode_Off,  
                                Auto_Repeat_Mode_On,  
                                Auto_Repeat_Mode_Default);

--/ if Length_Clauses then
    for X_Auto_Repeat_Mode'Size use 32;
--/ end if;

    None_X_Auto_Repeat_Mode : constant X_Auto_Repeat_Mode :=  
       X_Auto_Repeat_Mode'Val (0);

------------------------------------------------------------------------------
-- X_Keyboard_As_Bits - key presence indicated by a 1 bit
------------------------------------------------------------------------------

    type X_Keyboard_As_Bits_Array is array (S_Natural range <>) of Boolean;

--/ if Pack then
--//     pragma Pack (X_Keyboard_As_Bits_Array);
--/ end if;

    type X_Keyboard_As_Bits is new X_Keyboard_As_Bits_Array (0 .. 32 * 8 - 1);

--/ if Length_Clauses then
    for X_Keyboard_As_Bits'Size use 32 * 8;
--/ elsif Pack then
--//     pragma Pack (X_Keyboard_As_Bits);
--/ end if;

    None_X_Keyboard_As_Bits : constant X_Keyboard_As_Bits := (others => False);

    type X_Keyboard_As_Bits_Short is  
       new X_Keyboard_As_Bits_Array (8 .. 32 * 8 - 1);

--/ if Length_Clauses then
    for X_Keyboard_As_Bits_Short'Size use 31 * 8;
--/ elsif Pack then
--//     pragma Pack (X_Keyboard_As_Bits_Short);
--/ end if;

    None_X_Keyboard_As_Bits_Short :
       constant  
                X_Keyboard_As_Bits_Short := (others => False);

------------------------------------------------------------------------------
-- X_Keyboard_Control_Flags
------------------------------------------------------------------------------

--/ if Bit0_Sign_Bit then

    type X_Keyboard_Control_Flags_Index is  
       (Xkcfi31, Xkcfi30, Xkcfi29, Xkcfi28, Xkcfi27, Xkcfi26, Xkcfi25,  
        Xkcfi24, Xkcfi23, Xkcfi22, Xkcfi21, Xkcfi20, Xkcfi19,  
        Xkcfi18, Xkcfi17, Xkcfi16, Xkcfi15, Xkcfi14, Xkcfi13,  
        Xkcfi12, Xkcfi11, Xkcfi10, Xkcfi09, Xkcfi08,  -- Unused
        Kb_Auto_Repeat_Mode,  
        Kb_Key,  
        Kb_Led_Mode,  
        Kb_Led,  
        Kb_Bell_Duration,  
        Kb_Bell_Pitch,  
        Kb_Bell_Percent,  
        Kb_Key_Click_Percent);

--/ else -- not Bit0_Sign_Bit then
--//
--//     type X_Keyboard_Control_Flags_Index is
--//        (Kb_Key_Click_Percent,
--//         Kb_Bell_Percent,
--//         Kb_Bell_Pitch,
--//         Kb_Bell_Duration,
--//         Kb_Led,
--//         Kb_Led_Mode,
--//         Kb_Key,
--//         Kb_Auto_Repeat_Mode,
--//         Xkcfi08, Xkcfi09, Xkcfi10, Xkcfi11, Xkcfi12, Xkcfi13,
--//         Xkcfi14, Xkcfi15, Xkcfi16, Xkcfi17, Xkcfi18, Xkcfi19,
--//         Xkcfi20, Xkcfi21, Xkcfi22, Xkcfi23, Xkcfi24, Xkcfi25,
--//         Xkcfi26, Xkcfi27, Xkcfi28, Xkcfi29, Xkcfi30, Xkcfi31);
--//
--/ end if;

    type X_Keyboard_Control_Flags is  
       array (X_Keyboard_Control_Flags_Index) of Boolean;

--/ if Length_Clauses then
    for X_Keyboard_Control_Flags'Size use 32;
--/ elsif Pack then
--//     pragma Pack (X_Keyboard_Control_Flags);
--/ end if;

    None_X_Keyboard_Control_Flags : constant X_Keyboard_Control_Flags :=  
       (others => False);

------------------------------------------------------------------------------
-- X_Led_Bits - One bit for each possible keyboard led.
------------------------------------------------------------------------------

--/ if Bit0_Sign_Bit then

    type X_Led_Bits_Index is  
       (Led31, Led30,  
        Led29, Led28, Led27, Led26, Led25,  
        Led24, Led23, Led22, Led21, Led20,  
        Led19, Led18, Led17, Led16, Led15,  
        Led14, Led13, Led12, Led11, Led10,  
        Led09, Led08, Led07, Led06, Led05,  
        Led04, Led03, Led02, Led01, Led00);

--/ else -- not Bit0_Sign_Bit then
--//
--//     type X_Led_Bits_Index is
--//        (Led00, Led01, Led02, Led03, Led04,
--//         Led05, Led06, Led07, Led08, Led09,
--//         Led10, Led11, Led12, Led13, Led14,
--//         Led15, Led16, Led17, Led18, Led19,
--//         Led20, Led21, Led22, Led23, Led24,
--//         Led25, Led26, Led27, Led28, Led29,
--//         Led30, Led31);
--//
--/ end if;

    type X_Led_Bits is array (X_Led_Bits_Index) of Boolean;

--/ if Length_Clauses then
    for X_Led_Bits'Size use 32;
--/ elsif Pack then
--//     pragma Pack (X_Led_Bits);
--/ end if;

    None_X_Led_Bits : constant X_Led_Bits := (others => False);

------------------------------------------------------------------------------
-- LED's On/Off
------------------------------------------------------------------------------

    type X_Led_Mode is (Led_Mode_Off,  
                        Led_Mode_On);

--/ if Length_Clauses then
    for X_Led_Mode'Size use 32;
--/ end if;

    None_X_Led_Mode : constant X_Led_Mode := X_Led_Mode'Val (0);

------------------------------------------------------------------------------
-- X_Mapping_Status
------------------------------------------------------------------------------

    type X_Mapping_Status is (Mapping_Success,  
                              Mapping_Busy,  
                              Mapping_Failed);

--/ if Length_Clauses then
    for X_Mapping_Status'Size use 8;
--/ end if;

------------------------------------------------------------------------------
-- Percentages
------------------------------------------------------------------------------

    subtype S_Percent is S_Char range -100 .. 100;

--\f

------------------------------------------------------------------------------
-- X_Keyboard_Control
------------------------------------------------------------------------------

    type X_Keyboard_Control is  
        record  
            Key_Click_Percent : S_Percent          := 0;  
            Bell_Percent      : S_Percent          := 0;  
            Bell_Pitch        : U_Short            := 0;  
            Bell_Duration     : U_Short            := 0;  
            Led               : X_Led_Bits         := None_X_Led_Bits;  
            Led_Mode          : X_Led_Mode         := None_X_Led_Mode;  
            Key               : X_Key_Code         := None_X_Key_Code;  
            Auto_Repeat_Mode  : X_Auto_Repeat_Mode := None_X_Auto_Repeat_Mode;  
        end record;

------------------------------------------------------------------------------
-- X_Keyboard_State
------------------------------------------------------------------------------

    type X_Keyboard_State is  
        record  
            Key_Click_Percent  : S_Percent          := 0;  
            Bell_Percent       : S_Percent          := 0;  
            Bell_Pitch         : U_Short            := 0;  
            Bell_Duration      : U_Short            := 0;  
            Led_Mask           : X_Led_Bits         := None_X_Led_Bits;  
            Global_Auto_Repeat : Boolean            := False;  
            Auto_Repeats       : X_Keyboard_As_Bits := None_X_Keyboard_As_Bits;  
        end record;

    None_X_Keyboard_State : constant X_Keyboard_State :=  
       (0, 0, 0, 0, None_X_Led_Bits, False, None_X_Keyboard_As_Bits);

end Xlbt_Keyboard3;