lua端怎么获得程序进入后台的通知

// This function will be called when the app is inactive. When comes a phone call,it’s be invoked too
void AppDelegate::applicationDidEnterBackground()
{
CCDirector::sharedDirector()->stopAnimation();
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}

// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground()
{
CCDirector::sharedDirector()->startAnimation();
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
}

在AppDelegate里的这段代码的行为. 在lua端怎么获得? 我想在程序进入后台的时候, 把游戏切入暂停界面

在c++这两个函数里面调用lua函数

好吧… 我还以为有现成的注册