diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-07 10:15:28 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-07 10:15:58 +0200 |
commit | e669502dcf2f825842ba87ee4a14a0be26883e28 (patch) | |
tree | 6110cd5b3dd240d510234d4cae82d50bf21f6f54 /vcl/android | |
parent | bcbe5fe88593473ff4d12633c52e34f2f8054594 (diff) |
Start hacking on scrolling
Change-Id: I74f1d7feb935be65629bdbd7464f9882229948e5
Diffstat (limited to 'vcl/android')
-rw-r--r-- | vcl/android/androidinst.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index 3dbdce141851..89a8e684607f 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -554,4 +554,21 @@ Java_org_libreoffice_experimental_desktop_Desktop_zoom(JNIEnv * /* env */, LOGW("No focused frame to emit event on"); } +// public static native void scroll(int x, int y); +extern "C" SAL_JNI_EXPORT void JNICALL +Java_org_libreoffice_experimental_desktop_Desktop_scroll(JNIEnv * /* env */, + jobject /* clazz */, + jint x, + jint y) +{ + SalFrame *pFocus = AndroidSalInstance::getInstance()->getFocusFrame(); + if (pFocus) { + SAL_INFO( "vcl.androidinst", "scroll: " << "(" << x << "," << y << ")" ); + ScrollEvent aEvent( x, y ); + Application::PostScrollEvent(VCLEVENT_WINDOW_SCROLL, pFocus->GetWindow(), &aEvent); + } + else + LOGW("No focused frame to emit event on"); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |