diff options
author | Ted Gould <ted@gould.cx> | 2010-11-11 11:24:45 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2010-11-11 11:24:45 -0600 |
commit | f0c24c976f319d0b087adc0c8bc694cf930aa30b (patch) | |
tree | cc1d6a425b2d5c8c5625d010cb027953d6289751 /docs/libdbusmenu-glib/reference/xml/menuitem.xml | |
parent | 9e1c8319da6ac98bd36b73c4d46d7b655778ed9d (diff) | |
parent | b3768eaec11202758801a3dd0f94a2ab315f4a0d (diff) | |
download | libdbusmenu-f0c24c976f319d0b087adc0c8bc694cf930aa30b.tar.gz libdbusmenu-f0c24c976f319d0b087adc0c8bc694cf930aa30b.tar.bz2 libdbusmenu-f0c24c976f319d0b087adc0c8bc694cf930aa30b.zip |
Import upstream version 0.3.90
Diffstat (limited to 'docs/libdbusmenu-glib/reference/xml/menuitem.xml')
-rw-r--r-- | docs/libdbusmenu-glib/reference/xml/menuitem.xml | 1060 |
1 files changed, 1060 insertions, 0 deletions
diff --git a/docs/libdbusmenu-glib/reference/xml/menuitem.xml b/docs/libdbusmenu-glib/reference/xml/menuitem.xml new file mode 100644 index 0000000..6ab2973 --- /dev/null +++ b/docs/libdbusmenu-glib/reference/xml/menuitem.xml @@ -0,0 +1,1060 @@ +<?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-glib-DbusmenuMenuitem"> +<refmeta> +<refentrytitle role="top_of_page" id="libdbusmenu-glib-DbusmenuMenuitem.top_of_page">DbusmenuMenuitem</refentrytitle> +<manvolnum>3</manvolnum> +<refmiscinfo> + LIBDBUSMENU-GLIB Library +</refmiscinfo> +</refmeta> +<refnamediv> +<refname>DbusmenuMenuitem</refname> +<refpurpose>A lowlevel represenation of a menuitem</refpurpose> +</refnamediv> +<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.stability-level"> +<title>Stability Level</title> +Unstable, unless otherwise indicated +</refsect1> + +<refsynopsisdiv id="libdbusmenu-glib-DbusmenuMenuitem.synopsis" role="synopsis"> +<title role="synopsis.title">Synopsis</title> + +<synopsis> +#include <libdbusmenu-glib/menuitem.h> + +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS">DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS">DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS">DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS">DBUSMENU_MENUITEM_SIGNAL_REALIZED</link> +#define <link linkend="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS">DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-TYPE:CAPS">DBUSMENU_MENUITEM_PROP_TYPE</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS">DBUSMENU_MENUITEM_PROP_VISIBLE</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS">DBUSMENU_MENUITEM_PROP_ENABLED</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-LABEL:CAPS">DBUSMENU_MENUITEM_PROP_LABEL</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS">DBUSMENU_MENUITEM_PROP_ICON_NAME</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS">DBUSMENU_MENUITEM_PROP_ICON_DATA</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS">DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS">DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</link> +#define <link linkend="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS">DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</link> +#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS">DBUSMENU_MENUITEM_TOGGLE_CHECK</link> +#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS">DBUSMENU_MENUITEM_TOGGLE_RADIO</link> +#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</link> +#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</link> +#define <link linkend="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS">DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</link> +#define <link linkend="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS">DBUSMENU_MENUITEM_ICON_NAME_BLANK</link> +#define <link linkend="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS">DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</link> + <link linkend="DbusmenuMenuitem">DbusmenuMenuitem</link>; +<link linkend="void"><returnvalue>void</returnvalue></link> (<link linkend="dbusmenu-menuitem-about-to-show-cb">*dbusmenu_menuitem_about_to_show_cb</link>) + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> (<link linkend="dbusmenu-menuitem-buildxml-slot-t">*dbusmenu_menuitem_buildxml_slot_t</link>) + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *stringarray</parameter>); + <link linkend="DbusmenuMenuitemClass">DbusmenuMenuitemClass</link>; +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-new">dbusmenu_menuitem_new</link> (<parameter><type>void</type></parameter>); +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-new-with-id">dbusmenu_menuitem_new_with_id</link> (<parameter><link linkend="gint"><type>gint</type></link> id</parameter>); +<link linkend="gint"><returnvalue>gint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-id">dbusmenu_menuitem_get_id</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-get-children">dbusmenu_menuitem_get_children</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-take-children">dbusmenu_menuitem_take_children</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="guint"><returnvalue>guint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-position">dbusmenu_menuitem_get_position</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>); +<link linkend="guint"><returnvalue>guint</returnvalue></link> <link linkend="dbusmenu-menuitem-get-position-realized">dbusmenu_menuitem_get_position_realized</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-append">dbusmenu_menuitem_child_append</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-prepend">dbusmenu_menuitem_child_prepend</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-delete">dbusmenu_menuitem_child_delete</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-add-position">dbusmenu_menuitem_child_add_position</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> position</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-child-reorder">dbusmenu_menuitem_child_reorder</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> position</parameter>); +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-child-find">dbusmenu_menuitem_child_find</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gint"><type>gint</type></link> id</parameter>); +<link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * <link linkend="dbusmenu-menuitem-find-id">dbusmenu_menuitem_find_id</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gint"><type>gint</type></link> id</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set">dbusmenu_menuitem_property_set</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-value">dbusmenu_menuitem_property_set_value</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-bool">dbusmenu_menuitem_property_set_bool</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gboolean"><type>gboolean</type></link> value</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-set-int">dbusmenu_menuitem_property_set_int</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gint"><type>gint</type></link> value</parameter>); +const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> * <link linkend="dbusmenu-menuitem-property-get">dbusmenu_menuitem_property_get</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +const <link linkend="GValue"><returnvalue>GValue</returnvalue></link> * <link linkend="dbusmenu-menuitem-property-get-value">dbusmenu_menuitem_property_get_value</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-get-bool">dbusmenu_menuitem_property_get_bool</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="gint"><returnvalue>gint</returnvalue></link> <link linkend="dbusmenu-menuitem-property-get-int">dbusmenu_menuitem_property_get_int</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-property-exist">dbusmenu_menuitem_property_exist</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="GList"><returnvalue>GList</returnvalue></link> * <link linkend="dbusmenu-menuitem-properties-list">dbusmenu_menuitem_properties_list</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link> * <link linkend="dbusmenu-menuitem-properties-copy">dbusmenu_menuitem_properties_copy</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-property-remove">dbusmenu_menuitem_property_remove</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-set-root">dbusmenu_menuitem_set_root</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gboolean"><type>gboolean</type></link> root</parameter>); +<link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> <link linkend="dbusmenu-menuitem-get-root">dbusmenu_menuitem_get_root</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-foreach">dbusmenu_menuitem_foreach</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="void"><type>void</type></link> (funcDbusmenuMenuitem * mi, gpointer data) ()</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-handle-event">dbusmenu_menuitem_handle_event</link> (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>, + <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>); +<link linkend="void"><returnvalue>void</returnvalue></link> <link linkend="dbusmenu-menuitem-send-about-to-show">dbusmenu_menuitem_send_about_to_show</link> + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="void"><type>void</type></link> (cbDbusmenuMenuitem * mi, gpointer user_data) ()</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> cb_data</parameter>); +</synopsis> +</refsynopsisdiv> + +<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.description" role="desc"> +<title role="desc.title">Description</title> +<para> +A <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> is the lowest level of represenation of a +single item in a menu. It gets created on the server side +and copied over to the client side where it gets rendered. As +the server starts to change it, and grow it, and do all kinds +of fun stuff that information is transfered over DBus and the +client updates it's understanding of the object model. +</para> +<para> +Most people using either the client or the server should be +able to deal mostly with <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. These +are simple, but then they can be attached to more complex +objects and handled appropriately. +</para> +</refsect1> +<refsect1 id="libdbusmenu-glib-DbusmenuMenuitem.details" role="details"> +<title role="details.title">Details</title> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-PROPERTY-CHANGED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_PROPERTY_CHANGED "property-changed" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-ITEM-ACTIVATED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_ITEM_ACTIVATED "item-activated" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-ADDED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_ADDED "child-added" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-REMOVED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_REMOVED "child-removed" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-CHILD-MOVED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_CHILD_MOVED "child-moved" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_REALIZED</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-REALIZED:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_REALIZED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_REALIZED "realized" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</title> +<indexterm zone="DBUSMENU-MENUITEM-SIGNAL-REALIZED-ID:CAPS"><primary>DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_SIGNAL_REALIZED_ID (g_signal_lookup(DBUSMENU_MENUITEM_SIGNAL_REALIZED, DBUSMENU_TYPE_MENUITEM)) +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-TYPE:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_TYPE</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-TYPE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TYPE</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_TYPE "type" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_VISIBLE</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-VISIBLE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_VISIBLE</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_VISIBLE "visible" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_ENABLED</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-ENABLED:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ENABLED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_ENABLED "enabled" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-LABEL:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_LABEL</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-LABEL:CAPS"><primary>DBUSMENU_MENUITEM_PROP_LABEL</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_LABEL "label" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_ICON_NAME</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-ICON-NAME:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ICON_NAME</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_ICON_NAME "icon-name" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_ICON_DATA</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-ICON-DATA:CAPS"><primary>DBUSMENU_MENUITEM_PROP_ICON_DATA</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_ICON_DATA "icon-data" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-TOGGLE-TYPE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_TOGGLE_TYPE "toggle-type" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-TOGGLE-STATE:CAPS"><primary>DBUSMENU_MENUITEM_PROP_TOGGLE_STATE</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_TOGGLE_STATE "toggle-state" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</title> +<indexterm zone="DBUSMENU-MENUITEM-PROP-CHILD-DISPLAY:CAPS"><primary>DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_TOGGLE_CHECK</title> +<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-CHECK:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_CHECK</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_CHECK "checkmark" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_TOGGLE_RADIO</title> +<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-RADIO:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_RADIO</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_RADIO "radio" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</title> +<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-UNCHECKED:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNCHECKED 0 +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</title> +<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-CHECKED:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_CHECKED 1 +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</title> +<indexterm zone="DBUSMENU-MENUITEM-TOGGLE-STATE-UNKNOWN:CAPS"><primary>DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_TOGGLE_STATE_UNKNOWN -1 +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_ICON_NAME_BLANK</title> +<indexterm zone="DBUSMENU-MENUITEM-ICON-NAME-BLANK:CAPS"><primary>DBUSMENU_MENUITEM_ICON_NAME_BLANK</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_ICON_NAME_BLANK "blank-icon" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS" role="macro"> +<title>DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</title> +<indexterm zone="DBUSMENU-MENUITEM-CHILD-DISPLAY-SUBMENU:CAPS"><primary>DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU</primary></indexterm> +<programlisting>#define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu" +</programlisting> +<para> +</para></refsect2> +<refsect2 id="DbusmenuMenuitem" role="struct"> +<title>DbusmenuMenuitem</title> +<indexterm zone="DbusmenuMenuitem"><primary>DbusmenuMenuitem</primary></indexterm> +<programlisting>typedef struct { + GObject parent; + + /*< Private >*/ + DbusmenuMenuitemPrivate * priv; +} DbusmenuMenuitem; +</programlisting> +<para> +This is the <link linkend="GObject"><type>GObject</type></link> based object that represents a menu +item. It gets created the same on both the client and +the server side and libdbusmenu-glib does the work of making +this object model appear on both sides of DBus. Simple +really, though through updates and people coming on and off +the bus it can lead to lots of fun complex scenarios. +</para></refsect2> +<refsect2 id="dbusmenu-menuitem-about-to-show-cb" role="function"> +<title>dbusmenu_menuitem_about_to_show_cb ()</title> +<indexterm zone="dbusmenu-menuitem-about-to-show-cb"><primary>dbusmenu_menuitem_about_to_show_cb</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> (*dbusmenu_menuitem_about_to_show_cb) + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> user_data</parameter>);</programlisting> +<para> +Callback prototype for a callback that is called when the +menu should be shown. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>Menu item that should be shown +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>user_data</parameter> :</term> +<listitem><simpara> Extra user data sent with the function. <emphasis role="annotation">[closure]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-buildxml-slot-t" role="function"> +<title>dbusmenu_menuitem_buildxml_slot_t ()</title> +<indexterm zone="dbusmenu-menuitem-buildxml-slot-t"><primary>dbusmenu_menuitem_buildxml_slot_t</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> (*dbusmenu_menuitem_buildxml_slot_t) + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="GPtrArray"><type>GPtrArray</type></link> *stringarray</parameter>);</programlisting> +<para> +This is the function that is called to represent this menu item +as an XML fragment. Should call it's own children. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara> Menu item that should be built from. <emphasis role="annotation">[<acronym>in</acronym>]</emphasis></simpara></listitem></varlistentry> +<varlistentry><term><parameter>stringarray</parameter> :</term> +<listitem><simpara> An array of strings that can be combined into an XML file. <emphasis role="annotation">[<acronym>inout</acronym>][<acronym>transfer none</acronym>][<acronym>array</acronym>][<acronym>element-type</acronym> utf8]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="DbusmenuMenuitemClass" role="struct"> +<title>DbusmenuMenuitemClass</title> +<indexterm zone="DbusmenuMenuitemClass"><primary>DbusmenuMenuitemClass</primary></indexterm> +<programlisting>typedef struct { + GObjectClass parent_class; + + /* Signals */ + void (*property_changed) (gchar * property, GValue * value); + void (*item_activated) (guint timestamp); + void (*child_added) (DbusmenuMenuitem * child, guint position); + void (*child_removed) (DbusmenuMenuitem * child); + void (*child_moved) (DbusmenuMenuitem * child, guint newpos, guint oldpos); + void (*realized) (void); + + /* Virtual functions */ + dbusmenu_menuitem_buildxml_slot_t buildxml; + void (*handle_event) (DbusmenuMenuitem * mi, const gchar * name, const GValue * value, guint timestamp); + void (*send_about_to_show) (DbusmenuMenuitem * mi, void (*cb) (DbusmenuMenuitem * mi, gpointer user_data), gpointer cb_data); + + void (*show_to_user) (DbusmenuMenuitem * mi, guint timestamp, gpointer cb_data); + + /*< Private >*/ + void (*reserved1) (void); + void (*reserved2) (void); + void (*reserved3) (void); + void (*reserved4) (void); + void (*reserved5) (void); + void (*reserved6) (void); +} DbusmenuMenuitemClass; +</programlisting> +<para> +<parameter>reserved1</parameter>: Reserved for future use. +<parameter>reserved2</parameter>: Reserved for future use. +<parameter>reserved3</parameter>: Reserved for future use. +<parameter>reserved4</parameter>: Reserved for future use. +<parameter>reserved5</parameter>: Reserved for future use. +<parameter>reserved6</parameter>: Reserved for future use. +</para><variablelist role="struct"> +<varlistentry><term><link linkend="GObjectClass"><type>GObjectClass</type></link> <structfield id="DbusmenuMenuitemClass.parent-class">parent_class</structfield>;</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.property-changed">property_changed</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-property-changed"><type>"property-changed"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.item-activated">item_activated</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-item-activated"><type>"item-activated"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-added">child_added</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-added"><type>"child-added"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-removed">child_removed</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-removed"><type>"child-removed"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.child-moved">child_moved</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-child-moved"><type>"child-moved"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.realized">realized</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-realized"><type>"realized"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><link linkend="dbusmenu-menuitem-buildxml-slot-t"><type>dbusmenu_menuitem_buildxml_slot_t</type></link> <structfield id="DbusmenuMenuitemClass.buildxml">buildxml</structfield>;</term> +<listitem><simpara>Virtual function that appends the strings required to represent this menu item in the menu XML file. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.handle-event">handle_event</structfield> ()</term> +<listitem><simpara>This function is to override how events are handled by subclasses. Look at <link linkend="dbusmenu-menuitem-handle-event"><type>dbusmenu_menuitem_handle_event</type></link> for lots of good information. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.show-to-user">show_to_user</structfield> ()</term> +<listitem><simpara>Slot for <link linkend="DbusmenuMenuitem-show-to-user"><type>"show-to-user"</type></link>. +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved1">reserved1</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved2">reserved2</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved3">reserved3</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved4">reserved4</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved5">reserved5</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +<varlistentry><term><structfield id="DbusmenuMenuitemClass.reserved6">reserved6</structfield> ()</term> +<listitem><simpara> +</simpara></listitem> +</varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-new" role="function"> +<title>dbusmenu_menuitem_new ()</title> +<indexterm zone="dbusmenu-menuitem-new"><primary>dbusmenu_menuitem_new</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_new (<parameter><type>void</type></parameter>);</programlisting> +<para> +Create a new <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with all default values. +</para><variablelist role="params"> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly allocated <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-new-with-id" role="function"> +<title>dbusmenu_menuitem_new_with_id ()</title> +<indexterm zone="dbusmenu-menuitem-new-with-id"><primary>dbusmenu_menuitem_new_with_id</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_new_with_id (<parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting> +<para> +This creates a blank <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with a specific ID. +</para><variablelist role="params"> +<varlistentry><term><parameter>id</parameter> :</term> +<listitem><simpara>ID to use for this menuitem +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A newly allocated <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-get-id" role="function"> +<title>dbusmenu_menuitem_get_id ()</title> +<indexterm zone="dbusmenu-menuitem-get-id"><primary>dbusmenu_menuitem_get_id</primary></indexterm> +<programlisting><link linkend="gint"><returnvalue>gint</returnvalue></link> dbusmenu_menuitem_get_id (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +Gets the unique ID for <parameter>mi</parameter>. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to query. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The ID of the <parameter>mi</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-get-children" role="function"> +<title>dbusmenu_menuitem_get_children ()</title> +<indexterm zone="dbusmenu-menuitem-get-children"><primary>dbusmenu_menuitem_get_children</primary></indexterm> +<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_get_children (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +Returns simply the list of children that this menu item + has. The list is valid until another child related function + is called, where it might be changed. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to query. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-take-children" role="function"> +<title>dbusmenu_menuitem_take_children ()</title> +<indexterm zone="dbusmenu-menuitem-take-children"><primary>dbusmenu_menuitem_take_children</primary></indexterm> +<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_take_children (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +While the name sounds devious that's exactly what this function + does. It takes the list of children from the <parameter>mi</parameter> and clears the + internal list. The calling function is now in charge of the ref's + on the children it has taken. A lot of responsibility involved + in taking children. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> to take the children from. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A <link linkend="GList"><type>GList</type></link> of pointers to <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> objects. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-get-position" role="function"> +<title>dbusmenu_menuitem_get_position ()</title> +<indexterm zone="dbusmenu-menuitem-get-position"><primary>dbusmenu_menuitem_get_position</primary></indexterm> +<programlisting><link linkend="guint"><returnvalue>guint</returnvalue></link> dbusmenu_menuitem_get_position (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting> +<para> +This function returns the position of the menu item <parameter>mi</parameter> + in the children of <parameter>parent</parameter>. It will return zero if the + menu item can't be found. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to find the position of +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>parent</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children contain <parameter>mi</parameter> +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The position of <parameter>mi</parameter> in the children of <parameter>parent</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-get-position-realized" role="function"> +<title>dbusmenu_menuitem_get_position_realized ()</title> +<indexterm zone="dbusmenu-menuitem-get-position-realized"><primary>dbusmenu_menuitem_get_position_realized</primary></indexterm> +<programlisting><link linkend="guint"><returnvalue>guint</returnvalue></link> dbusmenu_menuitem_get_position_realized + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *parent</parameter>);</programlisting> +<para> +This function is very similar to <link linkend="dbusmenu-menuitem-get-position"><type>dbusmenu_menuitem_get_position</type></link> + except that it only counts in the children that have been realized. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to find the position of +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>parent</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children contain <parameter>mi</parameter> +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The position of <parameter>mi</parameter> in the realized children of <parameter>parent</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-append" role="function"> +<title>dbusmenu_menuitem_child_append ()</title> +<indexterm zone="dbusmenu-menuitem-child-append"><primary>dbusmenu_menuitem_child_append</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_append (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting> +<para> +This function adds <parameter>child</parameter> to the list of children on <parameter>mi</parameter> at + the end of that list. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which will become a new parent +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>child</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> that will be a child +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Whether the child has been added successfully. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-prepend" role="function"> +<title>dbusmenu_menuitem_child_prepend ()</title> +<indexterm zone="dbusmenu-menuitem-child-prepend"><primary>dbusmenu_menuitem_child_prepend</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_prepend (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting> +<para> +This function adds <parameter>child</parameter> to the list of children on <parameter>mi</parameter> at + the beginning of that list. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which will become a new parent +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>child</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenMenuitem"><type>DbusmenMenuitem</type></link> that will be a child +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Whether the child has been added successfully. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-delete" role="function"> +<title>dbusmenu_menuitem_child_delete ()</title> +<indexterm zone="dbusmenu-menuitem-child-delete"><primary>dbusmenu_menuitem_child_delete</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_delete (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>);</programlisting> +<para> +This function removes <parameter>child</parameter> from the children list of <parameter>mi</parameter>. It does + not call <link linkend="g-object-unref"><type>g_object_unref</type></link> on <parameter>child</parameter>. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> which has <parameter>child</parameter> as a child +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>child</parameter> :</term> +<listitem><simpara>The child <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that you want to no longer + be a child of <parameter>mi</parameter>. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> If we were able to delete <parameter>child</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-add-position" role="function"> +<title>dbusmenu_menuitem_child_add_position ()</title> +<indexterm zone="dbusmenu-menuitem-child-add-position"><primary>dbusmenu_menuitem_child_add_position</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_add_position + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting> +<para> +Puts <parameter>child</parameter> in the list of children for <parameter>mi</parameter> at the location + specified in <parameter>position</parameter>. If there is not enough entires available + then <parameter>child</parameter> will be placed at the end of the list. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that we're adding the child <parameter>child</parameter> to. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>child</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to make a child of <parameter>mi</parameter>. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>position</parameter> :</term> +<listitem><simpara>Where in <parameter>mi</parameter> object's list of chidren <parameter>child</parameter> should be placed. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Whether <parameter>child</parameter> was added successfully. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-reorder" role="function"> +<title>dbusmenu_menuitem_child_reorder ()</title> +<indexterm zone="dbusmenu-menuitem-child-reorder"><primary>dbusmenu_menuitem_child_reorder</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_child_reorder (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *child</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> position</parameter>);</programlisting> +<para> +This function moves a child on the list of children. It is + for a child that is already in the list, but simply needs a + new location. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>child</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that is a child needing to be moved +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>position</parameter> :</term> +<listitem><simpara>The position in the list to place it in +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> Whether the move was successful. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-child-find" role="function"> +<title>dbusmenu_menuitem_child_find ()</title> +<indexterm zone="dbusmenu-menuitem-child-find"><primary>dbusmenu_menuitem_child_find</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_child_find (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting> +<para> +Search the children of <parameter>mi</parameter> to find one with the ID of <parameter>id</parameter>. + If it doesn't exist then we return <link linkend="NULL:CAPS"><type>NULL</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> who's children to look on +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>id</parameter> :</term> +<listitem><simpara>The ID of the child that we're looking for. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The menu item with the ID <parameter>id</parameter> or <link linkend="NULL:CAPS"><type>NULL</type></link> if it + can't be found. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-find-id" role="function"> +<title>dbusmenu_menuitem_find_id ()</title> +<indexterm zone="dbusmenu-menuitem-find-id"><primary>dbusmenu_menuitem_find_id</primary></indexterm> +<programlisting><link linkend="DbusmenuMenuitem"><returnvalue>DbusmenuMenuitem</returnvalue></link> * dbusmenu_menuitem_find_id (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gint"><type>gint</type></link> id</parameter>);</programlisting> +<para> +This function searchs the whole tree of children that + are attached to <parameter>mi</parameter>. This could be quite a few nodes, all + the way down the tree. It is a depth first search. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> at the top of the tree to search +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>id</parameter> :</term> +<listitem><simpara>ID of the <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to search for +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> with the ID of <parameter>id</parameter> + or <link linkend="NULL:CAPS"><type>NULL</type></link> if there isn't such a menu item in the tree + represented by <parameter>mi</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set" role="function"> +<title>dbusmenu_menuitem_property_set ()</title> +<indexterm zone="dbusmenu-menuitem-property-set"><primary>dbusmenu_menuitem_property_set</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *value</parameter>);</programlisting> +<para> +Takes the pair of <parameter>property</parameter> and <parameter>value</parameter> and places them as a + property on <parameter>mi</parameter>. If a property already exists by that name, + then the value is set to the new value. If not, the property + is added. If the value is changed or the property was previously + unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be + emitted by this function. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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>value</parameter> :</term> +<listitem><simpara>The value of the property. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A boolean representing if the property value was set. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-value" role="function"> +<title>dbusmenu_menuitem_property_set_value ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-value"><primary>dbusmenu_menuitem_property_set_value</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_value + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>);</programlisting> +<para> +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>property</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>value</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-bool" role="function"> +<title>dbusmenu_menuitem_property_set_bool ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-bool"><primary>dbusmenu_menuitem_property_set_bool</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_bool (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gboolean"><type>gboolean</type></link> value</parameter>);</programlisting> +<para> +Takes a boolean <parameter>value</parameter> and sets it on <parameter>property</parameter> as a + property on <parameter>mi</parameter>. If a property already exists by that name, + then the value is set to the new value. If not, the property + is added. If the value is changed or the property was previously + unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be + emitted by this function. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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>value</parameter> :</term> +<listitem><simpara>The value of the property. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A boolean representing if the property value was set. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-set-int" role="function"> +<title>dbusmenu_menuitem_property_set_int ()</title> +<indexterm zone="dbusmenu-menuitem-property-set-int"><primary>dbusmenu_menuitem_property_set_int</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_set_int (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>, + <parameter>const <link linkend="gint"><type>gint</type></link> value</parameter>);</programlisting> +<para> +Takes a boolean <parameter>value</parameter> and sets it on <parameter>property</parameter> as a + property on <parameter>mi</parameter>. If a property already exists by that name, + then the value is set to the new value. If not, the property + is added. If the value is changed or the property was previously + unset then the signal <link linkend="DbusmenuMenuitem-prop-changed"><type>"prop-changed"</type></link> will be + emitted by this function. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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>value</parameter> :</term> +<listitem><simpara>The value of the property. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A boolean representing if the property value was set. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get" role="function"> +<title>dbusmenu_menuitem_property_get ()</title> +<indexterm zone="dbusmenu-menuitem-property-get"><primary>dbusmenu_menuitem_property_get</primary></indexterm> +<programlisting>const <link linkend="gchar"><returnvalue>gchar</returnvalue></link> * dbusmenu_menuitem_property_get (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +Look up a property on <parameter>mi</parameter> and return the value of it if + it exits. <link linkend="NULL:CAPS"><type>NULL</type></link> will be returned if the property doesn't + exist. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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 property to grab. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A string with the value of the property + that shouldn't be free'd. Or <link linkend="NULL:CAPS"><type>NULL</type></link> if the property + is not set or is not a string. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get-value" role="function"> +<title>dbusmenu_menuitem_property_get_value ()</title> +<indexterm zone="dbusmenu-menuitem-property-get-value"><primary>dbusmenu_menuitem_property_get_value</primary></indexterm> +<programlisting>const <link linkend="GValue"><returnvalue>GValue</returnvalue></link> * dbusmenu_menuitem_property_get_value + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +Look up a property on <parameter>mi</parameter> and return the value of it if + it exits. <link linkend="NULL:CAPS"><type>NULL</type></link> will be returned if the property doesn't + exist. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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 property to grab. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A GValue for the property. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get-bool" role="function"> +<title>dbusmenu_menuitem_property_get_bool ()</title> +<indexterm zone="dbusmenu-menuitem-property-get-bool"><primary>dbusmenu_menuitem_property_get_bool</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_get_bool (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +Look up a property on <parameter>mi</parameter> and return the value of it if + it exits. Returns <link linkend="FALSE:CAPS"><type>FALSE</type></link> if the property doesn't exist. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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 property to grab. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The value of the property or <link linkend="FALSE:CAPS"><type>FALSE</type></link>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-get-int" role="function"> +<title>dbusmenu_menuitem_property_get_int ()</title> +<indexterm zone="dbusmenu-menuitem-property-get-int"><primary>dbusmenu_menuitem_property_get_int</primary></indexterm> +<programlisting><link linkend="gint"><returnvalue>gint</returnvalue></link> dbusmenu_menuitem_property_get_int (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +Look up a property on <parameter>mi</parameter> and return the value of it if + it exits. Returns zero if the property doesn't exist. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</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 property to grab. +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The value of the property or zero. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-exist" role="function"> +<title>dbusmenu_menuitem_property_exist ()</title> +<indexterm zone="dbusmenu-menuitem-property-exist"><primary>dbusmenu_menuitem_property_exist</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_property_exist (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>property</parameter> :</term> +<listitem><simpara> +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-properties-list" role="function"> +<title>dbusmenu_menuitem_properties_list ()</title> +<indexterm zone="dbusmenu-menuitem-properties-list"><primary>dbusmenu_menuitem_properties_list</primary></indexterm> +<programlisting><link linkend="GList"><returnvalue>GList</returnvalue></link> * dbusmenu_menuitem_properties_list (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +This functiong gets a list of the names of all the properties + that are set on this menu item. This data on the list is owned + by the menuitem but the list is not and should be freed using + <link linkend="g-list-free"><function>g_list_free()</function></link> when the calling function is done with it. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to list the properties on +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A list of strings or NULL if there are none. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-properties-copy" role="function"> +<title>dbusmenu_menuitem_properties_copy ()</title> +<indexterm zone="dbusmenu-menuitem-properties-copy"><primary>dbusmenu_menuitem_properties_copy</primary></indexterm> +<programlisting><link linkend="GHashTable"><returnvalue>GHashTable</returnvalue></link> * dbusmenu_menuitem_properties_copy (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +This function takes the properties of a <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> + and puts them into a <link linkend="GHashTable"><type>GHashTable</type></link> that is referenced by the + key of a string and has the value of a string. The hash + table may not have any entries if there aren't any or there + is an error in processing. It is the caller's responsibility + to destroy the created <link linkend="GHashTable"><type>GHashTable</type></link>. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> that we're interested in the properties of +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> A brand new <link linkend="GHashTable"><type>GHashTable</type></link> that contains all of the + properties that are on this <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> <parameter>mi</parameter>. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-property-remove" role="function"> +<title>dbusmenu_menuitem_property_remove ()</title> +<indexterm zone="dbusmenu-menuitem-property-remove"><primary>dbusmenu_menuitem_property_remove</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_property_remove (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *property</parameter>);</programlisting> +<para> +Removes a property from the menuitem. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to remove the property on. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>property</parameter> :</term> +<listitem><simpara>The property to look for. +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-set-root" role="function"> +<title>dbusmenu_menuitem_set_root ()</title> +<indexterm zone="dbusmenu-menuitem-set-root"><primary>dbusmenu_menuitem_set_root</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_set_root (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="gboolean"><type>gboolean</type></link> root</parameter>);</programlisting> +<para> +This function sets the internal value of whether this is a + root node or not. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to set whether it's root +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>root</parameter> :</term> +<listitem><simpara>Whether <parameter>mi</parameter> is a root node or not +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-get-root" role="function"> +<title>dbusmenu_menuitem_get_root ()</title> +<indexterm zone="dbusmenu-menuitem-get-root"><primary>dbusmenu_menuitem_get_root</primary></indexterm> +<programlisting><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link> dbusmenu_menuitem_get_root (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>);</programlisting> +<para> +This function returns the internal value of whether this is a + root node or not. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to see whether it's root +</simpara></listitem></varlistentry> +<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> <link linkend="TRUE:CAPS"><type>TRUE</type></link> if this is a root node +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-foreach" role="function"> +<title>dbusmenu_menuitem_foreach ()</title> +<indexterm zone="dbusmenu-menuitem-foreach"><primary>dbusmenu_menuitem_foreach</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_foreach (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="void"><type>void</type></link> (funcDbusmenuMenuitem * mi, gpointer data) ()</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> data</parameter>);</programlisting> +<para> +This calls the function <parameter>func</parameter> on this menu item and all + of the children of this item. And their children. And + their children. And... you get the point. It will get + called on the whole tree. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenItem"><type>DbusmenItem</type></link> to start from +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>data</parameter> :</term> +<listitem><simpara> User data to pass to the function. <emphasis role="annotation">[closure]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-handle-event" role="function"> +<title>dbusmenu_menuitem_handle_event ()</title> +<indexterm zone="dbusmenu-menuitem-handle-event"><primary>dbusmenu_menuitem_handle_event</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_handle_event (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter>const <link linkend="gchar"><type>gchar</type></link> *name</parameter>, + <parameter>const <link linkend="GValue"><type>GValue</type></link> *value</parameter>, + <parameter><link linkend="guint"><type>guint</type></link> timestamp</parameter>);</programlisting> +<para> +This function is called to create an event. It is likely + to be overrided by subclasses. The default menu item + will respond to the activate signal and do: +</para> +<para> + Emits the <link linkend="DbusmenuMenuitem-item-activate"><type>"item-activate"</type></link> signal on this + menu item. Called by server objects when they get the + appropriate DBus signals from the client. +</para> +<para> + If you subclass this function you should really think + about calling the parent function unless you have a good + reason not to. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to send the signal on. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>name</parameter> :</term> +<listitem><simpara>The name of the signal +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>value</parameter> :</term> +<listitem><simpara>A value that could be set for the event +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>timestamp</parameter> :</term> +<listitem><simpara>The timestamp of when the event happened +</simpara></listitem></varlistentry> +</variablelist></refsect2> +<refsect2 id="dbusmenu-menuitem-send-about-to-show" role="function"> +<title>dbusmenu_menuitem_send_about_to_show ()</title> +<indexterm zone="dbusmenu-menuitem-send-about-to-show"><primary>dbusmenu_menuitem_send_about_to_show</primary></indexterm> +<programlisting><link linkend="void"><returnvalue>void</returnvalue></link> dbusmenu_menuitem_send_about_to_show + (<parameter><link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> *mi</parameter>, + <parameter><link linkend="void"><type>void</type></link> (cbDbusmenuMenuitem * mi, gpointer user_data) ()</parameter>, + <parameter><link linkend="gpointer"><type>gpointer</type></link> cb_data</parameter>);</programlisting> +<para> +This function is used to send the even that the submenu + of this item is about to be shown. Callers to this event + should delay showing the menu until their callback is + called if possible. +</para><variablelist role="params"> +<varlistentry><term><parameter>mi</parameter> :</term> +<listitem><simpara>The <link linkend="DbusmenuMenuitem"><type>DbusmenuMenuitem</type></link> to send the signal on. +</simpara></listitem></varlistentry> +<varlistentry><term><parameter>cb_data</parameter> :</term> +<listitem><simpara> Data to pass to the callback. <emphasis role="annotation">[closure]</emphasis></simpara></listitem></varlistentry> +</variablelist></refsect2> + +</refsect1> + +</refentry> |