~canonical-dx-team/ubuntu/maverick/gtk+2.0/menuproxy

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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
<!-- ##### SECTION Title ##### -->
General

<!-- ##### SECTION Short_Description ##### -->
Library initialization and miscellaneous functions

<!-- ##### SECTION Long_Description ##### -->
<para>
This section describes the GDK initialization functions and miscellaneous
utility functions.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### FUNCTION gdk_init ##### -->
<para>
Initializes the GDK library and connects to the X server.
If initialization fails, a warning message is output and the application
terminates with a call to <literal>exit(1)</literal>.
</para>
<para>
Any arguments used by GDK are removed from the array and @argc and @argv are
updated accordingly.
</para>
<para>
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
by GTK+ applications.
</para>

@argc: the number of command line arguments.
@argv: the array of command line arguments.


<!-- ##### FUNCTION gdk_init_check ##### -->
<para>
Initializes the GDK library and connects to the X server, returning %TRUE on
success.
</para>
<para>
Any arguments used by GDK are removed from the array and @argc and @argv are
updated accordingly.
</para>
<para>
GTK+ initializes GDK in gtk_init() and so this function is not usually needed
by GTK+ applications.
</para>

@argc: the number of command line arguments.
@argv: the array of command line arguments.
@Returns: %TRUE if initialization succeeded.


<!-- ##### FUNCTION gdk_parse_args ##### -->
<para>

</para>

@argc: 
@argv: 


<!-- ##### FUNCTION gdk_get_display_arg_name ##### -->
<para>

</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_set_locale ##### -->
<para>
Initializes the support for internationalization by calling the <function>setlocale()</function>
system call. This function is called by gtk_set_locale() and so GTK+
applications should use that instead.
</para>
<para>
The locale to use is determined by the <envar>LANG</envar> environment variable,
so to run an application in a certain locale you can do something like this:
<informalexample>
<programlisting>
  export LANG="fr"
  ... run application ...
</programlisting>
</informalexample>
</para>
<para>
If the locale is not supported by X then it is reset to the standard "C"
locale.
</para>

@void: 
@Returns: the resulting locale.


<!-- ##### FUNCTION gdk_set_sm_client_id ##### -->
<para>
</para>

@sm_client_id: 


<!-- ##### FUNCTION gdk_exit ##### -->
<para>
Exits the application using the <function>exit()</function> system call.
</para>
<para>
This routine is provided mainly for backwards compatibility, since it used to
perform tasks necessary to exit the application cleanly. Those tasks are now
performed in a function which is automatically called on exit (via the use
of g_atexit()).
</para>

@error_code: the error code to pass to the <function>exit()</function> call.


<!-- ##### FUNCTION gdk_notify_startup_complete ##### -->
<para>

</para>

@void: 


<!-- ##### FUNCTION gdk_notify_startup_complete_with_id ##### -->
<para>

</para>

@startup_id: 


<!-- ##### FUNCTION gdk_get_program_class ##### -->
<para>
Gets the program class. Unless the program class has explicitly
been set with gdk_set_program_class() or with the <option>--class</option> 
commandline option, the default value is the program name (determined 
with g_get_prgname()) with the first character converted to uppercase. 
</para>

@void: 
@Returns: the program class.


<!-- ##### FUNCTION gdk_set_program_class ##### -->
<para>
Sets the program class. The X11 backend uses the program class to set
the class name part of the <literal>WM_CLASS</literal> property on
toplevel windows; see the ICCCM.
</para>

@program_class: a string.


<!-- ##### FUNCTION gdk_get_display ##### -->
<para>
Gets the name of the display, which usually comes from the <envar>DISPLAY</envar>
environment variable or the <option>--display</option> command line option.
</para>

@void: 
@Returns: the name of the display.


<!-- ##### FUNCTION gdk_flush ##### -->
<para>
Flushes the X output buffer and waits until all requests have been processed
by the server. This is rarely needed by applications. It's main use is for
trapping X errors with gdk_error_trap_push() and gdk_error_trap_pop().
</para>

@void: 


<!-- ##### FUNCTION gdk_screen_width ##### -->
<para>
</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_screen_height ##### -->
<para>
</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_screen_width_mm ##### -->
<para>
</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_screen_height_mm ##### -->
<para>
</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_pointer_grab ##### -->
<para>
Grabs the pointer (usually a mouse) so that all events are passed to this
application until the pointer is ungrabbed with gdk_pointer_ungrab(), or
the grab window becomes unviewable.
This overrides any previous pointer grab by this client.
</para>
<para>
Pointer grabs are used for operations which need complete control over mouse
events, even if the mouse leaves the application.
For example in GTK+ it is used for Drag and Drop, for dragging the handle in
the #GtkHPaned and #GtkVPaned widgets, and for resizing columns in #GtkCList
widgets.
</para>
<para>
Note that if the event mask of an X window has selected both button press and
button release events, then a button press event will cause an automatic
pointer grab until the button is released.
X does this automatically since most applications expect to receive button
press and release events in pairs.
It is equivalent to a pointer grab on the window with @owner_events set to
%TRUE.
</para>
<para>
If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the #GdkEventGrabBroken events that
are emitted when the grab ends unvoluntarily.
</para>

