diff options
23 files changed, 128 insertions, 46 deletions
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.7. +# Generated by GNU Autoconf 2.65 for libdbusmenu 0.3.8. # # Report bugs to <ted@canonical.com>. # @@ -703,8 +703,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libdbusmenu' PACKAGE_TARNAME='libdbusmenu' -PACKAGE_VERSION='0.3.7' -PACKAGE_STRING='libdbusmenu 0.3.7' +PACKAGE_VERSION='0.3.8' +PACKAGE_STRING='libdbusmenu 0.3.8' PACKAGE_BUGREPORT='ted@canonical.com' PACKAGE_URL='' @@ -1532,7 +1532,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libdbusmenu 0.3.7 to adapt to many kinds of systems. +\`configure' configures libdbusmenu 0.3.8 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1602,7 +1602,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libdbusmenu 0.3.7:";; + short | recursive ) echo "Configuration of libdbusmenu 0.3.8:";; esac cat <<\_ACEOF @@ -1740,7 +1740,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libdbusmenu configure 0.3.7 +libdbusmenu configure 0.3.8 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2113,7 +2113,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libdbusmenu $as_me 0.3.7, which was +It was created by libdbusmenu $as_me 0.3.8, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2927,7 +2927,7 @@ fi # Define the identity of the package. PACKAGE=libdbusmenu - VERSION=0.3.7 + VERSION=0.3.8 # Some tools Automake needs. @@ -14378,7 +14378,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libdbusmenu $as_me 0.3.7, which was +This file was extended by libdbusmenu $as_me 0.3.8, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -14444,7 +14444,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libdbusmenu config.status 0.3.7 +libdbusmenu config.status 0.3.8 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d54dc41..d8211b1 100644 --- a/configure.ac +++ b/configure.ac @@ -1,11 +1,11 @@ -AC_INIT(libdbusmenu, 0.3.7, ted@canonical.com) +AC_INIT(libdbusmenu, 0.3.8, ted@canonical.com) AC_COPYRIGHT([Copyright 2009,2010 Canonical]) AC_PREREQ(2.62) AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(libdbusmenu, 0.3.7, [-Wno-portability]) +AM_INIT_AUTOMAKE(libdbusmenu, 0.3.8, [-Wno-portability]) AM_MAINTAINER_MODE diff --git a/docs/libdbusmenu-glib/reference/html/ch01.html b/docs/libdbusmenu-glib/reference/html/ch01.html index 48060c6..52d9390 100644 --- a/docs/libdbusmenu-glib/reference/html/ch01.html +++ b/docs/libdbusmenu-glib/reference/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter" title="API"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id574520"></a>API</h2></div></div></div> +<a name="id571209"></a>API</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="libdbusmenu-glib-DbusmenuServer.html">DbusmenuServer</a></span><span class="refpurpose"></span> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html index a57102c..4d78bf2 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuClient.html @@ -455,6 +455,7 @@ This function connects into the type handling of the <a class="link" href="libdb <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> diff --git a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html index 0c5c14d..3dd3372 100644 --- a/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html +++ b/docs/libdbusmenu-glib/reference/html/libdbusmenu-glib-DbusmenuServer.html @@ -144,12 +144,12 @@ A server which represents a sharing of a set of void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); } DbusmenuServerClass; </pre> <p> @@ -180,22 +180,22 @@ The class implementing the virtual functions for <a class="link" href="libdbusme </td> </tr> <tr> -<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.dbusmenu-server-reserved1"></a>dbusmenu_server_reserved1</code></em> ()</span></p></td> -<td>Reserved for future use. +<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.item-activation"></a>item_activation</code></em> ()</span></p></td> +<td> </td> </tr> <tr> -<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.dbusmenu-server-reserved2"></a>dbusmenu_server_reserved2</code></em> ()</span></p></td> +<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.dbusmenu-server-reserved1"></a>dbusmenu_server_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="DbusmenuServerClass.dbusmenu-server-reserved3"></a>dbusmenu_server_reserved3</code></em> ()</span></p></td> +<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.dbusmenu-server-reserved2"></a>dbusmenu_server_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="DbusmenuServerClass.dbusmenu-server-reserved4"></a>dbusmenu_server_reserved4</code></em> ()</span></p></td> +<td><p><span class="term"><em class="structfield"><code><a name="DbusmenuServerClass.dbusmenu-server-reserved3"></a>dbusmenu_server_reserved3</code></em> ()</span></p></td> <td>Reserved for future use. </td> </tr> diff --git a/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml index b6039ee..53426a7 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/client-menuitem.sgml @@ -9,13 +9,11 @@ DbusmenuClientMenuitem </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/tmpl/client.sgml b/docs/libdbusmenu-glib/reference/tmpl/client.sgml index 23ebf50..c8264e3 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/client.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/client.sgml @@ -9,13 +9,11 @@ DbusmenuClient </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> @@ -159,6 +157,7 @@ DbusmenuClient @client: @id: +@gpointer user_data: @gpointer user_data: @cb_data: diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml index a56e503..c76017b 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem-proxy.sgml @@ -9,13 +9,11 @@ DbusmenuMenuitemProxy </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> diff --git a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml index ff2f08a..ad26442 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/menuitem.sgml @@ -9,13 +9,11 @@ DbusmenuMenuitem </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> @@ -507,6 +505,7 @@ DbusmenuMenuitem </para> @mi: +@DbusmenuMenuitem * mi, gpointer data: @DbusmenuMenuitem * mi, gpointer data: @data: diff --git a/docs/libdbusmenu-glib/reference/tmpl/server.sgml b/docs/libdbusmenu-glib/reference/tmpl/server.sgml index 111e2eb..e319fc6 100644 --- a/docs/libdbusmenu-glib/reference/tmpl/server.sgml +++ b/docs/libdbusmenu-glib/reference/tmpl/server.sgml @@ -9,13 +9,11 @@ DbusmenuServer </para> - <!-- ##### SECTION See_Also ##### --> <para> </para> - <!-- ##### SECTION Stability_Level ##### --> @@ -87,10 +85,10 @@ DbusmenuServer @id_prop_update: @id_update: @layout_updated: +@item_activation: @dbusmenu_server_reserved1: @dbusmenu_server_reserved2: @dbusmenu_server_reserved3: -@dbusmenu_server_reserved4: <!-- ##### FUNCTION dbusmenu_server_new ##### --> <para> diff --git a/docs/libdbusmenu-glib/reference/version.xml b/docs/libdbusmenu-glib/reference/version.xml index 0f82685..6678432 100644 --- a/docs/libdbusmenu-glib/reference/version.xml +++ b/docs/libdbusmenu-glib/reference/version.xml @@ -1 +1 @@ -0.3.7 +0.3.8 diff --git a/docs/libdbusmenu-glib/reference/xml/client.xml b/docs/libdbusmenu-glib/reference/xml/client.xml index 19e5767..b16de17 100644 --- a/docs/libdbusmenu-glib/reference/xml/client.xml +++ b/docs/libdbusmenu-glib/reference/xml/client.xml @@ -342,6 +342,7 @@ This function connects into the type handling of the <link linkend="DbusmenuClie <varlistentry><term><parameter>id</parameter> :</term> <listitem><simpara> <parameter>gpointer</parameter> user_data: +<parameter>gpointer</parameter> user_data: </simpara></listitem></varlistentry> <varlistentry><term><parameter>cb_data</parameter> :</term> <listitem><simpara> diff --git a/docs/libdbusmenu-glib/reference/xml/server.xml b/docs/libdbusmenu-glib/reference/xml/server.xml index 485e15d..712840a 100644 --- a/docs/libdbusmenu-glib/reference/xml/server.xml +++ b/docs/libdbusmenu-glib/reference/xml/server.xml @@ -117,12 +117,12 @@ A server which represents a sharing of a set of void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); } DbusmenuServerClass; </programlisting> <para> @@ -144,6 +144,10 @@ The class implementing the virtual functions for <link linkend="DbusmenuServer"> <listitem><simpara>Slot for <link linkend="DbusmenuServer-layout-update"><type>"layout-update"</type></link>. </simpara></listitem> </varlistentry> +<varlistentry><term><structfield id="DbusmenuServerClass.item-activation">item_activation</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> <varlistentry><term><structfield id="DbusmenuServerClass.dbusmenu-server-reserved1">dbusmenu_server_reserved1</structfield> ()</term> <listitem><simpara>Reserved for future use. </simpara></listitem> @@ -156,10 +160,6 @@ The class implementing the virtual functions for <link linkend="DbusmenuServer"> <listitem><simpara>Reserved for future use. </simpara></listitem> </varlistentry> -<varlistentry><term><structfield id="DbusmenuServerClass.dbusmenu-server-reserved4">dbusmenu_server_reserved4</structfield> ()</term> -<listitem><simpara>Reserved for future use. -</simpara></listitem> -</varlistentry> </variablelist></refsect2> <refsect2 id="dbusmenu-server-new" role="function"> <title>dbusmenu_server_new ()</title> diff --git a/docs/libdbusmenu-gtk/reference/html/ch01.html b/docs/libdbusmenu-gtk/reference/html/ch01.html index b046308..531bca7 100644 --- a/docs/libdbusmenu-gtk/reference/html/ch01.html +++ b/docs/libdbusmenu-gtk/reference/html/ch01.html @@ -21,7 +21,7 @@ </tr></table> <div class="chapter" title="API"> <div class="titlepage"><div><div><h2 class="title"> -<a name="id353507"></a>API</h2></div></div></div> +<a name="id523457"></a>API</h2></div></div></div> <div class="toc"><dl> <dt> <span class="refentrytitle"><a href="libdbusmenu-gtk-DbusmenuGtkMenu.html">DbusmenuGtkMenu</a></span><span class="refpurpose"></span> diff --git a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html index a02d5a3..d70b21b 100644 --- a/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html +++ b/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-menuitem.html @@ -40,8 +40,8 @@ <pre class="synopsis"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-set-image" title="dbusmenu_menuitem_property_set_image ()">dbusmenu_menuitem_property_set_image</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</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> *property</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *data</code></em>); -<a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-get-image" title="dbusmenu_menuitem_property_get_image ()">dbusmenu_menuitem_property_get_image</a> + <em class="parameter"><code>const <span class="type">GdkPixbuf</span> *data</code></em>); +<span class="returnvalue">GdkPixbuf</span> * <a class="link" href="libdbusmenu-gtk-menuitem.html#dbusmenu-menuitem-property-get-image" title="dbusmenu_menuitem_property_get_image ()">dbusmenu_menuitem_property_get_image</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</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> *property</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-gtk-menuitem.html#dbusmenu-menuitem-property-set-shortcut" title="dbusmenu_menuitem_property_set_shortcut ()">dbusmenu_menuitem_property_set_shortcut</a> @@ -72,7 +72,7 @@ <pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> dbusmenu_menuitem_property_set_image (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</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> *property</code></em>, - <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a> *data</code></em>);</pre> + <em class="parameter"><code>const <span class="type">GdkPixbuf</span> *data</code></em>);</pre> <p> This function takes the pixbuf that is stored in <em class="parameter"><code>data</code></em> and turns it into a base64 encoded PNG so that it can be placed @@ -108,13 +108,13 @@ This function takes the pixbuf that is stored in <em class="parameter"><code>dat <hr> <div class="refsect2" title="dbusmenu_menuitem_property_get_image ()"> <a name="dbusmenu-menuitem-property-get-image"></a><h3>dbusmenu_menuitem_property_get_image ()</h3> -<pre class="programlisting"><a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="returnvalue">GdkPixbuf</span></a> * dbusmenu_menuitem_property_get_image +<pre class="programlisting"><span class="returnvalue">GdkPixbuf</span> * dbusmenu_menuitem_property_get_image (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> *menuitem</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> *property</code></em>);</pre> <p> This function looks on the menu item for a property by the name of <em class="parameter"><code>property</code></em>. If one exists it tries to turn it into - a <a href="http://library.gnome.org/devel/gdk-pixbuf/unstable/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf"><span class="type">GdkPixbuf</span></a>. It assumes that the property is a base64 encoded + a <span class="type">GdkPixbuf</span>. It assumes that the property is a base64 encoded PNG file like the one created by <span class="type">dbusmenu_menuite_property_set_image</span>. </p> <div class="variablelist"><table border="0"> diff --git a/docs/libdbusmenu-gtk/reference/version.xml b/docs/libdbusmenu-gtk/reference/version.xml index 0f82685..6678432 100644 --- a/docs/libdbusmenu-gtk/reference/version.xml +++ b/docs/libdbusmenu-gtk/reference/version.xml @@ -1 +1 @@ -0.3.7 +0.3.8 diff --git a/libdbusmenu-glib/dbus-menu.xml b/libdbusmenu-glib/dbus-menu.xml index 53b67de..9e8013c 100644 --- a/libdbusmenu-glib/dbus-menu.xml +++ b/libdbusmenu-glib/dbus-menu.xml @@ -344,6 +344,20 @@ License version 3 and version 2.1 along with this program. If not, see </dox:d> </arg> </signal> + <signal name="ItemActivationRequested"> + <dox:d> + The server is requesting that all clients displaying this + menu open it to the user. This would be for things like + hotkeys that when the user presses them the menu should + open and display itself to the user. + </dox:d> + <arg type="i" name="id" direction="out" > + <dox:d>ID of the menu that should be activated</dox:d> + </arg> + <arg type="u" name="timestamp" direction="out" > + <dox:d>The time that the event occured</dox:d> + </arg> + </signal> <!-- End of interesting stuff --> diff --git a/libdbusmenu-glib/dbusmenu-server.h b/libdbusmenu-glib/dbusmenu-server.h index dcc65a3..905c3f6 100644 --- a/libdbusmenu-glib/dbusmenu-server.h +++ b/libdbusmenu-glib/dbusmenu-server.h @@ -381,7 +381,7 @@ const DBusGObjectInfo dbus_glib__dbusmenu_server_object_info = { dbus_glib__dbusmenu_server_methods, 7, "org.ayatana.dbusmenu\0GetLayout\0S\0parentId\0I\0i\0revision\0O\0F\0N\0u\0layout\0O\0F\0N\0s\0\0org.ayatana.dbusmenu\0GetGroupProperties\0S\0ids\0I\0ai\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetChildren\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a(ia{sv})\0\0org.ayatana.dbusmenu\0GetProperty\0S\0id\0I\0i\0name\0I\0s\0value\0O\0F\0N\0v\0\0org.ayatana.dbusmenu\0GetProperties\0S\0id\0I\0i\0propertyNames\0I\0as\0properties\0O\0F\0N\0a{sv}\0\0org.ayatana.dbusmenu\0Event\0S\0id\0I\0i\0eventId\0I\0s\0data\0I\0v\0timestamp\0I\0u\0\0org.ayatana.dbusmenu\0AboutToShow\0S\0id\0I\0i\0needUpdate\0O\0F\0N\0b\0\0\0", -"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0\0", +"org.ayatana.dbusmenu\0ItemPropertyUpdated\0org.ayatana.dbusmenu\0ItemUpdated\0org.ayatana.dbusmenu\0LayoutUpdated\0org.ayatana.dbusmenu\0ItemActivationRequested\0\0", "org.ayatana.dbusmenu\0version\0\0" }; diff --git a/libdbusmenu-glib/server-marshal.c b/libdbusmenu-glib/server-marshal.c index 6730b16..68552f6 100644 --- a/libdbusmenu-glib/server-marshal.c +++ b/libdbusmenu-glib/server-marshal.c @@ -125,3 +125,40 @@ _dbusmenu_server_marshal_VOID__UINT_INT (GClosure *closure, data2); } +/* VOID:INT,UINT (./server-marshal.list:3) */ +void +_dbusmenu_server_marshal_VOID__INT_UINT (GClosure *closure, + GValue *return_value G_GNUC_UNUSED, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint G_GNUC_UNUSED, + gpointer marshal_data) +{ + typedef void (*GMarshalFunc_VOID__INT_UINT) (gpointer data1, + gint arg_1, + guint arg_2, + gpointer data2); + register GMarshalFunc_VOID__INT_UINT callback; + register GCClosure *cc = (GCClosure*) closure; + register gpointer data1, data2; + + g_return_if_fail (n_param_values == 3); + + if (G_CCLOSURE_SWAP_DATA (closure)) + { + data1 = closure->data; + data2 = g_value_peek_pointer (param_values + 0); + } + else + { + data1 = g_value_peek_pointer (param_values + 0); + data2 = closure->data; + } + callback = (GMarshalFunc_VOID__INT_UINT) (marshal_data ? marshal_data : cc->callback); + + callback (data1, + g_marshal_value_peek_int (param_values + 1), + g_marshal_value_peek_uint (param_values + 2), + data2); +} + diff --git a/libdbusmenu-glib/server-marshal.h b/libdbusmenu-glib/server-marshal.h index 3a5a4d0..a561738 100644 --- a/libdbusmenu-glib/server-marshal.h +++ b/libdbusmenu-glib/server-marshal.h @@ -22,6 +22,14 @@ extern void _dbusmenu_server_marshal_VOID__UINT_INT (GClosure *closure, gpointer invocation_hint, gpointer marshal_data); +/* VOID:INT,UINT (./server-marshal.list:3) */ +extern void _dbusmenu_server_marshal_VOID__INT_UINT (GClosure *closure, + GValue *return_value, + guint n_param_values, + const GValue *param_values, + gpointer invocation_hint, + gpointer marshal_data); + G_END_DECLS #endif /* ___dbusmenu_server_marshal_MARSHAL_H__ */ diff --git a/libdbusmenu-glib/server-marshal.list b/libdbusmenu-glib/server-marshal.list index 1689a05..0d68c4e 100644 --- a/libdbusmenu-glib/server-marshal.list +++ b/libdbusmenu-glib/server-marshal.list @@ -1,2 +1,3 @@ VOID: INT, STRING, POINTER VOID: UINT, INT +VOID: INT, UINT diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 13c2843..aa8dfac 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -65,6 +65,7 @@ enum { ID_PROP_UPDATE, ID_UPDATE, LAYOUT_UPDATED, + ITEM_ACTIVATION, LAST_SIGNAL }; @@ -165,6 +166,22 @@ dbusmenu_server_class_init (DbusmenuServerClass *class) NULL, NULL, _dbusmenu_server_marshal_VOID__UINT_INT, G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_INT); + /** + DbusmenuServer::item-activation-requested: + @arg0: The #DbusmenuServer emitting the signal. + @arg1: The ID of the parent for this update. + @arg2: The timestamp of when the event happened + + This is signaled when a menuitem under this server + sends it's activate signal. + */ + signals[ITEM_ACTIVATION] = g_signal_new(DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION, + G_TYPE_FROM_CLASS(class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET(DbusmenuServerClass, item_activation), + NULL, NULL, + _dbusmenu_server_marshal_VOID__INT_UINT, + G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT); g_object_class_install_property (object_class, PROP_DBUS_OBJECT, @@ -359,6 +376,15 @@ menuitem_child_moved (DbusmenuMenuitem * parent, DbusmenuMenuitem * child, guint return; } +/* Called when a menu item emits its activated signal so it + gets passed across the bus. */ +static void +menuitem_activated (DbusmenuMenuitem * mi, guint timestamp, DbusmenuServer * server) +{ + g_signal_emit(G_OBJECT(server), signals[ITEM_ACTIVATION], 0, dbusmenu_menuitem_get_id(mi), timestamp, TRUE); + return; +} + /* Connects all the signals that we're interested in coming from a menuitem */ static void @@ -368,6 +394,7 @@ menuitem_signals_create (DbusmenuMenuitem * mi, gpointer data) g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED, G_CALLBACK(menuitem_child_removed), data); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED, G_CALLBACK(menuitem_child_moved), data); g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED, G_CALLBACK(menuitem_property_changed), data); + g_signal_connect(G_OBJECT(mi), DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED, G_CALLBACK(menuitem_activated), data); return; } diff --git a/libdbusmenu-glib/server.h b/libdbusmenu-glib/server.h index f4e3527..a9bf213 100644 --- a/libdbusmenu-glib/server.h +++ b/libdbusmenu-glib/server.h @@ -46,6 +46,7 @@ G_BEGIN_DECLS #define DBUSMENU_SERVER_SIGNAL_ID_PROP_UPDATE "item-property-updated" #define DBUSMENU_SERVER_SIGNAL_ID_UPDATE "item-updated" #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED "layout-updated" +#define DBUSMENU_SERVER_SIGNAL_ITEM_ACTIVATION "item-activation-requested" #define DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATE DBUSMENU_SERVER_SIGNAL_LAYOUT_UPDATED #define DBUSMENU_SERVER_PROP_DBUS_OBJECT "dbus-object" @@ -58,10 +59,10 @@ G_BEGIN_DECLS @id_prop_update: Slot for #DbusmenuServer::id-prop-update. @id_update: Slot for #DbusmenuServer::id-update. @layout_updated: Slot for #DbusmenuServer::layout-update. + @item_activation_requested: Slot for #DbusmenuServer::item-activation-requested. @dbusmenu_server_reserved1: Reserved for future use. @dbusmenu_server_reserved2: Reserved for future use. @dbusmenu_server_reserved3: Reserved for future use. - @dbusmenu_server_reserved4: Reserved for future use. The class implementing the virtual functions for #DbusmenuServer. */ @@ -73,12 +74,12 @@ struct _DbusmenuServerClass { void (*id_prop_update)(gint id, gchar * property, gchar * value); void (*id_update)(gint id); void (*layout_updated)(gint revision); + void (*item_activation)(gint id, guint timestamp); /* Reserved */ void (*dbusmenu_server_reserved1)(void); void (*dbusmenu_server_reserved2)(void); void (*dbusmenu_server_reserved3)(void); - void (*dbusmenu_server_reserved4)(void); }; /** |