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

📄 gtype.sgml

📁 GLib是GTK+和GNOME工程的基础底层核心程序库
💻 SGML
📖 第 1 页 / 共 5 页
字号:
  if (!object_p)    return g_strdup_printf ("object location passed as NULL");  if (!value-&gt;data[0].v_pointer)    *object_p = NULL;  else if (collect_flags & G_VALUE_NOCOPY_CONTENTS) /* always honour */    *object_p = value-&gt;data[0].v_pointer;  else    *object_p = g_object_ref (value-&gt;data[0].v_pointer);  return NULL;}</programlisting></msgtext></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-FROM-INSTANCE-CAPS">G_TYPE_FROM_INSTANCE()</title><programlisting>#define G_TYPE_FROM_INSTANCE(instance)                          (G_TYPE_FROM_CLASS (((GTypeInstance*) (instance))-&gt;g_class))</programlisting><para>Returns the type identifier from a given <parameter>instance</parameter> structure.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>instance</parameter>&nbsp;:</entry><entry>Location of a valid <link linkend="GTypeInstance">GTypeInstance</link> structure.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-FROM-CLASS-CAPS">G_TYPE_FROM_CLASS()</title><programlisting>#define G_TYPE_FROM_CLASS(g_class)                              (((GTypeClass*) (g_class))-&gt;g_type)</programlisting><para>Returns the type identifier from a given <parameter>class</parameter> structure.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>g_class</parameter>&nbsp;:</entry><entry>Location of a valid <link linkend="GTypeClass">GTypeClass</link> structure.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-FROM-INTERFACE-CAPS">G_TYPE_FROM_INTERFACE()</title><programlisting>#define G_TYPE_FROM_INTERFACE(g_iface)                          (((GTypeInterface*) (g_iface))-&gt;g_type)</programlisting><para>Returns the type identifier from a given <parameter>interface</parameter> structure.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>g_iface</parameter>&nbsp;:</entry><entry>Location of a valid <link linkend="GTypeInterface">GTypeInterface</link> structure.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-INSTANCE-GET-CLASS-CAPS">G_TYPE_INSTANCE_GET_CLASS()</title><programlisting>#define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type)     (_G_TYPE_IGC ((instance), (g_type), c_type))</programlisting><para>Returns the class structure of a given <parameter>instance</parameter>, castedto a specified anchestor type <parameter>g_type</parameter> of the instance.</para><informaltable pgwide="1" frame="none" role="params"><tgroup cols="2"><colspec colwidth="2*"><colspec colwidth="8*"><tbody><row><entry align="right"><parameter>instance</parameter>&nbsp;:</entry><entry>	Location of the <link linkend="GTypeInstance">GTypeInstance</link> structure.</entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry>	The anchestor type of the class to be returned.</entry></row><row><entry align="right"><parameter>c_type</parameter>&nbsp;:</entry><entry>	The corresponding C type of <parameter>g_Type</parameter>.</entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-INSTANCE-GET-INTERFACE-CAPS">G_TYPE_INSTANCE_GET_INTERFACE()</title><programlisting>#define G_TYPE_INSTANCE_GET_INTERFACE(instance, g_type, c_type) (_G_TYPE_IGI ((instance), (g_type), c_type))</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>instance</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>c_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-INSTANCE-CAPS">G_TYPE_CHECK_INSTANCE()</title><programlisting>#define G_TYPE_CHECK_INSTANCE(instance)				(_G_TYPE_CHI ((GTypeInstance*) (instance)))</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>instance</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-INSTANCE-CAST-CAPS">G_TYPE_CHECK_INSTANCE_CAST()</title><programlisting>#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type)    (_G_TYPE_CIC ((instance), (g_type), c_type))</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>instance</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>c_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-INSTANCE-TYPE-CAPS">G_TYPE_CHECK_INSTANCE_TYPE()</title><programlisting>#define G_TYPE_CHECK_INSTANCE_TYPE(instance, g_type)            (_G_TYPE_CIT ((instance), (g_type)))</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>instance</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-CLASS-CAST-CAPS">G_TYPE_CHECK_CLASS_CAST()</title><programlisting>#define G_TYPE_CHECK_CLASS_CAST(g_class, g_type, c_type)        (_G_TYPE_CCC ((g_class), (g_type), c_type))</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>g_class</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>c_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-CLASS-TYPE-CAPS">G_TYPE_CHECK_CLASS_TYPE()</title><programlisting>#define G_TYPE_CHECK_CLASS_TYPE(g_class, g_type)                (_G_TYPE_CCT ((g_class), (g_type)))</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>g_class</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-VALUE-CAPS">G_TYPE_CHECK_VALUE()</title><programlisting>#define G_TYPE_CHECK_VALUE(value)				(_G_TYPE_CHV ((value)))</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>value</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-CHECK-VALUE-TYPE-CAPS">G_TYPE_CHECK_VALUE_TYPE()</title><programlisting>#define G_TYPE_CHECK_VALUE_TYPE(value, g_type)			(_G_TYPE_CVH ((value), (g_type)))</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>value</parameter>&nbsp;:</entry><entry></entry></row><row><entry align="right"><parameter>g_type</parameter>&nbsp;:</entry><entry></entry></row></tbody></tgroup></informaltable></refsect2><refsect2><title><anchor id="G-TYPE-FLAG-RESERVED-ID-BIT-CAPS">G_TYPE_FLAG_RESERVED_ID_BIT</title><programlisting>#define	G_TYPE_FLAG_RESERVED_ID_BIT	((GType) (1 &lt;&lt; 0))</programlisting><para></para></refsect2><refsect2><title><anchor id="g-type-init">g_type_init ()</title><programlisting>void        g_type_init                     (void);</programlisting><para>Prior to any use of the type system, <link linkend="g-type-init">g_type_init</link>() has to be called to initializethe type system and assorted other code portions (such as the various fundamentaltype implementations or the signal system).</para></refsect2><refsect2><title><anchor id="GTypeDebugFlags">enum GTypeDebugFlags</title><programlisting>typedef enum	/*&lt; skip &gt;*/{  G_TYPE_DEBUG_NONE	= 0,  G_TYPE_DEBUG_OBJECTS	= 1 &lt;&lt; 0,  G_TYPE_DEBUG_SIGNALS	= 1 &lt;&lt; 1,  G_TYPE_DEBUG_MASK	= 0x03} GTypeDebugFlags;</programlisting>

⌨️ 快捷键说明

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