mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Relocate 'input' folder.
This commit is contained in:
22
src/input/InputBroker.h
Normal file
22
src/input/InputBroker.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "Observer.h"
|
||||
|
||||
typedef struct _InputEvent {
|
||||
const char* source;
|
||||
char inputEvent;
|
||||
} InputEvent;
|
||||
class InputBroker :
|
||||
public Observable<const InputEvent *>
|
||||
{
|
||||
CallbackObserver<InputBroker, const InputEvent *> inputEventObserver =
|
||||
CallbackObserver<InputBroker, const InputEvent *>(this, &InputBroker::handleInputEvent);
|
||||
|
||||
public:
|
||||
InputBroker();
|
||||
void registerSource(Observable<const InputEvent *> *source);
|
||||
|
||||
protected:
|
||||
int handleInputEvent(const InputEvent *event);
|
||||
};
|
||||
|
||||
extern InputBroker *inputBroker;
|
||||
Reference in New Issue
Block a user