/* * dbx.h * * [Generated from dbx, 07 February 1998] */ #if !defined(__CC_NORCROFT) || !defined(__arm) #error You must use the Norcroft ARM Compiler for Sapphire programs endif #pragma include_only_once #pragma force_top_level #ifndef __dbx_h #define __dbx_h #ifndef __sapphire_h #include "sapphire.h" #endif /*----- Licensing note ----------------------------------------------------* * * This file is part of Straylight's Sapphire library. * * Sapphire is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * Sapphire is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Sapphire. If not, write to the Free Software Foundation, * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /*----- Overview ----------------------------------------------------------* * * Functions provided: * * dbx_declare * dbx_sendEvent * dbx_findData * dbx_controlBBox * dbx_update * dbx_qUpdate */ /* --- dbx_declare --- * * * On entry: R0 == dialogue box handle from dbox * R1 == pointer to dialogue box definition block * * On exit: -- * * Use: Declares a dialogue box to be dbx-managed, and declares the * control types of all its controls. */ extern routine dbx_declare; /* --- dbx_sendEvent --- * * * On entry: R0 == event code to send * R1-R7 == depend on the event code * R10 == dialogue box handle * * On exit: C flag as set by event handler * * Use: Sends an event to the specified dialogue box. This is * intended to be used by control handlers, hence the unusual * placing of the dialogue handle in R10. */ extern routine dbx_sendEvent; /* --- dbx_findData --- * * * On entry: R0 == icon handle * R10 == dialogue box handle * * On exit: If found, CS and * R8 == pointer to writable control data * R9 == pointer to static control data * else CC and * R8, R9 corrupted * * Use: Allows a control to find its data when called by client * code. */ extern routine dbx_findData; /* --- dbx_controlBBox --- * * * On entry: R0 == dialogue box handle * R1 == control icon number * * On exit: R0,R1 preserved * R2-R5 == inclusive screen coordinates of icon bounding box * * Use: Calculates the position *on the screen* of the given control * icon, and returns it to you as a set of four inclusive * coordinates (*not* inclusive-exclusve as the WIMP tends to * return to you) */ extern routine dbx_controlBBox; /* --- dbx_update --- * * * On entry: R0 == dialogue box handle * R1 == icon number of control to update * * On exit: -- * * Use: Redraws the specified control immediately. If the control * does not redraw itself, this call does nothing. */ extern routine dbx_update; /* --- dbx_qUpdate --- * * * On entry: R0 == dialogue box handle * R1 == icon number of control to update * * On exit: -- * * Use: Makes a control quickly update itself in whichever way it * needs to in order to be perfect again. It is anticipated * that this is used to update EORed areas of the control. */ extern routine dbx_qUpdate; /*----- Standard dbx flags ------------------------------------------------* * * Individual controls may have their own flags starting at bit 8. */ #define dbxFlag_dataR10 ((1<<0)) #define dbxFlag_dataR12 ((1<<1)) /*----- dbx event codes ---------------------------------------------------* * * All events have: * * R0 == event code * R1 == icon handle of control * R8 == pointer to control workspace * R9 == pointer to control definition body * R10 == dialogue box handle * R12 == control handler workspace */ #define dbxEvent_click 0 #define dbxEvent_redraw 1 #define dbxEvent_key 2 #define dbxEvent_drop 3 #define dbxEvent_help 4 #define dbxEvent_update 5 #define dbxEvent_lifeCycle 6 /* --- dbxEvent_drop subreason codes --- */ #define dbxDrop_load 0 #define dbxDrop_save 1 /* --- dbx event masks --- */ #define dbxMask_click ((1<