* Add method `destroy` to the Lua class `widget` and its children in the betawidget module
* Add some code that demonstrates the usage of widget:destroy() and its current flaws (i.e. segfaults ''will'' occur when using widget after calling the destroy() method on it, garbage collection is included in "using")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6008 4a71c877-e1ca-e34f-864e-861f7616d084
* In the Lua test app use betawidget.getTime() to determine the *true* amount of time passed since registering of the timer event
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5979 4a71c877-e1ca-e34f-864e-861f7616d084
* If the Lua event handler function didn't return a value, assume it was successful (and leave the stack as is)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5978 4a71c877-e1ca-e34f-864e-861f7616d084
- This struct is only destroyed when the callback is destroyed, which (by default) only happens when the widget is destroyed.
- Keeping a reference to the widget prevents Lua's garbage collector from ever destroying the widget
- Thus store a reference to the widget in a Lua "weak table"
- Also store the callback function in this table
* Thus we now only keep a reference to a Lua table referring to the widget (weakly) and the function (normally/strongly)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5972 4a71c877-e1ca-e34f-864e-861f7616d084
* Partially generated by SWIG
* Partially handcrafted
* Already supports registering Lua functions as event handlers of `widget` derivatives
* Slight change in betawidget headers because the struct typedef's somehow confused the compiler
* Use libtool for linking with Lua
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5963 4a71c877-e1ca-e34f-864e-861f7616d084