📄 input.sgml
字号:
<!-- ##### SECTION Title ##### -->Input<!-- ##### SECTION Short_Description ##### -->Callbacks on file descriptors<!-- ##### SECTION Long_Description ##### --><para>The functions in this section are used to establishcallbacks when some condition becomes true fora file descriptor. They are currently just wrappers aroundthe <link linkend="glib-IO-Channels">IO Channel</link>facility.</para><!-- ##### SECTION See_Also ##### --><para><variablelist><varlistentry><term><link linkend="glib-The-Main-Event-Loop">GLib Main Loop</link></term><listitem><para>The main loop in which input callbacks run.</para></listitem></varlistentry><varlistentry><term><link linkend="glib-IO-Channels">IO Channels</link></term><listitem><para>A newer and more flexible way of doing IOcallbacks.</para></listitem></varlistentry></variablelist></para><!-- ##### SECTION Stability_Level ##### --><!-- ##### FUNCTION gdk_input_add_full ##### --><para>Establish a callback when a condition becomes true ona file descriptor.</para>@source: a file descriptor.@condition: the condition.@function: the callback function.@data: callback data passed to @function.@destroy: callback function to call with @data when the input handler is removed.@Returns: a tag that can later be used as an argument to gdk_input_remove().<!-- ##### ENUM GdkInputCondition ##### --><para>A set of bit flags used to specify conditions for whichan input callback will be triggered. The three membersof this enumeration correspond to the @readfds, @writefds, and @exceptfds arguments to the <function>select</function> system call.</para>@GDK_INPUT_READ: the file descriptor has become available for reading.(Or, as is standard in Unix, a socket or pipe was closedat the other end; this is the case if a subsequent readon the file descriptor returns a count of zero.)@GDK_INPUT_WRITE: the file descriptor has become available for writing.@GDK_INPUT_EXCEPTION: an exception was raised on the file descriptor.<!-- ##### USER_FUNCTION GdkInputFunction ##### --><para>A callback function that will be called when some conditionoccurs.</para>@data: the user data passed to gdk_input_add() or gdk_input_add_full().@source: the source where the condition occurred.@condition: the triggering condition.<!-- ##### USER_FUNCTION GdkDestroyNotify ##### --><para>A callback function called when a piece of user data is no longer being stored by GDK. Will typically free thestructure or object that @data points to.</para>@data: the user data.<!-- ##### FUNCTION gdk_input_add ##### --><para>Establish a callback when a condition becomes true ona file descriptor.</para>@source: a file descriptor.@condition: the condition.@function: the callback function.@data: callback data passed to @function.@Returns: a tag that can later be used as an argument to gdk_input_remove().<!-- ##### FUNCTION gdk_input_remove ##### --><para>Remove a callback added with gdk_input_add() or gdk_input_add_full().</para>@tag: the tag returned when the callback was set up.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -