* url="http://www.gnu.org/software/libtool/manual/html_node/Finding-the-dlname.html">
* Libtool manual</ulink>).
*
- * You need to initialize multithreading in any program you use a #ChimaraGlk
- * widget in. This means including the following incantation at the beginning
- * of your program:
- * |[
- * if(!g_thread_supported())
- * g_thread_init(NULL);
- * gdk_threads_init();
- * ]|
- * This initialization must take place <emphasis>before</emphasis> the call to
- * gtk_init(). In addition to this, you must also protect your call to
- * gtk_main() by calling gdk_threads_enter() right before it, and
- * gdk_threads_leave() right after it.
+ * You need to initialize GDK threading in any program you use a #ChimaraGlk
+ * widget in.
+ * This means calling gdk_threads_init() at the beginning of your program,
+ * <emphasis>before</emphasis> the call to gtk_init().
+ * In addition to this, you must also protect your call to gtk_main() by calling
+ * gdk_threads_enter() right before it, and gdk_threads_leave() right after it.
*
* The following sample program shows how to initialize and construct a simple
* GTK window that runs a Glk program:
* gchar *plugin_argv[] = { "plugin.so", "-option" };
*
* /<!---->* Initialize threads and GTK *<!---->/
- * if(!g_thread_supported())
- * g_thread_init(NULL);
* gdk_threads_init();
* gtk_init(&argc, &argv);
*
static gboolean chimara_initialized = FALSE;
/* This function is called at every entry point of the library, to set up
-threads and gettext. It is NOT called from Glk functions. */
+gettext and GStreamer. It is NOT called from Glk functions. */
void
chimara_init(void)
{
/* Setup gettext */
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
-
- /* Make sure threads have been initialized */
- if(!g_thread_supported())
- g_error(_("In order to use the Chimara library, you must initialize"
- " the thread system by calling g_threads_init() and "
- "gdk_threads_init() BEFORE the initial call to gtk_init() in "
- "your main program."));
#ifdef GSTREAMER_SOUND
/* Make sure GStreamer has been initialized if it hasn't been already;
GtkWidget *window, *vbox, *hbox, *stop, *go, *glk;
/* Initialize threads and GTK */
- if(!g_thread_supported())
- g_thread_init(NULL);
gdk_threads_init();
gtk_init(&argc, &argv);