Exemplo n.º 1
0
/** QWidget* QWidget::parentWidget()
 * bind/QWidget.h:17
 */
static int MenuBar_parentWidget(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    QWidget *retval__ = self->parentWidget();
    if (!retval__) return 0;
    dub_pushudata(L, retval__, "mimas.QWidget", false);
    return 1;
  } catch (std::exception &e) {
    lua_pushfstring(L, "parentWidget: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "parentWidget: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 2
0
/** void QWidget::setAttribute(int attr, bool enabled)
 * bind/QWidget.h:22
 */
static int MenuBar_setAttribute(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    int attr = dub_checkint(L, 2);
    bool enabled = dub_checkboolean(L, 3);
    self->setAttribute((Qt::WidgetAttribute)attr, enabled);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setAttribute: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setAttribute: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 3
0
/** ofBuffer& ofBuffer::operator=(const string &text)
 * api/openFrameworks/utils/ofFileUtils.h:38
 */
static int ofBuffer_operator_sete(lua_State *L) {
  try {
    ofBuffer *self = *((ofBuffer **)dub_checksdata(L, 1, "ofBuffer"));
    size_t text_sz_;
    const char *text = dub_checklstring(L, 2, &text_sz_);
    dub_pushudata(L, &self->operator=(std::string(text, text_sz_)), "ofBuffer", false);
    return 1;
  } catch (std::exception &e) {
    lua_pushfstring(L, "set: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "set: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 4
0
/** void QWidget::resize(int w, int h)
 * bind/QWidget.h:11
 */
static int MenuBar_resize(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    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);
}
Exemplo n.º 5
0
/** bool QObject::setProperty(const char *name, const QVariant &value)
 * bind/QObject.h:10
 */
static int GLWidget_setProperty(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    const char *name = dub_checkstring(L, 2);
    QVariant value(variantFromLua(L, 3));
    lua_pushboolean(L, self->setProperty(name, value));
    return 1;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setProperty: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setProperty: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 6
0
/** QObject* QObject::parent()
 * bind/QObject.h:12
 */
static int GLWidget_parent(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    QObject *retval__ = self->parent();
    if (!retval__) return 0;
    dub_pushudata(L, retval__, "mimas.QObject", false);
    return 1;
  } catch (std::exception &e) {
    lua_pushfstring(L, "parent: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "parent: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 7
0
/** void QWidget::textSize(const char *text)
 * bind/QWidget.h:55
 */
static int GLWidget_textSize(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    const char *text = dub_checkstring(L, 2);
    lua_pushnumber(L, self->fontMetrics().width(text));
    lua_pushnumber(L, self->fontMetrics().height());
    return 2;
  } catch (std::exception &e) {
    lua_pushfstring(L, "textSize: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "textSize: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 8
0
/** LuaStackSize QWidget::globalPosition()
 * bind/QWidget.h:70
 */
static int GLWidget_globalPosition(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    QPoint pt = self->mapToGlobal(QPoint(0, 0));
    lua_pushnumber(L, pt.x());
    lua_pushnumber(L, pt.y());
    return 2;
  } catch (std::exception &e) {
    lua_pushfstring(L, "globalPosition: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "globalPosition: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 9
0
/** LuaStackSize QWidget::size()
 * bind/QWidget.h:50
 */
static int GLWidget_size(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    QRect rect = self->geometry();
    lua_pushnumber(L, rect.width());
    lua_pushnumber(L, rect.height());
    return 2;
  } catch (std::exception &e) {
    lua_pushfstring(L, "size: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "size: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 10
0
/** void QWidget::setMinimumSize(float w, float h)
 * bind/QWidget.h:25
 */
static int GLWidget_setMinimumSize(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    float w = dub_checknumber(L, 2);
    float h = dub_checknumber(L, 3);
    self->setMinimumSize(w, h);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setMinimumSize: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setMinimumSize: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 11
0
/** void QWidget::move(int x, int y)
 * bind/QWidget.h:10
 */
static int GLWidget_move(lua_State *L) {
  try {
    GLWidget *self = *((GLWidget **)dub_checksdata(L, 1, "mimas.GLWidget"));
    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);
}
Exemplo n.º 12
0
/** void btGeneric6DofSpringConstraint::enableSpring(int index, bool onOff)
 * bind/btGeneric6DofSpringConstraint.h:16
 */
static int btGeneric6DofSpringConstraint_enableSpring(lua_State *L) {
  try {
    btGeneric6DofSpringConstraint *self = *((btGeneric6DofSpringConstraint **)dub_checksdata(L, 1, "bt.Generic6DofSpringConstraint"));
    int index = dub_checkint(L, 2);
    bool onOff = dub_checkboolean(L, 3);
    self->enableSpring(index, onOff);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "enableSpring: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "enableSpring: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 13
0
/** void btGeneric6DofSpringConstraint::setDamping(int index, btScalar damping)
 * bind/btGeneric6DofSpringConstraint.h:18
 */
static int btGeneric6DofSpringConstraint_setDamping(lua_State *L) {
  try {
    btGeneric6DofSpringConstraint *self = *((btGeneric6DofSpringConstraint **)dub_checksdata(L, 1, "bt.Generic6DofSpringConstraint"));
    int index = dub_checkint(L, 2);
    btScalar damping = dub_checknumber(L, 3);
    self->setDamping(index, damping);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setDamping: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setDamping: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 14
0
/** void ofVbo::setTexCoordData(const ofVec2f *texCoords, int total, int usage)
 * api/openFrameworks/gl/ofVbo.h:26
 */
static int ofVbo_setTexCoordData(lua_State *L) {
  try {
    ofVbo *self = *((ofVbo **)dub_checksdata(L, 1, "ofVbo"));
    int top__ = lua_gettop(L);
    if (top__ >= 5) {
      float * texCoord0x = (float *) lua_touserdata (L, 2);
      
      int total = dub_checkint(L, 3);
      int usage = dub_checkint(L, 4);
      int stride = dub_checkint(L, 5);
      self->setTexCoordData((float *) texCoord0x, total, usage, stride);
      return 0;
    } else {
      int type__ = lua_type(L, 2);
      void **ptr2__;
      if ( (ptr2__ = dub_issdata(L, 2, "float *", type__)) ) {
        float * texCoord0x = (float *) lua_touserdata (L, 2);
        
        int total = dub_checkint(L, 3);
        int usage = dub_checkint(L, 4);
        self->setTexCoordData((float *) texCoord0x, total, usage);
        return 0;
      } else {
        ofVec2f *texCoords = *((ofVec2f **)dub_checksdata(L, 2, "ofVec2f"));
        int total = dub_checkint(L, 3);
        int usage = dub_checkint(L, 4);
        self->setTexCoordData(texCoords, total, usage);
        return 0;
      }
    }
  } catch (std::exception &e) {
    lua_pushfstring(L, "setTexCoordData: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setTexCoordData: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 15
0
/** void ofFbo::allocate(int width, int height, int internalformat=GL_RGBA, int numSamples=0)
 * api/openFrameworks/gl/ofFbo.h:14
 */
static int ofFbo_allocate(lua_State *L) {
  try {
    ofFbo *self = *((ofFbo **)dub_checksdata(L, 1, "ofFbo"));
    int top__ = lua_gettop(L);
    if (top__ >= 5) {
      int width = dub_checkint(L, 2);
      int height = dub_checkint(L, 3);
      int internalformat = dub_checkint(L, 4);
      int numSamples = dub_checkint(L, 5);
      self->allocate(width, height, internalformat, numSamples);
      return 0;
    } else if (top__ >= 4) {
      int width = dub_checkint(L, 2);
      int height = dub_checkint(L, 3);
      int internalformat = dub_checkint(L, 4);
      self->allocate(width, height, internalformat);
      return 0;
    } else if (top__ >= 3) {
      int width = dub_checkint(L, 2);
      int height = dub_checkint(L, 3);
      self->allocate(width, height);
      return 0;
    } else if (top__ >= 2) {
      ofFbo::Settings *settings = *((ofFbo::Settings **)dub_checksdata(L, 2, "ofFbo.Settings"));
      self->allocate(*settings);
      return 0;
    } else {
      self->allocate();
      return 0;
    }
  } catch (std::exception &e) {
    lua_pushfstring(L, "allocate: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "allocate: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 16
0
/** void b2BiFrictionJointDef::Initialize(b2Body *body, const b2Vec2 &mu)
 * vendor/Box2D/Box2D/Dynamics/Joints/b2BiFrictionJoint.h:35
 */
static int b2BiFrictionJointDef_Initialize(lua_State *L) {
  try {
    b2BiFrictionJointDef *self = *((b2BiFrictionJointDef **)dub_checksdata(L, 1, "b2.BiFrictionJointDef"));
    int top__ = lua_gettop(L);
    if (top__ >= 4) {
      int type__ = lua_type(L, 4);
      void **ptr4__;
      if ( (ptr4__ = dub_issdata(L, 4, "b2.Mat22", type__)) ) {
        b2Body *body = *((b2Body **)dub_checksdata(L, 2, "b2.Body"));
        b2Mat22 *muStatic = *((b2Mat22 **)dub_checksdata(L, 3, "b2.Mat22"));
        b2Mat22 *muKinetic = *((b2Mat22 **)ptr4__);
        self->Initialize(body, *muStatic, *muKinetic);
        return 0;
      } else {
        b2Body *body = *((b2Body **)dub_checksdata(L, 2, "b2.Body"));
        b2Vec2 *muStatic = *((b2Vec2 **)dub_checksdata(L, 3, "b2.Vec2"));
        b2Vec2 *muKinetic = *((b2Vec2 **)dub_checksdata(L, 4, "b2.Vec2"));
        self->Initialize(body, *muStatic, *muKinetic);
        return 0;
      }
    } else {
      int type__ = lua_type(L, 3);
      void **ptr3__;
      if ( (ptr3__ = dub_issdata(L, 3, "b2.Mat22", type__)) ) {
        b2Body *body = *((b2Body **)dub_checksdata(L, 2, "b2.Body"));
        b2Mat22 *muStatic = *((b2Mat22 **)ptr3__);
        self->Initialize(body, *muStatic);
        return 0;
      } else {
        b2Body *body = *((b2Body **)dub_checksdata(L, 2, "b2.Body"));
        b2Vec2 *mu = *((b2Vec2 **)dub_checksdata(L, 3, "b2.Vec2"));
        self->Initialize(body, *mu);
        return 0;
      }
    }
  } catch (std::exception &e) {
    lua_pushfstring(L, "Initialize: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "Initialize: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 17
0
/** void b2Color::Set(float32 ri, float32 gi, float32 bi)
 * vendor/Box2D/Box2D/Common/b2Draw.h:29
 */
static int b2Color_Set(lua_State *L) {
    try {
        b2Color *self = *((b2Color **)dub_checksdata(L, 1, "b2.Color"));
        float32 ri = dub_checknumber(L, 2);
        float32 gi = dub_checknumber(L, 3);
        float32 bi = dub_checknumber(L, 4);
        self->Set(ri, gi, bi);
        return 0;
    } catch (std::exception &e) {
        lua_pushfstring(L, "Set: %s", e.what());
    } catch (...) {
        lua_pushfstring(L, "Set: Unknown exception");
    }
    return dub_error(L);
}
Exemplo n.º 18
0
/** 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);
}
Exemplo n.º 19
0
/** void QWidget::setToolTip(const QString &text)
 * bind/QWidget.h:39
 */
static int TableView_setToolTip(lua_State *L) {
  try {
    TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView"));
    size_t text_sz_;
    const char *text = dub_checklstring(L, 2, &text_sz_);
    
    self->setToolTip(QString::fromUtf8(text, text_sz_));
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setToolTip: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setToolTip: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 20
0
/** void QObject::setObjectName(const QString &name)
 * bind/QObject.h:8
 */
static int TableView_setObjectName(lua_State *L) {
  try {
    TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView"));
    size_t name_sz_;
    const char *name = dub_checklstring(L, 2, &name_sz_);
    
    self->setObjectName(QString::fromUtf8(name, name_sz_));
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setObjectName: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setObjectName: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 21
0
/** void btConvexInternalShape::setSafeMargin(btScalar minDimension, btScalar defaultMarginMultiplier=0.1f)
 * src/vendor/bullet/src/BulletCollision/CollisionShapes/btConvexInternalShape.h:71
 */
static int btPolyhedralConvexShape_setSafeMargin(lua_State *L) {
    try {
        btPolyhedralConvexShape *self = *((btPolyhedralConvexShape **)dub_checksdata(L, 1, "bt.PolyhedralConvexShape"));
        int top__ = lua_gettop(L);
        if (top__ >= 3) {
            int type__ = lua_type(L, 2);
            if (type__ == LUA_TNUMBER) {
                btScalar minDimension = dub_checknumber(L, 2);
                btScalar defaultMarginMultiplier = dub_checknumber(L, 3);
                self->setSafeMargin(minDimension, defaultMarginMultiplier);
                return 0;
            } else {
                btVector3 *halfExtents = *((btVector3 **)dub_checksdata(L, 2, "bt.Vector3"));
                btScalar defaultMarginMultiplier = dub_checknumber(L, 3);
                self->setSafeMargin(*halfExtents, defaultMarginMultiplier);
                return 0;
            }
        } else {
            int type__ = lua_type(L, 2);
            if (type__ == LUA_TNUMBER) {
                btScalar minDimension = dub_checknumber(L, 2);
                self->setSafeMargin(minDimension);
                return 0;
            } else {
                btVector3 *halfExtents = *((btVector3 **)dub_checksdata(L, 2, "bt.Vector3"));
                self->setSafeMargin(*halfExtents);
                return 0;
            }
        }
    } catch (std::exception &e) {
        lua_pushfstring(L, "setSafeMargin: %s", e.what());
    } catch (...) {
        lua_pushfstring(L, "setSafeMargin: Unknown exception");
    }
    return dub_error(L);
}
Exemplo n.º 22
0
/** void btHingeConstraint::enableAngularMotor(bool enableMotor, btScalar targetVelocity, btScalar maxMotorImpulse)
 * bind/btHingeConstraint.h:34
 */
static int btHingeConstraint_enableAngularMotor(lua_State *L) {
  try {
    btHingeConstraint *self = *((btHingeConstraint **)dub_checksdata(L, 1, "bt.HingeConstraint"));
    bool enableMotor = dub_checkboolean(L, 2);
    btScalar targetVelocity = dub_checknumber(L, 3);
    btScalar maxMotorImpulse = dub_checknumber(L, 4);
    self->enableAngularMotor(enableMotor, targetVelocity, maxMotorImpulse);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "enableAngularMotor: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "enableAngularMotor: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 23
0
/** void QLineEdit::setText(const QString &str)
 * bind/QLineEdit.h:10
 */
static int LineEdit_setText(lua_State *L) {
  try {
    LineEdit *self = *((LineEdit **)dub_checksdata(L, 1, "mimas.LineEdit"));
    size_t str_sz_;
    const char *str = dub_checklstring(L, 2, &str_sz_);
    
    self->setText(QString::fromUtf8(str, str_sz_));
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setText: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setText: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 24
0
/** void btMatrix3x3::getEulerYPR(btScalar &yaw, btScalar &pitch, btScalar &roll) const
 * src/vendor/bullet/src/LinearMath/btMatrix3x3.h:488
 */
static int btMatrix3x3_getEulerYPR(lua_State *L) {
  try {
    btMatrix3x3 *self = *((btMatrix3x3 **)dub_checksdata(L, 1, "bt.Matrix3x3"));
    btScalar yaw = dub_checknumber(L, 2);
    btScalar pitch = dub_checknumber(L, 3);
    btScalar roll = dub_checknumber(L, 4);
    self->getEulerYPR(yaw, pitch, roll);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "getEulerYPR: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "getEulerYPR: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 25
0
/** void btMatrix3x3::setEulerZYX(btScalar eulerX, btScalar eulerY, btScalar eulerZ)
 * src/vendor/bullet/src/LinearMath/btMatrix3x3.h:293
 */
static int btMatrix3x3_setEulerZYX(lua_State *L) {
  try {
    btMatrix3x3 *self = *((btMatrix3x3 **)dub_checksdata(L, 1, "bt.Matrix3x3"));
    btScalar eulerX = dub_checknumber(L, 2);
    btScalar eulerY = dub_checknumber(L, 3);
    btScalar eulerZ = dub_checknumber(L, 4);
    self->setEulerZYX(eulerX, eulerY, eulerZ);
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setEulerZYX: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setEulerZYX: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 26
0
/** 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);
}
Exemplo n.º 27
0
/** LuaStackSize Widget::getOpenFileName(const char *caption, const char *base_dir, const char *filter, int options, lua_State *L)
 * include/mimas/Widget.h:109
 */
static int Widget_getOpenFileName(lua_State *L) {
  try {
    Widget *self = *((Widget **)dub_checksdata(L, 1, "mimas.Widget"));
    const char *caption = dub_checkstring(L, 2);
    const char *base_dir = dub_checkstring(L, 3);
    const char *filter = dub_checkstring(L, 4);
    int options = dub_checkint(L, 5);
    return self->getOpenFileName(caption, base_dir, filter, options, L);
  } catch (std::exception &e) {
    lua_pushfstring(L, "getOpenFileName: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "getOpenFileName: Unknown exception");
  }
  return dub_error(L);
}
Exemplo n.º 28
0
/** void QWidget::setWindowTitle(const QString &text)
 * bind/QWidget.h:38
 */
static int Widget_setWindowTitle(lua_State *L) {
  try {
    Widget *self = *((Widget **)dub_checksdata(L, 1, "mimas.Widget"));
    size_t text_sz_;
    const char *text = dub_checklstring(L, 2, &text_sz_);
    
    self->setWindowTitle(QString::fromUtf8(text, text_sz_));
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "setWindowTitle: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "setWindowTitle: 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);
}
Exemplo n.º 30
0
/** void QWidget::swapFullScreen()
 * bind/QWidget.h:65
 */
static int TableView_swapFullScreen(lua_State *L) {
  try {
    TableView *self = *((TableView **)dub_checksdata(L, 1, "mimas.TableView"));
    if (!self->isFullScreen()) {
      self->showFullScreen();
    } else {
      self->showNormal();
    }
    return 0;
  } catch (std::exception &e) {
    lua_pushfstring(L, "swapFullScreen: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "swapFullScreen: Unknown exception");
  }
  return dub_error(L);
}