This file is indexed.

/usr/share/gtk-doc/html/rhythmbox/rhythmbox-rb-text-helpers.html is in rhythmbox-doc 2.96-0ubuntu4.1.

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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>rb-text-helpers</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
<link rel="home" href="index.html" title="Rhythmbox Development Reference Manual">
<link rel="up" href="ch02.html" title="Lib">
<link rel="prev" href="rhythmbox-rb-util.html" title="rb-util">
<link rel="next" href="ch03.html" title="Metadata">
<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="rhythmbox-rb-util.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.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">Rhythmbox Development Reference Manual</th>
<td><a accesskey="n" href="ch03.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#rhythmbox-rb-text-helpers.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#rhythmbox-rb-text-helpers.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="rhythmbox-rb-text-helpers"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="rhythmbox-rb-text-helpers.top_of_page"></a>rb-text-helpers</span></h2>
<p>rb-text-helpers — text direction (LTR/RTL) functions</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="rhythmbox-rb-text-helpers.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis"><a href="/usr/share/gtk-doc/html/glib/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>,
                                                         <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>);
<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>,
                                                         <em class="parameter"><code>...</code></em>);
<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>,
                                                         <em class="parameter"><code>...</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="rhythmbox-rb-text-helpers.description"></a><h2>Description</h2>
<p>
Provides some helper functions for constructing strings that
may include both left-to-right and right-to-left text.
</p>
</div>
<div class="refsect1">
<a name="rhythmbox-rb-text-helpers.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="rb-text-direction-conflict"></a><h3>rb_text_direction_conflict ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/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>,
                                                         <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>
<p>
Direction conflict here means the two directions are defined (non-neutral)
and they are different.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dir1</code></em> :</span></p></td>
<td>direction A</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dir2</code></em> :</span></p></td>
<td>direction B</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two directions conflict.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="rb-text-common-direction"></a><h3>rb_text_common_direction ()</h3>
<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>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
This functions checks the direction of all given strings and:
</p>
<p>
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>;
</p>
<p>
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>;
</p>
<p>
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>;
</p>
<p>
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>.
</p>
<p>
Note: neutral (1) and mixed (4) are two very different situations,
they share a return code here only because they're the same for our
specific use.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>first</code></em> :</span></p></td>
<td>first string</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>rest of strings, terminated with <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>common direction of all strings, as defined above.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="rb-text-cat"></a><h3>rb_text_cat ()</h3>
<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>,
                                                         <em class="parameter"><code>...</code></em>);</pre>
<p>
This function concatenates strings to a single string, preserving
each part's original direction (LTR or RTL) using unicode markup,
as detailed here: http://unicode.org/reports/tr9/.
</p>
<p>
It is called like this:
</p>
<p>
s = rb_text_cat(base_dir, str1, format1, ..., strN, formatN, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>)
</p>
<p>
Format is a printf format with exactly one %s. "%s" or "" will
insert the string as is.
</p>
<p>
Any string that is empty ("") will be skipped, its format must still be
passed.
</p>
<p>
A space is inserted between strings.
</p>
<p>
The algorithm:
</p>
<p>
1. Caller supplies the base direction of the result in base_dir.
</p>
<p>
2. Insert either LRM or RLM at the beginning of the string to set
   its base direction, according to base_dir.
</p>
<p>
3. Find the direction of each string using pango.
</p>
<p>
4. For strings that have the same direction as the base direction,
   just insert them in.
</p>
<p>
5. For strings that have the opposite direction than the base one,
   insert them surrounded with embedding codes RLE/LRE .. PDF.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>base_dir</code></em> :</span></p></td>
<td>direction of the result string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>pairs of strings (content, format) terminated with <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>a new string containing the result.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.18</div>
</body>
</html>