Add GCompletion binding, patch by Abderrahim Kitouni, fixes bug 546252
authorJürg Billeter <j@bitron.ch>
Sun, 10 Aug 2008 13:33:10 +0000 (13:33 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sun, 10 Aug 2008 13:33:10 +0000 (13:33 +0000)
2008-08-10  Jürg Billeter  <j@bitron.ch>

* vapi/glib-2.0.vapi:

Add GCompletion binding, patch by Abderrahim Kitouni,
fixes bug 546252

svn path=/trunk/; revision=1744

ChangeLog
vapi/glib-2.0.vapi

index 71b7752..1744eeb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2008-08-10  Jürg Billeter  <j@bitron.ch>
 
+       * vapi/glib-2.0.vapi:
+
+       Add GCompletion binding, patch by Abderrahim Kitouni,
+       fixes bug 546252
+
+2008-08-10  Jürg Billeter  <j@bitron.ch>
+
        * vapi/packages/vte/:
 
        Fix vte_terminal_get_cursor_position binding,
index 680a2da..af97a2a 100644 (file)
@@ -2233,6 +2233,27 @@ namespace GLib {
                FLOAT_MALFORMED
        }
 
+       /* Automatic String Completion */
+
+       [Compact]
+       [CCode (free_function = "g_completion_free")]
+       public class Completion {
+               public Completion (CompletionFunc? func = null);
+               public List<void*> items;
+               public CompletionFunc func;
+               public string prefix;
+               public List<void*> cache;
+               public CompletionStrncmpFunc strncmp_func;
+               public void add_items (List<void*> items);
+               public void remove_items (List<void*> items);
+               public void clear_items ();
+               public weak List<void*> complete (string prefix, out string? new_prefix = null);
+               public weak List<void*> complete_utf8 (string prefix, out string? new_prefix = null);
+       }
+
+       public static delegate string CompletionFunc (void* item);
+       public static delegate int CompletionStrncmpFunc (string s1, string s2, size_t n);
+
        /* Timers */
 
        [Compact]