3 #include <glib/gi18n-lib.h>
8 static gboolean chimara_initialized = FALSE;
10 /* This function is called at every entry point of the library, to set up
11 threads and gettext. It is NOT called from Glk functions. */
15 if( G_UNLIKELY(!chimara_initialized) )
18 bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
19 bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
21 /* Make sure threads have been initialized */
22 if(!g_thread_supported())
23 g_error(_("In order to use the Chimara library, you must initialize"
24 " the thread system by calling g_threads_init() and "
25 "gdk_threads_init() BEFORE the initial call to gtk_init() in "
26 "your main program."));
28 #ifdef GSTREAMER_SOUND
29 /* Make sure GStreamer has been initialized if it hasn't been already;
30 in particular, if you want your program to parse GStreamer command line
31 options then you should do it yourself, before gtk_init(). */
33 /* SUCKY DEBIAN: gst_is_initialized() supported from 0.10.30 onward */
34 /*if( !gst_is_initialized() )*/
38 /* Initialize thread-private data */
39 extern GPrivate *glk_data_key;
40 glk_data_key = g_private_new(NULL);