aboutsummaryrefslogtreecommitdiff
path: root/docs/libdbusmenu-gtk/reference/xml/parser.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/libdbusmenu-gtk/reference/xml/parser.xml')
-rw-r--r--docs/libdbusmenu-gtk/reference/xml/parser.xml77
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 &lt;libdbusmenu-gtk/parser.h&gt;
+
+<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>&#160;:</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>&#160;:</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>&#160;:</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>&#160;:</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>