#endif
+/**
+ * gtk_is_initialized:
+ *
+ * Use this function to check if GTK+ has been initialized with gtk_init()
+ * or gtk_init_check().
+ *
+ * Returns: the initialization status
+ */
+gboolean
+gtk_is_initialized (void)
+{
+ return gtk_initialized;
+}
+
/**
* gtk_get_locale_direction:
*
GDK_AVAILABLE_IN_ALL
gboolean gtk_init_check (void);
+GDK_AVAILABLE_IN_ALL
+gboolean gtk_is_initialized (void);
+
#ifdef G_OS_WIN32
/* Variants that are used to check for correct struct packing
--- /dev/null
+#include <gtk/gtk.h>
+#include <locale.h>
+
+static void
+test_init (void)
+{
+ g_assert (gtk_is_initialized () == FALSE);
+ g_assert (gtk_init_check ());
+ g_assert (gtk_is_initialized () == TRUE);
+}
+
+int
+main (int argc, char *argv[])
+{
+ /* Don't use gtk_test_init here because it implicitely initializes GTK+. */
+ g_test_init (&argc, &argv, NULL);
+ gtk_disable_setlocale();
+ setlocale (LC_ALL, "C");
+ g_test_bug_base ("http://bugzilla.gnome.org/show_bug.cgi?id=%s");
+
+ g_test_add_func ("/main/init", test_init);
+
+ return g_test_run ();
+}
['icontheme'],
['keyhash', ['../../gtk/gtkkeyhash.c', gtkresources, '../../gtk/gtkprivate.c'], gtk_cargs],
['listbox'],
+ ['main'],
['notify'],
['no-gtk-init'],
['object'],