* SECTION:chimara-if
* @short_description: Widget which plays an interactive fiction game
* @stability: Unstable
- * @include: chimara/chimara-if.h
+ * @include: libchimara/chimara-if.h
*
* The #ChimaraIF widget, given an interactive fiction game file to run, selects
* an appropriate interpreter plugin and runs it. Interpreter options are set by
* setting properties on the widget.
+ *
+ * Using it in a GTK program is similar to using #ChimaraGlk (which see).
+ * Threads must be initialized before using #ChimaraIF and the call to
+ * gtk_main() must be bracketed between gdk_threads_enter() and
+ * gdk_threads_leave(). Use chimara_if_run_game() to start playing an
+ * interactive fiction game.
*/
static gboolean supported_formats[CHIMARA_IF_NUM_FORMATS][CHIMARA_IF_NUM_INTERPRETERS] = {
{
case PROP_PIRACY_MODE:
PROCESS_FLAG(priv->flags, CHIMARA_IF_PIRACY_MODE, g_value_get_boolean(value));
+ g_object_notify(object, "piracy-mode");
break;
case PROP_TANDY_BIT:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TANDY_BIT, g_value_get_boolean(value));
+ g_object_notify(object, "tandy-bit");
break;
case PROP_EXPAND_ABBREVIATIONS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_EXPAND_ABBREVIATIONS, g_value_get_boolean(value));
+ g_object_notify(object, "expand-abbreviations");
break;
case PROP_IGNORE_ERRORS:
PROCESS_FLAG(priv->flags, CHIMARA_IF_IGNORE_ERRORS, g_value_get_boolean(value));
+ g_object_notify(object, "ignore-errors");
break;
case PROP_TYPO_CORRECTION:
PROCESS_FLAG(priv->flags, CHIMARA_IF_TYPO_CORRECTION, g_value_get_boolean(value));
+ g_object_notify(object, "typo-correction");
break;
case PROP_INTERPRETER_NUMBER:
priv->interpreter_number = g_value_get_uint(value);
+ g_object_notify(object, "interpreter-number");
break;
case PROP_RANDOM_SEED:
priv->random_seed = g_value_get_int(value);
+ g_object_notify(object, "random-seed");
break;
case PROP_RANDOM_SEED_SET:
priv->random_seed_set = g_value_get_boolean(value);
+ g_object_notify(object, "random-seed-set");
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
/* Default signal handler */
}
-/* G_PARAM_STATIC_STRINGS only appeared in GTK 2.13.0 */
+/* 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
*
* Emitted once for each input-response cycle of an interactive fiction
* game. Note that games with nontraditional input systems (i.e. not all
- * taking place in the same text buffer window) may throw this signal for a
- * loop.
+ * taking place in the same text buffer window) may confuse this signal.
*/
chimara_if_signals[COMMAND] = g_signal_new("command",
G_OBJECT_CLASS_TYPE(klass), 0,