summaryrefslogtreecommitdiff
path: root/Source/modules/asura-core/Image/binding
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-07 21:08:47 +0800
committerchai <chaifix@163.com>2019-08-07 21:08:47 +0800
commit0c391fdbce5a079cf03e483eb6174dd47806163d (patch)
treeb06cd7a9d0ae0d9bb9e82f3dcb786dfce11f8628 /Source/modules/asura-core/Image/binding
parent9686368e58e25cbd6dc37d686bdd2be3f80486d6 (diff)
*misc
Diffstat (limited to 'Source/modules/asura-core/Image/binding')
-rw-r--r--Source/modules/asura-core/Image/binding/_image_data.cpp108
-rw-r--r--Source/modules/asura-core/Image/binding/_image_decode_task.cpp19
2 files changed, 127 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..375f854
--- /dev/null
+++ b/Source/modules/asura-core/Image/binding/_image_data.cpp
@@ -0,0 +1,108 @@
+#include <asura-base/Threads/Thread.h>
+#include <asura-base/FileSystem/DataBuffer.h>
+
+#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<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..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)
+{
+
+}
+
+}
+}