blob: df26ea93eb87877c46d48d667ee27a629775571f (
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
25
26
27
28
29
30
|
#include "serial/focusable.h"
#include "flattask.h"
#include "flatserial.h"
Focusable::Focusable(bool focused) : focused(focused)
{
event_trigger = new FlatTask<Focusable>(this, &Focusable::serial_precall, 0);
}
Focusable::~Focusable()
{
delete event_trigger;
}
void Focusable::setFocused(bool flag)
{
focused = flag;
}
bool Focusable::isFocused() const
{
return focused;
}
void Focusable::serial_precall(void*)
{
for (auto event : FlatSerial::collector->getStack(stackID()))
serial_cb(&event);
}
|