~ubuntu-branches/ubuntu/utopic/glib2.0/utopic

« back to all changes in this revision

Viewing changes to docs/reference/glib/html/glib-Standard-Macros.html

Tags: upstream-2.12.12
ImportĀ upstreamĀ versionĀ 2.12.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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=US-ASCII">
 
5
<title>Standard Macros</title>
 
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
 
7
<link rel="start" href="index.html" title="GLib Reference Manual">
 
8
<link rel="up" href="glib-fundamentals.html" title="GLib Fundamentals">
 
9
<link rel="prev" href="glib-Limits-of-Basic-Types.html" title="Limits of Basic Types">
 
10
<link rel="next" href="glib-Type-Conversion-Macros.html" title="Type Conversion Macros">
 
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
 
12
<link rel="stylesheet" href="style.css" type="text/css">
 
13
<link rel="chapter" href="glib.html" title="GLib Overview">
 
14
<link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
 
15
<link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
 
16
<link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
 
17
<link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
 
18
<link rel="chapter" href="tools.html" title="GLib Tools">
 
19
<link rel="index" href="ix01.html" title="Index">
 
20
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
 
21
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
 
22
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
 
23
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
 
24
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
 
25
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
 
26
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
 
27
</head>
 
28
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 
29
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
 
30
<tr valign="middle">
 
31
<td><a accesskey="p" href="glib-Limits-of-Basic-Types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
 
32
<td><a accesskey="u" href="glib-fundamentals.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
 
33
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
 
34
<th width="100%" align="center">GLib Reference Manual</th>
 
35
<td><a accesskey="n" href="glib-Type-Conversion-Macros.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
 
36
</tr>
 
37
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2697165" class="shortcut">Top</a>
 
38
                  &#160;|&#160;
 
39
                  <a href="#id2697347" class="shortcut">Description</a></nobr></td></tr>
 
40
</table>
 
41
<div class="refentry" lang="en">
 
42
<a name="glib-Standard-Macros"></a><div class="titlepage"></div>
 
43
<div class="refnamediv"><table width="100%"><tr>
 
44
<td valign="top">
 
45
<h2>
 
46
<a name="id2697165"></a><span class="refentrytitle">Standard Macros</span>
 
47
</h2>
 
48
<p>Standard Macros &#8212; commonly-used macros.</p>
 
49
</td>
 
50
<td valign="top" align="right"></td>
 
51
</tr></table></div>
 
52
<div class="refsynopsisdiv">
 
53
<h2>Synopsis</h2>
 
54
<pre class="synopsis">
 
55
 
 
56
#include &lt;glib.h&gt;
 
57
 
 
58
 
 
59
 
 
60
#define             <a href="glib-Standard-Macros.html#G-OS-WIN32:CAPS">G_OS_WIN32</a>
 
61
#define             <a href="glib-Standard-Macros.html#G-OS-BEOS:CAPS">G_OS_BEOS</a>
 
62
#define             <a href="glib-Standard-Macros.html#G-OS-UNIX:CAPS">G_OS_UNIX</a>
 
63
 
 
64
#define             <a href="glib-Standard-Macros.html#G-DIR-SEPARATOR:CAPS">G_DIR_SEPARATOR</a>
 
65
#define             <a href="glib-Standard-Macros.html#G-DIR-SEPARATOR-S:CAPS">G_DIR_SEPARATOR_S</a>
 
66
#define             <a href="glib-Standard-Macros.html#G-IS-DIR-SEPARATOR:CAPS">G_IS_DIR_SEPARATOR</a>                  (c)
 
67
#define             <a href="glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR:CAPS">G_SEARCHPATH_SEPARATOR</a>
 
68
#define             <a href="glib-Standard-Macros.html#G-SEARCHPATH-SEPARATOR-S:CAPS">G_SEARCHPATH_SEPARATOR_S</a>
 
69
 
 
70
#define             <a href="glib-Standard-Macros.html#TRUE:CAPS">TRUE</a>
 
71
#define             <a href="glib-Standard-Macros.html#FALSE:CAPS">FALSE</a>
 
72
 
 
73
#define             <a href="glib-Standard-Macros.html#NULL:CAPS">NULL</a>
 
74
 
 
75
#define             <a href="glib-Standard-Macros.html#MIN:CAPS">MIN</a>                                 (a, b)
 
76
#define             <a href="glib-Standard-Macros.html#MAX:CAPS">MAX</a>                                 (a, b)
 
77
 
 
78
#define             <a href="glib-Standard-Macros.html#ABS:CAPS">ABS</a>                                 (a)
 
79
#define             <a href="glib-Standard-Macros.html#CLAMP:CAPS">CLAMP</a>                               (x, low, high)
 
80
 
 
81
#define             <a href="glib-Standard-Macros.html#G-STRUCT-MEMBER:CAPS">G_STRUCT_MEMBER</a>                     (member_type, struct_p, struct_offset)
 
82
#define             <a href="glib-Standard-Macros.html#G-STRUCT-MEMBER-P:CAPS">G_STRUCT_MEMBER_P</a>                   (struct_p, struct_offset)
 
83
#define             <a href="glib-Standard-Macros.html#G-STRUCT-OFFSET:CAPS">G_STRUCT_OFFSET</a>                     (struct_type, member)
 
84
 
 
85
#define             <a href="glib-Standard-Macros.html#G-MEM-ALIGN:CAPS">G_MEM_ALIGN</a>
 
86
 
 
87
#define             <a href="glib-Standard-Macros.html#G-CONST-RETURN:CAPS">G_CONST_RETURN</a>
 
88
</pre>
 
89
</div>
 
90
<div class="refsect1" lang="en">
 
91
<a name="id2697347"></a><h2>Description</h2>
 
92
<p>
 
93
These macros provide a few commonly-used features.
 
94
</p>
 
95
</div>
 
96
<div class="refsect1" lang="en">
 
97
<a name="id2697362"></a><h2>Details</h2>
 
98
<div class="refsect2" lang="en">
 
99
<a name="id2697373"></a><h3>
 
100
<a name="G-OS-WIN32:CAPS"></a>G_OS_WIN32</h3>
 
101
<a class="indexterm" name="id2697385"></a><pre class="programlisting">#define G_OS_WIN32
 
102
</pre>
 
103
<p>
 
104
This macro is defined only on Windows. So you can bracket
 
105
Windows-specific code in "#ifdef G_OS_WIN32".
 
106
</p>
 
107
</div>
 
108
<hr>
 
109
<div class="refsect2" lang="en">
 
110
<a name="id2697408"></a><h3>
 
111
<a name="G-OS-BEOS:CAPS"></a>G_OS_BEOS</h3>
 
112
<a class="indexterm" name="id2697415"></a><pre class="programlisting">#define G_OS_BEOS
 
113
</pre>
 
114
<p>
 
115
This macro is defined only on BeOS. So you can bracket
 
116
BeOS-specific code in "#ifdef G_OS_BEOS".
 
117
</p>
 
118
</div>
 
119
<hr>
 
120
<div class="refsect2" lang="en">
 
121
<a name="id2697428"></a><h3>
 
122
<a name="G-OS-UNIX:CAPS"></a>G_OS_UNIX</h3>
 
123
<a class="indexterm" name="id2697444"></a><pre class="programlisting">#define G_OS_UNIX
 
124
</pre>
 
125
<p>
 
126
This macro is defined only on UNIX. So you can bracket
 
127
UNIX-specific code in "#ifdef G_OS_UNIX".
 
128
</p>
 
129
</div>
 
130
<hr>
 
131
<div class="refsect2" lang="en">
 
132
<a name="id2697461"></a><h3>
 
133
<a name="G-DIR-SEPARATOR:CAPS"></a>G_DIR_SEPARATOR</h3>
 
134
<a class="indexterm" name="id2697477"></a><pre class="programlisting">#define             G_DIR_SEPARATOR</pre>
 
135
<p>
 
136
The directory separator character.
 
137
This is '/' on UNIX machines and '\' under Windows.
 
138
</p>
 
139
</div>
 
140
<hr>
 
141
<div class="refsect2" lang="en">
 
142
<a name="id2697494"></a><h3>
 
143
<a name="G-DIR-SEPARATOR-S:CAPS"></a>G_DIR_SEPARATOR_S</h3>
 
144
<a class="indexterm" name="id2697506"></a><pre class="programlisting">#define             G_DIR_SEPARATOR_S</pre>
 
145
<p>
 
146
The directory separator as a string.
 
147
This is "/" on UNIX machines and "\" under Windows.
 
148
</p>
 
149
</div>
 
150
<hr>
 
151
<div class="refsect2" lang="en">
 
152
<a name="id2697522"></a><h3>
 
153
<a name="G-IS-DIR-SEPARATOR:CAPS"></a>G_IS_DIR_SEPARATOR()</h3>
 
154
<a class="indexterm" name="id2697537"></a><pre class="programlisting">#define             G_IS_DIR_SEPARATOR(c)</pre>
 
155
<p>
 
156
Checks whether a character is a directory 
 
157
separator. It returns <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for '/' on UNIX
 
158
machines and for '\' or '/' under Windows.
 
159
</p>
 
160
<div class="variablelist"><table border="0">
 
161
<col align="left" valign="top">
 
162
<tbody><tr>
 
163
<td><span class="term"><em class="parameter"><code>c</code></em>&#160;:</span></td>
 
164
<td>a character
 
165
</td>
 
166
</tr></tbody>
 
167
</table></div>
 
168
<p class="since">Since 2.6
 
169
 
 
170
 
 
171
</p>
 
172
</div>
 
173
<hr>
 
174
<div class="refsect2" lang="en">
 
175
<a name="id2697590"></a><h3>
 
176
<a name="G-SEARCHPATH-SEPARATOR:CAPS"></a>G_SEARCHPATH_SEPARATOR</h3>
 
177
<a class="indexterm" name="id2697603"></a><pre class="programlisting">#define             G_SEARCHPATH_SEPARATOR</pre>
 
178
<p>
 
179
The search path separator character.
 
180
This is ':' on UNIX machines and ';' under Windows.
 
181
</p>
 
182
</div>
 
183
<hr>
 
184
<div class="refsect2" lang="en">
 
185
<a name="id2697619"></a><h3>
 
186
<a name="G-SEARCHPATH-SEPARATOR-S:CAPS"></a>G_SEARCHPATH_SEPARATOR_S</h3>
 
187
<a class="indexterm" name="id2697634"></a><pre class="programlisting">#define             G_SEARCHPATH_SEPARATOR_S</pre>
 
188
<p>
 
189
The search path separator as a string.
 
190
This is ":" on UNIX machines and ";" under Windows.
 
191
</p>
 
192
</div>
 
193
<hr>
 
194
<div class="refsect2" lang="en">
 
195
<a name="id2697651"></a><h3>
 
196
<a name="TRUE:CAPS"></a>TRUE</h3>
 
197
<a class="indexterm" name="id2697663"></a><pre class="programlisting">#define   TRUE    (!FALSE)
 
198
</pre>
 
199
<p>
 
200
Defines the <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> value for the <a href="glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> type.
 
201
</p>
 
202
</div>
 
203
<hr>
 
204
<div class="refsect2" lang="en">
 
205
<a name="id2697697"></a><h3>
 
206
<a name="FALSE:CAPS"></a>FALSE</h3>
 
207
<a class="indexterm" name="id2697709"></a><pre class="programlisting">#define   FALSE   (0)
 
208
</pre>
 
209
<p>
 
210
Defines the <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> value for the <a href="glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> type.
 
211
</p>
 
212
</div>
 
213
<hr>
 
214
<div class="refsect2" lang="en">
 
215
<a name="id2697743"></a><h3>
 
216
<a name="NULL:CAPS"></a>NULL</h3>
 
217
<a class="indexterm" name="id2697755"></a><pre class="programlisting">#define             NULL</pre>
 
218
<p>
 
219
Defines the standard <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> pointer.
 
