-------------------------------------------------------------------------------------- -- 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 toolkit, 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 MOTIF RESOURCE MANAGER ---------------------------------------------------------------------- -- CHANGE HISTORY -- Ver. Developer Date Description -- ---- -------- ----- --------------------------------- -- 1.0 E.J.Jones(206)477-3566 12/91 Original version for Ada Motif Bindings -- -- ------------------------------------------------------------------------------- -- Title : MOTIF WIDGET SET BINDINGS -- -- -- -- Description : -- -- The Motif Widget Set Ada bindings were initially designed for use -- -- by Avionics/Flight Systems. These bindings are to be used in conjunc- -- -- with the OSF Motif Widget Set written in C. Thus these Ada bindings -- -- are termed "shallow." -- -- -- ------------------------------------------------------------------------------- with AFS_BASIC_TYPES; with X_TOOLKIT_INTRINSICS_OSF; with SYSTEM; package MOTIF_RESOURCE_MANAGER is package XT renames X_TOOLKIT_INTRINSICS_OSF; package AFS renames AFS_BASIC_TYPES; type MRM_STATUS is ( -- status return codes from MRM function MRM_FAILURE, MRM_SUCCESS, MRM_NOT_FOUND, MRM_WRONG_TYPE ); for MRM_STATUS use ( MRM_FAILURE => 0, MRM_SUCCESS => 1, MRM_NOT_FOUND => 2, MRM_WRONG_TYPE => 12); type MRM_HIERARCHY is private; type MRM_TYPE is private; type MRM_CODE is private; type MRM_COUNT is private; type MRM_REGISTER_ARG is record NAME : SYSTEM.ADDRESS; -- name of callback VALUE : SYSTEM.ADDRESS; -- address of callback end record; type MRM_REGISTER_ARG_PTR is access MRM_REGISTER_ARG; type MRM_REGISTER_ARG_LIST is array ( AFS.AFS_LARGE_POSITIVE range <>) of MRM_REGISTER_ARG; ----------------------------------------------------------------------- -- Mrm Initialize -- ----------------------------------------------------------------------- -- This routine will initialize the Resource Manager's internal -- -- data structures. This function must be called first to prepare -- -- the application for the Resource Manager's facilities -- ----------------------------------------------------------------------- procedure MRM_INITIALIZE; ----------------------------------------------------------------------- -- Mrm Open Heirarchy -- ----------------------------------------------------------------------- -- This function specifies the files which should be opened by the -- -- Resource Manager. These files are the '.uid' files which you -- -- produced with the UIL compiler. You don't have to open all the -- -- files at once. -- ----------------------------------------------------------------------- function MRM_OPEN_HIERARCHY( NUM_FILES : in AFS.AFS_LARGE_INTEGER; NAMES_LIST : in SYSTEM.ADDRESS; ANCILLARY_STRUCT_LIST : in SYSTEM.ADDRESS := XT.NULL_ADDRESS; HIERARCHY_ID : in SYSTEM.ADDRESS ) return MRM_STATUS; ----------------------------------------------------------------------- -- Mrm Register Names -- ----------------------------------------------------------------------- -- This function registers a vector of function names and their -- -- corresponding address for access by the Resource Manager when -- -- resolving the callbacks in the '.uid' file. -- ----------------------------------------------------------------------- function MRM_REGISTER_NAMES( REGISTER_LIST : in MRM_REGISTER_ARG_LIST; REGISTER_COUNT : in XT.CARDINAL) return MRM_STATUS; ----------------------------------------------------------------------- -- Mrm Fetch Widget -- ----------------------------------------------------------------------- -- This function will fetch the widget and all those widgets that it -- -- controls. The exact string name of the widget in the '.uil' file -- -- must be given as the argument to index. -- ----------------------------------------------------------------------- function MRM_FETCH_WIDGET( HIERARCHY_ID : in MRM_HIERARCHY; INDEX : in STRING; PARENT_WIDGET : in XT.WIDGET; WIDGET : in SYSTEM.ADDRESS; CLASS : in SYSTEM.ADDRESS ) return MRM_STATUS; -- on some systems you have to set the 'widget' widget to null before -- calling this or a core dump will result.ej jones 206-477-3566 ----------------------------------------------------------------------- -- Mrm Close Hierarchy -- ----------------------------------------------------------------------- -- This function will closes the '.uid' file previously opened by -- -- MrmOpenFunction and returned all associated memory. -- ----------------------------------------------------------------------- function MRM_CLOSE_HIERARCHY( HIERARCHY_ID : in MRM_HIERARCHY) return MRM_STATUS; ---------------------------------------------------------------------- -- Mrm Register Class -- ---------------------------------------------------------------------- -- This function will save the information needed to access the -- -- widget creation function. -- ---------------------------------------------------------------------- function MRM_REGISTER_CLASS( CLASS_CODE : in MRM_TYPE; CLASS_NAME : in STRING; CREATE_NAME : in STRING; CREATE_PROC : in SYSTEM.ADDRESS; CLASS_RECORD : in XT.WIDGET_CLASS) return MRM_STATUS; --------------------------------------------------------------------- -- MrmFetchInterfaceModule -- --------------------------------------------------------------------- -- This function fetches all the widget defined in an interface -- -- module. If the module does not have a main widget then the -- -- function return NULL. See Motif Programmers Guide for more -- -- info. -- --------------------------------------------------------------------- function MRM_FETCH_INTERFACE_MODULE( HIERARCHY_ID : in MRM_HIERARCHY; MODULE_NAME : in STRING; PARENT_WIDGET : in XT.WIDGET; WIDGET : in SYSTEM.ADDRESS) return MRM_STATUS; --------------------------------------------------------------------- -- Mrm Fetch Set Values -- --------------------------------------------------------------------- -- This function will fetch the values of the widget and set the -- -- values of the widget to those you specify -- --------------------------------------------------------------------- function MRM_FETCH_SET_VALUES( HIERARCHY_ID : in MRM_HIERARCHY; WIDGET : in XT.WIDGET; ARGS : in XT.ARG_LIST; NUM_ARGS : in XT.CARDINAL) return MRM_STATUS; --------------------------------------------------------------------- -- Mrm Fetch Widget Override -- --------------------------------------------------------------------- -- This function will fetch a widget from the hierarchy and over- -- -- the values which you set in the argument list. -- --------------------------------------------------------------------- function MRM_FETCH_WIDGET_OVERRIDE( HIERARCHY_ID : in MRM_HIERARCHY; INDEX : in STRING; PARENT_WIDGET : in XT.WIDGET; OVERRIDE_NAME : in STRING; OVERRIDE_ARGS : in XT.ARG_LIST; OVERRIDE_NUM_ARGS : in XT.CARDINAL; WIDGET : in SYSTEM.ADDRESS; CLASS : in SYSTEM.ADDRESS) return MRM_STATUS; --------------------------------------------------------------------- -- Mrm Status Is Equal -- --------------------------------------------------------------------- -- This function will check the MRM status and return true if the -- -- values are the same. -- --------------------------------------------------------------------- function MRM_STATUS_IS_EQUAL ( A,B: in MRM_STATUS) return BOOLEAN; private type MRM_HIERARCHY is new SYSTEM.ADDRESS; type MRM_TYPE is new AFS.AFS_LARGE_INTEGER; type MRM_CODE is new AFS.AFS_LARGE_INTEGER; type MRM_COUNT is new AFS.AFS_LARGE_INTEGER; end MOTIF_RESOURCE_MANAGER;