Merge lp:~ted/libdbusmenu/doc-check into lp:libdbusmenu/0.5

Proposed by Ted Gould
Status: Merged
Approved by: Kalle Valo
Approved revision: 137
Merged at revision: 223
Proposed branch: lp:~ted/libdbusmenu/doc-check
Merge into: lp:libdbusmenu/0.5
Diff against target: 1287 lines (+593/-99)
24 files modified
docs/libdbusmenu-glib/reference/Makefile.am (+13/-4)
docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml (+4/-0)
docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt (+28/-25)
docs/libdbusmenu-gtk/reference/Makefile.am (+10/-3)
docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml (+7/-2)
docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-sections.txt (+77/-0)
libdbusmenu-glib/Makefile.am (+1/-0)
libdbusmenu-glib/client-menuitem.c (+3/-2)
libdbusmenu-glib/client-menuitem.h (+6/-6)
libdbusmenu-glib/client-private.h (+48/-0)
libdbusmenu-glib/client.c (+1/-0)
libdbusmenu-glib/client.h (+58/-10)
libdbusmenu-glib/menuitem-proxy.h (+12/-2)
libdbusmenu-glib/menuitem.c (+1/-1)
libdbusmenu-glib/menuitem.h (+191/-3)
libdbusmenu-glib/server.h (+43/-5)
libdbusmenu-gtk/client.h (+25/-17)
libdbusmenu-gtk/genericmenuitem.c (+1/-1)
libdbusmenu-gtk/genericmenuitem.h (+2/-2)
libdbusmenu-gtk/menu.c (+1/-1)
libdbusmenu-gtk/menu.h (+18/-15)
libdbusmenu-gtk/menuitem.h (+11/-0)
libdbusmenu-gtk/parser.h (+14/-0)
libdbusmenu-gtk/serializablemenuitem.h (+18/-0)
To merge this branch: bzr merge lp:~ted/libdbusmenu/doc-check
Reviewer Review Type Date Requested Status
Kalle Valo (community) Approve
Review via email: mp+50657@code.launchpad.net

Description of the change

Making it so that the documentation checks is part of 'make check'. Oh, and doing the work to make sure we pass the test ;)

