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

📄 objects.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 4 页
字号:
<programlisting>#define G_OBJECT_GET_CLASS(object)  (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass))</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>object</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-OBJECT-TYPE-CAPS">G_OBJECT_TYPE()</title><programlisting>#define G_OBJECT_TYPE(object)       (G_TYPE_FROM_INSTANCE (object))</programlisting><para>Return the type id of an object.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>object</parameter>&nbsp;:</entry><entry>Object to return the type id for.</entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry>Type id of <parameter>object</parameter>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-OBJECT-TYPE-NAME-CAPS">G_OBJECT_TYPE_NAME()</title><programlisting>#define G_OBJECT_TYPE_NAME(object)  (g_type_name (G_OBJECT_TYPE (object)))</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>object</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-OBJECT-CLASS-TYPE-CAPS">G_OBJECT_CLASS_TYPE()</title><programlisting>#define G_OBJECT_CLASS_TYPE(class)  (G_TYPE_FROM_CLASS (class))</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>class</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-OBJECT-CLASS-NAME-CAPS">G_OBJECT_CLASS_NAME()</title><programlisting>#define G_OBJECT_CLASS_NAME(class)  (g_type_name (G_OBJECT_CLASS_TYPE (class)))</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>class</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-class-install-property">g_object_class_install_property ()</title><programlisting>void        g_object_class_install_property (<link linkend="GObjectClass">GObjectClass</link> *oclass,                                             <link linkend="guint">guint</link> property_id,                                             <link linkend="GParamSpec">GParamSpec</link> *pspec);</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>oclass</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>property_id</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>pspec</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-class-find-property">g_object_class_find_property ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>* g_object_class_find_property    (<link linkend="GObjectClass">GObjectClass</link> *oclass,                                             const <link linkend="gchar">gchar</link> *property_name);</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>oclass</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>property_name</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-class-list-properties">g_object_class_list_properties ()</title><programlisting><link linkend="GParamSpec">GParamSpec</link>** g_object_class_list_properties (<link linkend="GObjectClass">GObjectClass</link> *oclass,                                             <link linkend="guint">guint</link> *n_properties);</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>oclass</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>n_properties</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-new">g_object_new ()</title><programlisting><link linkend="gpointer">gpointer</link>    g_object_new                    (<link linkend="GType">GType</link> object_type,                                             const <link linkend="gchar">gchar</link> *first_property_name,                                             ...);</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>object_type</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>first_property_name</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>...</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-newv">g_object_newv ()</title><programlisting><link linkend="gpointer">gpointer</link>    g_object_newv                   (<link linkend="GType">GType</link> object_type,                                             <link linkend="guint">guint</link> n_parameters,                                             <link linkend="GParameter">GParameter</link> *parameters);</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>object_type</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>n_parameters</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>parameters</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GParameter">struct GParameter</title><programlisting>struct GParameter /* auxillary structure for _setv() variants */{  const gchar *name;  GValue       value;};</programlisting><para></para></refsect2><refsect2><title><anchor id="g-object-ref">g_object_ref ()</title><programlisting><link linkend="gpointer">gpointer</link>    g_object_ref                    (<link linkend="gpointer">gpointer</link> object);</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>object</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><emphasis>Returns</emphasis> :</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-unref">g_object_unref ()</title><programlisting>void        g_object_unref                  (<link linkend="gpointer">gpointer</link> object);</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>object</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="GWeakNotify">GWeakNotify ()</title><programlisting>void        (*GWeakNotify)                  (<link linkend="gpointer">gpointer</link> data,                                             <link linkend="GObject">GObject</link> *where_the_object_was);</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>data</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>where_the_object_was</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-weak-ref">g_object_weak_ref ()</title><programlisting>void        g_object_weak_ref               (<link linkend="GObject">GObject</link> *object,                                             <link linkend="GWeakNotify">GWeakNotify</link> notify,                                             <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>object</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>notify</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>data</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-weak-unref">g_object_weak_unref ()</title><programlisting>void        g_object_weak_unref             (<link linkend="GObject">GObject</link> *object,                                             <link linkend="GWeakNotify">GWeakNotify</link> notify,                                             <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>object</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>notify</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>data</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="g-object-add-weak-pointer">g_object_add_weak_pointer ()</title><programlisting>void        g_object_add_weak_pointer       (<link linkend="GObject">GObject</link> *object,                                             <link linkend="gpointer">gpointer</link> *weak_pointer_location);</programlisting><para>Adds a weak reference from weak_pointer to <parameter>object</parameter> to indicate that

⌨️ 快捷键说明

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