Unresolved external function "GetGlobalMouse"
I am getting an error on an foreign function call that used to work.
I am running LW 6.0.1 under MacOS 10.6.7
Here the code, compiled on a freshly started LW.
The functions (hide) and (show) work but the problematic one is (mouse-position).
Bruno
;;;;; Code
(fli:define-c-struct (point (:foreign-name "Point"))
(y :short)
(x :short))
(fli:define-c-typedef (point (:foreign-name "Point"))
(:struct point))
(fli:define-foreign-function (getglobalmouse "GetGlobalMouse" :source)
((p (:pointer point)))
:result-type :void
:language :c)
(defun mouse-position ()
(fli:with-dynamic-foreign-objects ()
(let ((point (fli:allocate-foreign-object :type 'point)))
(getglobalmouse point)
(list (fli:foreign-slot-value point 'x) (fli:foreign-slot-value point 'y)))))
(fli:define-foreign-function (hidemenubar "HideMenuBar" :source)
()
:result-type :void
:language :c)
(fli:define-foreign-function (showmenubar "ShowMenuBar" :source)
()
:result-type :void
:language :c)
;;;; Listener
CL-USER 1 > (hide)
CL-USER 2 > (show)
CL-USER 3 > (mouse-position)
Error: Foreign function GETGLOBALMOUSE trying to call to unresolved external function "GetGlobalMouse".
1 (abort) Return to level 0.
2 Return to top loop level 0.
Type :b for backtrace or :c <option number> to proceed.
Type :bug-form "<subject>" for a bug report template or :? for other options.
CL-USER 4 : 1 >