diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-04-03 06:53:45 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-04-03 06:53:45 -0400 |
commit | 261dfb9c86fd7b060555197f112e314b0b5c76f6 (patch) | |
tree | 39566f933640291422214a7a1477bbaced5c585d | |
parent | c64dbc603831aa93f44239d43e06eebdf82fb1e0 (diff) |
TODO
-rw-r--r-- | TODO | 35 |
1 files changed, 35 insertions, 0 deletions
@@ -25,6 +25,41 @@ Callbacks should religiously be on the "callback, data," form to make them bindable in languages with closures. (Broken at the moment for objects). +Is this actually sufficient? Destroy notifiers would also be +necessary. Maybe languages just need to suck it up and generate +trampolines. We still need to know about "data" arguments so that we +can ignore them both in the trampoline and in the bound API. + +Would it be possible to also use tramplines in C? Ie., have a macro + + NUL_CALLBACK (function, data) + +that would return a single function to call? Event code would look like this then + + nuuk_connect (button, "clicked", NUL_CALLBACK (function, button, x, y, z)); + +and + + nuuk_connect (button, "clicked", NUL_CALLBACK (function, NUL_INT (x), NUL_INT (y))); + +But there would need to be a way to specify where extra information +passed to the function would go. Maybe that would just always go first. Ie., + + nuuk_connect (button, "clicked", NUL_CALLBACK (on_clicked)); + + ...; + + void + on_clicked (void) + { + printf ("clicked\n"); + } + +Would require a dependency on macro varargs and on libffi closures. + + +Dbus: + Note that proxy_invoke() will have to contain a description of the types, because the alternative is to believe the XML from the service, which would mean a malicious service could make us send random stuff |