Hi,
yould someone show me some code for this:
Quote
If more than sixteen callback functions are required, slots can be reassigned to a different callback function.
Please :-)
(glutKeyboardFunc (callback 1 'keyboard))
(glutMouseFunc (callback 2 'mouse))
(glutMotionFunc (callback 3 'motion))
(glutIdleFunc (callback 4 'rotation))
(glutJoystickFunc (callback 5 'joystick) 50)
....
...
; later 'rotation' isn't used
(registerFunc (callback 4 'do-stuff'))
from: http://www.newlisp.org/syntax.cgi?downloads/OpenGL/opengl-demo-lsp.txt
And later here means later in program flow ?
So you override the callback no. 4 with another one ?
Any plans to adopt to libffi ?
Yes, the callback is overwritten later in the program flow.
I looked into it a few years back and thought, it was too big, does too many things. But somebody could build an interface to libffi using the 'import' function?
For 90% of lib imports the existing 'import' facility gives what is needed. For anything else, write a 'C' interface stub, which then gets imported by newLISP.
Quote
I looked into it a few years back and thought, it was too big, does too many things. But somebody could build an interface to libffi using the 'import' function?
For 90% of lib imports the existing 'import' facility gives what is needed. For anything else, write a 'C' interface stub, which then gets imported by newLISP.
Yes, but defcstruct (//http) is really sexy.
I'll take a look at the sources, I can only learn :-)