220
</p>
 
221
</div>
 
222
<hr>
 
223
<div class="refsect2" lang="en">
 
224
<a name="id2697781"></a><h3>
 
225
<a name="MIN:CAPS"></a>MIN()</h3>
 
226
<a class="indexterm" name="id2697794"></a><pre class="programlisting">#define MIN(a, b)  (((a) &lt; (b)) ? (a) : (b))
 
227
</pre>
 
228
<p>
 
229
Calculates the minimum of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
 
230
</p>
 
231
<div class="variablelist"><table border="0">
 
232
<col align="left" valign="top">
 
233
<tbody>
 
234
<tr>
 
235
<td><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
 
236
<td>a numeric value.
 
237
</td>
 
238
</tr>
 
239
<tr>
 
240
<td><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
 
241
<td>a numeric value.
 
242
</td>
 
243
</tr>
 
244
<tr>
 
245
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
246
<td>the minimum of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
 
247
 
 
248
 
 
249
</td>
 
250
</tr>
 
251
</tbody>
 
252
</table></div>
 
253
</div>
 
254
<hr>
 
255
<div class="refsect2" lang="en">
 
256
<a name="id2697874"></a><h3>
 
257
<a name="MAX:CAPS"></a>MAX()</h3>
 
258
<a class="indexterm" name="id2697886"></a><pre class="programlisting">#define MAX(a, b)  (((a) &gt; (b)) ? (a) : (b))
 
259
</pre>
 
260
<p>
 
261
Calculates the maximum of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
 
262
</p>
 
263
<div class="variablelist"><table border="0">
 
264
<col align="left" valign="top">
 
265
<tbody>
 
266
<tr>
 
267
<td><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
 
268
<td>a numeric value.
 
269
</td>
 
270
</tr>
 
271
<tr>
 
272
<td><span class="term"><em class="parameter"><code>b</code></em>&#160;:</span></td>
 
273
<td>a numeric value.
 
274
</td>
 
275
</tr>
 
276
<tr>
 
277
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
278
<td>the maximum of <em class="parameter"><code>a</code></em> and <em class="parameter"><code>b</code></em>.
 
279
 
 
280
 
 
281
</td>
 
282
</tr>
 
283
</tbody>
 
284
</table></div>
 
285
</div>
 
286
<hr>
 
287
<div class="refsect2" lang="en">
 
288
<a name="id2697966"></a><h3>
 
289
<a name="ABS:CAPS"></a>ABS()</h3>
 
290
<a class="indexterm" name="id2697978"></a><pre class="programlisting">#define ABS(a)       (((a) &lt; 0) ? -(a) : (a))
 
291
</pre>
 
292
<p>
 
293
Calculates the absolute value of <em class="parameter"><code>a</code></em>.
 
294
The absolute value is simply the number with any negative sign taken away.
 
295
</p>
 
296
<p>
 
297
For example,
 
298
</p>
 
299
<div class="itemizedlist"><ul type="disc">
 
300
<li><p>
 
301
ABS(-10) is 10.
 
302
</p></li>
 
303
<li><p>
 
304
ABS(10) is also 10.
 
305
</p></li>
 
306
</ul></div>
 
307
<p>
 
308
</p>
 
309
<div class="variablelist"><table border="0">
 
310
<col align="left" valign="top">
 
311
<tbody>
 
312
<tr>
 
313
<td><span class="term"><em class="parameter"><code>a</code></em>&#160;:</span></td>
 
314
<td>a numeric value.
 
315
</td>
 
316
</tr>
 
317
<tr>
 
318
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
319
<td>the absolute value of <em class="parameter"><code>a</code></em>.
 
320
 
 
321
 
 
322
</td>
 
323
</tr>
 
324
</tbody>
 
325
</table></div>
 
326
</div>
 
327
<hr>
 
328
<div class="refsect2" lang="en">
 
329
<a name="id2698052"></a><h3>
 
330
<a name="CLAMP:CAPS"></a>CLAMP()</h3>
 
331
<a class="indexterm" name="id2698064"></a><pre class="programlisting">#define CLAMP(x, low, high)  (((x) &gt; (high)) ? (high) : (((x) &lt; (low)) ? (low) : (x)))
 
332
</pre>
 
333
<p>
 
334
Ensures that <em class="parameter"><code>x</code></em> is between the limits set by <em class="parameter"><code>low</code></em> and <em class="parameter"><code>high</code></em>.
 
335
</p>
 
336
<p>
 
337
For example,
 
338
</p>
 
339
<div class="itemizedlist"><ul type="disc">
 
340
<li><p>
 
341
CLAMP(5, 10, 15) is 10.
 
342
</p></li>
 
343
<li><p>
 
344
CLAMP(15, 5, 10) is 10.
 
345
</p></li>
 
346
<li><p>
 
347
CLAMP(20, 15, 25) is 20.
 
348
</p></li>
 
349
</ul></div>
 
350
<p>
 
351
</p>
 
352
<div class="variablelist"><table border="0">
 
353
<col align="left" valign="top">
 
354
<tbody>
 
355
<tr>
 
356
<td><span class="term"><em class="parameter"><code>x</code></em>&#160;:</span></td>
 
357
<td>the value to clamp.
 
358
</td>
 
359
</tr>
 
360
<tr>
 
361
<td><span class="term"><em class="parameter"><code>low</code></em>&#160;:</span></td>
 
362
<td>the minimum value allowed.
 
363
</td>
 
364
</tr>
 
365
<tr>
 
366
<td><span class="term"><em class="parameter"><code>high</code></em>&#160;:</span></td>
 
367
<td>the maximum value allowed.
 
368
</td>
 
369
</tr>
 
370
<tr>
 
371
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
372
<td>the value of <em class="parameter"><code>x</code></em> clamped to the range between <em class="parameter"><code>low</code></em> and <em class="parameter"><code>high</code></em>.
 
373
 
 
374
 
 
375
</td>
 
376
</tr>
 
377
</tbody>
 
378
</table></div>
 
379
</div>
 
380
<hr>
 
381
<div class="refsect2" lang="en">
 
382
<a name="id2698195"></a><h3>
 
383
<a name="G-STRUCT-MEMBER:CAPS"></a>G_STRUCT_MEMBER()</h3>
 
384
<a class="indexterm" name="id2698208"></a><pre class="programlisting">#define             G_STRUCT_MEMBER(member_type, struct_p, struct_offset)</pre>
 
385
<p>
 
386
Returns a member of a structure at a given offset, using the given type.
 
387
</p>
 
388
<div class="variablelist"><table border="0">
 
389
<col align="left" valign="top">
 
390
<tbody>
 
391
<tr>
 
392
<td><span class="term"><em class="parameter"><code>member_type</code></em>&#160;:</span></td>
 
393
<td>the type of the struct field.
 
394
</td>
 
395
</tr>
 
396
<tr>
 
397
<td><span class="term"><em class="parameter"><code>struct_p</code></em>&#160;:</span></td>
 
398
<td>a pointer to a struct.
 
399
</td>
 
400
</tr>
 
401
<tr>
 
402
<td><span class="term"><em class="parameter"><code>struct_offset</code></em>&#160;:</span></td>
 
403
<td>the offset of the field from the start of the struct, in bytes.
 
404
</td>
 
405
</tr>
 
406
<tr>
 
407
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
408
<td>the struct member.
 
409
 
 
410
 
 
411
</td>
 
412
</tr>
 
413
</tbody>
 
414
</table></div>
 
415
</div>
 
416
<hr>
 
417
<div class="refsect2" lang="en">
 
418
<a name="id2698283"></a><h3>
 
419
<a name="G-STRUCT-MEMBER-P:CAPS"></a>G_STRUCT_MEMBER_P()</h3>
 
420
<a class="indexterm" name="id2698296"></a><pre class="programlisting">#define             G_STRUCT_MEMBER_P(struct_p, struct_offset)</pre>
 
421
<p>
 
422
Returns an untyped pointer to a given offset of a struct.
 
423
</p>
 
