/usr/share/gtk-doc/html/gtksourceview-3.0/GtkSourceCompletionContext.html is in libgtksourceview-3.0-doc 3.10.2-0ubuntu1.
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 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkSourceView 3 Reference Manual: GtkSourceCompletionContext</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GtkSourceView 3 Reference Manual">
<link rel="up" href="ch01.html" title="API reference">
<link rel="prev" href="GtkSourceCompletion.html" title="GtkSourceCompletion">
<link rel="next" href="GtkSourceCompletionInfo.html" title="GtkSourceCompletionInfo">
<meta name="generator" content="GTK-Doc V1.19.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="10"><tr valign="middle">
<td width="100%" align="left">
<a href="#" class="shortcut">Top</a>
|
<a href="#GtkSourceCompletionContext.description" class="shortcut">Description</a>
|
<a href="#GtkSourceCompletionContext.object-hierarchy" class="shortcut">Object Hierarchy</a>
|
<a href="#GtkSourceCompletionContext.properties" class="shortcut">Properties</a>
|
<a href="#GtkSourceCompletionContext.signals" class="shortcut">Signals</a>
</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="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkSourceCompletion.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkSourceCompletionInfo.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkSourceCompletionContext"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkSourceCompletionContext.top_of_page"></a>GtkSourceCompletionContext</span></h2>
<p>GtkSourceCompletionContext — The context of a completion</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="GtkSourceCompletionContext.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <gtksourceview/gtksource.h>
enum <a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation">GtkSourceCompletionActivation</a>;
<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext-struct" title="GtkSourceCompletionContext">GtkSourceCompletionContext</a>;
<span class="returnvalue">void</span> <a class="link" href="GtkSourceCompletionContext.html#gtk-source-completion-context-add-proposals" title="gtk_source_completion_context_add_proposals ()">gtk_source_completion_context_add_proposals</a>
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>,
<em class="parameter"><code><a class="link" href="GtkSourceCompletionProvider.html" title="GtkSourceCompletionProvider"><span class="type">GtkSourceCompletionProvider</span></a> *provider</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *proposals</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> finished</code></em>);
<span class="returnvalue">void</span> <a class="link" href="GtkSourceCompletionContext.html#gtk-source-completion-context-get-iter" title="gtk_source_completion_context_get_iter ()">gtk_source_completion_context_get_iter</a>
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a> *iter</code></em>);
<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation"><span class="returnvalue">GtkSourceCompletionActivation</span></a> <a class="link" href="GtkSourceCompletionContext.html#gtk-source-completion-context-get-activation" title="gtk_source_completion_context_get_activation ()">gtk_source_completion_context_get_activation</a>
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject">GObject</a>
+----<a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GInitiallyUnowned">GInitiallyUnowned</a>
+----GtkSourceCompletionContext
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.properties"></a><h2>Properties</h2>
<pre class="synopsis">
"<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext--activation" title='The "activation" property'>activation</a>" <a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation"><span class="type">GtkSourceCompletionActivation</span></a> : Read / Write
"<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext--completion" title='The "completion" property'>completion</a>" <a class="link" href="GtkSourceCompletion.html" title="GtkSourceCompletion"><span class="type">GtkSourceCompletion</span></a>* : Read / Write / Construct Only
"<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext--iter" title='The "iter" property'>iter</a>" <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a>* : Read / Write
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.signals"></a><h2>Signals</h2>
<pre class="synopsis">
"<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext-cancelled" title='The "cancelled" signal'>cancelled</a>" : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a>
</pre>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.description"></a><h2>Description</h2>
<p>
Initially, the completion window is hidden. For a completion to occur, it has
to be activated. The different possible activations are listed in
<a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation"><span class="type">GtkSourceCompletionActivation</span></a>. When an activation occurs, a
<a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> object is created, and the eligible providers are
asked to add proposals with <a class="link" href="GtkSourceCompletionContext.html#gtk-source-completion-context-add-proposals" title="gtk_source_completion_context_add_proposals ()"><code class="function">gtk_source_completion_context_add_proposals()</code></a>.
</p>
<p>
If no proposals are added, the completion window remains hidden, and the
context is destroyed.
</p>
<p>
On the other hand, if proposals are added, the completion window becomes
visible, and the user can choose a proposal. If the user is not happy with
the shown proposals, he or she can insert or delete characters, to modify the
completion context and therefore hoping to see the proposal he or she wants.
This means that when an insertion or deletion occurs in the <a href="/usr/share/gtk-doc/html/gtk3/GtkTextBuffer.html"><span class="type">GtkTextBuffer</span></a>
when the completion window is visible, the eligible providers are again asked
to add proposals. The <a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionContext--activation" title='The "activation" property'><span class="type">"activation"</span></a> remains the
same in this case.
</p>
<p>
When the completion window is hidden, the interactive completion is triggered
only on insertion in the buffer, not on deletion. Once the completion window
is visible, then on each insertion or deletion, there is a new population and
the providers are asked to add proposals. If there are no more proposals, the
completion window disappears. So if you want to keep the completion window
visible, but there are no proposals, you can insert a dummy proposal named
"No proposals". For example, the user types progressively the name of
a function, and some proposals appear. The user types a bad character and
there are no proposals anymore. What the user wants is to delete the last
character, and see the previous proposals. If the completion window
disappears, the previous proposals will not reappear on the character
deletion.
</p>
<p>
A <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a> is associated with the context, this is where the completion
takes place. With this <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a>, you can get the associated
<a href="/usr/share/gtk-doc/html/gtk3/GtkTextBuffer.html"><span class="type">GtkTextBuffer</span></a> with <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html#gtk-text-iter-get-buffer"><code class="function">gtk_text_iter_get_buffer()</code></a>.
</p>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GtkSourceCompletionActivation"></a><h3>enum GtkSourceCompletionActivation</h3>
<pre class="programlisting">typedef enum {
GTK_SOURCE_COMPLETION_ACTIVATION_NONE = 0,
GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE = 1 << 0,
GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED = 1 << 1
} GtkSourceCompletionActivation;
</pre>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><a name="GTK-SOURCE-COMPLETION-ACTIVATION-NONE:CAPS"></a><span class="term"><code class="literal">GTK_SOURCE_COMPLETION_ACTIVATION_NONE</code></span></p></td>
<td>None.
</td>
</tr>
<tr>
<td><p><a name="GTK-SOURCE-COMPLETION-ACTIVATION-INTERACTIVE:CAPS"></a><span class="term"><code class="literal">GTK_SOURCE_COMPLETION_ACTIVATION_INTERACTIVE</code></span></p></td>
<td>Interactive activation. By
default, it occurs on each insertion in the <a href="/usr/share/gtk-doc/html/gtk3/GtkTextBuffer.html"><span class="type">GtkTextBuffer</span></a>. This can be
blocked temporarily with <a class="link" href="GtkSourceCompletion.html#gtk-source-completion-block-interactive" title="gtk_source_completion_block_interactive ()"><code class="function">gtk_source_completion_block_interactive()</code></a>.
</td>
</tr>
<tr>
<td><p><a name="GTK-SOURCE-COMPLETION-ACTIVATION-USER-REQUESTED:CAPS"></a><span class="term"><code class="literal">GTK_SOURCE_COMPLETION_ACTIVATION_USER_REQUESTED</code></span></p></td>
<td>User requested activation.
By default, it occurs when the user presses
<span class="keycap"><strong>Control</strong></span>+<span class="keycap"><strong>space</strong></span>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceCompletionContext-struct"></a><h3>GtkSourceCompletionContext</h3>
<pre class="programlisting">typedef struct _GtkSourceCompletionContext GtkSourceCompletionContext;</pre>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-completion-context-add-proposals"></a><h3>gtk_source_completion_context_add_proposals ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gtk_source_completion_context_add_proposals
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>,
<em class="parameter"><code><a class="link" href="GtkSourceCompletionProvider.html" title="GtkSourceCompletionProvider"><span class="type">GtkSourceCompletionProvider</span></a> *provider</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> *proposals</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> finished</code></em>);</pre>
<p>
Providers can use this function to add proposals to the completion. They
can do so asynchronously by means of the <em class="parameter"><code>finished</code></em> argument. Providers must
ensure that they always call this function with <em class="parameter"><code>finished</code></em> set to <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
once each population (even if no proposals need to be added).
Population occurs when the <a class="link" href="GtkSourceCompletionProvider.html#gtk-source-completion-provider-populate" title="gtk_source_completion_provider_populate ()"><code class="function">gtk_source_completion_provider_populate()</code></a>
function is called.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>a <a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>provider</code></em> :</span></p></td>
<td>a <a class="link" href="GtkSourceCompletionProvider.html" title="GtkSourceCompletionProvider"><span class="type">GtkSourceCompletionProvider</span></a>. <span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> GtkSource.CompletionProvider]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>proposals</code></em> :</span></p></td>
<td>The list of proposals to add. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GtkSource.CompletionProposal]</span>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>finished</code></em> :</span></p></td>
<td>Whether the provider is finished adding proposals.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-completion-context-get-iter"></a><h3>gtk_source_completion_context_get_iter ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> gtk_source_completion_context_get_iter
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a> *iter</code></em>);</pre>
<p>
Get the iter at which the completion was invoked. Providers can use this
to determine how and if to match proposals.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>a <a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td>
<td>a <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a>. <span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-source-completion-context-get-activation"></a><h3>gtk_source_completion_context_get_activation ()</h3>
<pre class="programlisting"><a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation"><span class="returnvalue">GtkSourceCompletionActivation</span></a> gtk_source_completion_context_get_activation
(<em class="parameter"><code><a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *context</code></em>);</pre>
<p>
Get the context activation.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>context</code></em> :</span></p></td>
<td>a <a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The context activation.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkSourceCompletionContext--activation"></a><h3>The <code class="literal">"activation"</code> property</h3>
<pre class="programlisting"> "activation" <a class="link" href="GtkSourceCompletionContext.html#GtkSourceCompletionActivation" title="enum GtkSourceCompletionActivation"><span class="type">GtkSourceCompletionActivation</span></a> : Read / Write</pre>
<p>
The completion activation
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceCompletionContext--completion"></a><h3>The <code class="literal">"completion"</code> property</h3>
<pre class="programlisting"> "completion" <a class="link" href="GtkSourceCompletion.html" title="GtkSourceCompletion"><span class="type">GtkSourceCompletion</span></a>* : Read / Write / Construct Only</pre>
<p>
The <a class="link" href="GtkSourceCompletion.html" title="GtkSourceCompletion"><span class="type">GtkSourceCompletion</span></a> associated with the context.
</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkSourceCompletionContext--iter"></a><h3>The <code class="literal">"iter"</code> property</h3>
<pre class="programlisting"> "iter" <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a>* : Read / Write</pre>
<p>
The <a href="/usr/share/gtk-doc/html/gtk3/GtkTextIter.html"><span class="type">GtkTextIter</span></a> at which the completion is invoked.
</p>
</div>
</div>
<div class="refsect1">
<a name="GtkSourceCompletionContext.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkSourceCompletionContext-cancelled"></a><h3>The <code class="literal">"cancelled"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span> user_function (<a class="link" href="GtkSourceCompletionContext.html" title="GtkSourceCompletionContext"><span class="type">GtkSourceCompletionContext</span></a> *arg0,
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data) : <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#G-SIGNAL-ACTION:CAPS"><code class="literal">Action</code></a></pre>
<p>
Emitted when the current population of proposals has been cancelled.
Providers adding proposals asynchronously should connect to this signal
to know when to cancel running proposal queries.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr></tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.19.1</div>
</body>
</html>
|