From 250e30d73f09e9da2b5a81d0fbae63744ae12a73 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 2 Apr 2019 08:47:15 +0800 Subject: *misc --- .../asura-core/image/binding/_image_data.cpp | 111 +++++++++++++++++++++ .../image/binding/_image_decode_task.cpp | 21 ++++ 2 files changed, 132 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..ac9473b --- /dev/null +++ b/source/modules/asura-core/image/binding/_image_data.cpp @@ -0,0 +1,111 @@ +#include +#include + +#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(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..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) + { + + } + + } +} -- cgit v1.1-26-g67d0