]> git.sur5r.net Git - cc65/blob - include/geos/gsprite.h
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / include / geos / gsprite.h
1 /*
2   GEOS mouse and sprite functions
3
4   by Maciej 'YTM/Elysium' Witkowiak
5 */
6
7 #ifndef _GSPRITE_H
8 #define _GSPRITE_H
9
10 void StartMouseMode(void);
11 void ClearMouseMode(void);
12 void MouseUp(void);
13 void MouseOff(void);
14 char __fastcall__ IsMseInRegion(struct window *region);
15
16 void __fastcall__ DrawSprite(char spritenum, const char *spritepic);
17 void __fastcall__ PosSprite(char spritenum, struct pixel *position);
18 void __fastcall__ EnablSprite(char spritenum);
19 void __fastcall__ DisablSprite(char spritenum);
20
21 void __fastcall__ InitTextPrompt(char height);
22 void __fastcall__ PromptOn(struct pixel *position);
23 void PromptOff(void);
24 char GetNextChar(void);
25
26 /* keyboard constants */
27 #define KEY_F1          1
28 #define KEY_F2          2
29 #define KEY_F3          3
30 #define KEY_F4          4
31 #define KEY_F5          5
32 #define KEY_F6          6
33 #define KEY_NOSCRL      7
34 #define KEY_ENTER       13
35 #define KEY_F7          14
36 #define KEY_F8          15
37 #define KEY_HOME        18
38 #define KEY_CLEAR       19
39 #define KEY_LARROW      20
40 #define KEY_UPARROW     21
41 #define KEY_STOP        22
42 #define KEY_RUN         23
43 #define KEY_BPS         24
44 #define KEY_HELP        25
45 #define KEY_ALT         26
46 #define KEY_ESC         27
47 #define KEY_INSERT      28
48 #define KEY_INVALID     31
49 #define KEY_LEFT        BACKSPACE
50 #ifdef __GEOS_CBM__
51 #define KEY_UP          16
52 #define KEY_DOWN        17
53 #define KEY_DELETE      29
54 #define KEY_RIGHT       30
55 #else
56 #define KEY_UP          11
57 #define KEY_DOWN        10
58 #define KEY_DELETE     127
59 #define KEY_RIGHT       21
60 #endif
61
62 /* values of faultData - pointer position vs. mouseWindow */
63 /* bit numbers */
64 #define OFFTOP_BIT      7
65 #define OFFBOTTOM_BIT   6
66 #define OFFLEFT_BIT     5
67 #define OFFRIGHT_BIT    4
68 #define OFFMENU_BIT     3
69 /* bit masks */
70 #define SET_OFFTOP      0x80
71 #define SET_OFFBOTTOM   0x40
72 #define SET_OFFLEFT     0x20
73 #define SET_OFFRIGHT    0x10
74 #define SET_OFFMENU     0x08
75
76 /* mouseOn */
77 /* bit numbers */
78 #define MOUSEON_BIT     7
79 #define MENUON_BIT      6
80 #define ICONSON_BIT     5
81 /* bit masks */
82 #define SET_MSE_ON      0x80
83 #define SET_MENUON      0x40
84 #define SET_ICONSON     0x20
85
86 /* pressFlag */
87 /* bit numbers */
88 #define KEYPRESS_BIT    7
89 #define INPUT_BIT       6
90 #define MOUSE_BIT       5
91 /* bit masks */
92 #define SET_KEYPRESS    0x80
93 #define SET_INPUTCHG    0x40
94 #define SET_MOUSE       0x20
95
96 #endif