📄 gclosure.sgml
字号:
</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-invalidate">g_closure_invalidate ()</title><programlisting>void g_closure_invalidate (<link linkend="GClosure">GClosure</link> *closure);</programlisting><para>This function sets a flag on the closure to indicate that it'scalling environment has become invalid, and thus causes any futureinvocations of <link linkend="g-closure-invoke">g_closure_invoke</link>() on this <parameter>closure</parameter> to be ignored.Also, invalidation notifiers installed on the closure will be calledat this point, and since invalidation notifiers may unreferencethe closure, <parameter>closure</parameter> should be considered an invalidated pointeratfer this function, unles <link linkend="g-closure-ref">g_closure_ref</link>() was called beforehand.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry>GClosure to invalidate</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-add-finalize-notifier">g_closure_add_finalize_notifier ()</title><programlisting>void g_closure_add_finalize_notifier (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> notify_data, <link linkend="GClosureNotify">GClosureNotify</link> notify_func);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_func</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-add-invalidate-notifier">g_closure_add_invalidate_notifier ()</title><programlisting>void g_closure_add_invalidate_notifier (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> notify_data, <link linkend="GClosureNotify">GClosureNotify</link> notify_func);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_func</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-remove-finalize-notifier">g_closure_remove_finalize_notifier ()</title><programlisting>void g_closure_remove_finalize_notifier (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> notify_data, <link linkend="GClosureNotify">GClosureNotify</link> notify_func);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_func</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-remove-invalidate-notifier">g_closure_remove_invalidate_notifier ()</title><programlisting>void g_closure_remove_invalidate_notifier (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> notify_data, <link linkend="GClosureNotify">GClosureNotify</link> notify_func);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>notify_func</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-new-simple">g_closure_new_simple ()</title><programlisting><link linkend="GClosure">GClosure</link>* g_closure_new_simple (<link linkend="guint">guint</link> sizeof_closure, <link linkend="gpointer">gpointer</link> data);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>sizeof_closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>data</parameter> :</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-set-marshal">g_closure_set_marshal ()</title><programlisting>void g_closure_set_marshal (<link linkend="GClosure">GClosure</link> *closure, <link linkend="GClosureMarshal">GClosureMarshal</link> marshal);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>marshal</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-add-marshal-guards">g_closure_add_marshal_guards ()</title><programlisting>void g_closure_add_marshal_guards (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> pre_marshal_data, <link linkend="GClosureNotify">GClosureNotify</link> pre_marshal_notify, <link linkend="gpointer">gpointer</link> post_marshal_data, <link linkend="GClosureNotify">GClosureNotify</link> post_marshal_notify);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>pre_marshal_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>pre_marshal_notify</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>post_marshal_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>post_marshal_notify</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-closure-set-meta-marshal">g_closure_set_meta_marshal ()</title><programlisting>void g_closure_set_meta_marshal (<link linkend="GClosure">GClosure</link> *closure, <link linkend="gpointer">gpointer</link> marshal_data, <link linkend="GClosureMarshal">GClosureMarshal</link> meta_marshal);</programlisting><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>closure</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>marshal_data</parameter> :</entry><entry></entry></row><row><entry align="right"><parameter>meta_marshal</parameter> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-source-set-closure">g_source_set_closure ()</title><programlisting>void g_source_set_closure (<link linkend="GSource">GSource</link> *source, <link linkend="GClosure">GClosure</link> *closure);</programlisting><para>Set the callback for a source as a <link linkend="GClosure">GClosure</link>.</para><para>If the source is not one of the standard GLib types, the <parameter>closure_callback</parameter>and <parameter>closure_marshal</parameter> fields of the GSourceFuncs structure must have beenfilled in with pointers to appropriate functions.</para><para></para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>source</parameter> :</entry><entry> the source</entry></row><row><entry align="right"><parameter>closure</parameter> :</entry><entry> a <link linkend="GClosure">GClosure</link></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-IO-CHANNEL-CAPS">G_TYPE_IO_CHANNEL</title><programlisting>#define G_TYPE_IO_CHANNEL (g_io_channel_get_type ())</programlisting><para></para></refsect2><refsect2><title><anchor id="G-TYPE-IO-CONDITION-CAPS">G_TYPE_IO_CONDITION</title><programlisting>#define G_TYPE_IO_CONDITION (g_io_condition_get_type ())</programlisting><para></para></refsect2></refsect1></refentry>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -