/** * \brief Calls the on_started() method of a Lua game. * * Does nothing if the method is not defined. * * \param game A game. */ void LuaContext::game_on_started(Game& game) { if (!userdata_has_field(game.get_savegame(), "on_started")) { return; } push_game(l, game.get_savegame()); on_started(); lua_pop(l, 1); }
/** * \brief Calls the on_started() method of a Lua equipment item. * * Does nothing if the method is not defined. * * \param item An equipment item. */ void LuaContext::item_on_started(EquipmentItem& item) { if (!userdata_has_field(item, "on_started")) { return; } push_item(l, item); on_started(); lua_pop(l, 1); }
EventProcessingBlockInOwnThread::~EventProcessingBlockInOwnThread () { QObject::disconnect(this, SIGNAL(terminated()), this, SLOT(on_terminated())); QObject::disconnect(this, SIGNAL(finished ()), this, SLOT(on_finished ())); QObject::disconnect(this, SIGNAL(started ()), this, SLOT(on_started ())); QObject::disconnect(this, SIGNAL(dbg_terminated(EventProcessingBlockInOwnThread*)), &debugger(), SLOT(terminated(EventProcessingBlockInOwnThread*))); QObject::disconnect(this, SIGNAL(dbg_finished (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(finished (EventProcessingBlockInOwnThread*))); QObject::disconnect(this, SIGNAL(dbg_started (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(started (EventProcessingBlockInOwnThread*))); debugger().destroyed(this); }
EventProcessingBlockInOwnThread::EventProcessingBlockInOwnThread (Name name) : name(name) { debugger().constructed(this); QObject::connect(this, SIGNAL(dbg_started (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(started (EventProcessingBlockInOwnThread*))); QObject::connect(this, SIGNAL(dbg_finished (EventProcessingBlockInOwnThread*)), &debugger(), SLOT(finished (EventProcessingBlockInOwnThread*))); QObject::connect(this, SIGNAL(dbg_terminated(EventProcessingBlockInOwnThread*)), &debugger(), SLOT(terminated(EventProcessingBlockInOwnThread*))); QObject::connect(this, SIGNAL(started ()), this, SLOT(on_started ())); QObject::connect(this, SIGNAL(finished ()), this, SLOT(on_finished ())); QObject::connect(this, SIGNAL(terminated()), this, SLOT(on_terminated())); }
void clist_cb (struct tgl_state *TLSR, void *callback_extra, int success, int size, tgl_peer_id_t peers[], tgl_message_id_t *last_msg_id[], int unread_count[]) { on_started (TLS); }
/** * \brief Calls sol.main.on_started() if it exists. * * This function is called when the engine requests Lua to show an * initial screen, i.e. at the beginning of the program * or when the program is reset. */ void LuaContext::main_on_started() { push_main(l); on_started(); lua_pop(l, 1); }
/** * \brief Calls the on_started() method of a Lua menu. * \param menu_ref A reference to the menu object. */ void LuaContext::menu_on_started(const ScopedLuaRef& menu_ref) { push_ref(l, menu_ref); on_started(); lua_pop(l, 1); }
/** * @brief Calls the on_started() method of a Lua menu. * @param menu_ref A reference to the menu object. */ void LuaContext::menu_on_started(int menu_ref) { push_ref(l, menu_ref); on_started(); lua_pop(l, 1); }
/** * @brief Calls the on_started() method of a Lua game. * @param game A game. */ void LuaContext::game_on_started(Game& game) { push_game(l, game.get_savegame()); on_started(); lua_pop(l, 1); }