424
<div class="variablelist"><table border="0">
 
425
<col align="left" valign="top">
 
426
<tbody>
 
427
<tr>
 
428
<td><span class="term"><em class="parameter"><code>struct_p</code></em>&#160;:</span></td>
 
429
<td>a pointer to a struct.
 
430
</td>
 
431
</tr>
 
432
<tr>
 
433
<td><span class="term"><em class="parameter"><code>struct_offset</code></em>&#160;:</span></td>
 
434
<td>the offset from the start of the struct, in bytes.
 
435
</td>
 
436
</tr>
 
437
<tr>
 
438
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
439
<td>an untyped pointer to <em class="parameter"><code>struct_p</code></em> plus <em class="parameter"><code>struct_offset</code></em> bytes.
 
440
 
 
441
 
 
442
</td>
 
443
</tr>
 
444
</tbody>
 
445
</table></div>
 
446
</div>
 
447
<hr>
 
448
<div class="refsect2" lang="en">
 
449
<a name="id2698369"></a><h3>
 
450
<a name="G-STRUCT-OFFSET:CAPS"></a>G_STRUCT_OFFSET()</h3>
 
451
<a class="indexterm" name="id2698382"></a><pre class="programlisting">#define             G_STRUCT_OFFSET(struct_type, member)</pre>
 
452
<p>
 
453
Returns the offset, in bytes, of a member of a struct.
 
454
</p>
 
455
<div class="variablelist"><table border="0">
 
456
<col align="left" valign="top">
 
457
<tbody>
 
458
<tr>
 
459
<td><span class="term"><em class="parameter"><code>struct_type</code></em>&#160;:</span></td>
 
460
<td>a structure type, e.g. <span class="structname">GtkWidget</span>.
 
461
</td>
 
462
</tr>
 
463
<tr>
 
464
<td><span class="term"><em class="parameter"><code>member</code></em>&#160;:</span></td>
 
465
<td>a field in the structure, e.g. <em class="structfield"><code>window</code></em>.
 
466
</td>
 
467
</tr>
 
468
<tr>
 
469
<td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td>
 
470
<td>the offset of <em class="parameter"><code>member</code></em> from the start of <em class="parameter"><code>struct_type</code></em>.
 
471
 
 
472
 
 
473
</td>
 
474
</tr>
 
475
</tbody>
 
476
</table></div>
 
477
</div>
 
478
<hr>
 
479
<div class="refsect2" lang="en">
 
480
<a name="id2698460"></a><h3>
 
481
<a name="G-MEM-ALIGN:CAPS"></a>G_MEM_ALIGN</h3>
 
482
<a class="indexterm" name="id2698473"></a><pre class="programlisting">#define             G_MEM_ALIGN</pre>
 
483
<p>
 
484
Indicates the number of bytes to which memory will be aligned on the
 
485
current platform.
 
486
</p>
 
487
</div>
 
488
<hr>
 
489
<div class="refsect2" lang="en">
 
490
<a name="id2698489"></a><h3>
 
491
<a name="G-CONST-RETURN:CAPS"></a>G_CONST_RETURN</h3>
 
492
<a class="indexterm" name="id2698502"></a><pre class="programlisting">#define             G_CONST_RETURN</pre>
 
493
<p>
 
494
If <code class="literal">G_DISABLE_CONST_RETURNS</code> is defined, this macro expands to nothing.
 
495
By default, the macro expands to <code class="literal">const</code>. The macro 
 
496
should be used in place of <code class="literal">const</code> for functions that 
 
497
return a value that should not be modified. The purpose of this macro is 
 
498
to allow us to turn on <code class="literal">const</code> for returned constant 
 
499
strings by default, while allowing programmers who find that annoying to 
 
500
turn it off. This macro should only be used for return values and for
 
501
<span class="emphasis"><em>out</em></span> parameters, it doesn't make sense for 
 
502
<span class="emphasis"><em>in</em></span> parameters. 
 
503
</p>
 
504
</div>
 
505
</div>
 
506
</div>
 
507
</body>
 
508
</html>