diff options
author | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2019-04-02 08:47:15 +0800 |
commit | 250e30d73f09e9da2b5a81d0fbae63744ae12a73 (patch) | |
tree | 0f55daf334c073e1779d7a1284799a2056aad714 /source/modules/asura-core/image/binding | |
parent | 66fe16dd5ed57ae958fc25158d0defae2e6fae6a (diff) |
*misc
Diffstat (limited to 'source/modules/asura-core/image/binding')
-rw-r--r-- | source/modules/asura-core/image/binding/_image_data.cpp | 111 | ||||
-rw-r--r-- | source/modules/asura-core/image/binding/_image_decode_task.cpp | 21 |
2 files changed, 132 insertions, 0 deletions
diff --git a/source/modules/asura-core/image/binding/_image_data.cpp b/source/modules/asura-core/image/binding/_image_data.cpp new file mode 100644 index 0000000..ac9473b --- /dev/null +++ b/source/modules/asura-core/image/binding/_image_data.cpp @@ -0,0 +1,111 @@ +#include <asura-utils/threading/thread.h> +#include <asura-utils/io/data_buffer.h> + +#include "../image_data.h" + +using namespace std; +using namespace AEThreading; +using namespace AEIO; + +namespace AsuraEngine +{ + namespace Graphics + { + + LUAX_REGISTRY(ImageData) + { + LUAX_REGISTER_METHODS(state, + { "New", _New }, + { "GetPixel", _GetPixel }, + { "GetSize", _GetSize }, + { "GetWidth", _GetWidth }, + { "GetHeight", _GetHeight }, + { "GetPixelFormat", _GetPixelFormat }, + { "Decode", _Decode }, + { "DecodeAsync", _DecodeAsync }, + { "IsAvailable", _IsAvailable } + ); + } + + LUAX_POSTPROCESS(ImageData) + { + + } + + // ImageData.New() + LUAX_IMPL_METHOD(ImageData, _New) + { + LUAX_STATE(L); + + return 0; + } + + // imagedata:GetPixel() + LUAX_IMPL_METHOD(ImageData, _GetPixel) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:GetSize() + LUAX_IMPL_METHOD(ImageData, _GetSize) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:GetWidth() + LUAX_IMPL_METHOD(ImageData, _GetWidth) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:GetHeight() + LUAX_IMPL_METHOD(ImageData, _GetHeight) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:GetPixelFormat() + LUAX_IMPL_METHOD(ImageData, _GetPixelFormat) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:Decode() + LUAX_IMPL_METHOD(ImageData, _Decode) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + // imagedata:DecodeAsync(thread, databuffer, callback) + LUAX_IMPL_METHOD(ImageData, _DecodeAsync) + { + LUAX_PREPARE(L, ImageData); + + Thread* thread = state.CheckUserdata<Thread>(2); + DataBuffer* buffer = state.CheckUserdata<DataBuffer>(3); + + return 0; + } + + // imagedata:IsAvailable() + LUAX_IMPL_METHOD(ImageData, _IsAvailable) + { + LUAX_PREPARE(L, ImageData); + + return 0; + } + + } +} diff --git a/source/modules/asura-core/image/binding/_image_decode_task.cpp b/source/modules/asura-core/image/binding/_image_decode_task.cpp new file mode 100644 index 0000000..76b544b --- /dev/null +++ b/source/modules/asura-core/image/binding/_image_decode_task.cpp @@ -0,0 +1,21 @@ +#include "../image_decode_task.h" + +using namespace std; + +namespace AsuraEngine +{ + namespace Graphics + { + + LUAX_REGISTRY(ImageDecodeTask) + { + + } + + LUAX_POSTPROCESS(ImageDecodeTask) + { + + } + + } +} |