1 #ifndef __CHIMARA_IF_H__
2 #define __CHIMARA_IF_H__
5 #include "chimara-glk.h"
9 #define CHIMARA_TYPE_IF (chimara_if_get_type())
10 #define CHIMARA_IF(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), CHIMARA_TYPE_IF, ChimaraIF))
11 #define CHIMARA_IF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), CHIMARA_TYPE_IF, ChimaraIFClass))
12 #define CHIMARA_IS_IF(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), CHIMARA_TYPE_IF))
13 #define CHIMARA_IS_IF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), CHIMARA_TYPE_IF))
14 #define CHIMARA_IF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), CHIMARA_TYPE_IF, ChimaraIFClass))
18 * @CHIMARA_IF_FORMAT_Z5: Z-code version 5
19 * @CHIMARA_IF_FORMAT_Z6: Z-code version 6
20 * @CHIMARA_IF_FORMAT_Z8: Z-code version 8
21 * @CHIMARA_IF_FORMAT_Z_BLORB: Blorbed Z-code
22 * @CHIMARA_IF_FORMAT_GLULX: Glulx
23 * @CHIMARA_IF_FORMAT_GLULX_BLORB: Blorbed Glulx
25 * Constants representing all game formats supported by the Chimara system.
27 typedef enum _ChimaraIFFormat {
29 CHIMARA_IF_FORMAT_NONE = -1,
34 CHIMARA_IF_FORMAT_Z_BLORB,
35 CHIMARA_IF_FORMAT_GLULX,
36 CHIMARA_IF_FORMAT_GLULX_BLORB,
38 CHIMARA_IF_NUM_FORMATS
42 * ChimaraIFInterpreter:
43 * @CHIMARA_IF_INTERPRETER_FROTZ: Frotz
44 * @CHIMARA_IF_INTERPRETER_NITFOL: Nitfol
45 * @CHIMARA_IF_INTERPRETER_GLULXE: Glulxe
46 * @CHIMARA_IF_INTERPRETER_GIT: Git
48 * Constants representing the available interpreter plugins.
50 typedef enum _ChimaraIFInterpreter {
52 CHIMARA_IF_INTERPRETER_NONE = -1,
54 CHIMARA_IF_INTERPRETER_FROTZ,
55 CHIMARA_IF_INTERPRETER_NITFOL,
56 CHIMARA_IF_INTERPRETER_GLULXE,
57 CHIMARA_IF_INTERPRETER_GIT,
59 CHIMARA_IF_NUM_INTERPRETERS
60 } ChimaraIFInterpreter;
63 * ChimaraIFZmachineVersion:
64 * @CHIMARA_IF_ZMACHINE_DEFAULT: Use the interpreter's default interpreter
66 * @CHIMARA_IF_ZMACHINE_DECSYSTEM_20: DEC System 20
67 * @CHIMARA_IF_ZMACHINE_APPLE_IIE: Apple IIe
68 * @CHIMARA_IF_ZMACHINE_MACINTOSH: Apple Macintosh
69 * @CHIMARA_IF_ZMACHINE_AMIGA: Commodore Amiga
70 * @CHIMARA_IF_ZMACHINE_ATARI_ST: Atari ST
71 * @CHIMARA_IF_ZMACHINE_IBM_PC: IBM PC
72 * @CHIMARA_IF_ZMACHINE_COMMODORE_128: Commodore 128
73 * @CHIMARA_IF_ZMACHINE_COMMODORE_64: Commodore 64
74 * @CHIMARA_IF_ZMACHINE_APPLE_IIC: Apple IIc
75 * @CHIMARA_IF_ZMACHINE_APPLE_IIGS: Apple IIgs
76 * @CHIMARA_IF_ZMACHINE_TANDY_COLOR: Tandy Color Computer
78 * Allowed values for the #ChimaraIF:interpreter-number property. All trademarks
79 * are the property of their respective owners.
81 typedef enum _ChimaraIFZmachineVersion {
82 CHIMARA_IF_ZMACHINE_DEFAULT = 0,
83 CHIMARA_IF_ZMACHINE_DECSYSTEM_20,
84 CHIMARA_IF_ZMACHINE_APPLE_IIE,
85 CHIMARA_IF_ZMACHINE_MACINTOSH,
86 CHIMARA_IF_ZMACHINE_AMIGA,
87 CHIMARA_IF_ZMACHINE_ATARI_ST,
88 CHIMARA_IF_ZMACHINE_IBM_PC,
89 CHIMARA_IF_ZMACHINE_COMMODORE_128,
90 CHIMARA_IF_ZMACHINE_COMMODORE_64,
91 CHIMARA_IF_ZMACHINE_APPLE_IIC,
92 CHIMARA_IF_ZMACHINE_APPLE_IIGS,
93 CHIMARA_IF_ZMACHINE_TANDY_COLOR,
95 CHIMARA_IF_ZMACHINE_MAXVAL = CHIMARA_IF_ZMACHINE_TANDY_COLOR
96 } ChimaraIFZmachineVersion;
101 * This structure contains no public members.
103 typedef struct _ChimaraIF {
104 ChimaraGlk parent_instance;
109 typedef struct _ChimaraIFClass {
110 ChimaraGlkClass parent_class;
112 void(* command) (ChimaraIF *self, gchar *input, gchar *response);
115 GType chimara_if_get_type(void) G_GNUC_CONST;
116 GtkWidget *chimara_if_new(void);
117 void chimara_if_set_preferred_interpreter(ChimaraIF *self, ChimaraIFFormat format, ChimaraIFInterpreter interpreter);
118 ChimaraIFInterpreter chimara_if_get_preferred_interpreter(ChimaraIF *self, ChimaraIFFormat format);
119 gboolean chimara_if_run_game(ChimaraIF *self, const char *gamefile, GError **error);
120 ChimaraIFFormat chimara_if_get_format(ChimaraIF *self);
121 ChimaraIFInterpreter chimara_if_get_interpreter(ChimaraIF *self);
125 #endif /* __CHIMARA_IF_H__ */