summaryrefslogtreecommitdiff
path: root/tests/scanner/annotationparser/gi/syntax_nested_tags.xml
blob: 11b5a674b31ef77b7d958ed746fc0c7e5c28e6cf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
<?xml version="1.0" encoding="UTF-8"?>

<tests xmlns="http://schemas.gnome.org/gobject-introspection/2013/test">

<test>
  <!--
  Well, not really nested tags as the Since: 2.30 is considered to be part of the
  description of the @G_APPLICATION_NON_UNIQUE parameter.
  -->
  <input>/**
 * GApplicationFlags:
 * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical
 *     single-instance application negotiation, even if the application
 *     ID is given.  The application neither attempts to become the
 *     owner of the application ID nor does it check if an existing
 *     owner already exists.  Everything occurs in the local process.
 *     Since: 2.30.
 *
 * Flags used to define the behaviour of a #GApplication.
 *
 * Since: 2.28
 **/</input>
  <parser>
    <docblock>
      <identifier>
        <name>GApplicationFlags</name>
      </identifier>
      <parameters>
        <parameter>
          <name>G_APPLICATION_NON_UNIQUE</name>
          <description>Make no attempts to do any of the typical
    single-instance application negotiation, even if the application
    ID is given.  The application neither attempts to become the
    owner of the application ID nor does it check if an existing
    owner already exists.  Everything occurs in the local process.
    Since: 2.30.</description>
        </parameter>
      </parameters>
      <description>Flags used to define the behaviour of a #GApplication.</description>
      <tags>
        <tag>
          <name>since</name>
          <value>2.28</value>
        </tag>
      </tags>
    </docblock>
  </parser>
  <output>/**
 * GApplicationFlags:
 * @G_APPLICATION_NON_UNIQUE: Make no attempts to do any of the typical
 *     single-instance application negotiation, even if the application
 *     ID is given.  The application neither attempts to become the
 *     owner of the application ID nor does it check if an existing
 *     owner already exists.  Everything occurs in the local process.
 *     Since: 2.30.
 *
 * Flags used to define the behaviour of a #GApplication.
 *
 * Since: 2.28
 */</output>
</test>

