8
8
<link rel="up" href="ch02.html" title="Lib">
9
9
<link rel="prev" href="rhythmbox-rb-util.html" title="rb-util">
10
10
<link rel="next" href="ch03.html" title="Metadata">
11
<meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.18 (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">
37
37
</tr></table></div>
38
38
<div class="refsynopsisdiv">
39
39
<a name="rhythmbox-rb-text-helpers.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-direction-conflict" title="rb_text_direction_conflict ()">rb_text_direction_conflict</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> dir1</code></em>,
41
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> dir2</code></em>);
42
<a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="returnvalue">PangoDirection</span></a> <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-common-direction" title="rb_text_common_direction ()">rb_text_common_direction</a> (<em class="parameter"><code>const <span class="type">char</span> *first</code></em>,
40
<pre class="synopsis"><span class="returnvalue">gboolean</span> <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-direction-conflict" title="rb_text_direction_conflict ()">rb_text_direction_conflict</a> (<em class="parameter"><code><span class="type">PangoDirection</span> dir1</code></em>,
41
<em class="parameter"><code><span class="type">PangoDirection</span> dir2</code></em>);
42
<span class="returnvalue">PangoDirection</span> <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-common-direction" title="rb_text_common_direction ()">rb_text_common_direction</a> (<em class="parameter"><code>const <span class="type">char</span> *first</code></em>,
43
43
<em class="parameter"><code>...</code></em>);
44
<span class="returnvalue">char</span> * <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-cat" title="rb_text_cat ()">rb_text_cat</a> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> base_dir</code></em>,
44
<span class="returnvalue">char</span> * <a class="link" href="rhythmbox-rb-text-helpers.html#rb-text-cat" title="rb_text_cat ()">rb_text_cat</a> (<em class="parameter"><code><span class="type">PangoDirection</span> base_dir</code></em>,
45
45
<em class="parameter"><code>...</code></em>);
56
56
<a name="rhythmbox-rb-text-helpers.details"></a><h2>Details</h2>
57
57
<div class="refsect2">
58
58
<a name="rb-text-direction-conflict"></a><h3>rb_text_direction_conflict ()</h3>
59
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> rb_text_direction_conflict (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> dir1</code></em>,
60
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> dir2</code></em>);</pre>
59
<pre class="programlisting"><span class="returnvalue">gboolean</span> rb_text_direction_conflict (<em class="parameter"><code><span class="type">PangoDirection</span> dir1</code></em>,
60
<em class="parameter"><code><span class="type">PangoDirection</span> dir2</code></em>);</pre>
62
62
Direction conflict here means the two directions are defined (non-neutral)
63
63
and they are different.
85
85
<div class="refsect2">
86
86
<a name="rb-text-common-direction"></a><h3>rb_text_common_direction ()</h3>
87
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="returnvalue">PangoDirection</span></a> rb_text_common_direction (<em class="parameter"><code>const <span class="type">char</span> *first</code></em>,
87
<pre class="programlisting"><span class="returnvalue">PangoDirection</span> rb_text_common_direction (<em class="parameter"><code>const <span class="type">char</span> *first</code></em>,
88
88
<em class="parameter"><code>...</code></em>);</pre>
90
90
This functions checks the direction of all given strings and:
93
1. If all strings are direction neutral, returns <a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a>;
96
2. If all strings are either LTR or neutral, returns <a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PANGO-DIRECTION-LTR:CAPS"><code class="literal">PANGO_DIRECTION_LTR</code></a>;
99
3. If all strings are either RTL or neutral, returns <a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PANGO-DIRECTION-RTL:CAPS"><code class="literal">PANGO_DIRECTION_RTL</code></a>;
102
4. If at least one is RTL and one LTR, returns <a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PANGO-DIRECTION-NEUTRAL:CAPS"><code class="literal">PANGO_DIRECTION_NEUTRAL</code></a>.
93
1. If all strings are direction neutral, returns <code class="literal">PANGO_DIRECTION_NEUTRAL</code>;
96
2. If all strings are either LTR or neutral, returns <code class="literal">PANGO_DIRECTION_LTR</code>;
99
3. If all strings are either RTL or neutral, returns <code class="literal">PANGO_DIRECTION_RTL</code>;
102
4. If at least one is RTL and one LTR, returns <code class="literal">PANGO_DIRECTION_NEUTRAL</code>.
105
105
Note: neutral (1) and mixed (4) are two very different situations,
117
117
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
118
<td>rest of strings, terminated with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
118
<td>rest of strings, terminated with <code class="literal">NULL</code>
129
129
<div class="refsect2">
130
130
<a name="rb-text-cat"></a><h3>rb_text_cat ()</h3>
131
<pre class="programlisting"><span class="returnvalue">char</span> * rb_text_cat (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/pango/pango-Bidirectional-Text.html#PangoDirection"><span class="type">PangoDirection</span></a> base_dir</code></em>,
131
<pre class="programlisting"><span class="returnvalue">char</span> * rb_text_cat (<em class="parameter"><code><span class="type">PangoDirection</span> base_dir</code></em>,
132
132
<em class="parameter"><code>...</code></em>);</pre>
134
134
This function concatenates strings to a single string, preserving
139
139
It is called like this:
142
s = rb_text_cat(base_dir, str1, format1, ..., strN, formatN, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)
142
s = rb_text_cat(base_dir, str1, format1, ..., strN, formatN, <code class="literal">NULL</code>)
145
145
Format is a printf format with exactly one %s. "%s" or "" will
184
184
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
185
<td>pairs of strings (content, format) terminated with <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
185
<td>pairs of strings (content, format) terminated with <code class="literal">NULL</code>.</td>
188
188
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>