Change I/O signals to pass a unique window ID
[projects/chimara/chimara.git] / libchimara / chimara-if.c
index 95f8b93dca03082d9fe9fd69d4dca18a4da6f279..2fb74c85e3477e5f845730abc5985904ec978ba2 100644 (file)
  */
 
 static gboolean supported_formats[CHIMARA_IF_NUM_FORMATS][CHIMARA_IF_NUM_INTERPRETERS] = {
-       /* Frotz Nitfol Glulxe Git */
-       { TRUE,  TRUE,  FALSE, FALSE }, /* Z5 */
-       { TRUE,  TRUE,  FALSE, FALSE }, /* Z6 */
-       { TRUE,  TRUE,  FALSE, FALSE }, /* Z8 */
-       { TRUE,  TRUE,  FALSE, FALSE }, /* Zblorb */
-       { FALSE, FALSE, TRUE,  TRUE  }, /* Glulx */
-       { FALSE, FALSE, TRUE,  TRUE  }  /* Gblorb */
+       /* Frotz Nitfol Glulxe Git    Bocfel */
+       { TRUE,  TRUE,  FALSE, FALSE, TRUE  }, /* Z5 */
+       { TRUE,  TRUE,  FALSE, FALSE, TRUE  }, /* Z6 */
+       { TRUE,  TRUE,  FALSE, FALSE, TRUE  }, /* Z8 */
+       { TRUE,  TRUE,  FALSE, FALSE, TRUE  }, /* Zblorb */
+       { FALSE, FALSE, TRUE,  TRUE,  FALSE }, /* Glulx */
+       { FALSE, FALSE, TRUE,  TRUE,  FALSE }  /* Gblorb */
 };
 static gchar *format_names[CHIMARA_IF_NUM_FORMATS] = {
        N_("Z-code version 5"),
@@ -48,10 +48,10 @@ static gchar *format_names[CHIMARA_IF_NUM_FORMATS] = {
        N_("Blorbed Glulx")
 };
 static gchar *interpreter_names[CHIMARA_IF_NUM_INTERPRETERS] = {
-       N_("Frotz"), N_("Nitfol"), N_("Glulxe"), N_("Git")
+       N_("Frotz"), N_("Nitfol"), N_("Glulxe"), N_("Git"), N_("Bocfel")
 };
 static gchar *plugin_names[CHIMARA_IF_NUM_INTERPRETERS] = {
-       "frotz", "nitfol", "glulxe", "git"
+       "frotz", "nitfol", "glulxe", "git", "bocfel"
 };
 
 typedef enum _ChimaraIFFlags {
@@ -131,7 +131,7 @@ chimara_if_stopped(ChimaraGlk *glk)
 }
 
 static void
-chimara_if_char_input(ChimaraGlk *glk, guint32 win_rock, guint keysym)
+chimara_if_char_input(ChimaraGlk *glk, guint32 win_rock, char *string_id, unsigned keysym)
 {
        CHIMARA_IF_USE_PRIVATE(glk, priv);
        g_assert(priv->input == NULL);
@@ -142,7 +142,7 @@ chimara_if_char_input(ChimaraGlk *glk, guint32 win_rock, guint keysym)
 }
 
 static void
-chimara_if_line_input(ChimaraGlk *glk, guint32 win_rock, gchar *input)
+chimara_if_line_input(ChimaraGlk *glk, guint32 win_rock, char *string_id, char *input)
 {
        CHIMARA_IF_USE_PRIVATE(glk, priv);
        g_assert(priv->input == NULL);
@@ -150,7 +150,7 @@ chimara_if_line_input(ChimaraGlk *glk, guint32 win_rock, gchar *input)
 }
 
 static void
-chimara_if_text_buffer_output(ChimaraGlk *glk, guint32 win_rock, gchar *output)
+chimara_if_text_buffer_output(ChimaraGlk *glk, guint32 win_rock, char *string_id, char *output)
 {
        CHIMARA_IF_USE_PRIVATE(glk, priv);
        g_string_append(priv->response, output);
@@ -172,9 +172,6 @@ chimara_if_init(ChimaraIF *self)
        priv->interpreter = CHIMARA_IF_INTERPRETER_NONE;
        priv->flags = CHIMARA_IF_TYPO_CORRECTION;
        priv->interpreter_number = CHIMARA_IF_ZMACHINE_DEFAULT;
-       priv->random_seed_set = FALSE;
-       priv->graphics_file = NULL;
-       priv->input = NULL;
        priv->response = g_string_new("");
 
        /* Connect to signals of ChimaraGlk parent */
@@ -280,24 +277,6 @@ chimara_if_finalize(GObject *object)
     G_OBJECT_CLASS(chimara_if_parent_class)->finalize(object);
 }
 
-static void
-chimara_if_command(ChimaraIF *self, gchar *input, gchar *response)
-{
-       /* Default signal handler */
-}
-
-/* COMPAT: G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
-#ifndef G_PARAM_STATIC_STRINGS
-
-/* COMPAT: G_PARAM_STATIC_NAME and friends only appeared in GTK 2.8 */
-#if GTK_CHECK_VERSION(2,8,0)
-#define G_PARAM_STATIC_STRINGS (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
-#else
-#define G_PARAM_STATIC_STRINGS (0)
-#endif
-
-#endif
-
 static void
 chimara_if_class_init(ChimaraIFClass *klass)
 {
@@ -308,7 +287,6 @@ chimara_if_class_init(ChimaraIFClass *klass)
        object_class->finalize = chimara_if_finalize;
 
        /* Signals */
-       klass->command = chimara_if_command;
        /**
         * ChimaraIF::command:
         * @self: The widget that received the signal