Merge lp:~agateau/libdbusmenu/new-api into lp:libdbusmenu/0.5

Proposed by Aurélien Gâteau
Status: Merged
Merged at revision: not available
Proposed branch: lp:~agateau/libdbusmenu/new-api
Merge into: lp:libdbusmenu/0.5
Diff against target: 175 lines (+80/-59)
1 file modified
libdbusmenu-glib/dbus-menu.xml (+80/-59)
To merge this branch: bzr merge lp:~agateau/libdbusmenu/new-api
Reviewer Review Type Date Requested Status
Robert Collins (community) Needs Information
Review via email: mp+14845@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Aurélien Gâteau (agateau) wrote :

The new dbusmenu api we discussed

lp:~agateau/libdbusmenu/new-api updated
34. By Aurélien Gâteau

Removed ItemAdded/ItemRemoved for now

35. By Aurélien Gâteau

Fixed type of value param in ItemPropertyUpdated() signal

Revision history for this message
Robert Collins (lifeless) wrote :

+@li visible boolean Whether the item is visible or not (XXX: Is this necessary?)

If we're not sure, lets not include this. Easier to add to API's than to remove.

Other than this, the definitions seem fine - but where is the matching code changes?

review: Needs Information
Revision history for this message
Aurélien Gâteau (agateau) wrote :

> +@li visible boolean Whether the item is visible or not (XXX: Is this
> necessary?)
>
> If we're not sure, lets not include this. Easier to add to API's than to
> remove.

I agree.

> Other than this, the definitions seem fine - but where is the matching code
> changes?

They do not exist right now.

When Ted asked me to create a merge request for these changes, I told him it would break the build, but I think he replied he would merge the changes in a private branch or something. Ted, can you comment on this?

Revision history for this message
Ted Gould (ted) wrote :

On Fri, 2009-11-27 at 16:56 +0000, Aurélien Gâteau wrote:
> > Other than this, the definitions seem fine - but where is the matching code
> > changes?
>
> They do not exist right now.
>
> When Ted asked me to create a merge request for these changes, I told him it would break the build, but I think he replied he would merge the changes in a private branch or something. Ted, can you comment on this?

Yes, the goal here was to track it as a todo item, not actually merge it
in directly. Sorry that wasn't clear, but Aurelien and I had discussed
it in person and not put that information together in a place where
everyone could see it. Our fault.

