complete.h 1.05 KB
Newer Older
Miguel de Icaza's avatar
Miguel de Icaza committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#ifndef GNUMERIC_COMPLETE_H
#define GNUMERIC_COMPLETE_H

#include <gtk/gtkobject.h>

#define COMPLETE_TYPE        (complete_get_type ())
#define COMPLETE(o)          (GTK_CHECK_CAST ((o), COMPLETE_TYPE, Complete))
#define COMPLETE_CLASS(k)    (GTK_CHECK_CLASS_CAST((k), COMPLETE_TYPE, CompleteClass))
#define IS_COMPLETE(o)       (GTK_CHECK_TYPE ((o), COMPLETE_TYPE))
#define IS_COMPLETE_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), COMPLETE_TYPE))

typedef void (*CompleteMatchNotifyFn) (const char *text, void *closure);

typedef struct {
	GtkObject parent;

	CompleteMatchNotifyFn notify;
	void *notify_closure;
19

Miguel de Icaza's avatar
Miguel de Icaza committed
20 21 22 23 24 25 26
	char *text;

	guint idle_tag;
} Complete;

typedef struct {
	GtkObjectClass parent_class;
27

28
	void     (*start_over)       (Complete *complete);
Miguel de Icaza's avatar
Miguel de Icaza committed
29 30 31 32 33 34 35 36 37 38
	gboolean (*search_iteration) (Complete *complete);
} CompleteClass;

void    complete_construct (Complete *complete,
			    CompleteMatchNotifyFn notify,
			    void *notify_closure);
void    complete_start     (Complete *complete, const char *text);
GtkType complete_get_type  (void);

#endif /* GNUMERIC_COMPLETE_H */