X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-glk.h;h=a767fa7bf1e55cbbd3664a055aca47d25b7c550b;hb=d650d232de0f03f7d6be4a9b50d1bb3c825d24fb;hp=ad7e2ec55f15da3f3a0add093b33b0f73c02bab3;hpb=ef9854e6a969e9d5c082fcd1b4cda78f74ba44dd;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/chimara-glk.h b/libchimara/chimara-glk.h index ad7e2ec..a767fa7 100644 --- a/libchimara/chimara-glk.h +++ b/libchimara/chimara-glk.h @@ -38,10 +38,40 @@ typedef struct _ChimaraGlkClass { void(* text_buffer_output) (ChimaraGlk *self, guint32 window_rock, gchar *text); } ChimaraGlkClass; +/** + * ChimaraError: + * + * Error codes returned by #ChimaraGlk widgets and subclasses. + * + * + * CHIMARA_LOAD_MODULE_ERROR + * There was an error opening the plugin containing the Glk + * program. The error message from g_module_error() is appended to the GError message. + * + * + * CHIMARA_NO_GLK_MAIN + * The plugin containing the Glk program did not export a + * glk_main() function. + * + * + * CHIMARA_PLUGIN_NOT_FOUND + * An appropriate interpreter plugin for the autodetected + * game file type could not be found. + * + * + * CHIMARA_PLUGIN_ALREADY_RUNNING + * A plugin was opened while there was already another plugin + * running in the widget. + * + * + */ typedef enum _ChimaraError { CHIMARA_LOAD_MODULE_ERROR, CHIMARA_NO_GLK_MAIN, - CHIMARA_PLUGIN_NOT_FOUND + CHIMARA_PLUGIN_NOT_FOUND, + CHIMARA_PLUGIN_ALREADY_RUNNING } ChimaraError; /** @@ -70,6 +100,8 @@ gboolean chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *a void chimara_glk_stop(ChimaraGlk *glk); void chimara_glk_wait(ChimaraGlk *glk); gboolean chimara_glk_get_running(ChimaraGlk *glk); +void chimara_glk_feed_char_input(ChimaraGlk *glk, guint32 keycode); +void chimara_glk_feed_line_input(ChimaraGlk *glk, const gchar *text); G_END_DECLS