4
4
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
<title>GcrComparable</title>
5
<title>Gcr Library Reference Manual: GcrComparable</title>
6
6
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7
7
<link rel="home" href="index.html" title="Gcr Library Reference Manual">
8
8
<link rel="up" href="collections.html" title="Part II. Collections">
9
9
<link rel="prev" href="GcrCollection.html" title="GcrCollection">
10
10
<link rel="next" href="GcrSimpleCollection.html" title="GcrSimpleCollection">
11
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.20 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
14
14
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
17
<td><a accesskey="p" href="GcrCollection.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18
<td><a accesskey="u" href="collections.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20
<th width="100%" align="center">Gcr Library Reference Manual</th>
21
<td><a accesskey="n" href="GcrSimpleCollection.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
23
<tr><td colspan="5" class="shortcuts">
24
<a href="#GcrComparable.synopsis" class="shortcut">Top</a>
26
<a href="#GcrComparable.description" class="shortcut">Description</a>
28
<a href="#GcrComparable.object-hierarchy" class="shortcut">Object Hierarchy</a>
30
<a href="#GcrComparable.prerequisites" class="shortcut">Prerequisites</a>
32
<a href="#GcrComparable.derived-interfaces" class="shortcut">Known Derived Interfaces</a>
34
<a href="#GcrComparable.implementations" class="shortcut">Known Implementations</a>
15
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="10"><tr valign="middle">
16
<td width="100%" align="left" class="shortcuts">
17
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
18
<a href="#GcrComparable.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
19
<a href="#GcrComparable.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_prerequisites"> <span class="dim">|</span>
20
<a href="#GcrComparable.prerequisites" class="shortcut">Prerequisites</a></span><span id="nav_derived_interfaces"> <span class="dim">|</span>
21
<a href="#GcrComparable.derived-interfaces" class="shortcut">Known Derived Interfaces</a></span><span id="nav_implementations"> <span class="dim">|</span>
22
<a href="#GcrComparable.implementations" class="shortcut">Known Implementations</a></span>
24
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
25
<td><a accesskey="u" href="collections.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
26
<td><a accesskey="p" href="GcrCollection.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
27
<td><a accesskey="n" href="GcrSimpleCollection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
37
29
<div class="refentry">
38
30
<a name="GcrComparable"></a><div class="titlepage"></div>
39
31
<div class="refnamediv"><table width="100%"><tr>
41
33
<h2><span class="refentrytitle"><a name="GcrComparable.top_of_page"></a>GcrComparable</span></h2>
42
34
<p>GcrComparable — Interface for comparing objects</p>
44
<td valign="top" align="right"></td>
36
<td class="gallery_image" valign="top" align="right"></td>
45
37
</tr></table></div>
46
<div class="refsynopsisdiv">
47
<a name="GcrComparable.synopsis"></a><h2>Synopsis</h2>
48
<pre class="synopsis"> <a class="link" href="GcrComparable.html#GcrComparable-struct" title="GcrComparable">GcrComparable</a>;
49
struct <a class="link" href="GcrComparable.html#GcrComparableIface" title="struct GcrComparableIface">GcrComparableIface</a>;
50
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GcrComparable.html#gcr-comparable-compare" title="gcr_comparable_compare ()">gcr_comparable_compare</a> (<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *self</code></em>,
51
<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *other</code></em>);
52
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="GcrComparable.html#gcr-comparable-memcmp" title="gcr_comparable_memcmp ()">gcr_comparable_memcmp</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem1</code></em>,
53
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size1</code></em>,
54
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem2</code></em>,
55
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size2</code></em>);
38
<div class="refsect1">
39
<a name="GcrComparable.functions"></a><h2>Functions</h2>
40
<div class="informaltable"><table width="100%" border="0">
42
<col width="150px" class="functions_return">
43
<col class="functions_name">
47
<td class="function_type">
48
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
50
<td class="function_name">
51
<a class="link" href="GcrComparable.html#gcr-comparable-compare" title="gcr_comparable_compare ()">gcr_comparable_compare</a> <span class="c_punctuation">()</span>
55
<td class="function_type">
56
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
58
<td class="function_name">
59
<a class="link" href="GcrComparable.html#gcr-comparable-memcmp" title="gcr_comparable_memcmp ()">gcr_comparable_memcmp</a> <span class="c_punctuation">()</span>
65
<div class="refsect1">
66
<a name="GcrComparable.other"></a><h2>Types and Values</h2>
67
<div class="informaltable"><table width="100%" border="0">
69
<col width="150px" class="name">
70
<col class="description">
74
<td class="datatype_keyword"> </td>
75
<td class="function_name"><a class="link" href="GcrComparable.html#GcrComparable-struct" title="GcrComparable">GcrComparable</a></td>
78
<td class="datatype_keyword">struct</td>
79
<td class="function_name"><a class="link" href="GcrComparable.html#GcrComparableIface" title="struct GcrComparableIface">GcrComparableIface</a></td>
58
84
<div class="refsect1">
59
85
<a name="GcrComparable.object-hierarchy"></a><h2>Object Hierarchy</h2>
60
<pre class="synopsis">
86
<pre class="screen"> GInterface
87
<span class="lineart">╰──</span> GcrComparable
65
90
<div class="refsect1">
83
108
<div class="refsect1">
84
109
<a name="GcrComparable.description"></a><h2>Description</h2>
86
The <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> interface is implemented by objects when they should be
87
comparable against one another.
90
<div class="refsect1">
91
<a name="GcrComparable.details"></a><h2>Details</h2>
110
<p>The <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> interface is implemented by objects when they should be
111
comparable against one another.</p>
113
<div class="refsect1">
114
<a name="GcrComparable.functions_details"></a><h2>Functions</h2>
115
<div class="refsect2">
116
<a name="gcr-comparable-compare"></a><h3>gcr_comparable_compare ()</h3>
117
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
118
gcr_comparable_compare (<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *self</code></em>,
119
<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *other</code></em>);</pre>
120
<p>Compare whether two objects represent the same thing. The return value can
121
also be used to sort the objects.</p>
122
<div class="refsect3">
123
<a name="id-1.3.3.10.2.5"></a><h4>Parameters</h4>
124
<div class="informaltable"><table width="100%" border="0">
126
<col width="150px" class="parameters_name">
127
<col class="parameters_description">
128
<col width="200px" class="parameters_annotations">
132
<td class="parameter_name"><p>self</p></td>
133
<td class="parameter_description"><p>The comparable object</p></td>
134
<td class="parameter_annotations"> </td>
137
<td class="parameter_name"><p>other</p></td>
138
<td class="parameter_description"><p> Another comparable object. </p></td>
139
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
144
<div class="refsect3">
145
<a name="id-1.3.3.10.2.6"></a><h4>Returns</h4>
146
<p> Zero if the two objects represent the same thing, non-zero if not.</p>
151
<div class="refsect2">
152
<a name="gcr-comparable-memcmp"></a><h3>gcr_comparable_memcmp ()</h3>
153
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
154
gcr_comparable_memcmp (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem1</code></em>,
155
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size1</code></em>,
156
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem2</code></em>,
157
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size2</code></em>);</pre>
158
<p>Compare two blocks of memory. The return value can be used to sort
159
the blocks of memory.</p>
160
<div class="refsect3">
161
<a name="id-1.3.3.10.3.5"></a><h4>Parameters</h4>
162
<div class="informaltable"><table width="100%" border="0">
164
<col width="150px" class="parameters_name">
165
<col class="parameters_description">
166
<col width="200px" class="parameters_annotations">
170
<td class="parameter_name"><p>mem1</p></td>
171
<td class="parameter_description"><p> First block of memory. </p></td>
172
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
175
<td class="parameter_name"><p>size1</p></td>
176
<td class="parameter_description"><p>Length of first block</p></td>
177
<td class="parameter_annotations"> </td>
180
<td class="parameter_name"><p>mem2</p></td>
181
<td class="parameter_description"><p> Second block of memory. </p></td>
182
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size2][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span></td>
185
<td class="parameter_name"><p>size2</p></td>
186
<td class="parameter_description"><p>Length of second block</p></td>
187
<td class="parameter_annotations"> </td>
192
<div class="refsect3">
193
<a name="id-1.3.3.10.3.6"></a><h4>Returns</h4>
194
<p> Zero if the blocks are identical, negative if first
195
less than secend, possitive otherwise.</p>
200
<div class="refsect1">
201
<a name="GcrComparable.other_details"></a><h2>Types and Values</h2>
92
202
<div class="refsect2">
93
203
<a name="GcrComparable-struct"></a><h3>GcrComparable</h3>
94
204
<pre class="programlisting">typedef struct _GcrComparable GcrComparable;</pre>
96
The <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> interface is implemented by comparable objects.
205
<p>The <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> interface is implemented by comparable objects.</p>
100
208
<div class="refsect2">
104
212
gint (*compare) (GcrComparable *self, GcrComparable *other);
108
The interface to implement for <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a>
110
<div class="variablelist"><table border="0" class="variablelist">
112
<col align="left" valign="top">
117
<td><p><span class="term"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GcrComparableIface.parent"></a>parent</code></em>;</span></p></td>
118
<td>type interface</td>
121
<td><p><span class="term"><em class="structfield"><code><a name="GcrComparableIface.compare"></a>compare</code></em> ()</span></p></td>
122
<td>Compare whether tow objects represent the same thing.</td>
128
<div class="refsect2">
129
<a name="gcr-comparable-compare"></a><h3>gcr_comparable_compare ()</h3>
130
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gcr_comparable_compare (<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *self</code></em>,
131
<em class="parameter"><code><a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a> *other</code></em>);</pre>
133
Compare whether two objects represent the same thing. The return value can
134
also be used to sort the objects.
136
<div class="variablelist"><table border="0" class="variablelist">
138
<col align="left" valign="top">
143
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
144
<td>The comparable object</td>
147
<td><p><span class="term"><em class="parameter"><code>other</code></em> :</span></p></td>
148
<td>Another comparable object. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
152
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
153
<td>Zero if the two objects represent the same thing, non-zero if not.</td>
159
<div class="refsect2">
160
<a name="gcr-comparable-memcmp"></a><h3>gcr_comparable_memcmp ()</h3>
161
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> gcr_comparable_memcmp (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem1</code></em>,
162
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size1</code></em>,
163
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> mem2</code></em>,
164
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size2</code></em>);</pre>
166
Compare two blocks of memory. The return value can be used to sort
167
the blocks of memory.
169
<div class="variablelist"><table border="0" class="variablelist">
171
<col align="left" valign="top">
176
<td><p><span class="term"><em class="parameter"><code>mem1</code></em> :</span></p></td>
177
<td>First block of memory. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size1][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span>
181
<td><p><span class="term"><em class="parameter"><code>size1</code></em> :</span></p></td>
182
<td>Length of first block</td>
185
<td><p><span class="term"><em class="parameter"><code>mem2</code></em> :</span></p></td>
186
<td>Second block of memory. <span class="annotation">[<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=size2][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> guint8]</span>
190
<td><p><span class="term"><em class="parameter"><code>size2</code></em> :</span></p></td>
191
<td>Length of second block</td>
194
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
195
<td>Zero if the blocks are identical, negative if first
196
less than secend, possitive otherwise.</td>
215
<p>The interface to implement for <a class="link" href="GcrComparable.html" title="GcrComparable"><span class="type">GcrComparable</span></a></p>
216
<div class="refsect3">
217
<a name="id-1.3.3.11.3.5"></a><h4>Members</h4>
218
<div class="informaltable"><table width="100%" border="0">
220
<col width="300px" class="struct_members_name">
221
<col class="struct_members_description">
222
<col width="200px" class="struct_members_annotations">
226
<td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-Type-Information.html#GTypeInterface"><span class="type">GTypeInterface</span></a> <em class="structfield"><code><a name="GcrComparableIface.parent"></a>parent</code></em>;</p></td>
227
<td class="struct_member_description"><p>type interface</p></td>
228
<td class="struct_member_annotations"> </td>
231
<td class="struct_member_name"><p><em class="structfield"><code><a name="GcrComparableIface.compare"></a>compare</code></em> ()</p></td>
232
<td class="struct_member_description"><p>Compare whether tow objects represent the same thing.</p></td>
233
<td class="struct_member_annotations"> </td>
203
241
<div class="footer">
205
Generated by GTK-Doc V1.19</div>
243
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'