re44.html 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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;%GLibOptionArg&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="re43.html" title="&lt;%GLibOnceStatus&gt;">
  10. <link rel="next" href="re45.html" title="&lt;%GLibOptionError&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="re43.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
  20. <td><a accesskey="n" href="re45.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.45"></a><div class="titlepage"></div>
  24. <div class="refnamediv">
  25. <h2>&lt;%GLibOptionArg&gt;</h2>
  26. <p>&lt;%GLibOptionArg&gt;</p>
  27. </div>
  28. <div class="refsect1">
  29. <a name="id-1.1.45.2"></a><h2>Description</h2>
  30. <p>The <span class="type">GOptionArg</span> enum values determine which type of extra argument the
  31. options expect to find. If an option expects an extra argument, it can
  32. be specified in several ways; with a short option: <code class="code">-x arg</code>, with a long
  33. option: <code class="code">--name arg</code> or combined in a single argument: <code class="code">--name=arg</code>.</p>
  34. </div>
  35. <div class="refsect1">
  36. <a name="id-1.1.45.3"></a><h2>Members</h2>
  37. <div class="refsect2">
  38. <a name="id-1.1.45.3.2"></a><h3>none</h3>
  39. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_NONE</code></span></em></p>
  40. <p>No extra argument. This is useful for simple flags.</p>
  41. </div>
  42. <div class="refsect2">
  43. <a name="id-1.1.45.3.3"></a><h3>string</h3>
  44. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_STRING</code></span></em></p>
  45. <p>The option takes a UTF-8 string argument.</p>
  46. </div>
  47. <div class="refsect2">
  48. <a name="id-1.1.45.3.4"></a><h3>int</h3>
  49. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_INT</code></span></em></p>
  50. <p>The option takes an integer argument.</p>
  51. </div>
  52. <div class="refsect2">
  53. <a name="id-1.1.45.3.5"></a><h3>callback</h3>
  54. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_CALLBACK</code></span></em></p>
  55. <p>The option provides a callback (of type
  56. <span class="type">GOptionArgFunc</span>) to parse the extra argument.</p>
  57. </div>
  58. <div class="refsect2">
  59. <a name="id-1.1.45.3.6"></a><h3>filename</h3>
  60. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_FILENAME</code></span></em></p>
  61. <p>The option takes a filename as argument, which will
  62. be in the GLib filename encoding rather than UTF-8.</p>
  63. </div>
  64. <div class="refsect2">
  65. <a name="id-1.1.45.3.7"></a><h3>string-array</h3>
  66. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_STRING_ARRAY</code></span></em></p>
  67. <p>The option takes a string argument, multiple
  68. uses of the option are collected into an array of strings.</p>
  69. </div>
  70. <div class="refsect2">
  71. <a name="id-1.1.45.3.8"></a><h3>filename-array</h3>
  72. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_FILENAME_ARRAY</code></span></em></p>
  73. <p>The option takes a filename as argument,
  74. multiple uses of the option are collected into an array of strings.</p>
  75. </div>
  76. <div class="refsect2">
  77. <a name="id-1.1.45.3.9"></a><h3>double</h3>
  78. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_DOUBLE</code></span></em></p>
  79. <p>The option takes a double argument. The argument
  80. can be formatted either for the user's locale or for the "C" locale.
  81. Since 2.12</p>
  82. </div>
  83. <div class="refsect2">
  84. <a name="id-1.1.45.3.10"></a><h3>int64</h3>
  85. <p class="remark"><em><span class="remark">alias <code class="code">G_OPTION_ARG_INT64</code></span></em></p>
  86. <p>The option takes a 64-bit integer. Like
  87. <code class="constant">G_OPTION_ARG_INT</code> but for larger numbers. The number can be in
  88. decimal base, or in hexadecimal (when prefixed with <code class="code">0x</code>, for
  89. example, <code class="code">0xffffffff</code>). Since 2.12</p>
  90. </div>
  91. </div>
  92. </div>
  93. <div class="footer">
  94. <hr>Generated by GTK-Doc V1.33.1</div>
  95. </body>
  96. </html>