Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+ * glib.h gmain.c (G_PRIORITY_LOW): Add #defines defining
+ scale of priorities.
+
+Sat Dec 19 16:56:02 1998 Owen Taylor <otaylor@redhat.com>
+
* gmain.c (g_main_poll): Allocate space for pollfd's
_after_ adding poll wake-up-pipe record.
GDestroyNotify destroy;
};
+/* Standard priorities */
+
+#define G_PRIORITY_HIGH -100
+#define G_PRIORITY_DEFAULT 0
+#define G_PRIORITY_HIGH_IDLE 100
+#define G_PRIORITY_DEFAULT_IDLE 200
+#define G_PRIORITY_LOW 300
+
typedef gboolean (*GSourceFunc) (gpointer data);
/* Hooks for adding to the main loop */
GDestroyNotify destroy;
};
+/* Standard priorities */
+
+#define G_PRIORITY_HIGH -100
+#define G_PRIORITY_DEFAULT 0
+#define G_PRIORITY_HIGH_IDLE 100
+#define G_PRIORITY_DEFAULT_IDLE 200
+#define G_PRIORITY_LOW 300
+
typedef gboolean (*GSourceFunc) (gpointer data);
/* Hooks for adding to the main loop */
if (hook)
{
GSource *source = (GSource *)hook;
-
+
((GSourceFuncs *) source->hook.func)->destroy (source->source_data);
g_hook_destroy_link (&source_list, hook);
}
GSourceFunc function,
gpointer data)
{
- return g_timeout_add_full (0, interval, function, data, NULL);
+ return g_timeout_add_full (G_PRIORITY_DEFAULT,
+ interval, function, data, NULL);
}
/* Idle functions */
g_idle_add (GSourceFunc function,
gpointer data)
{
- return g_idle_add_full (0, function, data, NULL);
+ return g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, function, data, NULL);
}
if (hook)
{
GSource *source = (GSource *)hook;
-
+
((GSourceFuncs *) source->hook.func)->destroy (source->source_data);
g_hook_destroy_link (&source_list, hook);
}
GSourceFunc function,
gpointer data)
{
- return g_timeout_add_full (0, interval, function, data, NULL);
+ return g_timeout_add_full (G_PRIORITY_DEFAULT,
+ interval, function, data, NULL);
}
/* Idle functions */
g_idle_add (GSourceFunc function,
gpointer data)
{
- return g_idle_add_full (0, function, data, NULL);
+ return g_idle_add_full (G_PRIORITY_DEFAULT_IDLE, function, data, NULL);
}