diff options
Diffstat (limited to 'docs/libdbusmenu-gtk/reference/xml')
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/annotation-glossary.xml | 32 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/api-index-deprecated.xml | 8 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/api-index-full.xml | 37 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/client.xml | 238 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/menu.xml | 133 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/menuitem.xml | 178 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/parser.xml | 77 | ||||
-rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/serializablemenuitem.xml | 176 |
8 files changed, 879 insertions, 0 deletions
diff --git a/docs/libdbusmenu-gtk/reference/xml/annotation-glossary.xml b/docs/libdbusmenu-gtk/reference/xml/annotation-glossary.xml new file mode 100644 index 0000000..7dde69a --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/annotation-glossary.xml @@ -0,0 +1,32 @@ +<?xml version="1.0"?> +<!DOCTYPE glossary PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> + +<glossary id="annotation-glossary"> + <title>Annotation Glossary</title> +<glossdiv><title>O</title> + <glossentry> + <glossterm><anchor id="annotation-glossterm-out"/>out</glossterm> + <glossdef> + <para>Parameter for returning results. Default is <acronym>transfer full</acronym>.</para> + </glossdef> + </glossentry> +</glossdiv> +<glossdiv><title>T</title> + <glossentry> + <glossterm><anchor id="annotation-glossterm-transfer full"/>transfer full</glossterm> + <glossdef> + <para>Free data after the code is done.</para> + </glossdef> + </glossentry> + <glossentry> + <glossterm><anchor id="annotation-glossterm-transfer none"/>transfer none</glossterm> + <glossdef> + <para>Don't free data after the code is done.</para> + </glossdef> + </glossentry> +</glossdiv> +</glossary> diff --git a/docs/libdbusmenu-gtk/reference/xml/api-index-deprecated.xml b/docs/libdbusmenu-gtk/reference/xml/api-index-deprecated.xml new file mode 100644 index 0000000..8ec0fe4 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/api-index-deprecated.xml @@ -0,0 +1,8 @@ +<?xml version="1.0"?> +<!DOCTYPE indexdiv PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<indexdiv> +</indexdiv> diff --git a/docs/libdbusmenu-gtk/reference/xml/api-index-full.xml b/docs/libdbusmenu-gtk/reference/xml/api-index-full.xml new file mode 100644 index 0000000..2f74a98 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/api-index-full.xml @@ -0,0 +1,37 @@ +<?xml version="1.0"?> +<!DOCTYPE indexdiv PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<indexdiv> +<indexdiv><title>G</title> +<indexentry><primaryie linkends="DbusmenuGtkClient"><link linkend="DbusmenuGtkClient">DbusmenuGtkClient</link>, struct in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="DbusmenuGtkClientClass"><link linkend="DbusmenuGtkClientClass">DbusmenuGtkClientClass</link>, struct in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-get-accel-group"><link linkend="dbusmenu-gtkclient-get-accel-group">dbusmenu_gtkclient_get_accel_group</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-menuitem-get"><link linkend="dbusmenu-gtkclient-menuitem-get">dbusmenu_gtkclient_menuitem_get</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-menuitem-get-submenu"><link linkend="dbusmenu-gtkclient-menuitem-get-submenu">dbusmenu_gtkclient_menuitem_get_submenu</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-new"><link linkend="dbusmenu-gtkclient-new">dbusmenu_gtkclient_new</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-newitem-base"><link linkend="dbusmenu-gtkclient-newitem-base">dbusmenu_gtkclient_newitem_base</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkclient-set-accel-group"><link linkend="dbusmenu-gtkclient-set-accel-group">dbusmenu_gtkclient_set_accel_group</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-GTKCLIENT-SIGNAL-ROOT-CHANGED:CAPS"><link linkend="DBUSMENU-GTKCLIENT-SIGNAL-ROOT-CHANGED:CAPS">DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED</link>, macro in <link linkend="libdbusmenu-gtk-DbusmenuGtkClient">DbusmenuGtkClient</link></primaryie></indexentry> +<indexentry><primaryie linkends="DbusmenuGtkMenuClass"><link linkend="DbusmenuGtkMenuClass">DbusmenuGtkMenuClass</link>, struct in <link linkend="libdbusmenu-gtk-DbusmenuGtkMenu">DbusmenuGtkMenu</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkmenu-get-client"><link linkend="dbusmenu-gtkmenu-get-client">dbusmenu_gtkmenu_get_client</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkMenu">DbusmenuGtkMenu</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtkmenu-new"><link linkend="dbusmenu-gtkmenu-new">dbusmenu_gtkmenu_new</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkMenu">DbusmenuGtkMenu</link></primaryie></indexentry> +<indexentry><primaryie linkends="DbusmenuGtkSerializableMenuItemClass"><link linkend="DbusmenuGtkSerializableMenuItemClass">DbusmenuGtkSerializableMenuItemClass</link>, struct in <link linkend="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem">DbusmenuGtkSerializableMenuItem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtk-parse-get-cached-item"><link linkend="dbusmenu-gtk-parse-get-cached-item">dbusmenu_gtk_parse_get_cached_item</link>, function in <link linkend="libdbusmenu-gtk-parser">parser</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtk-parse-menu-structure"><link linkend="dbusmenu-gtk-parse-menu-structure">dbusmenu_gtk_parse_menu_structure</link>, function in <link linkend="libdbusmenu-gtk-parser">parser</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtk-serializable-menu-item-build-menuitem"><link linkend="dbusmenu-gtk-serializable-menu-item-build-menuitem">dbusmenu_gtk_serializable_menu_item_build_menuitem</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem">DbusmenuGtkSerializableMenuItem</link></primaryie></indexentry> +<indexentry><primaryie linkends="DBUSMENU-GTK-SERIALIZABLE-MENU-ITEM-PROP-MENUITEM:CAPS"><link linkend="DBUSMENU-GTK-SERIALIZABLE-MENU-ITEM-PROP-MENUITEM:CAPS">DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM</link>, macro in <link linkend="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem">DbusmenuGtkSerializableMenuItem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtk-serializable-menu-item-register-to-client"><link linkend="dbusmenu-gtk-serializable-menu-item-register-to-client">dbusmenu_gtk_serializable_menu_item_register_to_client</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem">DbusmenuGtkSerializableMenuItem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-gtk-serializable-menu-item-set-menuitem"><link linkend="dbusmenu-gtk-serializable-menu-item-set-menuitem">dbusmenu_gtk_serializable_menu_item_set_menuitem</link>, function in <link linkend="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem">DbusmenuGtkSerializableMenuItem</link></primaryie></indexentry> +</indexdiv> +<indexdiv><title>M</title> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-get-image"><link linkend="dbusmenu-menuitem-property-get-image">dbusmenu_menuitem_property_get_image</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-get-shortcut"><link linkend="dbusmenu-menuitem-property-get-shortcut">dbusmenu_menuitem_property_get_shortcut</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-set-image"><link linkend="dbusmenu-menuitem-property-set-image">dbusmenu_menuitem_property_set_image</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-set-shortcut"><link linkend="dbusmenu-menuitem-property-set-shortcut">dbusmenu_menuitem_property_set_shortcut</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-set-shortcut-menuitem"><link linkend="dbusmenu-menuitem-property-set-shortcut-menuitem">dbusmenu_menuitem_property_set_shortcut_menuitem</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +<indexentry><primaryie linkends="dbusmenu-menuitem-property-set-shortcut-string"><link linkend="dbusmenu-menuitem-property-set-shortcut-string">dbusmenu_menuitem_property_set_shortcut_string</link>, function in <link linkend="libdbusmenu-gtk-menuitem">menuitem</link></primaryie></indexentry> +</indexdiv> +</indexdiv> diff --git a/docs/libdbusmenu-gtk/reference/xml/client.xml b/docs/libdbusmenu-gtk/reference/xml/client.xml new file mode 100644 index 0000000..d5ead35 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/client.xml @@ -0,0 +1,238 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<refentry id="libdbusmenu-gtk-DbusmenuGtkClient"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-gtk-DbusmenuGtkClient.top_of_page">DbusmenuGtkClient</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GTK Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>DbusmenuGtkClient</refname> +<refpurpose>A subclass of <link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> adding GTK level features</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkClient.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-gtk-DbusmenuGtkClient.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-gtk/client.h> + +#define <link linkend="DBUSMENU-GTKCLIENT-SIGNAL-ROOT-CHANGED:CAPS">DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED</link> + <link linkend="DbusmenuGtkClient">DbusmenuGtkClient</link>; +struct <link linkend="DbusmenuGtkClientClass">DbusmenuGtkClientClass</link>; +<link linkend="DbusmenuGtkClient"><returnvalue>DbusmenuGtkClient</returnvalue></link> * <link linkend="dbusmenu-gtkclient-new">dbusmenu_gtkclient_new</link> (<parameter><link linkend="gchar"><type>gchar</type></link> *dbus_name</parameter>, + <parameter><link linkend="gchar"><type>gchar</type></link> *dbus_object</parameter>); +<link linkend="GtkMenuItem"><returnvalue>GtkMenuItem</returnvalue></link> * <link linkend="dbusmenu-gtkclient-menuitem-get">dbusmenu_gtkclient_menuitem_get</link> (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>); +<link linkend="GtkMenu"><returnvalue>GtkMenu</returnvalue></link> * <link linkend="dbusmenu-gtkclient-menuitem-get-submenu">dbusmenu_gtkclient_menuitem_get_submenu</link> + (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-gtkclient-set-accel-group">dbusmenu_gtkclient_set_accel_group</link> (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> *agroup</parameter>); +<link linkend="GtkAccelGroup"><returnvalue>GtkAccelGroup</returnvalue></link> * <link linkend="dbusmenu-gtkclient-get-accel-group">dbusmenu_gtkclient_get_accel_group</link> (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-gtkclient-newitem-base">dbusmenu_gtkclient_newitem_base</link> (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>, + <parameter><link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> *gmi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkClient.description" role="desc"> +<title role="desc.title">Description</title> +<para> +In general, this is just a <link linkend="GtkMenu"><type>GtkMenu</type></link>, why else would you care? Oh, + because this menu is created by someone else on a server that exists + on the other side of DBus. You need a <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> to be able + push the data into this menu. +</para> +<para> + The first thing you need to know is how to find that <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> + on DBus. This involves both the DBus name and the DBus object that + the menu interface can be found on. Those two value should be set + when creating the object using <link linkend="dbusmenu-gtkmenu-new"><function>dbusmenu_gtkmenu_new()</function></link>. They are then + stored on two properties <link linkend="DbusmenuGtkClient--dbus-name"><type>"dbus-name"</type></link> and <link linkend="DbusmenuGtkClient--dbus-object"><type>"dbus-object"</type></link>. +</para> +<para> + After creation the <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> it will continue to keep in + synchronization with the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> object across Dbus. If the + number of entries change, the menus change, if they change thier + properties change, they update in the items. All of this should + be handled transparently to the user of this object. +</para> +</refsect1> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkClient.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="DBUSMENU-GTKCLIENT-SIGNAL-ROOT-CHANGED:CAPS" role="macro"> +<title>DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED</title> +<indexterm zone="DBUSMENU-GTKCLIENT-SIGNAL-ROOT-CHANGED:CAPS"><primary>DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED</primary></indexterm> +<programlisting>#define DBUSMENU_GTKCLIENT_SIGNAL_ROOT_CHANGED DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED +</programlisting> +<para> +String to attach to signal <link linkend="DbusmenuClient-root-changed"><type>"root-changed"</type></link> +</para></refsect2> +<refsect2 id="DbusmenuGtkClient" role="struct"> +<title>DbusmenuGtkClient</title> +<indexterm zone="DbusmenuGtkClient"><primary>DbusmenuGtkClient</primary></indexterm> +<programlisting>typedef struct _DbusmenuGtkClient DbusmenuGtkClient;</programlisting> +<para> +A subclass of <link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> to add functionality with regarding +building GTK items out of the abstract tree. +</para></refsect2> +<refsect2 id="DbusmenuGtkClientClass" role="struct"> +<title>struct DbusmenuGtkClientClass</title> +<indexterm zone="DbusmenuGtkClientClass"><primary>DbusmenuGtkClientClass</primary></indexterm> +<programlisting>struct DbusmenuGtkClientClass { + DbusmenuClientClass parent_class; + + /* Signals */ + void (*root_changed) (DbusmenuMenuitem * newroot); + + /*< Private >*/ + void (*reserved1) (void); + void (*reserved2) (void); + void (*reserved3) (void); + void (*reserved4) (void); + void (*reserved5) (void); + void (*reserved6) (void); +}; +</programlisting> +<para> +Functions and signal slots for using a <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> +</para><variablelist role="struct"> +<varlistentry><term><link linkend="DbusmenuClientClass"><type>DbusmenuClientClass</type></link> <structfield id="DbusmenuGtkClientClass.parent-class">parent_class</structfield>;</term> +<listitem><simpara><link linkend="GtkMenuClass"><type>GtkMenuClass</type></link></simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.root-changed">root_changed</structfield> ()</term> +<listitem><simpara>Slot for signal <link linkend="DbusmenuGtkClient-root-changed"><type>"root-changed"</type></link></simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved1">reserved1</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved2">reserved2</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved3">reserved3</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved4">reserved4</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved5">reserved5</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkClientClass.reserved6">reserved6</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-new" role="function"> +<title>dbusmenu_gtkclient_new ()</title> +<indexterm zone="dbusmenu-gtkclient-new"><primary>dbusmenu_gtkclient_new</primary></indexterm> +<programlisting><link linkend="DbusmenuGtkClient"><returnvalue>DbusmenuGtkClient</returnvalue></link> * dbusmenu_gtkclient_new (<parameter><link linkend="gchar"><type>gchar</type></link> *dbus_name</parameter>, + <parameter><link linkend="gchar"><type>gchar</type></link> *dbus_object</parameter>);</programlisting> +<para> +Creates a new <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> object and creates a <link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> +that connects across DBus to a <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>dbus_name</parameter> :</term> +<listitem><simpara>Name of the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> on DBus</simpara></listitem></varlistentry> +<varlistentry><term><parameter>dbus_object</parameter> :</term> +<listitem><simpara>Name of the object on the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link></simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A new <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> sync'd with a server</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-menuitem-get" role="function"> +<title>dbusmenu_gtkclient_menuitem_get ()</title> +<indexterm zone="dbusmenu-gtkclient-menuitem-get"><primary>dbusmenu_gtkclient_menuitem_get</primary></indexterm> +<programlisting><link linkend="GtkMenuItem"><returnvalue>GtkMenuItem</returnvalue></link> * dbusmenu_gtkclient_menuitem_get (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>);</programlisting> +<para> +This grabs the <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> that is associated with the +<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara>A <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> with the item in it.</simpara></listitem></varlistentry> +<varlistentry><term><parameter>item</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to get associated <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> on.</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> that can be played with. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-menuitem-get-submenu" role="function"> +<title>dbusmenu_gtkclient_menuitem_get_submenu ()</title> +<indexterm zone="dbusmenu-gtkclient-menuitem-get-submenu"><primary>dbusmenu_gtkclient_menuitem_get_submenu</primary></indexterm> +<programlisting><link linkend="GtkMenu"><returnvalue>GtkMenu</returnvalue></link> * dbusmenu_gtkclient_menuitem_get_submenu + (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>);</programlisting> +<para> +This grabs the submenu associated with the menuitem. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara>A <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> with the item in it.</simpara></listitem></varlistentry> +<varlistentry><term><parameter>item</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to get associated <link linkend="GtkMenu"><type>GtkMenu</type></link> on.</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>The <link linkend="GtkMenu"><type>GtkMenu</type></link> if there is one. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-set-accel-group" role="function"> +<title>dbusmenu_gtkclient_set_accel_group ()</title> +<indexterm zone="dbusmenu-gtkclient-set-accel-group"><primary>dbusmenu_gtkclient_set_accel_group</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_gtkclient_set_accel_group (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="GtkAccelGroup"><type>GtkAccelGroup</type></link> *agroup</parameter>);</programlisting> +<para> +Sets the acceleration group for the menu items with accelerators +on this client. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara>To set the group on</simpara></listitem></varlistentry> +<varlistentry><term><parameter>agroup</parameter> :</term> +<listitem><simpara>The new acceleration group</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-get-accel-group" role="function"> +<title>dbusmenu_gtkclient_get_accel_group ()</title> +<indexterm zone="dbusmenu-gtkclient-get-accel-group"><primary>dbusmenu_gtkclient_get_accel_group</primary></indexterm> +<programlisting><link linkend="GtkAccelGroup"><returnvalue>GtkAccelGroup</returnvalue></link> * dbusmenu_gtkclient_get_accel_group (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>);</programlisting> +<para> +Gets the accel group for this client. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara>Client to query for an accelerator group</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Either a valid group or <link linkend="NULL:CAPS"><type>NULL</type></link> on error or +none set. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkclient-newitem-base" role="function"> +<title>dbusmenu_gtkclient_newitem_base ()</title> +<indexterm zone="dbusmenu-gtkclient-newitem-base"><primary>dbusmenu_gtkclient_newitem_base</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_gtkclient_newitem_base (<parameter><link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> *client</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *item</parameter>, + <parameter><link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> *gmi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting> +<para> +This function provides some of the basic connectivity for being in +the GTK world. Things like visibility and sensitivity of the item are +handled here so that the subclasses don't have to. If you're building +your on GTK menu item you can use this function to apply those basic +attributes so that you don't have to deal with them either. +</para> +<para> +This also handles passing the "activate" signal back to the +<link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> side of thing. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara>The client handling everything on this connection</simpara></listitem></varlistentry> +<varlistentry><term><parameter>item</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to attach the GTK-isms to</simpara></listitem></varlistentry> +<varlistentry><term><parameter>gmi</parameter> :</term> +<listitem><simpara>A <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> representing the GTK world's view of this menuitem</simpara></listitem></varlistentry> +<varlistentry><term><parameter>parent</parameter> :</term> +<listitem><simpara>The parent <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link></simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> diff --git a/docs/libdbusmenu-gtk/reference/xml/menu.xml b/docs/libdbusmenu-gtk/reference/xml/menu.xml new file mode 100644 index 0000000..ad68499 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/menu.xml @@ -0,0 +1,133 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<refentry id="libdbusmenu-gtk-DbusmenuGtkMenu"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-gtk-DbusmenuGtkMenu.top_of_page">DbusmenuGtkMenu</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GTK Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>DbusmenuGtkMenu</refname> +<refpurpose>A GTK Menu Object that syncronizes over DBus</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkMenu.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-gtk-DbusmenuGtkMenu.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-gtk/menu.h> + +struct <link linkend="DbusmenuGtkMenuClass">DbusmenuGtkMenuClass</link>; +<link linkend="DbusmenuGtkMenu"><returnvalue>DbusmenuGtkMenu</returnvalue></link> * <link linkend="dbusmenu-gtkmenu-new">dbusmenu_gtkmenu_new</link> (<parameter><link linkend="gchar"><type>gchar</type></link> *dbus_name</parameter>, + <parameter><link linkend="gchar"><type>gchar</type></link> *dbus_object</parameter>); +<link linkend="DbusmenuGtkClient"><returnvalue>DbusmenuGtkClient</returnvalue></link> * <link linkend="dbusmenu-gtkmenu-get-client">dbusmenu_gtkmenu_get_client</link> (<parameter><link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> *menu</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkMenu.description" role="desc"> +<title role="desc.title">Description</title> +<para> +In general, this is just a <link linkend="GtkMenu"><type>GtkMenu</type></link>, why else would you care? Oh, + because this menu is created by someone else on a server that exists + on the other side of DBus. You need a <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> to be able + push the data into this menu. +</para> +<para> + The first thing you need to know is how to find that <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> + on DBus. This involves both the DBus name and the DBus object that + the menu interface can be found on. Those two value should be set + when creating the object using <link linkend="dbusmenu-gtkmenu-new"><function>dbusmenu_gtkmenu_new()</function></link>. They are then + stored on two properties <link linkend="DbusmenuGtkMenu--dbus-name"><type>"dbus-name"</type></link> and <link linkend="DbusmenuGtkMenu--dbus-object"><type>"dbus-object"</type></link>. +</para> +<para> + After creation the <link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> it will continue to keep in + synchronization with the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> object across Dbus. If the + number of entries change, the menus change, if they change thier + properties change, they update in the items. All of this should + be handled transparently to the user of this object. +</para> +</refsect1> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkMenu.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="DbusmenuGtkMenuClass" role="struct"> +<title>struct DbusmenuGtkMenuClass</title> +<indexterm zone="DbusmenuGtkMenuClass"><primary>DbusmenuGtkMenuClass</primary></indexterm> +<programlisting>struct DbusmenuGtkMenuClass { + GtkMenuClass parent_class; + + /*< Private >*/ + void (*reserved1) (void); + void (*reserved2) (void); + void (*reserved3) (void); + void (*reserved4) (void); + void (*reserved5) (void); + void (*reserved6) (void); +}; +</programlisting> +<para> +All of the subclassable functions and signal slots for a +<link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link>. +</para><variablelist role="struct"> +<varlistentry><term><link linkend="GtkMenuClass"><type>GtkMenuClass</type></link> <structfield id="DbusmenuGtkMenuClass.parent-class">parent_class</structfield>;</term> +<listitem><simpara><link linkend="GtkMenuClass"><type>GtkMenuClass</type></link></simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved1">reserved1</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved2">reserved2</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved3">reserved3</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved4">reserved4</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved5">reserved5</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkMenuClass.reserved6">reserved6</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkmenu-new" role="function"> +<title>dbusmenu_gtkmenu_new ()</title> +<indexterm zone="dbusmenu-gtkmenu-new"><primary>dbusmenu_gtkmenu_new</primary></indexterm> +<programlisting><link linkend="DbusmenuGtkMenu"><returnvalue>DbusmenuGtkMenu</returnvalue></link> * dbusmenu_gtkmenu_new (<parameter><link linkend="gchar"><type>gchar</type></link> *dbus_name</parameter>, + <parameter><link linkend="gchar"><type>gchar</type></link> *dbus_object</parameter>);</programlisting> +<para> +Creates a new <link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> object and creates a <link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> +that connects across DBus to a <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>dbus_name</parameter> :</term> +<listitem><simpara>Name of the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link> on DBus</simpara></listitem></varlistentry> +<varlistentry><term><parameter>dbus_object</parameter> :</term> +<listitem><simpara>Name of the object on the <link linkend="DbusmenuServer"><type>DbusmenuServer</type></link></simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A new <link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> sync'd with a server</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtkmenu-get-client" role="function"> +<title>dbusmenu_gtkmenu_get_client ()</title> +<indexterm zone="dbusmenu-gtkmenu-get-client"><primary>dbusmenu_gtkmenu_get_client</primary></indexterm> +<programlisting><link linkend="DbusmenuGtkClient"><returnvalue>DbusmenuGtkClient</returnvalue></link> * dbusmenu_gtkmenu_get_client (<parameter><link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> *menu</parameter>);</programlisting> +<para> +An accessor for the client that this menu is using to +communicate with the server. +</para><variablelist role="params"> +<varlistentry><term><parameter>menu</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuGtkMenu"><type>DbusmenuGtkMenu</type></link> to get the client from</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A valid <link linkend="DbusmenuGtkClient"><type>DbusmenuGtkClient</type></link> or NULL on error. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> diff --git a/docs/libdbusmenu-gtk/reference/xml/menuitem.xml b/docs/libdbusmenu-gtk/reference/xml/menuitem.xml new file mode 100644 index 0000000..12f1325 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/menuitem.xml @@ -0,0 +1,178 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<refentry id="libdbusmenu-gtk-menuitem"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-gtk-menuitem.top_of_page">menuitem</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GTK Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>menuitem</refname> +<refpurpose>Helpers for <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> properties that require a GTK dependency</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-gtk-menuitem.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-gtk-menuitem.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-gtk/menuitem.h> + +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-image">dbusmenu_menuitem_property_set_image</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *data</parameter>); +<link linkend="GdkPixbuf"><returnvalue>GdkPixbuf</returnvalue></link> * <link linkend="dbusmenu-menuitem-property-get-image">dbusmenu_menuitem_property_get_image</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-shortcut">dbusmenu_menuitem_property_set_shortcut</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> key</parameter>, + <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> modifier</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-shortcut-string">dbusmenu_menuitem_property_set_shortcut_string</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *shortcut</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-shortcut-menuitem">dbusmenu_menuitem_property_set_shortcut_menuitem</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> *gmi</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-property-get-shortcut">dbusmenu_menuitem_property_get_shortcut</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> *key</parameter>, + <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> *modifier</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-gtk-menuitem.description" role="desc"> +<title role="desc.title">Description</title> +<para> +Some property helpers can't be done without picking up a GTK+ + dependency. So those sit in libdbusmenu-gtk but have very similar + prototypes to the code in libdbusmenu-glib so your code will + look consistent, just with the extra depedency. +</para> +</refsect1> +<refsect1 id="libdbusmenu-gtk-menuitem.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="dbusmenu-menuitem-property-set-image" role="function"> +<title>dbusmenu_menuitem_property_set_image ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-image"><primary>dbusmenu_menuitem_property_set_image</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_image + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> *data</parameter>);</programlisting> +<para> +This function takes the pixbuf that is stored in <parameter>data</parameter> and +turns it into a base64 encoded PNG so that it can be placed +onto a standard <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> property. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the property on.</simpara></listitem></varlistentry> +<varlistentry><term><parameter>property</parameter> :</term> +<listitem><simpara>Name of the property to set.</simpara></listitem></varlistentry> +<varlistentry><term><parameter>data</parameter> :</term> +<listitem><simpara>The image to place on the property.</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether the function was able to set the property +or not.</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get-image" role="function"> +<title>dbusmenu_menuitem_property_get_image ()</title> +<indexterm zone="dbusmenu-menuitem-property-get-image"><primary>dbusmenu_menuitem_property_get_image</primary></indexterm> +<programlisting><link linkend="GdkPixbuf"><returnvalue>GdkPixbuf</returnvalue></link> * dbusmenu_menuitem_property_get_image + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +This function looks on the menu item for a property by the +name of <parameter>property</parameter>. If one exists it tries to turn it into +a <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>. It assumes that the property is a base64 encoded +PNG file like the one created by <link linkend="dbusmenu-menuite-property-set-image"><type>dbusmenu_menuite_property_set_image</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to look for the property on</simpara></listitem></varlistentry> +<varlistentry><term><parameter>property</parameter> :</term> +<listitem><simpara>The name of the property to look for.</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A pixbuf or <link linkend="NULL:CAPS"><type>NULL</type></link> to signal error. <emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-shortcut" role="function"> +<title>dbusmenu_menuitem_property_set_shortcut ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-shortcut"><primary>dbusmenu_menuitem_property_set_shortcut</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_shortcut + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> key</parameter>, + <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> modifier</parameter>);</programlisting> +<para> +Takes the modifer described by <parameter>key</parameter> and <parameter>modifier</parameter> and places that into +the format sending across Dbus for shortcuts. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the shortcut on</simpara></listitem></varlistentry> +<varlistentry><term><parameter>key</parameter> :</term> +<listitem><simpara>The keycode of the key to send</simpara></listitem></varlistentry> +<varlistentry><term><parameter>modifier</parameter> :</term> +<listitem><simpara>A bitmask of modifiers used to activate the item</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether it was successful at setting the property.</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-shortcut-string" role="function"> +<title>dbusmenu_menuitem_property_set_shortcut_string ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-shortcut-string"><primary>dbusmenu_menuitem_property_set_shortcut_string</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_shortcut_string + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *shortcut</parameter>);</programlisting> +<para> +This function takes a GTK shortcut string as defined in +<link linkend="gtk-accelerator-parse"><type>gtk_accelerator_parse</type></link> and turns that into the information +required to send it over DBusmenu. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the shortcut on</simpara></listitem></varlistentry> +<varlistentry><term><parameter>shortcut</parameter> :</term> +<listitem><simpara>String describing the shortcut</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether it was successful at setting the property.</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-shortcut-menuitem" role="function"> +<title>dbusmenu_menuitem_property_set_shortcut_menuitem ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-shortcut-menuitem"><primary>dbusmenu_menuitem_property_set_shortcut_menuitem</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_shortcut_menuitem + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter>const <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> *gmi</parameter>);</programlisting> +<para> +Takes the shortcut that is installed on a menu item and calls +<link linkend="dbusmenu-menuitem-property-set-shortcut"><type>dbusmenu_menuitem_property_set_shortcut</type></link> with it. It also sets +up listeners to watch it change. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set the shortcut on</simpara></listitem></varlistentry> +<varlistentry><term><parameter>gmi</parameter> :</term> +<listitem><simpara>A menu item to steal the shortcut off of</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>Whether it was successful at setting the property.</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get-shortcut" role="function"> +<title>dbusmenu_menuitem_property_get_shortcut ()</title> +<indexterm zone="dbusmenu-menuitem-property-get-shortcut"><primary>dbusmenu_menuitem_property_get_shortcut</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_property_get_shortcut + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *menuitem</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> *key</parameter>, + <parameter><link linkend="GdkModifierType"><type>GdkModifierType</type></link> *modifier</parameter>);</programlisting> +<para> +This function gets a GTK shortcut as a key and a mask +for use to set the accelerators. +</para><variablelist role="params"> +<varlistentry><term><parameter>menuitem</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to get the shortcut off</simpara></listitem></varlistentry> +<varlistentry><term><parameter>key</parameter> :</term> +<listitem><simpara>Location to put the key value. <emphasis role="annotation">[<acronym>out</acronym>]</emphasis></simpara></listitem></varlistentry> +<varlistentry><term><parameter>modifier</parameter> :</term> +<listitem><simpara>Location to put the modifier mask. <emphasis role="annotation">[<acronym>out</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> diff --git a/docs/libdbusmenu-gtk/reference/xml/parser.xml b/docs/libdbusmenu-gtk/reference/xml/parser.xml new file mode 100644 index 0000000..329bf0a --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/parser.xml @@ -0,0 +1,77 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<refentry id="libdbusmenu-gtk-parser"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-gtk-parser.top_of_page">parser</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GTK Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>parser</refname> +<refpurpose>A parser of in-memory GTK menu trees</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-gtk-parser.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-gtk-parser.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-gtk/parser.h> + +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-gtk-parse-menu-structure">dbusmenu_gtk_parse_menu_structure</link> (<parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>); +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-gtk-parse-get-cached-item">dbusmenu_gtk_parse_get_cached_item</link> (<parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-gtk-parser.description" role="desc"> +<title role="desc.title">Description</title> +<para> +The parser will take a GTK menu tree and attach it to a Dbusmenu menu + tree. Along with setting up all the signals for updates and destruction. + The returned item would be the root item of the given tree. +</para> +</refsect1> +<refsect1 id="libdbusmenu-gtk-parser.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="dbusmenu-gtk-parse-menu-structure" role="function"> +<title>dbusmenu_gtk_parse_menu_structure ()</title> +<indexterm zone="dbusmenu-gtk-parse-menu-structure"><primary>dbusmenu_gtk_parse_menu_structure</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_gtk_parse_menu_structure (<parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting> +<para> +Goes through the GTK structures and turns them into the appropraite +Dbusmenu structures along with setting up all the relationships +between the objects. It also stores the dbusmenu items as a cache +on the GTK items so that they'll be reused if necissary. +</para><variablelist role="params"> +<varlistentry><term><parameter>widget</parameter> :</term> +<listitem><simpara>A <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> or <link linkend="GtkMenuShell"><type>GtkMenuShell</type></link> to turn into a <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link></simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A dbusmenu item representing the menu structure. <emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtk-parse-get-cached-item" role="function"> +<title>dbusmenu_gtk_parse_get_cached_item ()</title> +<indexterm zone="dbusmenu-gtk-parse-get-cached-item"><primary>dbusmenu_gtk_parse_get_cached_item</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_gtk_parse_get_cached_item (<parameter><link linkend="GtkWidget"><type>GtkWidget</type></link> *widget</parameter>);</programlisting> +<para> +The Dbusmenu GTK parser adds cached items on the various +menu items throughout the tree. Sometimes it can be useful +to get that cached item to use directly. This function +will retrieve it for you. +</para><variablelist role="params"> +<varlistentry><term><parameter>widget</parameter> :</term> +<listitem><simpara>A <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> that may have a cached <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> from the parser</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A pointer to the cached item +or NULL if it isn't there. <emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> diff --git a/docs/libdbusmenu-gtk/reference/xml/serializablemenuitem.xml b/docs/libdbusmenu-gtk/reference/xml/serializablemenuitem.xml new file mode 100644 index 0000000..05fad23 --- /dev/null +++ b/docs/libdbusmenu-gtk/reference/xml/serializablemenuitem.xml @@ -0,0 +1,176 @@ +<?xml version="1.0"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" +[ + <!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'"> +]> +<refentry id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem.top_of_page">DbusmenuGtkSerializableMenuItem</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GTK Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>DbusmenuGtkSerializableMenuItem</refname> +<refpurpose>A way to build <link linkend="GtkMenuItems"><type>GtkMenuItems</type></link> that can be sent over Dbusmenu</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-gtk/serializablemenuitem.h> + +#define <link linkend="DBUSMENU-GTK-SERIALIZABLE-MENU-ITEM-PROP-MENUITEM:CAPS">DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM</link> +struct <link linkend="DbusmenuGtkSerializableMenuItemClass">DbusmenuGtkSerializableMenuItemClass</link>; +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-gtk-serializable-menu-item-build-menuitem">dbusmenu_gtk_serializable_menu_item_build_menuitem</link> + (<parameter><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> *smi</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-gtk-serializable-menu-item-register-to-client">dbusmenu_gtk_serializable_menu_item_register_to_client</link> + (<parameter><link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> *client</parameter>, + <parameter><link linkend="GType"><type>GType</type></link> item_type</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-gtk-serializable-menu-item-set-menuitem">dbusmenu_gtk_serializable_menu_item_set_menuitem</link> + (<parameter><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> *smi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem.description" role="desc"> +<title role="desc.title">Description</title> +<para> +Menuitems can subclass from this instead of <link linkend="GtkMenuItem"><type>GtkMenuItem</type></link> and + by providing the appropriate functions Dbusmenu will be able + to parse them and send them over the bus. +</para> +</refsect1> +<refsect1 id="libdbusmenu-gtk-DbusmenuGtkSerializableMenuItem.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="DBUSMENU-GTK-SERIALIZABLE-MENU-ITEM-PROP-MENUITEM:CAPS" role="macro"> +<title>DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM</title> +<indexterm zone="DBUSMENU-GTK-SERIALIZABLE-MENU-ITEM-PROP-MENUITEM:CAPS"><primary>DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM</primary></indexterm> +<programlisting>#define DBUSMENU_GTK_SERIALIZABLE_MENU_ITEM_PROP_MENUITEM "dbusmenu-menuitem" +</programlisting> +<para> +String to access property <link linkend="DbusmenuGtkSerializableMenuItem--dbusmenu-menuitem"><type>"dbusmenu-menuitem"</type></link> +</para></refsect2> +<refsect2 id="DbusmenuGtkSerializableMenuItemClass" role="struct"> +<title>struct DbusmenuGtkSerializableMenuItemClass</title> +<indexterm zone="DbusmenuGtkSerializableMenuItemClass"><primary>DbusmenuGtkSerializableMenuItemClass</primary></indexterm> +<programlisting>struct DbusmenuGtkSerializableMenuItemClass { + GtkMenuItemClass parent_class; + + /* Subclassable functions */ + const gchar * (*get_type_string) (void); + GHashTable * (*get_default_properties) (void); + + DbusmenuMenuitem * (*build_dbusmenu_menuitem) (DbusmenuGtkSerializableMenuItem * smi); + + /* Signals */ + + + + /* Empty Space */ + /*< Private >*/ + void (*_dbusmenu_gtk_serializable_menu_item_reserved1) (void); + void (*_dbusmenu_gtk_serializable_menu_item_reserved2) (void); + void (*_dbusmenu_gtk_serializable_menu_item_reserved3) (void); + void (*_dbusmenu_gtk_serializable_menu_item_reserved4) (void); + void (*_dbusmenu_gtk_serializable_menu_item_reserved5) (void); + void (*_dbusmenu_gtk_serializable_menu_item_reserved6) (void); +}; +</programlisting> +<para> +Signals and functions for <link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link>. +</para><variablelist role="struct"> +<varlistentry><term><link linkend="GtkMenuItemClass"><type>GtkMenuItemClass</type></link> <structfield id="DbusmenuGtkSerializableMenuItemClass.parent-class">parent_class</structfield>;</term> +<listitem><simpara>Inherit from GtkMenuItem</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.get-type-string">get_type_string</structfield> ()</term> +<listitem><simpara>Static function to get a string describing this type</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.get-default-properties">get_default_properties</structfield> ()</term> +<listitem><simpara>Return a hashtable of defaults for the menu item type</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.build-dbusmenu-menuitem">build_dbusmenu_menuitem</structfield> ()</term> +<listitem><simpara>Build a menuitem that can be sent over dbus</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved1">_dbusmenu_gtk_serializable_menu_item_reserved1</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved2">_dbusmenu_gtk_serializable_menu_item_reserved2</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved3">_dbusmenu_gtk_serializable_menu_item_reserved3</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved4">_dbusmenu_gtk_serializable_menu_item_reserved4</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved5">_dbusmenu_gtk_serializable_menu_item_reserved5</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuGtkSerializableMenuItemClass.-dbusmenu-gtk-serializable-menu-item-reserved6">_dbusmenu_gtk_serializable_menu_item_reserved6</structfield> ()</term> +<listitem><simpara>Reserved for future use.</simpara></listitem> +</varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtk-serializable-menu-item-build-menuitem" role="function"> +<title>dbusmenu_gtk_serializable_menu_item_build_menuitem ()</title> +<indexterm zone="dbusmenu-gtk-serializable-menu-item-build-menuitem"><primary>dbusmenu_gtk_serializable_menu_item_build_menuitem</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_gtk_serializable_menu_item_build_menuitem + (<parameter><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> *smi</parameter>);</programlisting> +<para> +This function is for menu items that are instanciated from +GTK and have their properites set using GTK functions. This +builds a <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that then has the properties that +should be sent over the bus to create a new item of this +type on the other side. +</para><variablelist role="params"> +<varlistentry><term><parameter>smi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> to build a <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> mirroring</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara>A <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's values will be +set by this object. <emphasis role="annotation">[<acronym>transfer full</acronym>]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtk-serializable-menu-item-register-to-client" role="function"> +<title>dbusmenu_gtk_serializable_menu_item_register_to_client ()</title> +<indexterm zone="dbusmenu-gtk-serializable-menu-item-register-to-client"><primary>dbusmenu_gtk_serializable_menu_item_register_to_client</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_gtk_serializable_menu_item_register_to_client + (<parameter><link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> *client</parameter>, + <parameter><link linkend="GType"><type>GType</type></link> item_type</parameter>);</programlisting> +<para> +Registers a generic handler for dealing with all subclasses of +<link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link>. This handler responds to the callback, +creates a new object and attaches it to the appropriate <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> +object. +</para><variablelist role="params"> +<varlistentry><term><parameter>client</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuClient"><type>DbusmenuClient</type></link> that we should register a type at.</simpara></listitem></varlistentry> +<varlistentry><term><parameter>item_type</parameter> :</term> +<listitem><simpara>The <link linkend="GType"><type>GType</type></link> of a class that is a subclass of <link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-gtk-serializable-menu-item-set-menuitem" role="function"> +<title>dbusmenu_gtk_serializable_menu_item_set_menuitem ()</title> +<indexterm zone="dbusmenu-gtk-serializable-menu-item-set-menuitem"><primary>dbusmenu_gtk_serializable_menu_item_set_menuitem</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_gtk_serializable_menu_item_set_menuitem + (<parameter><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> *smi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +This function is used on the server side to signal to the object +that it should get its' property change events from <parameter>mi</parameter> instead +of expecting calls to its' API. A call to this function sets the +property and subclasses should listen to the notify signal to +pick up this property being set. +</para><variablelist role="params"> +<varlistentry><term><parameter>smi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuGtkSerializableMenuItem"><type>DbusmenuGtkSerializableMenuItem</type></link> to set the <parameter>DbusmenuGtkSerializableMenuItem</parameter>::dbusmenu-menuitem of</simpara></listitem></varlistentry> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>Menuitem to get the properties from</simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> |