Used to manage several applications on the badge.
More...
#include <AppManager.h>
Used to manage several applications on the badge.
- Author
- Dan Nixon
AppManager::AppManager |
( |
Dilbert * |
badge | ) |
|
Creates a new application manager.
- Parameters
-
badge | Pointer to badge driver |
bool AppManager::activateAppByIdx |
( |
uint8_t |
idx | ) |
|
Activates an application given it's index.
- Parameters
-
- Returns
- True if the app was successfully activated
bool AppManager::activateAppByName |
( |
char * |
name | ) |
|
Activates an application given it's name.
- Parameters
-
- Returns
- True if the app was successfully activated
App* AppManager::activeApp |
( |
| ) |
|
|
inline |
Gets the active application.
- Returns
- Pointer to active application
uint8_t AppManager::addApp |
( |
App * |
app | ) |
|
Adds an application to the manager.
- Parameters
-
app | Pointer to the application |
- Returns
- Index of the added application (255 on error)
Note that the first application added must be a home page/launcher application. When an application exits application 0 will be launched.
App* AppManager::app |
( |
uint8_t |
idx | ) |
|
|
inline |
Gets an application given it's index.
- Parameters
-
- Returns
- Pointer to application
uint8_t AppManager::appIdx |
( |
char * |
name | ) |
|
Gets the index of an app given it's name.
- Parameters
-
- Returns
- Index or 255 if not in manager
uint8_t AppManager::appIdx |
( |
App * |
app | ) |
const |
Gets the index of an application.
- Parameters
-
app | Pointer to application |
- Returns
- Index or 255 if not in manager
void AppManager::handleUniversalInputEvent |
( |
inputtype_t |
type, |
|
|
IInputDevice * |
device |
|
) |
| |
Handles a state change of an input device.
- Parameters
-
type | Type of input device (should always be button) |
device | Pointer to input device |
size_t AppManager::numApps |
( |
| ) |
const |
Gets the number of applications in the manager.
- Returns
- NUmber of apps
The documentation for this class was generated from the following files: