aboutsummaryrefslogtreecommitdiff
path: root/docs/libdbusmenu-gtk/reference/html/libdbusmenu-gtk-parser.html
blob: 10b7a3a1e5b04c93547df4feeeb7d4d88779f28b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>parser</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="libdbusmenu-gtk Reference Manual">
<link rel="up" href="ch01.html" title="API">
<link rel="prev" href="libdbusmenu-gtk-DbusmenuGtkClient.html" title="DbusmenuGtkClient">
<link rel="next" href="object-tree.html" title="Object Hierarchy">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libdbusmenu-gtk-DbusmenuGtkClient.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libdbusmenu-gtk Reference Manual</th>
<td><a accesskey="n" href="object-tree.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libdbusmenu-gtk-parser.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#libdbusmenu-gtk-parser.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="libdbusmenu-gtk-parser"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libdbusmenu-gtk-parser.top_of_page"></a>parser</span></h2>
<p>parser — A parser of in-memory GTK menu trees</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libdbusmenu-gtk-parser.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv">
<a name="libdbusmenu-gtk-parser.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libdbusmenu-gtk/parser.h&gt;

<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  <a class="link" href="libdbusmenu-gtk-parser.html#dbusmenu-gtk-parse-menu-structure" title="dbusmenu_gtk_parse_menu_structure ()">dbusmenu_gtk_parse_menu_structure</a>   (<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);
<a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  <a class="link" href="libdbusmenu-gtk-parser.html#dbusmenu-gtk-parse-get-cached-item" title="dbusmenu_gtk_parse_get_cached_item ()">dbusmenu_gtk_parse_get_cached_item</a>  (<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="libdbusmenu-gtk-parser.description"></a><h2>Description</h2>
<p>
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.
</p>
</div>
<div class="refsect1">
<a name="libdbusmenu-gtk-parser.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="dbusmenu-gtk-parse-menu-structure"></a><h3>dbusmenu_gtk_parse_menu_structure ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  dbusmenu_gtk_parse_menu_structure   (<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
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.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>A <a href="http://developer.gnome.org/devel/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> or <a href="http://developer.gnome.org/devel/gtk/GtkMenuShell.html"><span class="type">GtkMenuShell</span></a> to turn into a <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A dbusmenu item representing the menu structure. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="dbusmenu-gtk-parse-get-cached-item"></a><h3>dbusmenu_gtk_parse_get_cached_item ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="returnvalue">DbusmenuMenuitem</span></a> *  dbusmenu_gtk_parse_get_cached_item  (<em class="parameter"><code><a href="http://developer.gnome.org/devel/gtk/GtkWidget.html"><span class="type">GtkWidget</span></a> *widget</code></em>);</pre>
<p>
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.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td>
<td>A <a href="http://developer.gnome.org/devel/gtk/GtkMenuItem.html"><span class="type">GtkMenuItem</span></a> that may have a cached <a href="/usr/share/gtk-doc/html/libdbusmenu-glib/libdbusmenu-glib-DbusmenuMenuitem.html#DbusmenuMenuitem"><span class="type">DbusmenuMenuitem</span></a> from the parser</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A pointer to the cached item
or NULL if it isn't there. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>