/usr/share/gtk-doc/html/libxfce4util/libxfce4util-Xfce-Generics.html is in libxfce4util-dev 4.12.1-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Xfce Generics</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
<link rel="start" href="index.html" title="libxfce4util Reference Manual">
<link rel="up" href="libxfce4util-datatypes.html" title="Xfce Data types">
<link rel="prev" href="libxfce4util-datatypes.html" title="Xfce Data types">
<meta name="generator" content="GTK-Doc V1.21 (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="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libxfce4util-Xfce-Generics.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="libxfce4util-datatypes.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="libxfce4util-datatypes.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><img src="right-insensitive.png" width="16" height="16" border="0"></td>
</tr></table>
<div class="refentry" lang="en">
<a name="libxfce4util-Xfce-Generics"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libxfce4util-Xfce-Generics.top_of_page"></a>Xfce Generics</span></h2>
<p>Xfce Generics — Generic data types and related functions.</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" lang="en">
<a name="libxfce4util-Xfce-Generics.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#XFCE-GENERIC-STACK:CAPS" title="XFCE_GENERIC_STACK()">XFCE_GENERIC_STACK</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#xfce-stack-new" title="xfce_stack_new()">xfce_stack_new</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#xfce-stack-free" title="xfce_stack_free()">xfce_stack_free</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#xfce-stack-top" title="xfce_stack_top()">xfce_stack_top</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#xfce-stack-pop" title="xfce_stack_pop()">xfce_stack_pop</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a href="libxfce4util-Xfce-Generics.html#xfce-stack-push" title="xfce_stack_push()">xfce_stack_push</a><span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1" lang="en">
<a name="libxfce4util-Xfce-Generics.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libxfce4util/libxfce4util.h>
</pre>
</div>
<div class="refsect1" lang="en">
<a name="libxfce4util-Xfce-Generics.description"></a><h2>Description</h2>
<p>
This module provides generic data types - as known from the C++ standard
template library - for the brave C programmer. Since C does not provide
any template mechanism, these generics are completely based on C preprocessor
macros and the functions offer no type safety at all (though some common
mistakes will surely be caught by the C compiler).
</p>
<p>
</p>
<div class="example">
<a name="idm923292560"></a><p class="title"><b>Example 1. Using a generic stack</b></p>
<pre class="programlisting">
typedef XFCE_GENERIC_STACK(int) IntStack;
IntStack *stack = xfce_stack_new (IntStack);
xfce_stack_push (stack, 0);
xfce_stack_push (stack, 1);
printf ("Top is %d\n", xfce_stack_top (stack));
xfce_stack_pop (stack);
printf ("Top is %d\n", xfce_stack_top (stack));
xfce_stack_free (stack);
</pre>
</div>
<p>
</p>
</div>
<div class="refsect1" lang="en">
<a name="libxfce4util-Xfce-Generics.functions_details"></a><h2>Functions</h2>
<div class="refsect2" lang="en">
<a name="XFCE-GENERIC-STACK:CAPS"></a><h3>XFCE_GENERIC_STACK()</h3>
<pre class="programlisting">#define XFCE_GENERIC_STACK(Type)</pre>
<p>
This macro is used to create a new stack data type which elements are of
<em class="parameter"><code>Type</code></em>. For example, to create a stack type that handles elements of type
<code class="literal">double</code>, you'd write the following
</p>
<pre class="programlisting">
typedef XFCE_GENERIC_STACK(double) MyDoubleStack;
</pre>
<p>
and furtheron refer to your stack type as <code class="literal">MyDoubleStack</code>.
</p>
<div class="refsect3" lang="en">
<a name="idm923292176"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>Type</p></td>
<td class="parameter_description"><p>Data type of the elements that should be handled by the stack. Can
be any valid data type from simple int's to complex structures.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xfce-stack-new"></a><h3>xfce_stack_new()</h3>
<pre class="programlisting">#define xfce_stack_new(StackType)</pre>
<p>
Creates a new instance of <em class="parameter"><code>StackType</code></em> and returns a pointer to the newly
created instance. For example, imagine you declared a type <code class="literal">MyDoubleStack</code>
as shown above, you can instantiate this type with
</p>
<pre class="programlisting">
MyDoubleStack *my_stack = xfce_stack_new (MyDoubleStack);
</pre>
<p>
</p>
<div class="refsect3" lang="en">
<a name="idm1277763216"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>StackType</p></td>
<td class="parameter_description"><p>Type of stack declared with <a href="libxfce4util-Xfce-Generics.html#XFCE-GENERIC-STACK:CAPS" title="XFCE_GENERIC_STACK()"><span class="type">XFCE_GENERIC_STACK</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xfce-stack-free"></a><h3>xfce_stack_free()</h3>
<pre class="programlisting">#define xfce_stack_free(stack)</pre>
<p>
Frees a stack, that was allocated using <a href="libxfce4util-Xfce-Generics.html#xfce-stack-new" title="xfce_stack_new()"><span class="type">xfce_stack_new</span></a>.
</p>
<div class="refsect3" lang="en">
<a name="idm302773392"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col>
<col>
<col>
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>stack</p></td>
<td class="parameter_description"><p>A stack object.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xfce-stack-top"></a><h3>xfce_stack_top()</h3>
<pre class="programlisting">#define xfce_stack_top(stack)</pre>
<p>
Returns the top element from <em class="parameter"><code>stack</code></em>. Note that this function does not
pop the top element, it just returns it.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xfce-stack-pop"></a><h3>xfce_stack_pop()</h3>
<pre class="programlisting">#define xfce_stack_pop(stack)</pre>
<p>
Removes the top element from <em class="parameter"><code>stack</code></em>.
</p>
</div>
<hr>
<div class="refsect2" lang="en">
<a name="xfce-stack-push"></a><h3>xfce_stack_push()</h3>
<pre class="programlisting">#define xfce_stack_push(stack, value)</pre>
<p>
Pushes a new <em class="parameter"><code>value</code></em> on top of <em class="parameter"><code>stack</code></em>.
</p>
</div>
</div>
<div class="refsect1" lang="en">
<a name="libxfce4util-Xfce-Generics.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.21</div>
</body>
</html>
|