<test>
  <input><![CDATA[/**
 * GSourceFuncs:
 * @prepare: Called before all the file descriptors are polled. If the
 *     source can determine that it is ready here (without waiting for the
 *     results of the poll() call) it should return %TRUE. It can also return
 *     a @timeout_ value which should be the maximum timeout (in milliseconds)
 *     which should be passed to the poll() call. The actual timeout used will
 *     be -1 if all sources returned -1, or it will be the minimum of all the
 *     @timeout_ values returned which were >= 0.  Since 2.36 this may
 *     be %NULL, in which case the effect is as if the function always
 *     returns %FALSE with a timeout of -1.  If @prepare returns a
 *     timeout and the source also has a 'ready time' set then the
 *     nearer of the two will be used.
 * @check: Called after all the file descriptors are polled. The source
 *     should return %TRUE if it is ready to be dispatched. Note that some
 *     time may have passed since the previous prepare function was called,
 *     so the source should be checked again here.  Since 2.36 this may
 *     be %NULL, in which case the effect is as if the function always
 *     returns %FALSE.
 * @dispatch: Called to dispatch the event source, after it has returned
 *     %TRUE in either its @prepare or its @check function. The @dispatch
 *     function is passed in a callback function and data. The callback
 *     function may be %NULL if the source was never connected to a callback
 *     using g_source_set_callback(). The @dispatch function should call the
 *     callback function with @user_data and whatever additional parameters
 *     are needed for this type of event source.
 * @finalize: Called when the source is finalized.
 *
 * The <structname>GSourceFuncs</structname> struct contains a table of
 * functions used to handle event sources in a generic manner.
 *
 * For idle sources, the prepare and check functions always return %TRUE
 * to indicate that the source is always ready to be processed. The prepare
 * function also returns a timeout value of 0 to ensure that the poll() call
 * doesn't block (since that would be time wasted which could have been spent
 * running the idle function).
 *
 * For timeout sources, the prepare and check functions both return %TRUE
 * if the timeout interval has expired. The prepare function also returns
 * a timeout value to ensure that the poll() call doesn't block too long
 * and miss the next timeout.
 *
 * For file descriptor sources, the prepare function typically returns %FALSE,
 * since it must wait until poll() has been called before it knows whether
 * any events need to be processed. It sets the returned timeout to -1 to
 * indicate that it doesn't mind how long the poll() call blocks. In the
 * check function, it tests the results of the poll() call to see if the
 * required condition has been met, and returns %TRUE if so.
 */]]></input>
  <parser>
    <docblock>
      <identifier>
        <name>GSourceFuncs</name>
      </identifier>
      <parameters>
        <parameter>
          <name>prepare</name>
          <description>Called before all the file descriptors are polled. If the
    source can determine that it is ready here (without waiting for the
    results of the poll() call) it should return %TRUE. It can also return
    a @timeout_ value which should be the maximum timeout (in milliseconds)
    which should be passed to the poll() call. The actual timeout used will
    be -1 if all sources returned -1, or it will be the minimum of all the
    @timeout_ values returned which were >= 0.  Since 2.36 this may
    be %NULL, in which case the effect is as if the function always
    returns %FALSE with a timeout of -1.  If @prepare returns a
    timeout and the source also has a 'ready time' set then the
    nearer of the two will be used.</description>
        </parameter>
        <parameter>
          <name>check</name>
          <description>Called after all the file descriptors are polled. The source
    should return %TRUE if it is ready to be dispatched. Note that some
    time may have passed since the previous prepare function was called,
    so the source should be checked again here.  Since 2.36 this may
    be %NULL, in which case the effect is as if the function always
    returns %FALSE.</description>
        </parameter>
        <parameter>
          <name>dispatch</name>
          <description>Called to dispatch the event source, after it has returned
    %TRUE in either its @prepare or its @check function. The @dispatch
    function is passed in a callback function and data. The callback
    function may be %NULL if the source was never connected to a callback
    using g_source_set_callback(). The @dispatch function should call the
    callback function with @user_data and whatever additional parameters
    are needed for this type of event source.</description>
        </parameter>
        <parameter>
          <name>finalize</name>
          <description>Called when the source is finalized.</description>
        </parameter>
      </parameters>
      <description><![CDATA[The <structname>GSourceFuncs</structname> struct contains a table of
functions used to handle event sources in a generic manner.

For idle sources, the prepare and check functions always return %TRUE
to indicate that the source is always ready to be processed. The prepare
function also returns a timeout value of 0 to ensure that the poll() call
doesn't block (since that would be time wasted which could have been spent
running the idle function).

For timeout sources, the prepare and check functions both return %TRUE
if the timeout interval has expired. The prepare function also returns
a timeout value to ensure that the poll() call doesn't block too long
and miss the next timeout.

For file descriptor sources, the prepare function typically returns %FALSE,
since it must wait until poll() has been called before it knows whether
any events need to be processed. It sets the returned timeout to -1 to
indicate that it doesn't mind how long the poll() call blocks. In the
check function, it tests the results of the poll() call to see if the
required condition has been met, and returns %TRUE if so.]]></description>
    </docblock>
  </parser>
  <output><![CDATA[/**
 * GSourceFuncs:
 * @prepare: Called before all the file descriptors are polled. If the
 *     source can determine that it is ready here (without waiting for the
 *     results of the poll() call) it should return %TRUE. It can also return
 *     a @timeout_ value which should be the maximum timeout (in milliseconds)
 *     which should be passed to the poll() call. The actual timeout used will
 *     be -1 if all sources returned -1, or it will be the minimum of all the
 *     @timeout_ values returned which were >= 0.  Since 2.36 this may
 *     be %NULL, in which case the effect is as if the function always
 *     returns %FALSE with a timeout of -1.  If @prepare returns a
 *     timeout and the source also has a 'ready time' set then the
 *     nearer of the two will be used.
 * @check: Called after all the file descriptors are polled. The source
 *     should return %TRUE if it is ready to be dispatched. Note that some
 *     time may have passed since the previous prepare function was called,
 *     so the source should be checked again here.  Since 2.36 this may
 *     be %NULL, in which case the effect is as if the function always
 *     returns %FALSE.
 * @dispatch: Called to dispatch the event source, after it has returned
 *     %TRUE in either its @prepare or its @check function. The @dispatch
 *     function is passed in a callback function and data. The callback
 *     function may be %NULL if the source was never connected to a callback
 *     using g_source_set_callback(). The @dispatch function should call the
 *     callback function with @user_data and whatever additional parameters
 *     are needed for this type of event source.
 * @finalize: Called when the source is finalized.
 *
 * The <structname>GSourceFuncs</structname> struct contains a table of
 * functions used to handle event sources in a generic manner.
 *
 * For idle sources, the prepare and check functions always return %TRUE
 * to indicate that the source is always ready to be processed. The prepare
 * function also returns a timeout value of 0 to ensure that the poll() call
 * doesn't block (since that would be time wasted which could have been spent
 * running the idle function).
 *
 * For timeout sources, the prepare and check functions both return %TRUE
 * if the timeout interval has expired. The prepare function also returns
 * a timeout value to ensure that the poll() call doesn't block too long
 * and miss the next timeout.
 *
 * For file descriptor sources, the prepare function typically returns %FALSE,
 * since it must wait until poll() has been called before it knows whether
 * any events need to be processed. It sets the returned timeout to -1 to
 * indicate that it doesn't mind how long the poll() call blocks. In the
 * check function, it tests the results of the poll() call to see if the
 * required condition has been met, and returns %TRUE if so.
 */]]></output>
</test>

</tests>