event handler refactoring

This commit is contained in:
Vadim Lopatin 2016-01-28 10:24:38 +03:00
parent 054ffbc292
commit e7bc259039
2 changed files with 8 additions and 1 deletions

View File

@ -1437,6 +1437,13 @@ class RunnableEvent : CustomEvent {
}
}
interface CustomEventTarget {
/// post event to handle in UI thread (this method can be used from background thread)
void postEvent(CustomEvent event);
/// post task to execute in UI thread (this method can be used from background thread)
void executeInUiThread(void delegate() runnable);
}
private static __gshared string[int] actionIdToNameMap;
private static __gshared int[string] actionNameToIdMap;

View File

@ -158,7 +158,7 @@ class TimerInfo {
* Window abstraction layer. Widgets can be shown only inside window.
*
*/
class Window {
class Window : CustomEventTarget {
protected int _dx;
protected int _dy;
protected uint _keyboardModifiers;