diff options
| author | Ted Gould <ted@gould.cx> | 2011-03-10 11:05:16 -0600 |
|---|---|---|
| committer | Ted Gould <ted@gould.cx> | 2011-03-10 11:05:16 -0600 |
| commit | 9aa5445985ebf244681ccfb3bb6f264eb4282bca (patch) | |
| tree | b8a4f31686c6339498e34785252ff57016a5f518 /docs/libdbusmenu-gtk/reference/xml/parser.xml | |
| parent | 05d9b0b58fa3c9247860f911bb3477cd52665671 (diff) | |
| parent | cec350b1d24eeeb308fd02846bf637d4ec92fbb5 (diff) | |
| download | libdbusmenu-9aa5445985ebf244681ccfb3bb6f264eb4282bca.tar.gz libdbusmenu-9aa5445985ebf244681ccfb3bb6f264eb4282bca.tar.bz2 libdbusmenu-9aa5445985ebf244681ccfb3bb6f264eb4282bca.zip | |
New upstream release.
∘ Add helper to get cached menuitem from widget
∘ Have the GTK Dbusmenu Client handle theme directories (LP: #727325)
∘ Fix a bunch of memory leaks (LP: #722972)
∘ Handle _ in menuitems more correctly when parsing (LP: #621301)
∘ Protect from NULL layout_props (LP: #729722)
∘ Remove the property from the hashtable before signaling that
it's been changed (LP: #725603)
∘ Wrap emitted properties in a variant
∘ Fix enum templates so they can be included by other programs
without error
∘ Setting the cached menu item (LP: #723463) (LP: #729128) (LP: #729194)
Diffstat (limited to 'docs/libdbusmenu-gtk/reference/xml/parser.xml')
| -rw-r--r-- | docs/libdbusmenu-gtk/reference/xml/parser.xml | 77 |
1 files changed, 77 insertions, 0 deletions
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> |
