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

⟦a7ea3daf3⟧ TextFile

    Length: 3542 (0xdd6)
    Types: TextFile
    Names: »V«

Derivation

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

TextFile

with Xlbt_Arithmetic;  
use Xlbt_Arithmetic;  
with Xlbt_Basic;  
use Xlbt_Basic;  
with Xlbt_Hint;  
use Xlbt_Hint;  
with Xlbt_Image;  
use Xlbt_Image;  
with Xlbt_String;  
use Xlbt_String;

package Main is
------------------------------------------------------------------------------
-- Dragon - a version of Mah-Jongg for X Windows
--
-- Author: Gary E. Barnes        March 1989
--
-- Main - Used by all modules.
------------------------------------------------------------------------------
-- 05/30/90 GEB  - Translate to Ada
------------------------------------------------------------------------------

--\f

    Quit    : exception; -- Used for normal termination.
    Abandon : exception; -- Used for abnormal termination.

------------------------------------------------------------------------------
-- Dragon Resources
------------------------------------------------------------------------------

    type Dragon_Resources_Rec is  
        record  
            Foreground    : X_Pixel;          -- Default foreground color
            Background    : X_Pixel;          -- Default background color
            Cursor        : X_Cursor;         -- Name of cursor to use
            Debug         : Boolean;          -- Debug printouts
            Double_Click  : X_Time;           -- Time (ms) between clicks
            Geometry      : X_String_Pointer; -- Geometry for the board
            Icon_Geometry : X_String_Pointer; -- Geometry for our icon
            Iconic        : Boolean;          -- Do we start as an icon?
            Icon_Name     : X_String_Pointer; -- Name for the icon
            Reverse_Video : Boolean;          -- Do all in reverse?
            Sticky_Tile   : Boolean;          -- Is first tile sticky?
            Tile_Shadows  : Boolean;          -- Want shadows?
            Tile_Sides    : X_String_Pointer; -- What side type?
        end record;  
    type Display_State is (S_Play, S_Sample);

    Board_State : Display_State := S_Play;

    Dragon_Resources : Dragon_Resources_Rec;-- Application resources

    Dpy    : X_Display;                     -- The display connection
    Dragon : X_Window;                      -- The top level window
    Board  : X_Window;                      -- Our main drawable

    Tile_Control : S_Long;                  -- Control bits

    Shadow    : constant S_Long := Shift (1, 0);  
    Blackside : constant S_Long := Shift (1, 1);  
    Grayside  : constant S_Long := Shift (1, 2);

    Gray_Gc    : X_Gc;      -- fg=blk, bg=wht, fcn=copy
    Normal_Gc  : X_Gc;      -- fg=blk, bg=wht, fcn=copy
    Over_Gc    : X_Gc;      -- fg=blk, bg=wht, fcn=or
    Reverse_Gc : X_Gc;      -- fg=wht, bg=blk, fcn=copy
    Xor_Gc     : X_Gc;      -- fg=blk, bg=wht, fcn=xor

    procedure Set_Size_Hints (Hints : in out X_Size_Hints;  
                              Geom  :        X_String);
------------------------------------------------------------------------------
--  Hints   - Receives the X/Y/Width/Height values from the Geometry string
--  Geom    - Specifies the string specified by the user for the geometry
--
-- Parses the geometry string (if any) and takes care of setting the X/Y and
-- the Width/Height fields in the Hints structure.
------------------------------------------------------------------------------

    procedure Main (Display : X_String);
------------------------------------------------------------------------------
-- Our Main-Line Code.
------------------------------------------------------------------------------

end Main;