Reassign bugs
[cl-gtk2.git] / gboxed.vs.test.lisp
blob79841834e6e7942fee8279391f7e3474a83052b8
1 (in-package :gobject)
3 (define-boxed-variant-cstruct evt "evt"
4 (type :int :initform 0)
5 (time :uint :initform 0)
6 (:variant type
7 (0 evt-zero
8 (x :double :initform 0.0d0)
9 (y :double :initform 0.0d0))
10 ((1 2 3) evt-multi
11 (t2 :int :initform 0)
12 (:variant t2
13 (1 evt-single
14 (item :uchar :initform 0))))))
16 (defcallback test-evt (g-boxed-foreign evt)
17 ((time :int) (e1 (g-boxed-foreign evt)))
18 (print time)
19 (print e1)
20 (when e1
21 (incf (evt-time e1) time))
22 (make-evt-multi :time time :t2 123))
24 (defun do-test-evt (e1 time)
25 (let ((e2 (foreign-funcall-pointer (callback test-evt) () :int time (g-boxed-foreign evt) e1 (g-boxed-foreign evt))))
26 (values e1 e2)))