-I$(top_srcdir)/gmodule, fix from Michael Meeks
[platform/upstream/glib.git] / gcompletion.h
index 5af9475..d5fca3f 100644 (file)
 #define __G_COMPLETION_H__
 
 #include <glist.h>
+#include <stddef.h>            /* For size_t */
+#ifdef G_OS_UNIX
+#include <unistd.h>
+#endif
 
 G_BEGIN_DECLS
 
@@ -38,6 +42,8 @@ typedef gchar*          (*GCompletionFunc)      (gpointer);
 /* GCompletion
  */
 
+typedef int (*GCompletionStrncmpFunc)(const char *s1, const char *s2, size_t n);
+
 struct _GCompletion
 {
   GList* items;
@@ -45,6 +51,7 @@ struct _GCompletion
  
   gchar* prefix;
   GList* cache;
+  GCompletionStrncmpFunc strncmp_func;
 };
 
 GCompletion* g_completion_new          (GCompletionFunc func);
@@ -56,6 +63,8 @@ void         g_completion_clear_items  (GCompletion*    cmp);
 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