diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-04-14 01:40:46 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-04-14 01:52:22 +0300 |
commit | 6b89688829fa2758419361b1ac0598b72a3e3423 (patch) | |
tree | 70e6b8bf0c5365eafc88629b48d04ee96f1a68e9 | |
parent | 7fbea4712774467fcf7edf535905f02c586ccfe0 (diff) |
Add lo_keyboard_input()
Change-Id: I5904f673de9854af47eefac2f192295a281c5525
-rw-r--r-- | sal/inc/osl/detail/ios-bootstrap.h | 1 | ||||
-rw-r--r-- | vcl/ios/iosinst.cxx | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h index c96706ad2648..4738eeb72da6 100644 --- a/sal/inc/osl/detail/ios-bootstrap.h +++ b/sal/inc/osl/detail/ios-bootstrap.h @@ -49,6 +49,7 @@ void lo_runMain(); void lo_set_view_size(int width, int height); void lo_render_windows(CGContextRef context, CGRect rect); void lo_tap(int x, int y); +void lo_keyboard_input(int c); #ifdef __cplusplus } diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index ebf44ac8ec5a..920187c1aa1f 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -370,6 +370,17 @@ void lo_tap(int x, int y) } extern "C" +void lo_keyboard_input(int c) +{ + SalFrame *pFocus = IosSalInstance::getInstance()->getFocusFrame(); + if (pFocus) { + KeyEvent aEvent(c, c, 0); + Application::PostKeyEvent(VCLEVENT_WINDOW_KEYINPUT, pFocus->GetWindow(), &aEvent); + Application::PostKeyEvent(VCLEVENT_WINDOW_KEYUP, pFocus->GetWindow(), &aEvent); + } +} + +extern "C" void lo_keyboard_did_hide() { // Tell LO it has lost "focus", which will cause it to stop |