android: add postMouseEvent to LOKit JNI interface
Change-Id: I652a0c365c4a1413226cdd4dc7910e65ac2a5285
This commit is contained in:
parent
3928932fe3
commit
dbde7f6ab8
@ -26,6 +26,10 @@ public class Document {
|
||||
public static final int DOCTYPE_DRAWING = 3;
|
||||
public static final int DOCTYPE_OTHER = 4;
|
||||
|
||||
public static final int MOUSE_BUTTON_DOWN = 0;
|
||||
public static final int MOUSE_BUTTON_UP = 1;
|
||||
public static final int MOUSE_MOVE = 2;
|
||||
|
||||
private final ByteBuffer handle;
|
||||
private MessageCallback messageCallback = null;
|
||||
|
||||
@ -85,6 +89,14 @@ public class Document {
|
||||
|
||||
public native void initializeForRendering();
|
||||
|
||||
/**
|
||||
* Post a mouse event to LOK
|
||||
* @param type - mouse event type
|
||||
* @param x - x coordinate
|
||||
* @param y - y coordinate
|
||||
*/
|
||||
public native void postMouseEvent(int type, int x, int y);
|
||||
|
||||
/**
|
||||
* Callback to retrieve messages from LOK
|
||||
*/
|
||||
|
@ -277,6 +277,13 @@ extern "C" SAL_JNI_EXPORT jint JNICALL Java_org_libreoffice_kit_Office_saveAs
|
||||
return result;
|
||||
}
|
||||
|
||||
extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_postMouseEvent
|
||||
(JNIEnv* pEnv, jobject aObject, jint type, jint x, jint y)
|
||||
{
|
||||
LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject);
|
||||
pDocument->pClass->postMouseEvent(pDocument, type, x, y);
|
||||
}
|
||||
|
||||
/* DirectBufferAllocator */
|
||||
|
||||
extern "C" SAL_JNI_EXPORT jobject JNICALL Java_org_libreoffice_kit_DirectBufferAllocator_allocateDirectBufferNative
|
||||
|
Loading…
x
Reference in New Issue
Block a user