Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / dbx / dbx
CommitLineData
2ee739cc 1/*
2 * dbx.h
3 *
4 * [Generated from dbx, 07 February 1998]
5 */
6
7#if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
9endif
10
11#pragma include_only_once
12#pragma force_top_level
13
14#ifndef __dbx_h
15#define __dbx_h
16
17#ifndef __sapphire_h
18 #include "sapphire.h"
19#endif
20
21/*----- Licensing note ----------------------------------------------------*
22 *
23 * This file is part of Straylight's Sapphire library.
24 *
25 * Sapphire is free software; you can redistribute it and/or modify
26 * it under the terms of the GNU General Public License as published by
27 * the Free Software Foundation; either version 2, or (at your option)
28 * any later version.
29 *
30 * Sapphire is distributed in the hope that it will be useful,
31 * but WITHOUT ANY WARRANTY; without even the implied warranty of
32 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
33 * GNU General Public License for more details.
34 *
35 * You should have received a copy of the GNU General Public License
36 * along with Sapphire. If not, write to the Free Software Foundation,
37 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
38 */
39
40/*----- Overview ----------------------------------------------------------*
41 *
42 * Functions provided:
43 *
44 * dbx_declare
45 * dbx_sendEvent
46 * dbx_findData
47 * dbx_controlBBox
48 * dbx_update
49 * dbx_qUpdate
50 */
51
52/* --- dbx_declare --- *
53 *
54 * On entry: R0 == dialogue box handle from dbox
55 * R1 == pointer to dialogue box definition block
56 *
57 * On exit: --
58 *
59 * Use: Declares a dialogue box to be dbx-managed, and declares the
60 * control types of all its controls.
61 */
62
63extern routine dbx_declare;
64
65/* --- dbx_sendEvent --- *
66 *
67 * On entry: R0 == event code to send
68 * R1-R7 == depend on the event code
69 * R10 == dialogue box handle
70 *
71 * On exit: C flag as set by event handler
72 *
73 * Use: Sends an event to the specified dialogue box. This is
74 * intended to be used by control handlers, hence the unusual
75 * placing of the dialogue handle in R10.
76 */
77
78extern routine dbx_sendEvent;
79
80/* --- dbx_findData --- *
81 *
82 * On entry: R0 == icon handle
83 * R10 == dialogue box handle
84 *
85 * On exit: If found, CS and
86 * R8 == pointer to writable control data
87 * R9 == pointer to static control data
88 * else CC and
89 * R8, R9 corrupted
90 *
91 * Use: Allows a control to find its data when called by client
92 * code.
93 */
94
95extern routine dbx_findData;
96
97/* --- dbx_controlBBox --- *
98 *
99 * On entry: R0 == dialogue box handle
100 * R1 == control icon number
101 *
102 * On exit: R0,R1 preserved
103 * R2-R5 == inclusive screen coordinates of icon bounding box
104 *
105 * Use: Calculates the position *on the screen* of the given control
106 * icon, and returns it to you as a set of four inclusive
107 * coordinates (*not* inclusive-exclusve as the WIMP tends to
108 * return to you)
109 */
110
111extern routine dbx_controlBBox;
112
113/* --- dbx_update --- *
114 *
115 * On entry: R0 == dialogue box handle
116 * R1 == icon number of control to update
117 *
118 * On exit: --
119 *
120 * Use: Redraws the specified control immediately. If the control
121 * does not redraw itself, this call does nothing.
122 */
123
124extern routine dbx_update;
125
126/* --- dbx_qUpdate --- *
127 *
128 * On entry: R0 == dialogue box handle
129 * R1 == icon number of control to update
130 *
131 * On exit: --
132 *
133 * Use: Makes a control quickly update itself in whichever way it
134 * needs to in order to be perfect again. It is anticipated
135 * that this is used to update EORed areas of the control.
136 */
137
138extern routine dbx_qUpdate;
139
140/*----- Standard dbx flags ------------------------------------------------*
141 *
142 * Individual controls may have their own flags starting at bit 8.
143 */
144
145#define dbxFlag_dataR10 ((1<<0))
146#define dbxFlag_dataR12 ((1<<1))
147
148/*----- dbx event codes ---------------------------------------------------*
149 *
150 * All events have:
151 *
152 * R0 == event code
153 * R1 == icon handle of control
154 * R8 == pointer to control workspace
155 * R9 == pointer to control definition body
156 * R10 == dialogue box handle
157 * R12 == control handler workspace
158 */
159
160#define dbxEvent_click 0
161
162#define dbxEvent_redraw 1
163
164#define dbxEvent_key 2
165
166#define dbxEvent_drop 3
167
168#define dbxEvent_help 4
169
170#define dbxEvent_update 5
171
172#define dbxEvent_lifeCycle 6
173
174/* --- dbxEvent_drop subreason codes --- */
175
176#define dbxDrop_load 0
177#define dbxDrop_save 1
178
179/* --- dbx event masks --- */
180
181#define dbxMask_click ((1<<dbxEvent_click))
182#define dbxMask_redraw ((1<<dbxEvent_redraw))
183#define dbxMask_key ((1<<dbxEvent_key))
184#define dbxMask_drop ((1<<dbxEvent_drop))
185#define dbxMask_help ((1<<dbxEvent_help))
186#define dbxMask_update ((1<<dbxEvent_update))
187#define dbxMask_lifeCycle ((1<<dbxEvent_lifeCycle))
188
189/*----- That's all, folks -------------------------------------------------*/
190
191#endif