mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-24 16:20:49 +01:00
[Ion] Move to C++
Change-Id: Id75fca5e92a3fdf18258015bcda7cd70297b0fdb
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
#include <escher/container.h>
|
||||
extern "C" {
|
||||
#include <ion.h>
|
||||
}
|
||||
#include <ion/display.h>
|
||||
|
||||
Container::Container() :
|
||||
m_activeApp(nullptr)
|
||||
@@ -18,16 +16,16 @@ App * Container::activeApp() {
|
||||
return m_activeApp;
|
||||
}
|
||||
|
||||
bool Container::handleEvent(ion_event_t event) {
|
||||
bool Container::handleEvent(Ion::Events::Event event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void Container::run() {
|
||||
m_window.setFrame(KDRect(0, 0, ION_SCREEN_WIDTH, ION_SCREEN_HEIGHT));
|
||||
m_window.setFrame(KDRect(0, 0, Ion::Display::Width, Ion::Display::Height));
|
||||
m_window.redraw();
|
||||
|
||||
while (true) {
|
||||
ion_event_t event = ion_get_event(); // This is a blocking call
|
||||
Ion::Events::Event event = Ion::Events::getEvent(); // This is a blocking call
|
||||
if (handleEvent(event)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user