/** bool ofFile::open(string path, Mode mode=ReadOnly, bool binary=false) * api/openFrameworks/utils/ofFileUtils.h:106 */ static int ofFile_open(lua_State *L) { try { ofFile *self = *((ofFile **)dub_checksdata(L, 1, "ofFile")); int top__ = lua_gettop(L); if (top__ >= 4) { size_t path_sz_; const char *path = dub_checklstring(L, 2, &path_sz_); ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 3); bool binary = dub_checkboolean(L, 4); lua_pushboolean(L, self->open(std::string(path, path_sz_), mode, binary)); return 1; } else if (top__ >= 3) { size_t path_sz_; const char *path = dub_checklstring(L, 2, &path_sz_); ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 3); lua_pushboolean(L, self->open(std::string(path, path_sz_), mode)); return 1; } else { size_t path_sz_; const char *path = dub_checklstring(L, 2, &path_sz_); lua_pushboolean(L, self->open(std::string(path, path_sz_))); return 1; } } catch (std::exception &e) { lua_pushfstring(L, "open: %s", e.what()); } catch (...) { lua_pushfstring(L, "open: Unknown exception"); } return dub_error(L); }
/** void ofVbo::updateVertexData(const ofVec3f *verts, int total) * api/openFrameworks/gl/ofVbo.h:36 */ static int ofVbo_updateVertexData(lua_State *L) { try { ofVbo *self = *((ofVbo **)dub_checksdata(L, 1, "ofVbo")); int type__ = lua_type(L, 2); void **ptr2__; if ( (ptr2__ = dub_issdata(L, 2, "ofVec3f", type__)) ) { ofVec3f *verts = *((ofVec3f **)ptr2__); int total = dub_checkint(L, 3); self->updateVertexData(verts, total); return 0; } else if ( (ptr2__ = dub_issdata(L, 2, "ofVec2f", type__)) ) { ofVec2f *verts = *((ofVec2f **)ptr2__); int total = dub_checkint(L, 3); self->updateVertexData(verts, total); return 0; } else { float * ver0x = (float *) lua_touserdata (L, 2); int total = dub_checkint(L, 3); self->updateVertexData((float *) ver0x, total); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "updateVertexData: %s", e.what()); } catch (...) { lua_pushfstring(L, "updateVertexData: Unknown exception"); } return dub_error(L); }
/** Widget::Widget(int window_flags) * include/mimas/Widget.h:60 */ static int Widget_Widget(lua_State *L) { try { int top__ = lua_gettop(L); if (top__ >= 2) { QWidget *parent = *((QWidget **)dub_checksdata(L, 1, "mimas.QWidget")); int window_flags = dub_checkint(L, 2); Widget *retval__ = new Widget(parent, window_flags); retval__->pushobject(L, retval__, "mimas.Widget", true); return 1; } else if (top__ >= 1) { int type__ = lua_type(L, 1); if (type__ == LUA_TNUMBER) { int window_flags = dub_checkint(L, 1); Widget *retval__ = new Widget(window_flags); retval__->pushobject(L, retval__, "mimas.Widget", true); return 1; } else { QWidget *parent = *((QWidget **)dub_checksdata(L, 1, "mimas.QWidget")); Widget *retval__ = new Widget(parent); retval__->pushobject(L, retval__, "mimas.Widget", true); return 1; } } else { Widget *retval__ = new Widget(); retval__->pushobject(L, retval__, "mimas.Widget", true); return 1; } } catch (std::exception &e) { lua_pushfstring(L, "new: %s", e.what()); } catch (...) { lua_pushfstring(L, "new: Unknown exception"); } return dub_error(L); }
/** void HBoxLayout::addWidget(QWidget *widget, int stretch=0, int alignment=0) * include/mimas/HBoxLayout.h:54 */ static int HBoxLayout_addWidget(lua_State *L) { try { HBoxLayout *self = *((HBoxLayout **)dub_checksdata(L, 1, "mimas.HBoxLayout")); int top__ = lua_gettop(L); if (top__ >= 4) { QWidget *widget = *((QWidget **)dub_checksdata(L, 2, "mimas.QWidget")); int stretch = dub_checkint(L, 3); int alignment = dub_checkint(L, 4); self->addWidget(widget, stretch, alignment); return 0; } else if (top__ >= 3) { QWidget *widget = *((QWidget **)dub_checksdata(L, 2, "mimas.QWidget")); int stretch = dub_checkint(L, 3); self->addWidget(widget, stretch); return 0; } else { QWidget *widget = *((QWidget **)dub_checksdata(L, 2, "mimas.QWidget")); self->addWidget(widget); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "addWidget: %s", e.what()); } catch (...) { lua_pushfstring(L, "addWidget: Unknown exception"); } return dub_error(L); }
/** void ofConsoleLoggerChannel::log(ofLogLevel level, const string &module, const string &message) * api/openFrameworks/utils/ofLog.h:156 */ static int ofConsoleLoggerChannel_log(lua_State *L) { try { ofConsoleLoggerChannel *self = *((ofConsoleLoggerChannel **)dub_checksdata(L, 1, "ofConsoleLoggerChannel")); int top__ = lua_gettop(L); if (top__ >= 5) { ofLogLevel logLevel = (ofLogLevel)dub_checkint(L, 2); size_t module_sz_; const char *module = dub_checklstring(L, 3, &module_sz_); const char *format = dub_checkstring(L, 4); va_list *args = *((va_list **)dub_checksdata(L, 5, "va")); self->log(logLevel, std::string(module, module_sz_), format, *args); return 0; } else { ofLogLevel level = (ofLogLevel)dub_checkint(L, 2); size_t module_sz_; const char *module = dub_checklstring(L, 3, &module_sz_); size_t message_sz_; const char *message = dub_checklstring(L, 4, &message_sz_); self->log(level, std::string(module, module_sz_), std::string(message, message_sz_)); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "log: %s", e.what()); } catch (...) { lua_pushfstring(L, "log: Unknown exception"); } return dub_error(L); }
/** void ofVbo::drawElements(int drawMode, int amt) * api/openFrameworks/gl/ofVbo.h:72 */ static int ofVbo_drawElements(lua_State *L) { try { ofVbo *self = *((ofVbo **)dub_checksdata(L, 1, "ofVbo")); int drawMode = dub_checkint(L, 2); int amt = dub_checkint(L, 3); self->drawElements(drawMode, amt); return 0; } catch (std::exception &e) { lua_pushfstring(L, "drawElements: %s", e.what()); } catch (...) { lua_pushfstring(L, "drawElements: Unknown exception"); } return dub_error(L); }
/** void QWidget::resize(int w, int h) * bind/QWidget.h:11 */ static int TableView_resize(lua_State *L) { try { TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView")); int w = dub_checkint(L, 2); int h = dub_checkint(L, 3); self->resize(w, h); return 0; } catch (std::exception &e) { lua_pushfstring(L, "resize: %s", e.what()); } catch (...) { lua_pushfstring(L, "resize: Unknown exception"); } return dub_error(L); }
/** void QWidget::move(int x, int y) * bind/QWidget.h:10 */ static int LineEdit_move(lua_State *L) { try { LineEdit *self = *((LineEdit **)dub_checksdata(L, 1, "mimas.LineEdit")); int x = dub_checkint(L, 2); int y = dub_checkint(L, 3); self->move(x, y); return 0; } catch (std::exception &e) { lua_pushfstring(L, "move: %s", e.what()); } catch (...) { lua_pushfstring(L, "move: Unknown exception"); } return dub_error(L); }
/** virtual void btConstraintSolver::prepareSolve(int, int) * src/vendor/bullet/src/BulletDynamics/ConstraintSolver/btConstraintSolver.h:38 */ static int btConstraintSolver_prepareSolve(lua_State *L) { try { btConstraintSolver *self = *((btConstraintSolver **)dub_checksdata(L, 1, "bt.ConstraintSolver")); int p1 = dub_checkint(L, 2); int p2 = dub_checkint(L, 3); self->prepareSolve(p1, p2); return 0; } catch (std::exception &e) { lua_pushfstring(L, "prepareSolve: %s", e.what()); } catch (...) { lua_pushfstring(L, "prepareSolve: Unknown exception"); } return dub_error(L); }
/** void TableView::do_edit(int row, int col) * include/mimas/TableView.h:110 */ static int TableView_do_edit(lua_State *L) { try { TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView")); int row = dub_checkint(L, 2); int col = dub_checkint(L, 3); self->do_edit(row, col); return 0; } catch (std::exception &e) { lua_pushfstring(L, "do_edit: %s", e.what()); } catch (...) { lua_pushfstring(L, "do_edit: Unknown exception"); } return dub_error(L); }
/** void QLineEdit::setSelection(int start, int length) * bind/QLineEdit.h:14 */ static int LineEdit_setSelection(lua_State *L) { try { LineEdit *self = *((LineEdit **)dub_checksdata(L, 1, "mimas.LineEdit")); int start = dub_checkint(L, 2); int length = dub_checkint(L, 3); self->setSelection(start, length); return 0; } catch (std::exception &e) { lua_pushfstring(L, "setSelection: %s", e.what()); } catch (...) { lua_pushfstring(L, "setSelection: Unknown exception"); } return dub_error(L); }
/** void QWidget::setSizePolicy(int horizontal, int vertical) * bind/QWidget.h:59 */ static int TableView_setSizePolicy(lua_State *L) { try { TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView")); int horizontal = dub_checkint(L, 2); int vertical = dub_checkint(L, 3); self->setSizePolicy((QSizePolicy::Policy)horizontal, (QSizePolicy::Policy)vertical); self->updateGeometry(); return 0; } catch (std::exception &e) { lua_pushfstring(L, "setSizePolicy: %s", e.what()); } catch (...) { lua_pushfstring(L, "setSizePolicy: Unknown exception"); } return dub_error(L); }
/** void ofVbo::setIndexData(const ofIndexType *indices, int total, int usage) * api/openFrameworks/gl/ofVbo.h:27 */ static int ofVbo_setIndexData(lua_State *L) { try { ofVbo *self = *((ofVbo **)dub_checksdata(L, 1, "ofVbo")); ofIndexType *indices = *((ofIndexType **)dub_checksdata(L, 2, "ofIndexType")); int total = dub_checkint(L, 3); int usage = dub_checkint(L, 4); self->setIndexData(indices, total, usage); return 0; } catch (std::exception &e) { lua_pushfstring(L, "setIndexData: %s", e.what()); } catch (...) { lua_pushfstring(L, "setIndexData: Unknown exception"); } return dub_error(L); }
/** void ofVbo::draw(int drawMode, int first, int total) * api/openFrameworks/gl/ofVbo.h:71 */ static int ofVbo_draw(lua_State *L) { try { ofVbo *self = *((ofVbo **)dub_checksdata(L, 1, "ofVbo")); int drawMode = dub_checkint(L, 2); int first = dub_checkint(L, 3); int total = dub_checkint(L, 4); self->draw(drawMode, first, total); return 0; } catch (std::exception &e) { lua_pushfstring(L, "draw: %s", e.what()); } catch (...) { lua_pushfstring(L, "draw: Unknown exception"); } return dub_error(L); }
/** virtual btCollisionAlgorithmCreateFunc* btDefaultCollisionConfiguration::getCollisionAlgorithmCreateFunc(int proxyType0, int proxyType1) * src/vendor/bullet/src/BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h:119 */ static int btDefaultCollisionConfiguration_getCollisionAlgorithmCreateFunc(lua_State *L) { try { btDefaultCollisionConfiguration *self = *((btDefaultCollisionConfiguration **)dub_checksdata(L, 1, "bt.DefaultCollisionConfiguration")); int proxyType0 = dub_checkint(L, 2); int proxyType1 = dub_checkint(L, 3); btCollisionAlgorithmCreateFunc *retval__ = self->getCollisionAlgorithmCreateFunc(proxyType0, proxyType1); if (!retval__) return 0; dub_pushudata(L, retval__, "CollisionAlgorithmCreateFunc", false); return 1; } catch (std::exception &e) { lua_pushfstring(L, "getCollisionAlgorithmCreateFunc: %s", e.what()); } catch (...) { lua_pushfstring(L, "getCollisionAlgorithmCreateFunc: Unknown exception"); } return dub_error(L); }
/** void btMatrix3x3::getEulerZYX(btScalar &yaw, btScalar &pitch, btScalar &roll, unsigned int solution_number=1) const * src/vendor/bullet/src/LinearMath/btMatrix3x3.h:517 */ static int btMatrix3x3_getEulerZYX(lua_State *L) { try { btMatrix3x3 *self = *((btMatrix3x3 **)dub_checksdata(L, 1, "bt.Matrix3x3")); int top__ = lua_gettop(L); if (top__ >= 5) { btScalar yaw = dub_checknumber(L, 2); btScalar pitch = dub_checknumber(L, 3); btScalar roll = dub_checknumber(L, 4); unsigned int solution_number = dub_checkint(L, 5); self->getEulerZYX(yaw, pitch, roll, solution_number); return 0; } else { btScalar yaw = dub_checknumber(L, 2); btScalar pitch = dub_checknumber(L, 3); btScalar roll = dub_checknumber(L, 4); self->getEulerZYX(yaw, pitch, roll); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "getEulerZYX: %s", e.what()); } catch (...) { lua_pushfstring(L, "getEulerZYX: Unknown exception"); } return dub_error(L); }
/** void QLayout::setContentsMargins(int left, int top, int right, int bottom) * bind/QLayout.h:15 */ static int HBoxLayout_setContentsMargins(lua_State *L) { try { HBoxLayout *self = *((HBoxLayout **)dub_checksdata(L, 1, "mimas.HBoxLayout")); int left = dub_checkint(L, 2); int top = dub_checkint(L, 3); int right = dub_checkint(L, 4); int bottom = dub_checkint(L, 5); self->setContentsMargins(left, top, right, bottom); return 0; } catch (std::exception &e) { lua_pushfstring(L, "setContentsMargins: %s", e.what()); } catch (...) { lua_pushfstring(L, "setContentsMargins: Unknown exception"); } return dub_error(L); }
/** btScalar btMatrix3x3::cofac(int r1, int c1, int r2, int c2) const * src/vendor/bullet/src/LinearMath/btMatrix3x3.h:723 */ static int btMatrix3x3_cofac(lua_State *L) { try { btMatrix3x3 *self = *((btMatrix3x3 **)dub_checksdata(L, 1, "bt.Matrix3x3")); int r1 = dub_checkint(L, 2); int c1 = dub_checkint(L, 3); int r2 = dub_checkint(L, 4); int c2 = dub_checkint(L, 5); lua_pushnumber(L, self->cofac(r1, c1, r2, c2)); return 1; } catch (std::exception &e) { lua_pushfstring(L, "cofac: %s", e.what()); } catch (...) { lua_pushfstring(L, "cofac: Unknown exception"); } return dub_error(L); }
/** void ofBuffer::set(const char *_buffer, unsigned int _size) * api/openFrameworks/utils/ofFileUtils.h:21 */ static int ofBuffer_set(lua_State *L) { try { ofBuffer *self = *((ofBuffer **)dub_checksdata(L, 1, "ofBuffer")); int top__ = lua_gettop(L); if (top__ >= 3) { const char *_buffer = dub_checkstring(L, 2); unsigned int _size = dub_checkint(L, 3); self->set(_buffer, _size); return 0; } else { int type__ = lua_type(L, 2); void **ptr2__; if ( (ptr2__ = dub_issdata(L, 2, "istream", type__)) ) { istream *stream = *((istream **)ptr2__); lua_pushboolean(L, self->set(*stream)); return 1; } else { size_t text_sz_; const char *text = dub_checklstring(L, 2, &text_sz_); self->set(std::string(text, text_sz_)); return 0; } } } catch (std::exception &e) { lua_pushfstring(L, "set: %s", e.what()); } catch (...) { lua_pushfstring(L, "set: Unknown exception"); } return dub_error(L); }
/** void ofPolyline::arcNegative(const ofPoint ¢er, float radiusX, float radiusY, float angleBegin, float angleEnd, int curveResolution=20) * api/openFrameworks/graphics/ofPolyline.h:52 */ static int ofPolyline_arcNegative(lua_State *L) { try { ofPolyline *self = *((ofPolyline **)dub_checksdata(L, 1, "ofPolyline")); int top__ = lua_gettop(L); if (top__ >= 7) { ofVec3f *center = *((ofVec3f **)dub_checksdata(L, 2, "ofVec3f")); float radiusX = dub_checknumber(L, 3); float radiusY = dub_checknumber(L, 4); float angleBegin = dub_checknumber(L, 5); float angleEnd = dub_checknumber(L, 6); int curveResolution = dub_checkint(L, 7); self->arcNegative(*center, radiusX, radiusY, angleBegin, angleEnd, curveResolution); return 0; } else { ofVec3f *center = *((ofVec3f **)dub_checksdata(L, 2, "ofVec3f")); float radiusX = dub_checknumber(L, 3); float radiusY = dub_checknumber(L, 4); float angleBegin = dub_checknumber(L, 5); float angleEnd = dub_checknumber(L, 6); self->arcNegative(*center, radiusX, radiusY, angleBegin, angleEnd); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "arcNegative: %s", e.what()); } catch (...) { lua_pushfstring(L, "arcNegative: Unknown exception"); } return dub_error(L); }
/** void ofFbo::readToPixels(ofPixels &pixels, int attachmentPoint=0) * api/openFrameworks/gl/ofFbo.h:37 */ static int ofFbo_readToPixels(lua_State *L) { try { ofFbo *self = *((ofFbo **)dub_checksdata(L, 1, "ofFbo")); int top__ = lua_gettop(L); if (top__ >= 3) { int type__ = lua_type(L, 2); void **ptr2__; if ( (ptr2__ = dub_issdata(L, 2, "ofShortPixels", type__)) ) { ofShortPixels *pixels = *((ofShortPixels **)ptr2__); int attachmentPoint = dub_checkint(L, 3); self->readToPixels(*pixels, attachmentPoint); return 0; } else if ( (ptr2__ = dub_issdata(L, 2, "ofPixels", type__)) ) { ofPixels *pixels = *((ofPixels **)ptr2__); int attachmentPoint = dub_checkint(L, 3); self->readToPixels(*pixels, attachmentPoint); return 0; } else { ofFloatPixels *pixels = *((ofFloatPixels **)dub_checksdata(L, 2, "ofFloatPixels")); int attachmentPoint = dub_checkint(L, 3); self->readToPixels(*pixels, attachmentPoint); return 0; } } else { int type__ = lua_type(L, 2); void **ptr2__; if ( (ptr2__ = dub_issdata(L, 2, "ofShortPixels", type__)) ) { ofShortPixels *pixels = *((ofShortPixels **)ptr2__); self->readToPixels(*pixels); return 0; } else if ( (ptr2__ = dub_issdata(L, 2, "ofPixels", type__)) ) { ofPixels *pixels = *((ofPixels **)ptr2__); self->readToPixels(*pixels); return 0; } else { ofFloatPixels *pixels = *((ofFloatPixels **)dub_checksdata(L, 2, "ofFloatPixels")); self->readToPixels(*pixels); return 0; } } } catch (std::exception &e) { lua_pushfstring(L, "readToPixels: %s", e.what()); } catch (...) { lua_pushfstring(L, "readToPixels: Unknown exception"); } return dub_error(L); }
/** ofFile::ofFile() * api/openFrameworks/utils/ofFileUtils.h:100 */ static int ofFile_ofFile(lua_State *L) { try { int top__ = lua_gettop(L); if (top__ >= 3) { size_t filePath_sz_; const char *filePath = dub_checklstring(L, 1, &filePath_sz_); ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 2); bool binary = dub_checkboolean(L, 3); ofFile *retval__ = new ofFile(std::string(filePath, filePath_sz_), mode, binary); dub_pushudata(L, retval__, "ofFile", true); return 1; } else if (top__ >= 2) { size_t filePath_sz_; const char *filePath = dub_checklstring(L, 1, &filePath_sz_); ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 2); ofFile *retval__ = new ofFile(std::string(filePath, filePath_sz_), mode); dub_pushudata(L, retval__, "ofFile", true); return 1; } else if (top__ >= 1) { int type__ = lua_type(L, 1); void **ptr1__; if ( (ptr1__ = dub_issdata(L, 1, "ofFile", type__)) ) { ofFile *mom = *((ofFile **)ptr1__); ofFile *retval__ = new ofFile(*mom); dub_pushudata(L, retval__, "ofFile", true); return 1; } else { size_t filePath_sz_; const char *filePath = dub_checklstring(L, 1, &filePath_sz_); ofFile *retval__ = new ofFile(std::string(filePath, filePath_sz_)); dub_pushudata(L, retval__, "ofFile", true); return 1; } } else { ofFile *retval__ = new ofFile(); dub_pushudata(L, retval__, "ofFile", true); return 1; } } catch (std::exception &e) { lua_pushfstring(L, "new: %s", e.what()); } catch (...) { lua_pushfstring(L, "new: Unknown exception"); } return dub_error(L); }
/** void ofPolyline::curveTo(const ofPoint &to, int curveResolution=16) * api/openFrameworks/graphics/ofPolyline.h:64 */ static int ofPolyline_curveTo(lua_State *L) { try { ofPolyline *self = *((ofPolyline **)dub_checksdata(L, 1, "ofPolyline")); int top__ = lua_gettop(L); if (top__ >= 5) { float x = dub_checknumber(L, 2); float y = dub_checknumber(L, 3); float z = dub_checknumber(L, 4); int curveResolution = dub_checkint(L, 5); self->curveTo(x, y, z, curveResolution); return 0; } else if (top__ >= 4) { float x = dub_checknumber(L, 2); float y = dub_checknumber(L, 3); float z = dub_checknumber(L, 4); self->curveTo(x, y, z); return 0; } else if (top__ >= 3) { int type__ = lua_type(L, 2); if (type__ == LUA_TNUMBER) { float x = dub_checknumber(L, 2); float y = dub_checknumber(L, 3); self->curveTo(x, y); return 0; } else { ofVec3f *to = *((ofVec3f **)dub_checksdata(L, 2, "ofVec3f")); int curveResolution = dub_checkint(L, 3); self->curveTo(*to, curveResolution); return 0; } } else { ofVec3f *to = *((ofVec3f **)dub_checksdata(L, 2, "ofVec3f")); self->curveTo(*to); return 0; } } catch (std::exception &e) { lua_pushfstring(L, "curveTo: %s", e.what()); } catch (...) { lua_pushfstring(L, "curveTo: Unknown exception"); } return dub_error(L); }
/** QVariant variantFromLua(lua_State *L, int index) * include/mimas/mimas.h:53 */ static int mimas_variantFromLua(lua_State *L) { try { int index = dub_checkint(L, 2); return pushVariantInLua(L, variantFromLua(L, index)); } catch (std::exception &e) { lua_pushfstring(L, "mimas.variantFromLua: %s", e.what()); } catch (...) { lua_pushfstring(L, "mimas.variantFromLua: Unknown exception"); } return lua_error(L); }
/** ofPolyline ofPolyline::getSmoothed(int smoothingSize, float smoothingShape=0) * api/openFrameworks/graphics/ofPolyline.h:87 */ static int ofPolyline_getSmoothed(lua_State *L) { try { ofPolyline *self = *((ofPolyline **)dub_checksdata(L, 1, "ofPolyline")); int top__ = lua_gettop(L); if (top__ >= 3) { int smoothingSize = dub_checkint(L, 2); float smoothingShape = dub_checknumber(L, 3); dub_pushudata(L, new ofPolyline(self->getSmoothed(smoothingSize, smoothingShape)), "ofPolyline", true); return 1; } else { int smoothingSize = dub_checkint(L, 2); dub_pushudata(L, new ofPolyline(self->getSmoothed(smoothingSize)), "ofPolyline", true); return 1; } } catch (std::exception &e) { lua_pushfstring(L, "getSmoothed: %s", e.what()); } catch (...) { lua_pushfstring(L, "getSmoothed: Unknown exception"); } return dub_error(L); }
/** bool ofFile::changeMode(Mode mode, bool binary=false) * api/openFrameworks/utils/ofFileUtils.h:107 */ static int ofFile_changeMode(lua_State *L) { try { ofFile *self = *((ofFile **)dub_checksdata(L, 1, "ofFile")); int top__ = lua_gettop(L); if (top__ >= 3) { ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 2); bool binary = dub_checkboolean(L, 3); lua_pushboolean(L, self->changeMode(mode, binary)); return 1; } else { ofFile::Mode mode = (ofFile::Mode)dub_checkint(L, 2); lua_pushboolean(L, self->changeMode(mode)); return 1; } } catch (std::exception &e) { lua_pushfstring(L, "changeMode: %s", e.what()); } catch (...) { lua_pushfstring(L, "changeMode: Unknown exception"); } return dub_error(L); }
/** const b2Vec2 & b2CircleShape::GetVertex(int32 index) const * vendor/Box2D/Box2D/Collision/Shapes/b2CircleShape.h:59 */ static int b2CircleShape_GetVertex(lua_State *L) { try { b2CircleShape *self = *((b2CircleShape **)dub_checksdata(L, 1, "b2.CircleShape")); int32 index = dub_checkint(L, 2); dub_pushudata(L, const_cast<b2Vec2*>(&self->GetVertex(index)), "b2.Vec2", false); return 1; } catch (std::exception &e) { lua_pushfstring(L, "GetVertex: %s", e.what()); } catch (...) { lua_pushfstring(L, "GetVertex: Unknown exception"); } return dub_error(L); }
/** void ofPolyline::resize(size_t size) * api/openFrameworks/graphics/ofPolyline.h:116 */ static int ofPolyline_resize(lua_State *L) { try { ofPolyline *self = *((ofPolyline **)dub_checksdata(L, 1, "ofPolyline")); size_t size = dub_checkint(L, 2); self->resize(size); return 0; } catch (std::exception &e) { lua_pushfstring(L, "resize: %s", e.what()); } catch (...) { lua_pushfstring(L, "resize: Unknown exception"); } return dub_error(L); }
/** ofPolyline ofPolyline::getResampledByCount(int count) * api/openFrameworks/graphics/ofPolyline.h:93 */ static int ofPolyline_getResampledByCount(lua_State *L) { try { ofPolyline *self = *((ofPolyline **)dub_checksdata(L, 1, "ofPolyline")); int count = dub_checkint(L, 2); dub_pushudata(L, new ofPolyline(self->getResampledByCount(count)), "ofPolyline", true); return 1; } catch (std::exception &e) { lua_pushfstring(L, "getResampledByCount: %s", e.what()); } catch (...) { lua_pushfstring(L, "getResampledByCount: Unknown exception"); } return dub_error(L); }
/** void QWidget::setFocusPolicy(int policy) * bind/QWidget.h:21 */ static int TableView_setFocusPolicy(lua_State *L) { try { TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView")); int policy = dub_checkint(L, 2); self->setFocusPolicy((Qt::FocusPolicy)policy); return 0; } catch (std::exception &e) { lua_pushfstring(L, "setFocusPolicy: %s", e.what()); } catch (...) { lua_pushfstring(L, "setFocusPolicy: Unknown exception"); } return dub_error(L); }