mirror of https://github.com/buggins/dlangui.git
event handler refactoring
This commit is contained in:
parent
054ffbc292
commit
e7bc259039
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue