📄 glib-the-main-event-loop.html
字号:
<html xmlns:cf="http://docbook.sourceforge.net/xmlns/chunkfast/1.0"><head><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"><title>The Main Event Loop</title><meta name="generator" content="DocBook XSL Stylesheets V1.69.0"><link rel="start" href="index.html" title="GLib Reference Manual"><link rel="up" href="glib-core.html" title="GLib Core Application Support"><link rel="prev" href="glib-core.html" title="GLib Core Application Support"><link rel="next" href="glib-Threads.html" title="Threads"><meta name="generator" content="GTK-Doc V1.4 (XML mode)"><link rel="stylesheet" href="style.css" type="text/css"><link rel="chapter" href="glib.html" title="GLib Overview"><link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals"><link rel="chapter" href="glib-core.html" title="GLib Core Application Support"><link rel="chapter" href="glib-utilities.html" title="GLib Utilities"><link rel="chapter" href="glib-data-types.html" title="GLib Data Types"><link rel="chapter" href="tools.html" title="GLib Tools"><link rel="index" href="ix01.html" title="Index"><link rel="index" href="ix02.html" title="Index of deprecated symbols"><link rel="index" href="ix03.html" title="Index of new symbols in 2.2"><link rel="index" href="ix04.html" title="Index of new symbols in 2.4"><link rel="index" href="ix05.html" title="Index of new symbols in 2.6"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="glib-core.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="glib-core.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GLib Reference Manual</th><td><a accesskey="n" href="glib-Threads.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="glib-The-Main-Event-Loop"></a><div class="titlepage"></div><div class="refnamediv"><table width="100%"><tr><td valign="top"><h2><span class="refentrytitle">The Main Event Loop</span></h2><p>The Main Event Loop — manages all available sources of events.</p></td><td valign="top" align="right"></td></tr></table></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">#include <glib.h> <a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a>;<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a>* <a href="glib-The-Main-Event-Loop.html#g-main-loop-new">g_main_loop_new</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gboolean">gboolean</a> is_running);<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a>* <a href="glib-The-Main-Event-Loop.html#g-main-loop-ref">g_main_loop_ref</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);void <a href="glib-The-Main-Event-Loop.html#g-main-loop-unref">g_main_loop_unref</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);void <a href="glib-The-Main-Event-Loop.html#g-main-loop-run">g_main_loop_run</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);void <a href="glib-The-Main-Event-Loop.html#g-main-loop-quit">g_main_loop_quit</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-loop-is-running">g_main_loop_is_running</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>* <a href="glib-The-Main-Event-Loop.html#g-main-loop-get-context">g_main_loop_get_context</a> (<a href="glib-The-Main-Event-Loop.html#GMainLoop">GMainLoop</a> *loop);#define <a href="glib-The-Main-Event-Loop.html#g-main-new">g_main_new</a> (is_running)#define <a href="glib-The-Main-Event-Loop.html#g-main-destroy">g_main_destroy</a> (loop)#define <a href="glib-The-Main-Event-Loop.html#g-main-run">g_main_run</a> (loop)#define <a href="glib-The-Main-Event-Loop.html#g-main-quit">g_main_quit</a> (loop)#define <a href="glib-The-Main-Event-Loop.html#g-main-is-running">g_main_is_running</a> (loop)#define <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-HIGH:CAPS">G_PRIORITY_HIGH</a>#define <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS">G_PRIORITY_DEFAULT</a>#define <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-HIGH-IDLE:CAPS">G_PRIORITY_HIGH_IDLE</a>#define <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT-IDLE:CAPS">G_PRIORITY_DEFAULT_IDLE</a>#define <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-LOW:CAPS">G_PRIORITY_LOW</a> <a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>;<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-new">g_main_context_new</a> (void);<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-ref">g_main_context_ref</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);void <a href="glib-The-Main-Event-Loop.html#g-main-context-unref">g_main_context_unref</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-default">g_main_context_default</a> (void);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-iteration">g_main_context_iteration</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gboolean">gboolean</a> may_block);#define <a href="glib-The-Main-Event-Loop.html#g-main-iteration">g_main_iteration</a> (may_block)<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-pending">g_main_context_pending</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);#define <a href="glib-The-Main-Event-Loop.html#g-main-pending">g_main_pending</a> ()<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-find-source-by-id">g_main_context_find_source_by_id</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#guint">guint</a> source_id);<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-find-source-by-user-data">g_main_context_find_source_by_user_data</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-main-context-find-source-by-funcs-user-data">g_main_context_find_source_by_funcs_user_data</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-The-Main-Event-Loop.html#GSourceFuncs">GSourceFuncs</a> *funcs, <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);void <a href="glib-The-Main-Event-Loop.html#g-main-context-wakeup">g_main_context_wakeup</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-acquire">g_main_context_acquire</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);void <a href="glib-The-Main-Event-Loop.html#g-main-context-release">g_main_context_release</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-wait">g_main_context_wait</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Threads.html#GCond">GCond</a> *cond, <a href="glib-Threads.html#GMutex">GMutex</a> *mutex);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-prepare">g_main_context_prepare</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gint">gint</a> *priority);<a href="glib-Basic-Types.html#gint">gint</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-query">g_main_context_query</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gint">gint</a> max_priority, <a href="glib-Basic-Types.html#gint">gint</a> *timeout_, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fds, <a href="glib-Basic-Types.html#gint">gint</a> n_fds);<a href="glib-Basic-Types.html#gint">gint</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-check">g_main_context_check</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-Basic-Types.html#gint">gint</a> max_priority, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fds, <a href="glib-Basic-Types.html#gint">gint</a> n_fds);void <a href="glib-The-Main-Event-Loop.html#g-main-context-dispatch">g_main_context_dispatch</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);void <a href="glib-The-Main-Event-Loop.html#g-main-context-set-poll-func">g_main_context_set_poll_func</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-The-Main-Event-Loop.html#GPollFunc">GPollFunc</a> func);<a href="glib-The-Main-Event-Loop.html#GPollFunc">GPollFunc</a> <a href="glib-The-Main-Event-Loop.html#g-main-context-get-poll-func">g_main_context_get_poll_func</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);<a href="glib-Basic-Types.html#gint">gint</a> (<a href="glib-The-Main-Event-Loop.html#GPollFunc">*GPollFunc</a>) (<a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *ufds, <a href="glib-Basic-Types.html#guint">guint</a> nfsd, <a href="glib-Basic-Types.html#gint">gint</a> timeout_);void <a href="glib-The-Main-Event-Loop.html#g-main-context-add-poll">g_main_context_add_poll</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fd, <a href="glib-Basic-Types.html#gint">gint</a> priority);void <a href="glib-The-Main-Event-Loop.html#g-main-context-remove-poll">g_main_context_remove_poll</a> (<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fd);int <a href="glib-The-Main-Event-Loop.html#g-main-depth">g_main_depth</a> (void);#define <a href="glib-The-Main-Event-Loop.html#g-main-set-poll-func">g_main_set_poll_func</a> (func)<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-timeout-source-new">g_timeout_source_new</a> (<a href="glib-Basic-Types.html#guint">guint</a> interval);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-timeout-add">g_timeout_add</a> (<a href="glib-Basic-Types.html#guint">guint</a> interval, <a href="glib-The-Main-Event-Loop.html#GSourceFunc">GSourceFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-timeout-add-full">g_timeout_add_full</a> (<a href="glib-Basic-Types.html#gint">gint</a> priority, <a href="glib-Basic-Types.html#guint">guint</a> interval, <a href="glib-The-Main-Event-Loop.html#GSourceFunc">GSourceFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data, <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> notify);<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-idle-source-new">g_idle_source_new</a> (void);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-idle-add">g_idle_add</a> (<a href="glib-The-Main-Event-Loop.html#GSourceFunc">GSourceFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-idle-add-full">g_idle_add_full</a> (<a href="glib-Basic-Types.html#gint">gint</a> priority, <a href="glib-The-Main-Event-Loop.html#GSourceFunc">GSourceFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data, <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> notify);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-idle-remove-by-data">g_idle_remove_by_data</a> (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);typedef <a href="glib-The-Main-Event-Loop.html#GPid">GPid</a>;void (<a href="glib-The-Main-Event-Loop.html#GChildWatchFunc">*GChildWatchFunc</a>) (<a href="glib-The-Main-Event-Loop.html#GPid">GPid</a> pid, <a href="glib-Basic-Types.html#gint">gint</a> status, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data);<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-child-watch-source-new">g_child_watch_source_new</a> (<a href="glib-The-Main-Event-Loop.html#GPid">GPid</a> pid);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-child-watch-add">g_child_watch_add</a> (<a href="glib-The-Main-Event-Loop.html#GPid">GPid</a> pid, <a href="glib-The-Main-Event-Loop.html#GChildWatchFunc">GChildWatchFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-child-watch-add-full">g_child_watch_add_full</a> (<a href="glib-Basic-Types.html#gint">gint</a> priority, <a href="glib-The-Main-Event-Loop.html#GPid">GPid</a> pid, <a href="glib-The-Main-Event-Loop.html#GChildWatchFunc">GChildWatchFunc</a> function, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data, <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> notify); <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a>; <a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>;void (<a href="glib-The-Main-Event-Loop.html#GSourceDummyMarshal">*GSourceDummyMarshal</a>) (void); <a href="glib-The-Main-Event-Loop.html#GSourceFuncs">GSourceFuncs</a>; <a href="glib-The-Main-Event-Loop.html#GSourceCallbackFuncs">GSourceCallbackFuncs</a>;<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-source-new">g_source_new</a> (<a href="glib-The-Main-Event-Loop.html#GSourceFuncs">GSourceFuncs</a> *source_funcs, <a href="glib-Basic-Types.html#guint">guint</a> struct_size);<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a>* <a href="glib-The-Main-Event-Loop.html#g-source-ref">g_source_ref</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);void <a href="glib-The-Main-Event-Loop.html#g-source-unref">g_source_unref</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-source-attach">g_source_attach</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a> *context);void <a href="glib-The-Main-Event-Loop.html#g-source-destroy">g_source_destroy</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);void <a href="glib-The-Main-Event-Loop.html#g-source-set-priority">g_source_set_priority</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-Basic-Types.html#gint">gint</a> priority);<a href="glib-Basic-Types.html#gint">gint</a> <a href="glib-The-Main-Event-Loop.html#g-source-get-priority">g_source_get_priority</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);void <a href="glib-The-Main-Event-Loop.html#g-source-set-can-recurse">g_source_set_can_recurse</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-Basic-Types.html#gboolean">gboolean</a> can_recurse);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-source-get-can-recurse">g_source_get_can_recurse</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);<a href="glib-Basic-Types.html#guint">guint</a> <a href="glib-The-Main-Event-Loop.html#g-source-get-id">g_source_get_id</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);<a href="glib-The-Main-Event-Loop.html#GMainContext">GMainContext</a>* <a href="glib-The-Main-Event-Loop.html#g-source-get-context">g_source_get_context</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source);void <a href="glib-The-Main-Event-Loop.html#g-source-set-callback">g_source_set_callback</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-The-Main-Event-Loop.html#GSourceFunc">GSourceFunc</a> func, <a href="glib-Basic-Types.html#gpointer">gpointer</a> data, <a href="glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> notify);<a href="glib-Basic-Types.html#gboolean">gboolean</a> (<a href="glib-The-Main-Event-Loop.html#GSourceFunc">*GSourceFunc</a>) (<a href="glib-Basic-Types.html#gpointer">gpointer</a> data);void <a href="glib-The-Main-Event-Loop.html#g-source-set-callback-indirect">g_source_set_callback_indirect</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-Basic-Types.html#gpointer">gpointer</a> callback_data, <a href="glib-The-Main-Event-Loop.html#GSourceCallbackFuncs">GSourceCallbackFuncs</a> *callback_funcs);void <a href="glib-The-Main-Event-Loop.html#g-source-add-poll">g_source_add_poll</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fd);void <a href="glib-The-Main-Event-Loop.html#g-source-remove-poll">g_source_remove_poll</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-The-Main-Event-Loop.html#GPollFD">GPollFD</a> *fd);void <a href="glib-The-Main-Event-Loop.html#g-source-get-current-time">g_source_get_current_time</a> (<a href="glib-The-Main-Event-Loop.html#GSource">GSource</a> *source, <a href="glib-Date-and-Time-Functions.html#GTimeVal">GTimeVal</a> *timeval);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-source-remove">g_source_remove</a> (<a href="glib-Basic-Types.html#guint">guint</a> tag);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-source-remove-by-funcs-user-data">g_source_remove_by_funcs_user_data</a> (<a href="glib-The-Main-Event-Loop.html#GSourceFuncs">GSourceFuncs</a> *funcs, <a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-The-Main-Event-Loop.html#g-source-remove-by-user-data">g_source_remove_by_user_data</a> (<a href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre></div><div class="refsect1" lang="en"><a name="id2848166"></a><h2>Description</h2><p> The main event loop manages all the available sources of events for GLib and GTK+ applications. These events can come from any number of different types of sources such as file descriptors (plain files, pipes or sockets) and timeouts. New types of event sources can also be added using <a href="glib-The-Main-Event-Loop.html#g-source-attach"><code class="function">g_source_attach()</code></a>. </p><p> To allow multiple independent sets of sources to be handled in different threads, each source is associated with a <a href="glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a>. A <a href="glib-The-Main-Event-Loop.html#GMainContext"><span class="type">GMainContext</span></a> can only be running in a single thread, but sources can be added to it and removed from it from other threads. </p><p> Each event source is assigned a priority. The default priority, <a href="glib-The-Main-Event-Loop.html#G-PRIORITY-DEFAULT:CAPS"><span class="type">G_PRIORITY_DEFAULT</span></a>, is 0. Values less than 0 denote higher priorities. Values greater than 0 denote lower priorities. Events from high priority sources are always processed before events from lower priority sources. </p><p> Idle functions can also be added, and assigned a priority. These will be run whenever no events with a higher priority are ready to be processed. </p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -