chiark
/
gitweb
/
~mdw
/
clg
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
34f9e1d
)
Callbacks from C done properly
author
espen
<espen>
Wed, 3 Nov 2004 10:41:23 +0000
(10:41 +0000)
committer
espen
<espen>
Wed, 3 Nov 2004 10:41:23 +0000
(10:41 +0000)
gtk/gtk.lisp
patch
|
blob
|
blame
|
history
diff --git
a/gtk/gtk.lisp
b/gtk/gtk.lisp
index 22014c4f3aca193b5299e3d6a1eb19eb6a790f81..d71b3271e72dc5a449e06a8e4fb36a687dce09df 100644
(file)
--- a/
gtk/gtk.lisp
+++ b/
gtk/gtk.lisp
@@
-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
;; 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.1
3 2004-10-31 12:05:52
espen Exp $
+;; $Id: gtk.lisp,v 1.1
4 2004-11-03 10:41:23
espen Exp $
(in-package "GTK")
(in-package "GTK")
@@
-1073,8
+1073,10
@@
(defbinding menu-reorder-child (menu menu-item position) nil
(menu-item menu-item)
((%menu-position menu position) int))
(menu-item menu-item)
((%menu-position menu position) int))
-(defvar *menu-position-callback-marshal*
- (system:foreign-symbol-address "gtk_menu_position_callback_marshal"))
+(def-callback menu-position-callback-marshal
+ (c-call:void (x c-call:int) (y c-call:int) (push-in c-call:int)
+ (callback-id c-call:unsigned-int))
+ (invoke-callback callback-id nil x y (not (zerop push-in))))
(defbinding %menu-popup () nil
(menu menu)
(defbinding %menu-popup () nil
(menu menu)
@@
-1092,7
+1094,8
@@
(defun menu-popup (menu button activate-time &key callback parent-menu-shell
(unwind-protect
(%menu-popup
menu parent-menu-shell parent-menu-item
(unwind-protect
(%menu-popup
menu parent-menu-shell parent-menu-item
- *menu-position-callback-marshal* callback-id button activate-time)
+ (callback menu-position-callback-marshal)
+ callback-id button activate-time)
(destroy-user-data callback-id)))
(%menu-popup
menu parent-menu-shell parent-menu-item nil 0 button activate-time)))
(destroy-user-data callback-id)))
(%menu-popup
menu parent-menu-shell parent-menu-item nil 0 button activate-time)))