gtktextsearch.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _GTK_TEXT_SEARCH__H_
00023 #define _GTK_TEXT_SEARCH__H_
00024
00025 #include <gtk/gtk.h>
00026
00027 G_BEGIN_DECLS
00028
00029 #define GTK_TYPE_TEXT_SEARCH (gtk_text_search_get_type ())
00030 #define GTK_TEXT_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GTK_TYPE_TEXT_SEARCH, GtkTextSearch))
00031 #define GTK_TEXT_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TEXT_SEARCH, GtkTextSearchClass))
00032 #define GTK_IS_TEXT_SEARCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TEXT_SEARCH))
00033 #define GTK_IS_TEXT_SEARCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TEXT_SEARCH))
00034
00035 typedef struct _GtkTextSearch GtkTextSearch;
00036 typedef struct _GtkTextSearchClass GtkTextSearchClass;
00037 typedef gboolean (*GtkTextSearchForeachFunc) (GtkTextIter *match_start, GtkTextIter *match_end, gpointer data);
00038
00039 typedef enum {
00040 GTK_ETEXT_SEARCH_VISIBLE_ONLY,
00041 GTK_ETEXT_SEARCH_TEXT_ONLY,
00042 GTK_ETEXT_SEARCH_CASE_INSENSITIVE,
00043 GTK_ETEXT_SEARCH_REGEXP
00044 }GtkETextSearchFlags;
00045
00046 struct _GtkTextSearch
00047 {
00048 GObject parent;
00049
00050 gchar *search_for;
00051 gchar *offset;
00052
00053 GtkTextBuffer *buffer;
00054 GtkTextMark *mark_current;
00055 GtkTextMark *mark_stop;
00056 GtkETextSearchFlags sflags;
00057
00058 gint is_matched : 1;
00059 };
00060
00061 struct _GtkTextSearchClass
00062 {
00063 GObjectClass parent;
00064
00065 };
00066
00067 GType gtk_text_search_get_type (void);
00068
00069 GtkTextSearch * gtk_text_search_new (GtkTextBuffer *buffer, const GtkTextIter *start,
00070 const char *search,
00071 GtkETextSearchFlags sflags,
00072 const GtkTextIter *limit);
00073 void gtk_text_search_set (GtkTextSearch *search,
00074 GtkTextBuffer *buffer,
00075 const GtkTextIter *start,
00076 const char *searchfor,
00077 GtkETextSearchFlags sflags,
00078 const GtkTextIter *limit);
00079 void gtk_text_search_set_interval (GtkTextSearch *search, GtkTextBuffer *buffer, const GtkTextIter *start, const GtkTextIter *end);
00080
00081 gboolean gtk_text_search_forward (GtkTextSearch *search, GtkTextIter *match_start, GtkTextIter *match_end);
00082 gboolean gtk_text_search_backward (GtkTextSearch *search, GtkTextIter *match_start, GtkTextIter *match_end);
00083 gint gtk_text_search_forward_foreach (GtkTextSearch *search, GtkTextSearchForeachFunc func, gpointer data);
00084 gint gtk_text_search_backward_foreach (GtkTextSearch *search, GtkTextSearchForeachFunc func, gpointer data);
00085
00086 G_END_DECLS
00087
00088 #endif
Generated on Wed Jul 28 17:23:53 2004 for vdk 2.0.3 by
1.3.7