re36.html 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <title>&lt;%GLibMarkupCollectType&gt;: </title>
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.2">
  7. <link rel="home" href="index.html" title="">
  8. <link rel="up" href="ch01.html" title="GLib">
  9. <link rel="prev" href="re35.html" title="&lt;GMappedFile&gt;">
  10. <link rel="next" href="re37.html" title="&lt;%GLibMarkupError&gt;">
  11. <meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
  12. <link rel="stylesheet" href="style.css" type="text/css">
  13. </head>
  14. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  15. <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
  16. <td width="100%" align="left" class="shortcuts"></td>
  17. <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
  18. <td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
  19. <td><a accesskey="p" href="re35.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
  20. <td><a accesskey="n" href="re37.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
  21. </tr></table>
  22. <div class="refentry">
  23. <a name="id-1.1.37"></a><div class="titlepage"></div>
  24. <div class="refnamediv">
  25. <h2>&lt;%GLibMarkupCollectType&gt;</h2>
  26. <p>&lt;%GLibMarkupCollectType&gt;</p>
  27. </div>
  28. <div class="refsect1">
  29. <a name="id-1.1.37.2"></a><h2>Description</h2>
  30. <p>A mixed enumerated type and flags field. You must specify one type
  31. (string, strdup, boolean, tristate). Additionally, you may optionally
  32. bitwise OR the type with the flag <code class="constant">G_MARKUP_COLLECT_OPTIONAL</code>.
  33. </p>
  34. <p>It is likely that this enum will be extended in the future to
  35. support other types.</p>
  36. </div>
  37. <div class="refsect1">
  38. <a name="id-1.1.37.3"></a><h2>Members</h2>
  39. <div class="refsect2">
  40. <a name="id-1.1.37.3.2"></a><h3>invalid</h3>
  41. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_INVALID</code></span></em></p>
  42. <p>used to terminate the list of attributes
  43. to collect</p>
  44. </div>
  45. <div class="refsect2">
  46. <a name="id-1.1.37.3.3"></a><h3>string</h3>
  47. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_STRING</code></span></em></p>
  48. <p>collect the string pointer directly from
  49. the attribute_values[] array. Expects a parameter of type (const
  50. char **). If <code class="constant">G_MARKUP_COLLECT_OPTIONAL</code> is specified and the
  51. attribute isn't present then the pointer will be set to <code class="constant">NULL</code></p>
  52. </div>
  53. <div class="refsect2">
  54. <a name="id-1.1.37.3.4"></a><h3>strdup</h3>
  55. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_STRDUP</code></span></em></p>
  56. <p>as with <code class="constant">G_MARKUP_COLLECT_STRING</code>, but
  57. expects a parameter of type (char **) and <code class="function">g_strdup()</code>s the
  58. returned pointer. The pointer must be freed with <code class="function">g_free()</code></p>
  59. </div>
  60. <div class="refsect2">
  61. <a name="id-1.1.37.3.5"></a><h3>boolean</h3>
  62. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_BOOLEAN</code></span></em></p>
  63. <p>expects a parameter of type (gboolean *)
  64. and parses the attribute value as a boolean. Sets <code class="constant">FALSE</code> if the
  65. attribute isn't present. Valid boolean values consist of
  66. (case-insensitive) "false", "f", "no", "n", "0" and "true", "t",
  67. "yes", "y", "1"</p>
  68. </div>
  69. <div class="refsect2">
  70. <a name="id-1.1.37.3.6"></a><h3>tristate</h3>
  71. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_TRISTATE</code></span></em></p>
  72. <p>as with <code class="constant">G_MARKUP_COLLECT_BOOLEAN</code>, but
  73. in the case of a missing attribute a value is set that compares
  74. equal to neither <code class="constant">FALSE</code> nor <code class="constant">TRUE</code> G_MARKUP_COLLECT_OPTIONAL is
  75. implied</p>
  76. </div>
  77. <div class="refsect2">
  78. <a name="id-1.1.37.3.7"></a><h3>optional</h3>
  79. <p class="remark"><em><span class="remark">alias <code class="code">G_MARKUP_COLLECT_OPTIONAL</code></span></em></p>
  80. <p>can be bitwise ORed with the other fields.
  81. If present, allows the attribute not to appear. A default value
  82. is set depending on what value type is used</p>
  83. </div>
  84. </div>
  85. </div>
  86. <div class="footer">
  87. <hr>Generated by GTK-Doc V1.33.1</div>
  88. </body>
  89. </html>