To post a comment you must log in.
Revision history for this message
Kalle Valo (kvalo) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/libdbusmenu-glib/reference/Makefile.am'
2--- docs/libdbusmenu-glib/reference/Makefile.am 2010-06-10 20:20:24 +0000
3+++ docs/libdbusmenu-glib/reference/Makefile.am 2011-02-21 21:23:00 +0000
4@@ -48,11 +48,12 @@
5 # Header files to ignore when scanning.
6 # e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
7 IGNORE_HFILES= \
8+ dbus-menu-clean.xml.h \
9+ client-menuitem.h \
10+ client-private.h \
11 menuitem-marshal.h \
12 server-marshal.h \
13- menuitem-private.h \
14- dbusmenu-client.h \
15- dbusmenu-server.h
16+ menuitem-private.h
17
18 # Images to copy into HTML directory.
19 # e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
20@@ -88,5 +89,13 @@
21 #DISTCLEANFILES +=
22
23 # Comment this out if you want your docs-status tested during 'make check'
24-#TESTS = $(GTKDOC_CHECK)
25+TESTS = gtkdoc-in-srcdir
26+
27+gtkdoc-in-srcdir: Makefile.am
28+ @echo "#!/bin/sh" > $@
29+ @echo "cd \"$(srcdir)\"" >> $@
30+ @echo "$(GTKDOC_CHECK)" >> $@
31+ @chmod +x $@
32+
33+DISTCLEANFILES = gtkdoc-in-srcdir
34
35
36=== modified file 'docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml'
37--- docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml 2010-06-09 16:24:31 +0000
38+++ docs/libdbusmenu-glib/reference/libdbusmenu-glib-docs.sgml 2011-02-21 21:23:00 +0000
39@@ -28,6 +28,10 @@
40 <title>API Index</title>
41 <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
42 </index>
43+ <index id="api-index-deprecated">
44+ <title>Deprecated API Index</title>
45+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
46+ </index>
47
48 <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
49 </book>
50
51=== modified file 'docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt'
52--- docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt 2010-06-10 16:01:53 +0000
53+++ docs/libdbusmenu-glib/reference/libdbusmenu-glib-sections.txt 2011-02-21 21:23:00 +0000
54@@ -4,6 +4,8 @@
55 DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED
56 DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED
57 DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM
58+DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT
59+DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE
60 DBUSMENU_CLIENT_PROP_DBUS_NAME
61 DBUSMENU_CLIENT_PROP_DBUS_OBJECT
62 DBUSMENU_CLIENT_TYPES_DEFAULT
63@@ -12,19 +14,21 @@
64 DbusmenuClient
65 DbusmenuClientClass
66 DbusmenuClientTypeHandler
67+DbusmenuClientTypeDestroyHandler
68 dbusmenu_client_new
69 dbusmenu_client_get_root
70 dbusmenu_client_add_type_handler
71-dbusmenu_client_send_event
72-dbusmenu_client_send_about_to_show
73+dbusmenu_client_add_type_handler_full
74 <SUBSECTION Standard>
75 DBUSMENU_CLIENT
76 DBUSMENU_IS_CLIENT
77 DBUSMENU_TYPE_CLIENT
78-dbusmenu_client_get_type
79 DBUSMENU_CLIENT_CLASS
80 DBUSMENU_IS_CLIENT_CLASS
81 DBUSMENU_CLIENT_GET_CLASS
82+<SUBSECTION Private>
83+DbusmenuClientPrivate
84+dbusmenu_client_get_type
85 </SECTION>
86
87 <SECTION>
88@@ -37,6 +41,8 @@
89 DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED
90 DBUSMENU_MENUITEM_SIGNAL_REALIZED
91 DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID
92+DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW
93+DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER
94 DBUSMENU_MENUITEM_PROP_TYPE
95 DBUSMENU_MENUITEM_PROP_VISIBLE
96 DBUSMENU_MENUITEM_PROP_ENABLED
97@@ -46,6 +52,7 @@
98 DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE
99 DBUSMENU_MENUITEM_PROP_TOGGLE_STATE
100 DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY
101+DBUSMENU_MENUITEM_PROP_SHORTCUT
102 DBUSMENU_MENUITEM_TOGGLE_CHECK
103 DBUSMENU_MENUITEM_TOGGLE_RADIO
104 DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED
105@@ -53,9 +60,13 @@
106 DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN
107 DBUSMENU_MENUITEM_ICON_NAME_BLANK
108 DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU
109+DBUSMENU_MENUITEM_SHORTCUT_ALT
110+DBUSMENU_MENUITEM_SHORTCUT_CONTROL
111+DBUSMENU_MENUITEM_SHORTCUT_SHIFT
112+DBUSMENU_MENUITEM_SHORTCUT_SUPER
113 DbusmenuMenuitem
114 dbusmenu_menuitem_about_to_show_cb
115-dbusmenu_menuitem_buildxml_slot_t
116+dbusmenu_menuitem_buildvariant_slot_t
117 DbusmenuMenuitemClass
118 dbusmenu_menuitem_new
119 dbusmenu_menuitem_new_with_id
120@@ -72,13 +83,13 @@
121 dbusmenu_menuitem_child_find
122 dbusmenu_menuitem_find_id
123 dbusmenu_menuitem_property_set
124-dbusmenu_menuitem_property_set_value
125 dbusmenu_menuitem_property_set_bool
126 dbusmenu_menuitem_property_set_int
127+dbusmenu_menuitem_property_set_variant
128 dbusmenu_menuitem_property_get
129-dbusmenu_menuitem_property_get_value
130 dbusmenu_menuitem_property_get_bool
131 dbusmenu_menuitem_property_get_int
132+dbusmenu_menuitem_property_get_variant
133 dbusmenu_menuitem_property_exist
134 dbusmenu_menuitem_properties_list
135 dbusmenu_menuitem_properties_copy
136@@ -88,14 +99,17 @@
137 dbusmenu_menuitem_foreach
138 dbusmenu_menuitem_handle_event
139 dbusmenu_menuitem_send_about_to_show
140+dbusmenu_menuitem_show_to_user
141 <SUBSECTION Standard>
142 DBUSMENU_MENUITEM
143 DBUSMENU_IS_MENUITEM
144 DBUSMENU_TYPE_MENUITEM
145-dbusmenu_menuitem_get_type
146 DBUSMENU_MENUITEM_CLASS
147 DBUSMENU_IS_MENUITEM_CLASS
148 DBUSMENU_MENUITEM_GET_CLASS
149+<SUBSECTION Private>
150+DbusmenuMenuitemPrivate
151+dbusmenu_menuitem_get_type
152 </SECTION>
153
154 <SECTION>
155@@ -105,6 +119,7 @@
156 DBUSMENU_SERVER_SIGNAL_ID_UPDATE
157 DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED
158 DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE
159+DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION
160 DBUSMENU_SERVER_PROP_DBUS_OBJECT
161 DBUSMENU_SERVER_PROP_ROOT_NODE
162 DBUSMENU_SERVER_PROP_VERSION
163@@ -116,26 +131,12 @@
164 DBUSMENU_SERVER
165 DBUSMENU_IS_SERVER
166 DBUSMENU_TYPE_SERVER
167-dbusmenu_server_get_type
168 DBUSMENU_SERVER_CLASS
169 DBUSMENU_IS_SERVER_CLASS
170 DBUSMENU_SERVER_GET_CLASS
171-</SECTION>
172-
173-<SECTION>
174-<FILE>client-menuitem</FILE>
175-<TITLE>DbusmenuClientMenuitem</TITLE>
176-DBUSMENU_CLIENT_MENUITEM_TYPE
177-DbusmenuClientMenuitem
178-DbusmenuClientMenuitemClass
179-dbusmenu_client_menuitem_new
180-<SUBSECTION Standard>
181-DBUSMENU_CLIENT_MENUITEM
182-DBUSMENU_IS_CLIENT_MENUITEM
183-dbusmenu_client_menuitem_get_type
184-DBUSMENU_CLIENT_MENUITEM_CLASS
185-DBUSMENU_IS_CLIENT_MENUITEM_CLASS
186-DBUSMENU_CLIENT_MENUITEM_GET_CLASS
187+<SUBSECTION Private>
188+DbusmenuServerPrivate
189+dbusmenu_server_get_type
190 </SECTION>
191
192 <SECTION>
193@@ -149,9 +150,11 @@
194 DBUSMENU_MENUITEM_PROXY
195 DBUSMENU_IS_MENUITEM_PROXY
196 DBUSMENU_TYPE_MENUITEM_PROXY
197-dbusmenu_menuitem_proxy_get_type
198 DBUSMENU_MENUITEM_PROXY_CLASS
199 DBUSMENU_IS_MENUITEM_PROXY_CLASS
200 DBUSMENU_MENUITEM_PROXY_GET_CLASS
201+<SUBSECTION Private>
202+DbusmenuMenuitemProxyPrivate
203+dbusmenu_menuitem_proxy_get_type
204 </SECTION>
205
206
207=== modified file 'docs/libdbusmenu-gtk/reference/Makefile.am'
208--- docs/libdbusmenu-gtk/reference/Makefile.am 2011-01-21 23:01:41 +0000
209+++ docs/libdbusmenu-gtk/reference/Makefile.am 2011-02-21 21:23:00 +0000
210@@ -16,7 +16,7 @@
211 # of using the various options.
212
213 # The name of the module, e.g. 'glib'.
214-DOC_MODULE=libdbusmenu-gtk$(VER)
215+DOC_MODULE=libdbusmenu-gtk
216
217 # The top-level SGML file. You can change this if you want to.
218 DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.sgml
219@@ -90,5 +90,12 @@
220 #DISTCLEANFILES +=
221
222 # Comment this out if you want your docs-status tested during 'make check'
223-#TESTS = $(GTKDOC_CHECK)
224-
225+TESTS = gtkdoc-in-srcdir
226+
227+gtkdoc-in-srcdir: Makefile.am
228+ @echo "#!/bin/sh" > $@
229+ @echo "cd \"$(srcdir)\"" >> $@
230+ @echo "$(GTKDOC_CHECK)" >> $@
231+ @chmod +x $@
232+
233+DISTCLEANFILES = gtkdoc-in-srcdir
234
235=== modified file 'docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml'
236--- docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml 2011-01-21 23:01:41 +0000
237+++ docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-docs.sgml 2011-02-21 21:23:00 +0000
238@@ -11,9 +11,10 @@
239
240 <chapter>
241 <title>API</title>
242- <xi:include href="xml/menu.xml"/>
243+ <xi:include href="xml/menu.xml"/>
244+ <xi:include href="xml/menuitem.xml"/>
245 <xi:include href="xml/client.xml"/>
246- <xi:include href="xml/menuitem.xml"/>
247+ <xi:include href="xml/parser.xml"/>
248 <xi:include href="xml/serializablemenuitem.xml"/>
249
250 </chapter>
251@@ -25,6 +26,10 @@
252 <title>API Index</title>
253 <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
254 </index>
255+ <index id="api-index-deprecated">
256+ <title>Deprecated API Index</title>
257+ <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
258+ </index>
259
260 <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
261 </book>
262
263=== added file 'docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-sections.txt'
264--- docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-sections.txt 1970-01-01 00:00:00 +0000
265+++ docs/libdbusmenu-gtk/reference/libdbusmenu-gtk-sections.txt 2011-02-21 21:23:00 +0000
266@@ -0,0 +1,77 @@
267+<SECTION>
268+<FILE>client</FILE>
269+<TITLE>DbusmenuGtkClient</TITLE>
270+DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED
271+DbusmenuGtkClient
272+DbusmenuGtkClientClass
273+dbusmenu_gtkclient_new
274+dbusmenu_gtkclient_menuitem_get
275+dbusmenu_gtkclient_menuitem_get_submenu
276+dbusmenu_gtkclient_set_accel_group
277+dbusmenu_gtkclient_get_accel_group
278+dbusmenu_gtkclient_newitem_base
279+<SUBSECTION Standard>
280+DBUSMENU_GTKCLIENT
281+DBUSMENU_IS_GTKCLIENT
282+DBUSMENU_GTKCLIENT_CLASS
283+DBUSMENU_IS_GTKCLIENT_CLASS
284+DBUSMENU_GTKCLIENT_GET_CLASS
285+<SUBSECTION Private>
286+DBUSMENU_GTKCLIENT_TYPE
287+dbusmenu_gtkclient_get_type
288+DbusmenuGtkClientPrivate
289+</SECTION>
290+
291+<SECTION>
292+<FILE>serializablemenuitem</FILE>
293+<TITLE>DbusmenuGtkSerializableMenuItem</TITLE>
294+DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM
295+DbusmenuGtkSerializableMenuItemClass
296+dbusmenu_gtk_serializable_menu_item_build_menuitem
297+dbusmenu_gtk_serializable_menu_item_register_to_client
298+dbusmenu_gtk_serializable_menu_item_set_menuitem
299+<SUBSECTION Standard>
300+DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM
301+DBUSMENU_IS_GTK_SERIALIZABLE_MENU_ITEM
302+DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_CLASS
303+DBUSMENU_IS_GTK_SERIALIZABLE_MENU_ITEM_CLASS
304+DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_GET_CLASS
305+<SUBSECTION Private>
306+DBUSMENU_TYPE_GTK_SERIALIZABLE_MENU_ITEM
307+dbusmenu_gtk_serializable_menu_item_get_type
308+DbusmenuGtkSerializableMenuItemPrivate
309+</SECTION>
310+
311+<SECTION>
312+<FILE>menu</FILE>
313+<TITLE>DbusmenuGtkMenu</TITLE>
314+DbusmenuGtkMenuClass
315+dbusmenu_gtkmenu_new
316+dbusmenu_gtkmenu_get_client
317+<SUBSECTION Standard>
318+DBUSMENU_GTKMENU
319+DBUSMENU_IS_GTKMENU
320+DBUSMENU_GTKMENU_CLASS
321+DBUSMENU_IS_GTKMENU_CLASS
322+DBUSMENU_GTKMENU_GET_CLASS
323+<SUBSECTION Private>
324+dbusmenu_gtkmenu_get_type
325+DBUSMENU_GTKMENU_TYPE
326+DbusmenuGtkMenuPrivate
327+</SECTION>
328+
329+<SECTION>
330+<FILE>menuitem</FILE>
331+dbusmenu_menuitem_property_set_image
332+dbusmenu_menuitem_property_get_image
333+dbusmenu_menuitem_property_set_shortcut
334+dbusmenu_menuitem_property_set_shortcut_string
335+dbusmenu_menuitem_property_set_shortcut_menuitem
336+dbusmenu_menuitem_property_get_shortcut
337+</SECTION>
338+
339+<SECTION>
340+<FILE>parser</FILE>
341+dbusmenu_gtk_parse_menu_structure
342+</SECTION>
343+
344
345=== modified file 'libdbusmenu-glib/Makefile.am'
346--- libdbusmenu-glib/Makefile.am 2011-02-16 17:00:55 +0000
347+++ libdbusmenu-glib/Makefile.am 2011-02-21 21:23:00 +0000
348@@ -39,6 +39,7 @@
349 client-marshal.c \
350 client-menuitem.h \
351 client-menuitem.c \
352+ client-private.h \
353 client.h \
354 client.c
355
356
357=== modified file 'libdbusmenu-glib/client-menuitem.c'
358--- libdbusmenu-glib/client-menuitem.c 2010-11-18 02:50:45 +0000
359+++ libdbusmenu-glib/client-menuitem.c 2011-02-21 21:23:00 +0000
360@@ -30,6 +30,7 @@
361 #endif
362
363 #include "client-menuitem.h"
364+#include "client-private.h"
365
366 typedef struct _DbusmenuClientMenuitemPrivate DbusmenuClientMenuitemPrivate;
367
368@@ -39,7 +40,7 @@
369 };
370
371 #define DBUSMENU_CLIENT_MENUITEM_GET_PRIVATE(o) \
372-(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_CLIENT_MENUITEM_TYPE, DbusmenuClientMenuitemPrivate))
373+(G_TYPE_INSTANCE_GET_PRIVATE ((o), DBUSMENU_TYPE_CLIENT_MENUITEM, DbusmenuClientMenuitemPrivate))
374
375 static void dbusmenu_client_menuitem_class_init (DbusmenuClientMenuitemClass *klass);
376 static void dbusmenu_client_menuitem_init (DbusmenuClientMenuitem *self);
377@@ -94,7 +95,7 @@
378 DbusmenuClientMenuitem *
379 dbusmenu_client_menuitem_new (gint id, DbusmenuClient * client)
380 {
381- DbusmenuClientMenuitem * mi = g_object_new(DBUSMENU_CLIENT_MENUITEM_TYPE, "id", id, NULL);
382+ DbusmenuClientMenuitem * mi = g_object_new(DBUSMENU_TYPE_CLIENT_MENUITEM, "id", id, NULL);
383 DbusmenuClientMenuitemPrivate * priv = DBUSMENU_CLIENT_MENUITEM_GET_PRIVATE(mi);
384 priv->client = client;
385 return mi;
386
387=== modified file 'libdbusmenu-glib/client-menuitem.h'
388--- libdbusmenu-glib/client-menuitem.h 2010-02-04 02:45:12 +0000
389+++ libdbusmenu-glib/client-menuitem.h 2011-02-21 21:23:00 +0000
390@@ -35,12 +35,12 @@
391
392 G_BEGIN_DECLS
393
394-#define DBUSMENU_CLIENT_MENUITEM_TYPE (dbusmenu_client_menuitem_get_type ())
395-#define DBUSMENU_CLIENT_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_CLIENT_MENUITEM_TYPE, DbusmenuClientMenuitem))
396-#define DBUSMENU_CLIENT_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_CLIENT_MENUITEM_TYPE, DbusmenuClientMenuitemClass))
397-#define DBUSMENU_IS_CLIENT_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_CLIENT_MENUITEM_TYPE))
398-#define DBUSMENU_IS_CLIENT_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_CLIENT_MENUITEM_TYPE))
399-#define DBUSMENU_CLIENT_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_CLIENT_MENUITEM_TYPE, DbusmenuClientMenuitemClass))
400+#define DBUSMENU_TYPE_CLIENT_MENUITEM (dbusmenu_client_menuitem_get_type ())
401+#define DBUSMENU_CLIENT_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DBUSMENU_TYPE_CLIENT_MENUITEM, DbusmenuClientMenuitem))
402+#define DBUSMENU_CLIENT_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DBUSMENU_TYPE_CLIENT_MENUITEM, DbusmenuClientMenuitemClass))
403+#define DBUSMENU_IS_CLIENT_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DBUSMENU_TYPE_CLIENT_MENUITEM))
404+#define DBUSMENU_IS_CLIENT_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_CLIENT_MENUITEM))
405+#define DBUSMENU_CLIENT_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_CLIENT_MENUITEM, DbusmenuClientMenuitemClass))
406
407 typedef struct _DbusmenuClientMenuitem DbusmenuClientMenuitem;
408 typedef struct _DbusmenuClientMenuitemClass DbusmenuClientMenuitemClass;
409
410=== added file 'libdbusmenu-glib/client-private.h'
411--- libdbusmenu-glib/client-private.h 1970-01-01 00:00:00 +0000
412+++ libdbusmenu-glib/client-private.h 2011-02-21 21:23:00 +0000
413@@ -0,0 +1,48 @@
414+/*
415+A library to communicate a menu object set accross DBus and
416+track updates and maintain consistency.
417+
418+Copyright 2011 Canonical Ltd.
419+
420+Authors:
421+ Ted Gould <ted@canonical.com>
422+
423+This program is free software: you can redistribute it and/or modify it
424+under the terms of either or both of the following licenses:
425+
426+1) the GNU Lesser General Public License version 3, as published by the
427+Free Software Foundation; and/or
428+2) the GNU Lesser General Public License version 2.1, as published by
429+the Free Software Foundation.
430+
431+This program is distributed in the hope that it will be useful, but
432+WITHOUT ANY WARRANTY; without even the implied warranties of
433+MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
434+PURPOSE. See the applicable version of the GNU Lesser General Public
435+License for more details.
436+
437+You should have received a copy of both the GNU Lesser General Public
438+License version 3 and version 2.1 along with this program. If not, see
439+<http://www.gnu.org/licenses/>
440+*/
441+
442+#ifndef __DBUSMENU_CLIENT_PRIVATE_H__
443+#define __DBUSMENU_CLIENT_PRIVATE_H__
444+
445+#include "client.h"
446+
447+G_BEGIN_DECLS
448+
449+void dbusmenu_client_send_event (DbusmenuClient * client,
450+ gint id,
451+ const gchar * name,
452+ GVariant * variant,
453+ guint timestamp);
454+void dbusmenu_client_send_about_to_show(DbusmenuClient * client,
455+ gint id,
456+ void (*cb) (gpointer user_data),
457+ gpointer cb_data);
458+
459+G_END_DECLS
460+
461+#endif
462
463=== modified file 'libdbusmenu-glib/client.c'
464--- libdbusmenu-glib/client.c 2011-02-21 12:12:33 +0000
465+++ libdbusmenu-glib/client.c 2011-02-21 21:23:00 +0000
466@@ -33,6 +33,7 @@
467 #include <gio/gio.h>
468
469 #include "client.h"
470+#include "client-private.h"
471 #include "menuitem.h"
472 #include "menuitem-private.h"
473 #include "client-menuitem.h"
474
475=== modified file 'libdbusmenu-glib/client.h'
476--- libdbusmenu-glib/client.h 2011-02-16 19:34:17 +0000
477+++ libdbusmenu-glib/client.h 2011-02-21 21:23:00 +0000
478@@ -43,17 +43,71 @@
479 #define DBUSMENU_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_CLIENT))
480 #define DBUSMENU_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_CLIENT, DbusmenuClientClass))
481
482+/**
483+ * DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED:
484+ *
485+ * String to attach to signal #DbusmenuClient::layout-updated
486+ */
487 #define DBUSMENU_CLIENT_SIGNAL_LAYOUT_UPDATED "layout-updated"
488+/**
489+ * DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED:
490+ *
491+ * String to attach to signal #DbusmenuClient::root-changed
492+ */
493 #define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED "root-changed"
494+/**
495+ * DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM:
496+ *
497+ * String to attach to signal #DbusmenuClient::new-menuitem
498+ */
499 #define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM "new-menuitem"
500+/**
501+ * DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE:
502+ *
503+ * String to attach to signal #DbusmenuClient::item-activate
504+ */
505 #define DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE "item-activate"
506+/**
507+ * DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT:
508+ *
509+ * String to attach to signal #DbusmenuClient::event-result
510+ */
511 #define DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT "event-result"
512
513+/**
514+ * DBUSMENU_CLIENT_PROP_DBUS_NAME:
515+ *
516+ * String to access property #DbusmenuClient:dbus-name
517+ */
518 #define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name"
519+/**
520+ * DBUSMENU_CLIENT_PROP_DBUS_OBJECT:
521+ *
522+ * String to access property #DbusmenuClient:dbus-object
523+ */
524 #define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object"
525
526+/**
527+ * DBUSMENU_CLIENT_TYPES_DEFAULT:
528+ *
529+ * Used to set the 'type' property on a menu item to create
530+ * a standard menu item.
531+ */
532 #define DBUSMENU_CLIENT_TYPES_DEFAULT "standard"
533+/**
534+ * DBUSMENU_CLIENT_TYPES_SEPARATOR:
535+ *
536+ * Used to set the 'type' property on a menu item to create
537+ * a separator menu item.
538+ */
539 #define DBUSMENU_CLIENT_TYPES_SEPARATOR "separator"
540+/**
541+ * DBUSMENU_CLIENT_TYPES_IMAGE:
542+ *
543+ * Used to set the 'type' property on a menu item to create
544+ * an image menu item. Deprecated as standard menu items now
545+ * support images as well.
546+ */
547 #define DBUSMENU_CLIENT_TYPES_IMAGE "standard"
548
549 typedef struct _DbusmenuClientPrivate DbusmenuClientPrivate;
550@@ -62,6 +116,7 @@
551 DbusmenuClientClass:
552 @parent_class: #GObjectClass
553 @layout_updated: Slot for #DbusmenuClient::layout-updated.
554+ @root_changed: Slot for #DbusmenuClient::root-changed.
555 @new_menuitem: Slot for #DbusmenuClient::new-menuitem.
556 @item_activate: Slot for #DbusmenuClient::item-activate.
557 @event_result: Slot for #DbusmenuClient::event-error.
558@@ -97,7 +152,6 @@
559
560 /**
561 DbusmenuClient:
562- @parent: #GObject.
563
564 The client for a #DbusmenuServer creating a shared
565 object set of #DbusmenuMenuitem objects.
566@@ -119,6 +173,9 @@
567
568 The type handler is called when a dbusmenu item is created
569 with a matching type as setup in #dbusmenu_client_add_type_handler
570+
571+ Return value: #TRUE if the type has been handled. #FALSE if this
572+ function was somehow unable to handle it.
573 */
574 typedef gboolean (*DbusmenuClientTypeHandler) (DbusmenuMenuitem * newitem, DbusmenuMenuitem * parent, DbusmenuClient * client, gpointer user_data);
575
576@@ -146,15 +203,6 @@
577 DbusmenuClientTypeHandler newfunc,
578 gpointer user_data,
579 DbusmenuClientTypeDestroyHandler destroy_func);
580-void dbusmenu_client_send_event (DbusmenuClient * client,
581- gint id,
582- const gchar * name,
583- GVariant * variant,
584- guint timestamp);
585-void dbusmenu_client_send_about_to_show(DbusmenuClient * client,
586- gint id,
587- void (*cb) (gpointer user_data),
588- gpointer cb_data);
589
590 /**
591 SECTION:client
592
593=== modified file 'libdbusmenu-glib/menuitem-proxy.h'
594--- libdbusmenu-glib/menuitem-proxy.h 2010-10-12 21:26:33 +0000
595+++ libdbusmenu-glib/menuitem-proxy.h 2011-02-21 21:23:00 +0000
596@@ -67,8 +67,7 @@
597 };
598
599 /**
600- DbusmeneMenuitemProxy:
601- @parent: The instance of #DbusmenuMenuitem
602+ DbusmenuMenuitemProxy:
603
604 Public instance data for a #DbusmenuMenuitemProxy.
605 */
606@@ -83,6 +82,17 @@
607 DbusmenuMenuitemProxy * dbusmenu_menuitem_proxy_new (DbusmenuMenuitem * mi);
608 DbusmenuMenuitem * dbusmenu_menuitem_proxy_get_wrapped (DbusmenuMenuitemProxy * pmi);
609
610+/**
611+ * SECTION:menuitem-proxy
612+ * @short_description: A menuitem that proxies from another menuitem
613+ * @stability: Unstable
614+ * @include: libdbusmenu-glib/menuitem-proxy.h
615+ *
616+ * This small object allows for proxying all the properties from a remote
617+ * menuitem to a new object that can be moved around appropriately within
618+ * the new menu structure.
619+ */
620+
621 G_END_DECLS
622
623 #endif
624
625=== modified file 'libdbusmenu-glib/menuitem.c'
626--- libdbusmenu-glib/menuitem.c 2011-02-21 12:12:33 +0000
627+++ libdbusmenu-glib/menuitem.c 2011-02-21 21:23:00 +0000
628@@ -1142,7 +1142,7 @@
629
630
631 /**
632- * dbusmenu_menuitem_property_exit:
633+ * dbusmenu_menuitem_property_exist:
634 * @mi: The #DbusmenuMenuitem to look for the property on.
635 * @property: The property to look for.
636 *
637
638=== modified file 'libdbusmenu-glib/menuitem.h'
639--- libdbusmenu-glib/menuitem.h 2011-02-21 12:12:33 +0000
640+++ libdbusmenu-glib/menuitem.h 2011-02-21 21:23:00 +0000
641@@ -42,47 +42,231 @@
642 #define DBUSMENU_MENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_MENUITEM, DbusmenuMenuitemClass))
643
644
645+/**
646+ * DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED:
647+ *
648+ * String to attach to signal #DbusmenuServer::property-changed
649+ */
650 #define DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED "property-changed"
651+/**
652+ * DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED:
653+ *
654+ * String to attach to signal #DbusmenuServer::item-activated
655+ */
656 #define DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED "item-activated"
657+/**
658+ * DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED:
659+ *
660+ * String to attach to signal #DbusmenuServer::child-added
661+ */
662 #define DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED "child-added"
663+/**
664+ * DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED:
665+ *
666+ * String to attach to signal #DbusmenuServer::child-removed
667+ */
668 #define DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED "child-removed"
669+/**
670+ * DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED:
671+ *
672+ * String to attach to signal #DbusmenuServer::child-moved
673+ */
674 #define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved"
675+/**
676+ * DBUSMENU_MENUITEM_SIGNAL_REALIZED:
677+ *
678+ * String to attach to signal #DbusmenuServer::realized
679+ */
680 #define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized"
681+/**
682+ * DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID:
683+ *
684+ * ID to attach to signal #DbusmenuServer::realized
685+ */
686 #define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM))
687+/**
688+ * DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER:
689+ *
690+ * String to attach to signal #DbusmenuServer::show-to-user
691+ */
692 #define DBUSMENU_MENUITEM_SIGNAL_SHOW_TO_USER "show-to-user"
693+/**
694+ * DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW:
695+ *
696+ * String to attach to signal #DbusmenuServer::about-to-show
697+ */
698 #define DBUSMENU_MENUITEM_SIGNAL_ABOUT_TO_SHOW "about-to-show"
699
700+/**
701+ * DBUSMENU_MENUITEM_PROP_TYPE:
702+ *
703+ * #DbusmenuMenuitem property used to represent what type of menuitem
704+ * this object represents. Type: #G_VARIANT_TYPE_STRING.
705+ */
706 #define DBUSMENU_MENUITEM_PROP_TYPE "type"
707+/**
708+ * DBUSMENU_MENUITEM_PROP_VISIBLE:
709+ *
710+ * #DbusmenuMenuitem property used to represent whether the menuitem
711+ * should be shown or not. Type: #G_VARIANT_TYPE_BOOLEAN.
712+ */
713 #define DBUSMENU_MENUITEM_PROP_VISIBLE "visible"
714+/**
715+ * DBUSMENU_MENUITEM_PROP_ENABLED:
716+ *
717+ * #DbusmenuMenuitem property used to represent whether the menuitem
718+ * is clickable or not. Type: #G_VARIANT_TYPE_BOOLEAN.
719+ */
720 #define DBUSMENU_MENUITEM_PROP_ENABLED "enabled"
721+/**
722+ * DBUSMENU_MENUITEM_PROP_LABEL:
723+ *
724+ * #DbusmenuMenuitem property used for the text on the menu item.
725+ * Type: #G_VARIANT_TYPE_STRING
726+ */
727 #define DBUSMENU_MENUITEM_PROP_LABEL "label"
728+/**
729+ * DBUSMENU_MENUITEM_PROP_ICON_NAME:
730+ *
731+ * #DbusmenuMenuitem property that is the name of the icon under the
732+ * Freedesktop.org icon naming spec. Type: #G_VARIANT_TYPE_STRING
733+ */
734 #define DBUSMENU_MENUITEM_PROP_ICON_NAME "icon-name"
735+/**
736+ * DBUSMENU_MENUITEM_PROP_ICON_DATA:
737+ *
738+ * #DbusmenuMenuitem property that is the raw data of a custom icon
739+ * used in the application. Type: #G_VARIANT_TYPE_VARIANT
740+ *
741+ * It is recommended that this is not set directly but instead the
742+ * libdbusmenu-gtk library is used with the function dbusmenu_menuitem_property_set_image()
743+ */
744 #define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data"
745+/**
746+ * DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE:
747+ *
748+ * #DbusmenuMenuitem property that says what type of toggle entry should
749+ * be shown in the menu. Should be either #DBUSMENU_MENUITEM_TOGGLE_CHECK
750+ * or #DBUSMENU_MENUITEM_TOGGLE_RADIO. Type: #G_VARIANT_TYPE_STRING
751+ */
752 #define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type"
753+/**
754+ * DBUSMENU_MENUITEM_PROP_TOGGLE_STATE:
755+ *
756+ * #DbusmenuMenuitem property that says what state a toggle entry should
757+ * be shown as the menu. Should be either #DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED
758+ * #DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED or #DBUSMENU_MENUITEM_TOGGLE_STATUE_UNKNOWN.
759+ * Type: #G_VARIANT_TYPE_INT32
760+ */
761 #define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state"
762+/**
763+ * DBUSMENU_MENUITEM_PROP_SHORTCUT:
764+ *
765+ * #DbusmenuMenuitem property that is the entries that represent a shortcut
766+ * to activate the menuitem. It is an array of arrays of strings.
767+ * Type: #G_VARIANT_TYPE_ARRAY
768+ *
769+ * It is recommended that this is not set directly but instead the
770+ * libdbusmenu-gtk library is used with the function dbusmenu_menuitem_property_set_shortcut()
771+ */
772 #define DBUSMENU_MENUITEM_PROP_SHORTCUT "shortcut"
773+/**
774+ * DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY:
775+ *
776+ * #DbusmenuMenuitem property that tells how the children of this menuitem
777+ * should be displayed. Most likely this will be unset or of the value
778+ * #DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU. Type: #G_VARIANT_TYPE_STRING
779+ */
780 #define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display"
781
782+/**
783+ * DBUSMENU_MENUITEM_TOGGLE_CHECK:
784+ *
785+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE to be a standard
786+ * check mark item.
787+ */
788 #define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark"
789+/**
790+ * DBUSMENU_MENUITEM_TOGGLE_RADIO:
791+ *
792+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE to be a standard
793+ * radio item.
794+ */
795 #define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio"
796
797+/**
798+ * DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED:
799+ *
800+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_STATE so that the menu's
801+ * toggle item is empty.
802+ */
803 #define DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED 0
804+/**
805+ * DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED:
806+ *
807+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_STATE so that the menu's
808+ * toggle item is filled.
809+ */
810 #define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1
811+/**
812+ * DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN:
813+ *
814+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_STATE so that the menu's
815+ * toggle item is undecided.
816+ */
817 #define DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN -1
818
819+/**
820+ * DBUSMENU_MENUITEM_ICON_NAME_BLANK:
821+ *
822+ * Used to set #DBUSMENU_MENUITEM_PROP_TOGGLE_STATE so that the menu's
823+ * toggle item is undecided.
824+ */
825 #define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon"
826
827+/**
828+ * DBUSMENU_MENUITEM_SHORTCUT_CONTROL:
829+ *
830+ * Used in #DBUSMENU_MENUITEM_PROP_SHORTCUT to represent the
831+ * control key.
832+ */
833 #define DBUSMENU_MENUITEM_SHORTCUT_CONTROL "Control"
834+/**
835+ * DBUSMENU_MENUITEM_SHORTCUT_ALT:
836+ *
837+ * Used in #DBUSMENU_MENUITEM_PROP_SHORTCUT to represent the
838+ * alternate key.
839+ */
840 #define DBUSMENU_MENUITEM_SHORTCUT_ALT "Alt"
841+/**
842+ * DBUSMENU_MENUITEM_SHORTCUT_SHIFT:
843+ *
844+ * Used in #DBUSMENU_MENUITEM_PROP_SHORTCUT to represent the
845+ * shift key.
846+ */
847 #define DBUSMENU_MENUITEM_SHORTCUT_SHIFT "Shift"
848+/**
849+ * DBUSMENU_MENUITEM_SHORTCUT_SUPER:
850+ *
851+ * Used in #DBUSMENU_MENUITEM_PROP_SHORTCUT to represent the
852+ * super key.
853+ */
854 #define DBUSMENU_MENUITEM_SHORTCUT_SUPER "Super"
855
856+/**
857+ * DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU:
858+ *
859+ * Used in #DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY to have the
860+ * subitems displayed as a submenu.
861+ */
862 #define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu"
863
864 typedef struct _DbusmenuMenuitemPrivate DbusmenuMenuitemPrivate;
865
866 /**
867 * DbusmenuMenuitem:
868+ * @parent: Parent object
869+ * @priv: Private data
870 *
871 * This is the #GObject based object that represents a menu
872 * item. It gets created the same on both the client and
873@@ -113,16 +297,18 @@
874 /**
875 * dbusmenu_menuitem_buildvariant_slot_t:
876 * @mi: (in): Menu item that should be built from
877+ * @properties: (allow-none): A list of properties that should be the only ones in the resulting variant structure
878 *
879 * This is the function that is called to represent this menu item
880 * as a variant. Should call it's own children.
881 *
882- * Return value: (transfer full) A variant representing this item and it's children
883+ * Return value: (transfer full): A variant representing this item and it's children
884 */
885 typedef GVariant * (*dbusmenu_menuitem_buildvariant_slot_t) (DbusmenuMenuitem * mi, gchar ** properties);
886
887 /**
888 * DbusmenuMenuitemClass:
889+ * @parent_class: Functions and signals from our parent
890 * @property_changed: Slot for #DbusmenuMenuitem::property-changed.
891 * @item_activated: Slot for #DbusmenuMenuitem::item-activated.
892 * @child_added: Slot for #DbusmenuMenuitem::child-added.
893@@ -130,17 +316,19 @@
894 * @child_moved: Slot for #DbusmenuMenuitem::child-moved.
895 * @realized: Slot for #DbusmenuMenuitem::realized.
896 * @about_to_show: Slot for #DbusmenuMenuitem::about-to-show.
897- * @buildxml: Virtual function that appends the strings required to represent this menu item in the menu XML file.
898+ * @buildvariant: Virtual function that appends the strings required to represent this menu item in the menu variant.
899 * @handle_event: This function is to override how events are handled by subclasses. Look at #dbusmenu_menuitem_handle_event for lots of good information.
900 * @send_about_to_show: Virtual function that notifies server that the client is about to show a menu.
901 * @show_to_user: Slot for #DbusmenuMenuitem::show-to-user.
902- *
903 * @reserved1: Reserved for future use.
904 * @reserved2: Reserved for future use.
905 * @reserved3: Reserved for future use.
906 * @reserved4: Reserved for future use.
907 * @reserved5: Reserved for future use.
908 * @reserved6: Reserved for future use.
909+ *
910+ * Functions and signals that every menuitem should know something
911+ * about.
912 */
913 typedef struct _DbusmenuMenuitemClass DbusmenuMenuitemClass;
914 struct _DbusmenuMenuitemClass
915
916=== modified file 'libdbusmenu-glib/server.h'
917--- libdbusmenu-glib/server.h 2010-10-12 21:14:21 +0000
918+++ libdbusmenu-glib/server.h 2011-02-21 21:23:00 +0000
919@@ -43,14 +43,54 @@
920 #define DBUSMENU_IS_SERVER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_SERVER))
921 #define DBUSMENU_SERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_SERVER, DbusmenuServerClass))
922
923+/**
924+ * DBUSMENU_SERVER_SIGNAL_ID_PROP_UPDATE:
925+ *
926+ * String to attach to signal #DbusmenuServer::item-property-updated
927+ */
928 #define DBUSMENU_SERVER_SIGNAL_ID_PROP_UPDATE "item-property-updated"
929+/**
930+ * DBUSMENU_SERVER_SIGNAL_ID_UPDATE:
931+ *
932+ * String to attach to signal #DbusmenuServer::item-updated
933+ */
934 #define DBUSMENU_SERVER_SIGNAL_ID_UPDATE "item-updated"
935+/**
936+ * DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED:
937+ *
938+ * String to attach to signal #DbusmenuServer::layout-updated
939+ */
940 #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED "layout-updated"
941+/**
942+ * DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION:
943+ *
944+ * String to attach to signal #DbusmenuServer::item-activation-requested
945+ */
946 #define DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION "item-activation-requested"
947+/**
948+ * DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE:
949+ *
950+ * String to attach to signal #DbusmenuServer::layout-updated
951+ */
952 #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED
953
954+/**
955+ * DBUSMENU_SERVER_PROP_DBUS_OBJECT:
956+ *
957+ * String to access property #DbusmenuServer:dbus-object
958+ */
959 #define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object"
960+/**
961+ * DBUSMENU_SERVER_PROP_ROOT_NODE:
962+ *
963+ * String to access property #DbusmenuServer:root-node
964+ */
965 #define DBUSMENU_SERVER_PROP_ROOT_NODE "root-node"
966+/**
967+ * DBUSMENU_SERVER_PROP_VERSION:
968+ *
969+ * String to access property #DbusmenuServer:version
970+ */
971 #define DBUSMENU_SERVER_PROP_VERSION "version"
972
973 typedef struct _DbusmenuServerPrivate DbusmenuServerPrivate;
974@@ -61,8 +101,7 @@
975 @id_prop_update: Slot for #DbusmenuServer::id-prop-update.
976 @id_update: Slot for #DbusmenuServer::id-update.
977 @layout_updated: Slot for #DbusmenuServer::layout-update.
978- @item_activation_requested: Slot for #DbusmenuServer::item-activation-requested.
979-
980+ @item_activation: Slot for #DbusmenuServer::item-activation-requested.
981 @reserved1: Reserved for future use.
982 @reserved2: Reserved for future use.
983 @reserved3: Reserved for future use.
984@@ -93,7 +132,6 @@
985
986 /**
987 DbusmenuServer:
988- @parent: #GObject
989
990 A server which represents a sharing of a set of
991 #DbusmenuMenuitems across DBus to a #DbusmenuClient.
992@@ -108,10 +146,10 @@
993
994 GType dbusmenu_server_get_type (void);
995 DbusmenuServer * dbusmenu_server_new (const gchar * object);
996-void dbusmenu_server_set_root (DbusmenuServer * server, DbusmenuMenuitem * root);
997+void dbusmenu_server_set_root (DbusmenuServer * self, DbusmenuMenuitem * root);
998
999 /**
1000- SECIONT:server
1001+ SECTION:server
1002 @short_description: The server signals changed and
1003 updates on a tree of #DbusmenuMenuitem objecs.
1004 @stability: Unstable
1005
1006=== modified file 'libdbusmenu-gtk/client.h'
1007--- libdbusmenu-gtk/client.h 2010-10-12 21:16:55 +0000
1008+++ libdbusmenu-gtk/client.h 2011-02-21 21:23:00 +0000
1009@@ -41,20 +41,28 @@
1010 #define DBUSMENU_IS_GTKCLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_GTKCLIENT_TYPE))
1011 #define DBUSMENU_GTKCLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_GTKCLIENT_TYPE, DbusmenuGtkClientClass))
1012
1013+/**
1014+ * DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED:
1015+ *
1016+ * String to attach to signal #DbusmenuClient::root-changed
1017+ */
1018 #define DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED
1019
1020 typedef struct _DbusmenuGtkClientPrivate DbusmenuGtkClientPrivate;
1021
1022 /**
1023- DbusmenuGtkClientClass:
1024- @parent_class: #GtkMenuClass
1025- @reserved1: Reserved for future use.
1026- @reserved2: Reserved for future use.
1027- @reserved3: Reserved for future use.
1028- @reserved4: Reserved for future use.
1029- @reserved5: Reserved for future use.
1030- @reserved6: Reserved for future use.
1031-*/
1032+ * DbusmenuGtkClientClass:
1033+ * @parent_class: #GtkMenuClass
1034+ * @root_changed: Slot for signal #DbusmenuGtkClient::root-changed
1035+ * @reserved1: Reserved for future use.
1036+ * @reserved2: Reserved for future use.
1037+ * @reserved3: Reserved for future use.
1038+ * @reserved4: Reserved for future use.
1039+ * @reserved5: Reserved for future use.
1040+ * @reserved6: Reserved for future use.
1041+ *
1042+ * Functions and signal slots for using a #DbusmenuGtkClient
1043+ */
1044 typedef struct _DbusmenuGtkClientClass DbusmenuGtkClientClass;
1045 struct _DbusmenuGtkClientClass {
1046 DbusmenuClientClass parent_class;
1047@@ -72,9 +80,11 @@
1048 };
1049
1050 /**
1051- DbusmenuGtkClient:
1052- @parent: #GtkMenu
1053-*/
1054+ * DbusmenuGtkClient:
1055+ *
1056+ * A subclass of #DbusmenuClient to add functionality with regarding
1057+ * building GTK items out of the abstract tree.
1058+ */
1059 typedef struct _DbusmenuGtkClient DbusmenuGtkClient;
1060 struct _DbusmenuGtkClient {
1061 DbusmenuClient parent;
1062@@ -94,10 +104,10 @@
1063 void dbusmenu_gtkclient_newitem_base (DbusmenuGtkClient * client, DbusmenuMenuitem * item, GtkMenuItem * gmi, DbusmenuMenuitem * parent);
1064
1065 /**
1066- SECTION:gtkmenu
1067- @short_description: A GTK Menu Object that syncronizes over DBus
1068+ SECTION:client
1069+ @short_description: A subclass of #DbusmenuClient adding GTK level features
1070 @stability: Unstable
1071- @include: libdbusmenu-gtk/menu.h
1072+ @include: libdbusmenu-gtk/client.h
1073
1074 In general, this is just a #GtkMenu, why else would you care? Oh,
1075 because this menu is created by someone else on a server that exists
1076@@ -115,8 +125,6 @@
1077 number of entries change, the menus change, if they change thier
1078 properties change, they update in the items. All of this should
1079 be handled transparently to the user of this object.
1080-
1081- TODO: Document properties.
1082 */
1083 G_END_DECLS
1084
1085
1086=== modified file 'libdbusmenu-gtk/genericmenuitem.c'
1087--- libdbusmenu-gtk/genericmenuitem.c 2011-02-16 20:06:14 +0000
1088+++ libdbusmenu-gtk/genericmenuitem.c 2011-02-21 21:23:00 +0000
1089@@ -32,7 +32,7 @@
1090
1091 #include "genericmenuitem.h"
1092
1093-/**
1094+/*
1095 GenericmenuitemPrivate:
1096 @check_type: What type of check we have, or none at all.
1097 @state: What the state of our check is.
1098
1099=== modified file 'libdbusmenu-gtk/genericmenuitem.h'
1100--- libdbusmenu-gtk/genericmenuitem.h 2009-12-17 20:25:32 +0000
1101+++ libdbusmenu-gtk/genericmenuitem.h 2011-02-21 21:23:00 +0000
1102@@ -48,7 +48,7 @@
1103 typedef enum _GenericmenuitemCheckType GenericmenuitemCheckType;
1104 typedef enum _GenericmenuitemState GenericmenuitemState;
1105
1106-/**
1107+/*
1108 GenericmenuitemClass:
1109 @parent_class: Our parent #GtkCheckMenuItemClass
1110 */
1111@@ -56,7 +56,7 @@
1112 GtkCheckMenuItemClass parent_class;
1113 };
1114
1115-/**
1116+/*
1117 Genericmenuitem:
1118 @parent: Our parent #GtkCheckMenuItem
1119 */
1120
1121=== modified file 'libdbusmenu-gtk/menu.c'
1122--- libdbusmenu-gtk/menu.c 2011-02-21 11:43:43 +0000
1123+++ libdbusmenu-gtk/menu.c 2011-02-21 21:23:00 +0000
1124@@ -103,7 +103,7 @@
1125 if (priv->client != NULL) {
1126 /* TODO: We should stop the display of the menu
1127 until the about to show call returns. */
1128- dbusmenu_client_send_about_to_show(DBUSMENU_CLIENT(priv->client), 0, NULL, NULL);
1129+ dbusmenu_menuitem_send_about_to_show(priv->root, NULL, NULL);
1130 }
1131 return;
1132 }
1133
1134=== modified file 'libdbusmenu-gtk/menu.h'
1135--- libdbusmenu-gtk/menu.h 2010-10-12 21:16:55 +0000
1136+++ libdbusmenu-gtk/menu.h 2011-02-21 21:23:00 +0000
1137@@ -45,15 +45,18 @@
1138 typedef struct _DbusmenuGtkMenuPrivate DbusmenuGtkMenuPrivate;
1139
1140 /**
1141- DbusmenuGtkMenuClass:
1142- @parent_class: #GtkMenuClass
1143- @reserved1: Reserved for future use.
1144- @reserved2: Reserved for future use.
1145- @reserved3: Reserved for future use.
1146- @reserved4: Reserved for future use.
1147- @reserved5: Reserved for future use.
1148- @reserved6: Reserved for future use.
1149-*/
1150+ * DbusmenuGtkMenuClass:
1151+ * @parent_class: #GtkMenuClass
1152+ * @reserved1: Reserved for future use.
1153+ * @reserved2: Reserved for future use.
1154+ * @reserved3: Reserved for future use.
1155+ * @reserved4: Reserved for future use.
1156+ * @reserved5: Reserved for future use.
1157+ * @reserved6: Reserved for future use.
1158+ *
1159+ * All of the subclassable functions and signal slots for a
1160+ * #DbusmenuGtkMenu.
1161+ */
1162 typedef struct _DbusmenuGtkMenuClass DbusmenuGtkMenuClass;
1163 struct _DbusmenuGtkMenuClass {
1164 GtkMenuClass parent_class;
1165@@ -68,9 +71,11 @@
1166 };
1167
1168 /**
1169- DbusmenuGtkMenu:
1170- @parent: #GtkMenu
1171-*/
1172+ * DbusmenuGtkMenu:
1173+ *
1174+ * A #GtkMenu that is built using an abstract tree built from
1175+ * a #DbusmenuGtkClient.
1176+ */
1177 typedef struct _DbusmenuGtkMenu DbusmenuGtkMenu;
1178 struct _DbusmenuGtkMenu {
1179 GtkMenu parent;
1180@@ -84,7 +89,7 @@
1181 DbusmenuGtkClient * dbusmenu_gtkmenu_get_client (DbusmenuGtkMenu * menu);
1182
1183 /**
1184- SECTION:gtkmenu
1185+ SECTION:menu
1186 @short_description: A GTK Menu Object that syncronizes over DBus
1187 @stability: Unstable
1188 @include: libdbusmenu-gtk/menu.h
1189@@ -105,8 +110,6 @@
1190 number of entries change, the menus change, if they change thier
1191 properties change, they update in the items. All of this should
1192 be handled transparently to the user of this object.
1193-
1194- TODO: Document properties.
1195 */
1196 G_END_DECLS
1197
1198
1199=== modified file 'libdbusmenu-gtk/menuitem.h'
1200--- libdbusmenu-gtk/menuitem.h 2011-02-16 20:06:14 +0000
1201+++ libdbusmenu-gtk/menuitem.h 2011-02-21 21:23:00 +0000
1202@@ -45,6 +45,17 @@
1203 gboolean dbusmenu_menuitem_property_set_shortcut_menuitem (DbusmenuMenuitem * menuitem, const GtkMenuItem * gmi);
1204 void dbusmenu_menuitem_property_get_shortcut (DbusmenuMenuitem * menuitem, guint * key, GdkModifierType * modifier);
1205
1206+/**
1207+ SECTION:menuitem
1208+ @short_description: Helpers for #DbusmenuMenuitem properties that require a GTK dependency
1209+ @stability: Unstable
1210+ @include: libdbusmenu-gtk/menuitem.h
1211+
1212+ Some property helpers can't be done without picking up a GTK+
1213+ dependency. So those sit in libdbusmenu-gtk but have very similar
1214+ prototypes to the code in libdbusmenu-glib so your code will
1215+ look consistent, just with the extra depedency.
1216+*/
1217 G_END_DECLS
1218
1219 #endif
1220
1221=== modified file 'libdbusmenu-gtk/parser.h'
1222--- libdbusmenu-gtk/parser.h 2011-01-23 19:16:20 +0000
1223+++ libdbusmenu-gtk/parser.h 2011-02-21 21:23:00 +0000
1224@@ -32,6 +32,20 @@
1225 #include <libdbusmenu-glib/menuitem.h>
1226 #include <gtk/gtk.h>
1227
1228+G_BEGIN_DECLS
1229+
1230 DbusmenuMenuitem * dbusmenu_gtk_parse_menu_structure (GtkWidget * widget);
1231
1232+/**
1233+ SECTION:parser
1234+ @short_description: A parser of in-memory GTK menu trees
1235+ @stability: Unstable
1236+ @include: libdbusmenu-gtk/parser.h
1237+
1238+ The parser will take a GTK menu tree and attach it to a Dbusmenu menu
1239+ tree. Along with setting up all the signals for updates and destruction.
1240+ The returned item would be the root item of the given tree.
1241+*/
1242+G_END_DECLS
1243+
1244 #endif /* DBUSMENU_GTK_PARSER_H__ */
1245
1246=== modified file 'libdbusmenu-gtk/serializablemenuitem.h'
1247--- libdbusmenu-gtk/serializablemenuitem.h 2011-01-27 15:40:30 +0000
1248+++ libdbusmenu-gtk/serializablemenuitem.h 2011-02-21 21:23:00 +0000
1249@@ -44,6 +44,11 @@
1250 #define DBUSMENU_IS_GTK_SERIALIZABLE_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DBUSMENU_TYPE_GTK_SERIALIZABLE_MENU_ITEM))
1251 #define DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DBUSMENU_TYPE_GTK_SERIALIZABLE_MENU_ITEM, DbusmenuGtkSerializableMenuItemClass))
1252
1253+/**
1254+ * DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM:
1255+ *
1256+ * String to access property #DbusmenuGtkSerializableMenuItem:dbusmenu-menuitem
1257+ */
1258 #define DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM "dbusmenu-menuitem"
1259
1260 typedef struct _DbusmenuGtkSerializableMenuItem DbusmenuGtkSerializableMenuItem;
1261@@ -62,6 +67,8 @@
1262 @_dbusmenu_gtk_serializable_menu_item_reserved4: Reserved for future use.
1263 @_dbusmenu_gtk_serializable_menu_item_reserved5: Reserved for future use.
1264 @_dbusmenu_gtk_serializable_menu_item_reserved6: Reserved for future use.
1265+
1266+ Signals and functions for #DbusmenuGtkSerializableMenuItem.
1267 */
1268 struct _DbusmenuGtkSerializableMenuItemClass {
1269 GtkMenuItemClass parent_class;
1270@@ -110,6 +117,17 @@
1271 void dbusmenu_gtk_serializable_menu_item_register_to_client (DbusmenuClient * client, GType item_type);
1272 void dbusmenu_gtk_serializable_menu_item_set_menuitem (DbusmenuGtkSerializableMenuItem * smi, DbusmenuMenuitem * mi);
1273
1274+/**
1275+ SECTION:serializablemenuitem
1276+ @short_description: A way to build #GtkMenuItems that can be sent over Dbusmenu
1277+ @stability: Unstable
1278+ @include: libdbusmenu-gtk/serializablemenuitem.h
1279+
1280+ Menuitems can subclass from this instead of #GtkMenuItem and
1281+ by providing the appropriate functions Dbusmenu will be able
1282+ to parse them and send them over the bus.
1283+*/
1284+
1285 G_END_DECLS
1286
1287 #endif

Subscribers

People subscribed via source and target branches