make it possible to disable single-file includes by defining
[platform/upstream/glib.git] / glib / gmain.h
index 1d201dd..6d400b2 100644 (file)
  * Boston, MA 02111-1307, USA.
  */
 
+#if defined(G_DISABLE_SINGLE_INCLUDES) && !defined (__G_LIB_H__) && !defined (GLIB_COMPILATION)
+#error "Only <glib.h> can be included directly."
+#endif
+
 #ifndef __G_MAIN_H__
 #define __G_MAIN_H__
 
@@ -295,32 +299,37 @@ gboolean g_source_remove_by_funcs_user_data  (GSourceFuncs  *funcs,
                                              gpointer       user_data);
 
 /* Idles, child watchers and timeouts */
-guint    g_timeout_add_full     (gint            priority,
-                                guint           interval,
-                                GSourceFunc     function,
-                                gpointer        data,
-                                GDestroyNotify  notify);
-guint    g_timeout_add          (guint           interval,
-                                GSourceFunc     function,
-                                gpointer        data);
-guint    g_timeout_add_seconds  (guint           interval,
-                                GSourceFunc     function,
-                                gpointer        data);
-guint    g_child_watch_add_full (gint            priority,
-                                GPid            pid,
-                                GChildWatchFunc function,
-                                gpointer        data,
-                                GDestroyNotify  notify);
-guint    g_child_watch_add      (GPid            pid,
-                                GChildWatchFunc function,
-                                gpointer        data);
-guint    g_idle_add             (GSourceFunc     function,
-                                gpointer        data);
-guint    g_idle_add_full        (gint            priority,
-                                GSourceFunc     function,
-                                gpointer        data,
-                                GDestroyNotify  notify);
-gboolean g_idle_remove_by_data  (gpointer        data);
+guint    g_timeout_add_full         (gint            priority,
+                                    guint           interval,
+                                    GSourceFunc     function,
+                                    gpointer        data,
+                                    GDestroyNotify  notify);
+guint    g_timeout_add              (guint           interval,
+                                    GSourceFunc     function,
+                                    gpointer        data);
+guint    g_timeout_add_seconds_full (gint            priority,
+                                     guint           interval,
+                                     GSourceFunc     function,
+                                     gpointer        data,
+                                     GDestroyNotify  notify);
+guint    g_timeout_add_seconds      (guint           interval,
+                                    GSourceFunc     function,
+                                    gpointer        data);
+guint    g_child_watch_add_full     (gint            priority,
+                                    GPid            pid,
+                                    GChildWatchFunc function,
+                                    gpointer        data,
+                                    GDestroyNotify  notify);
+guint    g_child_watch_add          (GPid            pid,
+                                    GChildWatchFunc function,
+                                    gpointer        data);
+guint    g_idle_add                 (GSourceFunc     function,
+                                    gpointer        data);
+guint    g_idle_add_full            (gint            priority,
+                                    GSourceFunc     function,
+                                    gpointer        data,
+                                    GDestroyNotify  notify);
+gboolean g_idle_remove_by_data      (gpointer        data);
 
 /* Hook for GClosure / GSource integration. Don't touch */
 GLIB_VAR GSourceFuncs g_timeout_funcs;