-------------------------------------------------------------------------------------- -- Ada language interface to OSF/Motif toolkit -- -- Version: 1.0 -- -- Release date: 3/19/91 -- -- Compiled under: -- VADS 5.5+ on Apollo Domain / DEC Ultrix / SCO Unix -- -- This is an Ada binding to the OSF Motif toolkit. -- Requires: -- OSF/Motif toolkit -- Verdix (or Verdix-derived) Ada libraries -- -- Author: -- Boeing Commercial Airplanes Avionics Flight Systems Organization -- -- -- Mailing Address: -- P.O. Box 3999, M/S 65-07 -- Seattle, WA 98124 -- Attn: E. J. Jones -- -- -- Approved for public release; distribution is unlimited. Per DoD Directive -- 5230.24. -- -- Copyright (c) 1991, The Boeing Company, Seattle, Washington. This software, -- the BCA Ada language interface to the OSF/Motif toolkitmer, produced by the -- Boeing Commercial Airplane Company and made available under STARS (Software -- Technology for Adaptable, Reliable Systems) is approved for release under -- Distribution "A" of the Scientific and Technical Information Program -- Classification Scheme (DoD Directive 5230.24) unless otherwise indicated. -- Sponsored by the U.S. Defense Advanced Research Project Agency (DARPA) under -- contract F19628-88-D-0028, the STARS program is supported by the military -- services, SEI, and MITRE, with the U.S. Air Force as the executive -- contracting agent. The code identified herein is subject to change. -- -- Permission to use, modify, copy, and comment on this software for purposes -- stated under Distribution "A" and without fee is hereby granted. This -- software retains Contractor indemnification to the Government regarding -- copyrights pursuant to the above referenced STARS contract. The Government -- disclaims all responsibility against liability, including costs and expenses -- for violation of proprietary rights, or copyrights arising out of the -- creation or use of this software. -- -- In addition, the Government and The Boeing Company disclaim all warranties -- with regard to this software, including all implied warranties of -- merchantability and fitness. In no event shall the Government or The Boeing -- Company be liable for any special, indirect or consequential damages or any -- damages whatsoever resulting from the loss of use, data or profits, whether -- in action of contract, negligence or other tortuous action, arising in -- connection with the use or performance of this software. The Boeing Company -- does not agree to support or maintain this software or to produce any -- future versions. -------------------------------------------------------------------------------------- ---------------------------------------------------------------------- -- Package spec XLIB ---------------------------------------------------------------------- -- CHANGE HISTORY -- Ver. Developer Date Description -- ---- -------- ----- --------------------------------- -- 1.0 E.J.Jones(206)477-3566 12/91 Original version for Ada Motif Bindings -- -- ----------------------------------------------------------------------------- -- This package implements the features and the structures needed for -- interfacing with the Ada Motif bindings. Of course you won't find -- everything in here from Xlib just some of the stuff you will need -- to use the Motif bindings. -------------------------------------------------------------------------- with AFS_BASIC_TYPES; with UNCHECKED_CONVERSION; with SYSTEM; package XLIB is package AFS renames AFS_BASIC_TYPES; BYTE_SIZE : constant INTEGER := 8; NULL_ADDRESS : constant SYSTEM.ADDRESS := SYSTEM.NO_ADDR; type DRAWABLE is private; type X_FONT_STRUCT_PTR is private; type DISPLAY_POINTER is private; NULL_DISPLAY_POINTER : constant DISPLAY_POINTER; subtype PIXMAP_ID is DRAWABLE; NULL_PIXMAP_ID : constant PIXMAP_ID; type SCREEN_POINTER is private; NULL_SCREEN_POINTER : constant SCREEN_POINTER ; subtype WINDOW_ID is DRAWABLE; NULL_WINDOW_ID : constant WINDOW_ID; type CURSOR_ID is private; NULL_CURSOR_ID : constant CURSOR_ID; ---------------------------------------------------------------------------------------- -- -- CONVERSION FUNCTIONS - DISPLAY_POINTER FROM SYSTEM.ADDRESS -- function ADDR_TO_DISPLAY_POINTER ( ADDR : SYSTEM.ADDRESS ) return DISPLAY_POINTER; function DISPLAY_POINTER_TO_ADDR ( DP : DISPLAY_POINTER ) return SYSTEM.ADDRESS; function ADDR_TO_SCREEN_POINTER ( ADDR : SYSTEM.ADDRESS ) return SCREEN_POINTER; function SCREEN_POINTER_TO_ADDR ( SC : SCREEN_POINTER ) return SYSTEM.ADDRESS; function DEFAULT_ROOT_WINDOW( DISPLAY : DISPLAY_POINTER ) return DRAWABLE; pragma INTERFACE( C,DEFAULT_ROOT_WINDOW); pragma INTERFACE_NAME( DEFAULT_ROOT_WINDOW, "DefaultRootWindowFake"); ---------------------------------------------------------------------------------------- -- FONTS ---------------------------------------------------------------------------------------- function X_LOAD_QUERY_FONT( DISPLAY : DISPLAY_POINTER; NAME : STRING) return X_FONT_STRUCT_PTR; ---------------------------------------------------------------------------------------- -- PIXMAPS ---------------------------------------------------------------------------------------- function X_READ_BITMAP_FILE( DISPLAY : in DISPLAY_POINTER; DRAWABLE_ID : in DRAWABLE; FILENAME : in STRING; WIDTH : in SYSTEM.ADDRESS; -- be sure and use AFS_LARGE_NATURAL for HEIGHT : in SYSTEM.ADDRESS; -- the width & height BITMAP : in SYSTEM.ADDRESS; X_HOT : in SYSTEM.ADDRESS ; Y_HOT : in SYSTEM.ADDRESS) return AFS.AFS_LARGE_INTEGER; ----------------------------------------------------------------------------------- -- CURSORS ----------------------------------------------------------------------------------- XC_WATCH : constant AFS.AFS_LARGE_NATURAL := 150; XC_HAND2 : constant AFS.AFS_LARGE_NATURAL := 60; XC_TOP_LEFT_ARROW : constant AFS.AFS_LARGE_NATURAL := 132; procedure X_DEFINE_CURSOR( DISPLAY : in DISPLAY_POINTER; WINDOW : in WINDOW_ID; CURSOR : in CURSOR_ID); function X_CREATE_FONT_CURSOR( DISPLAY : in DISPLAY_POINTER; SHAPE : in AFS.AFS_LARGE_NATURAL) return CURSOR_ID; -------------------------------------------------------------------------------------- private type DRAWABLE is new SYSTEM.ADDRESS; --type DRAWABLE is new AFS.AFS_LARGE_NATURAL; type X_FONT_STRUCT_PTR is new SYSTEM.ADDRESS; NULL_X_FONT_STRUCT_PTR : constant X_FONT_STRUCT_PTR := X_FONT_STRUCT_PTR(NULL_ADDRESS); type DISPLAY_POINTER is new SYSTEM.ADDRESS; NULL_DISPLAY_POINTER : constant DISPLAY_POINTER := DISPLAY_POINTER (NULL_ADDRESS); type SCREEN_POINTER is new SYSTEM.ADDRESS; NULL_SCREEN_POINTER : constant SCREEN_POINTER := SCREEN_POINTER (NULL_ADDRESS); NULL_PIXMAP_ID : constant PIXMAP_ID := PIXMAP_ID(NULL_ADDRESS); NULL_WINDOW_ID : constant WINDOW_ID := WINDOW_ID(NULL_ADDRESS); type CURSOR_ID is new AFS.AFS_LARGE_INTEGER; NULL_CURSOR_ID : constant CURSOR_ID := 0; end XLIB;