Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkentrycompletion.h
Go to the documentation of this file.
1/* gtkentrycompletion.h
2 * Copyright (C) 2003 Kristian Rietveld <kris@gtk.org>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#pragma once
19
20#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
21#error "Only <gtk/gtk.h> can be included directly."
22#endif
23
24#include <gdk/gdk.h>
30
32
33#define GTK_TYPE_ENTRY_COMPLETION (gtk_entry_completion_get_type ())
34#define GTK_ENTRY_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletion))
35#define GTK_IS_ENTRY_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ENTRY_COMPLETION))
36
37typedef struct _GtkEntryCompletion GtkEntryCompletion;
38
39/**
40 * GtkEntryCompletionMatchFunc:
41 * @completion: the `GtkEntryCompletion`
42 * @key: the string to match, normalized and case-folded
43 * @iter: a `GtkTreeIter` indicating the row to match
44 * @user_data: user data given to gtk_entry_completion_set_match_func()
45 *
46 * A function which decides whether the row indicated by @iter matches
47 * a given @key, and should be displayed as a possible completion for @key.
48 *
49 * Note that @key is normalized and case-folded (see g_utf8_normalize()
50 * and g_utf8_casefold()). If this is not appropriate, match functions
51 * have access to the unmodified key via
52 * `gtk_editable_get_text (GTK_EDITABLE (gtk_entry_completion_get_entry ()))`.
53 *
54 * Returns: %TRUE if @iter should be displayed as a possible completion
55 * for @key
56 */
58 const char *key,
59 GtkTreeIter *iter,
60 gpointer user_data);
61
62
69
72
75 GtkTreeModel *model);
78
82 gpointer func_data,
83 GDestroyNotify func_notify);
86 int length);
91 const char *key);
96
99 gboolean inline_completion);
104 gboolean inline_selection);
109 gboolean popup_completion);
114 gboolean popup_set_width);
119 gboolean popup_single_match);
122
125/* convenience */
128 int column);
131
133
135
#define GDK_DEPRECATED_IN_4_10
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
GDK_DEPRECATED_IN_4_10 int gtk_entry_completion_get_text_column(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_inline_completion(GtkEntryCompletion *completion, gboolean inline_completion)
GDK_DEPRECATED_IN_4_10 gboolean gtk_entry_completion_get_popup_single_match(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 gboolean gtk_entry_completion_get_popup_completion(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 int gtk_entry_completion_get_minimum_key_length(GtkEntryCompletion *completion)
GDK_AVAILABLE_IN_ALL GType gtk_entry_completion_get_type(void) G_GNUC_CONST
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_popup_single_match(GtkEntryCompletion *completion, gboolean popup_single_match)
GDK_DEPRECATED_IN_4_10 const char * gtk_entry_completion_get_completion_prefix(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 gboolean gtk_entry_completion_get_inline_completion(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_popup_completion(GtkEntryCompletion *completion, gboolean popup_completion)
GDK_DEPRECATED_IN_4_10 GtkTreeModel * gtk_entry_completion_get_model(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_inline_selection(GtkEntryCompletion *completion, gboolean inline_selection)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_complete(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_popup_set_width(GtkEntryCompletion *completion, gboolean popup_set_width)
GDK_DEPRECATED_IN_4_10 gboolean gtk_entry_completion_get_popup_set_width(GtkEntryCompletion *completion)
gboolean(* GtkEntryCompletionMatchFunc)(GtkEntryCompletion *completion, const char *key, GtkTreeIter *iter, gpointer user_data)
GDK_DEPRECATED_IN_4_10 gboolean gtk_entry_completion_get_inline_selection(GtkEntryCompletion *completion)
struct _GtkEntryCompletion GtkEntryCompletion
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_insert_prefix(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_match_func(GtkEntryCompletion *completion, GtkEntryCompletionMatchFunc func, gpointer func_data, GDestroyNotify func_notify)
GDK_DEPRECATED_IN_4_10 char * gtk_entry_completion_compute_prefix(GtkEntryCompletion *completion, const char *key)
GDK_DEPRECATED_IN_4_10 GtkEntryCompletion * gtk_entry_completion_new_with_area(GtkCellArea *area)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_minimum_key_length(GtkEntryCompletion *completion, int length)
GDK_DEPRECATED_IN_4_10 GtkEntryCompletion * gtk_entry_completion_new(void)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_model(GtkEntryCompletion *completion, GtkTreeModel *model)
GDK_DEPRECATED_IN_4_10 GtkWidget * gtk_entry_completion_get_entry(GtkEntryCompletion *completion)
GDK_DEPRECATED_IN_4_10 void gtk_entry_completion_set_text_column(GtkEntryCompletion *completion, int column)
struct _GtkTreeModel GtkTreeModel
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140