This will get merged in, but it'll have to go through another branch at
some point.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdbusmenu-glib/dbus-menu.xml'
2--- libdbusmenu-glib/dbus-menu.xml 2009-10-28 17:01:12 +0000
3+++ libdbusmenu-glib/dbus-menu.xml 2009-11-13 21:26:09 +0000
4@@ -30,91 +30,112 @@
5 <node name="/">
6 <interface name="org.freedesktop.dbusmenu">
7
8-<!-- Properties -->
9-<!--
10-Provides an XML representation of the menu hierarchy
11-
12-XML syntax:
13-
14-<menu id="1" revision="2"> # Root container
15- <menu id="2" revision="2"> # First level menu, for example "File"
16- <menu id="3" revision="2"/> ~ Second level menu, for example "Open"
17- <menu id="4" revision="3"/>
18- ...
19- </menu>
20- <menu id="5" revision="2"> # Another first level menu, say "Edit"
21- ...
22- </menu>
23- ...
24-</menu>
25--->
26- <property name="layout" type="s" access="read"/>
27-
28 <!-- Functions -->
29
30 <!--
31+Returns the list of items which are children of @a parentId.
32+
33+@param parentid unsigned the parent id for the list. If it is 0, returns the root
34+item list;
35+@param propertyNames list of string the list of item properties we are interested in
36+
37+An item is represented as a struct following this format:
38+@li id unsigned the item id
39+@li properties map(string => variant) the requested item properties
40+
41+-->
42+ <method name="GetChildren">
43+ <arg type="u" name="parentId" direction="in" />
44+ <arg type="as" name="propertyNames" direction="in" />
45+ <arg type="a(ua{sv})" name="children" direction="out" />
46+ </method>
47+
48+<!--
49 Each menu item has a set of properties. Property keys are in menuitem.h:
50
51-- visible
52-- sensitive
53-- label
54-- icon
55-- icon-data
56-- type
57-
58-"type" property is an enum which can take the following values (client.h):
59-
60-- menuitem
61-- separator
62-- imageitem
63+@li type string Type of the item (see below)
64+@li label string Text of the item
65+@li icon-data binary Raw data of the icon (TODO: define format)
66+@li icon string Icon name of the item, following icon spec
67+@li sensitive boolean Whether the item can be activated or not
68+@li visible boolean Whether the item is visible or not (XXX: Is this necessary?)
69+@li checked boolean Whether a checkbox or radio item is checked
70+@li shortcut string The keyboard shortcut
71+
72+@c type property is an enum which can take the following values (client.h):
73+
74+@li action An item which can be clicked to trigger an action
75+@li checkbox An item which can be checked or unchecked
76+@li radio An item which can be checked or unchecked as part of a group
77+@li separator A separator
78+@li menu An item which contains more items
79 -->
80 <method name="GetProperty">
81 <arg type="u" name="id" direction="in" />
82- <arg type="s" name="property" direction="in" />
83- <arg type="s" name="value" direction="out" />
84+ <arg type="s" name="name" direction="in" />
85+ <arg type="v" name="value" direction="out" />
86 </method>
87
88 <!--
89-Convenience method to retrieve all properties in one call (more efficient)
90+Returns multiple properties in one call. This is more efficient than
91+GetProperty.
92+
93+@param id unsigned the item whose properties we want to retrieve.
94+@param propertyNames list of string name of the properties we want.
95 -->
96 <method name="GetProperties">
97+ <annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
98 <arg type="u" name="id" direction="in" />
99- <arg type="a{ss}" name="properties" direction="out" />
100+ <arg type="as" name="propertyNames" direction="in" />
101+ <arg type="a{sv}" name="properties" direction="out" />
102 </method>
103
104 <!--
105-This is called by the display to notify the application it should trigger
106-the action associated with a specific menu id
107+This is called by the applet to notify the application an event happened on a
108+menu item.
109+
110+@param id the id of the item which received the event
111+@param type the type of event
112+@param data event-specific data
113+
114+@a type can be one of the following:
115+
116+@li "clicked"
117+@li "hovered"
118+
119+Vendor specific events can be added by prefixing them with "x-<vendor>-"
120 -->
121- <method name="Call">
122+ <method name="Event">
123 <arg type="u" name="id" direction="in" />
124+ <arg type="s" name="eventId" direction="in" />
125+ <arg type="v" name="data" direction="in" />
126 </method>
127
128 <!-- Signals -->
129 <!--
130-Triggered by the application to notify display that the property prop from menu id
131-as changed to value.
132+Triggered by the application to notify the applet that the property @a property
133+from item @a id has changed to @a value.
134 -->
135- <signal name="IdPropUpdate">
136+ <signal name="ItemPropertyUpdated">
137 <arg type="u" name="id" direction="out" />
138 <arg type="s" name="prop" direction="out" />
139- <arg type="s" name="value" direction="out" />
140- </signal>
141-
142-<!--
143-Triggered by the application to notify display that all properties of menu id
144-should be considered outdated
145--->
146- <signal name="IdUpdate">
147- <arg type="u" name="id" direction="out" />
148- </signal>
149-
150-<!--
151-Triggered by the application to notify display of a layout update, up to
152-revision
153--->
154- <signal name="LayoutUpdate">
155- <arg type="i" name="revision" direction="out" />
156+ <arg type="v" name="value" direction="out" />
157+ </signal>
158+
159+<!--
160+Triggered by the application to notify the applet that all properties of item
161+@a id should be considered outdated
162+-->
163+ <signal name="ItemUpdated">
164+ <arg type="u" name="id" direction="out" />
165+ </signal>
166+
167+<!--
168+Triggered by the application to notify applet it should retrieve the children
169+for item @a id.
170+-->
171+ <signal name="ChildrenUpdated">
172+ <arg type="u" name="id" direction="out" />
173 </signal>
174
175 <!-- End of interesting stuff -->

Subscribers

People subscribed via source and target branches