mirror of https://github.com/axmolengine/axmol.git
Remove experimental namespace (#20229)
This commit is contained in:
parent
ee4432661c
commit
6b1e55f419
|
@ -49,16 +49,15 @@ THE SOFTWARE.
|
|||
#include "renderer/backend/ProgramState.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental {
|
||||
|
||||
const int TMXLayer::FAST_TMX_ORIENTATION_ORTHO = 0;
|
||||
const int TMXLayer::FAST_TMX_ORIENTATION_HEX = 1;
|
||||
const int TMXLayer::FAST_TMX_ORIENTATION_ISO = 2;
|
||||
const int FastTMXLayer::FAST_TMX_ORIENTATION_ORTHO = 0;
|
||||
const int FastTMXLayer::FAST_TMX_ORIENTATION_HEX = 1;
|
||||
const int FastTMXLayer::FAST_TMX_ORIENTATION_ISO = 2;
|
||||
|
||||
// FastTMXLayer - init & alloc & dealloc
|
||||
TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
FastTMXLayer * FastTMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
TMXLayer *ret = new (std::nothrow) TMXLayer();
|
||||
FastTMXLayer *ret = new (std::nothrow) FastTMXLayer();
|
||||
if (ret->initWithTilesetInfo(tilesetInfo, layerInfo, mapInfo))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -68,7 +67,7 @@ TMXLayer * TMXLayer::create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
bool FastTMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
|
||||
if( tilesetInfo )
|
||||
|
@ -107,11 +106,11 @@ bool TMXLayer::initWithTilesetInfo(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *la
|
|||
return true;
|
||||
}
|
||||
|
||||
TMXLayer::TMXLayer()
|
||||
FastTMXLayer::FastTMXLayer()
|
||||
{
|
||||
}
|
||||
|
||||
TMXLayer::~TMXLayer()
|
||||
FastTMXLayer::~FastTMXLayer()
|
||||
{
|
||||
CC_SAFE_RELEASE(_tileSet);
|
||||
CC_SAFE_RELEASE(_texture);
|
||||
|
@ -126,7 +125,7 @@ TMXLayer::~TMXLayer()
|
|||
}
|
||||
}
|
||||
|
||||
void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
|
||||
void FastTMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
|
||||
{
|
||||
updateTotalQuads();
|
||||
|
||||
|
@ -170,7 +169,7 @@ void TMXLayer::draw(Renderer *renderer, const Mat4& transform, uint32_t flags)
|
|||
}
|
||||
}
|
||||
|
||||
void TMXLayer::updateTiles(const Rect& culledRect)
|
||||
void FastTMXLayer::updateTiles(const Rect& culledRect)
|
||||
{
|
||||
Rect visibleTiles = Rect(culledRect.origin, culledRect.size * Director::getInstance()->getContentScaleFactor());
|
||||
Size mapTileSize = CC_SIZE_PIXELS_TO_POINTS(_mapTileSize);
|
||||
|
@ -263,7 +262,7 @@ void TMXLayer::updateTiles(const Rect& culledRect)
|
|||
|
||||
}
|
||||
|
||||
void TMXLayer::updateVertexBuffer()
|
||||
void FastTMXLayer::updateVertexBuffer()
|
||||
{
|
||||
unsigned int vertexBufferSize = (unsigned int)(sizeof(V3F_C4B_T2F) * _totalQuads.size() * 4);
|
||||
if (!_vertexBuffer)
|
||||
|
@ -274,7 +273,7 @@ void TMXLayer::updateVertexBuffer()
|
|||
_vertexBuffer->updateData(&_totalQuads[0], vertexBufferSize);
|
||||
}
|
||||
|
||||
void TMXLayer::updateIndexBuffer()
|
||||
void FastTMXLayer::updateIndexBuffer()
|
||||
{
|
||||
#ifdef CC_FAST_TILEMAP_32_BIT_INDICES
|
||||
unsigned int indexBufferSize = (unsigned int)(sizeof(unsigned int) * _indices.size());
|
||||
|
@ -290,7 +289,7 @@ void TMXLayer::updateIndexBuffer()
|
|||
}
|
||||
|
||||
// FastTMXLayer - setup Tiles
|
||||
void TMXLayer::setupTiles()
|
||||
void FastTMXLayer::setupTiles()
|
||||
{
|
||||
// Optimization: quick hack that sets the image size on the tileset
|
||||
_tileSet->_imageSize = _texture->getContentSizeInPixels();
|
||||
|
@ -330,7 +329,7 @@ void TMXLayer::setupTiles()
|
|||
|
||||
}
|
||||
|
||||
Mat4 TMXLayer::tileToNodeTransform()
|
||||
Mat4 FastTMXLayer::tileToNodeTransform()
|
||||
{
|
||||
float w = _mapTileSize.width / CC_CONTENT_SCALE_FACTOR();
|
||||
float h = _mapTileSize.height / CC_CONTENT_SCALE_FACTOR();
|
||||
|
@ -382,7 +381,7 @@ Mat4 TMXLayer::tileToNodeTransform()
|
|||
|
||||
}
|
||||
|
||||
void TMXLayer::updatePrimitives()
|
||||
void FastTMXLayer::updatePrimitives()
|
||||
{
|
||||
auto blendfunc = _texture->hasPremultipliedAlpha() ? BlendFunc::ALPHA_PREMULTIPLIED : BlendFunc::ALPHA_NON_PREMULTIPLIED;
|
||||
for(const auto& iter : _indicesVertexZNumber)
|
||||
|
@ -453,14 +452,14 @@ void TMXLayer::updatePrimitives()
|
|||
}
|
||||
}
|
||||
|
||||
void TMXLayer::setOpacity(uint8_t opacity)
|
||||
void FastTMXLayer::setOpacity(uint8_t opacity)
|
||||
{
|
||||
Node::setOpacity(opacity);
|
||||
_quadsDirty = true;
|
||||
}
|
||||
|
||||
|
||||
void TMXLayer::updateTotalQuads()
|
||||
void FastTMXLayer::updateTotalQuads()
|
||||
{
|
||||
if(_quadsDirty)
|
||||
{
|
||||
|
@ -605,7 +604,7 @@ void TMXLayer::updateTotalQuads()
|
|||
}
|
||||
|
||||
// removing / getting tiles
|
||||
Sprite* TMXLayer::getTileAt(const Vec2& tileCoordinate)
|
||||
Sprite* FastTMXLayer::getTileAt(const Vec2& tileCoordinate)
|
||||
{
|
||||
CCASSERT( tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
|
||||
CCASSERT( _tiles, "TMXLayer: the tiles map has been released");
|
||||
|
@ -645,7 +644,7 @@ Sprite* TMXLayer::getTileAt(const Vec2& tileCoordinate)
|
|||
return tile;
|
||||
}
|
||||
|
||||
int TMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/* = nullptr*/)
|
||||
int FastTMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/* = nullptr*/)
|
||||
{
|
||||
CCASSERT(tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
|
||||
CCASSERT(_tiles, "TMXLayer: the tiles map has been released");
|
||||
|
@ -671,12 +670,12 @@ int TMXLayer::getTileGIDAt(const Vec2& tileCoordinate, TMXTileFlags* flags/* = n
|
|||
return (tile & kTMXFlippedMask);
|
||||
}
|
||||
|
||||
Vec2 TMXLayer::getPositionAt(const Vec2& pos)
|
||||
Vec2 FastTMXLayer::getPositionAt(const Vec2& pos)
|
||||
{
|
||||
return PointApplyTransform(pos, _tileToNodeTransform);
|
||||
}
|
||||
|
||||
int TMXLayer::getVertexZForPos(const Vec2& pos)
|
||||
int FastTMXLayer::getVertexZForPos(const Vec2& pos)
|
||||
{
|
||||
int ret = 0;
|
||||
int maxVal = 0;
|
||||
|
@ -707,7 +706,7 @@ int TMXLayer::getVertexZForPos(const Vec2& pos)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void TMXLayer::removeTileAt(const Vec2& tileCoordinate)
|
||||
void FastTMXLayer::removeTileAt(const Vec2& tileCoordinate)
|
||||
{
|
||||
|
||||
CCASSERT( tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
|
||||
|
@ -730,7 +729,7 @@ void TMXLayer::removeTileAt(const Vec2& tileCoordinate)
|
|||
}
|
||||
}
|
||||
|
||||
void TMXLayer::setFlaggedTileGIDByIndex(int index, uint32_t gid)
|
||||
void FastTMXLayer::setFlaggedTileGIDByIndex(int index, uint32_t gid)
|
||||
{
|
||||
if(gid == _tiles[index]) return;
|
||||
_tiles[index] = gid;
|
||||
|
@ -738,7 +737,7 @@ void TMXLayer::setFlaggedTileGIDByIndex(int index, uint32_t gid)
|
|||
_dirty = true;
|
||||
}
|
||||
|
||||
void TMXLayer::removeChild(Node* node, bool cleanup)
|
||||
void FastTMXLayer::removeChild(Node* node, bool cleanup)
|
||||
{
|
||||
int tag = node->getTag();
|
||||
auto it = _spriteContainer.find(tag);
|
||||
|
@ -750,7 +749,7 @@ void TMXLayer::removeChild(Node* node, bool cleanup)
|
|||
}
|
||||
|
||||
// TMXLayer - Properties
|
||||
Value TMXLayer::getProperty(const std::string& propertyName) const
|
||||
Value FastTMXLayer::getProperty(const std::string& propertyName) const
|
||||
{
|
||||
auto propItr = _properties.find(propertyName);
|
||||
if (propItr != _properties.end())
|
||||
|
@ -759,7 +758,7 @@ Value TMXLayer::getProperty(const std::string& propertyName) const
|
|||
return Value();
|
||||
}
|
||||
|
||||
void TMXLayer::parseInternalProperties()
|
||||
void FastTMXLayer::parseInternalProperties()
|
||||
{
|
||||
auto vertexz = getProperty("cc_vertexz");
|
||||
if (vertexz.isNull()) return;
|
||||
|
@ -779,7 +778,7 @@ void TMXLayer::parseInternalProperties()
|
|||
}
|
||||
|
||||
//CCTMXLayer2 - obtaining positions, offset
|
||||
Vec2 TMXLayer::calculateLayerOffset(const Vec2& pos)
|
||||
Vec2 FastTMXLayer::calculateLayerOffset(const Vec2& pos)
|
||||
{
|
||||
Vec2 ret;
|
||||
switch (_layerOrientation)
|
||||
|
@ -800,12 +799,12 @@ Vec2 TMXLayer::calculateLayerOffset(const Vec2& pos)
|
|||
}
|
||||
|
||||
// TMXLayer - adding / remove tiles
|
||||
void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate)
|
||||
void FastTMXLayer::setTileGID(int gid, const Vec2& tileCoordinate)
|
||||
{
|
||||
setTileGID(gid, tileCoordinate, (TMXTileFlags)0);
|
||||
}
|
||||
|
||||
void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags)
|
||||
void FastTMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flags)
|
||||
{
|
||||
CCASSERT(tileCoordinate.x < _layerSize.width && tileCoordinate.y < _layerSize.height && tileCoordinate.x >=0 && tileCoordinate.y >=0, "TMXLayer: invalid position");
|
||||
CCASSERT(_tiles, "TMXLayer: the tiles map has been released");
|
||||
|
@ -856,7 +855,7 @@ void TMXLayer::setTileGID(int gid, const Vec2& tileCoordinate, TMXTileFlags flag
|
|||
}
|
||||
}
|
||||
|
||||
void TMXLayer::setupTileSprite(Sprite* sprite, const Vec2& pos, uint32_t gid)
|
||||
void FastTMXLayer::setupTileSprite(Sprite* sprite, const Vec2& pos, uint32_t gid)
|
||||
{
|
||||
sprite->setPosition(getPositionAt(pos));
|
||||
sprite->setPositionZ((float)getVertexZForPos(pos));
|
||||
|
@ -912,11 +911,10 @@ void TMXLayer::setupTileSprite(Sprite* sprite, const Vec2& pos, uint32_t gid)
|
|||
}
|
||||
}
|
||||
|
||||
std::string TMXLayer::getDescription() const
|
||||
std::string FastTMXLayer::getDescription() const
|
||||
{
|
||||
return StringUtils::format("<FastTMXLayer | tag = %d, size = %d,%d>", _tag, (int)_mapTileSize.width, (int)_mapTileSize.height);
|
||||
}
|
||||
|
||||
} //end of namespace experimental
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -45,8 +45,6 @@ namespace backend
|
|||
class Buffer;
|
||||
}
|
||||
|
||||
namespace experimental{
|
||||
|
||||
/**
|
||||
* @addtogroup _2d
|
||||
* @{
|
||||
|
@ -78,7 +76,7 @@ namespace experimental{
|
|||
* @js NA
|
||||
*/
|
||||
|
||||
class CC_DLL TMXLayer : public Node
|
||||
class CC_DLL FastTMXLayer : public Node
|
||||
{
|
||||
public:
|
||||
/** Possible orientations of the TMX map */
|
||||
|
@ -93,16 +91,16 @@ public:
|
|||
* @param mapInfo A map info.
|
||||
* @return Return an autorelease object.
|
||||
*/
|
||||
static TMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||
static FastTMXLayer * create(TMXTilesetInfo *tilesetInfo, TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TMXLayer();
|
||||
FastTMXLayer();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~TMXLayer();
|
||||
virtual ~FastTMXLayer();
|
||||
|
||||
/** Returns the tile gid at a given tile coordinate. It also returns the tile flags.
|
||||
*
|
||||
|
@ -361,5 +359,4 @@ protected:
|
|||
|
||||
// end of tilemap_parallax_nodes group
|
||||
/// @}
|
||||
} //end of namespace experimental
|
||||
NS_CC_END
|
||||
|
|
|
@ -30,13 +30,12 @@ THE SOFTWARE.
|
|||
#include "base/ccUTF8.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental {
|
||||
|
||||
// implementation FastTMXTiledMap
|
||||
|
||||
TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
||||
FastTMXTiledMap * FastTMXTiledMap::create(const std::string& tmxFile)
|
||||
{
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
FastTMXTiledMap *ret = new (std::nothrow) FastTMXTiledMap();
|
||||
if (ret->initWithTMXFile(tmxFile))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -46,9 +45,9 @@ TMXTiledMap * TMXTiledMap::create(const std::string& tmxFile)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
FastTMXTiledMap* FastTMXTiledMap::createWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
{
|
||||
TMXTiledMap *ret = new (std::nothrow) TMXTiledMap();
|
||||
FastTMXTiledMap *ret = new (std::nothrow) FastTMXTiledMap();
|
||||
if (ret->initWithXML(tmxString, resourcePath))
|
||||
{
|
||||
ret->autorelease();
|
||||
|
@ -58,7 +57,7 @@ TMXTiledMap* TMXTiledMap::createWithXML(const std::string& tmxString, const std:
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
bool TMXTiledMap::initWithTMXFile(const std::string& tmxFile)
|
||||
bool FastTMXTiledMap::initWithTMXFile(const std::string& tmxFile)
|
||||
{
|
||||
CCASSERT(tmxFile.size()>0, "FastTMXTiledMap: tmx file should not be empty");
|
||||
|
||||
|
@ -76,7 +75,7 @@ bool TMXTiledMap::initWithTMXFile(const std::string& tmxFile)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool TMXTiledMap::initWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
bool FastTMXTiledMap::initWithXML(const std::string& tmxString, const std::string& resourcePath)
|
||||
{
|
||||
setContentSize(Size::ZERO);
|
||||
|
||||
|
@ -88,24 +87,24 @@ bool TMXTiledMap::initWithXML(const std::string& tmxString, const std::string& r
|
|||
return true;
|
||||
}
|
||||
|
||||
TMXTiledMap::TMXTiledMap()
|
||||
FastTMXTiledMap::FastTMXTiledMap()
|
||||
:_mapSize(Size::ZERO)
|
||||
,_tileSize(Size::ZERO)
|
||||
{
|
||||
}
|
||||
|
||||
TMXTiledMap::~TMXTiledMap()
|
||||
FastTMXTiledMap::~FastTMXTiledMap()
|
||||
{
|
||||
}
|
||||
|
||||
// private
|
||||
TMXLayer * TMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
FastTMXLayer * FastTMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
TMXTilesetInfo *tileset = tilesetForLayer(layerInfo, mapInfo);
|
||||
if (tileset == nullptr)
|
||||
return nullptr;
|
||||
|
||||
TMXLayer *layer = TMXLayer::create(tileset, layerInfo, mapInfo);
|
||||
FastTMXLayer *layer = FastTMXLayer::create(tileset, layerInfo, mapInfo);
|
||||
|
||||
// tell the layerinfo to release the ownership of the tiles map.
|
||||
layerInfo->_ownTiles = false;
|
||||
|
@ -114,7 +113,7 @@ TMXLayer * TMXTiledMap::parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
|||
return layer;
|
||||
}
|
||||
|
||||
TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
TMXTilesetInfo * FastTMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo)
|
||||
{
|
||||
Size size = layerInfo->_layerSize;
|
||||
auto& tilesets = mapInfo->getTilesets();
|
||||
|
@ -158,7 +157,7 @@ TMXTilesetInfo * TMXTiledMap::tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInf
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
|
||||
void FastTMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
|
||||
{
|
||||
_mapSize = mapInfo->getMapSize();
|
||||
_tileSize = mapInfo->getTileSize();
|
||||
|
@ -176,7 +175,7 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
|
|||
for(const auto &layerInfo : layers) {
|
||||
if (layerInfo->_visible)
|
||||
{
|
||||
TMXLayer *child = parseLayer(layerInfo, mapInfo);
|
||||
FastTMXLayer *child = parseLayer(layerInfo, mapInfo);
|
||||
if (child == nullptr) {
|
||||
idx++;
|
||||
continue;
|
||||
|
@ -196,13 +195,13 @@ void TMXTiledMap::buildWithMapInfo(TMXMapInfo* mapInfo)
|
|||
}
|
||||
|
||||
// public
|
||||
TMXLayer * TMXTiledMap::getLayer(const std::string& layerName) const
|
||||
FastTMXLayer * FastTMXTiledMap::getLayer(const std::string& layerName) const
|
||||
{
|
||||
CCASSERT(layerName.size() > 0, "Invalid layer name!");
|
||||
|
||||
for (auto& child : _children)
|
||||
{
|
||||
TMXLayer* layer = dynamic_cast<TMXLayer*>(child);
|
||||
FastTMXLayer* layer = dynamic_cast<FastTMXLayer*>(child);
|
||||
if(layer)
|
||||
{
|
||||
if(layerName.compare( layer->getLayerName()) == 0)
|
||||
|
@ -216,7 +215,7 @@ TMXLayer * TMXTiledMap::getLayer(const std::string& layerName) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
TMXObjectGroup * TMXTiledMap::getObjectGroup(const std::string& groupName) const
|
||||
TMXObjectGroup * FastTMXTiledMap::getObjectGroup(const std::string& groupName) const
|
||||
{
|
||||
CCASSERT(groupName.size() > 0, "Invalid group name!");
|
||||
|
||||
|
@ -235,7 +234,7 @@ TMXObjectGroup * TMXTiledMap::getObjectGroup(const std::string& groupName) const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
Value TMXTiledMap::getProperty(const std::string& propertyName) const
|
||||
Value FastTMXTiledMap::getProperty(const std::string& propertyName) const
|
||||
{
|
||||
auto propsItr = _properties.find(propertyName);
|
||||
if (propsItr != _properties.end())
|
||||
|
@ -244,7 +243,7 @@ Value TMXTiledMap::getProperty(const std::string& propertyName) const
|
|||
return Value();
|
||||
}
|
||||
|
||||
Value TMXTiledMap::getPropertiesForGID(int GID) const
|
||||
Value FastTMXTiledMap::getPropertiesForGID(int GID) const
|
||||
{
|
||||
auto propsItr = _tileProperties.find(GID);
|
||||
if (propsItr != _tileProperties.end())
|
||||
|
@ -253,12 +252,9 @@ Value TMXTiledMap::getPropertiesForGID(int GID) const
|
|||
return Value();
|
||||
}
|
||||
|
||||
std::string TMXTiledMap::getDescription() const
|
||||
std::string FastTMXTiledMap::getDescription() const
|
||||
{
|
||||
return StringUtils::format("<FastTMXTiledMap | Tag = %d, Layers = %d", _tag, static_cast<int>(_children.size()));
|
||||
}
|
||||
|
||||
} //end of namespace experimental
|
||||
|
||||
NS_CC_END
|
||||
|
||||
|
|
|
@ -25,8 +25,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#ifndef __CC_FAST_TMX_TILEMAP_H__
|
||||
#define __CC_FAST_TMX_TILEMAP_H__
|
||||
#pragma once
|
||||
|
||||
#include "2d/CCNode.h"
|
||||
#include "2d/CCTMXObjectGroup.h"
|
||||
|
@ -36,10 +35,7 @@ NS_CC_BEGIN
|
|||
class TMXLayerInfo;
|
||||
class TMXTilesetInfo;
|
||||
class TMXMapInfo;
|
||||
|
||||
namespace experimental {
|
||||
|
||||
class TMXLayer;
|
||||
class FastTMXLayer;
|
||||
/**
|
||||
* @addtogroup _2d
|
||||
* @{
|
||||
|
@ -97,14 +93,14 @@ class TMXLayer;
|
|||
* @since v3.2
|
||||
* @js NA
|
||||
*/
|
||||
class CC_DLL TMXTiledMap : public Node
|
||||
class CC_DLL FastTMXTiledMap : public Node
|
||||
{
|
||||
public:
|
||||
/** Creates a TMX Tiled Map with a TMX file.
|
||||
*
|
||||
* @return An autorelease object.
|
||||
*/
|
||||
static TMXTiledMap* create(const std::string& tmxFile);
|
||||
static FastTMXTiledMap* create(const std::string& tmxFile);
|
||||
|
||||
/** Initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources.
|
||||
*
|
||||
|
@ -112,13 +108,13 @@ public:
|
|||
* @param resourcePath A path to TMX resources.
|
||||
* @return An autorelease object.
|
||||
*/
|
||||
static TMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
|
||||
static FastTMXTiledMap* createWithXML(const std::string& tmxString, const std::string& resourcePath);
|
||||
|
||||
/** Return the FastTMXLayer for the specific layer.
|
||||
*
|
||||
* @return Return the FastTMXLayer for the specific layer.
|
||||
*/
|
||||
TMXLayer* getLayer(const std::string& layerName) const;
|
||||
FastTMXLayer* getLayer(const std::string& layerName) const;
|
||||
|
||||
/** Return the TMXObjectGroup for the specific group.
|
||||
*
|
||||
|
@ -209,12 +205,12 @@ protected:
|
|||
/**
|
||||
* @js ctor
|
||||
*/
|
||||
TMXTiledMap();
|
||||
FastTMXTiledMap();
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
*/
|
||||
virtual ~TMXTiledMap();
|
||||
virtual ~FastTMXTiledMap();
|
||||
|
||||
/** initializes a TMX Tiled Map with a TMX file */
|
||||
bool initWithTMXFile(const std::string& tmxFile);
|
||||
|
@ -222,7 +218,7 @@ protected:
|
|||
/** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */
|
||||
bool initWithXML(const std::string& tmxString, const std::string& resourcePath);
|
||||
|
||||
TMXLayer * parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||
FastTMXLayer * parseLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||
TMXTilesetInfo * tilesetForLayer(TMXLayerInfo *layerInfo, TMXMapInfo *mapInfo);
|
||||
void buildWithMapInfo(TMXMapInfo* mapInfo);
|
||||
|
||||
|
@ -241,17 +237,12 @@ protected:
|
|||
ValueMapIntKey _tileProperties;
|
||||
|
||||
private:
|
||||
CC_DISALLOW_COPY_AND_ASSIGN(TMXTiledMap);
|
||||
CC_DISALLOW_COPY_AND_ASSIGN(FastTMXTiledMap);
|
||||
|
||||
};
|
||||
|
||||
// end of tilemap_parallax_nodes group
|
||||
/** @} */
|
||||
|
||||
} //end of namespace experimental
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif //__CCTMX_TILE_MAP2_H__
|
||||
|
||||
|
||||
|
|
|
@ -48,7 +48,6 @@
|
|||
#endif // ERROR
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
const int AudioEngine::INVALID_AUDIO_ID = -1;
|
||||
const float AudioEngine::TIME_UNKNOWN = -1.0f;
|
||||
|
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/cutils/log.h"
|
||||
#include "audio/android/AssetFd.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AssetFd::AssetFd(int assetFd)
|
||||
: _assetFd(assetFd)
|
||||
|
@ -45,4 +45,4 @@ AssetFd::~AssetFd()
|
|||
}
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
|
||||
#include <unistd.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AssetFd
|
||||
{
|
||||
|
@ -39,5 +39,5 @@ private:
|
|||
int _assetFd;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <stdint.h>
|
||||
#include "audio/android/utils/Errors.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class AudioBufferProvider
|
||||
|
@ -77,4 +77,4 @@ public:
|
|||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -34,7 +34,7 @@ THE SOFTWARE.
|
|||
#include <chrono>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
size_t AudioDecoder::fileRead(void* ptr, size_t size, size_t nmemb, void* datasource)
|
||||
{
|
||||
|
@ -291,4 +291,4 @@ bool AudioDecoder::interleave()
|
|||
return false;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/PcmData.h"
|
||||
#include "base/CCData.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoder
|
||||
{
|
||||
|
@ -61,4 +61,4 @@ protected:
|
|||
size_t _fileCurrPos;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/mp3reader.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoderMp3::AudioDecoderMp3()
|
||||
{
|
||||
|
@ -80,4 +80,4 @@ bool AudioDecoderMp3::decodeToPcm()
|
|||
return false;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "audio/android/AudioDecoder.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoderMp3 : public AudioDecoder
|
||||
{
|
||||
|
@ -40,4 +40,4 @@ protected:
|
|||
friend class AudioDecoderProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/AudioDecoderOgg.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoderOgg::AudioDecoderOgg()
|
||||
{
|
||||
|
@ -110,4 +110,4 @@ bool AudioDecoderOgg::decodeToPcm()
|
|||
return (curPos > 0);
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "Tremolo/ivorbisfile.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoderOgg : public AudioDecoder
|
||||
{
|
||||
|
@ -43,4 +43,4 @@ protected:
|
|||
friend class AudioDecoderProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -31,7 +31,7 @@
|
|||
#include "audio/android/AudioDecoderWav.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoder* AudioDecoderProvider::createAudioDecoder(SLEngineItf engineItf, const std::string &url, int bufferSizeInFrames, int sampleRate, const FdGetterCallback &fdGetterCallback)
|
||||
{
|
||||
|
@ -90,4 +90,4 @@ void AudioDecoderProvider::destroyAudioDecoder(AudioDecoder** decoder)
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "audio/android/OpenSLHelper.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoder;
|
||||
|
||||
|
@ -38,4 +38,4 @@ public:
|
|||
static void destroyAudioDecoder(AudioDecoder** decoder);
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/AudioDecoderSLES.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/* Explicitly requesting SL_IID_ANDROIDSIMPLEBUFFERQUEUE and SL_IID_PREFETCHSTATUS
|
||||
* on the UrlAudioPlayer object for decoding, SL_IID_METADATAEXTRACTION for retrieving the
|
||||
|
@ -643,4 +643,4 @@ void AudioDecoderSLES::decodeToPcmCallback(SLAndroidSimpleBufferQueueItf queueIt
|
|||
queryAudioInfo();
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoderSLES : public AudioDecoder
|
||||
{
|
||||
|
@ -94,4 +94,4 @@ private:
|
|||
friend class AudioDecoderProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/tinysndfile.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoderWav::AudioDecoderWav()
|
||||
{
|
||||
|
@ -110,4 +110,4 @@ bool AudioDecoderWav::decodeToPcm()
|
|||
return ret;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "audio/android/AudioDecoder.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoderWav : public AudioDecoder
|
||||
{
|
||||
|
@ -44,4 +44,4 @@ protected:
|
|||
friend class AudioDecoderProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -55,7 +55,6 @@
|
|||
#include "audio/android/UrlAudioPlayer.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
// Audio focus values synchronized with which in cocos/platform/android/java/src/org/cocos2dx/lib/Cocos2dxActivity.java
|
||||
static const int AUDIOFOCUS_GAIN = 0;
|
||||
|
|
|
@ -43,8 +43,6 @@ NS_CC_BEGIN
|
|||
class EventCustom;
|
||||
class EventListener;
|
||||
|
||||
namespace experimental {
|
||||
|
||||
class IAudioPlayer;
|
||||
class AudioPlayerProvider;
|
||||
|
||||
|
@ -103,7 +101,7 @@ private:
|
|||
};
|
||||
|
||||
#endif // __AUDIO_ENGINE_INL_H_
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -73,7 +73,7 @@ static const bool kUseFloat = false;
|
|||
// Set to default copy buffer size in frames for input processing.
|
||||
static const size_t kCopyBufferFrameCount = 256;
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -2098,4 +2098,4 @@ AudioMixer::process_hook_t AudioMixer::getProcessHook(int processType, uint32_t
|
|||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
// FIXME This is actually unity gain, which might not be max in future, expressed in U.12
|
||||
#define MAX_GAIN_INT AudioMixer::UNITY_GAIN_INT
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -386,4 +386,4 @@ private:
|
|||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include <stdlib.h>
|
||||
#include <algorithm>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioMixerController::AudioMixerController(int bufferSizeInFrames, int sampleRate, int channelCount)
|
||||
: _bufferSizeInFrames(bufferSizeInFrames)
|
||||
|
@ -348,4 +348,4 @@ bool AudioMixerController::hasPlayingTacks()
|
|||
return false;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include <atomic>
|
||||
#include <vector>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class Track;
|
||||
class AudioMixer;
|
||||
|
@ -85,4 +85,4 @@ private:
|
|||
std::atomic_bool _isMixingFrame;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
#include "audio/android/cutils/log.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/* Behavior of is_same<>::value is true if the types are identical,
|
||||
* false otherwise. Identical to the STL std::is_same.
|
||||
|
@ -446,5 +446,5 @@ inline void volumeMulti(TO* out, size_t frameCount,
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ THE SOFTWARE.
|
|||
#include <stdlib.h>
|
||||
#include <algorithm> // for std::find_if
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
static int getSystemAPILevel()
|
||||
{
|
||||
|
@ -516,4 +516,4 @@ void AudioPlayerProvider::resume()
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include <memory>
|
||||
#include <condition_variable>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
// Manage PcmAudioPlayer& UrlAudioPlayer
|
||||
|
||||
class PcmAudioPlayer;
|
||||
|
@ -124,5 +124,5 @@ private:
|
|||
ThreadPool* _threadPool;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -785,4 +785,4 @@ void AudioResamplerOrder1::AsmStereo16Loop(int16_t *in, int32_t* maxOutPt, int32
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <assert.h>
|
||||
#include "audio/android/audio.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
|
||||
class AudioResampler {
|
||||
|
@ -178,4 +178,4 @@ private:
|
|||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include "audio/android/AudioResampler.h"
|
||||
#include "audio/android/AudioResamplerCubic.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void AudioResamplerCubic::init() {
|
||||
|
@ -188,4 +188,4 @@ save_state:
|
|||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include "audio/android/AudioResampler.h"
|
||||
#include "audio/android/AudioBufferProvider.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
class AudioResamplerCubic : public AudioResampler {
|
||||
|
@ -62,4 +62,4 @@ private:
|
|||
};
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
// AUDIO_RESAMPLER_DOWN_RATIO_MAX is the maximum ratio between the original
|
||||
// audio sample rate and the target rate when downsampling,
|
||||
|
@ -169,6 +169,6 @@ static inline bool isMusicRate(uint32_t sampleRate) {
|
|||
return sampleRate >= AUDIO_PROCESSING_MUSIC_RATE;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#define LOGD(...) printf(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
#define DEFAULT_THREAD_POOL_MIN_NUM (4)
|
||||
#define DEFAULT_THREAD_POOL_MAX_NUM (20)
|
||||
|
@ -440,4 +440,4 @@ void ThreadPool::setThread(int tid)
|
|||
new(std::nothrow) std::thread(f)); // compiler may not support std::make_unique()
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
#include <vector>
|
||||
#include <atomic>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
* @addtogroup base
|
||||
|
@ -234,4 +234,4 @@ private:
|
|||
// end of base group
|
||||
/// @}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
|
||||
#include <functional>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class IAudioPlayer
|
||||
{
|
||||
|
@ -86,4 +86,4 @@ public:
|
|||
virtual void setPlayEventCallback(const PlayEventCallback &playEventCallback) = 0;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -27,7 +27,7 @@ THE SOFTWARE.
|
|||
#include <functional>
|
||||
#include <thread>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class ICallerThreadUtils
|
||||
{
|
||||
|
@ -39,4 +39,4 @@ public:
|
|||
virtual std::thread::id getCallerThreadId() = 0;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -26,7 +26,7 @@ THE SOFTWARE.
|
|||
|
||||
#include "audio/android/audio_utils/include/audio_utils/minifloat.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class IVolumeProvider
|
||||
{
|
||||
|
@ -42,4 +42,4 @@ protected:
|
|||
{ }
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/AudioMixerController.h"
|
||||
#include "audio/android/ICallerThreadUtils.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
PcmAudioPlayer::PcmAudioPlayer(AudioMixerController * controller, ICallerThreadUtils* callerThreadUtils)
|
||||
: _id(-1)
|
||||
|
@ -223,4 +223,4 @@ IAudioPlayer::State PcmAudioPlayer::getState() const
|
|||
return state;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/PcmData.h"
|
||||
#include "audio/android/Track.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class ICallerThreadUtils;
|
||||
class AudioMixerController;
|
||||
|
@ -95,4 +95,4 @@ private:
|
|||
friend class AudioPlayerProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/PcmAudioService.h"
|
||||
#include "audio/android/AudioMixerController.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
static std::vector<char> __silenceData;
|
||||
|
||||
|
@ -197,4 +197,4 @@ void PcmAudioService::resume()
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -32,7 +32,7 @@ THE SOFTWARE.
|
|||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioMixerController;
|
||||
|
||||
|
@ -79,4 +79,4 @@ private:
|
|||
friend class AudioPlayerProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -35,7 +35,7 @@ THE SOFTWARE.
|
|||
#define ALOGVV(a...) do { } while (0)
|
||||
#endif
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
PcmBufferProvider::PcmBufferProvider()
|
||||
: _addr(nullptr)
|
||||
|
@ -99,4 +99,4 @@ void PcmBufferProvider::reset() {
|
|||
_nextFrame = 0;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class PcmBufferProvider : public AudioBufferProvider
|
||||
{
|
||||
|
@ -49,4 +49,4 @@ protected:
|
|||
size_t _unrel; // number of frames not yet released
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -28,7 +28,7 @@ THE SOFTWARE.
|
|||
#include "audio/android/OpenSLHelper.h"
|
||||
#include "audio/android/PcmData.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
PcmData::PcmData()
|
||||
{
|
||||
|
@ -136,4 +136,4 @@ std::string PcmData::toString() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
struct PcmData
|
||||
{
|
||||
|
@ -63,4 +63,4 @@ struct PcmData
|
|||
std::string toString() const;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@ THE SOFTWARE.
|
|||
|
||||
#include <math.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
Track::Track(const PcmData &pcmData)
|
||||
: onStateChanged(nullptr)
|
||||
|
@ -103,4 +103,4 @@ void Track::setState(State state)
|
|||
}
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
|
@ -32,7 +32,7 @@ THE SOFTWARE.
|
|||
#include <functional>
|
||||
#include <mutex>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class Track : public PcmBufferProvider, public IVolumeProvider
|
||||
{
|
||||
|
@ -104,4 +104,4 @@ private:
|
|||
friend class AudioMixerController;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -34,12 +34,12 @@ THE SOFTWARE.
|
|||
namespace {
|
||||
|
||||
std::mutex __playerContainerMutex;
|
||||
std::vector<cocos2d::experimental::UrlAudioPlayer*> __playerContainer;
|
||||
std::vector<cocos2d::UrlAudioPlayer*> __playerContainer;
|
||||
std::once_flag __onceFlag;
|
||||
|
||||
}
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class SLUrlAudioPlayerCallbackProxy
|
||||
{
|
||||
|
@ -421,4 +421,4 @@ void UrlAudioPlayer::destroy()
|
|||
}
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class ICallerThreadUtils;
|
||||
class AssetFd;
|
||||
|
@ -132,4 +132,4 @@ private:
|
|||
friend class AudioPlayerProvider;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
// use this type to return error codes
|
||||
#ifdef _WIN32
|
||||
|
@ -81,7 +81,7 @@ enum {
|
|||
# define NO_ERROR 0L
|
||||
#endif
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -25,11 +25,11 @@ THE SOFTWARE.
|
|||
#include "audio/android/utils/Utils.h"
|
||||
#include "platform/android/jni/JniHelper.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
int getSDKVersion()
|
||||
{
|
||||
return JniHelper::callStaticIntMethod("org.cocos2dx.lib.Cocos2dxHelper", "getSDKVersion");
|
||||
}
|
||||
|
||||
}} // end of namespace cocos2d { namespace experimental
|
||||
} // end of namespace cocos2d
|
||||
|
|
|
@ -25,6 +25,6 @@ THE SOFTWARE.
|
|||
|
||||
#include <string>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
extern int getSDKVersion();
|
||||
}}
|
||||
}
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import <OpenAL/al.h>
|
||||
|
||||
#include <string>
|
||||
|
@ -38,7 +35,6 @@
|
|||
#include "audio/apple/AudioMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental{
|
||||
|
||||
class AudioEngineImpl;
|
||||
class AudioPlayer;
|
||||
|
@ -111,6 +107,3 @@ protected:
|
|||
};
|
||||
|
||||
}
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
#define LOG_TAG "AudioCache"
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "audio/apple/AudioCache.h"
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
@ -89,7 +86,6 @@ unsigned int __idIndex = 0;
|
|||
@end
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
AudioCache::AudioCache()
|
||||
: _format(-1)
|
||||
|
@ -405,5 +401,3 @@ void AudioCache::invokingLoadCallbacks()
|
|||
_loadCallbacks.clear();
|
||||
});
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
#include <stdint.h>
|
||||
#import <AudioToolbox/ExtendedAudioFile.h>
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
* @brief The class for decoding compressed audio file to PCM buffer.
|
||||
|
@ -117,4 +117,4 @@ private:
|
|||
AudioStreamBasicDescription _outputFormat;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
#define LOG_TAG "AudioDecoder"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoder::AudioDecoder()
|
||||
: _isOpened(false)
|
||||
|
@ -226,4 +226,4 @@ namespace cocos2d { namespace experimental {
|
|||
return _isOpened;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#ifndef __AUDIO_ENGINE_INL_H_
|
||||
#define __AUDIO_ENGINE_INL_H_
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
#include <list>
|
||||
|
@ -39,7 +34,6 @@
|
|||
NS_CC_BEGIN
|
||||
class Scheduler;
|
||||
|
||||
namespace experimental{
|
||||
#define MAX_AUDIOINSTANCES 24
|
||||
|
||||
class AudioEngineImpl : public cocos2d::Ref
|
||||
|
@ -89,7 +83,4 @@ private:
|
|||
int _currentAudioID;
|
||||
Scheduler* _scheduler;
|
||||
};
|
||||
}
|
||||
NS_CC_END
|
||||
#endif // __AUDIO_ENGINE_INL_H_
|
||||
#endif
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
#define LOG_TAG "AudioEngine-inl.mm"
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "audio/apple/AudioEngine-inl.h"
|
||||
|
||||
#import <OpenAL/alc.h>
|
||||
|
@ -44,7 +41,6 @@
|
|||
#endif
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
static ALCdevice* s_ALDevice = nullptr;
|
||||
static ALCcontext* s_ALContext = nullptr;
|
||||
|
@ -711,5 +707,3 @@ void AudioEngineImpl::uncacheAll()
|
|||
{
|
||||
_audioCaches.clear();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#include "platform/CCPlatformMacros.h"
|
||||
#include "audio/apple/AudioMacros.h"
|
||||
|
||||
|
@ -38,7 +35,6 @@
|
|||
#include <OpenAL/al.h>
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental{
|
||||
|
||||
class AudioCache;
|
||||
class AudioEngineImpl;
|
||||
|
@ -91,7 +87,4 @@ protected:
|
|||
friend class AudioEngineImpl;
|
||||
};
|
||||
|
||||
}
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
#define LOG_TAG "AudioPlayer"
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#include "audio/apple/AudioPlayer.h"
|
||||
|
@ -42,7 +39,6 @@
|
|||
#endif
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
namespace {
|
||||
unsigned int __idIndex = 0;
|
||||
|
@ -371,5 +367,3 @@ bool AudioPlayer::setTime(float time)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -43,8 +43,6 @@
|
|||
*/
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental {
|
||||
|
||||
/**
|
||||
* @class AudioProfile
|
||||
*
|
||||
|
@ -368,7 +366,6 @@ protected:
|
|||
friend class AudioEngineImpl;
|
||||
};
|
||||
|
||||
} // namespace experimental {
|
||||
NS_CC_END
|
||||
|
||||
// end group
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "platform/CCFileUtils.h"
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
AudioEngineImpl * g_AudioEngineImpl = nullptr;
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#include "base/CCRef.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental{
|
||||
|
||||
#define MAX_AUDIOINSTANCES 32
|
||||
|
||||
class CC_DLL AudioEngineImpl : public cocos2d::Ref
|
||||
|
@ -102,7 +102,7 @@ private:
|
|||
FMOD::System* pSystem;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
#endif // __AUDIO_ENGINE_LINUX_H_
|
||||
#endif
|
||||
|
|
|
@ -52,7 +52,6 @@ unsigned int __idIndex = 0;
|
|||
#define PCMDATA_CACHEMAXSIZE 1048576
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
AudioCache::AudioCache()
|
||||
: _totalFrames(0)
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
#include "audio/win32/AudioMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental{
|
||||
|
||||
class AudioEngineImpl;
|
||||
class AudioPlayer;
|
||||
|
@ -115,7 +114,6 @@ protected:
|
|||
friend class AudioPlayer;
|
||||
};
|
||||
|
||||
}
|
||||
NS_CC_END
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define LOG_TAG "AudioDecoder"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoder::AudioDecoder()
|
||||
: _isOpened(false)
|
||||
|
@ -89,4 +89,4 @@ AudioDecoder::AudioDecoder()
|
|||
return _channelCount;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "vorbis/vorbisfile.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
* @brief The class for decoding compressed audio file to PCM buffer.
|
||||
|
@ -117,4 +117,4 @@ protected:
|
|||
friend class AudioDecoderManager;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -33,7 +33,7 @@ THE SOFTWARE.
|
|||
#include "base/CCConsole.h"
|
||||
#include "mpg123.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
static bool __mp3Inited = false;
|
||||
|
||||
|
@ -67,5 +67,5 @@ void AudioDecoderManager::destroyDecoder(AudioDecoder* decoder)
|
|||
delete decoder;
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ THE SOFTWARE.
|
|||
|
||||
#pragma once
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
class AudioDecoder;
|
||||
|
||||
|
@ -38,5 +38,5 @@ public:
|
|||
static void destroyDecoder(AudioDecoder* decoder);
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
|
||||
#define LOG_TAG "AudioDecoderMp3"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
static bool __mp3Inited = false;
|
||||
|
||||
|
@ -181,4 +181,4 @@ namespace cocos2d { namespace experimental {
|
|||
return static_cast<uint32_t>(mpg123_tell(_mpg123handle));
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
struct mpg123_handle_struct;
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
* @brief The class for decoding compressed audio file to PCM buffer.
|
||||
|
@ -83,4 +83,4 @@ protected:
|
|||
friend class AudioDecoderManager;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define LOG_TAG "AudioDecoderOgg"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
AudioDecoderOgg::AudioDecoderOgg()
|
||||
{
|
||||
|
@ -84,4 +84,4 @@ namespace cocos2d { namespace experimental {
|
|||
return static_cast<uint32_t>(ov_pcm_tell(const_cast<OggVorbis_File*>(&_vf)));
|
||||
}
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include "vorbis/vorbisfile.h"
|
||||
|
||||
namespace cocos2d { namespace experimental {
|
||||
namespace cocos2d {
|
||||
|
||||
/**
|
||||
* @brief The class for decoding compressed audio file to PCM buffer.
|
||||
|
@ -79,4 +79,4 @@ protected:
|
|||
friend class AudioDecoderManager;
|
||||
};
|
||||
|
||||
}} // namespace cocos2d { namespace experimental {
|
||||
} // namespace cocos2d {
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#define LOG_TAG "AudioEngine-Win32"
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include "audio/win32/AudioEngine-win32.h"
|
||||
|
||||
#ifdef OPENAL_PLAIN_INCLUDES
|
||||
|
@ -45,6 +39,8 @@
|
|||
|
||||
#include <windows.h>
|
||||
|
||||
#define LOG_TAG "AudioEngine-Win32"
|
||||
|
||||
// log, CCLOG aren't threadsafe, since we uses sub threads for parsing pcm data, threadsafe log output
|
||||
// is needed. Define the following macros (ALOGV, ALOGD, ALOGI, ALOGW, ALOGE) for threadsafe log output.
|
||||
|
||||
|
@ -105,7 +101,6 @@ void audioLog(const char * format, ...)
|
|||
}
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
static ALCdevice *s_ALDevice = nullptr;
|
||||
static ALCcontext *s_ALContext = nullptr;
|
||||
|
@ -516,5 +511,3 @@ void AudioEngineImpl::uncacheAll()
|
|||
{
|
||||
_audioCaches.clear();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#ifndef __AUDIO_ENGINE_INL_H_
|
||||
#define __AUDIO_ENGINE_INL_H_
|
||||
#pragma once
|
||||
|
||||
#include <unordered_map>
|
||||
|
||||
|
@ -39,7 +34,6 @@ NS_CC_BEGIN
|
|||
|
||||
class Scheduler;
|
||||
|
||||
namespace experimental {
|
||||
#define MAX_AUDIOINSTANCES 32
|
||||
|
||||
class CC_DLL AudioEngineImpl : public cocos2d::Ref
|
||||
|
@ -86,8 +80,5 @@ private:
|
|||
int _currentAudioID;
|
||||
Scheduler* _scheduler;
|
||||
};
|
||||
}
|
||||
NS_CC_END
|
||||
#endif // __AUDIO_ENGINE_INL_H_
|
||||
#endif
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -22,12 +22,6 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#define LOG_TAG "AudioPlayer"
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
#include "audio/win32/AudioPlayer.h"
|
||||
#include "audio/win32/AudioCache.h"
|
||||
#include "platform/CCFileUtils.h"
|
||||
|
@ -41,8 +35,9 @@
|
|||
#define ALOGVV(...) do{} while(false)
|
||||
#endif
|
||||
|
||||
#define LOG_TAG "AudioPlayer"
|
||||
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
namespace {
|
||||
unsigned int __idIndex = 0;
|
||||
|
@ -343,5 +338,3 @@ bool AudioPlayer::setTime(float time)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,13 +22,8 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
#include <condition_variable>
|
||||
#include <functional>
|
||||
#include <mutex>
|
||||
|
@ -42,7 +37,6 @@
|
|||
#include "platform/CCPlatformMacros.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
namespace experimental{
|
||||
|
||||
class AudioCache;
|
||||
class AudioEngineImpl;
|
||||
|
@ -93,8 +87,4 @@ protected:
|
|||
friend class AudioEngineImpl;
|
||||
};
|
||||
|
||||
}
|
||||
NS_CC_END
|
||||
|
||||
#endif //CC_TARGET_PLATFORM == CC_PLATFORM_WIN32
|
||||
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
|
||||
using namespace CocosDenshion;
|
||||
using namespace cocos2d;
|
||||
using namespace cocos2d::experimental;
|
||||
|
||||
struct SimpleAudioEngineDelegate {
|
||||
SimpleAudioEngine * engine = nullptr;
|
||||
|
|
|
@ -30,7 +30,6 @@ set(lua_bindings_manual_headers
|
|||
manual/cocostudio/lua-cocos-studio-conversions.h
|
||||
manual/cocostudio/CustomGUIReader.h
|
||||
manual/ui/lua_cocos2dx_ui_manual.hpp
|
||||
manual/ui/lua_cocos2dx_experimental_video_manual.hpp
|
||||
manual/controller/lua_cocos2dx_controller_manual.hpp
|
||||
)
|
||||
|
||||
|
@ -46,7 +45,6 @@ set(lua_bindings_manual_files
|
|||
manual/CCComponentLua.cpp
|
||||
manual/cocos2d/LuaScriptHandlerMgr.cpp
|
||||
manual/cocos2d/lua_cocos2dx_deprecated.cpp
|
||||
manual/cocos2d/lua_cocos2dx_experimental_manual.cpp
|
||||
manual/cocos2d/lua_cocos2dx_manual.cpp
|
||||
manual/cocos2d/lua_cocos2dx_physics_manual.cpp
|
||||
manual/3d/lua_cocos2dx_3d_manual.cpp
|
||||
|
@ -63,7 +61,6 @@ set(lua_bindings_manual_files
|
|||
manual/network/lua_downloader.cpp
|
||||
#manual/spine/lua_cocos2dx_spine_manual.cpp
|
||||
manual/spine/LuaSkeletonAnimation.cpp
|
||||
manual/ui/lua_cocos2dx_experimental_video_manual.cpp
|
||||
manual/ui/lua_cocos2dx_ui_manual.cpp
|
||||
manual/audioengine/lua_cocos2dx_audioengine_manual.cpp
|
||||
manual/physics3d/lua_cocos2dx_physics3d_manual.cpp
|
||||
|
@ -76,13 +73,10 @@ set(lua_bindings_auto_headers
|
|||
auto/lua_cocos2dx_3d_auto.hpp
|
||||
auto/lua_cocos2dx_controller_auto.hpp
|
||||
auto/lua_cocos2dx_spine_auto.hpp
|
||||
auto/lua_cocos2dx_experimental_webview_auto.hpp
|
||||
auto/lua_cocos2dx_studio_auto.hpp
|
||||
auto/lua_cocos2dx_auto.hpp
|
||||
auto/lua_cocos2dx_experimental_video_auto.hpp
|
||||
auto/lua_cocos2dx_navmesh_auto.hpp
|
||||
auto/lua_cocos2dx_csloader_auto.hpp
|
||||
auto/lua_cocos2dx_experimental_auto.hpp
|
||||
auto/lua_cocos2dx_physics3d_auto.hpp
|
||||
auto/lua_cocos2dx_ui_auto.hpp
|
||||
auto/lua_cocos2dx_physics_auto.hpp
|
||||
|
@ -94,8 +88,6 @@ set(lua_bindings_auto_files
|
|||
auto/lua_cocos2dx_3d_auto.cpp
|
||||
auto/lua_cocos2dx_auto.cpp
|
||||
auto/lua_cocos2dx_controller_auto.cpp
|
||||
auto/lua_cocos2dx_experimental_auto.cpp
|
||||
auto/lua_cocos2dx_experimental_video_auto.cpp
|
||||
auto/lua_cocos2dx_extension_auto.cpp
|
||||
auto/lua_cocos2dx_physics_auto.cpp
|
||||
#auto/lua_cocos2dx_spine_auto.cpp
|
||||
|
@ -121,25 +113,33 @@ if(APPLE)
|
|||
if(IOS)
|
||||
set(lua_bindings_manual_headers
|
||||
${lua_bindings_manual_headers}
|
||||
auto/lua_cocos2dx_experimental_webview_auto.hpp
|
||||
manual/ui/lua_cocos2dx_experimental_webview_manual.hpp
|
||||
manual/ui/lua_cocos2dx_webview_manual.hpp
|
||||
auto/lua_cocos2dx_webview_auto.hpp
|
||||
auto/lua_cocos2dx_video_auto.hpp
|
||||
manual/ui/lua_cocos2dx_video_manual.hpp
|
||||
)
|
||||
set(lua_bindings_manual_files
|
||||
${lua_bindings_manual_files}
|
||||
auto/lua_cocos2dx_experimental_webview_auto.cpp
|
||||
manual/ui/lua_cocos2dx_experimental_webview_manual.cpp
|
||||
manual/ui/lua_cocos2dx_webview_manual.cpp
|
||||
auto/lua_cocos2dx_webview_auto.cpp
|
||||
manual/ui/lua_cocos2dx_video_manual.cpp
|
||||
auto/lua_cocos2dx_video_auto.cpp
|
||||
)
|
||||
endif()
|
||||
elseif(ANDROID)
|
||||
set(lua_bindings_manual_headers
|
||||
${lua_bindings_manual_headers}
|
||||
auto/lua_cocos2dx_experimental_webview_auto.hpp
|
||||
manual/ui/lua_cocos2dx_experimental_webview_manual.hpp
|
||||
manual/ui/lua_cocos2dx_webview_manual.hpp
|
||||
auto/lua_cocos2dx_webview_auto.hpp
|
||||
auto/lua_cocos2dx_video_auto.hpp
|
||||
manual/ui/lua_cocos2dx_video_manual.hpp
|
||||
)
|
||||
set(lua_bindings_manual_files
|
||||
${lua_bindings_manual_files}
|
||||
auto/lua_cocos2dx_experimental_webview_auto.cpp
|
||||
manual/ui/lua_cocos2dx_experimental_webview_manual.cpp
|
||||
manual/ui/lua_cocos2dx_webview_manual.cpp
|
||||
auto/lua_cocos2dx_webview_auto.cpp
|
||||
manual/ui/lua_cocos2dx_video_manual.cpp
|
||||
auto/lua_cocos2dx_video_auto.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
int lua_cocos2dx_audioengine_AudioProfile_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::AudioProfile* cobj = nullptr;
|
||||
cocos2d::AudioProfile* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
@ -24,12 +24,12 @@ int lua_cocos2dx_audioengine_AudioProfile_constructor(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioProfile_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::experimental::AudioProfile();
|
||||
tolua_pushusertype(tolua_S,(void*)cobj,"ccexp.AudioProfile");
|
||||
cobj = new cocos2d::AudioProfile();
|
||||
tolua_pushusertype(tolua_S,(void*)cobj,"cc.AudioProfile");
|
||||
tolua_register_gc(tolua_S,lua_gettop(tolua_S));
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.AudioProfile:AudioProfile",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "cc.AudioProfile:AudioProfile",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
|
@ -47,15 +47,15 @@ static int lua_cocos2dx_audioengine_AudioProfile_finalize(lua_State* tolua_S)
|
|||
|
||||
int lua_register_cocos2dx_audioengine_AudioProfile(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.AudioProfile");
|
||||
tolua_cclass(tolua_S,"AudioProfile","ccexp.AudioProfile","",nullptr);
|
||||
tolua_usertype(tolua_S,"cc.AudioProfile");
|
||||
tolua_cclass(tolua_S,"AudioProfile","cc.AudioProfile","",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"AudioProfile");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_audioengine_AudioProfile_constructor);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::AudioProfile).name();
|
||||
g_luaType[typeName] = "ccexp.AudioProfile";
|
||||
g_typeCast["AudioProfile"] = "ccexp.AudioProfile";
|
||||
std::string typeName = typeid(cocos2d::AudioProfile).name();
|
||||
g_luaType[typeName] = "cc.AudioProfile";
|
||||
g_typeCast["AudioProfile"] = "cc.AudioProfile";
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,7 @@ int lua_cocos2dx_audioengine_AudioEngine_lazyInit(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -81,11 +81,11 @@ int lua_cocos2dx_audioengine_AudioEngine_lazyInit(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_lazyInit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::experimental::AudioEngine::lazyInit();
|
||||
bool ret = cocos2d::AudioEngine::lazyInit();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:lazyInit",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:lazyInit",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -103,7 +103,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setCurrentTime(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -112,18 +112,18 @@ int lua_cocos2dx_audioengine_AudioEngine_setCurrentTime(lua_State* tolua_S)
|
|||
{
|
||||
int arg0;
|
||||
double arg1;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setCurrentTime");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "ccexp.AudioEngine:setCurrentTime");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:setCurrentTime");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.AudioEngine:setCurrentTime");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_setCurrentTime'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::experimental::AudioEngine::setCurrentTime(arg0, arg1);
|
||||
bool ret = cocos2d::AudioEngine::setCurrentTime(arg0, arg1);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setCurrentTime",argc, 2);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setCurrentTime",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -141,7 +141,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getVolume(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -149,17 +149,17 @@ int lua_cocos2dx_audioengine_AudioEngine_getVolume(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getVolume");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:getVolume");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getVolume'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cocos2d::experimental::AudioEngine::getVolume(arg0);
|
||||
double ret = cocos2d::AudioEngine::getVolume(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getVolume",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getVolume",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -177,7 +177,7 @@ int lua_cocos2dx_audioengine_AudioEngine_uncache(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -185,17 +185,17 @@ int lua_cocos2dx_audioengine_AudioEngine_uncache(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:uncache");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:uncache");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_uncache'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::uncache(arg0);
|
||||
cocos2d::AudioEngine::uncache(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:uncache",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:uncache",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -213,7 +213,7 @@ int lua_cocos2dx_audioengine_AudioEngine_resumeAll(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -225,11 +225,11 @@ int lua_cocos2dx_audioengine_AudioEngine_resumeAll(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_resumeAll'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::resumeAll();
|
||||
cocos2d::AudioEngine::resumeAll();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:resumeAll",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:resumeAll",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -247,7 +247,7 @@ int lua_cocos2dx_audioengine_AudioEngine_stopAll(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -259,11 +259,11 @@ int lua_cocos2dx_audioengine_AudioEngine_stopAll(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_stopAll'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::stopAll();
|
||||
cocos2d::AudioEngine::stopAll();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:stopAll",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:stopAll",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -281,7 +281,7 @@ int lua_cocos2dx_audioengine_AudioEngine_pause(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -289,17 +289,17 @@ int lua_cocos2dx_audioengine_AudioEngine_pause(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:pause");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:pause");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_pause'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::pause(arg0);
|
||||
cocos2d::AudioEngine::pause(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:pause",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:pause",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -317,7 +317,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -329,11 +329,11 @@ int lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getMaxAudioInstance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::getMaxAudioInstance();
|
||||
int ret = cocos2d::AudioEngine::getMaxAudioInstance();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getMaxAudioInstance",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getMaxAudioInstance",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -351,7 +351,7 @@ int lua_cocos2dx_audioengine_AudioEngine_isEnabled(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -363,11 +363,11 @@ int lua_cocos2dx_audioengine_AudioEngine_isEnabled(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_isEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::experimental::AudioEngine::isEnabled();
|
||||
bool ret = cocos2d::AudioEngine::isEnabled();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:isEnabled",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:isEnabled",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -385,7 +385,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getCurrentTime(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -393,17 +393,17 @@ int lua_cocos2dx_audioengine_AudioEngine_getCurrentTime(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getCurrentTime");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:getCurrentTime");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getCurrentTime'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cocos2d::experimental::AudioEngine::getCurrentTime(arg0);
|
||||
double ret = cocos2d::AudioEngine::getCurrentTime(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getCurrentTime",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getCurrentTime",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -421,7 +421,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -429,17 +429,17 @@ int lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setMaxAudioInstance");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:setMaxAudioInstance");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_setMaxAudioInstance'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::experimental::AudioEngine::setMaxAudioInstance(arg0);
|
||||
bool ret = cocos2d::AudioEngine::setMaxAudioInstance(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setMaxAudioInstance",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setMaxAudioInstance",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -457,7 +457,7 @@ int lua_cocos2dx_audioengine_AudioEngine_isLoop(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -465,17 +465,17 @@ int lua_cocos2dx_audioengine_AudioEngine_isLoop(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:isLoop");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:isLoop");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_isLoop'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cocos2d::experimental::AudioEngine::isLoop(arg0);
|
||||
bool ret = cocos2d::AudioEngine::isLoop(arg0);
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:isLoop",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:isLoop",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -493,7 +493,7 @@ int lua_cocos2dx_audioengine_AudioEngine_pauseAll(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -505,11 +505,11 @@ int lua_cocos2dx_audioengine_AudioEngine_pauseAll(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_pauseAll'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::pauseAll();
|
||||
cocos2d::AudioEngine::pauseAll();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:pauseAll",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:pauseAll",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -527,7 +527,7 @@ int lua_cocos2dx_audioengine_AudioEngine_uncacheAll(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -539,11 +539,11 @@ int lua_cocos2dx_audioengine_AudioEngine_uncacheAll(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_uncacheAll'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::uncacheAll();
|
||||
cocos2d::AudioEngine::uncacheAll();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:uncacheAll",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:uncacheAll",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -561,7 +561,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setVolume(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -570,18 +570,18 @@ int lua_cocos2dx_audioengine_AudioEngine_setVolume(lua_State* tolua_S)
|
|||
{
|
||||
int arg0;
|
||||
double arg1;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setVolume");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "ccexp.AudioEngine:setVolume");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:setVolume");
|
||||
ok &= luaval_to_number(tolua_S, 3,&arg1, "cc.AudioEngine:setVolume");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_setVolume'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::setVolume(arg0, arg1);
|
||||
cocos2d::AudioEngine::setVolume(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setVolume",argc, 2);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setVolume",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -598,7 +598,7 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
|
@ -608,7 +608,7 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
|||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:preload");
|
||||
if (!ok) { break; }
|
||||
std::function<void (bool)> arg1;
|
||||
do {
|
||||
|
@ -617,7 +617,7 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
|||
} while(0)
|
||||
;
|
||||
if (!ok) { break; }
|
||||
cocos2d::experimental::AudioEngine::preload(arg0, arg1);
|
||||
cocos2d::AudioEngine::preload(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
|
@ -628,15 +628,15 @@ int lua_cocos2dx_audioengine_AudioEngine_preload(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:preload");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:preload");
|
||||
if (!ok) { break; }
|
||||
cocos2d::experimental::AudioEngine::preload(arg0);
|
||||
cocos2d::AudioEngine::preload(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ccexp.AudioEngine:preload",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.AudioEngine:preload",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -654,7 +654,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setEnabled(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -662,17 +662,17 @@ int lua_cocos2dx_audioengine_AudioEngine_setEnabled(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccexp.AudioEngine:setEnabled");
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "cc.AudioEngine:setEnabled");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_setEnabled'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::setEnabled(arg0);
|
||||
cocos2d::AudioEngine::setEnabled(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setEnabled",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setEnabled",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -690,7 +690,7 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -698,13 +698,13 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:play2d");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::play2d(arg0);
|
||||
int ret = cocos2d::AudioEngine::play2d(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
|
@ -712,14 +712,14 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
|||
{
|
||||
std::string arg0;
|
||||
bool arg1;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.AudioEngine:play2d");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1);
|
||||
int ret = cocos2d::AudioEngine::play2d(arg0, arg1);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
|
@ -728,15 +728,15 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
|||
std::string arg0;
|
||||
bool arg1;
|
||||
double arg2;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.AudioEngine:play2d");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2);
|
||||
int ret = cocos2d::AudioEngine::play2d(arg0, arg1, arg2);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
|
@ -745,21 +745,21 @@ int lua_cocos2dx_audioengine_AudioEngine_play2d(lua_State* tolua_S)
|
|||
std::string arg0;
|
||||
bool arg1;
|
||||
double arg2;
|
||||
const cocos2d::experimental::AudioProfile* arg3;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "ccexp.AudioEngine:play2d");
|
||||
ok &= luaval_to_object<const cocos2d::experimental::AudioProfile>(tolua_S, 5, "ccexp.AudioProfile",&arg3, "ccexp.AudioEngine:play2d");
|
||||
const cocos2d::AudioProfile* arg3;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_number(tolua_S, 4,&arg2, "cc.AudioEngine:play2d");
|
||||
ok &= luaval_to_object<const cocos2d::AudioProfile>(tolua_S, 5, "cc.AudioProfile",&arg3, "cc.AudioEngine:play2d");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_play2d'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::play2d(arg0, arg1, arg2, arg3);
|
||||
int ret = cocos2d::AudioEngine::play2d(arg0, arg1, arg2, arg3);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:play2d",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:play2d",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -777,7 +777,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getState(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -785,17 +785,17 @@ int lua_cocos2dx_audioengine_AudioEngine_getState(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getState");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:getState");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getState'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = (int)cocos2d::experimental::AudioEngine::getState(arg0);
|
||||
int ret = (int)cocos2d::AudioEngine::getState(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getState",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getState",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -813,7 +813,7 @@ int lua_cocos2dx_audioengine_AudioEngine_resume(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -821,17 +821,17 @@ int lua_cocos2dx_audioengine_AudioEngine_resume(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:resume");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:resume");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_resume'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::resume(arg0);
|
||||
cocos2d::AudioEngine::resume(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:resume",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:resume",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -849,7 +849,7 @@ int lua_cocos2dx_audioengine_AudioEngine_stop(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -857,17 +857,17 @@ int lua_cocos2dx_audioengine_AudioEngine_stop(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:stop");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:stop");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_stop'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::stop(arg0);
|
||||
cocos2d::AudioEngine::stop(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:stop",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:stop",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -885,7 +885,7 @@ int lua_cocos2dx_audioengine_AudioEngine_end(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -897,11 +897,11 @@ int lua_cocos2dx_audioengine_AudioEngine_end(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_end'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::end();
|
||||
cocos2d::AudioEngine::end();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:end",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:end",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -919,7 +919,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getDuration(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -927,17 +927,17 @@ int lua_cocos2dx_audioengine_AudioEngine_getDuration(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getDuration");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:getDuration");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getDuration'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cocos2d::experimental::AudioEngine::getDuration(arg0);
|
||||
double ret = cocos2d::AudioEngine::getDuration(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getDuration",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getDuration",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -955,7 +955,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setLoop(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -964,18 +964,18 @@ int lua_cocos2dx_audioengine_AudioEngine_setLoop(lua_State* tolua_S)
|
|||
{
|
||||
int arg0;
|
||||
bool arg1;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setLoop");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.AudioEngine:setLoop");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:setLoop");
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "cc.AudioEngine:setLoop");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_setLoop'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioEngine::setLoop(arg0, arg1);
|
||||
cocos2d::AudioEngine::setLoop(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setLoop",argc, 2);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setLoop",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -993,7 +993,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -1005,11 +1005,11 @@ int lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile(lua_State* tolua_S)
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getDefaultProfile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getDefaultProfile();
|
||||
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
|
||||
cocos2d::AudioProfile* ret = cocos2d::AudioEngine::getDefaultProfile();
|
||||
object_to_luaval<cocos2d::AudioProfile>(tolua_S, "cc.AudioProfile",(cocos2d::AudioProfile*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getDefaultProfile",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getDefaultProfile",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -1026,7 +1026,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getProfile(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
|
@ -1036,10 +1036,10 @@ int lua_cocos2dx_audioengine_AudioEngine_getProfile(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.AudioEngine:getProfile");
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "cc.AudioEngine:getProfile");
|
||||
if (!ok) { break; }
|
||||
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getProfile(arg0);
|
||||
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
|
||||
cocos2d::AudioProfile* ret = cocos2d::AudioEngine::getProfile(arg0);
|
||||
object_to_luaval<cocos2d::AudioProfile>(tolua_S, "cc.AudioProfile",(cocos2d::AudioProfile*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
|
@ -1049,15 +1049,15 @@ int lua_cocos2dx_audioengine_AudioEngine_getProfile(lua_State* tolua_S)
|
|||
if (argc == 1)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:getProfile");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:getProfile");
|
||||
if (!ok) { break; }
|
||||
cocos2d::experimental::AudioProfile* ret = cocos2d::experimental::AudioEngine::getProfile(arg0);
|
||||
object_to_luaval<cocos2d::experimental::AudioProfile>(tolua_S, "ccexp.AudioProfile",(cocos2d::experimental::AudioProfile*)ret);
|
||||
cocos2d::AudioProfile* ret = cocos2d::AudioEngine::getProfile(arg0);
|
||||
object_to_luaval<cocos2d::AudioProfile>(tolua_S, "cc.AudioProfile",(cocos2d::AudioProfile*)ret);
|
||||
return 1;
|
||||
}
|
||||
} while (0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "ccexp.AudioEngine:getProfile",argc, 1);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d", "cc.AudioEngine:getProfile",argc, 1);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -1075,7 +1075,7 @@ int lua_cocos2dx_audioengine_AudioEngine_getPlayingAudioCount(lua_State* tolua_S
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -1087,11 +1087,11 @@ int lua_cocos2dx_audioengine_AudioEngine_getPlayingAudioCount(lua_State* tolua_S
|
|||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_audioengine_AudioEngine_getPlayingAudioCount'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
int ret = cocos2d::experimental::AudioEngine::getPlayingAudioCount();
|
||||
int ret = cocos2d::AudioEngine::getPlayingAudioCount();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:getPlayingAudioCount",argc, 0);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:getPlayingAudioCount",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -1107,8 +1107,8 @@ static int lua_cocos2dx_audioengine_AudioEngine_finalize(lua_State* tolua_S)
|
|||
|
||||
int lua_register_cocos2dx_audioengine_AudioEngine(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.AudioEngine");
|
||||
tolua_cclass(tolua_S,"AudioEngine","ccexp.AudioEngine","",nullptr);
|
||||
tolua_usertype(tolua_S,"cc.AudioEngine");
|
||||
tolua_cclass(tolua_S,"AudioEngine","cc.AudioEngine","",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"AudioEngine");
|
||||
tolua_function(tolua_S,"lazyInit", lua_cocos2dx_audioengine_AudioEngine_lazyInit);
|
||||
|
@ -1139,17 +1139,17 @@ int lua_register_cocos2dx_audioengine_AudioEngine(lua_State* tolua_S)
|
|||
tolua_function(tolua_S,"getProfile", lua_cocos2dx_audioengine_AudioEngine_getProfile);
|
||||
tolua_function(tolua_S,"getPlayingAudioCount", lua_cocos2dx_audioengine_AudioEngine_getPlayingAudioCount);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::AudioEngine).name();
|
||||
g_luaType[typeName] = "ccexp.AudioEngine";
|
||||
g_typeCast["AudioEngine"] = "ccexp.AudioEngine";
|
||||
std::string typeName = typeid(cocos2d::AudioEngine).name();
|
||||
g_luaType[typeName] = "cc.AudioEngine";
|
||||
g_typeCast["AudioEngine"] = "cc.AudioEngine";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_audioengine(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
||||
tolua_module(tolua_S,"ccexp",0);
|
||||
tolua_beginmodule(tolua_S,"ccexp");
|
||||
tolua_module(tolua_S,"cc",0);
|
||||
tolua_beginmodule(tolua_S,"cc");
|
||||
|
||||
lua_register_cocos2dx_audioengine_AudioProfile(tolua_S);
|
||||
lua_register_cocos2dx_audioengine_AudioEngine(tolua_S);
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2273,6 +2273,45 @@ int register_all_cocos2dx(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,54 +0,0 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_experimental_h__
|
||||
#define __cocos2dx_experimental_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_experimental(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_experimental_h__
|
File diff suppressed because it is too large
Load Diff
|
@ -1,38 +0,0 @@
|
|||
#include "base/ccConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
|
||||
#ifndef __cocos2dx_experimental_video_h__
|
||||
#define __cocos2dx_experimental_video_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_experimental_video(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_experimental_video_h__
|
||||
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
|
|
@ -1,977 +0,0 @@
|
|||
#include "scripting/lua-bindings/auto/lua_cocos2dx_experimental_webview_auto.hpp"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
|
||||
#include "ui/UIWebView/UIWebView.h"
|
||||
#include "scripting/lua-bindings/manual/tolua_fix.h"
|
||||
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
|
||||
|
||||
int lua_cocos2dx_experimental_webview_WebView_setOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "ccexp.WebView:setOpacityWebView");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setOpacityWebView(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setOpacityWebView",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_canGoBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoBack();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:canGoBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_canGoBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_loadHTMLString(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:loadHTMLString");
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccexp.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:loadHTMLString",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_loadHTMLString'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_goForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goForward();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:goForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_goForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_goBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goBack();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:goBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_goBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_setScalesPageToFit(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccexp.WebView:setScalesPageToFit");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setScalesPageToFit(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setScalesPageToFit",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setScalesPageToFit'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_loadFile(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:loadFile");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadFile(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:loadFile",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_loadFile'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_loadURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_loadURL'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
bool arg1;
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccexp.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:loadURL",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_loadURL'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_setBounces(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccexp.WebView:setBounces");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBounces(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setBounces",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setBounces'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_evaluateJS(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:evaluateJS");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->evaluateJS(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:evaluateJS",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_evaluateJS'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBackgroundTransparent();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setBackgroundTransparent",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_getOnJSCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::ui::WebView::ccWebViewCallback ret = cobj->getOnJSCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:getOnJSCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_getOnJSCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_canGoForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoForward();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:canGoForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_canGoForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_stopLoading(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->stopLoading();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:stopLoading",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_stopLoading'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_getOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getOpacityWebView();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:getOpacityWebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_getOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_reload(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->reload();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:reload",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_reload'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccexp.WebView:setJavascriptInterfaceScheme");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setJavascriptInterfaceScheme(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:setJavascriptInterfaceScheme",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::experimental::ui::WebView* ret = cocos2d::experimental::ui::WebView::create();
|
||||
object_to_luaval<cocos2d::experimental::ui::WebView>(tolua_S, "ccexp.WebView",(cocos2d::experimental::ui::WebView*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.WebView:create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_experimental_webview_WebView_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_experimental_webview_WebView_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::experimental::ui::WebView();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccexp.WebView");
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.WebView:WebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_webview_WebView_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_experimental_webview_WebView_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (WebView)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_experimental_webview_WebView(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccexp.WebView");
|
||||
tolua_cclass(tolua_S,"WebView","ccexp.WebView","ccui.Widget",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"WebView");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_experimental_webview_WebView_constructor);
|
||||
tolua_function(tolua_S,"setOpacityWebView",lua_cocos2dx_experimental_webview_WebView_setOpacityWebView);
|
||||
tolua_function(tolua_S,"canGoBack",lua_cocos2dx_experimental_webview_WebView_canGoBack);
|
||||
tolua_function(tolua_S,"loadHTMLString",lua_cocos2dx_experimental_webview_WebView_loadHTMLString);
|
||||
tolua_function(tolua_S,"goForward",lua_cocos2dx_experimental_webview_WebView_goForward);
|
||||
tolua_function(tolua_S,"goBack",lua_cocos2dx_experimental_webview_WebView_goBack);
|
||||
tolua_function(tolua_S,"setScalesPageToFit",lua_cocos2dx_experimental_webview_WebView_setScalesPageToFit);
|
||||
tolua_function(tolua_S,"loadFile",lua_cocos2dx_experimental_webview_WebView_loadFile);
|
||||
tolua_function(tolua_S,"loadURL",lua_cocos2dx_experimental_webview_WebView_loadURL);
|
||||
tolua_function(tolua_S,"setBounces",lua_cocos2dx_experimental_webview_WebView_setBounces);
|
||||
tolua_function(tolua_S,"evaluateJS",lua_cocos2dx_experimental_webview_WebView_evaluateJS);
|
||||
tolua_function(tolua_S,"setBackgroundTransparent",lua_cocos2dx_experimental_webview_WebView_setBackgroundTransparent);
|
||||
tolua_function(tolua_S,"getOnJSCallback",lua_cocos2dx_experimental_webview_WebView_getOnJSCallback);
|
||||
tolua_function(tolua_S,"canGoForward",lua_cocos2dx_experimental_webview_WebView_canGoForward);
|
||||
tolua_function(tolua_S,"stopLoading",lua_cocos2dx_experimental_webview_WebView_stopLoading);
|
||||
tolua_function(tolua_S,"getOpacityWebView",lua_cocos2dx_experimental_webview_WebView_getOpacityWebView);
|
||||
tolua_function(tolua_S,"reload",lua_cocos2dx_experimental_webview_WebView_reload);
|
||||
tolua_function(tolua_S,"setJavascriptInterfaceScheme",lua_cocos2dx_experimental_webview_WebView_setJavascriptInterfaceScheme);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_experimental_webview_WebView_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::experimental::ui::WebView).name();
|
||||
g_luaType[typeName] = "ccexp.WebView";
|
||||
g_typeCast["WebView"] = "ccexp.WebView";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_experimental_webview(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
||||
tolua_module(tolua_S,"ccexp",0);
|
||||
tolua_beginmodule(tolua_S,"ccexp");
|
||||
|
||||
lua_register_cocos2dx_experimental_webview_WebView(tolua_S);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,37 +0,0 @@
|
|||
#include "base/ccConfig.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
|
||||
#ifndef __cocos2dx_experimental_webview_h__
|
||||
#define __cocos2dx_experimental_webview_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_experimental_webview(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_experimental_webview_h__
|
||||
#endif //#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS) && !defined(CC_TARGET_OS_TVOS)
|
|
@ -31228,6 +31228,964 @@ int lua_register_cocos2dx_ui_RelativeBox(lua_State* tolua_S)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_ui_WebView_setOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "ccui.WebView:setOpacityWebView");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setOpacityWebView(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setOpacityWebView",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_setOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_canGoBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoBack();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:canGoBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_canGoBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_loadHTMLString(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadHTMLString");
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadHTMLString",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_loadHTMLString'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_goForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goForward();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:goForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_goForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_goBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goBack();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:goBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_goBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_setScalesPageToFit(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.WebView:setScalesPageToFit");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setScalesPageToFit(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setScalesPageToFit",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_setScalesPageToFit'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_loadFile(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadFile");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadFile(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadFile",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_loadFile'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_loadURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_loadURL'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
bool arg1;
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadURL",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_loadURL'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_setBounces(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.WebView:setBounces");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBounces(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setBounces",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_setBounces'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_evaluateJS(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:evaluateJS");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->evaluateJS(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:evaluateJS",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_evaluateJS'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_setBackgroundTransparent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBackgroundTransparent();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setBackgroundTransparent",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_setBackgroundTransparent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_getOnJSCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::ui::WebView::ccWebViewCallback ret = cobj->getOnJSCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:getOnJSCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_getOnJSCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_canGoForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoForward();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:canGoForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_canGoForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_stopLoading(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->stopLoading();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:stopLoading",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_stopLoading'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_getOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getOpacityWebView();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:getOpacityWebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_getOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_reload(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->reload();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:reload",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_reload'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_setJavascriptInterfaceScheme(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_ui_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:setJavascriptInterfaceScheme");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setJavascriptInterfaceScheme(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setJavascriptInterfaceScheme",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_setJavascriptInterfaceScheme'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::ui::WebView* ret = cocos2d::ui::WebView::create();
|
||||
object_to_luaval<cocos2d::ui::WebView>(tolua_S, "ccui.WebView",(cocos2d::ui::WebView*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.WebView:create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_ui_WebView_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_ui_WebView_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::ui::WebView();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.WebView");
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:WebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_ui_WebView_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_ui_WebView_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (WebView)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_ui_WebView(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccui.WebView");
|
||||
tolua_cclass(tolua_S,"WebView","ccui.WebView","ccui.Widget",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"WebView");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_ui_WebView_constructor);
|
||||
tolua_function(tolua_S,"setOpacityWebView",lua_cocos2dx_ui_WebView_setOpacityWebView);
|
||||
tolua_function(tolua_S,"canGoBack",lua_cocos2dx_ui_WebView_canGoBack);
|
||||
tolua_function(tolua_S,"loadHTMLString",lua_cocos2dx_ui_WebView_loadHTMLString);
|
||||
tolua_function(tolua_S,"goForward",lua_cocos2dx_ui_WebView_goForward);
|
||||
tolua_function(tolua_S,"goBack",lua_cocos2dx_ui_WebView_goBack);
|
||||
tolua_function(tolua_S,"setScalesPageToFit",lua_cocos2dx_ui_WebView_setScalesPageToFit);
|
||||
tolua_function(tolua_S,"loadFile",lua_cocos2dx_ui_WebView_loadFile);
|
||||
tolua_function(tolua_S,"loadURL",lua_cocos2dx_ui_WebView_loadURL);
|
||||
tolua_function(tolua_S,"setBounces",lua_cocos2dx_ui_WebView_setBounces);
|
||||
tolua_function(tolua_S,"evaluateJS",lua_cocos2dx_ui_WebView_evaluateJS);
|
||||
tolua_function(tolua_S,"setBackgroundTransparent",lua_cocos2dx_ui_WebView_setBackgroundTransparent);
|
||||
tolua_function(tolua_S,"getOnJSCallback",lua_cocos2dx_ui_WebView_getOnJSCallback);
|
||||
tolua_function(tolua_S,"canGoForward",lua_cocos2dx_ui_WebView_canGoForward);
|
||||
tolua_function(tolua_S,"stopLoading",lua_cocos2dx_ui_WebView_stopLoading);
|
||||
tolua_function(tolua_S,"getOpacityWebView",lua_cocos2dx_ui_WebView_getOpacityWebView);
|
||||
tolua_function(tolua_S,"reload",lua_cocos2dx_ui_WebView_reload);
|
||||
tolua_function(tolua_S,"setJavascriptInterfaceScheme",lua_cocos2dx_ui_WebView_setJavascriptInterfaceScheme);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_ui_WebView_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::ui::WebView).name();
|
||||
g_luaType[typeName] = "ccui.WebView";
|
||||
g_typeCast["WebView"] = "ccui.WebView";
|
||||
return 1;
|
||||
}
|
||||
|
||||
int lua_cocos2dx_ui_Scale9Sprite_updateWithSprite(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
|
@ -40213,7 +41171,7 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_ui_RichElementCustomNode(tolua_S);
|
||||
lua_register_cocos2dx_ui_VBox(tolua_S);
|
||||
lua_register_cocos2dx_ui_RadioButtonGroup(tolua_S);
|
||||
lua_register_cocos2dx_ui_TabControl(tolua_S);
|
||||
lua_register_cocos2dx_ui_WebView(tolua_S);
|
||||
lua_register_cocos2dx_ui_ScrollView(tolua_S);
|
||||
lua_register_cocos2dx_ui_ListView(tolua_S);
|
||||
lua_register_cocos2dx_ui_TabHeader(tolua_S);
|
||||
|
@ -40224,6 +41182,7 @@ TOLUA_API int register_all_cocos2dx_ui(lua_State* tolua_S)
|
|||
lua_register_cocos2dx_ui_LinearLayoutParameter(tolua_S);
|
||||
lua_register_cocos2dx_ui_RadioButton(tolua_S);
|
||||
lua_register_cocos2dx_ui_ImageView(tolua_S);
|
||||
lua_register_cocos2dx_ui_TabControl(tolua_S);
|
||||
lua_register_cocos2dx_ui_HBox(tolua_S);
|
||||
lua_register_cocos2dx_ui_RichElementText(tolua_S);
|
||||
lua_register_cocos2dx_ui_PageView(tolua_S);
|
||||
|
|
|
@ -789,6 +789,26 @@ int register_all_cocos2dx_ui(lua_State* tolua_S);
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,36 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_video_h__
|
||||
#define __cocos2dx_video_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_video(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_video_h__
|
|
@ -0,0 +1,975 @@
|
|||
#include "scripting/lua-bindings/auto/lua_cocos2dx_webview_auto.hpp"
|
||||
#include "ui/UIWebView/UIWebView.h"
|
||||
#include "scripting/lua-bindings/manual/tolua_fix.h"
|
||||
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
|
||||
|
||||
int lua_cocos2dx_webview_WebView_setOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
double arg0;
|
||||
|
||||
ok &= luaval_to_number(tolua_S, 2,&arg0, "ccui.WebView:setOpacityWebView");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_setOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setOpacityWebView(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setOpacityWebView",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_setOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_canGoBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_canGoBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoBack();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:canGoBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_canGoBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_loadHTMLString(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
std::string arg0;
|
||||
std::string arg1;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadHTMLString");
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 3,&arg1, "ccui.WebView:loadHTMLString");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_loadHTMLString'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadHTMLString(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadHTMLString",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_loadHTMLString'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_goForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_goForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goForward();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:goForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_goForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_goBack(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_goBack'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->goBack();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:goBack",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_goBack'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_setScalesPageToFit(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.WebView:setScalesPageToFit");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_setScalesPageToFit'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setScalesPageToFit(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setScalesPageToFit",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_setScalesPageToFit'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_loadFile(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadFile");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_loadFile'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->loadFile(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadFile",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_loadFile'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_loadURL(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_loadURL'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
do{
|
||||
if (argc == 2) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
bool arg1;
|
||||
ok &= luaval_to_boolean(tolua_S, 3,&arg1, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0, arg1);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
do{
|
||||
if (argc == 1) {
|
||||
std::string arg0;
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:loadURL");
|
||||
|
||||
if (!ok) { break; }
|
||||
cobj->loadURL(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
}while(0);
|
||||
ok = true;
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:loadURL",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_loadURL'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_setBounces(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
bool arg0;
|
||||
|
||||
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ccui.WebView:setBounces");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_setBounces'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBounces(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setBounces",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_setBounces'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_evaluateJS(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:evaluateJS");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_evaluateJS'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->evaluateJS(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:evaluateJS",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_evaluateJS'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_setBackgroundTransparent(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_setBackgroundTransparent'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setBackgroundTransparent();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setBackgroundTransparent",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_setBackgroundTransparent'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_getOnJSCallback(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_getOnJSCallback'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::ui::WebView::ccWebViewCallback ret = cobj->getOnJSCallback();
|
||||
#pragma warning NO CONVERSION FROM NATIVE FOR std::function;
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:getOnJSCallback",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_getOnJSCallback'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_canGoForward(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_canGoForward'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
bool ret = cobj->canGoForward();
|
||||
tolua_pushboolean(tolua_S,(bool)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:canGoForward",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_canGoForward'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_stopLoading(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_stopLoading'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->stopLoading();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:stopLoading",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_stopLoading'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_getOpacityWebView(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_getOpacityWebView'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
double ret = cobj->getOpacityWebView();
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:getOpacityWebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_getOpacityWebView'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_reload(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_reload'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->reload();
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:reload",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_reload'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_setJavascriptInterfaceScheme(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::ui::WebView*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_webview_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
std::string arg0;
|
||||
|
||||
ok &= luaval_to_std_string(tolua_S, 2,&arg0, "ccui.WebView:setJavascriptInterfaceScheme");
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_setJavascriptInterfaceScheme'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj->setJavascriptInterfaceScheme(arg0);
|
||||
lua_settop(tolua_S, 1);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:setJavascriptInterfaceScheme",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_setJavascriptInterfaceScheme'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_create(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccui.WebView",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_create'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cocos2d::ui::WebView* ret = cocos2d::ui::WebView::create();
|
||||
object_to_luaval<cocos2d::ui::WebView>(tolua_S, "ccui.WebView",(cocos2d::ui::WebView*)ret);
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccui.WebView:create",argc, 0);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_create'.",&tolua_err);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
int lua_cocos2dx_webview_WebView_constructor(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::ui::WebView* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 0)
|
||||
{
|
||||
if(!ok)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_webview_WebView_constructor'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
cobj = new cocos2d::ui::WebView();
|
||||
cobj->autorelease();
|
||||
int ID = (int)cobj->_ID ;
|
||||
int* luaID = &cobj->_luaID ;
|
||||
toluafix_pushusertype_ccobject(tolua_S, ID, luaID, (void*)cobj,"ccui.WebView");
|
||||
return 1;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccui.WebView:WebView",argc, 0);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_webview_WebView_constructor'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int lua_cocos2dx_webview_WebView_finalize(lua_State* tolua_S)
|
||||
{
|
||||
printf("luabindings: finalizing LUA object (WebView)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lua_register_cocos2dx_webview_WebView(lua_State* tolua_S)
|
||||
{
|
||||
tolua_usertype(tolua_S,"ccui.WebView");
|
||||
tolua_cclass(tolua_S,"WebView","ccui.WebView","ccui.Widget",nullptr);
|
||||
|
||||
tolua_beginmodule(tolua_S,"WebView");
|
||||
tolua_function(tolua_S,"new",lua_cocos2dx_webview_WebView_constructor);
|
||||
tolua_function(tolua_S,"setOpacityWebView",lua_cocos2dx_webview_WebView_setOpacityWebView);
|
||||
tolua_function(tolua_S,"canGoBack",lua_cocos2dx_webview_WebView_canGoBack);
|
||||
tolua_function(tolua_S,"loadHTMLString",lua_cocos2dx_webview_WebView_loadHTMLString);
|
||||
tolua_function(tolua_S,"goForward",lua_cocos2dx_webview_WebView_goForward);
|
||||
tolua_function(tolua_S,"goBack",lua_cocos2dx_webview_WebView_goBack);
|
||||
tolua_function(tolua_S,"setScalesPageToFit",lua_cocos2dx_webview_WebView_setScalesPageToFit);
|
||||
tolua_function(tolua_S,"loadFile",lua_cocos2dx_webview_WebView_loadFile);
|
||||
tolua_function(tolua_S,"loadURL",lua_cocos2dx_webview_WebView_loadURL);
|
||||
tolua_function(tolua_S,"setBounces",lua_cocos2dx_webview_WebView_setBounces);
|
||||
tolua_function(tolua_S,"evaluateJS",lua_cocos2dx_webview_WebView_evaluateJS);
|
||||
tolua_function(tolua_S,"setBackgroundTransparent",lua_cocos2dx_webview_WebView_setBackgroundTransparent);
|
||||
tolua_function(tolua_S,"getOnJSCallback",lua_cocos2dx_webview_WebView_getOnJSCallback);
|
||||
tolua_function(tolua_S,"canGoForward",lua_cocos2dx_webview_WebView_canGoForward);
|
||||
tolua_function(tolua_S,"stopLoading",lua_cocos2dx_webview_WebView_stopLoading);
|
||||
tolua_function(tolua_S,"getOpacityWebView",lua_cocos2dx_webview_WebView_getOpacityWebView);
|
||||
tolua_function(tolua_S,"reload",lua_cocos2dx_webview_WebView_reload);
|
||||
tolua_function(tolua_S,"setJavascriptInterfaceScheme",lua_cocos2dx_webview_WebView_setJavascriptInterfaceScheme);
|
||||
tolua_function(tolua_S,"create", lua_cocos2dx_webview_WebView_create);
|
||||
tolua_endmodule(tolua_S);
|
||||
std::string typeName = typeid(cocos2d::ui::WebView).name();
|
||||
g_luaType[typeName] = "ccui.WebView";
|
||||
g_typeCast["WebView"] = "ccui.WebView";
|
||||
return 1;
|
||||
}
|
||||
TOLUA_API int register_all_cocos2dx_webview(lua_State* tolua_S)
|
||||
{
|
||||
tolua_open(tolua_S);
|
||||
|
||||
tolua_module(tolua_S,"ccui",0);
|
||||
tolua_beginmodule(tolua_S,"ccui");
|
||||
|
||||
lua_register_cocos2dx_webview_WebView(tolua_S);
|
||||
|
||||
tolua_endmodule(tolua_S);
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
#include "base/ccConfig.h"
|
||||
#ifndef __cocos2dx_webview_h__
|
||||
#define __cocos2dx_webview_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#include "tolua++.h"
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
int register_all_cocos2dx_webview(lua_State* tolua_S);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // __cocos2dx_webview_h__
|
|
@ -52,9 +52,7 @@ extern "C" {
|
|||
#include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_deprecated.h"
|
||||
#include "scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp"
|
||||
#include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_physics_manual.hpp"
|
||||
#include "scripting/lua-bindings/auto/lua_cocos2dx_experimental_auto.hpp"
|
||||
#include "scripting/lua-bindings/auto/lua_cocos2dx_backend_auto.hpp"
|
||||
#include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_experimental_manual.hpp"
|
||||
#include "base/ZipUtils.h"
|
||||
#include "scripting/deprecated/CCBool.h"
|
||||
#include "scripting/deprecated/CCDouble.h"
|
||||
|
@ -152,9 +150,6 @@ bool LuaStack::init()
|
|||
register_all_cocos2dx_shaders_manual(_state);
|
||||
register_all_cocos2dx_bytearray_manual(_state);
|
||||
|
||||
register_all_cocos2dx_experimental(_state);
|
||||
register_all_cocos2dx_experimental_manual(_state);
|
||||
|
||||
tolua_luanode_open(_state);
|
||||
register_luanode_manual(_state);
|
||||
#if CC_USE_PHYSICS
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#include "platform/CCPlatformConfig.h"
|
||||
|
||||
#include "scripting/lua-bindings/manual/audioengine/lua_cocos2dx_audioengine_manual.h"
|
||||
|
||||
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID || CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC || CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 || CC_TARGET_PLATFORM == CC_PLATFORM_LINUX
|
||||
|
||||
#include "scripting/lua-bindings/auto/lua_cocos2dx_audioengine_auto.hpp"
|
||||
#include "scripting/lua-bindings/manual/tolua_fix.h"
|
||||
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
|
||||
|
@ -36,14 +31,14 @@
|
|||
|
||||
static int lua_get_AudioProfile_name(lua_State* L)
|
||||
{
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -65,14 +60,14 @@ tolua_lerror:
|
|||
static int lua_set_AudioProfile_name(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -104,14 +99,14 @@ tolua_lerror:
|
|||
|
||||
static int lua_get_AudioProfile_maxInstances(lua_State* L)
|
||||
{
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -133,14 +128,14 @@ tolua_lerror:
|
|||
static int lua_set_AudioProfile_maxInstances(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -172,14 +167,14 @@ tolua_lerror:
|
|||
|
||||
static int lua_get_AudioProfile_minDelay(lua_State* L)
|
||||
{
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -201,14 +196,14 @@ tolua_lerror:
|
|||
static int lua_set_AudioProfile_minDelay(lua_State* L)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::AudioProfile* self = nullptr;
|
||||
cocos2d::AudioProfile* self = nullptr;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
if (!tolua_isusertype(L,1,"ccexp.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertype(L,1,"cc.AudioProfile",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
self = (cocos2d::experimental::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
self = (cocos2d::AudioProfile*) tolua_tousertype(L,1,0);
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (nullptr == self)
|
||||
{
|
||||
|
@ -248,7 +243,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setFinishCallback(lua_State* tolua_S)
|
|||
#endif
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertable(tolua_S,1,"ccexp.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
if (!tolua_isusertable(tolua_S,1,"cc.AudioEngine",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S) - 1;
|
||||
|
@ -256,7 +251,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setFinishCallback(lua_State* tolua_S)
|
|||
if (argc == 2)
|
||||
{
|
||||
int arg0;
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "ccexp.AudioEngine:setFinishCallback");
|
||||
ok &= luaval_to_int32(tolua_S, 2,(int *)&arg0, "cc.AudioEngine:setFinishCallback");
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!toluafix_isfunction(tolua_S,3,"LUA_FUNCTION",0,&tolua_err))
|
||||
|
@ -267,7 +262,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setFinishCallback(lua_State* tolua_S)
|
|||
|
||||
LUA_FUNCTION handler = ( toluafix_ref_function(tolua_S,3,0));
|
||||
|
||||
cocos2d::experimental::AudioEngine::setFinishCallback(arg0, [handler](int audioID, std::string filePath){
|
||||
cocos2d::AudioEngine::setFinishCallback(arg0, [handler](int audioID, std::string filePath){
|
||||
LuaStack* stack = LuaEngine::getInstance()->getLuaStack();
|
||||
|
||||
stack->pushInt(audioID);
|
||||
|
@ -280,7 +275,7 @@ int lua_cocos2dx_audioengine_AudioEngine_setFinishCallback(lua_State* tolua_S)
|
|||
|
||||
return 0;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "ccexp.AudioEngine:setFinishCallback",argc, 2);
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d\n ", "cc.AudioEngine:setFinishCallback",argc, 2);
|
||||
return 0;
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
|
@ -297,7 +292,7 @@ int register_audioengine_module(lua_State* L)
|
|||
register_all_cocos2dx_audioengine(L);
|
||||
if (L)
|
||||
{
|
||||
lua_pushstring(L, "ccexp.AudioProfile");
|
||||
lua_pushstring(L, "cc.AudioProfile");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
|
@ -307,7 +302,7 @@ int register_audioengine_module(lua_State* L)
|
|||
}
|
||||
lua_pop(L, 1);
|
||||
|
||||
lua_pushstring(L, "ccexp.AudioEngine");
|
||||
lua_pushstring(L, "cc.AudioEngine");
|
||||
lua_rawget(L, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(L,-1))
|
||||
{
|
||||
|
@ -320,12 +315,3 @@ int register_audioengine_module(lua_State* L)
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
int register_audioengine_module(lua_State* L)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
#ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__
|
||||
#define COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -40,7 +39,7 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* Call this function can import the lua bindings for the audioengine module.
|
||||
* After registering, we could call the related audioengine code conveniently in the lua.eg,.ccexp.AudioEngine:stop(audioID).
|
||||
* After registering, we could call the related audioengine code conveniently in the lua.eg,.cc.AudioEngine:stop(audioID).
|
||||
* If you don't want to use the audioengine module in the lua, you only don't call this registering function.
|
||||
* If you don't register the audioengine module, the package size would become smaller .
|
||||
* The current mechanism,this function is called in the lua_module_register.h
|
||||
|
@ -50,5 +49,3 @@ TOLUA_API int register_audioengine_module(lua_State* L);
|
|||
|
||||
// end group
|
||||
/// @}
|
||||
|
||||
#endif // #ifndef COCOS_SCRIPTING_LUA_BINDINGS_MANUAL_AUDIOENGINE_LUA_COCOS2DX_AUDIOENGINE_MANUAL_H__
|
||||
|
|
|
@ -1,147 +0,0 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd.
|
||||
|
||||
http://www.cocos2d-x.org
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
****************************************************************************/
|
||||
|
||||
#include "scripting/lua-bindings/manual/cocos2d/lua_cocos2dx_experimental_manual.hpp"
|
||||
#include "scripting/lua-bindings/manual/tolua_fix.h"
|
||||
#include "scripting/lua-bindings/manual/LuaBasicConversions.h"
|
||||
#include "scripting/lua-bindings/manual/CCLuaValue.h"
|
||||
#include "scripting/lua-bindings/manual/CCLuaEngine.h"
|
||||
#include "2d/CCFastTMXLayer.h"
|
||||
|
||||
static int lua_cocos2dx_experimental_TMXLayer_getTileGIDAt(lua_State* tolua_S)
|
||||
{
|
||||
int argc = 0;
|
||||
cocos2d::experimental::TMXLayer* cobj = nullptr;
|
||||
bool ok = true;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_Error tolua_err;
|
||||
#endif
|
||||
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!tolua_isusertype(tolua_S,1,"ccexp.TMXLayer",0,&tolua_err)) goto tolua_lerror;
|
||||
#endif
|
||||
|
||||
cobj = (cocos2d::experimental::TMXLayer*)tolua_tousertype(tolua_S,1,0);
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
if (!cobj)
|
||||
{
|
||||
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_cocos2dx_experimental_TMXLayer_getTileGIDAt'", nullptr);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
argc = lua_gettop(tolua_S)-1;
|
||||
if (argc == 1)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccexp.TMXLayer:getTileGIDAt");
|
||||
if(!ok)
|
||||
return 0;
|
||||
int ret = cobj->getTileGIDAt(arg0);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)0);
|
||||
return 2;
|
||||
}
|
||||
if (argc == 2)
|
||||
{
|
||||
cocos2d::Vec2 arg0;
|
||||
int arg1 = 0;
|
||||
|
||||
ok &= luaval_to_vec2(tolua_S, 2, &arg0, "ccexp.TMXLayer:getTileGIDAt");
|
||||
ok &= luaval_to_int32(tolua_S, 3, &arg1, "ccexp.TMXLayer:getTileGIDAt");
|
||||
|
||||
if(!ok)
|
||||
return 0;
|
||||
|
||||
unsigned int ret = cobj->getTileGIDAt(arg0, (cocos2d::TMXTileFlags*)&arg1);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)ret);
|
||||
tolua_pushnumber(tolua_S,(lua_Number)arg1);
|
||||
return 2;
|
||||
}
|
||||
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ccexp.TMXLayer:getTileGIDAt",argc, 1);
|
||||
return 0;
|
||||
|
||||
#if COCOS2D_DEBUG >= 1
|
||||
tolua_lerror:
|
||||
tolua_error(tolua_S,"#ferror in function 'lua_cocos2dx_experimental_TMXLayer_getTileGIDAt'.",&tolua_err);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void extendExperimentalTMXLayer(lua_State* tolua_S)
|
||||
{
|
||||
lua_pushstring(tolua_S, "ccexp.TMXLayer");
|
||||
lua_rawget(tolua_S, LUA_REGISTRYINDEX);
|
||||
if (lua_istable(tolua_S,-1))
|
||||
{
|
||||
tolua_function(tolua_S, "getTileGIDAt", lua_cocos2dx_experimental_TMXLayer_getTileGIDAt);
|
||||
}
|
||||
lua_pop(tolua_S, 1);
|
||||
}
|
||||
|
||||
bool isVectorV3FC4BT2F(lua_State* tolua_S, int lo)
|
||||
{
|
||||
if (!lua_istable(tolua_S, lo))
|
||||
return false;
|
||||
|
||||
lua_pushnumber(tolua_S, 1);
|
||||
lua_gettable(tolua_S,lo);
|
||||
if (!lua_istable(tolua_S, -1))
|
||||
return false;
|
||||
|
||||
lua_pushstring(tolua_S, "vertices");
|
||||
lua_gettable(tolua_S, -2);
|
||||
if (lua_isnil(tolua_S, -1))
|
||||
return false;
|
||||
lua_pop(tolua_S, 1);
|
||||
|
||||
lua_pushstring(tolua_S, "colors");
|
||||
lua_gettable(tolua_S, -2);
|
||||
if (lua_isnil(tolua_S, -1))
|
||||
return false;
|
||||
lua_pop(tolua_S, 1);
|
||||
|
||||
lua_pushstring(tolua_S, "texCoords");
|
||||
lua_gettable(tolua_S, -2);
|
||||
if (lua_isnil(tolua_S, -1))
|
||||
return false;
|
||||
lua_pop(tolua_S, 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
int register_all_cocos2dx_experimental_manual(lua_State* L)
|
||||
{
|
||||
if (nullptr == L)
|
||||
return 0;
|
||||
|
||||
extendExperimentalTMXLayer(L);
|
||||
|
||||
return 0;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue