From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- .../asura-core/Image/binding/_image_data.cpp | 108 +++++++++++++++++++++ .../Image/binding/_image_decode_task.cpp | 19 ++++ 2 files changed, 127 insertions(+) create mode 100644 Source/modules/asura-core/Image/binding/_image_data.cpp create mode 100644 Source/modules/asura-core/Image/binding/_image_decode_task.cpp (limited to 'Source/modules/asura-core/Image/binding') 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..375f854 --- /dev/null +++ b/Source/modules/asura-core/Image/binding/_image_data.cpp @@ -0,0 +1,108 @@ +#include +#include + +#include "../ImageData.h" + +using namespace std; +using namespace AEThreading; +using namespace AEFileSystem; + +namespace_begin(AsuraEngine) +namespace_begin(Image) +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(2); + DataBuffer* buffer = state.CheckUserdata(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..3c8ed4b --- /dev/null +++ b/Source/modules/asura-core/Image/binding/_image_decode_task.cpp @@ -0,0 +1,19 @@ +#include "../ImageDecodeTask.h" + +using namespace std; + +namespace_begin(AsuraEngine) +namespace_begin(Image) + +LUAX_REGISTRY(ImageDecodeTask) +{ + +} + +LUAX_POSTPROCESS(ImageDecodeTask) +{ + +} + +} +} -- cgit v1.1-26-g67d0