[Openmcl-devel] OS X 10.6 Gestures in CCL 1.6: how to define missing objc method interfaces?

Alexander Repenning ralex at cs.colorado.edu
Fri Dec 3 21:46:21 PST 2010


In ccl 1.6 I can setup very easily event handlers to get all the 10.6 track pad / touch screen gestures:


(objc:defmethod (#/beginGestureWithEvent: :void) ((self native-window-view) Event)
 (print Event))


(objc:defmethod (#/magnifyWithEvent: :void) ((self native-window-view) Event)
 (print Event))


(objc:defmethod (#/rotateWithEvent: :void) ((self native-window-view) Event)
 (print Event))


(objc:defmethod (#/endGestureWithEvent: :void) ((self native-window-view) Event)
 (print Event))


e.g., I get

#<NS-EVENT NSEvent: type=BeginGesture loc=(558,493) time=223033.4 flags=0x100 win=0x24d5c2e0 winNum=4575 ctxt=0x0 (#x26C9C1D0)> 
#<NS-EVENT NSEvent: type=Rotate loc=(558,493) time=223033.6 flags=0x100 win=0x24d5c2e0 winNum=4575 ctxt=0x0 rotation=0.122397 (#x26707BA0)> 
... many more
... and finally
#<NS-EVENT NSEvent: type=EndGesture loc=(558,493) time=223035.6 flags=0x100 win=0x24d5c2e0 winNum=4575 ctxt=0x0 (#x26CA2240)> 

Nice, but CCL 1.6 does not include the OS 10.6 framework interface for methods to access the new information contained in these gesture events.  

Trying to call (#/magnification Event) will result in an error:  > Undefined function NEXTSTEP-FUNCTIONS:|magnification|

How does one manually define #/<name> callable method interfaces (missing in the 10.5 headers), NOT #_<name> callable functions manually? More specifically, how do I need to define the objc "magnification"method interface? This must be somewhere in the doc but I cannot find it.

Alex





More information about the Openmcl-devel mailing list