Added bindings to GtkAssistant
authorespen <espen>
Thu, 5 Jul 2007 11:34:27 +0000 (11:34 +0000)
committerespen <espen>
Thu, 5 Jul 2007 11:34:27 +0000 (11:34 +0000)
gtk/gtk.lisp
gtk/gtktypes.lisp

index 327a5f7..16b6530 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtk.lisp,v 1.76 2007-06-25 10:36:43 espen Exp $
+;; $Id: gtk.lisp,v 1.77 2007-07-05 11:34:27 espen Exp $
 
 
 (in-package "GTK")
   (right unsigned-int))
 
 
+;;; Assistant
+
+#?(pkg-exists-p "gtk+-2.0" :atleast-version "2.10.0")
+(progn
+  (defbinding assistant-get-nth-page () widget
+    (assistant assistant)
+    (page-num int))
+  
+  (defbinding %assistant-insert-page () int
+    (assistant assistant)
+    (page widget)
+    (pos int))
+
+  (defun assistant-insert-page (assistant page position &rest child-args)    
+    (let ((pos (case position
+                (:first 0)
+                (:last -1)
+                (t position))))
+      (prog1
+         (%assistant-insert-page assistant page pos)
+       (init-child-slots assistant page child-args))))
+  
+  (defun assistant-append-page (assistant page &rest child-args)
+    (apply #'assistant-insert-page assistant page :last child-args))
+  
+  (defun assistant-prepend-page (assistant page &rest child-args)
+    (apply #'assistant-insert-page assistant page :first child-args))
+
+  (define-callback-marshal %assistant-page-func-callback int
+    ((current-page int)))
+
+  (defbinding assistant-set-forward-func (assistant function) nil
+    (assistant assistant)
+    (%assistant-page-func-callback callback)
+    ((register-callback-function function) pointer-data)
+    (user-data-destroy-callback callback))
+
+  (defbinding assistant-add-action-widget () nil
+    (assistant assistant)
+    (child widget))
+
+  (defbinding assistant-remove-action-widget () nil
+    (assistant assistant)
+    (child widget))
+
+  (defbinding assistant-update-buttons-state () nil
+    (assistant assistant)))
+
+
+
 ;;; Aspect frame
 
 
index 14d4f9a..64caa0c 100644 (file)
@@ -20,7 +20,7 @@
 ;; TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 ;; SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 
-;; $Id: gtktypes.lisp,v 1.54 2007-05-10 20:21:25 espen Exp $
+;; $Id: gtktypes.lisp,v 1.55 2007-07-05 11:34:27 espen Exp $
 
 (in-package "GTK")
 
      :initarg :pixbuf-column
      :accessor icon-view-pixbuf-column)))
 
+  #?(pkg-exists-p "gtk+-2.0" :atleast-version "2.10.0")
+  ("GtkAssistant"
+   :slots
+   ((current-page 
+     :allocation :virtual
+     :getter "gtk_assistant_get_current_page"
+     :setter "gtk_assistant_set_current_page"
+     :accessor assistant-current-page
+     :type int)
+    (num-pages
+     :allocation :virtual
+     :getter "gtk_assistant_get_n_page"
+     :reader assistant-current-page
+     :type int)))
+
+
   ;; Not needed
   ("GtkFundamentalType" :ignore t)
   ("GtkArgFlags" :ignore t)