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))
16 typedef enum _ChimaraIFFormat {
20 CHIMARA_IF_FORMAT_GLULX,
21 CHIMARA_IF_NUM_FORMATS
24 typedef enum _ChimaraIFInterpreter {
25 CHIMARA_IF_INTERPRETER_FROTZ,
26 CHIMARA_IF_INTERPRETER_NITFOL,
27 CHIMARA_IF_INTERPRETER_GLULXE,
28 CHIMARA_IF_INTERPRETER_GIT,
29 CHIMARA_IF_NUM_INTERPRETERS
30 } ChimaraIFInterpreter;
32 typedef struct _ChimaraIF {
33 ChimaraGlk parent_instance;
36 typedef struct _ChimaraIFClass {
37 ChimaraGlkClass parent_class;
39 void(* command) (ChimaraIF *self, gchar *input, gchar *response);
42 GType chimara_if_get_type(void) G_GNUC_CONST;
43 GtkWidget *chimara_if_new(void);
44 void chimara_if_set_preferred_interpreter(ChimaraIF *self, ChimaraIFFormat format, ChimaraIFInterpreter interpreter);
45 ChimaraIFInterpreter chimara_if_get_preferred_interpreter(ChimaraIF *self, ChimaraIFFormat format);
49 #endif /* __CHIMARA_IF_H__ */