app.cpp
1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#include "app.h"
#include "../i18n.h"
#include "../apps_container.h"
#include "nes_icon.h"
extern "C" {
#include <assert.h>
#include <epsilon/nofrendo_wrapper.h>
}
namespace NES {
I18n::Message App::Descriptor::name() {
return I18n::Message::NES;
}
I18n::Message App::Descriptor::upperName() {
return I18n::Message::NESCapital;
}
const Image * App::Descriptor::icon() {
return ImageStore::NesIcon;
}
App::Descriptor * App::Snapshot::descriptor() {
static Descriptor descriptor;
return &descriptor;
}
App * App::Snapshot::unpack(Container * container) {
return new App(container, this);
}
App::Snapshot::Snapshot(){
}
void App::didBecomeActive(Window * window) {
::App::didBecomeActive(window);
NofrendoWrapper nofrendoWrapper;
nofrendoWrapper.run();
m_appsContainer->switchTo(m_appsContainer->appSnapshotAtIndex(0));
}
void App::willBecomeInactive() {
::App::willBecomeInactive();
}
App::App(Container * container, Snapshot * snapshot) :
::App(container, snapshot, &m_nesController),
m_appsContainer((AppsContainer*) container)
{
}
}