summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/Image/binding
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2019-08-02 20:51:00 +0800
committerchai <chaifix@163.com>2019-08-02 20:51:00 +0800
commitbad78945ceba425f6a80e3b8dca2414d592970eb (patch)
tree8bf7540766349c534bf9e5746b24fd7507ba034e /source/modules/asura-core/Image/binding
parent99b90496765df21c5f377f42b9ed073ccb34c1fd (diff)
*修改文件名格式
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..77f3a96
--- /dev/null
+++ b/source/modules/asura-core/Image/binding/_image_data.cpp
@@ -0,0 +1,108 @@
+#include <asura-utils/Threads/Thread.h>
+#include <asura-utils/IO/DataBuffer.h>
+
+#include "../ImageData.h"
+
+using namespace std;
+using namespace AEThreading;
+using namespace AEIO;
+
+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)
+{
+
+}
+
+}
+}