1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program 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
* of the License, or (at your option) any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
/*
* This code is based on Labyrinth of Time code with assistance of
*
* Copyright (c) 1993 Terra Nova Development
* Copyright (c) 2004 The Wyrmkeep Entertainment Co.
*
*/
#include "common/keyboard.h"
#ifndef LAB_INTEFACE_H
#define LAB_INTEFACE_H
namespace Lab {
struct IntuiMessage {
uint32 msgClass;
uint16 code, qualifier, mouseX, mouseY, gadgetID;
uint32 seconds, micros;
};
struct Gadget {
uint16 x, y, GadgetID;
uint16 KeyEquiv; // if not zero, a key that activates gadget
uint32 GadgetFlags;
Image *_image, *_altImage;
Gadget *NextGadget;
};
extern Common::KeyState _keyPressed;
/* Defines for the GadgetFlags portion */
#define GADGETOFF 0x01
/* Defines for the Class variable in IntuiMessage */
#define SIZEVERIFY 0x00000001
#define NEWSIZE 0x00000002
#define REFRESHWINDOW 0x00000004
#define MOUSEBUTTONS 0x00000008
#define MOUSEMOVE 0x00000010
#define GADGETDOWN 0x00000020
#define GADGETUP 0x00000040
#define REQSET 0x00000080
#define MENUPICK 0x00000100
#define CLOSEWINDOW 0x00000200
#define RAWKEY 0x00000400
#define REQVERIFY 0x00000800
#define REQCLEAR 0x00001000
#define MENUVERIFY 0x00002000
#define NEWPREFS 0x00004000
#define DISKINSERTED 0x00008000
#define DISKREMOVED 0x00010000
#define WBENCHMESSAGE 0x00020000 /* System use only */
#define ACTIVEWINDOW 0x00040000
#define INACTIVEWINDOW 0x00080000
#define DELTAMOVE 0x00100000
#define VANULLLAKEY 0x00200000
/* Defines for the Qualifier variable in IntuiMessage */
#define IEQUALIFIER_LSHIFT 0x0001
#define IEQUALIFIER_RSHIFT 0x0002
#define IEQUALIFIER_CAPSLOCK 0x0004
#define IEQUALIFIER_CONTROL 0x0008
#define IEQUALIFIER_LALT 0x0010
#define IEQUALIFIER_RALT 0x0020
#define IEQUALIFIER_LCOMMAND 0x0040
#define IEQUALIFIER_RCOMMAND 0x0080
#define IEQUALIFIER_NUMERICPAD 0x0100
#define IEQUALIFIER_REPEAT 0x0200
#define IEQUALIFIER_INTERRUPT 0x0400
#define IEQUALIFIER_MULTIBROADCAST 0x0800
#define IEQUALIFIER_MIDBUTTON 0x1000
#define IEQUALIFIER_RBUTTON 0x2000
#define IEQUALIFIER_LEFTBUTTON 0x4000
#define VKEY_UPARROW 273
#define VKEY_DNARROW 274
#define VKEY_RTARROW 275
#define VKEY_LTARROW 276
/*---------------------------------------------------------------------------*/
/*--------------------------- Function Prototypes ---------------------------*/
/*---------------------------------------------------------------------------*/
Gadget *createButton(uint16 x, uint16 y, uint16 id, uint16 key, Image *im, Image *imalt);
void freeButtonList(void *gptrlist);
void drawGadgetList(Gadget *gadlist);
void ghoastGadget(Gadget *curgad, uint16 pencolor);
void unGhoastGadget(Gadget *curgad);
IntuiMessage *getMsg();
} // End of namespace Lab
#endif /* LAB_INTEFACE_H */
|