diff --git a/Bindings/Bindings.idl b/Bindings/Bindings.idl index 4cbbbbc..725d7de 100644 --- a/Bindings/Bindings.idl +++ b/Bindings/Bindings.idl @@ -303,6 +303,7 @@ interface Layout { void RemoveLayer([Const] DOMString name); unsigned long GetLayersCount(); void SwapLayers(unsigned long firstLayerIndex, unsigned long secondLayerIndex); + void MoveLayer(unsigned long oldIndex, unsigned long newIndex); void SerializeLayersTo([Ref] SerializerElement element); void UnserializeLayersFrom([Const, Ref] SerializerElement element); diff --git a/Bindings/glue.cpp b/Bindings/glue.cpp index 6da5167..07183b7 100644 --- a/Bindings/glue.cpp +++ b/Bindings/glue.cpp @@ -132,6 +132,10 @@ void EMSCRIPTEN_KEEPALIVE emscripten_bind_Layout_SwapLayers_2(Layout* self, unsi self->SwapLayers(arg0, arg1); } +void EMSCRIPTEN_KEEPALIVE emscripten_bind_Layout_MoveLayer_2(Layout* self, unsigned int arg0, unsigned int arg1) { + self->MoveLayer(arg0, arg1); +} + void EMSCRIPTEN_KEEPALIVE emscripten_bind_Layout_SerializeLayersTo_1(Layout* self, SerializerElement* arg0) { self->SerializeLayersTo(*arg0); } diff --git a/Bindings/glue.js b/Bindings/glue.js index 841d0d4..7a5ec8c 100644 --- a/Bindings/glue.js +++ b/Bindings/glue.js @@ -280,6 +280,13 @@ Layout.prototype['SwapLayers'] = Layout.prototype.SwapLayers = function(arg0, ar _emscripten_bind_Layout_SwapLayers_2(self, arg0, arg1); };; +Layout.prototype['MoveLayer'] = Layout.prototype.MoveLayer = function(arg0, arg1) { + var self = this.ptr; + if (arg0 && typeof arg0 === 'object') arg0 = arg0.ptr; + if (arg1 && typeof arg1 === 'object') arg1 = arg1.ptr; + _emscripten_bind_Layout_MoveLayer_2(self, arg0, arg1); +};; + Layout.prototype['SerializeLayersTo'] = Layout.prototype.SerializeLayersTo = function(arg0) { var self = this.ptr; if (arg0 && typeof arg0 === 'object') arg0 = arg0.ptr; diff --git a/test/Core.js b/test/Core.js index 53cdccf..89dc59f 100644 --- a/test/Core.js +++ b/test/Core.js @@ -11,6 +11,8 @@ describe('libGD.js', function(){ it('can return the version number of the library', function() { expect(gd.VersionWrapper.major()).to.be.a("number"); expect(gd.VersionWrapper.minor()).to.be.a("number"); + expect(gd.VersionWrapper.build()).to.be.a("number"); + expect(gd.VersionWrapper.revision()).to.be.a("number"); expect(gd.VersionWrapper.fullString()).to.be.a("string"); }); });