mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
Merge pull request #4209 from minggo/v3.5.0_merge_v3.4.2
V3.5.0 merge v3.4.2
This commit is contained in:
+30
@@ -228,3 +228,33 @@ jobs:
|
||||
cmake --build . --config Debug -- -jobs $NUM_OF_CORES CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
|
||||
fi
|
||||
echo "Compile iOS Done!"
|
||||
|
||||
compile_wgpu_mac:
|
||||
name: "Emscripten"
|
||||
runs-on: macos-latest
|
||||
if: contains( github.event.head_commit.message, 'WGPU_CI_ON' )
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Download external libraries
|
||||
shell: bash
|
||||
run: |
|
||||
EXT_VERSION=`grep version external/config.json |awk -F'"' '{print $4}'`
|
||||
rm external/config.json
|
||||
git clone --branch $EXT_VERSION --depth 1 https://github.com/cocos-creator/engine-native-external external
|
||||
- name: Setup Emscripten
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git ../emsdk
|
||||
cd ../emsdk
|
||||
./emsdk install latest
|
||||
./emsdk activate latest
|
||||
source ./emsdk_env.sh
|
||||
emcc -v
|
||||
- name: Compile
|
||||
env:
|
||||
COCOS_ENGINE_DEV: 1
|
||||
run: |
|
||||
COCOS2DX_ROOT=$GITHUB_WORKSPACE
|
||||
cd $COCOS2DX_ROOT/cocos/renderer/gfx-wgpu
|
||||
$COCOS2DX_ROOT/../emsdk/upstream/emscripten/emcmake cmake .
|
||||
$COCOS2DX_ROOT/../emsdk/upstream/emscripten/emmake make
|
||||
echo "Compile WGPU by ems on MacOS Done!"
|
||||
|
||||
@@ -60,7 +60,7 @@ int CocosApplication::init() {
|
||||
jsb_init_file_operation_delegate();
|
||||
|
||||
se->setExceptionCallback(
|
||||
std::bind(&CocosApplication::handleException, this, // NOLINT(modernize-avoid-bind)
|
||||
std::bind(&CocosApplication::handleException, this, // NOLINT(modernize-avoid-bind)
|
||||
std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||
|
||||
jsb_register_all_modules();
|
||||
|
||||
@@ -88,8 +88,8 @@ class AudioEngine::AudioEngineThreadPool {
|
||||
public:
|
||||
explicit AudioEngineThreadPool(int threads = 4) {
|
||||
for (int index = 0; index < threads; ++index) {
|
||||
_workers.emplace_back(std::thread([this](){
|
||||
threadFunc();
|
||||
_workers.emplace_back(std::thread([this]() {
|
||||
threadFunc();
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ int AudioEngine::play2d(const std::string &filePath, bool loop, float volume, co
|
||||
break;
|
||||
}
|
||||
|
||||
auto* profileHelper = sDefaultProfileHelper;
|
||||
auto *profileHelper = sDefaultProfileHelper;
|
||||
if (profile && profile != &profileHelper->profile) {
|
||||
CC_ASSERT(!profile->name.empty());
|
||||
profileHelper = &sAudioPathProfileHelperMap[profile->name];
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
|
||||
#import <OpenAL/al.h>
|
||||
|
||||
#include <string>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "audio/apple/AudioMacros.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
namespace cc {
|
||||
class AudioEngineImpl;
|
||||
@@ -64,9 +64,9 @@ protected:
|
||||
void invokingLoadCallbacks();
|
||||
|
||||
//pcm data related stuff
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _framesRead;
|
||||
|
||||
@@ -74,16 +74,16 @@ protected:
|
||||
* Cache pcm data when sizeInBytes less than PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
ALuint _alBufferId;
|
||||
char *_pcmData;
|
||||
char * _pcmData;
|
||||
|
||||
/*Queue buffer related stuff
|
||||
* Streaming in openal when sizeInBytes greater then PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
char *_queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
char * _queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
uint32_t _queBufferFrames;
|
||||
|
||||
std::mutex _playCallbackMutex;
|
||||
std::mutex _playCallbackMutex;
|
||||
std::vector<std::function<void()>> _playCallbacks;
|
||||
|
||||
// loadCallbacks doesn't need mutex since it's invoked only in Cocos thread.
|
||||
@@ -94,10 +94,10 @@ protected:
|
||||
State _state;
|
||||
|
||||
std::shared_ptr<bool> _isDestroyed;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
|
||||
friend class AudioEngineImpl;
|
||||
friend class AudioPlayer;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#import <AudioToolbox/ExtendedAudioFile.h>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace cc {
|
||||
|
||||
@@ -107,12 +107,12 @@ public:
|
||||
uint32_t getChannelCount() const;
|
||||
|
||||
private:
|
||||
bool _isOpened;
|
||||
bool _isOpened;
|
||||
ExtAudioFileRef _extRef;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _bytesPerFrame;
|
||||
uint32_t _sampleRate;
|
||||
uint32_t _channelCount;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _bytesPerFrame;
|
||||
uint32_t _sampleRate;
|
||||
uint32_t _channelCount;
|
||||
|
||||
AudioStreamBasicDescription _outputFormat;
|
||||
};
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "audio/apple/AudioMacros.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
#include <OpenAL/al.h>
|
||||
#include <condition_variable>
|
||||
#include <mutex>
|
||||
#include <string>
|
||||
#include <thread>
|
||||
#include <OpenAL/al.h>
|
||||
|
||||
namespace cc {
|
||||
class AudioCache;
|
||||
@@ -47,9 +47,9 @@ public:
|
||||
void destroy();
|
||||
|
||||
//queue buffer related stuff
|
||||
bool setTime(float time);
|
||||
bool setTime(float time);
|
||||
float getTime() { return _currTime; }
|
||||
bool setLoop(bool loop);
|
||||
bool setLoop(bool loop);
|
||||
|
||||
protected:
|
||||
void setCache(AudioCache *cache);
|
||||
@@ -59,25 +59,25 @@ protected:
|
||||
|
||||
AudioCache *_audioCache;
|
||||
|
||||
float _volume;
|
||||
bool _loop;
|
||||
float _volume;
|
||||
bool _loop;
|
||||
std::function<void(int, const std::string &)> _finishCallbak;
|
||||
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
ALuint _alSource;
|
||||
|
||||
//play by circular buffer
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[QUEUEBUFFER_NUM];
|
||||
std::thread *_rotateBufferThread;
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[QUEUEBUFFER_NUM];
|
||||
std::thread * _rotateBufferThread;
|
||||
std::condition_variable _sleepCondition;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::atomic_bool _needWakeupRotateThread;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::atomic_bool _needWakeupRotateThread;
|
||||
|
||||
std::mutex _play2dMutex;
|
||||
|
||||
|
||||
@@ -72,9 +72,9 @@ protected:
|
||||
void invokingLoadCallbacks();
|
||||
|
||||
//pcm data related stuff
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
ALenum _format;
|
||||
ALsizei _sampleRate;
|
||||
float _duration;
|
||||
uint32_t _totalFrames;
|
||||
uint32_t _framesRead;
|
||||
|
||||
@@ -82,16 +82,16 @@ protected:
|
||||
* Cache pcm data when sizeInBytes less than PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
ALuint _alBufferId;
|
||||
char *_pcmData;
|
||||
char * _pcmData;
|
||||
|
||||
/*Queue buffer related stuff
|
||||
* Streaming in OpenAL when sizeInBytes greater then PCMDATA_CACHEMAXSIZE
|
||||
*/
|
||||
char *_queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
char * _queBuffers[QUEUEBUFFER_NUM];
|
||||
ALsizei _queBufferSize[QUEUEBUFFER_NUM];
|
||||
uint32_t _queBufferFrames;
|
||||
|
||||
std::mutex _playCallbackMutex;
|
||||
std::mutex _playCallbackMutex;
|
||||
std::vector<std::function<void()>> _playCallbacks;
|
||||
|
||||
// loadCallbacks doesn't need mutex since it's invoked only in Cocos thread.
|
||||
@@ -102,10 +102,10 @@ protected:
|
||||
State _state;
|
||||
|
||||
std::shared_ptr<bool> _isDestroyed;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
std::string _fileFullPath;
|
||||
unsigned int _id;
|
||||
bool _isLoadingFinished;
|
||||
bool _isSkipReadDataTask;
|
||||
|
||||
friend class AudioEngineImpl;
|
||||
friend class AudioPlayer;
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "audio/oalsoft/AudioDecoder.h"
|
||||
#include <string.h>
|
||||
#include "audio/oalsoft/AudioMacros.h"
|
||||
#include "platform/FileUtils.h"
|
||||
#include <string.h>
|
||||
|
||||
#ifdef LOG_TAG
|
||||
#undef LOG_TAG
|
||||
|
||||
@@ -32,10 +32,10 @@ class AudioDecoder;
|
||||
|
||||
class AudioDecoderManager {
|
||||
public:
|
||||
static bool init();
|
||||
static void destroy();
|
||||
static bool init();
|
||||
static void destroy();
|
||||
static AudioDecoder *createDecoder(const char *path);
|
||||
static void destroyDecoder(AudioDecoder *decoder);
|
||||
static void destroyDecoder(AudioDecoder *decoder);
|
||||
};
|
||||
|
||||
} // namespace cc
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
#if CC_PLATFORM == CC_PLATFORM_WINDOWS || CC_PLATFORM == CC_PLATFORM_LINUX || CC_PLATFORM == CC_PLATFORM_QNX
|
||||
#include "mpg123/mpg123.h"
|
||||
#elif CC_PLATFORM == CC_PLATFORM_OHOS
|
||||
#include <unistd.h>
|
||||
#include "cocos/platform/ohos/FileUtils-ohos.h"
|
||||
#include "mpg123.h"
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <sys/stat.h>
|
||||
|
||||
@@ -41,10 +41,10 @@
|
||||
#include "AL/alc.h"
|
||||
#include "AL/alext.h"
|
||||
#endif
|
||||
#include "application/ApplicationManager.h"
|
||||
#include "audio/include/AudioEngine.h"
|
||||
#include "audio/oalsoft/AudioDecoderManager.h"
|
||||
#include "base/Scheduler.h"
|
||||
#include "application/ApplicationManager.h"
|
||||
#include "platform/FileUtils.h"
|
||||
|
||||
#if CC_PLATFORM == CC_PLATFORM_WINDOWS
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
break; \
|
||||
}
|
||||
|
||||
#define BREAK_IF_ERR_LOG(condition, fmt, ...) \
|
||||
if (!!(condition)) { \
|
||||
#define BREAK_IF_ERR_LOG(condition, fmt, ...) \
|
||||
if (!!(condition)) { \
|
||||
CC_LOG_DEBUG("(" QUOTEME(condition) ") failed, message: " fmt, ##__VA_ARGS__); \
|
||||
break; \
|
||||
break; \
|
||||
}
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
#include "base/Log.h"
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
||||
using namespace cc; //NOLINT
|
||||
|
||||
|
||||
@@ -55,9 +55,9 @@ public:
|
||||
void destroy();
|
||||
|
||||
//queue buffer related stuff
|
||||
bool setTime(float time);
|
||||
bool setTime(float time);
|
||||
float getTime() { return _currTime; }
|
||||
bool setLoop(bool loop);
|
||||
bool setLoop(bool loop);
|
||||
|
||||
protected:
|
||||
void setCache(AudioCache *cache);
|
||||
@@ -66,24 +66,24 @@ protected:
|
||||
|
||||
AudioCache *_audioCache;
|
||||
|
||||
float _volume;
|
||||
bool _loop;
|
||||
float _volume;
|
||||
bool _loop;
|
||||
std::function<void(int, const std::string &)> _finishCallbak;
|
||||
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
bool _isDestroyed;
|
||||
bool _removeByAudioEngine;
|
||||
bool _ready;
|
||||
ALuint _alSource;
|
||||
|
||||
//play by circular buffer
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[3];
|
||||
std::thread *_rotateBufferThread;
|
||||
float _currTime;
|
||||
bool _streamingSource;
|
||||
ALuint _bufferIds[3];
|
||||
std::thread * _rotateBufferThread;
|
||||
std::condition_variable _sleepCondition;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
std::mutex _sleepMutex;
|
||||
bool _timeDirty;
|
||||
bool _isRotateThreadExited;
|
||||
|
||||
std::mutex _play2dMutex;
|
||||
|
||||
|
||||
@@ -36,14 +36,14 @@ public:
|
||||
AudioDecoderWav();
|
||||
~AudioDecoderWav() override;
|
||||
|
||||
bool open(const char *path) override;
|
||||
void close() override;
|
||||
bool open(const char *path) override;
|
||||
void close() override;
|
||||
uint32_t read(uint32_t framesToRead, char *pcmBuf) override;
|
||||
bool seek(uint32_t frameOffset) override;
|
||||
bool seek(uint32_t frameOffset) override;
|
||||
uint32_t tell() const override;
|
||||
|
||||
private:
|
||||
SF_INFO _sndInfo;
|
||||
SF_INFO _sndInfo;
|
||||
SNDFILE *_sndHandle{};
|
||||
};
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Macros.h"
|
||||
#include <memory>
|
||||
#include "Macros.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/Ref.h"
|
||||
|
||||
namespace cc {
|
||||
@@ -107,7 +107,7 @@ private:
|
||||
* is in the pool.
|
||||
*/
|
||||
std::vector<Ref *> _managedObjectArray;
|
||||
std::string _name;
|
||||
std::string _name;
|
||||
|
||||
#if defined(CC_DEBUG) && (CC_DEBUG > 0)
|
||||
/**
|
||||
|
||||
Executable → Regular
+2
-2
@@ -25,10 +25,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string.h>
|
||||
#include <climits>
|
||||
#include "base/Object.h"
|
||||
#include "base/TypeDef.h"
|
||||
#include <climits>
|
||||
#include <string.h>
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/Data.h"
|
||||
#include "base/Log.h"
|
||||
#include <cstring>
|
||||
#include "base/Log.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
Executable → Regular
+11
-11
@@ -25,10 +25,10 @@
|
||||
|
||||
#include "Log.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cstdarg>
|
||||
#include <ctime>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#if (CC_PLATFORM == CC_PLATFORM_WINDOWS)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
@@ -78,15 +78,15 @@ void Log::setLogFile(const std::string &filename) {
|
||||
struct tm *tm_time;
|
||||
time_t ct_time;
|
||||
time(&ct_time);
|
||||
tm_time = localtime(&ct_time);
|
||||
char dateBuffer[256] = { 0 };
|
||||
tm_time = localtime(&ct_time);
|
||||
char dateBuffer[256] = {0};
|
||||
snprintf(dateBuffer, sizeof(dateBuffer), "LOG DATE: %04d-%02d-%02d %02d:%02d:%02d\n",
|
||||
tm_time->tm_year + 1900,
|
||||
tm_time->tm_mon + 1,
|
||||
tm_time->tm_mday,
|
||||
tm_time->tm_hour,
|
||||
tm_time->tm_min,
|
||||
tm_time->tm_sec);
|
||||
tm_time->tm_year + 1900,
|
||||
tm_time->tm_mon + 1,
|
||||
tm_time->tm_mday,
|
||||
tm_time->tm_hour,
|
||||
tm_time->tm_min,
|
||||
tm_time->tm_sec);
|
||||
|
||||
msg += dateBuffer;
|
||||
|
||||
@@ -126,7 +126,7 @@ void Log::logMessage(LogType type, LogLevel level, const char *formats, ...) {
|
||||
// p += StringUtil::vprintf(p, last, formats, args);
|
||||
|
||||
std::ptrdiff_t count = (last - p);
|
||||
int ret = vsnprintf(p, count, formats, args);
|
||||
int ret = vsnprintf(p, count, formats, args);
|
||||
if (ret >= count - 1) {
|
||||
p += (count - 1);
|
||||
} else if (ret >= 0) {
|
||||
|
||||
Executable → Regular
+5
-5
@@ -49,11 +49,11 @@ class CC_DLL Log {
|
||||
public:
|
||||
static LogLevel slogLevel; // for read only
|
||||
|
||||
static inline void setLogLevel(LogLevel level) { slogLevel = level; }
|
||||
static inline FILE *getLogFile() { return slogFile; }
|
||||
static void setLogFile(const std::string &filename);
|
||||
static void close();
|
||||
static void logMessage(LogType type, LogLevel level, const char *formats, ...);
|
||||
static inline void setLogLevel(LogLevel level) { slogLevel = level; }
|
||||
static inline FILE *getLogFile() { return slogFile; }
|
||||
static void setLogFile(const std::string &filename);
|
||||
static void close();
|
||||
static void logMessage(LogType type, LogLevel level, const char *formats, ...);
|
||||
|
||||
private:
|
||||
static FILE *slogFile;
|
||||
|
||||
@@ -301,9 +301,9 @@ It should work same as apples CFSwapInt32LittleToHost(..)
|
||||
#include <Endian.h>
|
||||
#else
|
||||
#if !defined(__QNX__)
|
||||
#include <endian.h>
|
||||
#include <endian.h>
|
||||
#else
|
||||
#define CC_ENDIAN CC_ENDIAN_LITTLE
|
||||
#define CC_ENDIAN CC_ENDIAN_LITTLE
|
||||
#endif
|
||||
#endif // (CC_PLATFORM == CC_PLATFORM_MAC_OSX)
|
||||
#
|
||||
@@ -407,24 +407,24 @@ It should work same as apples CFSwapInt32LittleToHost(..)
|
||||
#endif
|
||||
|
||||
#define CC_ENABLE_COPY_SEMANTICS(cls) \
|
||||
cls(const cls &) = default; \
|
||||
cls(const cls &) = default; \
|
||||
cls &operator=(const cls &) = default;
|
||||
|
||||
#define CC_DISABLE_COPY_SEMANTICS(cls) \
|
||||
cls(const cls &) = delete; \
|
||||
cls(const cls &) = delete; \
|
||||
cls &operator=(const cls &) = delete;
|
||||
|
||||
#define CC_ENABLE_MOVE_SEMANTICS(cls) \
|
||||
cls(cls &&) noexcept = default; \
|
||||
cls(cls &&) noexcept = default; \
|
||||
cls &operator=(cls &&) noexcept = default;
|
||||
|
||||
#define CC_DISABLE_MOVE_SEMANTICS(cls) \
|
||||
cls(cls &&) noexcept = delete; \
|
||||
cls(cls &&) noexcept = delete; \
|
||||
cls &operator=(cls &&) noexcept = delete;
|
||||
|
||||
#define CC_DISABLE_COPY_AND_MOVE_SEMANTICS(cls) \
|
||||
CC_DISABLE_COPY_SEMANTICS(cls) \
|
||||
CC_DISABLE_MOVE_SEMANTICS(cls)
|
||||
CC_DISABLE_COPY_SEMANTICS(cls) \
|
||||
CC_DISABLE_MOVE_SEMANTICS(cls)
|
||||
|
||||
#if (CC_COMPILER == CC_COMPILER_MSVC)
|
||||
#define CC_ALIGN(N) __declspec(align(N))
|
||||
|
||||
@@ -301,7 +301,7 @@ public:
|
||||
*/
|
||||
V getRandomObject() const {
|
||||
if (!_data.empty()) {
|
||||
auto randIdx = RandomHelper::randomInt<int>(0, static_cast<int>(_data.size()) - 1);
|
||||
auto randIdx = RandomHelper::randomInt<int>(0, static_cast<int>(_data.size()) - 1);
|
||||
const_iterator randIter = _data.begin();
|
||||
std::advance(randIter, randIdx);
|
||||
return randIter->second;
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <random>
|
||||
#include <cstdlib>
|
||||
#include <random>
|
||||
|
||||
#include "base/Macros.h"
|
||||
|
||||
@@ -43,21 +43,21 @@ public:
|
||||
template <typename T>
|
||||
static inline T randomReal(T min, T max) {
|
||||
std::uniform_real_distribution<T> dist(min, max);
|
||||
auto &mt = RandomHelper::getEngine();
|
||||
auto & mt = RandomHelper::getEngine();
|
||||
return dist(mt);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static inline T randomInt(T min, T max) {
|
||||
std::uniform_int_distribution<T> dist(min, max);
|
||||
auto &mt = RandomHelper::getEngine();
|
||||
auto & mt = RandomHelper::getEngine();
|
||||
return dist(mt);
|
||||
}
|
||||
|
||||
private:
|
||||
static inline std::mt19937 &getEngine() {
|
||||
static std::random_device seedGen;
|
||||
static std::mt19937 engine(seedGen());
|
||||
static std::mt19937 engine(seedGen());
|
||||
return engine;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "base/Config.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
#define CC_REF_LEAK_DETECTION 0
|
||||
|
||||
|
||||
@@ -29,12 +29,12 @@
|
||||
|
||||
#include "base/Scheduler.h"
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "base/Log.h"
|
||||
#include <climits>
|
||||
#include "base/Log.h"
|
||||
#include "base/Macros.h"
|
||||
|
||||
namespace {
|
||||
constexpr unsigned CC_REPEAT_FOREVER{UINT_MAX - 1};
|
||||
|
||||
Executable → Regular
+2
-2
@@ -24,9 +24,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "StringUtil.h"
|
||||
#include "memory/Memory.h"
|
||||
#include <string>
|
||||
#include <cstdarg>
|
||||
#include <string>
|
||||
#include "memory/Memory.h"
|
||||
|
||||
#if (CC_PLATFORM == CC_PLATFORM_WINDOWS)
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
|
||||
Executable → Regular
+1
-1
@@ -25,10 +25,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdarg>
|
||||
#include "Macros.h"
|
||||
#include "TypeDef.h"
|
||||
#include "memory/Memory.h"
|
||||
#include <cstdarg>
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
****************************************************************************/
|
||||
|
||||
#include "base/ThreadPool.h"
|
||||
#include "platform/StdC.h"
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include "platform/StdC.h"
|
||||
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#include <cstdint>
|
||||
#include "base/Macros.h"
|
||||
|
||||
|
||||
namespace cc {
|
||||
namespace utils {
|
||||
|
||||
|
||||
Executable → Regular
+3
-4
@@ -27,12 +27,11 @@
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
|
||||
using uint = std::uint32_t;
|
||||
using ushort = std::uint16_t;
|
||||
using uint = std::uint32_t;
|
||||
using ushort = std::uint16_t;
|
||||
|
||||
#if (CC_PLATFORM != CC_PLATFORM_LINUX && CC_PLATFORM != CC_PLATFORM_QNX) // linux has typedef ulong
|
||||
using ulong = std::uint32_t;
|
||||
using ulong = std::uint32_t;
|
||||
#endif
|
||||
using FlagBits = std::uint32_t;
|
||||
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <cerrno>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <climits>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "base/Macros.h"
|
||||
#include "base/TypeDef.h"
|
||||
/** @file ccUtils.h
|
||||
@@ -69,7 +69,7 @@ T alignTo(T size, T alignment) {
|
||||
return ((size - 1) / alignment + 1) * alignment;
|
||||
}
|
||||
|
||||
template<uint size, uint alignment>
|
||||
template <uint size, uint alignment>
|
||||
constexpr uint ALIGN_TO = ((size - 1) / alignment + 1) * alignment;
|
||||
|
||||
template <class T>
|
||||
|
||||
@@ -26,20 +26,20 @@
|
||||
|
||||
#include "base/Value.h"
|
||||
|
||||
#include <memory.h>
|
||||
#include <algorithm>
|
||||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <iomanip>
|
||||
#include <memory.h>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/Utils.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
const ValueVector VALUE_VECTOR_NULL;
|
||||
const ValueMap VALUE_MAP_NULL = {};
|
||||
const ValueMap VALUE_MAP_NULL = {};
|
||||
const ValueMapIntKey VALUE_MAP_INT_KEY_NULL = {};
|
||||
|
||||
const Value Value::VALUE_NULL;
|
||||
|
||||
+12
-12
@@ -33,12 +33,12 @@ namespace cc {
|
||||
|
||||
class Value;
|
||||
|
||||
using ValueVector = vector<Value>;
|
||||
using ValueMap = unordered_map<String, Value>;
|
||||
using ValueVector = vector<Value>;
|
||||
using ValueMap = unordered_map<String, Value>;
|
||||
using ValueMapIntKey = unordered_map<int, Value>;
|
||||
|
||||
CC_DLL extern const ValueVector VALUE_VECTOR_NULL;
|
||||
CC_DLL extern const ValueMap VALUE_MAP_NULL;
|
||||
CC_DLL extern const ValueVector VALUE_VECTOR_NULL;
|
||||
CC_DLL extern const ValueMap VALUE_MAP_NULL;
|
||||
CC_DLL extern const ValueMapIntKey VALUE_MAP_INT_KEY_NULL;
|
||||
|
||||
/*
|
||||
@@ -219,15 +219,15 @@ private:
|
||||
|
||||
union {
|
||||
unsigned char byteVal;
|
||||
int intVal;
|
||||
unsigned int unsignedVal;
|
||||
float floatVal;
|
||||
double doubleVal;
|
||||
bool boolVal;
|
||||
int intVal;
|
||||
unsigned int unsignedVal;
|
||||
float floatVal;
|
||||
double doubleVal;
|
||||
bool boolVal;
|
||||
|
||||
String *strVal;
|
||||
ValueVector *vectorVal;
|
||||
ValueMap *mapVal;
|
||||
String * strVal;
|
||||
ValueVector * vectorVal;
|
||||
ValueMap * mapVal;
|
||||
ValueMapIntKey *intKeyMapVal;
|
||||
} _field;
|
||||
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
#include "base/astc.h"
|
||||
#include "platform/Image.h"
|
||||
|
||||
static const unsigned int MAGIC = 0x5CA1AB13;
|
||||
static const astc_byte ASTC_HEADER_SIZE_X_BEGIN = 7;
|
||||
static const astc_byte ASTC_HEADER_SIZE_Y_BEGIN = 10;
|
||||
static const unsigned int MAGIC = 0x5CA1AB13;
|
||||
static const astc_byte ASTC_HEADER_SIZE_X_BEGIN = 7;
|
||||
static const astc_byte ASTC_HEADER_SIZE_Y_BEGIN = 10;
|
||||
|
||||
bool astcIsValid(const astc_byte *pHeader) {
|
||||
uint32_t magicval = static_cast<uint32_t>(pHeader[0]) +
|
||||
@@ -46,8 +46,8 @@ bool astcIsValid(const astc_byte *pHeader) {
|
||||
int ydim = pHeader[ASTC_HEADER_MAGIC + 1];
|
||||
int zdim = pHeader[ASTC_HEADER_MAGIC + 2];
|
||||
return !((xdim < 3 || xdim > 6 || ydim < 3 || ydim > 6 || zdim < 3 || zdim > 6) &&
|
||||
(xdim < 4 || xdim == 7 || xdim == 9 || xdim == 11 || xdim > 12 ||
|
||||
ydim < 4 || ydim == 7 || ydim == 9 || ydim == 11 || ydim > 12 || zdim != 1));
|
||||
(xdim < 4 || xdim == 7 || xdim == 9 || xdim == 11 || xdim > 12 ||
|
||||
ydim < 4 || ydim == 7 || ydim == 9 || ydim == 11 || ydim > 12 || zdim != 1));
|
||||
}
|
||||
|
||||
int astcGetWidth(const astc_byte *pHeader) {
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
using astc_byte = unsigned char;
|
||||
using astc_byte = unsigned char;
|
||||
using astc_uint32 = unsigned int;
|
||||
|
||||
// Size of a ASTC header
|
||||
|
||||
#define ASTC_HEADER_SIZE 16
|
||||
#define ASTC_HEADER_SIZE 16
|
||||
|
||||
#define ASTC_HEADER_MAGIC 4
|
||||
#define ASTC_HEADER_MAGIC 4
|
||||
|
||||
// Check if a ASTC header is correctly formatted
|
||||
|
||||
|
||||
@@ -49,18 +49,18 @@
|
||||
|
||||
#include "csscolorparser.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace CSSColorParser {
|
||||
|
||||
// http://www.w3.org/TR/css3-color/
|
||||
struct NamedColor {
|
||||
const char * name;
|
||||
Color color;
|
||||
const char *name;
|
||||
Color color;
|
||||
};
|
||||
|
||||
const std::vector<NamedColor> NAMED_COLORS = {
|
||||
@@ -214,14 +214,16 @@ const std::vector<NamedColor> NAMED_COLORS = {
|
||||
{"yellowgreen", {154, 205, 50, 1}}};
|
||||
|
||||
template <typename T>
|
||||
uint8_t clampCssByte(T i) { // Clamp to integer 0 .. 255.
|
||||
i = static_cast<T>(::round(i)); // Seems to be what Chrome does (vs truncation).
|
||||
return static_cast<uint8_t>(i < 0 ? 0 : i > 255 ? 255 : i);
|
||||
uint8_t clampCssByte(T i) { // Clamp to integer 0 .. 255.
|
||||
i = static_cast<T>(::round(i)); // Seems to be what Chrome does (vs truncation).
|
||||
return static_cast<uint8_t>(i < 0 ? 0 : i > 255 ? 255
|
||||
: i);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
float clampCssFloat(T f) { // Clamp to float 0.0 .. 1.0.
|
||||
return f < 0 ? 0 : f > 1 ? 1 : float(f);
|
||||
return f < 0 ? 0 : f > 1 ? 1
|
||||
: float(f);
|
||||
}
|
||||
|
||||
float parseFloat(const std::string &str) {
|
||||
@@ -237,7 +239,7 @@ uint8_t parseCssInt(const std::string &str) { // int or percentage.
|
||||
return clampCssByte(parseFloat(str) / 100.0f * 255.0f);
|
||||
}
|
||||
return clampCssByte(parseInt(str));
|
||||
}
|
||||
}
|
||||
|
||||
float parseCssFloat(const std::string &str) { // float or percentage.
|
||||
if (str.length() && str.back() == '%') {
|
||||
@@ -267,8 +269,8 @@ float cssHueToRgb(float m1, float m2, float h) {
|
||||
|
||||
std::vector<std::string> split(const std::string &s, char delim) {
|
||||
std::vector<std::string> elems;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
std::stringstream ss(s);
|
||||
std::string item;
|
||||
while (std::getline(ss, item, delim)) {
|
||||
elems.push_back(item);
|
||||
}
|
||||
@@ -297,13 +299,13 @@ Color parse(const std::string &cssStr) {
|
||||
parseInt(str.substr(1), 16); // REFINE(deanm): Stricter parsing.
|
||||
if (!(iv >= 0 && iv <= 0xfff)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Color(
|
||||
static_cast<uint8_t>(((iv & 0xf00) >> 4) | ((iv & 0xf00) >> 8)),
|
||||
static_cast<uint8_t>((iv & 0xf0) | ((iv & 0xf0) >> 4)),
|
||||
static_cast<uint8_t>((iv & 0xf) | ((iv & 0xf) << 4)), 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (str.length() == 7) {
|
||||
int64_t iv = parseInt(str.substr(1), 16); // REFINE(deanm): Stricter parsing.
|
||||
@@ -312,8 +314,8 @@ Color parse(const std::string &cssStr) {
|
||||
}
|
||||
|
||||
return Color(static_cast<uint8_t>((iv & 0xff0000) >> 16),
|
||||
static_cast<uint8_t>((iv & 0xff00) >> 8),
|
||||
static_cast<uint8_t>(iv & 0xff), 1);
|
||||
static_cast<uint8_t>((iv & 0xff00) >> 8),
|
||||
static_cast<uint8_t>(iv & 0xff), 1);
|
||||
}
|
||||
|
||||
return Color();
|
||||
@@ -322,7 +324,7 @@ Color parse(const std::string &cssStr) {
|
||||
size_t op = str.find_first_of('(');
|
||||
size_t ep = str.find_first_of(')');
|
||||
if (op != std::string::npos && ep + 1 == str.length()) {
|
||||
const std::string fname = str.substr(0, op);
|
||||
const std::string fname = str.substr(0, op);
|
||||
const std::vector<std::string> params =
|
||||
split(str.substr(op + 1, ep - (op + 1)), ',');
|
||||
|
||||
@@ -342,8 +344,7 @@ Color parse(const std::string &cssStr) {
|
||||
|
||||
return Color(parseCssInt(params[0]), parseCssInt(params[1]),
|
||||
parseCssInt(params[2]), alpha);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (fname == "hsla" || fname == "hsl") {
|
||||
if (fname == "hsla") {
|
||||
|
||||
@@ -49,18 +49,19 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
#include <string>
|
||||
|
||||
namespace CSSColorParser {
|
||||
|
||||
struct Color {
|
||||
inline Color() = default;
|
||||
inline Color(unsigned char red, unsigned char green, unsigned char blue, float alpha)
|
||||
: r(red), g(green), b(blue), a(alpha > 1 ? 1 : alpha < 0 ? 0 : alpha) {
|
||||
: r(red), g(green), b(blue), a(alpha > 1 ? 1 : alpha < 0 ? 0
|
||||
: alpha) {
|
||||
}
|
||||
unsigned char r = 0, g = 0, b = 0;
|
||||
float a = 1.0f;
|
||||
float a = 1.0f;
|
||||
};
|
||||
|
||||
inline bool operator==(const Color &lhs, const Color &rhs) {
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
|
||||
static const char kMagic[] = {'P', 'K', 'M', ' ', '1', '0'};
|
||||
|
||||
static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10;
|
||||
static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
|
||||
static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14;
|
||||
|
||||
static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0;
|
||||
|
||||
@@ -61,11 +61,11 @@ etc1_bool etc1_pkm_is_valid(const etc1_byte *pHeader) {
|
||||
if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
|
||||
return false;
|
||||
}
|
||||
etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
|
||||
etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET);
|
||||
etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET);
|
||||
etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
|
||||
etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
|
||||
etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET);
|
||||
etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET);
|
||||
return format == ETC1_RGB_NO_MIPMAPS &&
|
||||
encodedWidth >= width && encodedWidth - width < 4 &&
|
||||
encodedHeight >= height && encodedHeight - height < 4;
|
||||
|
||||
@@ -49,8 +49,8 @@
|
||||
#endif
|
||||
|
||||
typedef unsigned char etc1_byte;
|
||||
typedef int etc1_bool;
|
||||
typedef unsigned int etc1_uint32;
|
||||
typedef int etc1_bool;
|
||||
typedef unsigned int etc1_uint32;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
|
||||
static const char kMagic[] = {'P', 'K', 'M', ' ', '2', '0'};
|
||||
|
||||
static const etc2_uint32 ETC2_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc2_uint32 ETC2_PKM_FORMAT_OFFSET = 6;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_WIDTH_OFFSET = 8;
|
||||
static const etc2_uint32 ETC2_PKM_ENCODED_HEIGHT_OFFSET = 10;
|
||||
static const etc2_uint32 ETC2_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc2_uint32 ETC2_PKM_HEIGHT_OFFSET = 14;
|
||||
static const etc2_uint32 ETC2_PKM_WIDTH_OFFSET = 12;
|
||||
static const etc2_uint32 ETC2_PKM_HEIGHT_OFFSET = 14;
|
||||
|
||||
static etc2_uint32 readBEUint16(const etc2_byte *pIn) {
|
||||
return (pIn[0] << 8) | pIn[1];
|
||||
@@ -47,11 +47,11 @@ etc2_bool etc2_pkm_is_valid(const etc2_byte *pHeader) {
|
||||
if (memcmp(pHeader, kMagic, sizeof(kMagic))) {
|
||||
return false;
|
||||
}
|
||||
etc2_uint32 format = readBEUint16(pHeader + ETC2_PKM_FORMAT_OFFSET);
|
||||
etc2_uint32 encodedWidth = readBEUint16(pHeader + ETC2_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc2_uint32 format = readBEUint16(pHeader + ETC2_PKM_FORMAT_OFFSET);
|
||||
etc2_uint32 encodedWidth = readBEUint16(pHeader + ETC2_PKM_ENCODED_WIDTH_OFFSET);
|
||||
etc2_uint32 encodedHeight = readBEUint16(pHeader + ETC2_PKM_ENCODED_HEIGHT_OFFSET);
|
||||
etc2_uint32 width = readBEUint16(pHeader + ETC2_PKM_WIDTH_OFFSET);
|
||||
etc2_uint32 height = readBEUint16(pHeader + ETC2_PKM_HEIGHT_OFFSET);
|
||||
etc2_uint32 width = readBEUint16(pHeader + ETC2_PKM_WIDTH_OFFSET);
|
||||
etc2_uint32 height = readBEUint16(pHeader + ETC2_PKM_HEIGHT_OFFSET);
|
||||
return (format == ETC2_RGB_NO_MIPMAPS || format == ETC2_RGBA_NO_MIPMAPS) &&
|
||||
encodedWidth >= width && encodedWidth - width < 4 &&
|
||||
encodedHeight >= height && encodedHeight - height < 4;
|
||||
|
||||
@@ -30,8 +30,8 @@
|
||||
/// @cond DO_NOT_SHOW
|
||||
|
||||
typedef unsigned char etc2_byte;
|
||||
typedef int etc2_bool;
|
||||
typedef unsigned int etc2_uint32;
|
||||
typedef int etc2_bool;
|
||||
typedef unsigned int etc2_uint32;
|
||||
|
||||
#ifndef GL_COMPRESSED_RGB8_ETC2
|
||||
#define GL_COMPRESSED_RGB8_ETC2 0x9274
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "taskflow/taskflow.hpp"
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include "taskflow/taskflow.hpp"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "tbb/global_control.h"
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include "tbb/global_control.h"
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -241,7 +241,7 @@ std::vector<StackFrame> CallStack::backtraceSymbols(const std::vector<void*>& ca
|
||||
StackFrame frame;
|
||||
PTR_DWORD address = reinterpret_cast<PTR_DWORD>(callstack[i]);
|
||||
|
||||
char moduelName[MAX_PATH];
|
||||
char moduelName[MAX_PATH];
|
||||
#if _WIN64
|
||||
PTR_DWORD moduleBase = SymGetModuleBase64(_process, address);
|
||||
#else
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <vector>
|
||||
#include "../Macros.h"
|
||||
|
||||
|
||||
namespace cc {
|
||||
|
||||
#define MAX_STACK_FRAMES 32
|
||||
|
||||
Executable → Regular
+3
-3
@@ -30,7 +30,7 @@
|
||||
#include "MemTracker.h"
|
||||
#include "StlAlloc.h"
|
||||
#if (CC_PLATFORM == CC_PLATFORM_MAC_IOS)
|
||||
#include <Availability.h>
|
||||
#include <Availability.h>
|
||||
#endif
|
||||
|
||||
// Global Interface Definitions
|
||||
@@ -150,7 +150,7 @@ inline void operator delete(void *ptr) throw() { free(ptr); }
|
||||
#endif
|
||||
|
||||
#if (CC_PLATFORM == CC_PLATFORM_MAC_IOS) && (__IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_11_0)
|
||||
#define ALIGNAS(x)
|
||||
#define ALIGNAS(x)
|
||||
#else
|
||||
#define ALIGNAS(x) alignas(x)
|
||||
#define ALIGNAS(x) alignas(x)
|
||||
#endif
|
||||
|
||||
@@ -270,9 +270,9 @@ void MemoryHook::unRegisterAll() {
|
||||
g_new_hooker = nullptr;
|
||||
g_delete_hooker = nullptr;
|
||||
#elif CC_PLATFORM == CC_PLATFORM_MAC_IOS || CC_PLATFORM == CC_PLATFORM_MAC_OSX
|
||||
malloc_logger = g_system_malloc_logger;
|
||||
g_new_hooker = nullptr;
|
||||
g_delete_hooker = nullptr;
|
||||
malloc_logger = g_system_malloc_logger;
|
||||
g_new_hooker = nullptr;
|
||||
g_delete_hooker = nullptr;
|
||||
#elif CC_PLATFORM == CC_PLATFORM_WINDOWS
|
||||
MallocHook_RemoveNewHook(&newHook);
|
||||
MallocHook_RemoveDeleteHook(&deleteHook);
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
||||
typedef void* (*MallocType)(size_t size);
|
||||
typedef void (*FreeType)(void* ptr);
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
namespace cc {
|
||||
|
||||
AutoReleasePool::AutoReleasePool() = default;
|
||||
AutoReleasePool::AutoReleasePool() = default;
|
||||
AutoReleasePool::~AutoReleasePool() = default;
|
||||
|
||||
void AutoReleasePool::drain() {
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <condition_variable>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
#include <thread>
|
||||
#include <functional>
|
||||
|
||||
namespace cc {
|
||||
|
||||
@@ -36,7 +36,7 @@ class ConditionVariable final {
|
||||
public:
|
||||
void wait() noexcept;
|
||||
template <typename Function, typename... Args>
|
||||
void wait(Function func, Args &&... args) noexcept;
|
||||
void wait(Function func, Args &&...args) noexcept;
|
||||
void signal() noexcept;
|
||||
void signalAll() noexcept;
|
||||
|
||||
@@ -47,7 +47,7 @@ private:
|
||||
|
||||
// DO NOT MANIPULATE ANY SYCHRONIZATION PRIMITIVES INSIDE THE CALLBACK
|
||||
template <typename Function, typename... Args>
|
||||
void ConditionVariable::wait(Function func, Args &&... args) noexcept {
|
||||
void ConditionVariable::wait(Function func, Args &&...args) noexcept {
|
||||
std::unique_lock<std::mutex> lock(_mutex);
|
||||
_condVar.wait(lock, std::bind(std::forward<Function>(func), std::forward<Args>(args)...));
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
#include "base/Macros.h"
|
||||
// clang-format on
|
||||
|
||||
#include <functional>
|
||||
#include <uv.h>
|
||||
#include <functional>
|
||||
|
||||
namespace cc {
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "base/Macros.h"
|
||||
#include "concurrentqueue/concurrentqueue.h"
|
||||
#include "concurrentqueue/lightweightsemaphore.h"
|
||||
#include "base/Macros.h"
|
||||
namespace cc {
|
||||
|
||||
class Semaphore final {
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace cc {
|
||||
|
||||
ThreadSafeLinearAllocator::ThreadSafeLinearAllocator(size_t size, size_t alignment) noexcept
|
||||
: _capacity(size), _alignment(alignment) {
|
||||
if(alignment == 1) {
|
||||
if (alignment == 1) {
|
||||
_buffer = _CC_MALLOC(size);
|
||||
} else {
|
||||
_buffer = _CC_MALLOC_ALIGN(size, alignment);
|
||||
@@ -40,7 +40,7 @@ ThreadSafeLinearAllocator::ThreadSafeLinearAllocator(size_t size, size_t alignme
|
||||
}
|
||||
|
||||
ThreadSafeLinearAllocator::~ThreadSafeLinearAllocator() {
|
||||
if(_alignment == 1) {
|
||||
if (_alignment == 1) {
|
||||
_CC_FREE(_buffer);
|
||||
} else {
|
||||
_CC_FREE_ALIGN(_buffer);
|
||||
|
||||
@@ -25,19 +25,19 @@
|
||||
|
||||
#include "cocos/bindings/auto/jsb_audio_auto.h"
|
||||
#if (USE_AUDIO > 0)
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "audio/include/AudioEngine.h"
|
||||
#include "audio/include/AudioEngine.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_AudioProfile_proto = nullptr;
|
||||
se::Class* __jsb_cc_AudioProfile_class = nullptr;
|
||||
se::Class* __jsb_cc_AudioProfile_class = nullptr;
|
||||
|
||||
static bool js_audio_AudioProfile_get_name(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
@@ -45,7 +45,7 @@ static bool js_audio_AudioProfile_get_name(se::State& s) // NOLINT(readability-i
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_get_name : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->name, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->name, s.thisObject(), s.rval());
|
||||
@@ -56,7 +56,7 @@ SE_BIND_PROP_GET(js_audio_AudioProfile_get_name)
|
||||
static bool js_audio_AudioProfile_set_name(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_set_name : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -72,7 +72,7 @@ static bool js_audio_AudioProfile_get_maxInstances(se::State& s) // NOLINT(reada
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_get_maxInstances : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->maxInstances, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->maxInstances, s.thisObject(), s.rval());
|
||||
@@ -83,7 +83,7 @@ SE_BIND_PROP_GET(js_audio_AudioProfile_get_maxInstances)
|
||||
static bool js_audio_AudioProfile_set_maxInstances(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_set_maxInstances : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -99,7 +99,7 @@ static bool js_audio_AudioProfile_get_minDelay(se::State& s) // NOLINT(readabili
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_get_minDelay : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->minDelay, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->minDelay, s.thisObject(), s.rval());
|
||||
@@ -110,7 +110,7 @@ SE_BIND_PROP_GET(js_audio_AudioProfile_get_minDelay)
|
||||
static bool js_audio_AudioProfile_set_minDelay(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_audio_AudioProfile_set_minDelay : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -131,13 +131,10 @@ static bool js_audio_AudioProfile_constructor(se::State& s) // NOLINT(readabilit
|
||||
}
|
||||
SE_BIND_CTOR(js_audio_AudioProfile_constructor, __jsb_cc_AudioProfile_class, js_cc_AudioProfile_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_AudioProfile_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(SE_THIS_OBJECT<cc::AudioProfile>(s));
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end())
|
||||
{
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
se::NonRefNativePtrCreatedByCtorMap::erase(iter);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::AudioProfile>(s);
|
||||
JSB_FREE(cobj);
|
||||
@@ -164,13 +161,13 @@ bool js_register_audio_AudioProfile(se::Object* obj) // NOLINT(readability-ident
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_AudioEngine_proto = nullptr;
|
||||
se::Class* __jsb_cc_AudioEngine_class = nullptr;
|
||||
se::Class* __jsb_cc_AudioEngine_class = nullptr;
|
||||
|
||||
static bool js_audio_AudioEngine_lazyInit(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cc::AudioEngine::lazyInit();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -186,7 +183,7 @@ SE_BIND_FUNC(js_audio_AudioEngine_lazyInit)
|
||||
static bool js_audio_AudioEngine_end(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::AudioEngine::end();
|
||||
return true;
|
||||
@@ -198,9 +195,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_end)
|
||||
|
||||
static bool js_audio_AudioEngine_getDefaultProfile(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::AudioProfile* result = cc::AudioEngine::getDefaultProfile();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -215,9 +212,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getDefaultProfile)
|
||||
|
||||
static bool js_audio_AudioEngine_play2d(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -230,7 +227,7 @@ static bool js_audio_AudioEngine_play2d(se::State& s) // NOLINT(readability-iden
|
||||
}
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
SE_PRECONDITION2(ok, false, "js_audio_AudioEngine_play2d : Error processing arguments");
|
||||
@@ -242,8 +239,8 @@ static bool js_audio_AudioEngine_play2d(se::State& s) // NOLINT(readability-iden
|
||||
}
|
||||
if (argc == 3) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
HolderType<float, false> arg2 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
HolderType<float, false> arg2 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
ok &= sevalue_to_native(args[2], &arg2, nullptr);
|
||||
@@ -255,9 +252,9 @@ static bool js_audio_AudioEngine_play2d(se::State& s) // NOLINT(readability-iden
|
||||
return true;
|
||||
}
|
||||
if (argc == 4) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
HolderType<float, false> arg2 = {};
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
HolderType<float, false> arg2 = {};
|
||||
HolderType<const cc::AudioProfile*, false> arg3 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
@@ -277,11 +274,11 @@ SE_BIND_FUNC(js_audio_AudioEngine_play2d)
|
||||
|
||||
static bool js_audio_AudioEngine_setLoop(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<bool, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
@@ -296,9 +293,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setLoop)
|
||||
|
||||
static bool js_audio_AudioEngine_isLoop(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -316,11 +313,11 @@ SE_BIND_FUNC(js_audio_AudioEngine_isLoop)
|
||||
|
||||
static bool js_audio_AudioEngine_setVolume(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<float, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
@@ -335,9 +332,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setVolume)
|
||||
|
||||
static bool js_audio_AudioEngine_getVolume(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -355,9 +352,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getVolume)
|
||||
|
||||
static bool js_audio_AudioEngine_pause(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -373,7 +370,7 @@ SE_BIND_FUNC(js_audio_AudioEngine_pause)
|
||||
static bool js_audio_AudioEngine_pauseAll(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::AudioEngine::pauseAll();
|
||||
return true;
|
||||
@@ -385,9 +382,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_pauseAll)
|
||||
|
||||
static bool js_audio_AudioEngine_resume(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -403,7 +400,7 @@ SE_BIND_FUNC(js_audio_AudioEngine_resume)
|
||||
static bool js_audio_AudioEngine_resumeAll(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::AudioEngine::resumeAll();
|
||||
return true;
|
||||
@@ -415,9 +412,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_resumeAll)
|
||||
|
||||
static bool js_audio_AudioEngine_stop(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -433,7 +430,7 @@ SE_BIND_FUNC(js_audio_AudioEngine_stop)
|
||||
static bool js_audio_AudioEngine_stopAll(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::AudioEngine::stopAll();
|
||||
return true;
|
||||
@@ -445,11 +442,11 @@ SE_BIND_FUNC(js_audio_AudioEngine_stopAll)
|
||||
|
||||
static bool js_audio_AudioEngine_setCurrentTime(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<float, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
ok &= sevalue_to_native(args[1], &arg1, nullptr);
|
||||
@@ -467,9 +464,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setCurrentTime)
|
||||
|
||||
static bool js_audio_AudioEngine_getCurrentTime(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -487,9 +484,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getCurrentTime)
|
||||
|
||||
static bool js_audio_AudioEngine_getDuration(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -507,9 +504,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getDuration)
|
||||
|
||||
static bool js_audio_AudioEngine_getDurationFromFile(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -527,9 +524,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getDurationFromFile)
|
||||
|
||||
static bool js_audio_AudioEngine_getState(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -547,16 +544,15 @@ SE_BIND_FUNC(js_audio_AudioEngine_getState)
|
||||
|
||||
static bool js_audio_AudioEngine_setFinishCallback(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<std::function<void (int, const std::string)>, true> arg1 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<std::function<void(int, const std::string)>, true> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
do {
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction())
|
||||
{
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[1]);
|
||||
jsFunc.toObject()->root();
|
||||
@@ -569,22 +565,19 @@ static bool js_audio_AudioEngine_setFinishCallback(se::State& s) // NOLINT(reada
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg1.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg1.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_audio_AudioEngine_setFinishCallback : Error processing arguments");
|
||||
cc::AudioEngine::setFinishCallback(arg0.value(), arg1.value());
|
||||
return true;
|
||||
@@ -596,9 +589,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setFinishCallback)
|
||||
|
||||
static bool js_audio_AudioEngine_getMaxAudioInstance(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cc::AudioEngine::getMaxAudioInstance();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -613,9 +606,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getMaxAudioInstance)
|
||||
|
||||
static bool js_audio_AudioEngine_setMaxAudioInstance(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -633,9 +626,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setMaxAudioInstance)
|
||||
|
||||
static bool js_audio_AudioEngine_uncache(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -651,7 +644,7 @@ SE_BIND_FUNC(js_audio_AudioEngine_uncache)
|
||||
static bool js_audio_AudioEngine_uncacheAll(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::AudioEngine::uncacheAll();
|
||||
return true;
|
||||
@@ -663,14 +656,17 @@ SE_BIND_FUNC(js_audio_AudioEngine_uncacheAll)
|
||||
|
||||
static bool js_audio_AudioEngine_getProfile(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::AudioProfile* result = cc::AudioEngine::getProfile(arg0.value());
|
||||
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
||||
SE_PRECONDITION2(ok, false, "js_audio_AudioEngine_getProfile : Error processing arguments");
|
||||
@@ -682,7 +678,10 @@ static bool js_audio_AudioEngine_getProfile(se::State& s) // NOLINT(readability-
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::AudioProfile* result = cc::AudioEngine::getProfile(arg0.value());
|
||||
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
||||
SE_PRECONDITION2(ok, false, "js_audio_AudioEngine_getProfile : Error processing arguments");
|
||||
@@ -697,18 +696,20 @@ SE_BIND_FUNC(js_audio_AudioEngine_getProfile)
|
||||
|
||||
static bool js_audio_AudioEngine_preload(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
HolderType<std::function<void (bool)>, true> arg1 = {};
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
HolderType<std::function<void(bool)>, true> arg1 = {};
|
||||
do {
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction())
|
||||
{
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[1]);
|
||||
jsFunc.toObject()->root();
|
||||
@@ -720,23 +721,23 @@ static bool js_audio_AudioEngine_preload(se::State& s) // NOLINT(readability-ide
|
||||
se::ValueArray args;
|
||||
args.resize(1);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg1.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg1.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
if (!ok) { ok = true; break; }
|
||||
} while (false);
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::AudioEngine::preload(arg0.value(), arg1.value());
|
||||
return true;
|
||||
}
|
||||
@@ -745,7 +746,10 @@ static bool js_audio_AudioEngine_preload(se::State& s) // NOLINT(readability-ide
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::AudioEngine::preload(arg0.value());
|
||||
return true;
|
||||
}
|
||||
@@ -757,9 +761,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_preload)
|
||||
|
||||
static bool js_audio_AudioEngine_getPlayingAudioCount(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cc::AudioEngine::getPlayingAudioCount();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -774,9 +778,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_getPlayingAudioCount)
|
||||
|
||||
static bool js_audio_AudioEngine_setEnabled(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, nullptr);
|
||||
@@ -791,9 +795,9 @@ SE_BIND_FUNC(js_audio_AudioEngine_setEnabled)
|
||||
|
||||
static bool js_audio_AudioEngine_isEnabled(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cc::AudioEngine::isEnabled();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -806,8 +810,6 @@ static bool js_audio_AudioEngine_isEnabled(se::State& s) // NOLINT(readability-i
|
||||
}
|
||||
SE_BIND_FUNC(js_audio_AudioEngine_isEnabled)
|
||||
|
||||
|
||||
|
||||
bool js_register_audio_AudioEngine(se::Object* obj) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cls = se::Class::create("AudioEngine", obj, nullptr, nullptr);
|
||||
@@ -850,12 +852,10 @@ bool js_register_audio_AudioEngine(se::Object* obj) // NOLINT(readability-identi
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_audio(se::Object* obj)
|
||||
{
|
||||
bool register_all_audio(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("jsb", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("jsb", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("jsb", nsVal);
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#if (USE_AUDIO > 0)
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/audio/include/AudioEngine.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/audio/include/AudioEngine.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
|
||||
extern se::Object* __jsb_cc_AudioProfile_proto;
|
||||
extern se::Class* __jsb_cc_AudioProfile_class;
|
||||
extern se::Class* __jsb_cc_AudioProfile_class;
|
||||
|
||||
bool js_register_cc_AudioProfile(se::Object* obj);
|
||||
bool register_all_audio(se::Object* obj);
|
||||
@@ -41,7 +41,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::AudioProfile);
|
||||
SE_DECLARE_FUNC(js_audio_AudioProfile_AudioProfile);
|
||||
|
||||
extern se::Object* __jsb_cc_AudioEngine_proto;
|
||||
extern se::Class* __jsb_cc_AudioEngine_class;
|
||||
extern se::Class* __jsb_cc_AudioEngine_class;
|
||||
|
||||
bool js_register_cc_AudioEngine(se::Object* obj);
|
||||
bool register_all_audio(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,18 +24,18 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/event/EventDispatcher.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/platform/FileUtils.h"
|
||||
#include "cocos/bindings/event/EventDispatcher.h"
|
||||
#include "cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h"
|
||||
#include "cocos/platform/interfaces/modules/Device.h"
|
||||
#include "cocos/platform/SAXParser.h"
|
||||
#include "cocos/platform/interfaces/modules/Device.h"
|
||||
#include "cocos/platform/interfaces/modules/canvas/CanvasRenderingContext2D.h"
|
||||
|
||||
extern se::Object* __jsb_cc_FileUtils_proto;
|
||||
extern se::Class* __jsb_cc_FileUtils_class;
|
||||
extern se::Class* __jsb_cc_FileUtils_class;
|
||||
|
||||
bool js_register_cc_FileUtils(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -79,7 +79,7 @@ SE_DECLARE_FUNC(js_engine_FileUtils_normalizePath);
|
||||
SE_DECLARE_FUNC(js_engine_FileUtils_getFileDir);
|
||||
|
||||
extern se::Object* __jsb_cc_OSInterface_proto;
|
||||
extern se::Class* __jsb_cc_OSInterface_class;
|
||||
extern se::Class* __jsb_cc_OSInterface_class;
|
||||
|
||||
bool js_register_cc_OSInterface(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -87,7 +87,7 @@ bool register_all_engine(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::OSInterface);
|
||||
|
||||
extern se::Object* __jsb_cc_ICanvasGradient_proto;
|
||||
extern se::Class* __jsb_cc_ICanvasGradient_class;
|
||||
extern se::Class* __jsb_cc_ICanvasGradient_class;
|
||||
|
||||
bool js_register_cc_ICanvasGradient(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -96,7 +96,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::ICanvasGradient);
|
||||
SE_DECLARE_FUNC(js_engine_ICanvasGradient_addColorStop);
|
||||
|
||||
extern se::Object* __jsb_cc_ICanvasRenderingContext2D_proto;
|
||||
extern se::Class* __jsb_cc_ICanvasRenderingContext2D_class;
|
||||
extern se::Class* __jsb_cc_ICanvasRenderingContext2D_class;
|
||||
|
||||
bool js_register_cc_ICanvasRenderingContext2D(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -126,7 +126,7 @@ SE_DECLARE_FUNC(js_engine_ICanvasRenderingContext2D_transform);
|
||||
SE_DECLARE_FUNC(js_engine_ICanvasRenderingContext2D_translate);
|
||||
|
||||
extern se::Object* __jsb_cc_CanvasGradient_proto;
|
||||
extern se::Class* __jsb_cc_CanvasGradient_class;
|
||||
extern se::Class* __jsb_cc_CanvasGradient_class;
|
||||
|
||||
bool js_register_cc_CanvasGradient(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -135,7 +135,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::CanvasGradient);
|
||||
SE_DECLARE_FUNC(js_engine_CanvasGradient_CanvasGradient);
|
||||
|
||||
extern se::Object* __jsb_cc_CanvasRenderingContext2D_proto;
|
||||
extern se::Class* __jsb_cc_CanvasRenderingContext2D_class;
|
||||
extern se::Class* __jsb_cc_CanvasRenderingContext2D_class;
|
||||
|
||||
bool js_register_cc_CanvasRenderingContext2D(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -144,7 +144,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::CanvasRenderingContext2D);
|
||||
SE_DECLARE_FUNC(js_engine_CanvasRenderingContext2D_CanvasRenderingContext2D);
|
||||
|
||||
extern se::Object* __jsb_cc_Device_proto;
|
||||
extern se::Class* __jsb_cc_Device_class;
|
||||
extern se::Class* __jsb_cc_Device_class;
|
||||
|
||||
bool js_register_cc_Device(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
@@ -163,7 +163,7 @@ SE_DECLARE_FUNC(js_engine_Device_getNetworkType);
|
||||
SE_DECLARE_FUNC(js_engine_Device_getSafeAreaEdge);
|
||||
|
||||
extern se::Object* __jsb_cc_SAXParser_proto;
|
||||
extern se::Class* __jsb_cc_SAXParser_class;
|
||||
extern se::Class* __jsb_cc_SAXParser_class;
|
||||
|
||||
bool js_register_cc_SAXParser(se::Object* obj);
|
||||
bool register_all_engine(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -26,13 +26,13 @@
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#if USE_DRAGONBONES > 0
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/editor-support/dragonbones-creator-support/CCDragonBonesHeaders.h"
|
||||
|
||||
extern se::Object* __jsb_dragonBones_BaseObject_proto;
|
||||
extern se::Class* __jsb_dragonBones_BaseObject_class;
|
||||
extern se::Class* __jsb_dragonBones_BaseObject_class;
|
||||
|
||||
bool js_register_dragonBones_BaseObject(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -43,7 +43,7 @@ SE_DECLARE_FUNC(js_dragonbones_BaseObject_setMaxCount);
|
||||
SE_DECLARE_FUNC(js_dragonbones_BaseObject_clearPool);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Rectangle_proto;
|
||||
extern se::Class* __jsb_dragonBones_Rectangle_class;
|
||||
extern se::Class* __jsb_dragonBones_Rectangle_class;
|
||||
|
||||
bool js_register_dragonBones_Rectangle(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -53,7 +53,7 @@ SE_DECLARE_FUNC(js_dragonbones_Rectangle_clear);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Rectangle_Rectangle);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Matrix_proto;
|
||||
extern se::Class* __jsb_dragonBones_Matrix_class;
|
||||
extern se::Class* __jsb_dragonBones_Matrix_class;
|
||||
|
||||
bool js_register_dragonBones_Matrix(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -61,7 +61,7 @@ bool register_all_dragonbones(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(dragonBones::Matrix);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Transform_proto;
|
||||
extern se::Class* __jsb_dragonBones_Transform_class;
|
||||
extern se::Class* __jsb_dragonBones_Transform_class;
|
||||
|
||||
bool js_register_dragonBones_Transform(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -70,7 +70,7 @@ JSB_REGISTER_OBJECT_TYPE(dragonBones::Transform);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Transform_normalizeRadian);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_TextureAtlasData_proto;
|
||||
extern se::Class* __jsb_dragonBones_TextureAtlasData_class;
|
||||
extern se::Class* __jsb_dragonBones_TextureAtlasData_class;
|
||||
|
||||
bool js_register_dragonBones_TextureAtlasData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -81,7 +81,7 @@ SE_DECLARE_FUNC(js_dragonbones_TextureAtlasData_createTexture);
|
||||
SE_DECLARE_FUNC(js_dragonbones_TextureAtlasData_getTexture);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_TextureData_proto;
|
||||
extern se::Class* __jsb_dragonBones_TextureData_class;
|
||||
extern se::Class* __jsb_dragonBones_TextureData_class;
|
||||
|
||||
bool js_register_dragonBones_TextureData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -95,7 +95,7 @@ SE_DECLARE_FUNC(js_dragonbones_TextureData_setParent);
|
||||
SE_DECLARE_FUNC(js_dragonbones_TextureData_createRectangle);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_ArmatureData_proto;
|
||||
extern se::Class* __jsb_dragonBones_ArmatureData_class;
|
||||
extern se::Class* __jsb_dragonBones_ArmatureData_class;
|
||||
|
||||
bool js_register_dragonBones_ArmatureData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -119,7 +119,7 @@ SE_DECLARE_FUNC(js_dragonbones_ArmatureData_setType);
|
||||
SE_DECLARE_FUNC(js_dragonbones_ArmatureData_sortBones);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_BoneData_proto;
|
||||
extern se::Class* __jsb_dragonBones_BoneData_class;
|
||||
extern se::Class* __jsb_dragonBones_BoneData_class;
|
||||
|
||||
bool js_register_dragonBones_BoneData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -130,7 +130,7 @@ SE_DECLARE_FUNC(js_dragonbones_BoneData_getTransfrom);
|
||||
SE_DECLARE_FUNC(js_dragonbones_BoneData_setParent);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_SlotData_proto;
|
||||
extern se::Class* __jsb_dragonBones_SlotData_class;
|
||||
extern se::Class* __jsb_dragonBones_SlotData_class;
|
||||
|
||||
bool js_register_dragonBones_SlotData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -142,7 +142,7 @@ SE_DECLARE_FUNC(js_dragonbones_SlotData_setBlendMode);
|
||||
SE_DECLARE_FUNC(js_dragonbones_SlotData_setParent);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_DragonBonesData_proto;
|
||||
extern se::Class* __jsb_dragonBones_DragonBonesData_class;
|
||||
extern se::Class* __jsb_dragonBones_DragonBonesData_class;
|
||||
|
||||
bool js_register_dragonBones_DragonBonesData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -154,7 +154,7 @@ SE_DECLARE_FUNC(js_dragonbones_DragonBonesData_getArmatureNames);
|
||||
SE_DECLARE_FUNC(js_dragonbones_DragonBonesData_getFrameIndices);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_SkinData_proto;
|
||||
extern se::Class* __jsb_dragonBones_SkinData_class;
|
||||
extern se::Class* __jsb_dragonBones_SkinData_class;
|
||||
|
||||
bool js_register_dragonBones_SkinData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -162,7 +162,7 @@ bool register_all_dragonbones(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(dragonBones::SkinData);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_AnimationData_proto;
|
||||
extern se::Class* __jsb_dragonBones_AnimationData_class;
|
||||
extern se::Class* __jsb_dragonBones_AnimationData_class;
|
||||
|
||||
bool js_register_dragonBones_AnimationData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -175,7 +175,7 @@ SE_DECLARE_FUNC(js_dragonbones_AnimationData_getZOrderTimeline);
|
||||
SE_DECLARE_FUNC(js_dragonbones_AnimationData_setParent);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Armature_proto;
|
||||
extern se::Class* __jsb_dragonBones_Armature_class;
|
||||
extern se::Class* __jsb_dragonBones_Armature_class;
|
||||
|
||||
bool js_register_dragonBones_Armature(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -207,7 +207,7 @@ SE_DECLARE_FUNC(js_dragonbones_Armature_setFlipX);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Armature_setFlipY);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_TransformObject_proto;
|
||||
extern se::Class* __jsb_dragonBones_TransformObject_class;
|
||||
extern se::Class* __jsb_dragonBones_TransformObject_class;
|
||||
|
||||
bool js_register_dragonBones_TransformObject(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -221,7 +221,7 @@ SE_DECLARE_FUNC(js_dragonbones_TransformObject_getOrigin);
|
||||
SE_DECLARE_FUNC(js_dragonbones_TransformObject_updateGlobalTransform);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_AnimationState_proto;
|
||||
extern se::Class* __jsb_dragonBones_AnimationState_class;
|
||||
extern se::Class* __jsb_dragonBones_AnimationState_class;
|
||||
|
||||
bool js_register_dragonBones_AnimationState(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -248,7 +248,7 @@ SE_DECLARE_FUNC(js_dragonbones_AnimationState_setCurrentTime);
|
||||
SE_DECLARE_FUNC(js_dragonbones_AnimationState_stop);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Bone_proto;
|
||||
extern se::Class* __jsb_dragonBones_Bone_class;
|
||||
extern se::Class* __jsb_dragonBones_Bone_class;
|
||||
|
||||
bool js_register_dragonBones_Bone(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -268,7 +268,7 @@ SE_DECLARE_FUNC(js_dragonbones_Bone_update);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Bone_updateByConstraint);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Slot_proto;
|
||||
extern se::Class* __jsb_dragonBones_Slot_class;
|
||||
extern se::Class* __jsb_dragonBones_Slot_class;
|
||||
|
||||
bool js_register_dragonBones_Slot(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -290,7 +290,7 @@ SE_DECLARE_FUNC(js_dragonbones_Slot_update);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Slot_updateTransformAndMatrix);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_WorldClock_proto;
|
||||
extern se::Class* __jsb_dragonBones_WorldClock_class;
|
||||
extern se::Class* __jsb_dragonBones_WorldClock_class;
|
||||
|
||||
bool js_register_dragonBones_WorldClock(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -304,7 +304,7 @@ SE_DECLARE_FUNC(js_dragonbones_WorldClock_setClock);
|
||||
SE_DECLARE_FUNC(js_dragonbones_WorldClock_getStaticClock);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_Animation_proto;
|
||||
extern se::Class* __jsb_dragonBones_Animation_class;
|
||||
extern se::Class* __jsb_dragonBones_Animation_class;
|
||||
|
||||
bool js_register_dragonBones_Animation(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -331,7 +331,7 @@ SE_DECLARE_FUNC(js_dragonbones_Animation_reset);
|
||||
SE_DECLARE_FUNC(js_dragonbones_Animation_stop);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_EventObject_proto;
|
||||
extern se::Class* __jsb_dragonBones_EventObject_class;
|
||||
extern se::Class* __jsb_dragonBones_EventObject_class;
|
||||
|
||||
bool js_register_dragonBones_EventObject(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -343,7 +343,7 @@ SE_DECLARE_FUNC(js_dragonbones_EventObject_getBone);
|
||||
SE_DECLARE_FUNC(js_dragonbones_EventObject_getSlot);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_BaseFactory_proto;
|
||||
extern se::Class* __jsb_dragonBones_BaseFactory_class;
|
||||
extern se::Class* __jsb_dragonBones_BaseFactory_class;
|
||||
|
||||
bool js_register_dragonBones_BaseFactory(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -365,7 +365,7 @@ SE_DECLARE_FUNC(js_dragonbones_BaseFactory_replaceSkin);
|
||||
SE_DECLARE_FUNC(js_dragonbones_BaseFactory_replaceSlotDisplay);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCSlot_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCSlot_class;
|
||||
extern se::Class* __jsb_dragonBones_CCSlot_class;
|
||||
|
||||
bool js_register_dragonBones_CCSlot(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -374,7 +374,7 @@ JSB_REGISTER_OBJECT_TYPE(dragonBones::CCSlot);
|
||||
SE_DECLARE_FUNC(js_dragonbones_CCSlot_updateWorldMatrix);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCArmatureDisplay_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCArmatureDisplay_class;
|
||||
extern se::Class* __jsb_dragonBones_CCArmatureDisplay_class;
|
||||
|
||||
bool js_register_dragonBones_CCArmatureDisplay(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -406,7 +406,7 @@ SE_DECLARE_FUNC(js_dragonbones_CCArmatureDisplay_create);
|
||||
SE_DECLARE_FUNC(js_dragonbones_CCArmatureDisplay_CCArmatureDisplay);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_ArmatureCacheMgr_proto;
|
||||
extern se::Class* __jsb_dragonBones_ArmatureCacheMgr_class;
|
||||
extern se::Class* __jsb_dragonBones_ArmatureCacheMgr_class;
|
||||
|
||||
bool js_register_dragonBones_ArmatureCacheMgr(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -418,7 +418,7 @@ SE_DECLARE_FUNC(js_dragonbones_ArmatureCacheMgr_getInstance);
|
||||
SE_DECLARE_FUNC(js_dragonbones_ArmatureCacheMgr_destroyInstance);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCArmatureCacheDisplay_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCArmatureCacheDisplay_class;
|
||||
extern se::Class* __jsb_dragonBones_CCArmatureCacheDisplay_class;
|
||||
|
||||
bool js_register_dragonBones_CCArmatureCacheDisplay(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -451,7 +451,7 @@ SE_DECLARE_FUNC(js_dragonbones_CCArmatureCacheDisplay_updateAnimationCache);
|
||||
SE_DECLARE_FUNC(js_dragonbones_CCArmatureCacheDisplay_CCArmatureCacheDisplay);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCFactory_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCFactory_class;
|
||||
extern se::Class* __jsb_dragonBones_CCFactory_class;
|
||||
|
||||
bool js_register_dragonBones_CCFactory(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -478,7 +478,7 @@ SE_DECLARE_FUNC(js_dragonbones_CCFactory_getClock);
|
||||
SE_DECLARE_FUNC(js_dragonbones_CCFactory_CCFactory);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCTextureAtlasData_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCTextureAtlasData_class;
|
||||
extern se::Class* __jsb_dragonBones_CCTextureAtlasData_class;
|
||||
|
||||
bool js_register_dragonBones_CCTextureAtlasData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
@@ -486,7 +486,7 @@ bool register_all_dragonbones(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(dragonBones::CCTextureAtlasData);
|
||||
|
||||
extern se::Object* __jsb_dragonBones_CCTextureData_proto;
|
||||
extern se::Class* __jsb_dragonBones_CCTextureData_class;
|
||||
extern se::Class* __jsb_dragonBones_CCTextureData_class;
|
||||
|
||||
bool js_register_dragonBones_CCTextureData(se::Object* obj);
|
||||
bool register_all_dragonbones(se::Object* obj);
|
||||
|
||||
@@ -26,27 +26,27 @@
|
||||
#include "cocos/bindings/auto/jsb_editor_support_auto.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "editor-support/middleware-adapter.h"
|
||||
#include "editor-support/MiddlewareManager.h"
|
||||
#include "editor-support/SharedBufferManager.h"
|
||||
#include "editor-support/middleware-adapter.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_middleware_Texture2D_proto = nullptr;
|
||||
se::Class* __jsb_cc_middleware_Texture2D_class = nullptr;
|
||||
se::Class* __jsb_cc_middleware_Texture2D_class = nullptr;
|
||||
|
||||
static bool js_editor_support_Texture2D_getPixelsHigh(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_getPixelsHigh : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getPixelsHigh();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -63,9 +63,9 @@ static bool js_editor_support_Texture2D_getPixelsWide(se::State& s) // NOLINT(re
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_getPixelsWide : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getPixelsWide();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -82,9 +82,9 @@ static bool js_editor_support_Texture2D_getRealTextureIndex(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_getRealTextureIndex : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getRealTextureIndex();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -101,9 +101,9 @@ static bool js_editor_support_Texture2D_setPixelsHigh(se::State& s) // NOLINT(re
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_setPixelsHigh : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -120,9 +120,9 @@ static bool js_editor_support_Texture2D_setPixelsWide(se::State& s) // NOLINT(re
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_setPixelsWide : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -139,9 +139,9 @@ static bool js_editor_support_Texture2D_setRealTextureIndex(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_setRealTextureIndex : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -158,14 +158,13 @@ static bool js_editor_support_Texture2D_setTexParamCallback(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_Texture2D_setTexParamCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (int, unsigned int, unsigned int, unsigned int, unsigned int)>, true> arg0 = {};
|
||||
HolderType<std::function<void(int, unsigned int, unsigned int, unsigned int, unsigned int)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -181,22 +180,19 @@ static bool js_editor_support_Texture2D_setTexParamCallback(se::State& s) // NOL
|
||||
ok &= nativevalue_to_se(larg2, args[2], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg3, args[3], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg4, args[4], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_editor_support_Texture2D_setTexParamCallback : Error processing arguments");
|
||||
cobj->setTexParamCallback(arg0.value());
|
||||
return true;
|
||||
@@ -216,11 +212,9 @@ static bool js_editor_support_Texture2D_constructor(se::State& s) // NOLINT(read
|
||||
}
|
||||
SE_BIND_CTOR(js_editor_support_Texture2D_constructor, __jsb_cc_middleware_Texture2D_class, js_cc_middleware_Texture2D_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_middleware_Texture2D_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj =SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::Texture2D>(s);
|
||||
cobj->release();
|
||||
return true;
|
||||
}
|
||||
@@ -248,15 +242,15 @@ bool js_register_editor_support_Texture2D(se::Object* obj) // NOLINT(readability
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_middleware_SharedBufferManager_proto = nullptr;
|
||||
se::Class* __jsb_cc_middleware_SharedBufferManager_class = nullptr;
|
||||
se::Class* __jsb_cc_middleware_SharedBufferManager_class = nullptr;
|
||||
|
||||
static bool js_editor_support_SharedBufferManager_getSharedBuffer(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::SharedBufferManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_SharedBufferManager_getSharedBuffer : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
se::Object* result = cobj->getSharedBuffer();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -273,14 +267,13 @@ static bool js_editor_support_SharedBufferManager_setResizeCallback(se::State& s
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::SharedBufferManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_SharedBufferManager_setResizeCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void ()>, false> arg0 = {};
|
||||
HolderType<std::function<void()>, false> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -288,22 +281,19 @@ static bool js_editor_support_SharedBufferManager_setResizeCallback(se::State& s
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
se::AutoHandleScope hs;
|
||||
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(se::EmptyValueArray, thisObj, &rval);
|
||||
bool succeed = funcObj->call(se::EmptyValueArray, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_editor_support_SharedBufferManager_setResizeCallback : Error processing arguments");
|
||||
cobj->setResizeCallback(arg0.value());
|
||||
return true;
|
||||
@@ -317,8 +307,8 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_middleware_SharedBufferManager_finalize)
|
||||
|
||||
static bool js_editor_support_SharedBufferManager_constructor(se::State& s) // NOLINT(readability-identifier-naming) constructor.c
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
se::Object::TypedArrayType arg0;
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
SE_PRECONDITION2(ok, false, "js_editor_support_SharedBufferManager_constructor : Error processing arguments");
|
||||
@@ -329,13 +319,10 @@ static bool js_editor_support_SharedBufferManager_constructor(se::State& s) // N
|
||||
}
|
||||
SE_BIND_CTOR(js_editor_support_SharedBufferManager_constructor, __jsb_cc_middleware_SharedBufferManager_class, js_cc_middleware_SharedBufferManager_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_middleware_SharedBufferManager_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(SE_THIS_OBJECT<cc::middleware::SharedBufferManager>(s));
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end())
|
||||
{
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
se::NonRefNativePtrCreatedByCtorMap::erase(iter);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::SharedBufferManager>(s);
|
||||
JSB_FREE(cobj);
|
||||
@@ -361,15 +348,15 @@ bool js_register_editor_support_SharedBufferManager(se::Object* obj) // NOLINT(r
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_middleware_MiddlewareManager_proto = nullptr;
|
||||
se::Class* __jsb_cc_middleware_MiddlewareManager_class = nullptr;
|
||||
se::Class* __jsb_cc_middleware_MiddlewareManager_class = nullptr;
|
||||
|
||||
static bool js_editor_support_MiddlewareManager_getAttachInfoMgr(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getAttachInfoMgr : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::middleware::SharedBufferManager* result = cobj->getAttachInfoMgr();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -386,9 +373,9 @@ static bool js_editor_support_MiddlewareManager_getBufferCount(se::State& s) //
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getBufferCount : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -408,9 +395,9 @@ static bool js_editor_support_MiddlewareManager_getIBTypedArray(se::State& s) //
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getIBTypedArray : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg1 = {};
|
||||
@@ -432,11 +419,11 @@ static bool js_editor_support_MiddlewareManager_getIBTypedArrayLength(se::State&
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getIBTypedArrayLength : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<size_t, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
@@ -456,9 +443,9 @@ static bool js_editor_support_MiddlewareManager_getRenderInfoMgr(se::State& s) /
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getRenderInfoMgr : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::middleware::SharedBufferManager* result = cobj->getRenderInfoMgr();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -475,9 +462,9 @@ static bool js_editor_support_MiddlewareManager_getVBTypedArray(se::State& s) //
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getVBTypedArray : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg1 = {};
|
||||
@@ -499,11 +486,11 @@ static bool js_editor_support_MiddlewareManager_getVBTypedArrayLength(se::State&
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_getVBTypedArrayLength : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<int, false> arg0 = {};
|
||||
HolderType<size_t, false> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
@@ -523,9 +510,9 @@ static bool js_editor_support_MiddlewareManager_render(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_render : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<float, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -542,9 +529,9 @@ static bool js_editor_support_MiddlewareManager_update(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_editor_support_MiddlewareManager_update : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<float, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -559,9 +546,9 @@ SE_BIND_FUNC(js_editor_support_MiddlewareManager_update)
|
||||
|
||||
static bool js_editor_support_MiddlewareManager_getInstance(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::middleware::MiddlewareManager* result = cc::middleware::MiddlewareManager::getInstance();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -577,7 +564,7 @@ SE_BIND_FUNC(js_editor_support_MiddlewareManager_getInstance)
|
||||
static bool js_editor_support_MiddlewareManager_destroyInstance(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cc::middleware::MiddlewareManager::destroyInstance();
|
||||
return true;
|
||||
@@ -589,9 +576,9 @@ SE_BIND_FUNC(js_editor_support_MiddlewareManager_destroyInstance)
|
||||
|
||||
static bool js_editor_support_MiddlewareManager_generateModuleID(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
uint8_t result = cc::middleware::MiddlewareManager::generateModuleID();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -615,13 +602,10 @@ static bool js_editor_support_MiddlewareManager_constructor(se::State& s) // NOL
|
||||
}
|
||||
SE_BIND_CTOR(js_editor_support_MiddlewareManager_constructor, __jsb_cc_middleware_MiddlewareManager_class, js_cc_middleware_MiddlewareManager_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_middleware_MiddlewareManager_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s));
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end())
|
||||
{
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
se::NonRefNativePtrCreatedByCtorMap::erase(iter);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::middleware::MiddlewareManager>(s);
|
||||
JSB_FREE(cobj);
|
||||
@@ -656,12 +640,10 @@ bool js_register_editor_support_MiddlewareManager(se::Object* obj) // NOLINT(rea
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_editor_support(se::Object* obj)
|
||||
{
|
||||
bool register_all_editor_support(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("middleware", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("middleware", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("middleware", nsVal);
|
||||
|
||||
@@ -24,16 +24,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/editor-support/middleware-adapter.h"
|
||||
#include "cocos/editor-support/MiddlewareManager.h"
|
||||
#include "cocos/editor-support/SharedBufferManager.h"
|
||||
#include "cocos/editor-support/middleware-adapter.h"
|
||||
|
||||
extern se::Object* __jsb_cc_middleware_Texture2D_proto;
|
||||
extern se::Class* __jsb_cc_middleware_Texture2D_class;
|
||||
extern se::Class* __jsb_cc_middleware_Texture2D_class;
|
||||
|
||||
bool js_register_cc_middleware_Texture2D(se::Object* obj);
|
||||
bool register_all_editor_support(se::Object* obj);
|
||||
@@ -49,7 +49,7 @@ SE_DECLARE_FUNC(js_editor_support_Texture2D_setTexParamCallback);
|
||||
SE_DECLARE_FUNC(js_editor_support_Texture2D_Texture2D);
|
||||
|
||||
extern se::Object* __jsb_cc_middleware_SharedBufferManager_proto;
|
||||
extern se::Class* __jsb_cc_middleware_SharedBufferManager_class;
|
||||
extern se::Class* __jsb_cc_middleware_SharedBufferManager_class;
|
||||
|
||||
bool js_register_cc_middleware_SharedBufferManager(se::Object* obj);
|
||||
bool register_all_editor_support(se::Object* obj);
|
||||
@@ -60,7 +60,7 @@ SE_DECLARE_FUNC(js_editor_support_SharedBufferManager_setResizeCallback);
|
||||
SE_DECLARE_FUNC(js_editor_support_SharedBufferManager_SharedBufferManager);
|
||||
|
||||
extern se::Object* __jsb_cc_middleware_MiddlewareManager_proto;
|
||||
extern se::Class* __jsb_cc_middleware_MiddlewareManager_class;
|
||||
extern se::Class* __jsb_cc_middleware_MiddlewareManager_class;
|
||||
|
||||
bool js_register_cc_middleware_MiddlewareManager(se::Object* obj);
|
||||
bool register_all_editor_support(se::Object* obj);
|
||||
|
||||
@@ -29,22 +29,22 @@
|
||||
#include "extensions/cocos-ext.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_extension_EventAssetsManagerEx_proto = nullptr;
|
||||
se::Class* __jsb_cc_extension_EventAssetsManagerEx_class = nullptr;
|
||||
se::Class* __jsb_cc_extension_EventAssetsManagerEx_class = nullptr;
|
||||
|
||||
static bool js_extension_EventAssetsManagerEx_getAssetId(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getAssetId : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
std::string result = cobj->getAssetId();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -61,9 +61,9 @@ static bool js_extension_EventAssetsManagerEx_getAssetsManagerEx(se::State& s) /
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getAssetsManagerEx : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::extension::AssetsManagerEx* result = cobj->getAssetsManagerEx();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -80,9 +80,9 @@ static bool js_extension_EventAssetsManagerEx_getCURLECode(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getCURLECode : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getCURLECode();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -99,9 +99,9 @@ static bool js_extension_EventAssetsManagerEx_getCURLMCode(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getCURLMCode : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getCURLMCode();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -118,9 +118,9 @@ static bool js_extension_EventAssetsManagerEx_getDownloadedBytes(se::State& s) /
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getDownloadedBytes : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
double result = cobj->getDownloadedBytes();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -137,9 +137,9 @@ static bool js_extension_EventAssetsManagerEx_getDownloadedFiles(se::State& s) /
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getDownloadedFiles : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getDownloadedFiles();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -156,9 +156,9 @@ static bool js_extension_EventAssetsManagerEx_getEventCode(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getEventCode : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
auto result = static_cast<int>(cobj->getEventCode());
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -175,9 +175,9 @@ static bool js_extension_EventAssetsManagerEx_getMessage(se::State& s) // NOLINT
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getMessage : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
std::string result = cobj->getMessage();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -194,9 +194,9 @@ static bool js_extension_EventAssetsManagerEx_getPercent(se::State& s) // NOLINT
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getPercent : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
float result = cobj->getPercent();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -213,9 +213,9 @@ static bool js_extension_EventAssetsManagerEx_getPercentByFile(se::State& s) //
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getPercentByFile : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
float result = cobj->getPercentByFile();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -232,9 +232,9 @@ static bool js_extension_EventAssetsManagerEx_getTotalBytes(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getTotalBytes : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
double result = cobj->getTotalBytes();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -251,9 +251,9 @@ static bool js_extension_EventAssetsManagerEx_getTotalFiles(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_getTotalFiles : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getTotalFiles();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -270,9 +270,9 @@ static bool js_extension_EventAssetsManagerEx_isResuming(se::State& s) // NOLINT
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_EventAssetsManagerEx_isResuming : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isResuming();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -289,10 +289,10 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_extension_EventAssetsManagerEx_finalize)
|
||||
|
||||
static bool js_extension_EventAssetsManagerEx_constructor(se::State& s) // NOLINT(readability-identifier-naming) constructor.c
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
std::string arg0;
|
||||
cc::extension::AssetsManagerEx* arg1 = nullptr;
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
std::string arg0;
|
||||
cc::extension::AssetsManagerEx* arg1 = nullptr;
|
||||
cc::extension::EventAssetsManagerEx::EventCode arg2;
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
@@ -304,11 +304,9 @@ static bool js_extension_EventAssetsManagerEx_constructor(se::State& s) // NOLIN
|
||||
}
|
||||
SE_BIND_CTOR(js_extension_EventAssetsManagerEx_constructor, __jsb_cc_extension_EventAssetsManagerEx_class, js_cc_extension_EventAssetsManagerEx_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_extension_EventAssetsManagerEx_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj =SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::EventAssetsManagerEx>(s);
|
||||
cobj->release();
|
||||
return true;
|
||||
}
|
||||
@@ -342,15 +340,15 @@ bool js_register_extension_EventAssetsManagerEx(se::Object* obj) // NOLINT(reada
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_extension_Manifest_proto = nullptr;
|
||||
se::Class* __jsb_cc_extension_Manifest_class = nullptr;
|
||||
se::Class* __jsb_cc_extension_Manifest_class = nullptr;
|
||||
|
||||
static bool js_extension_Manifest_getManifestFileUrl(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getManifestFileUrl : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getManifestFileUrl();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -367,9 +365,9 @@ static bool js_extension_Manifest_getManifestRoot(se::State& s) // NOLINT(readab
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getManifestRoot : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getManifestRoot();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -386,9 +384,9 @@ static bool js_extension_Manifest_getPackageUrl(se::State& s) // NOLINT(readabil
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getPackageUrl : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getPackageUrl();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -405,9 +403,9 @@ static bool js_extension_Manifest_getSearchPaths(se::State& s) // NOLINT(readabi
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getSearchPaths : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
std::vector<std::string> result = cobj->getSearchPaths();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -424,9 +422,9 @@ static bool js_extension_Manifest_getVersion(se::State& s) // NOLINT(readability
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getVersion : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getVersion();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -443,9 +441,9 @@ static bool js_extension_Manifest_getVersionFileUrl(se::State& s) // NOLINT(read
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_getVersionFileUrl : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getVersionFileUrl();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -462,9 +460,9 @@ static bool js_extension_Manifest_isLoaded(se::State& s) // NOLINT(readability-i
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isLoaded : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isLoaded();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -481,9 +479,9 @@ static bool js_extension_Manifest_isUpdating(se::State& s) // NOLINT(readability
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isUpdating : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isUpdating();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -500,9 +498,9 @@ static bool js_extension_Manifest_isVersionLoaded(se::State& s) // NOLINT(readab
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_isVersionLoaded : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isVersionLoaded();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -519,9 +517,9 @@ static bool js_extension_Manifest_parseFile(se::State& s) // NOLINT(readability-
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_parseFile : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -538,9 +536,9 @@ static bool js_extension_Manifest_parseJSONString(se::State& s) // NOLINT(readab
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_parseJSONString : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
@@ -559,9 +557,9 @@ static bool js_extension_Manifest_setUpdating(se::State& s) // NOLINT(readabilit
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_Manifest_setUpdating : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -578,49 +576,56 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_extension_Manifest_finalize)
|
||||
|
||||
static bool js_extension_Manifest_constructor(se::State& s) // NOLINT(readability-identifier-naming) constructor_overloaded.c
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest, arg0.value(), arg1.value());
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
do {
|
||||
if (argc == 0) {
|
||||
cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest);
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
do {
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::extension::Manifest* cobj = JSB_ALLOC(cc::extension::Manifest, arg0.value());
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc);
|
||||
return false;
|
||||
}
|
||||
SE_BIND_CTOR(js_extension_Manifest_constructor, __jsb_cc_extension_Manifest_class, js_cc_extension_Manifest_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_extension_Manifest_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj =SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::Manifest>(s);
|
||||
cobj->release();
|
||||
return true;
|
||||
}
|
||||
@@ -653,14 +658,14 @@ bool js_register_extension_Manifest(se::Object* obj) // NOLINT(readability-ident
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_extension_AssetsManagerEx_proto = nullptr;
|
||||
se::Class* __jsb_cc_extension_AssetsManagerEx_class = nullptr;
|
||||
se::Class* __jsb_cc_extension_AssetsManagerEx_class = nullptr;
|
||||
|
||||
static bool js_extension_AssetsManagerEx_checkUpdate(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_checkUpdate : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->checkUpdate();
|
||||
return true;
|
||||
@@ -675,7 +680,7 @@ static bool js_extension_AssetsManagerEx_downloadFailedAssets(se::State& s) // N
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_downloadFailedAssets : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->downloadFailedAssets();
|
||||
return true;
|
||||
@@ -689,9 +694,9 @@ static bool js_extension_AssetsManagerEx_getDownloadedBytes(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getDownloadedBytes : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
double result = cobj->getDownloadedBytes();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -708,9 +713,9 @@ static bool js_extension_AssetsManagerEx_getDownloadedFiles(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getDownloadedFiles : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getDownloadedFiles();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -727,9 +732,9 @@ static bool js_extension_AssetsManagerEx_getLocalManifest(se::State& s) // NOLIN
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getLocalManifest : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const cc::extension::Manifest* result = cobj->getLocalManifest();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -746,9 +751,9 @@ static bool js_extension_AssetsManagerEx_getMaxConcurrentTask(se::State& s) // N
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getMaxConcurrentTask : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const int result = cobj->getMaxConcurrentTask();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -765,9 +770,9 @@ static bool js_extension_AssetsManagerEx_getRemoteManifest(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getRemoteManifest : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const cc::extension::Manifest* result = cobj->getRemoteManifest();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -784,9 +789,9 @@ static bool js_extension_AssetsManagerEx_getState(se::State& s) // NOLINT(readab
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getState : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
auto result = static_cast<int>(cobj->getState());
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -803,9 +808,9 @@ static bool js_extension_AssetsManagerEx_getStoragePath(se::State& s) // NOLINT(
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getStoragePath : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
const std::string& result = cobj->getStoragePath();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -822,9 +827,9 @@ static bool js_extension_AssetsManagerEx_getTotalBytes(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getTotalBytes : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
double result = cobj->getTotalBytes();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -841,9 +846,9 @@ static bool js_extension_AssetsManagerEx_getTotalFiles(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_getTotalFiles : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
int result = cobj->getTotalFiles();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -860,9 +865,9 @@ static bool js_extension_AssetsManagerEx_isResuming(se::State& s) // NOLINT(read
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_isResuming : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isResuming();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -877,41 +882,50 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_isResuming)
|
||||
|
||||
static bool js_extension_AssetsManagerEx_loadLocalManifest(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2( cobj, false, "js_extension_AssetsManagerEx_loadLocalManifest : Invalid Native Object");
|
||||
CC_UNUSED bool ok = true;
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_loadLocalManifest : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
bool result = cobj->loadLocalManifest(arg0.value());
|
||||
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
||||
SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_loadLocalManifest : Error processing arguments");
|
||||
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
|
||||
do {
|
||||
if (argc == 2) {
|
||||
HolderType<cc::extension::Manifest*, false> arg0 = {};
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
bool result = cobj->loadLocalManifest(arg0.value(), arg1.value());
|
||||
ok &= nativevalue_to_se(result, s.rval(), s.thisObject() /*ctx*/);
|
||||
SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_loadLocalManifest : Error processing arguments");
|
||||
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc);
|
||||
return false;
|
||||
@@ -922,9 +936,9 @@ static bool js_extension_AssetsManagerEx_loadRemoteManifest(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_loadRemoteManifest : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<cc::extension::Manifest*, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -945,7 +959,7 @@ static bool js_extension_AssetsManagerEx_prepareUpdate(se::State& s) // NOLINT(r
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_prepareUpdate : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->prepareUpdate();
|
||||
return true;
|
||||
@@ -959,14 +973,13 @@ static bool js_extension_AssetsManagerEx_setEventCallback(se::State& s) // NOLIN
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setEventCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (cc::extension::EventAssetsManagerEx *)>, true> arg0 = {};
|
||||
HolderType<std::function<void(cc::extension::EventAssetsManagerEx*)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -978,22 +991,19 @@ static bool js_extension_AssetsManagerEx_setEventCallback(se::State& s) // NOLIN
|
||||
se::ValueArray args;
|
||||
args.resize(1);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_setEventCallback : Error processing arguments");
|
||||
cobj->setEventCallback(arg0.value());
|
||||
return true;
|
||||
@@ -1007,9 +1017,9 @@ static bool js_extension_AssetsManagerEx_setMaxConcurrentTask(se::State& s) // N
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setMaxConcurrentTask : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -1026,14 +1036,13 @@ static bool js_extension_AssetsManagerEx_setVerifyCallback(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setVerifyCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<bool (const std::string, cc::extension::ManifestAsset)>, true> arg0 = {};
|
||||
HolderType<std::function<bool(const std::string, cc::extension::ManifestAsset)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -1046,10 +1055,10 @@ static bool js_extension_AssetsManagerEx_setVerifyCallback(se::State& s) // NOLI
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
@@ -1059,13 +1068,10 @@ static bool js_extension_AssetsManagerEx_setVerifyCallback(se::State& s) // NOLI
|
||||
return result;
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_setVerifyCallback : Error processing arguments");
|
||||
cobj->setVerifyCallback(arg0.value());
|
||||
return true;
|
||||
@@ -1079,14 +1085,13 @@ static bool js_extension_AssetsManagerEx_setVersionCompareHandle(se::State& s) /
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_setVersionCompareHandle : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<int (const std::string, const std::string)>, true> arg0 = {};
|
||||
HolderType<std::function<int(const std::string, const std::string)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -1099,10 +1104,10 @@ static bool js_extension_AssetsManagerEx_setVersionCompareHandle(se::State& s) /
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
@@ -1112,13 +1117,10 @@ static bool js_extension_AssetsManagerEx_setVersionCompareHandle(se::State& s) /
|
||||
return result;
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_extension_AssetsManagerEx_setVersionCompareHandle : Error processing arguments");
|
||||
cobj->setVersionCompareHandle(arg0.value());
|
||||
return true;
|
||||
@@ -1133,7 +1135,7 @@ static bool js_extension_AssetsManagerEx_update(se::State& s) // NOLINT(readabil
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_extension_AssetsManagerEx_update : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->update();
|
||||
return true;
|
||||
@@ -1145,9 +1147,9 @@ SE_BIND_FUNC(js_extension_AssetsManagerEx_update)
|
||||
|
||||
static bool js_extension_AssetsManagerEx_create(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
@@ -1170,21 +1172,26 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_extension_AssetsManagerEx_finalize)
|
||||
|
||||
static bool js_extension_AssetsManagerEx_constructor(se::State& s) // NOLINT(readability-identifier-naming) constructor_overloaded.c
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 3) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
HolderType<std::function<int (const std::string, const std::string)>, true> arg2 = {};
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
HolderType<std::function<int(const std::string, const std::string)>, true> arg2 = {};
|
||||
do {
|
||||
if (args[2].isObject() && args[2].toObject()->isFunction())
|
||||
{
|
||||
if (args[2].isObject() && args[2].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[2]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -1197,10 +1204,10 @@ static bool js_extension_AssetsManagerEx_constructor(se::State& s) // NOLINT(rea
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
@@ -1210,42 +1217,46 @@ static bool js_extension_AssetsManagerEx_constructor(se::State& s) // NOLINT(rea
|
||||
return result;
|
||||
};
|
||||
arg2.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg2.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
if (!ok) { ok = true; break; }
|
||||
} while (false);
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::extension::AssetsManagerEx* cobj = JSB_ALLOC(cc::extension::AssetsManagerEx, arg0.value(), arg1.value(), arg2.value());
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
do {
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
ok &= sevalue_to_native(args[1], &arg1, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::extension::AssetsManagerEx* cobj = JSB_ALLOC(cc::extension::AssetsManagerEx, arg0.value(), arg1.value());
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc);
|
||||
return false;
|
||||
}
|
||||
SE_BIND_CTOR(js_extension_AssetsManagerEx_constructor, __jsb_cc_extension_AssetsManagerEx_class, js_cc_extension_AssetsManagerEx_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_extension_AssetsManagerEx_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj =SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::extension::AssetsManagerEx>(s);
|
||||
cobj->release();
|
||||
return true;
|
||||
}
|
||||
@@ -1286,12 +1297,10 @@ bool js_register_extension_AssetsManagerEx(se::Object* obj) // NOLINT(readabilit
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_extension(se::Object* obj)
|
||||
{
|
||||
bool register_all_extension(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("jsb", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("jsb", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("jsb", nsVal);
|
||||
|
||||
@@ -24,14 +24,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "extensions/cocos-ext.h"
|
||||
|
||||
extern se::Object* __jsb_cc_extension_EventAssetsManagerEx_proto;
|
||||
extern se::Class* __jsb_cc_extension_EventAssetsManagerEx_class;
|
||||
extern se::Class* __jsb_cc_extension_EventAssetsManagerEx_class;
|
||||
|
||||
bool js_register_cc_extension_EventAssetsManagerEx(se::Object* obj);
|
||||
bool register_all_extension(se::Object* obj);
|
||||
@@ -53,7 +53,7 @@ SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_isResuming);
|
||||
SE_DECLARE_FUNC(js_extension_EventAssetsManagerEx_EventAssetsManagerEx);
|
||||
|
||||
extern se::Object* __jsb_cc_extension_Manifest_proto;
|
||||
extern se::Class* __jsb_cc_extension_Manifest_class;
|
||||
extern se::Class* __jsb_cc_extension_Manifest_class;
|
||||
|
||||
bool js_register_cc_extension_Manifest(se::Object* obj);
|
||||
bool register_all_extension(se::Object* obj);
|
||||
@@ -74,7 +74,7 @@ SE_DECLARE_FUNC(js_extension_Manifest_setUpdating);
|
||||
SE_DECLARE_FUNC(js_extension_Manifest_Manifest);
|
||||
|
||||
extern se::Object* __jsb_cc_extension_AssetsManagerEx_proto;
|
||||
extern se::Class* __jsb_cc_extension_AssetsManagerEx_class;
|
||||
extern se::Class* __jsb_cc_extension_AssetsManagerEx_class;
|
||||
|
||||
bool js_register_cc_extension_AssetsManagerEx(se::Object* obj);
|
||||
bool register_all_extension(se::Object* obj);
|
||||
@@ -102,4 +102,3 @@ SE_DECLARE_FUNC(js_extension_AssetsManagerEx_setVersionCompareHandle);
|
||||
SE_DECLARE_FUNC(js_extension_AssetsManagerEx_update);
|
||||
SE_DECLARE_FUNC(js_extension_AssetsManagerEx_create);
|
||||
SE_DECLARE_FUNC(js_extension_AssetsManagerEx_AssetsManagerEx);
|
||||
|
||||
|
||||
+2910
-3075
File diff suppressed because it is too large
Load Diff
@@ -24,584 +24,584 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/renderer/GFXDeviceManager.h"
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Size_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Size_class;
|
||||
extern se::Class* __jsb_cc_gfx_Size_class;
|
||||
|
||||
bool js_register_cc_gfx_Size(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Size *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Size*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Size);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DeviceCaps_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceCaps_class;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceCaps_class;
|
||||
|
||||
bool js_register_cc_gfx_DeviceCaps(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DeviceCaps *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DeviceCaps*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DeviceCaps);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Offset_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Offset_class;
|
||||
extern se::Class* __jsb_cc_gfx_Offset_class;
|
||||
|
||||
bool js_register_cc_gfx_Offset(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Offset *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Offset*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Offset);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Rect_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Rect_class;
|
||||
extern se::Class* __jsb_cc_gfx_Rect_class;
|
||||
|
||||
bool js_register_cc_gfx_Rect(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Rect *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Rect*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Rect);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Extent_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Extent_class;
|
||||
extern se::Class* __jsb_cc_gfx_Extent_class;
|
||||
|
||||
bool js_register_cc_gfx_Extent(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Extent *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Extent*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Extent);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureSubresLayers_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureSubresLayers_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureSubresLayers_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureSubresLayers(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureSubresLayers *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureSubresLayers*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureSubresLayers);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureSubresRange_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureSubresRange_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureSubresRange_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureSubresRange(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureSubresRange *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureSubresRange*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureSubresRange);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureCopy_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureCopy_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureCopy_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureCopy(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureCopy *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureCopy*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureCopy);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureBlit_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBlit_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBlit_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureBlit(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureBlit *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureBlit*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureBlit);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BufferTextureCopy_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BufferTextureCopy_class;
|
||||
extern se::Class* __jsb_cc_gfx_BufferTextureCopy_class;
|
||||
|
||||
bool js_register_cc_gfx_BufferTextureCopy(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BufferTextureCopy *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BufferTextureCopy*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BufferTextureCopy);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Viewport_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Viewport_class;
|
||||
extern se::Class* __jsb_cc_gfx_Viewport_class;
|
||||
|
||||
bool js_register_cc_gfx_Viewport(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Viewport *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Viewport*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Viewport);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Color_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Color_class;
|
||||
extern se::Class* __jsb_cc_gfx_Color_class;
|
||||
|
||||
bool js_register_cc_gfx_Color(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Color *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Color*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Color);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BindingMappingInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BindingMappingInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_BindingMappingInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_BindingMappingInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BindingMappingInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BindingMappingInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BindingMappingInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_SwapchainInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_SwapchainInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_SwapchainInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_SwapchainInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::SwapchainInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::SwapchainInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::SwapchainInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DeviceInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_DeviceInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DeviceInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DeviceInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DeviceInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BufferInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BufferInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_BufferInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_BufferInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BufferInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BufferInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BufferInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BufferViewInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BufferViewInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_BufferViewInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_BufferViewInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BufferViewInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BufferViewInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BufferViewInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DrawInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DrawInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_DrawInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_DrawInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DrawInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DrawInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DrawInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DispatchInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DispatchInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_DispatchInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_DispatchInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DispatchInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DispatchInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DispatchInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_IndirectBuffer_proto;
|
||||
extern se::Class* __jsb_cc_gfx_IndirectBuffer_class;
|
||||
extern se::Class* __jsb_cc_gfx_IndirectBuffer_class;
|
||||
|
||||
bool js_register_cc_gfx_IndirectBuffer(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::IndirectBuffer *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::IndirectBuffer*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::IndirectBuffer);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureViewInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureViewInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureViewInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureViewInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureViewInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureViewInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureViewInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_SamplerInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_SamplerInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_SamplerInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_SamplerInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::SamplerInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::SamplerInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::SamplerInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Uniform_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Uniform_class;
|
||||
extern se::Class* __jsb_cc_gfx_Uniform_class;
|
||||
|
||||
bool js_register_cc_gfx_Uniform(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Uniform *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Uniform*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Uniform);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformBlock_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformBlock_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformBlock_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformBlock(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformBlock *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformBlock*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformBlock);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformSamplerTexture_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformSamplerTexture_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformSamplerTexture_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformSamplerTexture(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformSamplerTexture *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformSamplerTexture*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformSamplerTexture);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformSampler_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformSampler_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformSampler_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformSampler(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformSampler *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformSampler*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformSampler);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformTexture_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformTexture_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformTexture_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformTexture(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformTexture *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformTexture*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformTexture);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformStorageImage_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformStorageImage_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformStorageImage_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformStorageImage(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformStorageImage *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformStorageImage*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformStorageImage);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformStorageBuffer_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformStorageBuffer_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformStorageBuffer_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformStorageBuffer(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformStorageBuffer *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformStorageBuffer*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformStorageBuffer);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_UniformInputAttachment_proto;
|
||||
extern se::Class* __jsb_cc_gfx_UniformInputAttachment_class;
|
||||
extern se::Class* __jsb_cc_gfx_UniformInputAttachment_class;
|
||||
|
||||
bool js_register_cc_gfx_UniformInputAttachment(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::UniformInputAttachment *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::UniformInputAttachment*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::UniformInputAttachment);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_ShaderStage_proto;
|
||||
extern se::Class* __jsb_cc_gfx_ShaderStage_class;
|
||||
extern se::Class* __jsb_cc_gfx_ShaderStage_class;
|
||||
|
||||
bool js_register_cc_gfx_ShaderStage(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::ShaderStage *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::ShaderStage*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::ShaderStage);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Attribute_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Attribute_class;
|
||||
extern se::Class* __jsb_cc_gfx_Attribute_class;
|
||||
|
||||
bool js_register_cc_gfx_Attribute(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::Attribute *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::Attribute*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::Attribute);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_ShaderInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_ShaderInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_ShaderInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_ShaderInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::ShaderInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::ShaderInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::ShaderInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_InputAssemblerInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_InputAssemblerInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_InputAssemblerInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_InputAssemblerInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::InputAssemblerInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::InputAssemblerInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::InputAssemblerInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_ColorAttachment_proto;
|
||||
extern se::Class* __jsb_cc_gfx_ColorAttachment_class;
|
||||
extern se::Class* __jsb_cc_gfx_ColorAttachment_class;
|
||||
|
||||
bool js_register_cc_gfx_ColorAttachment(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::ColorAttachment *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::ColorAttachment*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::ColorAttachment);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DepthStencilAttachment_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DepthStencilAttachment_class;
|
||||
extern se::Class* __jsb_cc_gfx_DepthStencilAttachment_class;
|
||||
|
||||
bool js_register_cc_gfx_DepthStencilAttachment(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DepthStencilAttachment *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DepthStencilAttachment*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DepthStencilAttachment);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_SubpassInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_SubpassInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_SubpassInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_SubpassInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::SubpassInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::SubpassInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::SubpassInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_SubpassDependency_proto;
|
||||
extern se::Class* __jsb_cc_gfx_SubpassDependency_class;
|
||||
extern se::Class* __jsb_cc_gfx_SubpassDependency_class;
|
||||
|
||||
bool js_register_cc_gfx_SubpassDependency(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::SubpassDependency *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::SubpassDependency*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::SubpassDependency);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_RenderPassInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_RenderPassInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_RenderPassInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_RenderPassInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::RenderPassInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::RenderPassInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::RenderPassInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_GlobalBarrierInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_GlobalBarrierInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_GlobalBarrierInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_GlobalBarrierInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::GlobalBarrierInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::GlobalBarrierInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::GlobalBarrierInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureBarrierInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBarrierInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBarrierInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureBarrierInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::TextureBarrierInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::TextureBarrierInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::TextureBarrierInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_FramebufferInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_FramebufferInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_FramebufferInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_FramebufferInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::FramebufferInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::FramebufferInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::FramebufferInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DescriptorSetLayoutBinding_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayoutBinding_class;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayoutBinding_class;
|
||||
|
||||
bool js_register_cc_gfx_DescriptorSetLayoutBinding(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DescriptorSetLayoutBinding *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DescriptorSetLayoutBinding*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DescriptorSetLayoutBinding);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DescriptorSetLayoutInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayoutInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayoutInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_DescriptorSetLayoutInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DescriptorSetLayoutInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DescriptorSetLayoutInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DescriptorSetLayoutInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DescriptorSetInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_DescriptorSetInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DescriptorSetInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DescriptorSetInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DescriptorSetInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_PipelineLayoutInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineLayoutInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineLayoutInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_PipelineLayoutInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::PipelineLayoutInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::PipelineLayoutInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::PipelineLayoutInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_InputState_proto;
|
||||
extern se::Class* __jsb_cc_gfx_InputState_class;
|
||||
extern se::Class* __jsb_cc_gfx_InputState_class;
|
||||
|
||||
bool js_register_cc_gfx_InputState(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::InputState *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::InputState*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::InputState);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_RasterizerState_proto;
|
||||
extern se::Class* __jsb_cc_gfx_RasterizerState_class;
|
||||
extern se::Class* __jsb_cc_gfx_RasterizerState_class;
|
||||
|
||||
bool js_register_cc_gfx_RasterizerState(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::RasterizerState *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::RasterizerState*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::RasterizerState);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DepthStencilState_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DepthStencilState_class;
|
||||
extern se::Class* __jsb_cc_gfx_DepthStencilState_class;
|
||||
|
||||
bool js_register_cc_gfx_DepthStencilState(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::DepthStencilState *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::DepthStencilState*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::DepthStencilState);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BlendTarget_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BlendTarget_class;
|
||||
extern se::Class* __jsb_cc_gfx_BlendTarget_class;
|
||||
|
||||
bool js_register_cc_gfx_BlendTarget(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BlendTarget *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BlendTarget*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BlendTarget);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_BlendState_proto;
|
||||
extern se::Class* __jsb_cc_gfx_BlendState_class;
|
||||
extern se::Class* __jsb_cc_gfx_BlendState_class;
|
||||
|
||||
bool js_register_cc_gfx_BlendState(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::BlendState *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::BlendState*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::BlendState);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_PipelineStateInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineStateInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineStateInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_PipelineStateInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::PipelineStateInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::PipelineStateInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::PipelineStateInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_CommandBufferInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_CommandBufferInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_CommandBufferInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_CommandBufferInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::CommandBufferInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::CommandBufferInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::CommandBufferInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_QueueInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_QueueInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_QueueInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_QueueInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::QueueInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::QueueInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::QueueInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_QueryPoolInfo_proto;
|
||||
extern se::Class* __jsb_cc_gfx_QueryPoolInfo_class;
|
||||
extern se::Class* __jsb_cc_gfx_QueryPoolInfo_class;
|
||||
|
||||
bool js_register_cc_gfx_QueryPoolInfo(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::QueryPoolInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::QueryPoolInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::QueryPoolInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_MemoryStatus_proto;
|
||||
extern se::Class* __jsb_cc_gfx_MemoryStatus_class;
|
||||
extern se::Class* __jsb_cc_gfx_MemoryStatus_class;
|
||||
|
||||
bool js_register_cc_gfx_MemoryStatus(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::gfx::MemoryStatus *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::gfx::MemoryStatus*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::gfx::MemoryStatus);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_GFXObject_proto;
|
||||
extern se::Class* __jsb_cc_gfx_GFXObject_class;
|
||||
extern se::Class* __jsb_cc_gfx_GFXObject_class;
|
||||
|
||||
bool js_register_cc_gfx_GFXObject(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -610,7 +610,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::gfx::GFXObject);
|
||||
SE_DECLARE_FUNC(js_gfx_GFXObject_GFXObject);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Buffer_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Buffer_class;
|
||||
extern se::Class* __jsb_cc_gfx_Buffer_class;
|
||||
|
||||
bool js_register_cc_gfx_Buffer(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -623,7 +623,7 @@ SE_DECLARE_FUNC(js_gfx_Buffer_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_Buffer_Buffer);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_InputAssembler_proto;
|
||||
extern se::Class* __jsb_cc_gfx_InputAssembler_class;
|
||||
extern se::Class* __jsb_cc_gfx_InputAssembler_class;
|
||||
|
||||
bool js_register_cc_gfx_InputAssembler(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -634,7 +634,7 @@ SE_DECLARE_FUNC(js_gfx_InputAssembler_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_InputAssembler_InputAssembler);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_CommandBuffer_proto;
|
||||
extern se::Class* __jsb_cc_gfx_CommandBuffer_class;
|
||||
extern se::Class* __jsb_cc_gfx_CommandBuffer_class;
|
||||
|
||||
bool js_register_cc_gfx_CommandBuffer(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -674,7 +674,7 @@ SE_DECLARE_FUNC(js_gfx_CommandBuffer_setViewport);
|
||||
SE_DECLARE_FUNC(js_gfx_CommandBuffer_CommandBuffer);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DescriptorSet_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSet_class;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSet_class;
|
||||
|
||||
bool js_register_cc_gfx_DescriptorSet(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -695,7 +695,7 @@ SE_DECLARE_FUNC(js_gfx_DescriptorSet_update);
|
||||
SE_DECLARE_FUNC(js_gfx_DescriptorSet_DescriptorSet);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DescriptorSetLayout_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayout_class;
|
||||
extern se::Class* __jsb_cc_gfx_DescriptorSetLayout_class;
|
||||
|
||||
bool js_register_cc_gfx_DescriptorSetLayout(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -709,7 +709,7 @@ SE_DECLARE_FUNC(js_gfx_DescriptorSetLayout_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_DescriptorSetLayout_DescriptorSetLayout);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Framebuffer_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Framebuffer_class;
|
||||
extern se::Class* __jsb_cc_gfx_Framebuffer_class;
|
||||
|
||||
bool js_register_cc_gfx_Framebuffer(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -721,7 +721,7 @@ SE_DECLARE_FUNC(js_gfx_Framebuffer_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_Framebuffer_Framebuffer);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_PipelineLayout_proto;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineLayout_class;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineLayout_class;
|
||||
|
||||
bool js_register_cc_gfx_PipelineLayout(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -733,7 +733,7 @@ SE_DECLARE_FUNC(js_gfx_PipelineLayout_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_PipelineLayout_PipelineLayout);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_PipelineState_proto;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineState_class;
|
||||
extern se::Class* __jsb_cc_gfx_PipelineState_class;
|
||||
|
||||
bool js_register_cc_gfx_PipelineState(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -746,7 +746,7 @@ SE_DECLARE_FUNC(js_gfx_PipelineState_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_PipelineState_PipelineState);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_QueryPool_proto;
|
||||
extern se::Class* __jsb_cc_gfx_QueryPool_class;
|
||||
extern se::Class* __jsb_cc_gfx_QueryPool_class;
|
||||
|
||||
bool js_register_cc_gfx_QueryPool(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -762,7 +762,7 @@ SE_DECLARE_FUNC(js_gfx_QueryPool_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_QueryPool_QueryPool);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Queue_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Queue_class;
|
||||
extern se::Class* __jsb_cc_gfx_Queue_class;
|
||||
|
||||
bool js_register_cc_gfx_Queue(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -774,7 +774,7 @@ SE_DECLARE_FUNC(js_gfx_Queue_submit);
|
||||
SE_DECLARE_FUNC(js_gfx_Queue_Queue);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_RenderPass_proto;
|
||||
extern se::Class* __jsb_cc_gfx_RenderPass_class;
|
||||
extern se::Class* __jsb_cc_gfx_RenderPass_class;
|
||||
|
||||
bool js_register_cc_gfx_RenderPass(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -789,7 +789,7 @@ SE_DECLARE_FUNC(js_gfx_RenderPass_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_RenderPass_RenderPass);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Shader_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Shader_class;
|
||||
extern se::Class* __jsb_cc_gfx_Shader_class;
|
||||
|
||||
bool js_register_cc_gfx_Shader(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -805,7 +805,7 @@ SE_DECLARE_FUNC(js_gfx_Shader_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_Shader_Shader);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Texture_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Texture_class;
|
||||
extern se::Class* __jsb_cc_gfx_Texture_class;
|
||||
|
||||
bool js_register_cc_gfx_Texture(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -818,7 +818,7 @@ SE_DECLARE_FUNC(js_gfx_Texture_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_Texture_Texture);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Swapchain_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Swapchain_class;
|
||||
extern se::Class* __jsb_cc_gfx_Swapchain_class;
|
||||
|
||||
bool js_register_cc_gfx_Swapchain(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -834,7 +834,7 @@ SE_DECLARE_FUNC(js_gfx_Swapchain_resize);
|
||||
SE_DECLARE_FUNC(js_gfx_Swapchain_Swapchain);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_GlobalBarrier_proto;
|
||||
extern se::Class* __jsb_cc_gfx_GlobalBarrier_class;
|
||||
extern se::Class* __jsb_cc_gfx_GlobalBarrier_class;
|
||||
|
||||
bool js_register_cc_gfx_GlobalBarrier(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -846,7 +846,7 @@ SE_DECLARE_FUNC(js_gfx_GlobalBarrier_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_GlobalBarrier_GlobalBarrier);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Sampler_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Sampler_class;
|
||||
extern se::Class* __jsb_cc_gfx_Sampler_class;
|
||||
|
||||
bool js_register_cc_gfx_Sampler(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -857,7 +857,7 @@ SE_DECLARE_FUNC(js_gfx_Sampler_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_Sampler_Sampler);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_TextureBarrier_proto;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBarrier_class;
|
||||
extern se::Class* __jsb_cc_gfx_TextureBarrier_class;
|
||||
|
||||
bool js_register_cc_gfx_TextureBarrier(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -869,7 +869,7 @@ SE_DECLARE_FUNC(js_gfx_TextureBarrier_computeHash);
|
||||
SE_DECLARE_FUNC(js_gfx_TextureBarrier_TextureBarrier);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_Device_proto;
|
||||
extern se::Class* __jsb_cc_gfx_Device_class;
|
||||
extern se::Class* __jsb_cc_gfx_Device_class;
|
||||
|
||||
bool js_register_cc_gfx_Device(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
@@ -901,7 +901,7 @@ SE_DECLARE_FUNC(js_gfx_Device_initialize);
|
||||
SE_DECLARE_FUNC(js_gfx_Device_present);
|
||||
|
||||
extern se::Object* __jsb_cc_gfx_DeviceManager_proto;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceManager_class;
|
||||
extern se::Class* __jsb_cc_gfx_DeviceManager_class;
|
||||
|
||||
bool js_register_cc_gfx_DeviceManager(se::Object* obj);
|
||||
bool register_all_gfx(se::Object* obj);
|
||||
|
||||
@@ -29,14 +29,14 @@
|
||||
#include "network/Downloader.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_network_DownloaderHints_proto = nullptr;
|
||||
se::Class* __jsb_cc_network_DownloaderHints_class = nullptr;
|
||||
se::Class* __jsb_cc_network_DownloaderHints_class = nullptr;
|
||||
|
||||
static bool js_network_DownloaderHints_get_countOfMaxProcessingTasks(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
@@ -44,7 +44,7 @@ static bool js_network_DownloaderHints_get_countOfMaxProcessingTasks(se::State&
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_get_countOfMaxProcessingTasks : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->countOfMaxProcessingTasks, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->countOfMaxProcessingTasks, s.thisObject(), s.rval());
|
||||
@@ -55,7 +55,7 @@ SE_BIND_PROP_GET(js_network_DownloaderHints_get_countOfMaxProcessingTasks)
|
||||
static bool js_network_DownloaderHints_set_countOfMaxProcessingTasks(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_set_countOfMaxProcessingTasks : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -71,7 +71,7 @@ static bool js_network_DownloaderHints_get_timeoutInSeconds(se::State& s) // NOL
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_get_timeoutInSeconds : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->timeoutInSeconds, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->timeoutInSeconds, s.thisObject(), s.rval());
|
||||
@@ -82,7 +82,7 @@ SE_BIND_PROP_GET(js_network_DownloaderHints_get_timeoutInSeconds)
|
||||
static bool js_network_DownloaderHints_set_timeoutInSeconds(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_set_timeoutInSeconds : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -98,7 +98,7 @@ static bool js_network_DownloaderHints_get_tempFileNameSuffix(se::State& s) // N
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_get_tempFileNameSuffix : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
se::Value jsret;
|
||||
se::Value jsret;
|
||||
ok &= nativevalue_to_se(cobj->tempFileNameSuffix, jsret, s.thisObject() /*ctx*/);
|
||||
s.rval() = jsret;
|
||||
SE_HOLD_RETURN_VALUE(cobj->tempFileNameSuffix, s.thisObject(), s.rval());
|
||||
@@ -109,7 +109,7 @@ SE_BIND_PROP_GET(js_network_DownloaderHints_get_tempFileNameSuffix)
|
||||
static bool js_network_DownloaderHints_set_tempFileNameSuffix(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_network_DownloaderHints_set_tempFileNameSuffix : Invalid Native Object");
|
||||
|
||||
CC_UNUSED bool ok = true;
|
||||
@@ -119,29 +119,27 @@ static bool js_network_DownloaderHints_set_tempFileNameSuffix(se::State& s) // N
|
||||
}
|
||||
SE_BIND_PROP_SET(js_network_DownloaderHints_set_tempFileNameSuffix)
|
||||
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &from, cc::network::DownloaderHints * to, se::Object *ctx)
|
||||
{
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value& from, cc::network::DownloaderHints* to, se::Object* ctx) {
|
||||
assert(from.isObject());
|
||||
se::Object *json = from.toObject();
|
||||
auto* data = reinterpret_cast<cc::network::DownloaderHints*>(json->getPrivateData());
|
||||
se::Object* json = from.toObject();
|
||||
auto* data = reinterpret_cast<cc::network::DownloaderHints*>(json->getPrivateData());
|
||||
if (data) {
|
||||
*to = *data;
|
||||
return true;
|
||||
}
|
||||
se::Value field;
|
||||
bool ok = true;
|
||||
bool ok = true;
|
||||
json->getProperty("countOfMaxProcessingTasks", &field);
|
||||
if(!field.isNullOrUndefined()) {
|
||||
if (!field.isNullOrUndefined()) {
|
||||
ok &= sevalue_to_native(field, &(to->countOfMaxProcessingTasks), ctx);
|
||||
}
|
||||
json->getProperty("timeoutInSeconds", &field);
|
||||
if(!field.isNullOrUndefined()) {
|
||||
if (!field.isNullOrUndefined()) {
|
||||
ok &= sevalue_to_native(field, &(to->timeoutInSeconds), ctx);
|
||||
}
|
||||
json->getProperty("tempFileNameSuffix", &field);
|
||||
if(!field.isNullOrUndefined()) {
|
||||
if (!field.isNullOrUndefined()) {
|
||||
ok &= sevalue_to_native(field, &(to->tempFileNameSuffix), ctx);
|
||||
}
|
||||
return ok;
|
||||
@@ -151,26 +149,24 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_network_DownloaderHints_finalize)
|
||||
|
||||
static bool js_network_DownloaderHints_constructor(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
|
||||
if(argc == 0)
|
||||
{
|
||||
if (argc == 0) {
|
||||
cc::network::DownloaderHints* cobj = JSB_ALLOC(cc::network::DownloaderHints);
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
se::NonRefNativePtrCreatedByCtorMap::emplace(cobj);
|
||||
return true;
|
||||
}
|
||||
|
||||
if(argc == 1 && args[0].isObject())
|
||||
{
|
||||
se::Object *json = args[0].toObject();
|
||||
se::Value field;
|
||||
if (argc == 1 && args[0].isObject()) {
|
||||
se::Object* json = args[0].toObject();
|
||||
se::Value field;
|
||||
|
||||
cc::network::DownloaderHints* cobj = JSB_ALLOC(cc::network::DownloaderHints);
|
||||
ok &= sevalue_to_native(args[0], cobj, s.thisObject());
|
||||
if(!ok) {
|
||||
if (!ok) {
|
||||
JSB_FREE(cobj);
|
||||
SE_REPORT_ERROR("argument convertion error");
|
||||
return false;
|
||||
@@ -192,7 +188,7 @@ static bool js_network_DownloaderHints_constructor(se::State& s) // NOLINT(reada
|
||||
ok &= sevalue_to_native(args[2], &(cobj->tempFileNameSuffix), nullptr);
|
||||
}
|
||||
|
||||
if(!ok) {
|
||||
if (!ok) {
|
||||
JSB_FREE(cobj);
|
||||
SE_REPORT_ERROR("Argument convertion error");
|
||||
return false;
|
||||
@@ -204,13 +200,10 @@ static bool js_network_DownloaderHints_constructor(se::State& s) // NOLINT(reada
|
||||
}
|
||||
SE_BIND_CTOR(js_network_DownloaderHints_constructor, __jsb_cc_network_DownloaderHints_class, js_cc_network_DownloaderHints_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_network_DownloaderHints_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(SE_THIS_OBJECT<cc::network::DownloaderHints>(s));
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end())
|
||||
{
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
se::NonRefNativePtrCreatedByCtorMap::erase(iter);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::DownloaderHints>(s);
|
||||
JSB_FREE(cobj);
|
||||
@@ -237,24 +230,23 @@ bool js_register_network_DownloaderHints(se::Object* obj) // NOLINT(readability-
|
||||
return true;
|
||||
}
|
||||
se::Object* __jsb_cc_network_Downloader_proto = nullptr;
|
||||
se::Class* __jsb_cc_network_Downloader_class = nullptr;
|
||||
se::Class* __jsb_cc_network_Downloader_class = nullptr;
|
||||
|
||||
static bool js_network_Downloader_setOnTaskProgress(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::Downloader>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_network_Downloader_setOnTaskProgress : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (const cc::network::DownloadTask &, long long, long long, long long)>, true> arg0 = {};
|
||||
HolderType<std::function<void(const cc::network::DownloadTask&, long long, long long, long long)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
auto lambda = [=](const cc::network::DownloadTask & larg0, int64_t larg1, int64_t larg2, int64_t larg3) -> void {
|
||||
auto lambda = [=](const cc::network::DownloadTask& larg0, int64_t larg1, int64_t larg2, int64_t larg3) -> void {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
se::AutoHandleScope hs;
|
||||
|
||||
@@ -265,22 +257,19 @@ static bool js_network_Downloader_setOnTaskProgress(se::State& s) // NOLINT(read
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg2, args[2], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg3, args[3], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_network_Downloader_setOnTaskProgress : Error processing arguments");
|
||||
cobj->setOnTaskProgress(arg0.value());
|
||||
return true;
|
||||
@@ -294,20 +283,23 @@ SE_DECLARE_FINALIZE_FUNC(js_cc_network_Downloader_finalize)
|
||||
|
||||
static bool js_network_Downloader_constructor(se::State& s) // NOLINT(readability-identifier-naming) constructor_overloaded.c
|
||||
{
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
do {
|
||||
if (argc == 1) {
|
||||
HolderType<cc::network::DownloaderHints, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
if (!ok) { ok = true; break; }
|
||||
if (!ok) {
|
||||
ok = true;
|
||||
break;
|
||||
}
|
||||
cc::network::Downloader* cobj = JSB_ALLOC(cc::network::Downloader, arg0.value());
|
||||
s.thisObject()->setPrivateData(cobj);
|
||||
se::NonRefNativePtrCreatedByCtorMap::emplace(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
do {
|
||||
if (argc == 0) {
|
||||
cc::network::Downloader* cobj = JSB_ALLOC(cc::network::Downloader);
|
||||
@@ -315,19 +307,16 @@ static bool js_network_Downloader_constructor(se::State& s) // NOLINT(readabilit
|
||||
se::NonRefNativePtrCreatedByCtorMap::emplace(cobj);
|
||||
return true;
|
||||
}
|
||||
} while(false);
|
||||
} while (false);
|
||||
SE_REPORT_ERROR("wrong number of arguments: %d", (int)argc);
|
||||
return false;
|
||||
}
|
||||
SE_BIND_CTOR(js_network_Downloader_constructor, __jsb_cc_network_Downloader_class, js_cc_network_Downloader_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_network_Downloader_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto iter = se::NonRefNativePtrCreatedByCtorMap::find(SE_THIS_OBJECT<cc::network::Downloader>(s));
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end())
|
||||
{
|
||||
if (iter != se::NonRefNativePtrCreatedByCtorMap::end()) {
|
||||
se::NonRefNativePtrCreatedByCtorMap::erase(iter);
|
||||
auto* cobj = SE_THIS_OBJECT<cc::network::Downloader>(s);
|
||||
JSB_FREE(cobj);
|
||||
@@ -351,12 +340,10 @@ bool js_register_network_Downloader(se::Object* obj) // NOLINT(readability-ident
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_network(se::Object* obj)
|
||||
{
|
||||
bool register_all_network(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("jsb", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("jsb", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("jsb", nsVal);
|
||||
|
||||
@@ -24,24 +24,24 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/network/Downloader.h"
|
||||
|
||||
extern se::Object* __jsb_cc_network_DownloaderHints_proto;
|
||||
extern se::Class* __jsb_cc_network_DownloaderHints_class;
|
||||
extern se::Class* __jsb_cc_network_DownloaderHints_class;
|
||||
|
||||
bool js_register_cc_network_DownloaderHints(se::Object* obj);
|
||||
bool register_all_network(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::network::DownloaderHints *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::network::DownloaderHints*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::network::DownloaderHints);
|
||||
|
||||
extern se::Object* __jsb_cc_network_Downloader_proto;
|
||||
extern se::Class* __jsb_cc_network_Downloader_class;
|
||||
extern se::Class* __jsb_cc_network_Downloader_class;
|
||||
|
||||
bool js_register_cc_network_Downloader(se::Object* obj);
|
||||
bool register_all_network(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,16 +24,16 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/auto/jsb_gfx_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_scene_auto.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/physics/PhysicsSDK.h"
|
||||
|
||||
extern se::Object* __jsb_cc_physics_World_proto;
|
||||
extern se::Class* __jsb_cc_physics_World_class;
|
||||
extern se::Class* __jsb_cc_physics_World_class;
|
||||
|
||||
bool js_register_cc_physics_World(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -60,7 +60,7 @@ SE_DECLARE_FUNC(js_physics_World_syncSceneWithCheck);
|
||||
SE_DECLARE_FUNC(js_physics_World_World);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_RigidBody_proto;
|
||||
extern se::Class* __jsb_cc_physics_RigidBody_class;
|
||||
extern se::Class* __jsb_cc_physics_RigidBody_class;
|
||||
|
||||
bool js_register_cc_physics_RigidBody(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -108,7 +108,7 @@ SE_DECLARE_FUNC(js_physics_RigidBody_wakeUp);
|
||||
SE_DECLARE_FUNC(js_physics_RigidBody_RigidBody);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_SphereShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_SphereShape_class;
|
||||
extern se::Class* __jsb_cc_physics_SphereShape_class;
|
||||
|
||||
bool js_register_cc_physics_SphereShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -133,7 +133,7 @@ SE_DECLARE_FUNC(js_physics_SphereShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_SphereShape_SphereShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_BoxShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_BoxShape_class;
|
||||
extern se::Class* __jsb_cc_physics_BoxShape_class;
|
||||
|
||||
bool js_register_cc_physics_BoxShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -158,7 +158,7 @@ SE_DECLARE_FUNC(js_physics_BoxShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_BoxShape_BoxShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_CapsuleShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_CapsuleShape_class;
|
||||
extern se::Class* __jsb_cc_physics_CapsuleShape_class;
|
||||
|
||||
bool js_register_cc_physics_CapsuleShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -185,7 +185,7 @@ SE_DECLARE_FUNC(js_physics_CapsuleShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_CapsuleShape_CapsuleShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_PlaneShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_PlaneShape_class;
|
||||
extern se::Class* __jsb_cc_physics_PlaneShape_class;
|
||||
|
||||
bool js_register_cc_physics_PlaneShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -211,7 +211,7 @@ SE_DECLARE_FUNC(js_physics_PlaneShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_PlaneShape_PlaneShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_TrimeshShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_TrimeshShape_class;
|
||||
extern se::Class* __jsb_cc_physics_TrimeshShape_class;
|
||||
|
||||
bool js_register_cc_physics_TrimeshShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -237,7 +237,7 @@ SE_DECLARE_FUNC(js_physics_TrimeshShape_useConvex);
|
||||
SE_DECLARE_FUNC(js_physics_TrimeshShape_TrimeshShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_CylinderShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_CylinderShape_class;
|
||||
extern se::Class* __jsb_cc_physics_CylinderShape_class;
|
||||
|
||||
bool js_register_cc_physics_CylinderShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -263,7 +263,7 @@ SE_DECLARE_FUNC(js_physics_CylinderShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_CylinderShape_CylinderShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_ConeShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_ConeShape_class;
|
||||
extern se::Class* __jsb_cc_physics_ConeShape_class;
|
||||
|
||||
bool js_register_cc_physics_ConeShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -289,7 +289,7 @@ SE_DECLARE_FUNC(js_physics_ConeShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_ConeShape_ConeShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_TerrainShape_proto;
|
||||
extern se::Class* __jsb_cc_physics_TerrainShape_class;
|
||||
extern se::Class* __jsb_cc_physics_TerrainShape_class;
|
||||
|
||||
bool js_register_cc_physics_TerrainShape(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -314,7 +314,7 @@ SE_DECLARE_FUNC(js_physics_TerrainShape_updateEventListener);
|
||||
SE_DECLARE_FUNC(js_physics_TerrainShape_TerrainShape);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_RevoluteJoint_proto;
|
||||
extern se::Class* __jsb_cc_physics_RevoluteJoint_class;
|
||||
extern se::Class* __jsb_cc_physics_RevoluteJoint_class;
|
||||
|
||||
bool js_register_cc_physics_RevoluteJoint(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
@@ -333,7 +333,7 @@ SE_DECLARE_FUNC(js_physics_RevoluteJoint_setPivotB);
|
||||
SE_DECLARE_FUNC(js_physics_RevoluteJoint_RevoluteJoint);
|
||||
|
||||
extern se::Object* __jsb_cc_physics_DistanceJoint_proto;
|
||||
extern se::Class* __jsb_cc_physics_DistanceJoint_class;
|
||||
extern se::Class* __jsb_cc_physics_DistanceJoint_class;
|
||||
|
||||
bool js_register_cc_physics_DistanceJoint(se::Object* obj);
|
||||
bool register_all_physics(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,43 +24,43 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/auto/jsb_gfx_auto.h"
|
||||
#include "cocos/bindings/auto/jsb_scene_auto.h"
|
||||
#include "cocos/renderer/pipeline/forward/ForwardPipeline.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/renderer/pipeline/Define.h"
|
||||
#include "cocos/renderer/pipeline/GeometryRenderer.h"
|
||||
#include "cocos/renderer/pipeline/GlobalDescriptorSetManager.h"
|
||||
#include "cocos/renderer/pipeline/InstancedBuffer.h"
|
||||
#include "cocos/renderer/pipeline/RenderFlow.h"
|
||||
#include "cocos/renderer/pipeline/RenderPipeline.h"
|
||||
#include "cocos/renderer/pipeline/RenderStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/BloomStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/DeferredPipeline.h"
|
||||
#include "cocos/renderer/pipeline/deferred/GbufferStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/LightingStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/MainFlow.h"
|
||||
#include "cocos/renderer/pipeline/deferred/PostProcessStage.h"
|
||||
#include "cocos/renderer/pipeline/forward/ForwardFlow.h"
|
||||
#include "cocos/renderer/pipeline/forward/ForwardPipeline.h"
|
||||
#include "cocos/renderer/pipeline/forward/ForwardStage.h"
|
||||
#include "cocos/renderer/pipeline/shadow/ShadowFlow.h"
|
||||
#include "cocos/renderer/pipeline/shadow/ShadowStage.h"
|
||||
#include "cocos/renderer/pipeline/RenderPipeline.h"
|
||||
#include "cocos/renderer/pipeline/RenderFlow.h"
|
||||
#include "cocos/renderer/pipeline/RenderStage.h"
|
||||
#include "cocos/renderer/pipeline/Define.h"
|
||||
#include "cocos/renderer/pipeline/GlobalDescriptorSetManager.h"
|
||||
#include "cocos/renderer/pipeline/InstancedBuffer.h"
|
||||
#include "cocos/renderer/pipeline/deferred/DeferredPipeline.h"
|
||||
#include "cocos/renderer/pipeline/deferred/MainFlow.h"
|
||||
#include "cocos/renderer/pipeline/deferred/GbufferStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/LightingStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/BloomStage.h"
|
||||
#include "cocos/renderer/pipeline/deferred/PostProcessStage.h"
|
||||
#include "cocos/renderer/pipeline/GeometryRenderer.h"
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderQueueDesc_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderQueueDesc_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderQueueDesc_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderQueueDesc(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::pipeline::RenderQueueDesc *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::pipeline::RenderQueueDesc*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::pipeline::RenderQueueDesc);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_GlobalDSManager_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_GlobalDSManager_class;
|
||||
extern se::Class* __jsb_cc_pipeline_GlobalDSManager_class;
|
||||
|
||||
bool js_register_cc_pipeline_GlobalDSManager(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -79,17 +79,17 @@ SE_DECLARE_FUNC(js_pipeline_GlobalDSManager_update);
|
||||
SE_DECLARE_FUNC(js_pipeline_GlobalDSManager_GlobalDSManager);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderPipelineInfo_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderPipelineInfo_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderPipelineInfo_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderPipelineInfo(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::pipeline::RenderPipelineInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::pipeline::RenderPipelineInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::pipeline::RenderPipelineInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderPipeline_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderPipeline_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderPipeline_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderPipeline(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -127,7 +127,7 @@ SE_DECLARE_FUNC(js_pipeline_RenderPipeline_getInstance);
|
||||
SE_DECLARE_FUNC(js_pipeline_RenderPipeline_getRenderArea);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_ForwardPipeline_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardPipeline_class;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardPipeline_class;
|
||||
|
||||
bool js_register_cc_pipeline_ForwardPipeline(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -136,17 +136,17 @@ JSB_REGISTER_OBJECT_TYPE(cc::pipeline::ForwardPipeline);
|
||||
SE_DECLARE_FUNC(js_pipeline_ForwardPipeline_ForwardPipeline);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderFlowInfo_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderFlowInfo_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderFlowInfo_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderFlowInfo(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::pipeline::RenderFlowInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::pipeline::RenderFlowInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::pipeline::RenderFlowInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderFlow_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderFlow_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderFlow_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderFlow(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -158,7 +158,7 @@ SE_DECLARE_FUNC(js_pipeline_RenderFlow_getTag);
|
||||
SE_DECLARE_FUNC(js_pipeline_RenderFlow_initialize);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_ForwardFlow_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardFlow_class;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardFlow_class;
|
||||
|
||||
bool js_register_cc_pipeline_ForwardFlow(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -168,17 +168,17 @@ SE_DECLARE_FUNC(js_pipeline_ForwardFlow_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_ForwardFlow_ForwardFlow);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderStageInfo_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderStageInfo_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderStageInfo_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderStageInfo(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::pipeline::RenderStageInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::pipeline::RenderStageInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::pipeline::RenderStageInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_RenderStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_RenderStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_RenderStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -190,7 +190,7 @@ SE_DECLARE_FUNC(js_pipeline_RenderStage_getTag);
|
||||
SE_DECLARE_FUNC(js_pipeline_RenderStage_initialize);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_ForwardStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_ForwardStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_ForwardStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -200,7 +200,7 @@ SE_DECLARE_FUNC(js_pipeline_ForwardStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_ForwardStage_ForwardStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_ShadowFlow_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_ShadowFlow_class;
|
||||
extern se::Class* __jsb_cc_pipeline_ShadowFlow_class;
|
||||
|
||||
bool js_register_cc_pipeline_ShadowFlow(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -210,7 +210,7 @@ SE_DECLARE_FUNC(js_pipeline_ShadowFlow_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_ShadowFlow_ShadowFlow);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_ShadowStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_ShadowStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_ShadowStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_ShadowStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -222,7 +222,7 @@ SE_DECLARE_FUNC(js_pipeline_ShadowStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_ShadowStage_ShadowStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_InstancedBuffer_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_InstancedBuffer_class;
|
||||
extern se::Class* __jsb_cc_pipeline_InstancedBuffer_class;
|
||||
|
||||
bool js_register_cc_pipeline_InstancedBuffer(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -235,7 +235,7 @@ SE_DECLARE_FUNC(js_pipeline_InstancedBuffer_destroyInstancedBuffer);
|
||||
SE_DECLARE_FUNC(js_pipeline_InstancedBuffer_InstancedBuffer);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_DeferredPipeline_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_DeferredPipeline_class;
|
||||
extern se::Class* __jsb_cc_pipeline_DeferredPipeline_class;
|
||||
|
||||
bool js_register_cc_pipeline_DeferredPipeline(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -244,7 +244,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::pipeline::DeferredPipeline);
|
||||
SE_DECLARE_FUNC(js_pipeline_DeferredPipeline_DeferredPipeline);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_MainFlow_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_MainFlow_class;
|
||||
extern se::Class* __jsb_cc_pipeline_MainFlow_class;
|
||||
|
||||
bool js_register_cc_pipeline_MainFlow(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -254,7 +254,7 @@ SE_DECLARE_FUNC(js_pipeline_MainFlow_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_MainFlow_MainFlow);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_GbufferStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_GbufferStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_GbufferStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_GbufferStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -264,7 +264,7 @@ SE_DECLARE_FUNC(js_pipeline_GbufferStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_GbufferStage_GbufferStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_LightingStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_LightingStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_LightingStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_LightingStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -274,7 +274,7 @@ SE_DECLARE_FUNC(js_pipeline_LightingStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_LightingStage_LightingStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_BloomStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_BloomStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_BloomStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_BloomStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -289,7 +289,7 @@ SE_DECLARE_FUNC(js_pipeline_BloomStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_BloomStage_BloomStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_PostProcessStage_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_PostProcessStage_class;
|
||||
extern se::Class* __jsb_cc_pipeline_PostProcessStage_class;
|
||||
|
||||
bool js_register_cc_pipeline_PostProcessStage(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
@@ -299,7 +299,7 @@ SE_DECLARE_FUNC(js_pipeline_PostProcessStage_getInitializeInfo);
|
||||
SE_DECLARE_FUNC(js_pipeline_PostProcessStage_PostProcessStage);
|
||||
|
||||
extern se::Object* __jsb_cc_pipeline_GeometryRenderer_proto;
|
||||
extern se::Class* __jsb_cc_pipeline_GeometryRenderer_class;
|
||||
extern se::Class* __jsb_cc_pipeline_GeometryRenderer_class;
|
||||
|
||||
bool js_register_cc_pipeline_GeometryRenderer(se::Object* obj);
|
||||
bool register_all_pipeline(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,32 +24,31 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/auto/jsb_gfx_auto.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/auto/jsb_gfx_auto.h"
|
||||
#include "cocos/scene/Node.h"
|
||||
#include "cocos/scene/AABB.h"
|
||||
#include "cocos/scene/BaseNode.h"
|
||||
#include "cocos/scene/Scene.h"
|
||||
#include "cocos/scene/Light.h"
|
||||
#include "cocos/scene/DirectionalLight.h"
|
||||
#include "cocos/scene/SpotLight.h"
|
||||
#include "cocos/scene/SphereLight.h"
|
||||
#include "cocos/scene/Model.h"
|
||||
#include "cocos/scene/SubModel.h"
|
||||
#include "cocos/scene/Pass.h"
|
||||
#include "cocos/scene/RenderScene.h"
|
||||
#include "cocos/scene/DrawBatch2D.h"
|
||||
#include "cocos/scene/Camera.h"
|
||||
#include "cocos/scene/RenderWindow.h"
|
||||
#include "cocos/scene/Camera.h"
|
||||
#include "cocos/scene/Define.h"
|
||||
#include "cocos/scene/AABB.h"
|
||||
#include "cocos/scene/DirectionalLight.h"
|
||||
#include "cocos/scene/DrawBatch2D.h"
|
||||
#include "cocos/scene/Light.h"
|
||||
#include "cocos/scene/Model.h"
|
||||
#include "cocos/scene/Node.h"
|
||||
#include "cocos/scene/Pass.h"
|
||||
#include "cocos/scene/RenderScene.h"
|
||||
#include "cocos/scene/RenderWindow.h"
|
||||
#include "cocos/scene/Scene.h"
|
||||
#include "cocos/scene/Sphere.h"
|
||||
#include "cocos/scene/SphereLight.h"
|
||||
#include "cocos/scene/SpotLight.h"
|
||||
#include "cocos/scene/SubModel.h"
|
||||
|
||||
extern se::Object* __jsb_cc_scene_BaseNode_proto;
|
||||
extern se::Class* __jsb_cc_scene_BaseNode_class;
|
||||
extern se::Class* __jsb_cc_scene_BaseNode_class;
|
||||
|
||||
bool js_register_cc_scene_BaseNode(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -60,7 +59,7 @@ SE_DECLARE_FUNC(js_scene_BaseNode_setParent);
|
||||
SE_DECLARE_FUNC(js_scene_BaseNode_BaseNode);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Scene_proto;
|
||||
extern se::Class* __jsb_cc_scene_Scene_class;
|
||||
extern se::Class* __jsb_cc_scene_Scene_class;
|
||||
|
||||
bool js_register_cc_scene_Scene(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -69,7 +68,7 @@ JSB_REGISTER_OBJECT_TYPE(cc::scene::Scene);
|
||||
SE_DECLARE_FUNC(js_scene_Scene_Scene);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Node_proto;
|
||||
extern se::Class* __jsb_cc_scene_Node_class;
|
||||
extern se::Class* __jsb_cc_scene_Node_class;
|
||||
|
||||
bool js_register_cc_scene_Node(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -79,7 +78,7 @@ SE_DECLARE_FUNC(js_scene_Node_initWithData);
|
||||
SE_DECLARE_FUNC(js_scene_Node_Node);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Light_proto;
|
||||
extern se::Class* __jsb_cc_scene_Light_class;
|
||||
extern se::Class* __jsb_cc_scene_Light_class;
|
||||
|
||||
bool js_register_cc_scene_Light(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -95,7 +94,7 @@ SE_DECLARE_FUNC(js_scene_Light_setUseColorTemperature);
|
||||
SE_DECLARE_FUNC(js_scene_Light_update);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_DirectionalLight_proto;
|
||||
extern se::Class* __jsb_cc_scene_DirectionalLight_class;
|
||||
extern se::Class* __jsb_cc_scene_DirectionalLight_class;
|
||||
|
||||
bool js_register_cc_scene_DirectionalLight(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -129,26 +128,26 @@ SE_DECLARE_FUNC(js_scene_DirectionalLight_setShadowSaturation);
|
||||
SE_DECLARE_FUNC(js_scene_DirectionalLight_DirectionalLight);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Plane_proto;
|
||||
extern se::Class* __jsb_cc_scene_Plane_class;
|
||||
extern se::Class* __jsb_cc_scene_Plane_class;
|
||||
|
||||
bool js_register_cc_scene_Plane(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Plane *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Plane*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Plane);
|
||||
SE_DECLARE_FUNC(js_scene_Plane_clone);
|
||||
SE_DECLARE_FUNC(js_scene_Plane_define);
|
||||
SE_DECLARE_FUNC(js_scene_Plane_distance);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Frustum_proto;
|
||||
extern se::Class* __jsb_cc_scene_Frustum_class;
|
||||
extern se::Class* __jsb_cc_scene_Frustum_class;
|
||||
|
||||
bool js_register_cc_scene_Frustum(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Frustum *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Frustum*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Frustum);
|
||||
SE_DECLARE_FUNC(js_scene_Frustum_clone);
|
||||
SE_DECLARE_FUNC(js_scene_Frustum_createOrtho);
|
||||
@@ -156,7 +155,7 @@ SE_DECLARE_FUNC(js_scene_Frustum_split);
|
||||
SE_DECLARE_FUNC(js_scene_Frustum_transform);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_AABB_proto;
|
||||
extern se::Class* __jsb_cc_scene_AABB_class;
|
||||
extern se::Class* __jsb_cc_scene_AABB_class;
|
||||
|
||||
bool js_register_cc_scene_AABB(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -168,7 +167,7 @@ SE_DECLARE_FUNC(js_scene_AABB_initWithData);
|
||||
SE_DECLARE_FUNC(js_scene_AABB_AABB);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_SpotLight_proto;
|
||||
extern se::Class* __jsb_cc_scene_SpotLight_class;
|
||||
extern se::Class* __jsb_cc_scene_SpotLight_class;
|
||||
|
||||
bool js_register_cc_scene_SpotLight(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -196,7 +195,7 @@ SE_DECLARE_FUNC(js_scene_SpotLight_setSize);
|
||||
SE_DECLARE_FUNC(js_scene_SpotLight_SpotLight);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_SphereLight_proto;
|
||||
extern se::Class* __jsb_cc_scene_SphereLight_class;
|
||||
extern se::Class* __jsb_cc_scene_SphereLight_class;
|
||||
|
||||
bool js_register_cc_scene_SphereLight(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -211,7 +210,7 @@ SE_DECLARE_FUNC(js_scene_SphereLight_setSize);
|
||||
SE_DECLARE_FUNC(js_scene_SphereLight_SphereLight);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Model_proto;
|
||||
extern se::Class* __jsb_cc_scene_Model_class;
|
||||
extern se::Class* __jsb_cc_scene_Model_class;
|
||||
|
||||
bool js_register_cc_scene_Model(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -251,77 +250,77 @@ SE_DECLARE_FUNC(js_scene_Model_updateWorldBoundUBOs);
|
||||
SE_DECLARE_FUNC(js_scene_Model_Model);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Fog_proto;
|
||||
extern se::Class* __jsb_cc_scene_Fog_class;
|
||||
extern se::Class* __jsb_cc_scene_Fog_class;
|
||||
|
||||
bool js_register_cc_scene_Fog(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Fog *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Fog*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Fog);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Shadow_proto;
|
||||
extern se::Class* __jsb_cc_scene_Shadow_class;
|
||||
extern se::Class* __jsb_cc_scene_Shadow_class;
|
||||
|
||||
bool js_register_cc_scene_Shadow(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Shadow *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Shadow*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Shadow);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Skybox_proto;
|
||||
extern se::Class* __jsb_cc_scene_Skybox_class;
|
||||
extern se::Class* __jsb_cc_scene_Skybox_class;
|
||||
|
||||
bool js_register_cc_scene_Skybox(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Skybox *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Skybox*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Skybox);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Ambient_proto;
|
||||
extern se::Class* __jsb_cc_scene_Ambient_class;
|
||||
extern se::Class* __jsb_cc_scene_Ambient_class;
|
||||
|
||||
bool js_register_cc_scene_Ambient(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Ambient *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Ambient*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Ambient);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_OctreeInfo_proto;
|
||||
extern se::Class* __jsb_cc_scene_OctreeInfo_class;
|
||||
extern se::Class* __jsb_cc_scene_OctreeInfo_class;
|
||||
|
||||
bool js_register_cc_scene_OctreeInfo(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::OctreeInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::OctreeInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::OctreeInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_PipelineSharedSceneData_proto;
|
||||
extern se::Class* __jsb_cc_scene_PipelineSharedSceneData_class;
|
||||
extern se::Class* __jsb_cc_scene_PipelineSharedSceneData_class;
|
||||
|
||||
bool js_register_cc_scene_PipelineSharedSceneData(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::PipelineSharedSceneData *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::PipelineSharedSceneData*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::PipelineSharedSceneData);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Root_proto;
|
||||
extern se::Class* __jsb_cc_scene_Root_class;
|
||||
extern se::Class* __jsb_cc_scene_Root_class;
|
||||
|
||||
bool js_register_cc_scene_Root(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Root *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Root*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Root);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_SubModel_proto;
|
||||
extern se::Class* __jsb_cc_scene_SubModel_class;
|
||||
extern se::Class* __jsb_cc_scene_SubModel_class;
|
||||
|
||||
bool js_register_cc_scene_SubModel(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -350,7 +349,7 @@ SE_DECLARE_FUNC(js_scene_SubModel_update);
|
||||
SE_DECLARE_FUNC(js_scene_SubModel_SubModel);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Pass_proto;
|
||||
extern se::Class* __jsb_cc_scene_Pass_class;
|
||||
extern se::Class* __jsb_cc_scene_Pass_class;
|
||||
|
||||
bool js_register_cc_scene_Pass(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -386,28 +385,28 @@ SE_DECLARE_FUNC(js_scene_Pass_update);
|
||||
SE_DECLARE_FUNC(js_scene_Pass_Pass);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_BakedAnimInfo_proto;
|
||||
extern se::Class* __jsb_cc_scene_BakedAnimInfo_class;
|
||||
extern se::Class* __jsb_cc_scene_BakedAnimInfo_class;
|
||||
|
||||
bool js_register_cc_scene_BakedAnimInfo(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::BakedAnimInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::BakedAnimInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::BakedAnimInfo);
|
||||
SE_DECLARE_FUNC(js_scene_BakedAnimInfo_getDirty);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_BakedJointInfo_proto;
|
||||
extern se::Class* __jsb_cc_scene_BakedJointInfo_class;
|
||||
extern se::Class* __jsb_cc_scene_BakedJointInfo_class;
|
||||
|
||||
bool js_register_cc_scene_BakedJointInfo(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::BakedJointInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::BakedJointInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::BakedJointInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_BakedSkinningModel_proto;
|
||||
extern se::Class* __jsb_cc_scene_BakedSkinningModel_class;
|
||||
extern se::Class* __jsb_cc_scene_BakedSkinningModel_class;
|
||||
|
||||
bool js_register_cc_scene_BakedSkinningModel(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -419,37 +418,37 @@ SE_DECLARE_FUNC(js_scene_BakedSkinningModel_updateModelBounds);
|
||||
SE_DECLARE_FUNC(js_scene_BakedSkinningModel_BakedSkinningModel);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_DrawBatch2D_proto;
|
||||
extern se::Class* __jsb_cc_scene_DrawBatch2D_class;
|
||||
extern se::Class* __jsb_cc_scene_DrawBatch2D_class;
|
||||
|
||||
bool js_register_cc_scene_DrawBatch2D(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::DrawBatch2D *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::DrawBatch2D*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::DrawBatch2D);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_JointTransform_proto;
|
||||
extern se::Class* __jsb_cc_scene_JointTransform_class;
|
||||
extern se::Class* __jsb_cc_scene_JointTransform_class;
|
||||
|
||||
bool js_register_cc_scene_JointTransform(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::JointTransform *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::JointTransform*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::JointTransform);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_JointInfo_proto;
|
||||
extern se::Class* __jsb_cc_scene_JointInfo_class;
|
||||
extern se::Class* __jsb_cc_scene_JointInfo_class;
|
||||
|
||||
bool js_register_cc_scene_JointInfo(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::JointInfo *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::JointInfo*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::JointInfo);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_SkinningModel_proto;
|
||||
extern se::Class* __jsb_cc_scene_SkinningModel_class;
|
||||
extern se::Class* __jsb_cc_scene_SkinningModel_class;
|
||||
|
||||
bool js_register_cc_scene_SkinningModel(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -462,7 +461,7 @@ SE_DECLARE_FUNC(js_scene_SkinningModel_updateLocalDescriptors);
|
||||
SE_DECLARE_FUNC(js_scene_SkinningModel_SkinningModel);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_RenderScene_proto;
|
||||
extern se::Class* __jsb_cc_scene_RenderScene_class;
|
||||
extern se::Class* __jsb_cc_scene_RenderScene_class;
|
||||
|
||||
bool js_register_cc_scene_RenderScene(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
@@ -493,29 +492,29 @@ SE_DECLARE_FUNC(js_scene_RenderScene_update);
|
||||
SE_DECLARE_FUNC(js_scene_RenderScene_RenderScene);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_RenderWindow_proto;
|
||||
extern se::Class* __jsb_cc_scene_RenderWindow_class;
|
||||
extern se::Class* __jsb_cc_scene_RenderWindow_class;
|
||||
|
||||
bool js_register_cc_scene_RenderWindow(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::RenderWindow *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::RenderWindow*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::RenderWindow);
|
||||
SE_DECLARE_FUNC(js_scene_RenderWindow_getHeight);
|
||||
SE_DECLARE_FUNC(js_scene_RenderWindow_getWidth);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Camera_proto;
|
||||
extern se::Class* __jsb_cc_scene_Camera_class;
|
||||
extern se::Class* __jsb_cc_scene_Camera_class;
|
||||
|
||||
bool js_register_cc_scene_Camera(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
template<>
|
||||
bool sevalue_to_native(const se::Value &, cc::scene::Camera *, se::Object *ctx);
|
||||
template <>
|
||||
bool sevalue_to_native(const se::Value&, cc::scene::Camera*, se::Object* ctx);
|
||||
JSB_REGISTER_OBJECT_TYPE(cc::scene::Camera);
|
||||
|
||||
extern se::Object* __jsb_cc_scene_Sphere_proto;
|
||||
extern se::Class* __jsb_cc_scene_Sphere_class;
|
||||
extern se::Class* __jsb_cc_scene_Sphere_class;
|
||||
|
||||
bool js_register_cc_scene_Sphere(se::Object* obj);
|
||||
bool register_all_scene(se::Object* obj);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,14 +24,14 @@
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#include <type_traits>
|
||||
#include "base/Config.h"
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/editor-support/spine-creator-support/spine-cocos2dx.h"
|
||||
|
||||
extern se::Object* __jsb_spine_Animation_proto;
|
||||
extern se::Class* __jsb_spine_Animation_class;
|
||||
extern se::Class* __jsb_spine_Animation_class;
|
||||
|
||||
bool js_register_spine_Animation(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -44,7 +44,7 @@ SE_DECLARE_FUNC(js_spine_Animation_hasTimeline);
|
||||
SE_DECLARE_FUNC(js_spine_Animation_setDuration);
|
||||
|
||||
extern se::Object* __jsb_spine_TrackEntry_proto;
|
||||
extern se::Class* __jsb_spine_TrackEntry_class;
|
||||
extern se::Class* __jsb_spine_TrackEntry_class;
|
||||
|
||||
bool js_register_spine_TrackEntry(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -92,7 +92,7 @@ SE_DECLARE_FUNC(js_spine_TrackEntry_setTrackEnd);
|
||||
SE_DECLARE_FUNC(js_spine_TrackEntry_setTrackTime);
|
||||
|
||||
extern se::Object* __jsb_spine_AnimationState_proto;
|
||||
extern se::Class* __jsb_spine_AnimationState_class;
|
||||
extern se::Class* __jsb_spine_AnimationState_class;
|
||||
|
||||
bool js_register_spine_AnimationState(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -115,7 +115,7 @@ SE_DECLARE_FUNC(js_spine_AnimationState_setTimeScale);
|
||||
SE_DECLARE_FUNC(js_spine_AnimationState_update);
|
||||
|
||||
extern se::Object* __jsb_spine_AnimationStateData_proto;
|
||||
extern se::Class* __jsb_spine_AnimationStateData_class;
|
||||
extern se::Class* __jsb_spine_AnimationStateData_class;
|
||||
|
||||
bool js_register_spine_AnimationStateData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -128,7 +128,7 @@ SE_DECLARE_FUNC(js_spine_AnimationStateData_setDefaultMix);
|
||||
SE_DECLARE_FUNC(js_spine_AnimationStateData_setMix);
|
||||
|
||||
extern se::Object* __jsb_spine_Attachment_proto;
|
||||
extern se::Class* __jsb_spine_Attachment_class;
|
||||
extern se::Class* __jsb_spine_Attachment_class;
|
||||
|
||||
bool js_register_spine_Attachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -141,7 +141,7 @@ SE_DECLARE_FUNC(js_spine_Attachment_getRefCount);
|
||||
SE_DECLARE_FUNC(js_spine_Attachment_reference);
|
||||
|
||||
extern se::Object* __jsb_spine_Timeline_proto;
|
||||
extern se::Class* __jsb_spine_Timeline_class;
|
||||
extern se::Class* __jsb_spine_Timeline_class;
|
||||
|
||||
bool js_register_spine_Timeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -150,7 +150,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::Timeline);
|
||||
SE_DECLARE_FUNC(js_spine_Timeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_AttachmentTimeline_proto;
|
||||
extern se::Class* __jsb_spine_AttachmentTimeline_class;
|
||||
extern se::Class* __jsb_spine_AttachmentTimeline_class;
|
||||
|
||||
bool js_register_spine_AttachmentTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -165,7 +165,7 @@ SE_DECLARE_FUNC(js_spine_AttachmentTimeline_setFrame);
|
||||
SE_DECLARE_FUNC(js_spine_AttachmentTimeline_setSlotIndex);
|
||||
|
||||
extern se::Object* __jsb_spine_Bone_proto;
|
||||
extern se::Class* __jsb_spine_Bone_class;
|
||||
extern se::Class* __jsb_spine_Bone_class;
|
||||
|
||||
bool js_register_spine_Bone(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -233,7 +233,7 @@ SE_DECLARE_FUNC(js_spine_Bone_setYDown);
|
||||
SE_DECLARE_FUNC(js_spine_Bone_isYDown);
|
||||
|
||||
extern se::Object* __jsb_spine_BoneData_proto;
|
||||
extern se::Class* __jsb_spine_BoneData_class;
|
||||
extern se::Class* __jsb_spine_BoneData_class;
|
||||
|
||||
bool js_register_spine_BoneData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -264,7 +264,7 @@ SE_DECLARE_FUNC(js_spine_BoneData_setX);
|
||||
SE_DECLARE_FUNC(js_spine_BoneData_setY);
|
||||
|
||||
extern se::Object* __jsb_spine_VertexAttachment_proto;
|
||||
extern se::Class* __jsb_spine_VertexAttachment_class;
|
||||
extern se::Class* __jsb_spine_VertexAttachment_class;
|
||||
|
||||
bool js_register_spine_VertexAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -279,7 +279,7 @@ SE_DECLARE_FUNC(js_spine_VertexAttachment_setDeformAttachment);
|
||||
SE_DECLARE_FUNC(js_spine_VertexAttachment_setWorldVerticesLength);
|
||||
|
||||
extern se::Object* __jsb_spine_BoundingBoxAttachment_proto;
|
||||
extern se::Class* __jsb_spine_BoundingBoxAttachment_class;
|
||||
extern se::Class* __jsb_spine_BoundingBoxAttachment_class;
|
||||
|
||||
bool js_register_spine_BoundingBoxAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -288,7 +288,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::BoundingBoxAttachment);
|
||||
SE_DECLARE_FUNC(js_spine_BoundingBoxAttachment_copy);
|
||||
|
||||
extern se::Object* __jsb_spine_ClippingAttachment_proto;
|
||||
extern se::Class* __jsb_spine_ClippingAttachment_class;
|
||||
extern se::Class* __jsb_spine_ClippingAttachment_class;
|
||||
|
||||
bool js_register_spine_ClippingAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -299,7 +299,7 @@ SE_DECLARE_FUNC(js_spine_ClippingAttachment_getEndSlot);
|
||||
SE_DECLARE_FUNC(js_spine_ClippingAttachment_setEndSlot);
|
||||
|
||||
extern se::Object* __jsb_spine_Color_proto;
|
||||
extern se::Class* __jsb_spine_Color_class;
|
||||
extern se::Class* __jsb_spine_Color_class;
|
||||
|
||||
bool js_register_spine_Color(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -308,7 +308,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::Color);
|
||||
SE_DECLARE_FUNC(js_spine_Color_clamp);
|
||||
|
||||
extern se::Object* __jsb_spine_CurveTimeline_proto;
|
||||
extern se::Class* __jsb_spine_CurveTimeline_class;
|
||||
extern se::Class* __jsb_spine_CurveTimeline_class;
|
||||
|
||||
bool js_register_spine_CurveTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -323,7 +323,7 @@ SE_DECLARE_FUNC(js_spine_CurveTimeline_setLinear);
|
||||
SE_DECLARE_FUNC(js_spine_CurveTimeline_setStepped);
|
||||
|
||||
extern se::Object* __jsb_spine_ColorTimeline_proto;
|
||||
extern se::Class* __jsb_spine_ColorTimeline_class;
|
||||
extern se::Class* __jsb_spine_ColorTimeline_class;
|
||||
|
||||
bool js_register_spine_ColorTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -336,7 +336,7 @@ SE_DECLARE_FUNC(js_spine_ColorTimeline_setFrame);
|
||||
SE_DECLARE_FUNC(js_spine_ColorTimeline_setSlotIndex);
|
||||
|
||||
extern se::Object* __jsb_spine_ConstraintData_proto;
|
||||
extern se::Class* __jsb_spine_ConstraintData_class;
|
||||
extern se::Class* __jsb_spine_ConstraintData_class;
|
||||
|
||||
bool js_register_spine_ConstraintData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -349,7 +349,7 @@ SE_DECLARE_FUNC(js_spine_ConstraintData_setOrder);
|
||||
SE_DECLARE_FUNC(js_spine_ConstraintData_setSkinRequired);
|
||||
|
||||
extern se::Object* __jsb_spine_DeformTimeline_proto;
|
||||
extern se::Class* __jsb_spine_DeformTimeline_class;
|
||||
extern se::Class* __jsb_spine_DeformTimeline_class;
|
||||
|
||||
bool js_register_spine_DeformTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -363,7 +363,7 @@ SE_DECLARE_FUNC(js_spine_DeformTimeline_setAttachment);
|
||||
SE_DECLARE_FUNC(js_spine_DeformTimeline_setSlotIndex);
|
||||
|
||||
extern se::Object* __jsb_spine_DrawOrderTimeline_proto;
|
||||
extern se::Class* __jsb_spine_DrawOrderTimeline_class;
|
||||
extern se::Class* __jsb_spine_DrawOrderTimeline_class;
|
||||
|
||||
bool js_register_spine_DrawOrderTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -374,7 +374,7 @@ SE_DECLARE_FUNC(js_spine_DrawOrderTimeline_getFrames);
|
||||
SE_DECLARE_FUNC(js_spine_DrawOrderTimeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_Event_proto;
|
||||
extern se::Class* __jsb_spine_Event_class;
|
||||
extern se::Class* __jsb_spine_Event_class;
|
||||
|
||||
bool js_register_spine_Event(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -394,7 +394,7 @@ SE_DECLARE_FUNC(js_spine_Event_setStringValue);
|
||||
SE_DECLARE_FUNC(js_spine_Event_setVolume);
|
||||
|
||||
extern se::Object* __jsb_spine_EventData_proto;
|
||||
extern se::Class* __jsb_spine_EventData_class;
|
||||
extern se::Class* __jsb_spine_EventData_class;
|
||||
|
||||
bool js_register_spine_EventData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -415,7 +415,7 @@ SE_DECLARE_FUNC(js_spine_EventData_setStringValue);
|
||||
SE_DECLARE_FUNC(js_spine_EventData_setVolume);
|
||||
|
||||
extern se::Object* __jsb_spine_EventTimeline_proto;
|
||||
extern se::Class* __jsb_spine_EventTimeline_class;
|
||||
extern se::Class* __jsb_spine_EventTimeline_class;
|
||||
|
||||
bool js_register_spine_EventTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -428,7 +428,7 @@ SE_DECLARE_FUNC(js_spine_EventTimeline_getPropertyId);
|
||||
SE_DECLARE_FUNC(js_spine_EventTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_IkConstraint_proto;
|
||||
extern se::Class* __jsb_spine_IkConstraint_class;
|
||||
extern se::Class* __jsb_spine_IkConstraint_class;
|
||||
|
||||
bool js_register_spine_IkConstraint(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -454,7 +454,7 @@ SE_DECLARE_FUNC(js_spine_IkConstraint_setTarget);
|
||||
SE_DECLARE_FUNC(js_spine_IkConstraint_update);
|
||||
|
||||
extern se::Object* __jsb_spine_IkConstraintData_proto;
|
||||
extern se::Class* __jsb_spine_IkConstraintData_class;
|
||||
extern se::Class* __jsb_spine_IkConstraintData_class;
|
||||
|
||||
bool js_register_spine_IkConstraintData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -477,7 +477,7 @@ SE_DECLARE_FUNC(js_spine_IkConstraintData_setTarget);
|
||||
SE_DECLARE_FUNC(js_spine_IkConstraintData_setUniform);
|
||||
|
||||
extern se::Object* __jsb_spine_IkConstraintTimeline_proto;
|
||||
extern se::Class* __jsb_spine_IkConstraintTimeline_class;
|
||||
extern se::Class* __jsb_spine_IkConstraintTimeline_class;
|
||||
|
||||
bool js_register_spine_IkConstraintTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -487,7 +487,7 @@ SE_DECLARE_FUNC(js_spine_IkConstraintTimeline_getPropertyId);
|
||||
SE_DECLARE_FUNC(js_spine_IkConstraintTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_MeshAttachment_proto;
|
||||
extern se::Class* __jsb_spine_MeshAttachment_class;
|
||||
extern se::Class* __jsb_spine_MeshAttachment_class;
|
||||
|
||||
bool js_register_spine_MeshAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -537,7 +537,7 @@ SE_DECLARE_FUNC(js_spine_MeshAttachment_setWidth);
|
||||
SE_DECLARE_FUNC(js_spine_MeshAttachment_updateUVs);
|
||||
|
||||
extern se::Object* __jsb_spine_PathAttachment_proto;
|
||||
extern se::Class* __jsb_spine_PathAttachment_class;
|
||||
extern se::Class* __jsb_spine_PathAttachment_class;
|
||||
|
||||
bool js_register_spine_PathAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -551,7 +551,7 @@ SE_DECLARE_FUNC(js_spine_PathAttachment_setClosed);
|
||||
SE_DECLARE_FUNC(js_spine_PathAttachment_setConstantSpeed);
|
||||
|
||||
extern se::Object* __jsb_spine_PathConstraint_proto;
|
||||
extern se::Class* __jsb_spine_PathConstraint_class;
|
||||
extern se::Class* __jsb_spine_PathConstraint_class;
|
||||
|
||||
bool js_register_spine_PathConstraint(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -576,7 +576,7 @@ SE_DECLARE_FUNC(js_spine_PathConstraint_setTranslateMix);
|
||||
SE_DECLARE_FUNC(js_spine_PathConstraint_update);
|
||||
|
||||
extern se::Object* __jsb_spine_PathConstraintData_proto;
|
||||
extern se::Class* __jsb_spine_PathConstraintData_class;
|
||||
extern se::Class* __jsb_spine_PathConstraintData_class;
|
||||
|
||||
bool js_register_spine_PathConstraintData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -603,7 +603,7 @@ SE_DECLARE_FUNC(js_spine_PathConstraintData_setTarget);
|
||||
SE_DECLARE_FUNC(js_spine_PathConstraintData_setTranslateMix);
|
||||
|
||||
extern se::Object* __jsb_spine_PathConstraintMixTimeline_proto;
|
||||
extern se::Class* __jsb_spine_PathConstraintMixTimeline_class;
|
||||
extern se::Class* __jsb_spine_PathConstraintMixTimeline_class;
|
||||
|
||||
bool js_register_spine_PathConstraintMixTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -612,7 +612,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::PathConstraintMixTimeline);
|
||||
SE_DECLARE_FUNC(js_spine_PathConstraintMixTimeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_PathConstraintPositionTimeline_proto;
|
||||
extern se::Class* __jsb_spine_PathConstraintPositionTimeline_class;
|
||||
extern se::Class* __jsb_spine_PathConstraintPositionTimeline_class;
|
||||
|
||||
bool js_register_spine_PathConstraintPositionTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -622,7 +622,7 @@ SE_DECLARE_FUNC(js_spine_PathConstraintPositionTimeline_getPropertyId);
|
||||
SE_DECLARE_FUNC(js_spine_PathConstraintPositionTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_PathConstraintSpacingTimeline_proto;
|
||||
extern se::Class* __jsb_spine_PathConstraintSpacingTimeline_class;
|
||||
extern se::Class* __jsb_spine_PathConstraintSpacingTimeline_class;
|
||||
|
||||
bool js_register_spine_PathConstraintSpacingTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -631,7 +631,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::PathConstraintSpacingTimeline);
|
||||
SE_DECLARE_FUNC(js_spine_PathConstraintSpacingTimeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_PointAttachment_proto;
|
||||
extern se::Class* __jsb_spine_PointAttachment_class;
|
||||
extern se::Class* __jsb_spine_PointAttachment_class;
|
||||
|
||||
bool js_register_spine_PointAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -646,7 +646,7 @@ SE_DECLARE_FUNC(js_spine_PointAttachment_setX);
|
||||
SE_DECLARE_FUNC(js_spine_PointAttachment_setY);
|
||||
|
||||
extern se::Object* __jsb_spine_RegionAttachment_proto;
|
||||
extern se::Class* __jsb_spine_RegionAttachment_class;
|
||||
extern se::Class* __jsb_spine_RegionAttachment_class;
|
||||
|
||||
bool js_register_spine_RegionAttachment(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -688,7 +688,7 @@ SE_DECLARE_FUNC(js_spine_RegionAttachment_setY);
|
||||
SE_DECLARE_FUNC(js_spine_RegionAttachment_updateOffset);
|
||||
|
||||
extern se::Object* __jsb_spine_RotateTimeline_proto;
|
||||
extern se::Class* __jsb_spine_RotateTimeline_class;
|
||||
extern se::Class* __jsb_spine_RotateTimeline_class;
|
||||
|
||||
bool js_register_spine_RotateTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -701,7 +701,7 @@ SE_DECLARE_FUNC(js_spine_RotateTimeline_setBoneIndex);
|
||||
SE_DECLARE_FUNC(js_spine_RotateTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_TranslateTimeline_proto;
|
||||
extern se::Class* __jsb_spine_TranslateTimeline_class;
|
||||
extern se::Class* __jsb_spine_TranslateTimeline_class;
|
||||
|
||||
bool js_register_spine_TranslateTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -711,7 +711,7 @@ SE_DECLARE_FUNC(js_spine_TranslateTimeline_getPropertyId);
|
||||
SE_DECLARE_FUNC(js_spine_TranslateTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_ScaleTimeline_proto;
|
||||
extern se::Class* __jsb_spine_ScaleTimeline_class;
|
||||
extern se::Class* __jsb_spine_ScaleTimeline_class;
|
||||
|
||||
bool js_register_spine_ScaleTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -720,7 +720,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::ScaleTimeline);
|
||||
SE_DECLARE_FUNC(js_spine_ScaleTimeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_ShearTimeline_proto;
|
||||
extern se::Class* __jsb_spine_ShearTimeline_class;
|
||||
extern se::Class* __jsb_spine_ShearTimeline_class;
|
||||
|
||||
bool js_register_spine_ShearTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -729,7 +729,7 @@ JSB_REGISTER_OBJECT_TYPE(spine::ShearTimeline);
|
||||
SE_DECLARE_FUNC(js_spine_ShearTimeline_getPropertyId);
|
||||
|
||||
extern se::Object* __jsb_spine_Skeleton_proto;
|
||||
extern se::Class* __jsb_spine_Skeleton_class;
|
||||
extern se::Class* __jsb_spine_Skeleton_class;
|
||||
|
||||
bool js_register_spine_Skeleton(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -776,7 +776,7 @@ SE_DECLARE_FUNC(js_spine_Skeleton_updateCache);
|
||||
SE_DECLARE_FUNC(js_spine_Skeleton_updateWorldTransform);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonBounds_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonBounds_class;
|
||||
extern se::Class* __jsb_spine_SkeletonBounds_class;
|
||||
|
||||
bool js_register_spine_SkeletonBounds(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -791,7 +791,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonBounds_getWidth);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonBounds_intersectsSegment);
|
||||
|
||||
extern se::Object* __jsb_spine_Polygon_proto;
|
||||
extern se::Class* __jsb_spine_Polygon_class;
|
||||
extern se::Class* __jsb_spine_Polygon_class;
|
||||
|
||||
bool js_register_spine_Polygon(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -799,7 +799,7 @@ bool register_all_spine(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(spine::Polygon);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonData_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonData_class;
|
||||
extern se::Class* __jsb_spine_SkeletonData_class;
|
||||
|
||||
bool js_register_spine_SkeletonData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -848,7 +848,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonData_setX);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonData_setY);
|
||||
|
||||
extern se::Object* __jsb_spine_Skin_proto;
|
||||
extern se::Class* __jsb_spine_Skin_class;
|
||||
extern se::Class* __jsb_spine_Skin_class;
|
||||
|
||||
bool js_register_spine_Skin(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -864,7 +864,7 @@ SE_DECLARE_FUNC(js_spine_Skin_removeAttachment);
|
||||
SE_DECLARE_FUNC(js_spine_Skin_setAttachment);
|
||||
|
||||
extern se::Object* __jsb_spine_Slot_proto;
|
||||
extern se::Class* __jsb_spine_Slot_class;
|
||||
extern se::Class* __jsb_spine_Slot_class;
|
||||
|
||||
bool js_register_spine_Slot(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -884,7 +884,7 @@ SE_DECLARE_FUNC(js_spine_Slot_setAttachmentTime);
|
||||
SE_DECLARE_FUNC(js_spine_Slot_setToSetupPose);
|
||||
|
||||
extern se::Object* __jsb_spine_SlotData_proto;
|
||||
extern se::Class* __jsb_spine_SlotData_class;
|
||||
extern se::Class* __jsb_spine_SlotData_class;
|
||||
|
||||
bool js_register_spine_SlotData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -903,7 +903,7 @@ SE_DECLARE_FUNC(js_spine_SlotData_setBlendMode);
|
||||
SE_DECLARE_FUNC(js_spine_SlotData_setHasDarkColor);
|
||||
|
||||
extern se::Object* __jsb_spine_TransformConstraint_proto;
|
||||
extern se::Class* __jsb_spine_TransformConstraint_class;
|
||||
extern se::Class* __jsb_spine_TransformConstraint_class;
|
||||
|
||||
bool js_register_spine_TransformConstraint(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -928,7 +928,7 @@ SE_DECLARE_FUNC(js_spine_TransformConstraint_setTranslateMix);
|
||||
SE_DECLARE_FUNC(js_spine_TransformConstraint_update);
|
||||
|
||||
extern se::Object* __jsb_spine_TransformConstraintData_proto;
|
||||
extern se::Class* __jsb_spine_TransformConstraintData_class;
|
||||
extern se::Class* __jsb_spine_TransformConstraintData_class;
|
||||
|
||||
bool js_register_spine_TransformConstraintData(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -950,7 +950,7 @@ SE_DECLARE_FUNC(js_spine_TransformConstraintData_isLocal);
|
||||
SE_DECLARE_FUNC(js_spine_TransformConstraintData_isRelative);
|
||||
|
||||
extern se::Object* __jsb_spine_TransformConstraintTimeline_proto;
|
||||
extern se::Class* __jsb_spine_TransformConstraintTimeline_class;
|
||||
extern se::Class* __jsb_spine_TransformConstraintTimeline_class;
|
||||
|
||||
bool js_register_spine_TransformConstraintTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -960,7 +960,7 @@ SE_DECLARE_FUNC(js_spine_TransformConstraintTimeline_getPropertyId);
|
||||
SE_DECLARE_FUNC(js_spine_TransformConstraintTimeline_setFrame);
|
||||
|
||||
extern se::Object* __jsb_spine_TwoColorTimeline_proto;
|
||||
extern se::Class* __jsb_spine_TwoColorTimeline_class;
|
||||
extern se::Class* __jsb_spine_TwoColorTimeline_class;
|
||||
|
||||
bool js_register_spine_TwoColorTimeline(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -972,7 +972,7 @@ SE_DECLARE_FUNC(js_spine_TwoColorTimeline_setFrame);
|
||||
SE_DECLARE_FUNC(js_spine_TwoColorTimeline_setSlotIndex);
|
||||
|
||||
extern se::Object* __jsb_spine_VertexEffect_proto;
|
||||
extern se::Class* __jsb_spine_VertexEffect_class;
|
||||
extern se::Class* __jsb_spine_VertexEffect_class;
|
||||
|
||||
bool js_register_spine_VertexEffect(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -980,7 +980,7 @@ bool register_all_spine(se::Object* obj);
|
||||
JSB_REGISTER_OBJECT_TYPE(spine::VertexEffect);
|
||||
|
||||
extern se::Object* __jsb_spine_JitterVertexEffect_proto;
|
||||
extern se::Class* __jsb_spine_JitterVertexEffect_class;
|
||||
extern se::Class* __jsb_spine_JitterVertexEffect_class;
|
||||
|
||||
bool js_register_spine_JitterVertexEffect(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -992,7 +992,7 @@ SE_DECLARE_FUNC(js_spine_JitterVertexEffect_setJitterX);
|
||||
SE_DECLARE_FUNC(js_spine_JitterVertexEffect_setJitterY);
|
||||
|
||||
extern se::Object* __jsb_spine_SwirlVertexEffect_proto;
|
||||
extern se::Class* __jsb_spine_SwirlVertexEffect_class;
|
||||
extern se::Class* __jsb_spine_SwirlVertexEffect_class;
|
||||
|
||||
bool js_register_spine_SwirlVertexEffect(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1012,7 +1012,7 @@ SE_DECLARE_FUNC(js_spine_SwirlVertexEffect_setWorldX);
|
||||
SE_DECLARE_FUNC(js_spine_SwirlVertexEffect_setWorldY);
|
||||
|
||||
extern se::Object* __jsb_spine_VertexEffectDelegate_proto;
|
||||
extern se::Class* __jsb_spine_VertexEffectDelegate_class;
|
||||
extern se::Class* __jsb_spine_VertexEffectDelegate_class;
|
||||
|
||||
bool js_register_spine_VertexEffectDelegate(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1029,7 +1029,7 @@ SE_DECLARE_FUNC(js_spine_VertexEffectDelegate_initSwirlWithPowOut);
|
||||
SE_DECLARE_FUNC(js_spine_VertexEffectDelegate_VertexEffectDelegate);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonRenderer_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonRenderer_class;
|
||||
extern se::Class* __jsb_spine_SkeletonRenderer_class;
|
||||
|
||||
bool js_register_spine_SkeletonRenderer(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1075,7 +1075,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonRenderer_updateWorldTransform);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonRenderer_SkeletonRenderer);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonAnimation_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonAnimation_class;
|
||||
extern se::Class* __jsb_spine_SkeletonAnimation_class;
|
||||
|
||||
bool js_register_spine_SkeletonAnimation(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1112,7 +1112,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonAnimation_setGlobalTimeScale);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonAnimation_SkeletonAnimation);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonCacheAnimation_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonCacheAnimation_class;
|
||||
extern se::Class* __jsb_spine_SkeletonCacheAnimation_class;
|
||||
|
||||
bool js_register_spine_SkeletonCacheAnimation(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1154,7 +1154,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonCacheAnimation_updateAnimationCache);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonCacheAnimation_SkeletonCacheAnimation);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonCacheMgr_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonCacheMgr_class;
|
||||
extern se::Class* __jsb_spine_SkeletonCacheMgr_class;
|
||||
|
||||
bool js_register_spine_SkeletonCacheMgr(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
@@ -1166,7 +1166,7 @@ SE_DECLARE_FUNC(js_spine_SkeletonCacheMgr_getInstance);
|
||||
SE_DECLARE_FUNC(js_spine_SkeletonCacheMgr_destroyInstance);
|
||||
|
||||
extern se::Object* __jsb_spine_SkeletonDataMgr_proto;
|
||||
extern se::Class* __jsb_spine_SkeletonDataMgr_class;
|
||||
extern se::Class* __jsb_spine_SkeletonDataMgr_class;
|
||||
|
||||
bool js_register_spine_SkeletonDataMgr(se::Object* obj);
|
||||
bool register_all_spine(se::Object* obj);
|
||||
|
||||
@@ -25,34 +25,33 @@
|
||||
|
||||
#include "cocos/bindings/auto/jsb_video_auto.h"
|
||||
#if (USE_VIDEO > 0)
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "ui/videoplayer/VideoPlayer.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "ui/videoplayer/VideoPlayer.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_VideoPlayer_proto = nullptr;
|
||||
se::Class* __jsb_cc_VideoPlayer_class = nullptr;
|
||||
se::Class* __jsb_cc_VideoPlayer_class = nullptr;
|
||||
|
||||
static bool js_video_VideoPlayer_addEventListener(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_addEventListener : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 2) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<std::function<void ()>, true> arg1 = {};
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
HolderType<std::function<void()>, true> arg1 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
do {
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction())
|
||||
{
|
||||
if (args[1].isObject() && args[1].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[1]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -60,22 +59,19 @@ static bool js_video_VideoPlayer_addEventListener(se::State& s) // NOLINT(readab
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
se::AutoHandleScope hs;
|
||||
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(se::EmptyValueArray, thisObj, &rval);
|
||||
bool succeed = funcObj->call(se::EmptyValueArray, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg1.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg1.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_video_VideoPlayer_addEventListener : Error processing arguments");
|
||||
cobj->addEventListener(arg0.value(), arg1.value());
|
||||
return true;
|
||||
@@ -89,9 +85,9 @@ static bool js_video_VideoPlayer_currentTime(se::State& s) // NOLINT(readability
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_currentTime : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
float result = cobj->currentTime();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -108,9 +104,9 @@ static bool js_video_VideoPlayer_duration(se::State& s) // NOLINT(readability-id
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_duration : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
float result = cobj->duration();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -127,9 +123,9 @@ static bool js_video_VideoPlayer_isKeepAspectRatioEnabled(se::State& s) // NOLIN
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_isKeepAspectRatioEnabled : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->isKeepAspectRatioEnabled();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -146,9 +142,9 @@ static bool js_video_VideoPlayer_onPlayEvent(se::State& s) // NOLINT(readability
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_onPlayEvent : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<int, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -166,7 +162,7 @@ static bool js_video_VideoPlayer_pause(se::State& s) // NOLINT(readability-ident
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_pause : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->pause();
|
||||
return true;
|
||||
@@ -181,7 +177,7 @@ static bool js_video_VideoPlayer_play(se::State& s) // NOLINT(readability-identi
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_play : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->play();
|
||||
return true;
|
||||
@@ -195,9 +191,9 @@ static bool js_video_VideoPlayer_seekTo(se::State& s) // NOLINT(readability-iden
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_seekTo : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<float, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -214,9 +210,9 @@ static bool js_video_VideoPlayer_setFrame(se::State& s) // NOLINT(readability-id
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setFrame : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 4) {
|
||||
HolderType<float, false> arg0 = {};
|
||||
HolderType<float, false> arg1 = {};
|
||||
@@ -239,9 +235,9 @@ static bool js_video_VideoPlayer_setFullScreenEnabled(se::State& s) // NOLINT(re
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setFullScreenEnabled : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -258,9 +254,9 @@ static bool js_video_VideoPlayer_setKeepAspectRatioEnabled(se::State& s) // NOLI
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setKeepAspectRatioEnabled : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -277,9 +273,9 @@ static bool js_video_VideoPlayer_setURL(se::State& s) // NOLINT(readability-iden
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setURL : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -296,9 +292,9 @@ static bool js_video_VideoPlayer_setVisible(se::State& s) // NOLINT(readability-
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_setVisible : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -316,7 +312,7 @@ static bool js_video_VideoPlayer_stop(se::State& s) // NOLINT(readability-identi
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_video_VideoPlayer_stop : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->stop();
|
||||
return true;
|
||||
@@ -336,8 +332,6 @@ static bool js_video_VideoPlayer_constructor(se::State& s) // NOLINT(readability
|
||||
}
|
||||
SE_BIND_CTOR(js_video_VideoPlayer_constructor, __jsb_cc_VideoPlayer_class, js_cc_VideoPlayer_finalize)
|
||||
|
||||
|
||||
|
||||
static bool js_cc_VideoPlayer_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
// destructor is skipped
|
||||
@@ -350,8 +344,7 @@ static bool js_cc_VideoPlayer_destroy(se::State& s) // NOLINT(readability-identi
|
||||
auto* cobj = SE_THIS_OBJECT<cc::VideoPlayer>(s);
|
||||
cobj->release();
|
||||
auto objIter = se::NativePtrToObjectMap::find(SE_THIS_OBJECT<cc::VideoPlayer>(s));
|
||||
if(objIter != se::NativePtrToObjectMap::end())
|
||||
{
|
||||
if (objIter != se::NativePtrToObjectMap::end()) {
|
||||
objIter->second->clearPrivateData(true);
|
||||
}
|
||||
return true;
|
||||
@@ -387,12 +380,10 @@ bool js_register_video_VideoPlayer(se::Object* obj) // NOLINT(readability-identi
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_video(se::Object* obj)
|
||||
{
|
||||
bool register_all_video(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("jsb", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("jsb", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("jsb", nsVal);
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#if (USE_VIDEO > 0)
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/ui/videoplayer/VideoPlayer.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/ui/videoplayer/VideoPlayer.h"
|
||||
|
||||
extern se::Object* __jsb_cc_VideoPlayer_proto;
|
||||
extern se::Class* __jsb_cc_VideoPlayer_class;
|
||||
extern se::Class* __jsb_cc_VideoPlayer_class;
|
||||
|
||||
bool js_register_cc_VideoPlayer(se::Object* obj);
|
||||
bool register_all_video(se::Object* obj);
|
||||
|
||||
@@ -25,27 +25,27 @@
|
||||
|
||||
#include "cocos/bindings/auto/jsb_webview_auto.h"
|
||||
#if USE_WEBVIEW > 0
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "ui/webview/WebView.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/bindings/manual/jsb_global.h"
|
||||
#include "ui/webview/WebView.h"
|
||||
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
#ifndef JSB_ALLOC
|
||||
#define JSB_ALLOC(kls, ...) new (std::nothrow) kls(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
#ifndef JSB_FREE
|
||||
#define JSB_FREE(ptr) delete ptr
|
||||
#endif
|
||||
se::Object* __jsb_cc_WebView_proto = nullptr;
|
||||
se::Class* __jsb_cc_WebView_class = nullptr;
|
||||
se::Class* __jsb_cc_WebView_class = nullptr;
|
||||
|
||||
static bool js_webview_WebView_canGoBack(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_canGoBack : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->canGoBack();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -62,9 +62,9 @@ static bool js_webview_WebView_canGoForward(se::State& s) // NOLINT(readability-
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_canGoForward : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
bool result = cobj->canGoForward();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -81,9 +81,9 @@ static bool js_webview_WebView_evaluateJS(se::State& s) // NOLINT(readability-id
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_evaluateJS : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -100,9 +100,9 @@ static bool js_webview_WebView_getOnDidFailLoading(se::State& s) // NOLINT(reada
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_getOnDidFailLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::WebView::ccWebViewCallback result = cobj->getOnDidFailLoading();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -119,9 +119,9 @@ static bool js_webview_WebView_getOnDidFinishLoading(se::State& s) // NOLINT(rea
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_getOnDidFinishLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::WebView::ccWebViewCallback result = cobj->getOnDidFinishLoading();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -138,9 +138,9 @@ static bool js_webview_WebView_getOnJSCallback(se::State& s) // NOLINT(readabili
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_getOnJSCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
cc::WebView::ccWebViewCallback result = cobj->getOnJSCallback();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
@@ -157,11 +157,11 @@ static bool js_webview_WebView_getOnShouldStartLoading(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_getOnShouldStartLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
std::function<bool (cc::WebView *, const std::string)> result = cobj->getOnShouldStartLoading();
|
||||
std::function<bool(cc::WebView*, const std::string)> result = cobj->getOnShouldStartLoading();
|
||||
ok &= nativevalue_to_se(result, s.rval(), nullptr /*ctx*/);
|
||||
SE_PRECONDITION2(ok, false, "js_webview_WebView_getOnShouldStartLoading : Error processing arguments");
|
||||
SE_HOLD_RETURN_VALUE(result, s.thisObject(), s.rval());
|
||||
@@ -177,7 +177,7 @@ static bool js_webview_WebView_goBack(se::State& s) // NOLINT(readability-identi
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_goBack : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->goBack();
|
||||
return true;
|
||||
@@ -192,7 +192,7 @@ static bool js_webview_WebView_goForward(se::State& s) // NOLINT(readability-ide
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_goForward : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->goForward();
|
||||
return true;
|
||||
@@ -206,11 +206,11 @@ static bool js_webview_WebView_loadData(se::State& s) // NOLINT(readability-iden
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_loadData : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 4) {
|
||||
HolderType<cc::Data, true> arg0 = {};
|
||||
HolderType<cc::Data, true> arg0 = {};
|
||||
HolderType<std::string, true> arg1 = {};
|
||||
HolderType<std::string, true> arg2 = {};
|
||||
HolderType<std::string, true> arg3 = {};
|
||||
@@ -231,9 +231,9 @@ static bool js_webview_WebView_loadFile(se::State& s) // NOLINT(readability-iden
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_loadFile : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -250,9 +250,9 @@ static bool js_webview_WebView_loadHTMLString(se::State& s) // NOLINT(readabilit
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_loadHTMLString : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -278,9 +278,9 @@ static bool js_webview_WebView_loadURL(se::State& s) // NOLINT(readability-ident
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_loadURL : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -298,7 +298,7 @@ static bool js_webview_WebView_reload(se::State& s) // NOLINT(readability-identi
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_reload : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->reload();
|
||||
return true;
|
||||
@@ -312,9 +312,9 @@ static bool js_webview_WebView_setBackgroundTransparent(se::State& s) // NOLINT(
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setBackgroundTransparent : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -331,9 +331,9 @@ static bool js_webview_WebView_setBounces(se::State& s) // NOLINT(readability-id
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setBounces : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -350,9 +350,9 @@ static bool js_webview_WebView_setFrame(se::State& s) // NOLINT(readability-iden
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setFrame : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 4) {
|
||||
HolderType<float, false> arg0 = {};
|
||||
HolderType<float, false> arg1 = {};
|
||||
@@ -375,9 +375,9 @@ static bool js_webview_WebView_setJavascriptInterfaceScheme(se::State& s) // NOL
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setJavascriptInterfaceScheme : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::string, true> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -394,14 +394,13 @@ static bool js_webview_WebView_setOnDidFailLoading(se::State& s) // NOLINT(reada
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setOnDidFailLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (cc::WebView *, const std::string)>, true> arg0 = {};
|
||||
HolderType<std::function<void(cc::WebView*, const std::string)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -414,22 +413,19 @@ static bool js_webview_WebView_setOnDidFailLoading(se::State& s) // NOLINT(reada
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_webview_WebView_setOnDidFailLoading : Error processing arguments");
|
||||
cobj->setOnDidFailLoading(arg0.value());
|
||||
return true;
|
||||
@@ -443,14 +439,13 @@ static bool js_webview_WebView_setOnDidFinishLoading(se::State& s) // NOLINT(rea
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setOnDidFinishLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (cc::WebView *, const std::string)>, true> arg0 = {};
|
||||
HolderType<std::function<void(cc::WebView*, const std::string)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -463,22 +458,19 @@ static bool js_webview_WebView_setOnDidFinishLoading(se::State& s) // NOLINT(rea
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_webview_WebView_setOnDidFinishLoading : Error processing arguments");
|
||||
cobj->setOnDidFinishLoading(arg0.value());
|
||||
return true;
|
||||
@@ -492,14 +484,13 @@ static bool js_webview_WebView_setOnJSCallback(se::State& s) // NOLINT(readabili
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setOnJSCallback : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<void (cc::WebView *, const std::string)>, true> arg0 = {};
|
||||
HolderType<std::function<void(cc::WebView*, const std::string)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -512,22 +503,19 @@ static bool js_webview_WebView_setOnJSCallback(se::State& s) // NOLINT(readabili
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_webview_WebView_setOnJSCallback : Error processing arguments");
|
||||
cobj->setOnJSCallback(arg0.value());
|
||||
return true;
|
||||
@@ -541,14 +529,13 @@ static bool js_webview_WebView_setOnShouldStartLoading(se::State& s) // NOLINT(r
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setOnShouldStartLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<std::function<bool (cc::WebView *, const std::string)>, true> arg0 = {};
|
||||
HolderType<std::function<bool(cc::WebView*, const std::string)>, true> arg0 = {};
|
||||
do {
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction())
|
||||
{
|
||||
if (args[0].isObject() && args[0].toObject()->isFunction()) {
|
||||
se::Value jsThis(s.thisObject());
|
||||
se::Value jsFunc(args[0]);
|
||||
jsThis.toObject()->attachObject(jsFunc.toObject());
|
||||
@@ -561,10 +548,10 @@ static bool js_webview_WebView_setOnShouldStartLoading(se::State& s) // NOLINT(r
|
||||
args.resize(2);
|
||||
ok &= nativevalue_to_se(larg0, args[0], nullptr /*ctx*/);
|
||||
ok &= nativevalue_to_se(larg1, args[1], nullptr /*ctx*/);
|
||||
se::Value rval;
|
||||
se::Value rval;
|
||||
se::Object* thisObj = jsThis.isObject() ? jsThis.toObject() : nullptr;
|
||||
se::Object* funcObj = jsFunc.toObject();
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
bool succeed = funcObj->call(args, thisObj, &rval);
|
||||
if (!succeed) {
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
}
|
||||
@@ -574,13 +561,10 @@ static bool js_webview_WebView_setOnShouldStartLoading(se::State& s) // NOLINT(r
|
||||
return result;
|
||||
};
|
||||
arg0.data = lambda;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
arg0.data = nullptr;
|
||||
}
|
||||
} while(false)
|
||||
;
|
||||
} while (false);
|
||||
SE_PRECONDITION2(ok, false, "js_webview_WebView_setOnShouldStartLoading : Error processing arguments");
|
||||
cobj->setOnShouldStartLoading(arg0.value());
|
||||
return true;
|
||||
@@ -594,9 +578,9 @@ static bool js_webview_WebView_setScalesPageToFit(se::State& s) // NOLINT(readab
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setScalesPageToFit : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -613,9 +597,9 @@ static bool js_webview_WebView_setVisible(se::State& s) // NOLINT(readability-id
|
||||
{
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_setVisible : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 1) {
|
||||
HolderType<bool, false> arg0 = {};
|
||||
ok &= sevalue_to_native(args[0], &arg0, s.thisObject());
|
||||
@@ -633,7 +617,7 @@ static bool js_webview_WebView_stopLoading(se::State& s) // NOLINT(readability-i
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
SE_PRECONDITION2(cobj, false, "js_webview_WebView_stopLoading : Invalid Native Object");
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
size_t argc = args.size();
|
||||
if (argc == 0) {
|
||||
cobj->stopLoading();
|
||||
return true;
|
||||
@@ -645,9 +629,9 @@ SE_BIND_FUNC(js_webview_WebView_stopLoading)
|
||||
|
||||
static bool js_webview_WebView_create(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
const auto& args = s.args();
|
||||
size_t argc = args.size();
|
||||
CC_UNUSED bool ok = true;
|
||||
if (argc == 0) {
|
||||
auto result = cc::WebView::create();
|
||||
result->retain();
|
||||
@@ -661,7 +645,6 @@ static bool js_webview_WebView_create(se::State& s) // NOLINT(readability-identi
|
||||
}
|
||||
SE_BIND_FUNC(js_webview_WebView_create)
|
||||
|
||||
|
||||
static bool js_cc_WebView_finalize(se::State& s) // NOLINT(readability-identifier-naming)
|
||||
{
|
||||
// destructor is skipped
|
||||
@@ -674,8 +657,7 @@ static bool js_cc_WebView_destroy(se::State& s) // NOLINT(readability-identifier
|
||||
auto* cobj = SE_THIS_OBJECT<cc::WebView>(s);
|
||||
cobj->release();
|
||||
auto objIter = se::NativePtrToObjectMap::find(SE_THIS_OBJECT<cc::WebView>(s));
|
||||
if(objIter != se::NativePtrToObjectMap::end())
|
||||
{
|
||||
if (objIter != se::NativePtrToObjectMap::end()) {
|
||||
objIter->second->clearPrivateData(true);
|
||||
}
|
||||
return true;
|
||||
@@ -723,12 +705,10 @@ bool js_register_webview_WebView(se::Object* obj) // NOLINT(readability-identifi
|
||||
se::ScriptEngine::getInstance()->clearException();
|
||||
return true;
|
||||
}
|
||||
bool register_all_webview(se::Object* obj)
|
||||
{
|
||||
bool register_all_webview(se::Object* obj) {
|
||||
// Get the ns
|
||||
se::Value nsVal;
|
||||
if (!obj->getProperty("jsb", &nsVal))
|
||||
{
|
||||
if (!obj->getProperty("jsb", &nsVal)) {
|
||||
se::HandleObject jsobj(se::Object::createPlainObject());
|
||||
nsVal.setObject(jsobj);
|
||||
obj->setProperty("jsb", nsVal);
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
#pragma once
|
||||
#include "base/Config.h"
|
||||
#if USE_WEBVIEW > 0
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/ui/webview/WebView.h"
|
||||
#include <type_traits>
|
||||
#include "cocos/bindings/jswrapper/SeApi.h"
|
||||
#include "cocos/bindings/manual/jsb_conversions.h"
|
||||
#include "cocos/ui/webview/WebView.h"
|
||||
|
||||
extern se::Object* __jsb_cc_WebView_proto;
|
||||
extern se::Class* __jsb_cc_WebView_class;
|
||||
extern se::Class* __jsb_cc_WebView_class;
|
||||
|
||||
bool js_register_cc_WebView(se::Object* obj);
|
||||
bool register_all_webview(se::Object* obj);
|
||||
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
void free(uint index);
|
||||
|
||||
private:
|
||||
static constexpr uint BUFFER_MASK = ~(1 << 30);
|
||||
static constexpr uint BUFFER_MASK = ~(1 << 30);
|
||||
|
||||
cc::map<uint, Object *> _buffers;
|
||||
PoolType _type = PoolType::UNKNOWN;
|
||||
|
||||
@@ -39,7 +39,7 @@ class CC_DLL BufferPool final : public cc::Object {
|
||||
public:
|
||||
using Chunk = uint8_t *;
|
||||
|
||||
inline static uint getPoolFlag() { return POOL_FLAG; }
|
||||
inline static uint getPoolFlag() { return POOL_FLAG; }
|
||||
|
||||
BufferPool(PoolType type, uint entryBits, uint bytesPerEntry);
|
||||
~BufferPool() override;
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
Object *allocateNewChunk();
|
||||
|
||||
private:
|
||||
static constexpr uint POOL_FLAG = 1 << 30;
|
||||
static constexpr uint POOL_FLAG = 1 << 30;
|
||||
|
||||
BufferAllocator _allocator;
|
||||
cc::vector<Chunk> _chunks;
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
namespace se {
|
||||
|
||||
#define CAST_POOL_TYPE(type) static_cast<uint>(type)
|
||||
#define CAST_POOL_TYPE(type) static_cast<uint>(type)
|
||||
#define GET_BUFFER_POOL_ID(type) CAST_POOL_TYPE(type)
|
||||
|
||||
enum class PoolType {
|
||||
|
||||
@@ -52,8 +52,7 @@ public:
|
||||
explicit OSEvent(OSEventType type) : _type(type) {}
|
||||
|
||||
template <typename T>
|
||||
std::enable_if_t<std::is_base_of<cc::OSEvent, T>::value, const T &>
|
||||
static castEvent(const cc::OSEvent &ev) {
|
||||
std::enable_if_t<std::is_base_of<cc::OSEvent, T>::value, const T &> static castEvent(const cc::OSEvent &ev) {
|
||||
const T &evDetail = dynamic_cast<const T &>(ev);
|
||||
return std::move(evDetail);
|
||||
}
|
||||
@@ -66,7 +65,8 @@ private:
|
||||
OSEventType _type = OSEventType::UNKNOWN_OSEVENT;
|
||||
};
|
||||
|
||||
#define CONSTRUCT_EVENT(name, type) name() : OSEvent(type) {}
|
||||
#define CONSTRUCT_EVENT(name, type) \
|
||||
name() : OSEvent(type) {}
|
||||
|
||||
class AppEvent : public OSEvent {
|
||||
public:
|
||||
@@ -280,7 +280,6 @@ public:
|
||||
static void dispatchDestroyWindowEvent();
|
||||
static void dispatchRecreateWindowEvent();
|
||||
|
||||
|
||||
using CustomEventListener = std::function<void(const CustomEvent &)>;
|
||||
static uint32_t addCustomEventListener(const std::string &eventName, const CustomEventListener &listener);
|
||||
static void removeCustomEventListener(const std::string &eventName, uint32_t listenerID);
|
||||
|
||||
@@ -98,11 +98,11 @@ public:
|
||||
private:
|
||||
HandleObject(const HandleObject &) = delete;
|
||||
void operator=(const HandleObject &) = delete;
|
||||
HandleObject(HandleObject &&) = delete;
|
||||
HandleObject(HandleObject &&) = delete;
|
||||
void operator=(HandleObject &&) = delete;
|
||||
|
||||
void *operator new(size_t size) = delete;
|
||||
void operator delete(void *, size_t) = delete;
|
||||
void *operator new(size_t size) = delete;
|
||||
void operator delete(void *, size_t) = delete;
|
||||
|
||||
Object *_obj;
|
||||
friend class Object;
|
||||
|
||||
@@ -42,9 +42,9 @@ public:
|
||||
|
||||
static Map::iterator find(void *nativeObj);
|
||||
static Map::iterator erase(Map::iterator iter);
|
||||
static void erase(void *nativeObj);
|
||||
static void clear();
|
||||
static size_t size();
|
||||
static void erase(void *nativeObj);
|
||||
static void clear();
|
||||
static size_t size();
|
||||
|
||||
static const Map &instance();
|
||||
|
||||
@@ -66,12 +66,12 @@ public:
|
||||
static bool init();
|
||||
static void destroy();
|
||||
|
||||
static void emplace(void *nativeObj);
|
||||
static void emplace(void *nativeObj);
|
||||
static Map::iterator find(void *nativeObj);
|
||||
static Map::iterator erase(Map::iterator iter);
|
||||
static void erase(void *nativeObj);
|
||||
static void clear();
|
||||
static size_t size();
|
||||
static void erase(void *nativeObj);
|
||||
static void clear();
|
||||
static size_t size();
|
||||
|
||||
static const Map &instance();
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
#include "chakracore/SeApi.h"
|
||||
#endif
|
||||
|
||||
#include "Value.h"
|
||||
#include "Object.h"
|
||||
#include "State.h"
|
||||
#include "HandleObject.h"
|
||||
#include "MappingUtils.h"
|
||||
#include "Object.h"
|
||||
#include "State.h"
|
||||
#include "Value.h"
|
||||
|
||||
@@ -104,9 +104,9 @@ private:
|
||||
State &operator=(const State &);
|
||||
State &operator=(State &&);
|
||||
|
||||
void *_nativeThisObject; //weak ref
|
||||
Object *_thisObject; //weak ref
|
||||
const ValueArray *_args; //weak ref
|
||||
Value _retVal; //weak ref
|
||||
void * _nativeThisObject; //weak ref
|
||||
Object * _thisObject; //weak ref
|
||||
const ValueArray *_args; //weak ref
|
||||
Value _retVal; //weak ref
|
||||
};
|
||||
} // namespace se
|
||||
|
||||
@@ -443,7 +443,7 @@ float Value::toFloat() const {
|
||||
|
||||
double Value::toDouble() const {
|
||||
assert(_type == Type::Number || _type == Type::Boolean || _type == Type::BigInt);
|
||||
if(LIKELY(_type == Type::Number)) {
|
||||
if (LIKELY(_type == Type::Number)) {
|
||||
return _u._number;
|
||||
}
|
||||
if (_type == Type::BigInt) {
|
||||
@@ -550,11 +550,11 @@ unsigned int Value::toUint() const {
|
||||
return CONVERT_TO_TYPE(unsigned int);
|
||||
}
|
||||
|
||||
long Value::toLong() const { // NOLINT(google-runtime-int)
|
||||
long Value::toLong() const { // NOLINT(google-runtime-int)
|
||||
return CONVERT_TO_TYPE(long);
|
||||
}
|
||||
|
||||
unsigned long Value::toUlong() const { // NOLINT(google-runtime-int)
|
||||
unsigned long Value::toUlong() const { // NOLINT(google-runtime-int)
|
||||
return CONVERT_TO_TYPE(unsigned long);
|
||||
}
|
||||
|
||||
|
||||
@@ -29,11 +29,11 @@
|
||||
#include "ChakraCore.h"
|
||||
#include "ChakraCoreVersion.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <assert.h>
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
#include <assert.h>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
#include "HelperMacros.h"
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
|
||||
#if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_CHAKRACORE
|
||||
|
||||
#include "Object.h"
|
||||
#include "Utils.h"
|
||||
#include "State.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "../HandleObject.h"
|
||||
#include "Object.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "State.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace se {
|
||||
|
||||
@@ -53,7 +53,7 @@ JsValueRef emptyContructor(JsValueRef callee, bool isConstructCall, JsValueRef *
|
||||
|
||||
void defaultFinalizeCallback(void *nativeThisObject) {
|
||||
if (nativeThisObject != nullptr) {
|
||||
State state(nativeThisObject);
|
||||
State state(nativeThisObject);
|
||||
Object *_thisObject = state.thisObject();
|
||||
if (_thisObject) _thisObject->_cleanup(nativeThisObject);
|
||||
SAFE_DEC_REF(_thisObject);
|
||||
@@ -83,7 +83,7 @@ Class *Class::create(const std::string &className, Object *obj, Object *parentPr
|
||||
}
|
||||
|
||||
bool Class::init(const std::string &clsName, Object *parent, Object *parentProto, JsNativeFunction ctor) {
|
||||
_name = clsName;
|
||||
_name = clsName;
|
||||
_parent = parent;
|
||||
if (_parent != nullptr)
|
||||
_parent->incRef();
|
||||
|
||||
@@ -126,20 +126,20 @@ private:
|
||||
static void cleanup();
|
||||
|
||||
struct JSFunctionSpec {
|
||||
const char *name;
|
||||
const char * name;
|
||||
JsNativeFunction func;
|
||||
};
|
||||
|
||||
struct JSPropertySpec {
|
||||
const char *name;
|
||||
const char * name;
|
||||
JsNativeFunction getter;
|
||||
JsNativeFunction setter;
|
||||
};
|
||||
|
||||
std::string _name;
|
||||
Object *_parent;
|
||||
Object *_proto;
|
||||
Object *_parentProto;
|
||||
Object * _parent;
|
||||
Object * _proto;
|
||||
Object * _parentProto;
|
||||
|
||||
JsNativeFunction _ctor;
|
||||
|
||||
@@ -147,7 +147,7 @@ private:
|
||||
std::vector<JSFunctionSpec> _staticFuncs;
|
||||
std::vector<JSPropertySpec> _properties;
|
||||
std::vector<JSPropertySpec> _staticProperties;
|
||||
JsFinalizeCallback _finalizeOp;
|
||||
JsFinalizeCallback _finalizeOp;
|
||||
|
||||
friend class ScriptEngine;
|
||||
friend class Object;
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
JsValueRef funcName##Registry(JsValueRef _callee, bool _isConstructCall, JsValueRef *_argv, unsigned short argc, void *_callbackState) { \
|
||||
assert(argc > 0); \
|
||||
--argc; \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
se::ValueArray args; \
|
||||
se::internal::jsToSeArgs(argc, _argv + 1, &args); \
|
||||
void *nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
void * nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
se::State state(nativeThisObject, args); \
|
||||
ret = funcName(state); \
|
||||
if (!ret) { \
|
||||
@@ -72,8 +72,8 @@
|
||||
if (nativeThisObject != nullptr) { \
|
||||
auto se = se::ScriptEngine::getInstance(); \
|
||||
se->_setGarbageCollecting(true); \
|
||||
bool ret = false; \
|
||||
se::State state(nativeThisObject); \
|
||||
bool ret = false; \
|
||||
se::State state(nativeThisObject); \
|
||||
se::Object *_thisObject = state.thisObject(); \
|
||||
if (_thisObject) _thisObject->_cleanup(nativeThisObject); \
|
||||
ret = funcName(state); \
|
||||
@@ -97,18 +97,18 @@
|
||||
JsValueRef funcName##Registry(JsValueRef _callee, bool _isConstructCall, JsValueRef *_argv, unsigned short argc, void *_callbackState) { \
|
||||
assert(argc > 0); \
|
||||
--argc; \
|
||||
bool ret = true; \
|
||||
bool ret = true; \
|
||||
se::ValueArray args; \
|
||||
se::internal::jsToSeArgs(argc, _argv + 1, &args); \
|
||||
se::Value thisVal(se::Object::createObjectWithClass(cls), true); \
|
||||
se::Value thisVal(se::Object::createObjectWithClass(cls), true); \
|
||||
se::Object *thisObject = thisVal.toObject(); \
|
||||
JsValueRef _jsRet = thisObject->_getJSObject(); \
|
||||
se::State state(thisObject, args); \
|
||||
JsValueRef _jsRet = thisObject->_getJSObject(); \
|
||||
se::State state(thisObject, args); \
|
||||
ret = funcName(state); \
|
||||
if (ret) { \
|
||||
se::Value _property; \
|
||||
bool _found = false; \
|
||||
_found = thisObject->getProperty("_ctor", &_property); \
|
||||
bool _found = false; \
|
||||
_found = thisObject->getProperty("_ctor", &_property); \
|
||||
if (_found) _property.toObject()->call(args, thisObject); \
|
||||
} else { \
|
||||
SE_LOGE("[ERROR] Failed to invoke %s, location: %s:%d\n", #funcName, __FILE__, __LINE__); \
|
||||
@@ -120,8 +120,8 @@
|
||||
JsValueRef funcName##Registry(JsValueRef _callee, bool _isConstructCall, JsValueRef *_argv, unsigned short argc, void *_callbackState) { \
|
||||
assert(argc > 0); \
|
||||
--argc; \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
se::ValueArray args; \
|
||||
se::internal::jsToSeArgs(argc, _argv + 1, &args); \
|
||||
se::Object *thisObject = se::Object::_createJSObject(cls, _argv[0]); \
|
||||
@@ -130,8 +130,8 @@
|
||||
ret = funcName(state); \
|
||||
if (ret) { \
|
||||
se::Value _property; \
|
||||
bool _found = false; \
|
||||
_found = thisObject->getProperty("_ctor", &_property); \
|
||||
bool _found = false; \
|
||||
_found = thisObject->getProperty("_ctor", &_property); \
|
||||
if (_found) _property.toObject()->call(args, thisObject); \
|
||||
} else { \
|
||||
SE_LOGE("[ERROR] Failed to invoke %s, location: %s:%d\n", #funcName, __FILE__, __LINE__); \
|
||||
@@ -142,10 +142,10 @@
|
||||
#define SE_BIND_PROP_GET(funcName) \
|
||||
JsValueRef funcName##Registry(JsValueRef _callee, bool _isConstructCall, JsValueRef *_argv, unsigned short _argc, void *_callbackState) { \
|
||||
assert(_argc == 1); \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
void *nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
se::State state(nativeThisObject); \
|
||||
JsValueRef _jsRet = JS_INVALID_REFERENCE; \
|
||||
bool ret = true; \
|
||||
void * nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
se::State state(nativeThisObject); \
|
||||
ret = funcName(state); \
|
||||
if (!ret) { \
|
||||
SE_LOGE("[ERROR] Failed to invoke %s, location: %s:%d\n", #funcName, __FILE__, __LINE__); \
|
||||
@@ -157,8 +157,8 @@
|
||||
#define SE_BIND_PROP_SET(funcName) \
|
||||
JsValueRef funcName##Registry(JsValueRef _callee, bool _isConstructCall, JsValueRef *_argv, unsigned short _argc, void *_callbackState) { \
|
||||
assert(_argc == 2); \
|
||||
bool ret = true; \
|
||||
void *nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
bool ret = true; \
|
||||
void * nativeThisObject = se::internal::getPrivate(_argv[0]); \
|
||||
se::Value data; \
|
||||
se::internal::jsToSeValue(_argv[1], &data); \
|
||||
se::ValueArray args; \
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
#if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_CHAKRACORE
|
||||
|
||||
#include "Utils.h"
|
||||
#include "../MappingUtils.h"
|
||||
#include "Class.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "../MappingUtils.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace se {
|
||||
|
||||
@@ -64,11 +64,11 @@ Object *Object::createArrayObject(size_t length) {
|
||||
}
|
||||
|
||||
Object *Object::createArrayBufferObject(void *data, size_t byteLength) {
|
||||
Object *obj = nullptr;
|
||||
Object * obj = nullptr;
|
||||
JsValueRef jsobj;
|
||||
_CHECK(JsCreateArrayBuffer((unsigned int)byteLength, &jsobj));
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
if (JsNoError == JsGetArrayBufferStorage(jsobj, &buffer, &bufferLength)) {
|
||||
if (data) {
|
||||
memcpy((void *)buffer, data, byteLength);
|
||||
@@ -93,53 +93,53 @@ Object *Object::createTypedArray(TypedArrayType type, const void *data, size_t b
|
||||
}
|
||||
|
||||
JsTypedArrayType typedArrayType;
|
||||
size_t elementLength = 0;
|
||||
size_t elementLength = 0;
|
||||
|
||||
switch (type) {
|
||||
case TypedArrayType::INT8:
|
||||
typedArrayType = JsArrayTypeInt8;
|
||||
elementLength = byteLength;
|
||||
elementLength = byteLength;
|
||||
break;
|
||||
case TypedArrayType::INT16:
|
||||
typedArrayType = JsArrayTypeInt16;
|
||||
elementLength = byteLength / 2;
|
||||
elementLength = byteLength / 2;
|
||||
break;
|
||||
case TypedArrayType::INT32:
|
||||
typedArrayType = JsArrayTypeInt32;
|
||||
elementLength = byteLength / 4;
|
||||
elementLength = byteLength / 4;
|
||||
break;
|
||||
case TypedArrayType::UINT8:
|
||||
typedArrayType = JsArrayTypeUint8;
|
||||
elementLength = byteLength;
|
||||
elementLength = byteLength;
|
||||
break;
|
||||
case TypedArrayType::UINT16:
|
||||
typedArrayType = JsArrayTypeUint16;
|
||||
elementLength = byteLength / 2;
|
||||
elementLength = byteLength / 2;
|
||||
break;
|
||||
case TypedArrayType::UINT32:
|
||||
typedArrayType = JsArrayTypeUint32;
|
||||
elementLength = byteLength / 4;
|
||||
elementLength = byteLength / 4;
|
||||
break;
|
||||
case TypedArrayType::FLOAT32:
|
||||
typedArrayType = JsArrayTypeFloat32;
|
||||
elementLength = byteLength / 4;
|
||||
elementLength = byteLength / 4;
|
||||
break;
|
||||
case TypedArrayType::FLOAT64:
|
||||
typedArrayType = JsArrayTypeFloat64;
|
||||
elementLength = byteLength / 8;
|
||||
elementLength = byteLength / 8;
|
||||
break;
|
||||
default:
|
||||
assert(false); // Should never go here.
|
||||
break;
|
||||
}
|
||||
|
||||
Object *obj = nullptr;
|
||||
Object * obj = nullptr;
|
||||
JsValueRef jsobj;
|
||||
_CHECK(JsCreateTypedArray(typedArrayType, JS_INVALID_REFERENCE, 0, (unsigned int)elementLength, &jsobj));
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
JsTypedArrayType arrType;
|
||||
int elementSize = 0;
|
||||
int elementSize = 0;
|
||||
if (JsNoError == JsGetTypedArrayStorage(jsobj, &buffer, &bufferLength, &arrType, &elementSize)) {
|
||||
//If data has content,then will copy data into buffer,or will only clear buffer.
|
||||
if (data) {
|
||||
@@ -159,11 +159,11 @@ Object *Object::createUint8TypedArray(uint8_t *data, size_t dataCount) {
|
||||
}
|
||||
|
||||
Object *Object::createJSONObject(const std::string &jsonStr) {
|
||||
bool ok = false;
|
||||
bool ok = false;
|
||||
Object *obj = nullptr;
|
||||
|
||||
Object *global = ScriptEngine::getInstance()->getGlobalObject();
|
||||
Value jsonVal;
|
||||
Value jsonVal;
|
||||
ok = global->getProperty("JSON", &jsonVal);
|
||||
assert(ok);
|
||||
|
||||
@@ -171,7 +171,7 @@ Object *Object::createJSONObject(const std::string &jsonStr) {
|
||||
ok = jsonVal.toObject()->getProperty("parse", &parseVal);
|
||||
assert(ok);
|
||||
|
||||
Value ret;
|
||||
Value ret;
|
||||
ValueArray args;
|
||||
args.push_back(Value(jsonStr));
|
||||
if (parseVal.toObject()->call(args, jsonVal.toObject(), &ret)) {
|
||||
@@ -182,8 +182,8 @@ Object *Object::createJSONObject(const std::string &jsonStr) {
|
||||
}
|
||||
|
||||
Object *Object::getObjectWithPtr(void *ptr) {
|
||||
Object *obj = nullptr;
|
||||
auto iter = NativePtrToObjectMap::find(ptr);
|
||||
Object *obj = nullptr;
|
||||
auto iter = NativePtrToObjectMap::find(ptr);
|
||||
if (iter != NativePtrToObjectMap::end()) {
|
||||
obj = iter->second;
|
||||
obj->incRef();
|
||||
@@ -204,7 +204,7 @@ Object *Object::_createJSObject(Class *cls, JsValueRef obj) {
|
||||
|
||||
Object *Object::createObjectWithClass(Class *cls) {
|
||||
JsValueRef jsobj = Class::_createJSObjectWithClass(cls);
|
||||
Object *obj = Object::_createJSObject(cls, jsobj);
|
||||
Object * obj = Object::_createJSObject(cls, jsobj);
|
||||
return obj;
|
||||
}
|
||||
|
||||
@@ -252,9 +252,9 @@ void Object::_cleanup(void *nativeObject /* = nullptr*/) {
|
||||
void Object::cleanup() {
|
||||
ScriptEngine::getInstance()->addAfterCleanupHook([]() {
|
||||
const auto &instance = NativePtrToObjectMap::instance();
|
||||
se::Object *obj = nullptr;
|
||||
se::Object *obj = nullptr;
|
||||
for (const auto &e : instance) {
|
||||
obj = e.second;
|
||||
obj = e.second;
|
||||
obj->_isCleanup = true; // _cleanup will invoke NativePtrToObjectMap::erase method which will break this for loop. It isn't needed at ScriptEngine::cleanup step.
|
||||
obj->decRef();
|
||||
}
|
||||
@@ -329,7 +329,7 @@ bool Object::call(const ValueArray &args, Object *thisObject, Value *rval /* = n
|
||||
|
||||
jsArgs[0] = contextObject;
|
||||
|
||||
JsValueRef rcValue = JS_INVALID_REFERENCE;
|
||||
JsValueRef rcValue = JS_INVALID_REFERENCE;
|
||||
JsErrorCode errCode = JsCallFunction(_obj, jsArgs, args.size() + 1, &rcValue);
|
||||
free(jsArgs);
|
||||
|
||||
@@ -375,20 +375,20 @@ static bool getArrayLengthOfObject(JsValueRef arrObj, uint32_t *length) {
|
||||
assert(isArrayOfObject(arrObj));
|
||||
assert(length != nullptr);
|
||||
|
||||
JsErrorCode err = JsNoError;
|
||||
JsErrorCode err = JsNoError;
|
||||
JsPropertyIdRef propertyId = JS_INVALID_REFERENCE;
|
||||
const char *lengthName = "length";
|
||||
err = JsCreatePropertyId(lengthName, strlen(lengthName), &propertyId);
|
||||
const char * lengthName = "length";
|
||||
err = JsCreatePropertyId(lengthName, strlen(lengthName), &propertyId);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
JsValueRef jsLen = JS_INVALID_REFERENCE;
|
||||
err = JsGetProperty(arrObj, propertyId, &jsLen);
|
||||
err = JsGetProperty(arrObj, propertyId, &jsLen);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
int intVal = 0;
|
||||
err = JsNumberToInt(jsLen, &intVal);
|
||||
err = JsNumberToInt(jsLen, &intVal);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
@@ -409,10 +409,10 @@ bool Object::getArrayElement(uint32_t index, Value *data) const {
|
||||
assert(isArray());
|
||||
assert(data != nullptr);
|
||||
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef result = JS_INVALID_REFERENCE;
|
||||
JsValueRef jsIndex = JS_INVALID_REFERENCE;
|
||||
err = JsIntToNumber(index, &jsIndex);
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef result = JS_INVALID_REFERENCE;
|
||||
JsValueRef jsIndex = JS_INVALID_REFERENCE;
|
||||
err = JsIntToNumber(index, &jsIndex);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
@@ -428,9 +428,9 @@ bool Object::getArrayElement(uint32_t index, Value *data) const {
|
||||
bool Object::setArrayElement(uint32_t index, const Value &data) {
|
||||
assert(isArray());
|
||||
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef jsIndex = JS_INVALID_REFERENCE;
|
||||
err = JsIntToNumber(index, &jsIndex);
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef jsIndex = JS_INVALID_REFERENCE;
|
||||
err = JsIntToNumber(index, &jsIndex);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
@@ -447,22 +447,22 @@ bool Object::setArrayElement(uint32_t index, const Value &data) {
|
||||
bool Object::getAllKeys(std::vector<std::string> *allKeys) const {
|
||||
assert(allKeys != nullptr);
|
||||
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef keys = JS_INVALID_REFERENCE;
|
||||
err = JsGetOwnPropertyNames(_obj, &keys);
|
||||
JsErrorCode err = JsNoError;
|
||||
JsValueRef keys = JS_INVALID_REFERENCE;
|
||||
err = JsGetOwnPropertyNames(_obj, &keys);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
uint32_t len = 0;
|
||||
bool ok = false;
|
||||
ok = getArrayLengthOfObject(keys, &len);
|
||||
bool ok = false;
|
||||
ok = getArrayLengthOfObject(keys, &len);
|
||||
if (!ok)
|
||||
return false;
|
||||
|
||||
std::string key;
|
||||
for (uint32_t index = 0; index < len; ++index) {
|
||||
JsValueRef indexValue = JS_INVALID_REFERENCE;
|
||||
err = JsIntToNumber(index, &indexValue);
|
||||
err = JsIntToNumber(index, &indexValue);
|
||||
if (err != JsNoError)
|
||||
return false;
|
||||
|
||||
@@ -510,9 +510,9 @@ Object::TypedArrayType Object::getTypedArrayType() const {
|
||||
return ret;
|
||||
|
||||
JsTypedArrayType type;
|
||||
JsValueRef arrayBuffer = JS_INVALID_REFERENCE;
|
||||
unsigned int byteOffset = 0;
|
||||
unsigned int byteLength = 0;
|
||||
JsValueRef arrayBuffer = JS_INVALID_REFERENCE;
|
||||
unsigned int byteOffset = 0;
|
||||
unsigned int byteLength = 0;
|
||||
|
||||
if (JsNoError == JsGetTypedArrayInfo(_obj, &type, &arrayBuffer, &byteOffset, &byteLength)) {
|
||||
if (type == JsArrayTypeInt8)
|
||||
@@ -541,16 +541,16 @@ Object::TypedArrayType Object::getTypedArrayType() const {
|
||||
bool Object::getTypedArrayData(uint8_t **ptr, size_t *length) const {
|
||||
assert(isTypedArray());
|
||||
JsTypedArrayType arrayType;
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
int elementSize = 0;
|
||||
bool ret = false;
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
int elementSize = 0;
|
||||
bool ret = false;
|
||||
if (JsNoError == JsGetTypedArrayStorage(_obj, &buffer, &bufferLength, &arrayType, &elementSize)) {
|
||||
*ptr = buffer;
|
||||
*ptr = buffer;
|
||||
*length = bufferLength;
|
||||
ret = true;
|
||||
ret = true;
|
||||
} else {
|
||||
*ptr = nullptr;
|
||||
*ptr = nullptr;
|
||||
*length = 0;
|
||||
}
|
||||
return ret;
|
||||
@@ -566,15 +566,15 @@ bool Object::isArrayBuffer() const {
|
||||
|
||||
bool Object::getArrayBufferData(uint8_t **ptr, size_t *length) const {
|
||||
assert(isArrayBuffer());
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
bool ret = false;
|
||||
ChakraBytePtr buffer = nullptr;
|
||||
unsigned int bufferLength = 0;
|
||||
bool ret = false;
|
||||
if (JsNoError == JsGetArrayBufferStorage(_obj, &buffer, &bufferLength)) {
|
||||
*ptr = buffer;
|
||||
*ptr = buffer;
|
||||
*length = bufferLength;
|
||||
ret = true;
|
||||
ret = true;
|
||||
} else {
|
||||
*ptr = nullptr;
|
||||
*ptr = nullptr;
|
||||
*length = 0;
|
||||
}
|
||||
return ret;
|
||||
@@ -652,7 +652,7 @@ bool Object::attachObject(Object *obj) {
|
||||
assert(obj);
|
||||
|
||||
Object *global = ScriptEngine::getInstance()->getGlobalObject();
|
||||
Value jsbVal;
|
||||
Value jsbVal;
|
||||
if (!global->getProperty("jsb", &jsbVal))
|
||||
return false;
|
||||
Object *jsbObj = jsbVal.toObject();
|
||||
@@ -672,7 +672,7 @@ bool Object::attachObject(Object *obj) {
|
||||
bool Object::detachObject(Object *obj) {
|
||||
assert(obj);
|
||||
Object *global = ScriptEngine::getInstance()->getGlobalObject();
|
||||
Value jsbVal;
|
||||
Value jsbVal;
|
||||
if (!global->getProperty("jsb", &jsbVal))
|
||||
return false;
|
||||
Object *jsbObj = jsbVal.toObject();
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
#if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_CHAKRACORE
|
||||
|
||||
#include "Base.h"
|
||||
#include "../Value.h"
|
||||
#include "../RefCounter.h"
|
||||
#include "../Value.h"
|
||||
#include "Base.h"
|
||||
|
||||
namespace se {
|
||||
|
||||
@@ -355,11 +355,11 @@ public:
|
||||
|
||||
// Private API used in wrapper
|
||||
static Object *_createJSObject(Class *cls, JsValueRef obj);
|
||||
JsValueRef _getJSObject() const;
|
||||
Class *_getClass() const;
|
||||
void _cleanup(void *nativeObject = nullptr);
|
||||
void _setFinalizeCallback(JsFinalizeCallback finalizeCb);
|
||||
bool _isNativeFunction() const;
|
||||
JsValueRef _getJSObject() const;
|
||||
Class * _getClass() const;
|
||||
void _cleanup(void *nativeObject = nullptr);
|
||||
void _setFinalizeCallback(JsFinalizeCallback finalizeCb);
|
||||
bool _isNativeFunction() const;
|
||||
//
|
||||
private:
|
||||
static void cleanup();
|
||||
@@ -368,14 +368,14 @@ private:
|
||||
virtual ~Object();
|
||||
bool init(JsValueRef obj);
|
||||
|
||||
Class *_cls;
|
||||
JsValueRef _obj;
|
||||
void *_privateData;
|
||||
Class * _cls;
|
||||
JsValueRef _obj;
|
||||
void * _privateData;
|
||||
JsFinalizeCallback _finalizeCb;
|
||||
|
||||
uint32_t _rootCount;
|
||||
uint32_t _currentVMId;
|
||||
bool _isCleanup;
|
||||
bool _isCleanup;
|
||||
|
||||
friend class ScriptEngine;
|
||||
};
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
|
||||
#if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_CHAKRACORE
|
||||
|
||||
#include "Object.h"
|
||||
#include "Class.h"
|
||||
#include "Utils.h"
|
||||
#include "../State.h"
|
||||
#include "../MappingUtils.h"
|
||||
#include "../State.h"
|
||||
#include "Class.h"
|
||||
#include "Object.h"
|
||||
#include "Utils.h"
|
||||
|
||||
namespace se {
|
||||
|
||||
@@ -76,13 +76,13 @@ bool JSB_console_format_log(State &s, const char *prefix, int msgIndex = 0) {
|
||||
return false;
|
||||
|
||||
const auto &args = s.args();
|
||||
int argc = (int)args.size();
|
||||
int argc = (int)args.size();
|
||||
if ((argc - msgIndex) == 1) {
|
||||
std::string msg = args[msgIndex].toStringForce();
|
||||
SE_LOGD("JS: %s%s\n", prefix, msg.c_str());
|
||||
} else if (argc > 1) {
|
||||
std::string msg = args[msgIndex].toStringForce();
|
||||
size_t pos;
|
||||
size_t pos;
|
||||
for (int i = (msgIndex + 1); i < argc; ++i) {
|
||||
pos = msg.find("%");
|
||||
if (pos != std::string::npos && pos != (msg.length() - 1) && (msg[pos + 1] == 'd' || msg[pos + 1] == 's' || msg[pos + 1] == 'f')) {
|
||||
@@ -198,7 +198,7 @@ bool ScriptEngine::init() {
|
||||
|
||||
// ChakraCore isn't shipped with a console variable. Make a fake one.
|
||||
Value consoleVal;
|
||||
bool hasConsole = _globalObj->getProperty("console", &consoleVal) && consoleVal.isObject();
|
||||
bool hasConsole = _globalObj->getProperty("console", &consoleVal) && consoleVal.isObject();
|
||||
assert(!hasConsole);
|
||||
|
||||
HandleObject consoleObj(Object::createPlainObject());
|
||||
@@ -252,9 +252,9 @@ void ScriptEngine::cleanup() {
|
||||
_CHECK(JsSetCurrentContext(JS_INVALID_REFERENCE));
|
||||
_CHECK(JsDisposeRuntime(_rt));
|
||||
|
||||
_cx = nullptr;
|
||||
_cx = nullptr;
|
||||
_globalObj = nullptr;
|
||||
_isValid = false;
|
||||
_isValid = false;
|
||||
|
||||
_registerCallbackArray.clear();
|
||||
|
||||
@@ -274,7 +274,7 @@ ScriptEngine::ExceptionInfo ScriptEngine::formatException(JsValueRef exception)
|
||||
return ret;
|
||||
|
||||
std::vector<std::string> allKeys;
|
||||
Object *exceptionObj = Object::_createJSObject(nullptr, exception);
|
||||
Object * exceptionObj = Object::_createJSObject(nullptr, exception);
|
||||
exceptionObj->getAllKeys(&allKeys);
|
||||
|
||||
for (const auto &key : allKeys) {
|
||||
@@ -325,7 +325,7 @@ bool ScriptEngine::start() {
|
||||
if (!init())
|
||||
return false;
|
||||
|
||||
bool ok = false;
|
||||
bool ok = false;
|
||||
_startTime = std::chrono::steady_clock::now();
|
||||
|
||||
for (auto cb : _registerCallbackArray) {
|
||||
|
||||
@@ -276,18 +276,18 @@ private:
|
||||
ExceptionInfo formatException(JsValueRef exception);
|
||||
|
||||
std::chrono::steady_clock::time_point _startTime;
|
||||
std::vector<RegisterCallback> _registerCallbackArray;
|
||||
std::vector<std::function<void()>> _beforeInitHookArray;
|
||||
std::vector<std::function<void()>> _afterInitHookArray;
|
||||
std::vector<std::function<void()>> _beforeCleanupHookArray;
|
||||
std::vector<std::function<void()>> _afterCleanupHookArray;
|
||||
std::vector<RegisterCallback> _registerCallbackArray;
|
||||
std::vector<std::function<void()>> _beforeInitHookArray;
|
||||
std::vector<std::function<void()>> _afterInitHookArray;
|
||||
std::vector<std::function<void()>> _beforeCleanupHookArray;
|
||||
std::vector<std::function<void()>> _afterCleanupHookArray;
|
||||
|
||||
JsRuntimeHandle _rt;
|
||||
JsContextRef _cx;
|
||||
Object *_globalObj;
|
||||
JsContextRef _cx;
|
||||
Object * _globalObj;
|
||||
|
||||
FileOperationDelegate _fileOperationDelegate;
|
||||
ExceptionCallback _exceptionCallback;
|
||||
ExceptionCallback _exceptionCallback;
|
||||
|
||||
uint32_t _currentSourceContext;
|
||||
uint32_t _vmId;
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ScriptEngine.h"
|
||||
#include "Class.h"
|
||||
#include "Object.h"
|
||||
#include "HelperMacros.h"
|
||||
#include "Object.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "Utils.h"
|
||||
|
||||
@@ -28,9 +28,9 @@
|
||||
|
||||
#if SCRIPT_ENGINE_TYPE == SCRIPT_ENGINE_CHAKRACORE
|
||||
|
||||
#include "../HandleObject.h"
|
||||
#include "Object.h"
|
||||
#include "ScriptEngine.h"
|
||||
#include "../HandleObject.h"
|
||||
|
||||
namespace se {
|
||||
|
||||
@@ -44,9 +44,9 @@ bool defineProperty(JsValueRef obj, const char *name, JsNativeFunction getter, J
|
||||
JsValueRef propertyDescriptor;
|
||||
_CHECK(JsCreateObject(&propertyDescriptor));
|
||||
|
||||
const char *tmp = nullptr;
|
||||
JsValueRef jsValue = JS_INVALID_REFERENCE;
|
||||
JsPropertyIdRef id = JS_INVALID_REFERENCE;
|
||||
const char * tmp = nullptr;
|
||||
JsValueRef jsValue = JS_INVALID_REFERENCE;
|
||||
JsPropertyIdRef id = JS_INVALID_REFERENCE;
|
||||
|
||||
if (getter != nullptr) {
|
||||
tmp = "get";
|
||||
@@ -113,8 +113,8 @@ void jsToSeValue(JsValueRef jsValue, Value *data) {
|
||||
forceConvertJsValueToStdString(jsValue, &str);
|
||||
data->setString(str);
|
||||
} else if (type == JsObject || type == JsFunction || type == JsArrayBuffer || type == JsTypedArray || type == JsArray) {
|
||||
void *nativePtr = internal::getPrivate(jsValue);
|
||||
Object *obj = nullptr;
|
||||
void * nativePtr = internal::getPrivate(jsValue);
|
||||
Object *obj = nullptr;
|
||||
if (nativePtr != nullptr) {
|
||||
obj = Object::getObjectWithPtr(nativePtr);
|
||||
}
|
||||
@@ -185,8 +185,8 @@ bool hasPrivate(JsValueRef obj) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool isExist = false;
|
||||
JsErrorCode err = JsHasExternalData(obj, &isExist);
|
||||
bool isExist = false;
|
||||
JsErrorCode err = JsHasExternalData(obj, &isExist);
|
||||
assert(err == JsNoError);
|
||||
if (isExist)
|
||||
return true;
|
||||
@@ -210,8 +210,8 @@ void setPrivate(JsValueRef obj, void *data, JsFinalizeCallback finalizeCb) {
|
||||
privateObj->root();
|
||||
|
||||
internal::PrivateData *privateData = (internal::PrivateData *)malloc(sizeof(internal::PrivateData));
|
||||
privateData->data = data;
|
||||
privateData->finalizeCb = finalizeCb;
|
||||
privateData->data = data;
|
||||
privateData->finalizeCb = finalizeCb;
|
||||
_CHECK(JsSetExternalData(privateObj->_getJSObject(), privateData));
|
||||
// SE_LOGD("setPrivate: %p\n", data);
|
||||
|
||||
@@ -230,8 +230,8 @@ void *getPrivate(JsValueRef obj) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void *data = nullptr;
|
||||
bool isExist = false;
|
||||
void *data = nullptr;
|
||||
bool isExist = false;
|
||||
_CHECK(JsHasExternalData(obj, &isExist));
|
||||
if (isExist) {
|
||||
_CHECK(JsGetExternalData(obj, &data));
|
||||
@@ -261,8 +261,8 @@ void clearPrivate(JsValueRef obj) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool isExist = false;
|
||||
JsErrorCode err = JsHasExternalData(obj, &isExist);
|
||||
bool isExist = false;
|
||||
JsErrorCode err = JsHasExternalData(obj, &isExist);
|
||||
assert(err == JsNoError);
|
||||
if (isExist) {
|
||||
_CHECK(JsSetExternalData(obj, nullptr));
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace se {
|
||||
namespace internal {
|
||||
|
||||
struct PrivateData {
|
||||
void *data;
|
||||
void * data;
|
||||
JsFinalizeCallback finalizeCb;
|
||||
};
|
||||
|
||||
@@ -53,10 +53,10 @@ void seToJsValue(const Value &v, JsValueRef *jsval);
|
||||
void forceConvertJsValueToStdString(JsValueRef jsval, std::string *ret);
|
||||
void jsStringToStdString(JsValueRef jsStr, std::string *ret);
|
||||
|
||||
bool hasPrivate(JsValueRef obj);
|
||||
void setPrivate(JsValueRef obj, void *data, JsFinalizeCallback finalizeCb);
|
||||
bool hasPrivate(JsValueRef obj);
|
||||
void setPrivate(JsValueRef obj, void *data, JsFinalizeCallback finalizeCb);
|
||||
void *getPrivate(JsValueRef obj);
|
||||
void clearPrivate(JsValueRef obj);
|
||||
void clearPrivate(JsValueRef obj);
|
||||
|
||||
} // namespace internal
|
||||
} // namespace se
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user