#define __G_COMPLETION_H__
#include <glist.h>
+#include <stddef.h> /* For size_t */
+#ifdef G_OS_UNIX
+#include <unistd.h>
+#endif
G_BEGIN_DECLS
/* GCompletion
*/
+typedef int (*GCompletionStrncmpFunc)(const char *s1, const char *s2, size_t n);
+
struct _GCompletion
{
GList* items;
gchar* prefix;
GList* cache;
+ GCompletionStrncmpFunc strncmp_func;
};
GCompletion* g_completion_new (GCompletionFunc func);
GList* g_completion_complete (GCompletion* cmp,
gchar* prefix,
gchar** new_prefix);
+void g_completion_set_compare (GCompletion *cmp,
+ GCompletionStrncmpFunc strncmp_func);
void g_completion_free (GCompletion* cmp);
G_END_DECLS