Ejemplo n.º 1
0
/** bool QWidget::isFullScreen()
 * bind/QWidget.h:36
 */
static int MenuBar_isFullScreen(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    lua_pushboolean(L, self->isFullScreen());
    return 1;
  } catch (std::exception &e) {
    lua_pushfstring(L, "isFullScreen: %s", e.what());
  } catch (...) {
    lua_pushfstring(L, "isFullScreen: Unknown exception");
  }
  return dub_error(L);
}
Ejemplo n.º 2
0
/** void QWidget::swapFullScreen()
 * bind/QWidget.h:65
 */
static int MenuBar_swapFullScreen(lua_State *L) {
  try {
    MenuBar *self = *((MenuBar **)dub_checksdata(L, 1, "mimas.MenuBar"));
    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);
}