Initial revision
[ssr] / StraySrc / Libraries / Sapphire / csapph / h / drag
CommitLineData
2ee739cc 1/*
2 * drag.h
3 *
4 * [Generated from drag, 25 September 1996]
5 */
6
7#if !defined(__CC_NORCROFT) || !defined(__arm)
8 #error You must use the Norcroft ARM Compiler for Sapphire programs
9#endif
10
11#pragma include_only_once
12#pragma force_top_level
13
14#ifndef __drag_h
15#define __drag_h
16
17#ifndef __sapphire_h
18 #include "sapphire.h"
19#endif
20
21/*----- Overview ----------------------------------------------------------*
22 *
23 * Functions provided:
24 *
25 * drag_start
26 * drag_scroll
27 * drag_setDash
28 * drag_cancel
29 * drag_redraw
30 * drag_eorColour
31 */
32
33/* --- drag_start --- *
34 *
35 * On entry: R0 == window containing the drag
36 * R1 == flags word (see flags below)
37 * R2 == pointer to drag routine
38 * R3 == magic number to pass in R9
39 * R4 == value to pass to routine in R10
40 * R5 == value to pass to routine in R12
41 *
42 * On exit: --
43 *
44 * Use: Starts a drag operation. Any outstanding drag operation
45 * is cancelled on the assumption that someone stole our
46 * UserDragBox event.
47 */
48
49extern routine drag_start;
50
51/* --- drag_scroll --- *
52 *
53 * On entry: R1 == pointer to window state block
54 *
55 * On exit: R2,R3 == new scroll positions to set
56 * R14 == R1+20 (pointer to scroll offsets)
57 *
58 * Use: Works out the scroll positions which should be set to auto-
59 * scroll the window. The algorithm is simple: the window is
60 * scrolled so that the point beneath the mouse pointer is
61 * within the window's visible work area.
62 */
63
64extern routine drag_scroll;
65
66/* --- drag_setDash --- *
67 *
68 * On entry: R0 == dash pattern byte
69 *
70 * On exit: --
71 *
72 * Use: Sets the dash pattern to be the given value.
73 */
74
75extern routine drag_setDash;
76
77/* --- drag_cancel --- *
78 *
79 * On entry: --
80 *
81 * On exit: --
82 *
83 * Use: Cancels the current drag operation.
84 */
85
86extern routine drag_cancel;
87
88/* --- drag_redraw --- *
89 *
90 * On entry: R1 == pointer to redraw block
91 *
92 * On exit: --
93 *
94 * Use: Redraws the drag box, if the redraw takes place in the
95 * currently dragging window.
96 */
97
98extern routine drag_redraw;
99
100/* --- drag_eorColour --- *
101 *
102 * On entry: R0 == colour A
103 * R1 == colour B
104 *
105 * On exit: --
106 *
107 * Use: Sets the foreground colour to be an EOR colour such that
108 * when painted over Wimp colour A, it appears as Wimp colour B.
109 */
110
111extern routine drag_eorColour;
112
113/*----- Flags -------------------------------------------------------------*/
114
115#define drFlag_noUpdate ((1<<0))
116
117/*----- Drag handler events -----------------------------------------------*/
118
119/* --- Note --- *
120 *
121 * The events which request that you draw something are called for each
122 * rectangle of the draw operation -- i.e. do not call Wimp_GetRectangle
123 * because this is done for you.
124 */
125
126#define drEvent_draw 0
127
128#define drEvent_undraw 1
129
130#define drEvent_update 2
131
132#define drEvent_trans 3
133
134#define drEvent_getPos 4
135
136#define drEvent_done 5
137
138#define drEvent_cancel 6
139
140/*----- That's all, folks -------------------------------------------------*/
141
142#endif