/usr/share/gtk-doc/html/devhelp-3/DhKeywordModel.html is in libdevhelp-dev 3.28.1-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 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>DhKeywordModel: Devhelp Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Devhelp Reference Manual">
<link rel="up" href="side-panel.html" title="Side Panel">
<link rel="prev" href="DhBookTree.html" title="DhBookTree">
<link rel="next" href="assistant.html" title="Assistant">
<meta name="generator" content="GTK-Doc V1.28.1 (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="#DhKeywordModel.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
<a href="#DhKeywordModel.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces"> <span class="dim">|</span>
<a href="#DhKeywordModel.implemented-interfaces" class="shortcut">Implemented Interfaces</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="side-panel.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="DhBookTree.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="assistant.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="DhKeywordModel"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="DhKeywordModel.top_of_page"></a>DhKeywordModel</span></h2>
<p>DhKeywordModel — A custom <a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeModel.html#GtkTreeModel-struct"><span class="type">GtkTreeModel</span></a> implementation for searching
<a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a>'s</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="DhKeywordModel.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="returnvalue">DhKeywordModel</span></a> *
</td>
<td class="function_name">
<a class="link" href="DhKeywordModel.html#dh-keyword-model-new" title="dh_keyword_model_new ()">dh_keyword_model_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="DhLink.html" title="DhLink"><span class="returnvalue">DhLink</span></a> *
</td>
<td class="function_name">
<a class="link" href="DhKeywordModel.html#dh-keyword-model-filter" title="dh_keyword_model_filter ()">dh_keyword_model_filter</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="DhKeywordModel.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="DhKeywordModel.html#DhKeywordModel-struct" title="struct DhKeywordModel">DhKeywordModel</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="DhKeywordModel.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> <a href="/home/seb/jhbuild/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct">GObject</a>
<span class="lineart">╰──</span> DhKeywordModel
</pre>
</div>
<div class="refsect1">
<a name="DhKeywordModel.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
DhKeywordModel implements
<a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeModel.html#GtkTreeModel-struct">GtkTreeModel</a>.</p>
</div>
<div class="refsect1">
<a name="DhKeywordModel.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <devhelp/devhelp.h>
</pre>
</div>
<div class="refsect1">
<a name="DhKeywordModel.description"></a><h2>Description</h2>
<p><a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="type">DhKeywordModel</span></a> is a custom <a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeModel.html#GtkTreeModel-struct"><span class="type">GtkTreeModel</span></a> implementation (as a list, not a
tree) for searching <a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a>'s.</p>
<p>The <a class="link" href="DhKeywordModel.html#dh-keyword-model-filter" title="dh_keyword_model_filter ()"><code class="function">dh_keyword_model_filter()</code></a> function is used to set the search criteria. It
fills the <a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeModel.html#GtkTreeModel-struct"><span class="type">GtkTreeModel</span></a> with the list of <a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a>'s that match the search
criteria (up to a certain maximum number of matches).</p>
<p>How the search works (for end users) is explained in the user documentation
of the Devhelp application.</p>
<div class="refsect2">
<a name="id-1.2.4.4.8.5"></a><h3>Filter by book and page</h3>
<p>As a kind of API for integrating Devhelp with other applications, the search
string supports additional features. Those features are not intended to be
used directly by end users when typing the search string in the GUI, because
it's not really convenient. It is intended to be used with the
<code class="literal">devhelp --search "search-string"</code> command line, so that another application
can launch Devhelp and set a specific search string.</p>
<p>It is possible to filter by book by prefixing the search string with
“book:the-book-ID”. For example “book:gtk3”. If there are no other search
terms, it shows the top-level page of that book. If there are other search
terms, it limits the search to the specified book. See also the
<a class="link" href="DhBook.html#dh-book-get-id" title="dh_book_get_id ()"><code class="function">dh_book_get_id()</code></a> function (in the <code class="literal">*.devhelp2</code> index file format it's called
the book “name”, not ID, but ID is clearer).</p>
<p>Similarly, it is possible to filter by page, by prefixing the search string
with “page:the-page-ID”. For example “page:GtkWindow”. If there are no other
search terms, the top of the page is shown and the search matches all the
symbols part of that page. If there are other search terms, it limits the
search to the specified page. To know what is the “page ID”, see the
<a class="link" href="DhLink.html#dh-link-belongs-to-page" title="dh_link_belongs_to_page ()"><code class="function">dh_link_belongs_to_page()</code></a> function.</p>
<p>“book:” and “page:” can be combined. Normal search terms must be
<span class="emphasis"><em>after</em></span> “book:” and “page:”.</p>
<p>The book and page IDs – even if they contain an uppercase letter – don't
affect the case sensitivity for the other search terms.</p>
</div>
</div>
<div class="refsect1">
<a name="DhKeywordModel.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="dh-keyword-model-new"></a><h3>dh_keyword_model_new ()</h3>
<pre class="programlisting"><a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="returnvalue">DhKeywordModel</span></a> *
dh_keyword_model_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="refsect3">
<a name="dh-keyword-model-new.returns"></a><h4>Returns</h4>
<p> a new <a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="type">DhKeywordModel</span></a> object.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="dh-keyword-model-filter"></a><h3>dh_keyword_model_filter ()</h3>
<pre class="programlisting"><a class="link" href="DhLink.html" title="DhLink"><span class="returnvalue">DhLink</span></a> *
dh_keyword_model_filter (<em class="parameter"><code><a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="type">DhKeywordModel</span></a> *model</code></em>,
<em class="parameter"><code>const <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *search_string</code></em>,
<em class="parameter"><code>const <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *current_book_id</code></em>,
<em class="parameter"><code>const <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *language</code></em>);</pre>
<p>Searches in the <a class="link" href="DhBookManager.html" title="DhBookManager"><span class="type">DhBookManager</span></a> the list of <a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a>'s that correspond to
<em class="parameter"><code>search_string</code></em>
, and fills the <em class="parameter"><code>model</code></em>
with that list (erasing the previous
content).</p>
<p>Attention, when calling this function the <em class="parameter"><code>model</code></em>
needs to be disconnected
from the <a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeView.html#GtkTreeView-struct"><span class="type">GtkTreeView</span></a>, because the <a href="/home/seb/jhbuild/share/gtk-doc/html/gtk3/GtkTreeModel.html#GtkTreeModel-struct"><span class="type">GtkTreeModel</span></a> signals are not emitted, to
improve the performances (sending a lot of signals is slow) and have a
simpler implementation. The previous row selection is anyway no longer
relevant.</p>
<p>Note that there is a maximum number of matches (configured internally). When
the maximum is reached the search is stopped, to avoid blocking the GUI
(since this function runs synchronously) if the <em class="parameter"><code>search_string</code></em>
contains for
example only one character. (And it is anyway not very useful to show to the
user tens of thousands search results).</p>
<div class="refsect3">
<a name="dh-keyword-model-filter.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>model</p></td>
<td class="parameter_description"><p>a <a class="link" href="DhKeywordModel.html" title="DhKeywordModel"><span class="type">DhKeywordModel</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>search_string</p></td>
<td class="parameter_description"><p>a search query.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>current_book_id</p></td>
<td class="parameter_description"><p>the ID of the book currently shown, or <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>language</p></td>
<td class="parameter_description"><p>deprecated, must be <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="dh-keyword-model-filter.returns"></a><h4>Returns</h4>
<p>the <a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a> that matches exactly
<em class="parameter"><code>search_string</code></em>
, or <a href="/home/seb/jhbuild/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such <a class="link" href="DhLink.html" title="DhLink"><span class="type">DhLink</span></a> was found within the maximum
number of matches. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
</div>
<div class="refsect1">
<a name="DhKeywordModel.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="DhKeywordModel-struct"></a><h3>struct DhKeywordModel</h3>
<pre class="programlisting">struct DhKeywordModel;</pre>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.28.1</div>
</body>
</html>
|