@window: the #GdkWindow which will own the grab (the grab window).
@owner_events: if %FALSE then all pointer events are reported with respect to
@window and are only reported if selected by @event_mask. If %TRUE then pointer
events for this application are reported as normal, but pointer events outside
this application are reported with respect to @window and only if selected by
@event_mask. In either mode, unreported events are discarded.
@event_mask: specifies the event mask, which is used in accordance with
@owner_events. Note that only pointer events (i.e. button and motion events) 
    may be selected.
@confine_to: If non-%NULL, the pointer will be confined to this
window during the grab. If the pointer is outside @confine_to, it will
automatically be moved to the closest edge of @confine_to and enter
and leave events will be generated as necessary.
@cursor: the cursor to display while the grab is active. If this is %NULL then
the normal cursors are used for @window and its descendants, and the cursor
for @window is used for all other windows.
@time_: the timestamp of the event which led to this pointer grab. This usually
comes from a #GdkEventButton struct, though %GDK_CURRENT_TIME can be used if
the time isn't known.
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.


<!-- ##### ENUM GdkGrabStatus ##### -->
<para>
Returned by gdk_pointer_grab() and gdk_keyboard_grab() to indicate 
success or the reason for the failure of the grab attempt.
</para>

@GDK_GRAB_SUCCESS: the resource was successfully grabbed.
@GDK_GRAB_ALREADY_GRABBED: the resource is actively grabbed by another client.
@GDK_GRAB_INVALID_TIME: the resource was grabbed more recently than the 
  specified time.
@GDK_GRAB_NOT_VIEWABLE: the grab window or the @confine_to window are not
  viewable.
@GDK_GRAB_FROZEN: the resource is frozen by an active grab of another client.

<!-- ##### FUNCTION gdk_pointer_ungrab ##### -->
<para>

</para>

@time_: 


<!-- ##### FUNCTION gdk_pointer_is_grabbed ##### -->
<para>
</para>
<para>
</para>

@void: 
@Returns: 


<!-- ##### FUNCTION gdk_set_double_click_time ##### -->
<para>

</para>

@msec: 


<!-- ##### FUNCTION gdk_keyboard_grab ##### -->
<para>
Grabs the keyboard so that all events are passed to this
application until the keyboard is ungrabbed with gdk_keyboard_ungrab().
This overrides any previous keyboard grab by this client.
</para>
<para>
If you set up anything at the time you take the grab that needs to be cleaned
up when the grab ends, you should handle the #GdkEventGrabBroken events that
are emitted when the grab ends unvoluntarily.
</para>

@window: the #GdkWindow which will own the grab (the grab window).
@owner_events: if %FALSE then all keyboard events are reported with respect to
@window. If %TRUE then keyboard events for this application are reported as
normal, but keyboard events outside this application are reported with respect
to @window. Both key press and key release events are always reported,
independant of the event mask set by the application.
@time_: a timestamp from a #GdkEvent, or %GDK_CURRENT_TIME if no timestamp is
available.
@Returns: %GDK_GRAB_SUCCESS if the grab was successful.


<!-- ##### FUNCTION gdk_keyboard_ungrab ##### -->
<para>
</para>

@time_: 


<!-- ##### FUNCTION gdk_beep ##### -->
<para>
</para>

@void: 


<!-- ##### FUNCTION gdk_get_use_xshm ##### -->
<para>
Returns %TRUE if GDK will attempt to use the MIT-SHM shared memory extension.
</para>
<para>
The shared memory extension is used for #GdkImage, and consequently for
<link linkend="gdk-GdkRGB">GdkRGB</link>.
It enables much faster drawing by communicating with the X server through
SYSV shared memory calls. However, it can only be used if the X client and
server are on the same machine and the server supports it.
</para>

@void: 
@Returns: %TRUE if use of the MIT shared memory extension will be attempted.


<!-- ##### FUNCTION gdk_set_use_xshm ##### -->
<para>
Sets whether the use of the MIT shared memory extension should be attempted.
This function is mainly for internal use. It is only safe for an application
to set this to %FALSE, since if it is set to %TRUE and the server does not
support the extension it may cause warning messages to be output.
</para>

@use_xshm: %TRUE if use of the MIT shared memory extension should be attempted.


<!-- ##### FUNCTION gdk_error_trap_push ##### -->
<para>
This function allows X errors to be trapped instead of the normal behavior
of exiting the application. It should only be used if it is not possible to
avoid the X error in any other way.
</para>
<example>
<title>Trapping an X error</title>
<programlisting>
  gdk_error_trap_push (<!-- -->);

  /* ... Call the X function which may cause an error here ... */

  /* Flush the X queue to catch errors now. */
  gdk_flush (<!-- -->);

  if (gdk_error_trap_pop (<!-- -->))
    {
      /* ... Handle the error here ... */
    }
</programlisting>
</example>

@void: 


<!-- ##### FUNCTION gdk_error_trap_pop ##### -->
<para>
Removes the X error trap installed with gdk_error_trap_push().
</para>

@void: 
@Returns: the X error code, or 0 if no error occurred.


<!-- ##### MACRO GDK_WINDOWING_X11 ##### -->
<para>
This macro is defined if GDK is configured to use the X11 backend.
</para>



<!-- ##### MACRO GDK_WINDOWING_WIN32 ##### -->
<para>
This macro is defined if GDK is configured to use the Win32 backend.
</para>