diff options
| author | ruki <[email protected]> | 2017-12-20 23:20:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-12-20 14:04:19 +0800 |
| commit | bf0ea773b29ca4a85430dcb5ab024ed27a8eeb0c (patch) | |
| tree | f21820ed08d80213c1049b50e1b99b07bc19f627 /xmake/core/ui/application.lua | |
| parent | 5924ef4adbe4b084c465bc9604254be60d147074 (diff) | |
fix on event for ui
Diffstat (limited to 'xmake/core/ui/application.lua')
| -rw-r--r-- | xmake/core/ui/application.lua | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/xmake/core/ui/application.lua b/xmake/core/ui/application.lua index 9401728be..874864826 100644 --- a/xmake/core/ui/application.lua +++ b/xmake/core/ui/application.lua @@ -31,6 +31,7 @@ $Id: application.lua 18 2007-06-21 20:43:52Z tngd $ local os = require("base/os") local log = require("ui/log") local rect = require("ui/rect") +local event = require("ui/event") local curses = require("ui/curses") local program = require("ui/program") local desktop = require("ui/desktop") @@ -61,6 +62,9 @@ function application:init(name) self:insert(self:menubar()) self:insert(self:desktop()) + -- register event type + self:event_register(event.ev_keyboard) + -- trace log:print("<application: %s>: init ok", name) end @@ -99,10 +103,9 @@ function application:statusbar() return self._STATUSBAR end --- do event -function application:do_event(e) - program.do_event(self, e) - -- TODO +-- on event +function application:event_on(e) + program.event_on(self, e) end -- run application |
