4 ; A startup banner window
6 ; © 1994-1998 Straylight
9 ;----- Licensing note -------------------------------------------------------
11 ; This file is part of Straylight's Sapphire library.
13 ; Sapphire is free software; you can redistribute it and/or modify
14 ; it under the terms of the GNU General Public License as published by
15 ; the Free Software Foundation; either version 2, or (at your option)
18 ; Sapphire is distributed in the hope that it will be useful,
19 ; but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ; GNU General Public License for more details.
23 ; You should have received a copy of the GNU General Public License
24 ; along with Sapphire. If not, write to the Free Software Foundation,
25 ; 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ;----- Overview -------------------------------------------------------------
34 [ :LNOT::DEF:banner__dfn
37 ;+ LIB sapphire:^.bsh.banner
41 ; On entry: R0 == pointer to definition block, or 0
42 ; R1 == R12 value to pass to setup routine, if present
46 ; Use: Displays a startup banner and initialises the library and
47 ; client. This call should be used as a replacement for
50 ; If R0 is 0 on entry, no banner window is used; instead
51 ; an hourglass percentage is displayed to indicate the
52 ; amount of initialisation performed so far.
54 ; Alternatively, it should point to a table consisting of
55 ; a flags word and optional arguments specified by the flags
56 ; in order. The options you can specify are a slider and
57 ; percentage count icon (used to display current progress),
58 ; a setup routine, and the leafname of a sprites file to
59 ; attach to the banner window.
61 ; The setup routine is passed the banner dialogue handle in
62 ; R0. It should fill in parts of the banner window, such as
63 ; the licencee name and serial number that can't be determined
64 ; until runtime (for safeness), and maybe version information
69 ; --- bnr_doBanner ---
71 ; On entry: R0 == pointer to definition block, or 0
72 ; R1 == R12 value to pass to setup routine, if present
73 ; R2 == pointer to library initialisation table
77 ; Use: Displays a startup banner and initialises the library and
78 ; client. This routine is used to support dynamic linking.
82 ;----- Flags ----------------------------------------------------------------
84 bFlag_slider EQU (1<<0) ;Has a progress slider
85 ;+0 icon number for slider
88 bFlag_counter EQU (1<<1) ;Has a percentage indicator
89 ;+0 icon number for indicator
92 bFlag_setup EQU (1<<2) ;Needs a setup routine
93 ;+0 == address of routine
96 bFlag_sprites EQU (1<<3) ;Load a sprite file
97 ;+0 == name of sprite file
100 ;----- Macros ---------------------------------------------------------------
106 ; --- Macro: BANNER ---
110 ; Use: Begins construction of a banner block.
120 ; --- Macro: BFLAG ---
122 ; Arguments: f == flag to set
124 ; Use: Sets a flag in the banner header, making sure they go in
130 ! 1,"Banner flags built in wrong order"
132 bnr__f SETA bnr__f :OR: $f
135 ; --- Macro: BNSLIDE ---
137 ; Arguments: icon == icon number of slider in banner window
139 ; Use: Registers the banner window's slider.
147 ; --- Macro: BNCOUNT ---
149 ; Arguments: icon == icon number of percentage counter
151 ; Use: Registers the banner window's percentage counter.
159 ; --- Macro: BNSETUP ---
161 ; Arguments: rout == address of setup routine
163 ; Use: Registers the banner window's setup routine.
171 ; --- Macro: BNSPRT ---
173 ; Arguments: name == leafname of sprite file
175 ; Use: Registers the banner window's sprite file name.
183 ; --- Macro: BNEND ---
187 ; Use: Terminates a banner window definition.
192 bnr__fl$bnr__c EQU bnr__f
198 ;----- That's all, folks ----------------------------------------------------