1
0
Fork 0

Canvas: expose more methods to Nasal

This commit is contained in:
Thomas Geymayer 2014-06-01 12:08:13 +02:00
parent d1fd5756f6
commit 06a9958689

View file

@ -391,6 +391,8 @@ naRef initNasalCanvas(naRef globals, naContext c)
nasal::Hash globals_module(globals, c),
canvas_module = globals_module.createHash("canvas");
nasal::Object::setupGhost();
//----------------------------------------------------------------------------
// Events
@ -437,6 +439,7 @@ naRef initNasalCanvas(naRef globals, naContext c)
.method("data", &f_propElementData);
NasalCanvas::init("Canvas")
.bases<NasalPropertyBasedElement>()
.bases<nasal::ObjectRef>()
.member("_node_ghost", &elementGetNode<sc::Canvas>)
.member("size_x", &sc::Canvas::getSizeX)
.member("size_y", &sc::Canvas::getSizeY)
@ -470,7 +473,9 @@ naRef initNasalCanvas(naRef globals, naContext c)
// Layouting
NasalLayoutItem::init("canvas.LayoutItem")
.method("setCanvas", &sc::LayoutItem::setCanvas);
.method("getCanvas", &sc::LayoutItem::getCanvas)
.method("setCanvas", &sc::LayoutItem::setCanvas)
.method("getParent", &sc::LayoutItem::getParent);
sc::NasalWidget::setupGhost(canvas_module);
NasalLayout::init("canvas.Layout")