c072885941d389ee7d2cd63a011dd8bf4667c9a8
[u/mdw/putty] / mac / macstuff.h
1 /*
2 * macstuff.h -- Mac-specific definitions visible to the rest of PuTTY.
3 */
4
5 typedef void *Context; /* FIXME */
6
7 #include <MacTypes.h>
8 #include <Files.h>
9
10 #include <stdio.h>
11
12 struct Filename {
13 FSSpec fss;
14 };
15
16 extern FILE * f_open(struct Filename, char const *);
17
18 /* Suspiciously similar to an ICFontRecord */
19 struct FontSpec {
20 short size;
21 Style face;
22 char pad;
23 Str255 name;
24 };
25
26 /*
27 * On the Mac, Unicode text copied to the clipboard has U+2028 line separators.
28 * Non-Unicode text will have these converted to CR along with the rest of the
29 * content.
30 */
31 #define SEL_NL { 0x2028 }
32
33 #include <MacTypes.h>
34 #include <Events.h> /* Timing related goo */
35
36 #define GETTICKCOUNT TickCount
37 #define CURSORBLINK GetCaretTime()
38 #define TICKSPERSEC 60
39
40 #define DEFAULT_CODEPAGE 0 /* FIXME: no idea how to do this */
41
42 #define WCHAR wchar_t
43 #define BYTE UInt8
44 #define DWORD UInt32
45
46 #define OPTIMISE_SCROLL
47
48 /*
49 * sk_getxdmdata() does not exist under the Mac (SGT: I have no
50 * idea whatsoever how to write it, and furthermore I'm unconvinced
51 * it's necessary), so it's a macro which always returns FALSE.
52 */
53 #define sk_getxdmdata(socket, ip, port) (0)
54
55 /* To make it compile */
56
57 #include <stdarg.h>
58 extern int vsnprintf(char *, size_t, char const *, va_list);
59
60 extern int stricmp(char const *, char const *);
61 extern int strnicmp(char const *, char const *, size_t);