blob: 71aba2fcc8294146f139e91b2270a6e1d039099a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#pragma once
#include <vector>
#include "base_app.hpp"
// List of pointers to currently running apps.
extern std::vector<BaseApp*> open_apps;
// Init a new app, that is not running.
BaseApp* app_init(int app_id);
// Allow the running app, referenced by app_id, to invoke its render routine.
int app_render(BaseApp* app);
// Delta is in ms, from time_since_button_press()
int app_btnpressed(BaseApp* app, uint gpio, unsigned long delta);
// This should only be called by pico-watch.cpp before app rendering, to chage the current app.
void app_switch(BaseApp* app, int new_appid);
// Requests the current app to be replaced by an other one. The replacement will be done at the right moment.
void app_switch_request(int to_appid);
// Refresh each app
void app_all_bgrefresh();
|