File: libgnomeui-gnome-popup-menu.html

package info (click to toggle)
libgnomeui 2.24.5-2
  • links: PTS
  • area: main
  • in suites: wheezy
  • size: 12,428 kB
  • sloc: ansic: 37,044; sh: 11,082; makefile: 409; xml: 18
file content (391 lines) | stat: -rw-r--r-- 29,388 bytes parent folder | download | duplicates (3)
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gnome-popup-menu</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="GNOME UI Library Reference Manual">
<link rel="up" href="deprecated.html" title="Deprecated Modules">
<link rel="prev" href="GnomePixmapEntry.html" title="GnomePixmapEntry">
<link rel="next" href="GnomePropertyBox.html" title="GnomePropertyBox">
<meta name="generator" content="GTK-Doc V1.16 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="GnomePixmapEntry.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="deprecated.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GNOME UI Library Reference Manual</th>
<td><a accesskey="n" href="GnomePropertyBox.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgnomeui-gnome-popup-menu.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libgnomeui-gnome-popup-menu.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libgnomeui-gnome-popup-menu"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgnomeui-gnome-popup-menu.top_of_page"></a>gnome-popup-menu</span></h2>
<p>gnome-popup-menu — Create and display popup and context menus.</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgnomeui-gnome-popup-menu.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libgnomeui/libgnomeui.h&gt;

<a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-new" title="gnome_popup_menu_new ()">gnome_popup_menu_new</a>                (<em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>);
<a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-new-with-accelgroup" title="gnome_popup_menu_new_with_accelgroup ()">gnome_popup_menu_new_with_accelgroup</a>
                                                        (<em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *accelgroup</code></em>);
