chiark / gitweb /
Adding bindings to entry completion
authorespen <espen>
Mon, 20 Dec 2004 22:43:26 +0000 (22:43 +0000)
committerespen <espen>
Mon, 20 Dec 2004 22:43:26 +0000 (22:43 +0000)
gtk/gtk.lisp
gtk/gtktypes.lisp

index 9e39a260bfe669d436786826a37ed6d93e641f9d..a42f10f48cbce2f5b5277711134f0063492e0e2b 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtk.lisp,v 1.23 2004-12-20 20:00:07 espen Exp $
+;; $Id: gtk.lisp,v 1.24 2004-12-20 22:43:26 espen Exp $
 
 
 (in-package "GTK")
@@ -472,6 +472,39 @@ (defbinding entry-get-layout-offsets () nil
   (y int :out))
 
 
+;;; Entry Completion
+
+(def-callback-marshal %entry-completion-match-func
+    (boolean entry-completion string (copy-of tree-iter)))
+
+(defbinding entry-completion-set-match-func (completion function) nil
+  (completion entry-completion)
+  ((callback %entry-completion-match-func) pointer)
+  ((register-callback-function function) unsigned-int)
+  ((callback %destroy-user-data) pointer))
+
+(defbinding entry-completion-complete () nil
+  (completion entry-completion))
+
+#+gtk2.6
+(defbinding entry-completion-insert-prefix () nil
+  (completion entry-completion))
+
+(defbinding entry-completion-insert-action-text () nil
+  (completion entry-completion)
+  (index int)
+  (text string))
+
+(defbinding entry-completion-insert-action-markup () nil
+  (completion entry-completion)
+  (index int)
+  (markup string))
+
+(defbinding entry-completion-delete-action () nil
+  (completion entry-completion)
+  (index int))
+
+
 ;;; Image
 
 (defbinding image-set-from-file () nil
index a1d4b258cd6811ea49ae17abe99b0f47500cad9d..fdb9fafcfb86b8f6e08b5d44f797e81f5c7a73d2 100644 (file)
@@ -15,7 +15,7 @@
 ;; License along with this library; if not, write to the Free Software
 ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
-;; $Id: gtktypes.lisp,v 1.24 2004-12-20 20:09:53 espen Exp $
+;; $Id: gtktypes.lisp,v 1.25 2004-12-20 22:43:26 espen Exp $
 
 
 (in-package "GTK")
@@ -531,6 +531,19 @@     (default-widget
      :reader combo-entry
      :type entry)))
   
+  ("GtkEntryCompletion"
+   :slots
+   ((entry
+     :allocation :virtual
+     :getter "gtk_entry_completion_get_entry"
+     :reader entry-completion-entry
+     :type entry)
+    (minimum-key-length
+     :merge t :unbound -1)
+    #+gtk2.6
+    (text-column
+     :merge t :unbound -1)))
+
   ("GtkRadioButton"
    :slots
    ((group