⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signals.sgml

📁 linux下电话本所依赖的库文件
💻 SGML
📖 第 1 页 / 共 3 页
字号:
@class_closure: The closure to invoke on signal emission.@accumulator: the accumulator for this signal; may be %NULL.@accu_data: user data for the @accumulator.@c_marshaller: the function to translate arrays of parameter values to    signal emissions into C language callback invocations.@return_type: the type of return value, or #G_TYPE_NONE for a signal    without a return value.@n_params: the number of parameter types in @args.@args: va_list of #GType, one for each parameter.@Returns: the signal id<!-- ##### FUNCTION g_signal_query ##### --><para>Queries the signal system for in-depth information about aspecific signal. This function will fill in a user-providedstructure to hold signal-specific information. If an invalidsignal id is passed in, the @signal_id member of the #GSignalQueryis 0. All members filled into the #GSignalQuery structure shouldbe considered constant and have to be left untouched.</para>@signal_id: The signal id of the signal to query information for.@query: A user provided structure that is filled in with constant         values upon success.<!-- ##### FUNCTION g_signal_lookup ##### --><para>Given the name of the signal and the type of object it connects to, gets the signal's identifying integer. Emitting the signal by number is somewhat faster than using the name each time.</para><para>Also tries the ancestors of the given type.</para><para>See g_signal_new() for details on allowed signal names.</para>@name: the signal's name.@itype: the type that the signal operates on.@Returns: the signal's identifying number, or 0 if no signal was found.<!-- ##### FUNCTION g_signal_name ##### --><para>Given the signal's identifier, finds its name.</para><para>Two different signals may have the same name, if they have differing types.</para>@signal_id: the signal's identifying number.@Returns: the signal name, or %NULL if the signal number was invalid.<!-- ##### FUNCTION g_signal_list_ids ##### --><para>Lists the signals by id that a certain instance or interface typecreated. Further information about the signals can be acquired throughg_signal_query().</para>@itype: Instance or interface type.@n_ids: Location to store the number of signal ids for @itype.@Returns: Newly allocated array of signal IDs.<!-- ##### FUNCTION g_signal_emit ##### --><para>Emits a signal. </para><para>Note that g_signal_emit() resets the return value to the defaultif no handlers are connected, in contrast to g_signal_emitv().</para>@instance: the instance the signal is being emitted on.@signal_id: the signal id@detail: the detail@Varargs: parameters to be passed to the signal, followed by a           location for the return value. If the return type of the signal           is #G_TYPE_NONE, the return value location can be omitted.<!-- ##### FUNCTION g_signal_emit_by_name ##### --><para>Emits a signal. </para><para>Note that g_signal_emit_by_name() resets the return value to the defaultif no handlers are connected, in contrast to g_signal_emitv().</para>@instance: the instance the signal is being emitted on.@detailed_signal: a string of the form "signal-name::detail".@Varargs: parameters to be passed to the signal, followed by a          location for the return value. If the return type of the signal          is #G_TYPE_NONE, the return value location can be omitted.<!-- ##### FUNCTION g_signal_emitv ##### --><para>Emits a signal. </para><para>Note that g_signal_emitv() doesn't change @return_value if no handlers areconnected, in contrast to g_signal_emit() and g_signal_emit_valist().</para>@instance_and_params: argument list for the signal emission. The first      element in the array is a #GValue for the instance the signal is      being emitted on. The rest are any arguments to be passed to the      signal.@signal_id: the signal id@detail: the detail@return_value: Location to store the return value of the signal emission.<!-- ##### FUNCTION g_signal_emit_valist ##### --><para>Emits a signal. </para><para>Note that g_signal_emit_valist() resets the return value to the defaultif no handlers are connected, in contrast to g_signal_emitv().</para>@instance: the instance the signal is being emitted on.@signal_id: the signal id@detail: the detail@var_args: a list of parameters to be passed to the signal, followed by a           location for the return value. If the return type of the signal           is #G_TYPE_NONE, the return value location can be omitted.<!-- ##### MACRO g_signal_connect ##### --><para>Connects a #GCallback function to a signal for a particular object.</para><para>The handler will be called before the default handler of the signal.</para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@c_handler: the #GCallback to connect.@data: data to pass to @c_handler calls.@Returns: the handler id<!-- ##### MACRO g_signal_connect_after ##### --><para>Connects a #GCallback function to a signal for a particular object.</para><para>The handler will be called after the default handler of the signal.</para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@c_handler: the #GCallback to connect.@data: data to pass to @c_handler calls.@Returns: the handler id<!-- ##### MACRO g_signal_connect_swapped ##### --><para>Connects a #GCallback function to a signal for a particular object.</para><para>The instance on which the signal is emitted and @data will be swapped when calling the handler.</para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@c_handler: the #GCallback to connect.@data: data to pass to @c_handler calls.@Returns: the handler id<!-- ##### FUNCTION g_signal_connect_object ##### --><para> This is similar to g_signal_connect_data(), but uses a closure which ensures that the @gobject stays alive during the call to @c_handler by temporarily adding a reference count to @gobject.</para><para> Note that there is a bug in GObject that makes this function much less useful than it might seem otherwise. Once @gobject is disposed, the callback will no longer be called, but, the signal handler is <emphasis>not</emphasis> currently disconnected. If the @instance is itself being freed at the same time than this doesn't matter, since the signal will automatically be removed, but if @instance persists, then the signal handler will leak. You should not remove the signal yourself because in a future versions of GObject, the handler <emphasis>will</emphasis> automatically be disconnected.</para><para> It's possible to work around this problem in a way that will continue to work with future versions of GObject by checking that the signal handler is still connected before disconnected it:<informalexample><programlisting> if (g_signal_handler_is_connected (instance, id))   g_signal_handler_disconnect (instance, id);</programlisting></informalexample></para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@c_handler: the #GCallback to connect.@gobject: the object to pass as data to @c_handler.@connect_flags: a combination of #GConnnectFlags.@Returns: the handler id.<!-- ##### ENUM GConnectFlags ##### --><para>The connection flags are used to specify the behaviour of a signal's connection.</para>@G_CONNECT_AFTER: whether the handler should be called before or after the                   default handler of the signal.@G_CONNECT_SWAPPED: whether the instance and data should be swapped when                  calling the handler.<!-- ##### FUNCTION g_signal_connect_data ##### --><para>Connects a #GCallback function to a signal for a particular object. Similarto g_signal_connect(), but allows to provide a #GDestroyNotify for the datawhich will be called when the signal handler is disconnected and no longerused. Specify @connect_flags if you need <literal>..._after()</literal> pr<literal>..._swapped()</literal> variants of this function.</para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@c_handler: the #GCallback to connect.@data: data to pass to @c_handler calls.@destroy_data: a #GDestroyNotify for @data.@connect_flags: a combination of #GConnectFlags.@Returns: the handler id<!-- ##### FUNCTION g_signal_connect_closure ##### --><para>Connects a closure to a signal for a particular object.</para>@instance: the instance to connect to.@detailed_signal: a string of the form "signal-name::detail".@closure: the closure to connect.@after: whether the handler should be called before or after the         default handler of the signal.@Returns: the handler id<!-- ##### FUNCTION g_signal_connect_closure_by_id ##### --><para>Connects a closure to a signal for a particular object.</para>@instance: the instance to connect to.@signal_id: the id of the signal.@detail: the detail.@closure: the closure to connect.@after: whether the handler should be called before or after the         default handler of the signal.@Returns: the handler id<!-- ##### FUNCTION g_signal_handler_block ##### --><para>Blocks a handler of an instance so it will not be called during any signal emissions unless it is unblocked again. Thus "blocking" a signal handler means to temporarily deactive it, a signal handler has to be unblocked exactly the same amount of times it has been blocked before to become active again.</para><para>The @handler_id has to be a valid signal handler id, connected to a signal of @instance.</para>@instance: The instance to block the signal handler of.@handler_id: Handler id of the handler to be blocked.<!-- ##### FUNCTION g_signal_handler_unblock ##### --><para>Undoes the effect of a previous g_signal_handler_block() call. A blocked handler is skipped during signal emissions and will not be invoked, unblocking it (for exactly the amount of times it has been blocked before) reverts its "blocked" state, so the handler will be recognized by the signal system and is called upon future or currentlyongoing signal emissions (since the order in which handlers arecalled during signal emissions is deterministic, whether theunblocked handler in question is called as part of a currentlyongoing emission depends on how far that emission has proceededyet).</para><para>The @handler_id has to be a valid id of a signal handler that is connected to a signal of @instance and is currently blocked.</para>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -