]> git.sur5r.net Git - cc65/blob - include/ace.h
Added va_copy
[cc65] / include / ace.h
1 /*
2  * ace.h
3  *
4  * Ullrich von Bassewitz, 06.06.1998
5  *
6  */
7
8
9
10 #ifndef _ACE_H
11 #define _ACE_H
12
13
14
15 #ifndef _STDDEF_H
16 #include <stddef.h>
17 #endif
18
19
20
21 struct aceDirentBuf {
22     unsigned long   ad_size;            /* Size in bytes */
23     unsigned char   ad_date [8];        /* YY:YY:MM:DD:HH:MM:SS:TW */
24     char            ad_type [4];        /* File type as ASCIIZ string */
25     unsigned char   ad_flags;           /* File flags */
26     unsigned char   ad_usage;           /* More flags */
27     unsigned char   ad_namelen;         /* Length of name */
28     char            ad_name [17];       /* Name itself, ASCIIZ */
29 };
30
31 int aceDirOpen (char* dir);
32 int aceDirClose (int handle);
33 int aceDirRead (int handle, struct aceDirentBuf* buf);
34
35 /* Type of an ACE key. Key in low byte, shift mask in high byte */
36 typedef unsigned int aceKey;
37
38 /* #defines for the shift mask returned by aceConGetKey */
39 #define aceSH_KEY               0x00FF  /* Mask key itself */
40 #define aceSH_MASK              0xFF00  /* Mask shift mask */
41 #define aceSH_EXT               0x2000  /* Extended key */
42 #define aceSH_CAPS              0x1000  /* Caps lock key */
43 #define aceSH_ALT               0x0800  /* Alternate key */
44 #define aceSH_CTRL              0x0400  /* Ctrl key */
45 #define aceSH_CBM               0x0200  /* Commodore key */
46 #define aceSH_SHIFT             0x0100  /* Shift key */
47
48 /* #defines for the options in aceConSetOpt/aceConGetOpt */
49 #define aceOP_PUTMASK           1       /* Console put mask */
50 #define aceOP_CHARCOLOR         2       /* Character color */
51 #define aceOP_CHARATTR          3       /* Character attribute */
52 #define aceOP_FILLCOLOR         4       /* Fill color */
53 #define aceOP_FILLATTR          5       /* Fill attribute */
54 #define aceOP_CRSCOLOR          6       /* Cursor color */
55 #define aceOP_CRSWRAP           7       /* Force cursor wrap */
56 #define aceOP_SHSCROLL          8       /* Shift keys for scrolling */
57 #define aceOP_MOUSCALE          9       /* Mouse scaling */
58 #define aceOP_RPTDELAY          10      /* Key repeat delay */
59 #define aceOP_RPTRATE           11      /* Key repeat rate */
60
61 /* Console functions */
62 void aceConWrite (char* buf, size_t count);
63 void aceConPutLit (int c);
64 void aceConPos (unsigned x, unsigned y);
65 void aceConGetPos (unsigned* x, unsigned* y);
66 unsigned aceConGetX (void);
67 unsigned aceConGetY (void);
68 char* aceConInput (char* buf, unsigned initial);
69 int aceConStopKey (void);
70 aceKey aceConGetKey (void);
71 int aceConKeyAvail (aceKey* key);
72 void aceConKeyMat (char* matrix);
73 void aceConSetOpt (unsigned char opt, unsigned char val);
74 int aceConGetOpt (unsigned char opt);
75
76 /* Misc stuff */
77 int aceMiscIoPeek (unsigned addr);
78 void aceMiscIoPoke (unsigned addr, unsigned char val);
79
80
81
82 /* End of ace.h */
83 #endif
84
85
86