X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-glk.h;h=8eca95f17a7066efd0d6041fb03d36afad17dd66;hb=86bf905d2bf441c655a57d46e9260da8a3237b47;hp=dfa669e3afa1b4f281712ec65a47876be89dfbd3;hpb=4a1188d59e0c9958df56cf5fb61d04ee8fb1e37c;p=rodin%2Fchimara.git diff --git a/libchimara/chimara-glk.h b/libchimara/chimara-glk.h index dfa669e..8eca95f 100644 --- a/libchimara/chimara-glk.h +++ b/libchimara/chimara-glk.h @@ -36,36 +36,29 @@ typedef struct _ChimaraGlkClass { void(* char_input) (ChimaraGlk *self, guint32 window_rock, guint keysym); void(* line_input) (ChimaraGlk *self, guint32 window_rock, gchar *text); void(* text_buffer_output) (ChimaraGlk *self, guint32 window_rock, gchar *text); + void(* iliad_screen_update) (ChimaraGlk *self, gboolean typing); } ChimaraGlkClass; /** * ChimaraError: + * @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. * * 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. - * - * */ typedef enum _ChimaraError { CHIMARA_LOAD_MODULE_ERROR, CHIMARA_NO_GLK_MAIN, - CHIMARA_PLUGIN_NOT_FOUND + CHIMARA_PLUGIN_NOT_FOUND, + CHIMARA_PLUGIN_ALREADY_RUNNING } ChimaraError; /** @@ -82,19 +75,16 @@ void chimara_glk_set_interactive(ChimaraGlk *glk, gboolean interactive); gboolean chimara_glk_get_interactive(ChimaraGlk *glk); void chimara_glk_set_protect(ChimaraGlk *glk, gboolean protect); gboolean chimara_glk_get_protect(ChimaraGlk *glk); -void chimara_glk_set_default_font_description(ChimaraGlk *glk, PangoFontDescription *font); -void chimara_glk_set_default_font_string(ChimaraGlk *glk, const gchar *font); -PangoFontDescription *chimara_glk_get_default_font_description(ChimaraGlk *glk); -void chimara_glk_set_monospace_font_description(ChimaraGlk *glk, PangoFontDescription *font); -void chimara_glk_set_monospace_font_string(ChimaraGlk *glk, const gchar *font); -PangoFontDescription *chimara_glk_get_monospace_font_description(ChimaraGlk *glk); +void chimara_glk_set_css_to_default(ChimaraGlk *glk); +gboolean chimara_glk_set_css_from_file(ChimaraGlk *glk, const gchar *filename, GError **error); +void chimara_glk_set_css_from_string(ChimaraGlk *glk, const gchar *css); void chimara_glk_set_spacing(ChimaraGlk *glk, guint spacing); guint chimara_glk_get_spacing(ChimaraGlk *glk); gboolean chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *argv[], GError **error); 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_char_input(ChimaraGlk *glk, guint32 keyval); void chimara_glk_feed_line_input(ChimaraGlk *glk, const gchar *text); G_END_DECLS