<a href="http://library.gnome.org/devel/gtk/unstable/gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> *     <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-get-accel-group" title="gnome_popup_menu_get_accel_group ()">gnome_popup_menu_get_accel_group</a>    (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-attach" title="gnome_popup_menu_attach ()">gnome_popup_menu_attach</a>             (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-do-popup" title="gnome_popup_menu_do_popup ()">gnome_popup_menu_do_popup</a>           (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a> pos_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> pos_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *for_widget</code></em>);
<span class="returnvalue">int</span>                 <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-do-popup-modal" title="gnome_popup_menu_do_popup_modal ()">gnome_popup_menu_do_popup_modal</a>     (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a> pos_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> pos_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *for_widget</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-append" title="gnome_popup_menu_append ()">gnome_popup_menu_append</a>             (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-gtk-widget-add-popup-items" title="gnome_gtk_widget_add_popup_items ()">gnome_gtk_widget_add_popup_items</a>    (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libgnomeui-gnome-popup-menu.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="libgnomeui-gnome-popup-menu.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="gnome-popup-menu-new"></a><h3>gnome_popup_menu_new ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         gnome_popup_menu_new                (<em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_new</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This function behaves just like
<a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-new-with-accelgroup" title="gnome_popup_menu_new_with_accelgroup ()"><code class="function">gnome_popup_menu_new_with_accelgroup()</code></a>, except that it creates an
accelgroup for you and attaches it to the menu object.  Use
<a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-get-accel-group" title="gnome_popup_menu_get_accel_group ()"><code class="function">gnome_popup_menu_get_accel_group()</code></a> to get the accelgroup that is
created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uiinfo</code></em> :</span></p></td>
<td>A <a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> array describing the new menu.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A menu widget.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-new-with-accelgroup"></a><h3>gnome_popup_menu_new_with_accelgroup ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="returnvalue">GtkWidget</span></a> *         gnome_popup_menu_new_with_accelgroup
                                                        (<em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> *accelgroup</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_new_with_accelgroup</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Creates a popup menu out of the specified <em class="parameter"><code>uiinfo</code></em> array.  Use
<a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-do-popup" title="gnome_popup_menu_do_popup ()"><code class="function">gnome_popup_menu_do_popup()</code></a> to pop the menu up, or attach it to a
window with <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-attach" title="gnome_popup_menu_attach ()"><code class="function">gnome_popup_menu_attach()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>uiinfo</code></em> :</span></p></td>
<td>A <a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> array describing the new menu.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>accelgroup</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gtk/unstable/gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="type">GtkAccelGroup</span></a> describing the accelerator key structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A menu widget.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-get-accel-group"></a><h3>gnome_popup_menu_get_accel_group ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gtk/unstable/gtk-Keyboard-Accelerators.html#GtkAccelGroup"><span class="returnvalue">GtkAccelGroup</span></a> *     gnome_popup_menu_get_accel_group    (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a> *menu</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_get_accel_group</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This function is used to retrieve the accelgroup that was created by
<a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-new" title="gnome_popup_menu_new ()"><code class="function">gnome_popup_menu_new()</code></a>. If you want to specify the accelgroup that the popup
menu accelerators use, then use <a class="link" href="libgnomeui-gnome-popup-menu.html#gnome-popup-menu-new-with-accelgroup" title="gnome_popup_menu_new_with_accelgroup ()"><code class="function">gnome_popup_menu_new_with_accelgroup()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>menu</code></em> :</span></p></td>
<td>A menu widget.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The accelgroup associated with the specified <a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html"><span class="type">GtkMenu</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-attach"></a><h3>gnome_popup_menu_attach ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_popup_menu_attach             (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_attach</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Attaches the specified popup menu to the specified widget.  The
menu can then be activated by pressing mouse button 3 over the
widget.  When a menu item callback is invoked, the specified
user_data will be passed to it.
</p>
<p>
This function requires the widget to have its own window
(i.e. GTK_WIDGET_NO_WINDOW (widget) == FALSE), This function will
try to set the GDK_BUTTON_PRESS_MASK flag on the widget's event
mask if it does not have it yet; if this is the case, then the
widget must not be realized for it to work.
</p>
<p>
The popup menu can be attached to different widgets at the same
time.  A reference count is kept on the popup menu; when all the
widgets it is attached to are destroyed, the popup menu will be
destroyed as well.
</p>
<p>
Under the current implementation, setting a popup menu for a NO_WINDOW
widget and then reparenting that widget will cause Bad Things to happen.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>popup</code></em> :</span></p></td>
<td>A menu widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>The widget to attach the popup menu to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Application specific data passed to the callback.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-do-popup"></a><h3>gnome_popup_menu_do_popup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_popup_menu_do_popup           (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a> pos_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> pos_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *for_widget</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_do_popup</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
You can use this function to pop up a menu.  When a menu item
callback is invoked, the specified user_data will be passed to it.
</p>
<p>
The pos_func and pos_data parameters are the same as for
<a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#gtk-menu-popup"><code class="function">gtk_menu_popup()</code></a>, i.e. you can use them to specify a function to
position the menu explicitly.  If you want the default position
(near the mouse), pass NULL for these parameters.
</p>
<p>
The event parameter is needed to figure out the mouse button that
activated the menu and the time at which this happened.  If you
pass in NULL, then no button and the current time will be used as
defaults.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>popup</code></em> :</span></p></td>
<td>A menu widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos_func</code></em> :</span></p></td>
<td>A user supplied function to position the menu or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos_data</code></em> :</span></p></td>
<td>User supplied data to pass to <em class="parameter"><code>pos_func</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> structure containing the event that triggered the
menu (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Application specific data passed to the menu callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>for_widget</code></em> :</span></p></td>
<td>The widget for which the popup was triggered.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-do-popup-modal"></a><h3>gnome_popup_menu_do_popup_modal ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>                 gnome_popup_menu_do_popup_modal     (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkMenu.html#GtkMenuPositionFunc"><span class="type">GtkMenuPositionFunc</span></a> pos_func</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> pos_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> *event</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *for_widget</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_do_popup_modal</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Same as <code class="function">gnome_popup_do_modal()</code>, but runs the popup menu modally.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>popup</code></em> :</span></p></td>
<td>A menu widget.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos_func</code></em> :</span></p></td>
<td>A user supplied function to position the menu or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>pos_data</code></em> :</span></p></td>
<td>User supplied data to pass to <em class="parameter"><code>pos_func</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/gdk/unstable/gdk-Event-Structures.html#GdkEventButton"><span class="type">GdkEventButton</span></a> structure containing the event that triggered the
menu (or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>Application specific data passed to the menu callback.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>for_widget</code></em> :</span></p></td>
<td>The widget for which the popup was triggered.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The index of the selected item or -1 if no item selected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-popup-menu-append"></a><h3>gnome_popup_menu_append ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_popup_menu_append             (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *popup</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_popup_menu_append</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
Appends the menu items in <em class="parameter"><code>uiinfo</code></em> the <em class="parameter"><code>popup</code></em> menu.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>popup</code></em> :</span></p></td>
<td>An existing popup menu.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uiinfo</code></em> :</span></p></td>
<td>A <a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> array describing new menu elements.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gnome-gtk-widget-add-popup-items"></a><h3>gnome_gtk_widget_add_popup_items ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                gnome_gtk_widget_add_popup_items    (<em class="parameter"><code><a href="http://library.gnome.org/devel/gtk/unstable/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> *uiinfo</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">gnome_gtk_widget_add_popup_items</code> is deprecated and should not be used in newly-written code.</p>
</div>
<p>
This creates a new popup menu for <em class="parameter"><code>widget</code></em> if none exists, and then adds the
items in <em class="parameter"><code>uiinfo</code></em> to the popup menu of <em class="parameter"><code>widget</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>The widget to append popup menu items for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>uiinfo</code></em> :</span></p></td>
<td>A <a class="link" href="libgnomeui-gnome-app-helper.html#GnomeUIInfo" title="GnomeUIInfo"><span class="type">GnomeUIInfo</span></a> array describing new menu elements.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>The user_data to pass to the callbacks for the menu items.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.16</div>
</body>
</html>