diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-08-17 03:47:57 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-08-17 03:47:57 +0800 |
commit | fd7cce60919fb86549b477a344f54a1c101af434 (patch) | |
tree | a5f027163c85d645ad3f004e229d613421dc8ca3 /widgets/text/e-completion.h | |
parent | 9333af2f12cdfe27cfa02fdb5e7634b2d310e967 (diff) | |
download | gsoc2013-evolution-fd7cce60919fb86549b477a344f54a1c101af434.tar.gz gsoc2013-evolution-fd7cce60919fb86549b477a344f54a1c101af434.tar.zst gsoc2013-evolution-fd7cce60919fb86549b477a344f54a1c101af434.zip |
Added "hit_count" to ECompletionMatch. Used by search
2001-08-16 Jon Trowbridge <trow@ximian.com>
* gal/e-text/e-completion-match.h: Added "hit_count" to
ECompletionMatch. Used by search refinement/unrefinement.
* gal/e-text/e-completion.c (e_completion_refine_search): Added.
Handle automatic search refinements.
(e_completion_unrefine_search): Added. Handle automatic search
"unrefinements", or reversions.
(e_completion_begin_search): Check if the refinement or
unrefinement operations can be used to handle the search. Emit
"request_search" at the end of the call.
(e_completion_class_init): Added a new signal "request_search".
"begin_search" is now purely informational, telling views that a
series of matches and an "end_search" are forthcoming.
* configure.in: Increment version of 0.10.99.3.
svn path=/trunk/; revision=12116
Diffstat (limited to 'widgets/text/e-completion.h')
-rw-r--r-- | widgets/text/e-completion.h | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/widgets/text/e-completion.h b/widgets/text/e-completion.h index 522876730c..9340e47716 100644 --- a/widgets/text/e-completion.h +++ b/widgets/text/e-completion.h @@ -44,6 +44,8 @@ typedef struct _ECompletion ECompletion; typedef struct _ECompletionClass ECompletionClass; struct _ECompletionPrivate; +typedef gboolean (*ECompletionRefineFn) (ECompletion *, ECompletionMatch *, const gchar *search_text, gint pos); + struct _ECompletion { GtkObject parent; @@ -53,22 +55,33 @@ struct _ECompletion { struct _ECompletionClass { GtkObjectClass parent_class; + /* virtual functions */ + ECompletionRefineFn (*auto_refine) (ECompletion *comp, + const gchar *old_text, gint old_pos, + const gchar *new_text, gint new_pos); + gboolean ignore_pos_on_auto_unrefine; + /* Signals */ - void (*begin_completion) (ECompletion *comp, const gchar *search_text, gint pos, gint limit); + void (*request_completion) (ECompletion *comp, const gchar *search_text, gint pos, gint limit); + + void (*begin_completion) (ECompletion *comp, const gchar *search_text, gint pos, gint limit); + void (*restart_completion) (ECompletion *comp); + void (*completion) (ECompletion *comp, ECompletionMatch *match); - void (*restart_completion) (ECompletion *comp); + void (*lost_completion) (ECompletion *comp, ECompletionMatch *match); + void (*cancel_completion) (ECompletion *comp); void (*end_completion) (ECompletion *comp); void (*clear_completion) (ECompletion *comp); - void (*lost_completion) (ECompletion *comp, ECompletionMatch *match); }; GtkType e_completion_get_type (void); -void e_completion_begin_search (ECompletion *comp, const gchar *text, gint pos, gint limit); -void e_completion_cancel_search (ECompletion *comp); +void e_completion_begin_search (ECompletion *comp, const gchar *text, gint pos, gint limit); +void e_completion_cancel_search (ECompletion *comp); gboolean e_completion_searching (ECompletion *comp); +gboolean e_completion_refining (ECompletion *comp); const gchar *e_completion_search_text (ECompletion *comp); gint e_completion_search_text_pos (ECompletion *comp); gint e_completion_match_count (ECompletion *comp); |