7 * To test at compile time whether the Gargoyle extensions are available, you
8 * can perform a preprocessor test for the existence of %GARGLK. If this
9 * macro is defined, then so are all the Gargoyle extensions. If not, not.
11 * <note><title>Chimara</title><para>
12 * Currently, in Chimara, the functions are defined, but most of them are
13 * not implemented. That is, you can call them, but they do nothing.
18 extern char* garglk_fileref_get_name(frefid_t fref);
20 extern void garglk_set_program_name(const char *name);
21 extern void garglk_set_program_info(const char *info);
22 extern void garglk_set_story_name(const char *name);
25 These functions are not implemented even in Gargoyle. Looks like they were
26 planned, but never added.
27 extern void garglk_set_config(const char *name);
29 #define garglk_font_Roman (0)
30 #define garglk_font_Italic (1)
31 #define garglk_font_Bold (2)
32 #define garglk_font_BoldItalic (3)
33 #define garglk_font_MonoRoman (4)
34 #define garglk_font_MonoItalic (5)
35 #define garglk_font_MonoBold (6)
36 #define garglk_font_MonoBoldItalic (7)
38 #define garglk_color_White (0)
39 #define garglk_color_Red (1)
40 #define garglk_color_Green (2)
41 #define garglk_color_Blue (3)
42 #define garglk_color_Cyan (4)
43 #define garglk_color_Magenta (5)
44 #define garglk_color_Yellow (6)
45 #define garglk_color_Black (7)
47 extern void garglk_set_style_font(glui32 font);
48 extern void garglk_set_style_stream_font(strid_t str, glui32 font);
49 extern void garglk_set_style_color(glui32 bg, glui32 fg);
50 extern void garglk_set_style_stream_color(strid_t str, glui32 bg, glui32 fg);
53 /* JM: functions added to support Z-machine features that aren't in the Glk standard */
55 extern void garglk_set_line_terminators(winid_t win, const glui32 *keycodes, glui32 numkeycodes);
57 extern void garglk_unput_string(char *str);
58 extern void garglk_unput_string_uni(glui32 *str);
63 * Z-machine color constant representing the current color.
65 #define zcolor_Current (0)
69 * Z-machine color constant representing the default color.
71 #define zcolor_Default (1)
75 * Z-machine color constant representing black (0x000000).
77 #define zcolor_Black (2)
81 * Z-machine color constant representing red (0x0000E8).
83 #define zcolor_Red (3)
87 * Z-machine color constant representing green (0x00D000).
89 #define zcolor_Green (4)
93 * Z-machine color constant representing yellow (0x00E8E8).
95 #define zcolor_Yellow (5)
99 * Z-machine color constant representing blue (0xB06800).
101 #define zcolor_Blue (6)
105 * Z-machine color constant representing magenta (0xFF00FF).
107 #define zcolor_Magenta (7)
111 * Z-machine color constant representing cyan (0xE8E800).
113 #define zcolor_Cyan (8)
117 * Z-machine color constant representing white (0xFFFFFF).
119 #define zcolor_White (9)
123 * Z-machine color constant representing light grey (0xB0B0B0).
125 #define zcolor_LightGrey (10)
129 * Z-machine color constant representing grey (0x888888).
131 #define zcolor_MediumGrey (11)
135 * Z-machine color constant representing dark grey (0x585858).
137 #define zcolor_DarkGrey (12)
138 #define zcolor_NUMCOLORS (13)
140 extern void garglk_set_zcolors(glui32 fg, glui32 bg);
141 extern void garglk_set_reversevideo(glui32 reverse);
143 /* non standard keycodes */
147 * Since %keycode_Delete represents either the <keycap>Delete</keycap> or
148 * <keycap>Backspace</keycap> key, Gargoyle defines a separate constant
149 * %keycode_Erase to represent <emphasis>only</emphasis> the
150 * <keycap>Delete</keycap> key. In character input, <keycap>Delete</keycap> is
151 * still reported as %keycode_Delete, but the two are distinguished in
152 * garglk_set_line_terminators().
154 #define keycode_Erase (0xffffef7f)
156 #endif /* __GARGLK_H__ */