setNekoCallback , we often found that when an
application has been running for some time, the reference to a static function will tend to get lost,
causing a nasty crash. We have yet to experience this same bug when using a local function.
As an alternative to assigning a Neko function reference as a callback to a window event, one can also
directly assign a C - level function pointer, available within Neko as a Void abstract value, directly to the
event messaging loop. This is accomplished using the setCCallback of the MessageHook instance:
hook.setCCallback( myCLevelFunction );
The passed C function pointer must assume the following specific signature:
void *(*callback) ( callbackData *void, void *id1, void *id2, void *p1, void *p2 );
Because it is beyond the scope of this book, the parameters are not detailed here, though you can find the
information listed within the SWHX ndll source code.
Communication Between Flash and Neko
So far, you have looked at how an application might display a Flash movie, with some highlights into
message handling from the perspective of the window.
Pages:
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961