Ardour  8.7-14-g57a6773833
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, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19 
20 #ifndef __GTK_ENTRY_COMPLETION_H__
21 #define __GTK_ENTRY_COMPLETION_H__
22 
23 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26 
27 #include <gtk/gtktreemodel.h>
28 #include <gtk/gtkliststore.h>
29 #include <gtk/gtktreeviewcolumn.h>
30 #include <gtk/gtktreemodelfilter.h>
31 
32 G_BEGIN_DECLS
33 
34 #define GTK_TYPE_ENTRY_COMPLETION (gtk_entry_completion_get_type ())
35 #define GTK_ENTRY_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletion))
36 #define GTK_ENTRY_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletionClass))
37 #define GTK_IS_ENTRY_COMPLETION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ENTRY_COMPLETION))
38 #define GTK_IS_ENTRY_COMPLETION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ENTRY_COMPLETION))
39 #define GTK_ENTRY_COMPLETION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_ENTRY_COMPLETION, GtkEntryCompletionClass))
40 
44 
45 typedef gboolean (* GtkEntryCompletionMatchFunc) (GtkEntryCompletion *completion,
46  const gchar *key,
47  GtkTreeIter *iter,
48  gpointer user_data);
49 
50 
52 {
53  GObject parent_instance;
54 
55  /*< private >*/
57 };
58 
60 {
61  GObjectClass parent_class;
62 
63  gboolean (* match_selected) (GtkEntryCompletion *completion,
64  GtkTreeModel *model,
65  GtkTreeIter *iter);
66  void (* action_activated) (GtkEntryCompletion *completion,
67  gint index_);
68  gboolean (* insert_prefix) (GtkEntryCompletion *completion,
69  const gchar *prefix);
70  gboolean (* cursor_on_match) (GtkEntryCompletion *completion,
71  GtkTreeModel *model,
72  GtkTreeIter *iter);
73 
74  /* Padding for future expansion */
75  void (*_gtk_reserved0) (void);
76  void (*_gtk_reserved1) (void);
77 };
78 
79 /* core */
80 GType gtk_entry_completion_get_type (void) G_GNUC_CONST;
82 
84 
86  GtkTreeModel *model);
88 
91  gpointer func_data,
92  GDestroyNotify func_notify);
94  gint length);
98 
100  gint index_,
101  const gchar *text);
103  gint index_,
104  const gchar *markup);
106  gint index_);
107 
109  gboolean inline_completion);
112  gboolean inline_selection);
115  gboolean popup_completion);
118  gboolean popup_set_width);
121  gboolean popup_single_match);
123 
125 /* convenience */
127  gint column);
129 
130 G_END_DECLS
131 
132 #endif /* __GTK_ENTRY_COMPLETION_H__ */
gint gtk_entry_completion_get_text_column(GtkEntryCompletion *completion)
void gtk_entry_completion_set_popup_completion(GtkEntryCompletion *completion, gboolean popup_completion)
GtkEntryCompletion * gtk_entry_completion_new(void)
gboolean gtk_entry_completion_get_inline_selection(GtkEntryCompletion *completion)
gboolean(* GtkEntryCompletionMatchFunc)(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data)
void gtk_entry_completion_set_popup_set_width(GtkEntryCompletion *completion, gboolean popup_set_width)
void gtk_entry_completion_complete(GtkEntryCompletion *completion)
void gtk_entry_completion_insert_prefix(GtkEntryCompletion *completion)
const gchar * gtk_entry_completion_get_completion_prefix(GtkEntryCompletion *completion)
void gtk_entry_completion_delete_action(GtkEntryCompletion *completion, gint index_)
gint gtk_entry_completion_get_minimum_key_length(GtkEntryCompletion *completion)
gboolean gtk_entry_completion_get_inline_completion(GtkEntryCompletion *completion)
void gtk_entry_completion_set_match_func(GtkEntryCompletion *completion, GtkEntryCompletionMatchFunc func, gpointer func_data, GDestroyNotify func_notify)
void gtk_entry_completion_set_text_column(GtkEntryCompletion *completion, gint column)
void gtk_entry_completion_set_popup_single_match(GtkEntryCompletion *completion, gboolean popup_single_match)
void gtk_entry_completion_set_model(GtkEntryCompletion *completion, GtkTreeModel *model)
gboolean gtk_entry_completion_get_popup_set_width(GtkEntryCompletion *completion)
GtkTreeModel * gtk_entry_completion_get_model(GtkEntryCompletion *completion)
GtkWidget * gtk_entry_completion_get_entry(GtkEntryCompletion *completion)
gboolean gtk_entry_completion_get_popup_single_match(GtkEntryCompletion *completion)
void gtk_entry_completion_insert_action_text(GtkEntryCompletion *completion, gint index_, const gchar *text)
GType gtk_entry_completion_get_type(void) G_GNUC_CONST
void gtk_entry_completion_set_inline_completion(GtkEntryCompletion *completion, gboolean inline_completion)
void gtk_entry_completion_insert_action_markup(GtkEntryCompletion *completion, gint index_, const gchar *markup)
gboolean gtk_entry_completion_get_popup_completion(GtkEntryCompletion *completion)
void gtk_entry_completion_set_minimum_key_length(GtkEntryCompletion *completion, gint length)
void gtk_entry_completion_set_inline_selection(GtkEntryCompletion *completion, gboolean inline_selection)
struct _GtkTreeModel GtkTreeModel
Definition: gtktreemodel.h:46
PBD::PropertyDescriptor< timecnt_t > length
gboolean(* match_selected)(GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter)
void(* action_activated)(GtkEntryCompletion *completion, gint index_)
gboolean(* insert_prefix)(GtkEntryCompletion *completion, const gchar *prefix)
gboolean(* cursor_on_match)(GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter)
GtkEntryCompletionPrivate * GSEAL(priv)