From: Markus S. <mar...@gm...> - 2008-03-19 17:42:54
|
The reason we use "context" parameters in C callbacks is that we are trying to emulate passing an object (context=object pointer) and a function that operates on that object. If in Java the callback itself is an object (or an interface) then you should not need a separate context reference/pointer. API-using code should be able to instantiate an object of the right type and with the desired context information and set that as the callback object. markus |