gtk3/docs/reference/gtk/html/GtkEntryCompletion.html
2021-04-15 09:52:10 +01:00

1722 lines
88 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkEntryCompletion: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="NumericEntry.html" title="Numeric and Text Data Entry">
<link rel="prev" href="GtkEntryBuffer.html" title="GtkEntryBuffer">
<link rel="next" href="GtkScale.html" title="GtkScale">
<meta name="generator" content="GTK-Doc V1.33.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="#GtkEntryCompletion.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkEntryCompletion.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GtkEntryCompletion.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkEntryCompletion.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GtkEntryCompletion.signals" class="shortcut">Signals</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="NumericEntry.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="GtkEntryBuffer.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkScale.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkEntryCompletion"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkEntryCompletion.top_of_page"></a>GtkEntryCompletion</span></h2>
<p>GtkEntryCompletion — Completion functionality for GtkEntry</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkEntryCompletion.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc" title="GtkEntryCompletionMatchFunc ()">*GtkEntryCompletionMatchFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="returnvalue">GtkEntryCompletion</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-new" title="gtk_entry_completion_new ()">gtk_entry_completion_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="returnvalue">GtkEntryCompletion</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-new-with-area" title="gtk_entry_completion_new_with_area ()">gtk_entry_completion_new_with_area</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-entry" title="gtk_entry_completion_get_entry ()">gtk_entry_completion_get_entry</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-model" title="gtk_entry_completion_set_model ()">gtk_entry_completion_set_model</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="returnvalue">GtkTreeModel</span></a> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-model" title="gtk_entry_completion_get_model ()">gtk_entry_completion_get_model</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func" title="gtk_entry_completion_set_match_func ()">gtk_entry_completion_set_match_func</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-minimum-key-length" title="gtk_entry_completion_set_minimum_key_length ()">gtk_entry_completion_set_minimum_key_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-minimum-key-length" title="gtk_entry_completion_get_minimum_key_length ()">gtk_entry_completion_get_minimum_key_length</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-compute-prefix" title="gtk_entry_completion_compute_prefix ()">gtk_entry_completion_compute_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-complete" title="gtk_entry_completion_complete ()">gtk_entry_completion_complete</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">gchar</span> *
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-completion-prefix" title="gtk_entry_completion_get_completion_prefix ()">gtk_entry_completion_get_completion_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-insert-prefix" title="gtk_entry_completion_insert_prefix ()">gtk_entry_completion_insert_prefix</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-text" title="gtk_entry_completion_insert_action_text ()">gtk_entry_completion_insert_action_text</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-markup" title="gtk_entry_completion_insert_action_markup ()">gtk_entry_completion_insert_action_markup</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-delete-action" title="gtk_entry_completion_delete_action ()">gtk_entry_completion_delete_action</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-text-column" title="gtk_entry_completion_set_text_column ()">gtk_entry_completion_set_text_column</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-text-column" title="gtk_entry_completion_get_text_column ()">gtk_entry_completion_get_text_column</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-inline-completion" title="gtk_entry_completion_set_inline_completion ()">gtk_entry_completion_set_inline_completion</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-inline-completion" title="gtk_entry_completion_get_inline_completion ()">gtk_entry_completion_get_inline_completion</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-inline-selection" title="gtk_entry_completion_set_inline_selection ()">gtk_entry_completion_set_inline_selection</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-inline-selection" title="gtk_entry_completion_get_inline_selection ()">gtk_entry_completion_get_inline_selection</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-completion" title="gtk_entry_completion_set_popup_completion ()">gtk_entry_completion_set_popup_completion</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-completion" title="gtk_entry_completion_get_popup_completion ()">gtk_entry_completion_get_popup_completion</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-set-width" title="gtk_entry_completion_set_popup_set_width ()">gtk_entry_completion_set_popup_set_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-set-width" title="gtk_entry_completion_get_popup_set_width ()">gtk_entry_completion_get_popup_set_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-popup-single-match" title="gtk_entry_completion_set_popup_single_match ()">gtk_entry_completion_set_popup_single_match</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gboolean</span>
</td>
<td class="function_name">
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-popup-single-match" title="gtk_entry_completion_get_popup_single_match ()">gtk_entry_completion_get_popup_single_match</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> *</td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--cell-area" title="The “cell-area” property">cell-area</a></td>
<td class="property_flags">Read / Write / Construct Only</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion" title="The “inline-completion” property">inline-completion</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--inline-selection" title="The “inline-selection” property">inline-selection</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">int</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--minimum-key-length" title="The “minimum-key-length” property">minimum-key-length</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *</td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--model" title="The “model” property">model</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--popup-completion" title="The “popup-completion” property">popup-completion</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--popup-set-width" title="The “popup-set-width” property">popup-set-width</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">gboolean</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--popup-single-match" title="The “popup-single-match” property">popup-single-match</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type"><span class="type">int</span></td>
<td class="property_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--text-column" title="The “text-column” property">text-column</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-action-activated" title="The “action-activated” signal">action-activated</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
<td class="signal_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-cursor-on-match" title="The “cursor-on-match” signal">cursor-on-match</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
<td class="signal_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-insert-prefix" title="The “insert-prefix” signal">insert-prefix</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">gboolean</span></td>
<td class="signal_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-match-selected" title="The “match-selected” signal">match-selected</a></td>
<td class="signal_flags">Run Last</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-no-matches" title="The “no-matches” signal">no-matches</a></td>
<td class="signal_flags">Run Last</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-struct" title="struct GtkEntryCompletion">GtkEntryCompletion</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> GtkEntryCompletion
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkEntryCompletion implements
<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.description"></a><h2>Description</h2>
<p><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> is an auxiliary object to be used in conjunction with
<a class="link" href="GtkEntry.html" title="GtkEntry"><span class="type">GtkEntry</span></a> to provide the completion functionality. It implements the
<a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a> interface, to allow the user to add extra cells to the
<a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a> with completion matches.</p>
<p>“Completion functionality” means that when the user modifies the text
in the entry, <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> checks which rows in the model match
the current content of the entry, and displays a list of matches.
By default, the matching is done by comparing the entry text
case-insensitively against the text column of the model (see
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-text-column" title="gtk_entry_completion_set_text_column ()"><code class="function">gtk_entry_completion_set_text_column()</code></a>), but this can be overridden
with a custom match function (see <a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func" title="gtk_entry_completion_set_match_func ()"><code class="function">gtk_entry_completion_set_match_func()</code></a>).</p>
<p>When the user selects a completion, the content of the entry is
updated. By default, the content of the entry is replaced by the
text column of the model, but this can be overridden by connecting
to the <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-match-selected" title="The “match-selected” signal"><span class="type">“match-selected”</span></a> signal and updating the
entry in the signal handler. Note that you should return <code class="literal">TRUE</code> from
the signal handler to suppress the default behaviour.</p>
<p>To add completion functionality to an entry, use <a class="link" href="GtkEntry.html#gtk-entry-set-completion" title="gtk_entry_set_completion ()"><code class="function">gtk_entry_set_completion()</code></a>.</p>
<p>In addition to regular completion matches, which will be inserted into the
entry when they are selected, <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> also allows to display
“actions” in the popup window. Their appearance is similar to menuitems,
to differentiate them clearly from completion strings. When an action is
selected, the <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-action-activated" title="The “action-activated” signal"><span class="type">“action-activated”</span></a> signal is emitted.</p>
<p>GtkEntryCompletion uses a <a class="link" href="GtkTreeModelFilter.html" title="GtkTreeModelFilter"><span class="type">GtkTreeModelFilter</span></a> model to represent the
subset of the entire model that is currently matching. While the
GtkEntryCompletion signals <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-match-selected" title="The “match-selected” signal"><span class="type">“match-selected”</span></a> and
<a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion-cursor-on-match" title="The “cursor-on-match” signal"><span class="type">“cursor-on-match”</span></a> take the original model and an
iter pointing to that model as arguments, other callbacks and signals
(such as <a href="GtkCellLayout.html#GtkCellLayoutDataFunc"><span class="type">GtkCellLayoutDataFuncs</span></a> or <a class="link" href="GtkCellArea.html#GtkCellArea-apply-attributes" title="The “apply-attributes” signal"><span class="type">“apply-attributes”</span></a>)
will generally take the filter model as argument. As long as you are
only calling <a class="link" href="GtkTreeModel.html#gtk-tree-model-get" title="gtk_tree_model_get ()"><code class="function">gtk_tree_model_get()</code></a>, this will make no difference to
you. If for some reason, you need the original model, use
<a class="link" href="GtkTreeModelFilter.html#gtk-tree-model-filter-get-model" title="gtk_tree_model_filter_get_model ()"><code class="function">gtk_tree_model_filter_get_model()</code></a>. Dont forget to use
<a class="link" href="GtkTreeModelFilter.html#gtk-tree-model-filter-convert-iter-to-child-iter" title="gtk_tree_model_filter_convert_iter_to_child_iter ()"><code class="function">gtk_tree_model_filter_convert_iter_to_child_iter()</code></a> to obtain a
matching iter.</p>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GtkEntryCompletionMatchFunc"></a><h3>GtkEntryCompletionMatchFunc ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
<span class="c_punctuation">(</span>*GtkEntryCompletionMatchFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *key</code></em>,
<em class="parameter"><code><a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> user_data</code></em>);</pre>
<p>A function which decides whether the row indicated by <em class="parameter"><code>iter</code></em>
matches
a given <em class="parameter"><code>key</code></em>
, and should be displayed as a possible completion for <em class="parameter"><code>key</code></em>
.
Note that <em class="parameter"><code>key</code></em>
is normalized and case-folded (see <code class="function">g_utf8_normalize()</code>
and <code class="function">g_utf8_casefold()</code>). If this is not appropriate, match functions
have access to the unmodified key via
<code class="literal">gtk_entry_get_text (GTK_ENTRY (<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-get-entry" title="gtk_entry_completion_get_entry ()"><code class="function">gtk_entry_completion_get_entry()</code></a>))</code>.</p>
<div class="refsect3">
<a name="GtkEntryCompletionMatchFunc.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>completion</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>the string to match, normalized and case-folded</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> indicating the row to match</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data given to <a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-match-func" title="gtk_entry_completion_set_match_func ()"><code class="function">gtk_entry_completion_set_match_func()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkEntryCompletionMatchFunc.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if <em class="parameter"><code>iter</code></em>
should be displayed as a possible completion
for <em class="parameter"><code>key</code></em>
</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-new"></a><h3>gtk_entry_completion_new ()</h3>
<pre class="programlisting"><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="returnvalue">GtkEntryCompletion</span></a> *
gtk_entry_completion_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object.</p>
<div class="refsect3">
<a name="gtk-entry-completion-new.returns"></a><h4>Returns</h4>
<p> A newly created <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-new-with-area"></a><h3>gtk_entry_completion_new_with_area ()</h3>
<pre class="programlisting"><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="returnvalue">GtkEntryCompletion</span></a> *
gtk_entry_completion_new_with_area (<em class="parameter"><code><a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> *area</code></em>);</pre>
<p>Creates a new <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object using the
specified <em class="parameter"><code>area</code></em>
to layout cells in the underlying
<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a> for the drop-down menu.</p>
<div class="refsect3">
<a name="gtk-entry-completion-new-with-area.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>area</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> used to layout cells</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-new-with-area.returns"></a><h4>Returns</h4>
<p> A newly created <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> object</p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-entry"></a><h3>gtk_entry_completion_get_entry ()</h3>
<pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget"><span class="returnvalue">GtkWidget</span></a> *
gtk_entry_completion_get_entry (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Gets the entry <em class="parameter"><code>completion</code></em>
has been attached to.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-entry.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-entry.returns"></a><h4>Returns</h4>
<p>The entry <em class="parameter"><code>completion</code></em>
has been attached to. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-model"></a><h3>gtk_entry_completion_set_model ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_model (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model</code></em>);</pre>
<p>Sets the model for a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a>. If <em class="parameter"><code>completion</code></em>
already has
a model set, it will remove it before setting the new model.
If model is <code class="literal">NULL</code>, then it will unset the model.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-model.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>. </p></td>
<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>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-model"></a><h3>gtk_entry_completion_get_model ()</h3>
<pre class="programlisting"><a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="returnvalue">GtkTreeModel</span></a> *
gtk_entry_completion_get_model (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns the model the <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> is using as data source.
Returns <code class="literal">NULL</code> if the model is unset.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-model.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-model.returns"></a><h4>Returns</h4>
<p>A <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>, or <code class="literal">NULL</code> if none
is currently being used. </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="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-match-func"></a><h3>gtk_entry_completion_set_match_func ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_match_func (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc" title="GtkEntryCompletionMatchFunc ()"><span class="type">GtkEntryCompletionMatchFunc</span></a> func</code></em>,
<em class="parameter"><code><span class="type">gpointer</span> func_data</code></em>,
<em class="parameter"><code><span class="type">GDestroyNotify</span> func_notify</code></em>);</pre>
<p>Sets the match function for <em class="parameter"><code>completion</code></em>
to be <em class="parameter"><code>func</code></em>
. The match function
is used to determine if a row should or should not be in the completion
list.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-match-func.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletionMatchFunc" title="GtkEntryCompletionMatchFunc ()"><span class="type">GtkEntryCompletionMatchFunc</span></a> to use</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func_data</p></td>
<td class="parameter_description"><p>user data for <em class="parameter"><code>func</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>func_notify</p></td>
<td class="parameter_description"><p>destroy notify for <em class="parameter"><code>func_data</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-minimum-key-length"></a><h3>gtk_entry_completion_set_minimum_key_length ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_minimum_key_length
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gint</span> length</code></em>);</pre>
<p>Requires the length of the search key for <em class="parameter"><code>completion</code></em>
to be at least
<em class="parameter"><code>length</code></em>
. This is useful for long lists, where completing using a small
key takes a lot of time and will come up with meaningless results anyway
(ie, a too large dataset).</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-minimum-key-length.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>length</p></td>
<td class="parameter_description"><p>the minimum length of the key in order to start completing</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-minimum-key-length"></a><h3>gtk_entry_completion_get_minimum_key_length ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gtk_entry_completion_get_minimum_key_length
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns the minimum key length as set for <em class="parameter"><code>completion</code></em>
.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-minimum-key-length.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-minimum-key-length.returns"></a><h4>Returns</h4>
<p> The currently used minimum key length</p>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-compute-prefix"></a><h3>gtk_entry_completion_compute_prefix ()</h3>
<pre class="programlisting"><span class="returnvalue">gchar</span> *
gtk_entry_completion_compute_prefix (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code>const <span class="type">char</span> *key</code></em>);</pre>
<p>Computes the common prefix that is shared by all rows in <em class="parameter"><code>completion</code></em>
that start with <em class="parameter"><code>key</code></em>
. If no row matches <em class="parameter"><code>key</code></em>
, <code class="literal">NULL</code> will be returned.
Note that a text column must have been set for this function to work,
see <a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-text-column" title="gtk_entry_completion_set_text_column ()"><code class="function">gtk_entry_completion_set_text_column()</code></a> for details.</p>
<div class="refsect3">
<a name="gtk-entry-completion-compute-prefix.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>completion</p></td>
<td class="parameter_description"><p>the entry completion</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>key</p></td>
<td class="parameter_description"><p>The text to complete for</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-compute-prefix.returns"></a><h4>Returns</h4>
<p>The common prefix all rows starting with
<em class="parameter"><code>key</code></em>
or <code class="literal">NULL</code> if no row matches <em class="parameter"><code>key</code></em>
. </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="The caller owns the data, and is responsible for free it."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="api-index-3-4.html#api-index-3.4">3.4</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-complete"></a><h3>gtk_entry_completion_complete ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_complete (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Requests a completion operation, or in other words a refiltering of the
current list with completions, using the current key. The completion list
view will be updated accordingly.</p>
<div class="refsect3">
<a name="gtk-entry-completion-complete.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-completion-prefix"></a><h3>gtk_entry_completion_get_completion_prefix ()</h3>
<pre class="programlisting">const <span class="returnvalue">gchar</span> *
gtk_entry_completion_get_completion_prefix
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Get the original text entered by the user that triggered
the completion or <code class="literal">NULL</code> if theres no completion ongoing.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-completion-prefix.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-completion-prefix.returns"></a><h4>Returns</h4>
<p> the prefix for the current completion</p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-insert-prefix"></a><h3>gtk_entry_completion_insert_prefix ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_insert_prefix (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Requests a prefix insertion.</p>
<div class="refsect3">
<a name="gtk-entry-completion-insert-prefix.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-insert-action-text"></a><h3>gtk_entry_completion_insert_action_text ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_insert_action_text
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gint</span> index_</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *text</code></em>);</pre>
<p>Inserts an action in <em class="parameter"><code>completion</code></em>
s action item list at position <em class="parameter"><code>index_</code></em>
with text <em class="parameter"><code>text</code></em>
. If you want the action item to have markup, use
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-insert-action-markup" title="gtk_entry_completion_insert_action_markup ()"><code class="function">gtk_entry_completion_insert_action_markup()</code></a>.</p>
<p>Note that <em class="parameter"><code>index_</code></em>
is a relative position in the list of actions and
the position of an action can change when deleting a different action.</p>
<div class="refsect3">
<a name="gtk-entry-completion-insert-action-text.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the item to insert</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>text</p></td>
<td class="parameter_description"><p>text of the item to insert</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-insert-action-markup"></a><h3>gtk_entry_completion_insert_action_markup ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_insert_action_markup
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gint</span> index_</code></em>,
<em class="parameter"><code>const <span class="type">gchar</span> *markup</code></em>);</pre>
<p>Inserts an action in <em class="parameter"><code>completion</code></em>
s action item list at position <em class="parameter"><code>index_</code></em>
with markup <em class="parameter"><code>markup</code></em>
.</p>
<div class="refsect3">
<a name="gtk-entry-completion-insert-action-markup.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the item to insert</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>markup</p></td>
<td class="parameter_description"><p>markup of the item to insert</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-delete-action"></a><h3>gtk_entry_completion_delete_action ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_delete_action (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gint</span> index_</code></em>);</pre>
<p>Deletes the action at <em class="parameter"><code>index_</code></em>
from <em class="parameter"><code>completion</code></em>
s action list.</p>
<p>Note that <em class="parameter"><code>index_</code></em>
is a relative position and the position of an
action may have changed since it was inserted.</p>
<div class="refsect3">
<a name="gtk-entry-completion-delete-action.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index_</p></td>
<td class="parameter_description"><p>the index of the item to delete</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-text-column"></a><h3>gtk_entry_completion_set_text_column ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_text_column (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gint</span> column</code></em>);</pre>
<p>Convenience function for setting up the most used case of this code: a
completion list with just strings. This function will set up <em class="parameter"><code>completion</code></em>
to have a list displaying all (and just) strings in the completion list,
and to get those strings from <em class="parameter"><code>column</code></em>
in the model of <em class="parameter"><code>completion</code></em>
.</p>
<p>This functions creates and adds a <a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> for the selected
column. If you need to set the text column, but don't want the cell
renderer, use <code class="function">g_object_set()</code> to set the <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--text-column" title="The “text-column” property"><span class="type">“text-column”</span></a>
property directly.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-text-column.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>column</p></td>
<td class="parameter_description"><p>the column in the model of <em class="parameter"><code>completion</code></em>
to get strings from</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-text-column"></a><h3>gtk_entry_completion_get_text_column ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gtk_entry_completion_get_text_column (<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns the column in the model of <em class="parameter"><code>completion</code></em>
to get strings from.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-text-column.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-text-column.returns"></a><h4>Returns</h4>
<p> the column containing the strings</p>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-inline-completion"></a><h3>gtk_entry_completion_set_inline_completion ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_inline_completion
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> inline_completion</code></em>);</pre>
<p>Sets whether the common prefix of the possible completions should
be automatically inserted in the entry.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-inline-completion.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inline_completion</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> to do inline completion</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-inline-completion"></a><h3>gtk_entry_completion_get_inline_completion ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_entry_completion_get_inline_completion
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns whether the common prefix of the possible completions should
be automatically inserted in the entry.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-inline-completion.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-inline-completion.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if inline completion is turned on</p>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-inline-selection"></a><h3>gtk_entry_completion_set_inline_selection ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_inline_selection
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> inline_selection</code></em>);</pre>
<p>Sets whether it is possible to cycle through the possible completions
inside the entry.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-inline-selection.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>inline_selection</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> to do inline selection</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-inline-selection"></a><h3>gtk_entry_completion_get_inline_selection ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_entry_completion_get_inline_selection
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns <code class="literal">TRUE</code> if inline-selection mode is turned on.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-inline-selection.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-inline-selection.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if inline-selection mode is on</p>
</div>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-popup-completion"></a><h3>gtk_entry_completion_set_popup_completion ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_popup_completion
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> popup_completion</code></em>);</pre>
<p>Sets whether the completions should be presented in a popup window.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-popup-completion.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>popup_completion</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> to do popup completion</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-popup-completion"></a><h3>gtk_entry_completion_get_popup_completion ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_entry_completion_get_popup_completion
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns whether the completions should be presented in a popup window.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-completion.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-completion.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if popup completion is turned on</p>
</div>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-popup-set-width"></a><h3>gtk_entry_completion_set_popup_set_width ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_popup_set_width
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> popup_set_width</code></em>);</pre>
<p>Sets whether the completion popup window will be resized to be the same
width as the entry.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-popup-set-width.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>popup_set_width</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> to make the width of the popup the same as the entry</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-popup-set-width"></a><h3>gtk_entry_completion_get_popup_set_width ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_entry_completion_get_popup_set_width
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns whether the completion popup window will be resized to the
width of the entry.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-set-width.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-set-width.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the popup window will be resized to the width of
the entry</p>
</div>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-set-popup-single-match"></a><h3>gtk_entry_completion_set_popup_single_match ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gtk_entry_completion_set_popup_single_match
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>,
<em class="parameter"><code><span class="type">gboolean</span> popup_single_match</code></em>);</pre>
<p>Sets whether the completion popup window will appear even if there is
only a single match. You may want to set this to <code class="literal">FALSE</code> if you
are using <a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion" title="The “inline-completion” property">inline completion</a>.</p>
<div class="refsect3">
<a name="gtk-entry-completion-set-popup-single-match.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>popup_single_match</p></td>
<td class="parameter_description"><p><code class="literal">TRUE</code> if the popup should appear even for a single
match</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="gtk-entry-completion-get-popup-single-match"></a><h3>gtk_entry_completion_get_popup_single_match ()</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
gtk_entry_completion_get_popup_single_match
(<em class="parameter"><code><a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *completion</code></em>);</pre>
<p>Returns whether the completion popup window will appear even if there is
only a single match.</p>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-single-match.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>completion</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gtk-entry-completion-get-popup-single-match.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the popup window will appear regardless of the
number of matches</p>
</div>
<p class="since">Since: 2.8</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkEntryCompletion-struct"></a><h3>struct GtkEntryCompletion</h3>
<pre class="programlisting">struct GtkEntryCompletion;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkEntryCompletion--cell-area"></a><h3>The <code class="literal">“cell-area”</code> property</h3>
<pre class="programlisting"> “cell-area” <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> *</pre>
<p>The <a class="link" href="GtkCellArea.html" title="GtkCellArea"><span class="type">GtkCellArea</span></a> used to layout cell renderers in the treeview column.</p>
<p>If no area is specified when creating the entry completion with
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-new-with-area" title="gtk_entry_completion_new_with_area ()"><code class="function">gtk_entry_completion_new_with_area()</code></a> a horizontally oriented
<a class="link" href="GtkCellAreaBox.html" title="GtkCellAreaBox"><span class="type">GtkCellAreaBox</span></a> will be used.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write / Construct Only</p>
<p class="since">Since: <a class="link" href="api-index-3-0.html#api-index-3.0">3.0</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--inline-completion"></a><h3>The <code class="literal">“inline-completion”</code> property</h3>
<pre class="programlisting"> “inline-completion” <span class="type">gboolean</span></pre>
<p>Determines whether the common prefix of the possible completions
should be inserted automatically in the entry. Note that this
requires text-column to be set, even if you are using a custom
match function.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--inline-selection"></a><h3>The <code class="literal">“inline-selection”</code> property</h3>
<pre class="programlisting"> “inline-selection” <span class="type">gboolean</span></pre>
<p>Determines whether the possible completions on the popup
will appear in the entry as you navigate through them.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Default value: FALSE</p>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--minimum-key-length"></a><h3>The <code class="literal">“minimum-key-length”</code> property</h3>
<pre class="programlisting"> “minimum-key-length” <span class="type">int</span></pre>
<p>Minimum length of the search key in order to look up matches.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= 0</p>
<p>Default value: 1</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--model"></a><h3>The <code class="literal">“model”</code> property</h3>
<pre class="programlisting"> “model” <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *</pre>
<p>The model to find matches in.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--popup-completion"></a><h3>The <code class="literal">“popup-completion”</code> property</h3>
<pre class="programlisting"> “popup-completion” <span class="type">gboolean</span></pre>
<p>Determines whether the possible completions should be
shown in a popup window.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--popup-set-width"></a><h3>The <code class="literal">“popup-set-width”</code> property</h3>
<pre class="programlisting"> “popup-set-width” <span class="type">gboolean</span></pre>
<p>Determines whether the completions popup window will be
resized to the width of the entry.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--popup-single-match"></a><h3>The <code class="literal">“popup-single-match”</code> property</h3>
<pre class="programlisting"> “popup-single-match” <span class="type">gboolean</span></pre>
<p>Determines whether the completions popup window will shown
for a single possible completion. You probably want to set
this to <code class="literal">FALSE</code> if you are using
<a class="link" href="GtkEntryCompletion.html#GtkEntryCompletion--inline-completion" title="The “inline-completion” property">inline completion</a>.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Default value: TRUE</p>
<p class="since">Since: 2.8</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion--text-column"></a><h3>The <code class="literal">“text-column”</code> property</h3>
<pre class="programlisting"> “text-column” <span class="type">int</span></pre>
<p>The column of the model containing the strings.
Note that the strings must be UTF-8.</p>
<p>Owner: GtkEntryCompletion</p>
<p>Flags: Read / Write</p>
<p>Allowed values: &gt;= -1</p>
<p>Default value: -1</p>
<p class="since">Since: 2.6</p>
</div>
</div>
<div class="refsect1">
<a name="GtkEntryCompletion.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkEntryCompletion-action-activated"></a><h3>The <code class="literal">“action-activated”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *widget,
<span class="type">int</span> index,
<span class="type">gpointer</span> user_data)</pre>
<p>Gets emitted when an action is activated.</p>
<div class="refsect3">
<a name="GtkEntryCompletion-action-activated.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>widget</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index</p></td>
<td class="parameter_description"><p>the index of the activated action</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion-cursor-on-match"></a><h3>The <code class="literal">“cursor-on-match”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
user_function (<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *widget,
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model,
<a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter,
<span class="type">gpointer</span> user_data)</pre>
<p>Gets emitted when a match from the cursor is on a match
of the list. The default behaviour is to replace the contents
of the entry with the contents of the text column in the row
pointed to by <em class="parameter"><code>iter</code></em>
.</p>
<p>Note that <em class="parameter"><code>model</code></em>
is the model that was passed to
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-model" title="gtk_entry_completion_set_model ()"><code class="function">gtk_entry_completion_set_model()</code></a>.</p>
<div class="refsect3">
<a name="GtkEntryCompletion-cursor-on-match.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>widget</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> containing the matches</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> positioned at the selected match</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkEntryCompletion-cursor-on-match.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the signal has been handled</p>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: 2.12</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion-insert-prefix"></a><h3>The <code class="literal">“insert-prefix”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
user_function (<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *widget,
<span class="type">char</span> *prefix,
<span class="type">gpointer</span> user_data)</pre>
<p>Gets emitted when the inline autocompletion is triggered.
The default behaviour is to make the entry display the
whole prefix and select the newly inserted part.</p>
<p>Applications may connect to this signal in order to insert only a
smaller part of the <em class="parameter"><code>prefix</code></em>
into the entry - e.g. the entry used in
the <a class="link" href="GtkFileChooser.html" title="GtkFileChooser"><span class="type">GtkFileChooser</span></a> inserts only the part of the prefix up to the
next '/'.</p>
<div class="refsect3">
<a name="GtkEntryCompletion-insert-prefix.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>widget</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>prefix</p></td>
<td class="parameter_description"><p>the common prefix of all possible completions</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkEntryCompletion-insert-prefix.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the signal has been handled</p>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: 2.6</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion-match-selected"></a><h3>The <code class="literal">“match-selected”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">gboolean</span>
user_function (<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *widget,
<a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> *model,
<a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> *iter,
<span class="type">gpointer</span> user_data)</pre>
<p>Gets emitted when a match from the list is selected.
The default behaviour is to replace the contents of the
entry with the contents of the text column in the row
pointed to by <em class="parameter"><code>iter</code></em>
.</p>
<p>Note that <em class="parameter"><code>model</code></em>
is the model that was passed to
<a class="link" href="GtkEntryCompletion.html#gtk-entry-completion-set-model" title="gtk_entry_completion_set_model ()"><code class="function">gtk_entry_completion_set_model()</code></a>.</p>
<div class="refsect3">
<a name="GtkEntryCompletion-match-selected.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>widget</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>model</p></td>
<td class="parameter_description"><p>the <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a> containing the matches</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>iter</p></td>
<td class="parameter_description"><p>a <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> positioned at the selected match</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GtkEntryCompletion-match-selected.returns"></a><h4>Returns</h4>
<p> <code class="literal">TRUE</code> if the signal has been handled</p>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: 2.4</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkEntryCompletion-no-matches"></a><h3>The <code class="literal">“no-matches”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkEntryCompletion.html" title="GtkEntryCompletion"><span class="type">GtkEntryCompletion</span></a> *widget,
<span class="type">gpointer</span> user_data)</pre>
<p>Gets emitted when the filter model has zero
number of rows in completion_complete method.
(In other words when GtkEntryCompletion is out of
suggestions)</p>
<div class="refsect3">
<a name="GtkEntryCompletion-no-matches.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>widget</p></td>
<td class="parameter_description"><p>the object which received the signal</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p>Flags: Run Last</p>
<p class="since">Since: <a class="link" href="api-index-3-14.html#api-index-3.14">3.14</a></p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>