mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-22 09:57:52 +02:00
Add #defines defining scale of priorities.
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
@@ -1,3 +1,8 @@
|
||||
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
|
||||
|
8
glib.h
8
glib.h
@@ -2386,6 +2386,14 @@ struct _GSourceFuncs
|
||||
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 */
|
||||
|
@@ -2386,6 +2386,14 @@ struct _GSourceFuncs
|
||||
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 */
|
||||
|
@@ -287,7 +287,7 @@ g_source_remove (guint tag)
|
||||
if (hook)
|
||||
{
|
||||
GSource *source = (GSource *)hook;
|
||||
|
||||
|
||||
((GSourceFuncs *) source->hook.func)->destroy (source->source_data);
|
||||
g_hook_destroy_link (&source_list, hook);
|
||||
}
|
||||
@@ -888,7 +888,8 @@ g_timeout_add (guint32 interval,
|
||||
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 */
|
||||
@@ -936,5 +937,5 @@ guint
|
||||
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);
|
||||
}
|
||||
|
7
gmain.c
7
gmain.c
@@ -287,7 +287,7 @@ g_source_remove (guint tag)
|
||||
if (hook)
|
||||
{
|
||||
GSource *source = (GSource *)hook;
|
||||
|
||||
|
||||
((GSourceFuncs *) source->hook.func)->destroy (source->source_data);
|
||||
g_hook_destroy_link (&source_list, hook);
|
||||
}
|
||||
@@ -888,7 +888,8 @@ g_timeout_add (guint32 interval,
|
||||
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 */
|
||||
@@ -936,5 +937,5 @@ guint
|
||||
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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user