aboutsummaryrefslogtreecommitdiff
path: root/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html
blob: b90a71d634f2d4f5756153f8fe874bcfecdae53d (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
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
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DbusmenuClient</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="libdbusmenu-glib Reference Manual">
<link rel="up" href="ch01.html" title="API">
<link rel="prev" href="libdbusmenu-glib-DbusmenuMenuitem.html" title="DbusmenuMenuitem">
<link rel="next" href="libdbusmenu-glib-DbusmenuClientMenuitem.html" title="DbusmenuClientMenuitem">
<meta name="generator" content="GTK-Doc V1.14 (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="libdbusmenu-glib-DbusmenuMenuitem.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.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">libdbusmenu-glib Reference Manual</th>
<td><a accesskey="n" href="libdbusmenu-glib-DbusmenuClientMenuitem.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libdbusmenu-glib-DbusmenuClient.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libdbusmenu-glib-DbusmenuClient.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="DbusmenuClient">
<a name="libdbusmenu-glib-DbusmenuClient"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libdbusmenu-glib-DbusmenuClient.top_of_page"></a>DbusmenuClient</span></h2>
<p>DbusmenuClient — The catcher of all the server traffic</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Stability Level">
<a name="libdbusmenu-glib-DbusmenuClient.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="libdbusmenu-glib-DbusmenuClient.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libdbusmenu-glib/client.h&gt;

#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-SIGNAL-LAYOUT-UPDATED:CAPS" title="DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED">DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-SIGNAL-ROOT-CHANGED:CAPS" title="DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED">DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-SIGNAL-NEW-MENUITEM:CAPS" title="DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM">DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-PROP-DBUS-NAME:CAPS" title="DBUSMENU_CLIENT_PROP_DBUS_NAME">DBUSMENU_CLIENT_PROP_DBUS_NAME</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-PROP-DBUS-OBJECT:CAPS" title="DBUSMENU_CLIENT_PROP_DBUS_OBJECT">DBUSMENU_CLIENT_PROP_DBUS_OBJECT</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-TYPES-DEFAULT:CAPS" title="DBUSMENU_CLIENT_TYPES_DEFAULT">DBUSMENU_CLIENT_TYPES_DEFAULT</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-TYPES-SEPARATOR:CAPS" title="DBUSMENU_CLIENT_TYPES_SEPARATOR">DBUSMENU_CLIENT_TYPES_SEPARATOR</a>
#define             <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DBUSMENU-CLIENT-TYPES-IMAGE:CAPS" title="DBUSMENU_CLIENT_TYPES_IMAGE">DBUSMENU_CLIENT_TYPES_IMAGE</a>
                    <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient">DbusmenuClient</a>;
                    <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClientClass" title="DbusmenuClientClass">DbusmenuClientClass</a>;
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (<a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClientTypeHandler" title="DbusmenuClientTypeHandler ()">*DbusmenuClientTypeHandler</a>)        (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *newitem</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>);
<a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="returnvalue">DbusmenuClient</span></a> *    <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#dbusmenu-client-new" title="dbusmenu_client_new ()">dbusmenu_client_new</a>                 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object</code></em>);
<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#dbusmenu-client-get-root" title="dbusmenu_client_get_root ()">dbusmenu_client_get_root</a>            (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#dbusmenu-client-add-type-handler" title="dbusmenu_client_add_type_handler ()">dbusmenu_client_add_type_handler</a>    (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClientTypeHandler" title="DbusmenuClientTypeHandler ()"><span class="type">DbusmenuClientTypeHandler</span></a> newfunc</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#dbusmenu-client-send-event" title="dbusmenu_client_send_event ()">dbusmenu_client_send_event</a>          (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> id</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timestamp</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#dbusmenu-client-send-about-to-show" title="dbusmenu_client_send_about_to_show ()">dbusmenu_client_send_about_to_show</a>  (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> id</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> (cbgpointer user_data) ()</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cb_data</code></em>);
</pre>
</div>
<div class="refsect1" title="Description">
<a name="libdbusmenu-glib-DbusmenuClient.description"></a><h2>Description</h2>
<p>
The client exists as a mirror to the server.  For most folks
	all they will do with a client is set it up to connect to
	a server and then watch as the menu items on their side
	of the bus change.  This is all they should need to know about
	the client, that it magically makes their menuitems dance.
</p>
<p>
	It does this by setting up signal watchers and adjusting
	the menuitems appropriately.  Most users should watch the
	menu items and the signal <span class="type">"layout-changed"</span> for
	larger events so that they can be optimized.  It is possible
	with that signal that even the root node would change.  If
	that doesn't happen the normal signals on the individual
	nodes should be enough for most users.
</p>
</div>
<div class="refsect1" title="Details">
<a name="libdbusmenu-glib-DbusmenuClient.details"></a><h2>Details</h2>
<div class="refsect2" title="DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED">
<a name="DBUSMENU-CLIENT-SIGNAL-LAYOUT-UPDATED:CAPS"></a><h3>DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED  "layout-updated"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED">
<a name="DBUSMENU-CLIENT-SIGNAL-ROOT-CHANGED:CAPS"></a><h3>DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED    "root-changed"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM">
<a name="DBUSMENU-CLIENT-SIGNAL-NEW-MENUITEM:CAPS"></a><h3>DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM    "new-menuitem"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_PROP_DBUS_NAME">
<a name="DBUSMENU-CLIENT-PROP-DBUS-NAME:CAPS"></a><h3>DBUSMENU_CLIENT_PROP_DBUS_NAME</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_PROP_DBUS_NAME     "dbus-name"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_PROP_DBUS_OBJECT">
<a name="DBUSMENU-CLIENT-PROP-DBUS-OBJECT:CAPS"></a><h3>DBUSMENU_CLIENT_PROP_DBUS_OBJECT</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_PROP_DBUS_OBJECT   "dbus-object"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_TYPES_DEFAULT">
<a name="DBUSMENU-CLIENT-TYPES-DEFAULT:CAPS"></a><h3>DBUSMENU_CLIENT_TYPES_DEFAULT</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_TYPES_DEFAULT      "standard"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_TYPES_SEPARATOR">
<a name="DBUSMENU-CLIENT-TYPES-SEPARATOR:CAPS"></a><h3>DBUSMENU_CLIENT_TYPES_SEPARATOR</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_TYPES_SEPARATOR    "separator"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DBUSMENU_CLIENT_TYPES_IMAGE">
<a name="DBUSMENU-CLIENT-TYPES-IMAGE:CAPS"></a><h3>DBUSMENU_CLIENT_TYPES_IMAGE</h3>
<pre class="programlisting">#define DBUSMENU_CLIENT_TYPES_IMAGE        "standard"
</pre>
<p>
</p>
</div>
<hr>
<div class="refsect2" title="DbusmenuClient">
<a name="DbusmenuClient"></a><h3>DbusmenuClient</h3>
<pre class="programlisting">typedef struct {
	GObject parent;
} DbusmenuClient;
</pre>
<p>
The client for a <a class="link" href="libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer" title="DbusmenuServer"><span class="type">DbusmenuServer</span></a> creating a shared
	object set of <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> objects.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a> <em class="structfield"><code><a name="DbusmenuClient.parent"></a>parent</code></em>;</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="DbusmenuClientClass">
<a name="DbusmenuClientClass"></a><h3>DbusmenuClientClass</h3>
<pre class="programlisting">typedef struct {
	GObjectClass parent_class;

	void (*layout_updated)(void);
	void (*root_changed) (DbusmenuMenuitem * newroot);
	void (*new_menuitem) (DbusmenuMenuitem * newitem);

	/* Reserved for future use */
	void (*reserved1) (void);
	void (*reserved2) (void);
	void (*reserved3) (void);
	void (*reserved4) (void);
} DbusmenuClientClass;
</pre>
<p>
A simple class that takes all of the information from a
	<a class="link" href="libdbusmenu-glib-DbusmenuServer.html#DbusmenuServer" title="DbusmenuServer"><span class="type">DbusmenuServer</span></a> over DBus and makes the same set of 
	<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> objects appear on the other side.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="DbusmenuClientClass.parent-class"></a>parent_class</code></em>;</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.layout-updated"></a>layout_updated</code></em> ()</span></p></td>
<td>Slot for <span class="type">"layout-updated"</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.root-changed"></a>root_changed</code></em> ()</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.new-menuitem"></a>new_menuitem</code></em> ()</span></p></td>
<td>Slot for <span class="type">"new-menuitem"</span>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved1"></a>reserved1</code></em> ()</span></p></td>
<td>Reserved for future use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved2"></a>reserved2</code></em> ()</span></p></td>
<td>Reserved for future use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved3"></a>reserved3</code></em> ()</span></p></td>
<td>Reserved for future use.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuClientClass.reserved4"></a>reserved4</code></em> ()</span></p></td>
<td>Reserved for future use.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="DbusmenuClientTypeHandler ()">
<a name="DbusmenuClientTypeHandler"></a><h3>DbusmenuClientTypeHandler ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            (*DbusmenuClientTypeHandler)        (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *newitem</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *parent</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>newitem</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>parent</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="dbusmenu_client_new ()">
<a name="dbusmenu-client-new"></a><h3>dbusmenu_client_new ()</h3>
<pre class="programlisting"><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="returnvalue">DbusmenuClient</span></a> *    dbusmenu_client_new                 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *object</code></em>);</pre>
<p>
This function creates a new client that connects to a specific
	server on DBus.  That server is at a specific location sharing
	a known object.  The interface is assumed by the code to be 
	the DBus menu interface.  The newly created client will start
	sending out events as it syncs up with the server.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>The DBus name for the server to connect to
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>The object on the server to monitor
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A brand new <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="dbusmenu_client_get_root ()">
<a name="dbusmenu-client-get-root"></a><h3>dbusmenu_client_get_root ()</h3>
<pre class="programlisting"><a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  dbusmenu_client_get_root            (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>);</pre>
<p>
Grabs the root node for the specified client <em class="parameter"><code>client</code></em>.  This
	function may block.  It will block if there is currently a
	call to update the layout, it will block on that layout 
	updated and then return the newly updated layout.  Chances
	are that this update is in the queue for the mainloop as
	it would have been requested some time ago, but in theory
	it could block longer.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>The <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> to get the root node from
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> representing the root of
		menu on the server.  If there is no server or there is
		an error receiving its layout it'll return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><span class="type">NULL</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="dbusmenu_client_add_type_handler ()">
<a name="dbusmenu-client-add-type-handler"></a><h3>dbusmenu_client_add_type_handler ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            dbusmenu_client_add_type_handler    (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *type</code></em>,
                                                         <em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClientTypeHandler" title="DbusmenuClientTypeHandler ()"><span class="type">DbusmenuClientTypeHandler</span></a> newfunc</code></em>);</pre>
<p>
This function connects into the type handling of the <a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a>.
	Every new menuitem that comes in immediately gets asked for it's
	properties.  When we get those properties we check the 'type'
	property and look to see if it matches a handler that is known
	by the client.  If so, the <em class="parameter"><code>newfunc</code></em> function is executed on that
	<a class="link" href="libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem" title="DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a>.  If not, then the DbusmenuClient::new-menuitem
	signal is sent.
</p>
<p>
	In the future the known types will be sent to the server so that it
	can make choices about the menu item types availble.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>Client where we're getting types coming in
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>A text string that will be matched with the 'type'
	    property on incoming menu items
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>newfunc</code></em> :</span></p></td>
<td>The function that will be executed with those new
	    items when they come in.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> If registering the new type was successful.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="dbusmenu_client_send_event ()">
<a name="dbusmenu-client-send-event"></a><h3>dbusmenu_client_send_event ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                dbusmenu_client_send_event          (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> id</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>,
                                                         <em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/gobject/gobject-Generic-values.html#GValue"><span class="type">GValue</span></a> *value</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timestamp</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>timestamp</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="dbusmenu_client_send_about_to_show ()">
<a name="dbusmenu-client-send-about-to-show"></a><h3>dbusmenu_client_send_about_to_show ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                dbusmenu_client_send_about_to_show  (<em class="parameter"><code><a class="link" href="libdbusmenu-glib-DbusmenuClient.html#DbusmenuClient" title="DbusmenuClient"><span class="type">DbusmenuClient</span></a> *client</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> id</code></em>,
                                                         <em class="parameter"><code><span class="type">void</span> (cbgpointer user_data) ()</code></em>,
                                                         <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> cb_data</code></em>);</pre>
<p>
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>client</code></em> :</span></p></td>
<td>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>id</code></em> :</span></p></td>
<td>
<em class="parameter"><code>gpointer</code></em> user_data:
<em class="parameter"><code>gpointer</code></em> user_data:
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>cb_data</code></em> :</span></p></td>
<td>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.14</div>
</body>
</html>