diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-01 22:52:24 +0100 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.com> | 2015-11-01 22:59:04 +0100 |
commit | 6d9124de6fac2dea39427978993e68155291cc9c (patch) | |
tree | 9813ad0adc206412817447ee73b59f0d11f93053 /android/Bootstrap | |
parent | add LOKit interface missing description (diff) | |
download | core-6d9124de6fac2dea39427978993e68155291cc9c.tar.gz core-6d9124de6fac2dea39427978993e68155291cc9c.zip |
android: update JNI facade, rename mouse/keyboard event flags
Change-Id: Ia2b9a812717d05c7d98d47bf0fe5fd293029d045
Diffstat (limited to 'android/Bootstrap')
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/kit/Document.java | 55 | ||||
-rw-r--r-- | android/Bootstrap/src/org/libreoffice/kit/Office.java | 3 |
2 files changed, 45 insertions, 13 deletions
diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java b/android/Bootstrap/src/org/libreoffice/kit/Document.java index a07785216e8b..4cc4ba345c04 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/Document.java +++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java @@ -12,12 +12,12 @@ package org.libreoffice.kit; import java.nio.ByteBuffer; public class Document { - public static final int PART_MODE_DEFAULT = 0; - public static final int PART_MODE_SLIDE = 1; - public static final int PART_MODE_NOTES = 2; - public static final int PART_MODE_SLIDENOTES = 3; - public static final int PART_MODE_EMBEDDEDOBJ = 4; + public static final int PART_MODE_SLIDE = 0; + public static final int PART_MODE_NOTES = 1; + /** + * Document types + */ public static final int DOCTYPE_TEXT = 0; public static final int DOCTYPE_SPREADSHEET = 1; public static final int DOCTYPE_PRESENTATION = 2; @@ -27,10 +27,15 @@ public class Document { /** * Mouse event types */ - public static final int MOUSE_BUTTON_DOWN = 0; - public static final int MOUSE_BUTTON_UP = 1; - public static final int MOUSE_MOVE = 2; + public static final int MOUSE_EVENT_BUTTON_DOWN = 0; + public static final int MOUSE_EVENT_BUTTON_UP = 1; + public static final int MOUSE_EVENT_MOVE = 2; + /** + * Key event types + */ + public static final int KEY_EVENT_PRESS = 0; + public static final int KEY_EVENT_RELEASE = 1; /** * State change types @@ -40,6 +45,11 @@ public class Document { public static final int UNDERLINE = 2; public static final int STRIKEOUT = 3; + public static final int ALIGN_LEFT= 4; + public static final int ALIGN_CENTER = 5; + public static final int ALIGN_RIGHT= 6; + public static final int ALIGN_JUSTIFY= 7; + /** * Callback message types */ @@ -52,6 +62,13 @@ public class Document { public static final int CALLBACK_GRAPHIC_SELECTION = 6; public static final int CALLBACK_HYPERLINK_CLICKED = 7; public static final int CALLBACK_STATE_CHANGED = 8; + public static final int CALLBACK_STATUS_INTICATOR_START = 9; + public static final int CALLBACK_STATUS_INTICATOR_SET_VALUE = 10; + public static final int CALLBACK_STATUS_INTICATOR_FINISH = 11; + public static final int CALLBACK_SEARCH_NOT_FOUND = 12; + public static final int CALLBACK_DOCUMENT_SIZE_CHANGED = 13; + public static final int CALLBACK_SET_PART = 14; + public static final int CALLBACK_SEARCH_RESULT_SELECTION = 15; /** * Set text selection types @@ -66,6 +83,19 @@ public class Document { public static final int SET_GRAPHIC_SELECTION_START = 0; public static final int SET_GRAPHIC_SELECTION_END = 1; + /** + * Mouse button type + */ + public static final int MOUSE_BUTTON_LEFT = 1; + public static final int MOUSE_BUTTON_MIDDLE = 2; + public static final int MOUSE_BUTTON_RIGHT = 4; + + public static final int KEYBOARD_MODIFIER_NONE = 0x0000; + public static final int KEYBOARD_MODIFIER_SHIFT = 0x1000; + public static final int KEYBOARD_MODIFIER_MOD1 = 0x2000; + public static final int KEYBOARD_MODIFIER_MOD2 = 0x4000; + public static final int KEYBOARD_MODIFIER_MOD3 = 0x8000; + private final ByteBuffer handle; private MessageCallback messageCallback = null; @@ -105,6 +135,8 @@ public class Document { public native void setPartMode(int partMode); + public native String getPartPageRectangles(); + public native long getDocumentHeight(); public native long getDocumentWidth(); @@ -140,13 +172,14 @@ public class Document { * @param y - y coordinate * @param count - number of events */ - public native void postMouseEvent(int type, int x, int y, int count); + public native void postMouseEvent(int type, int x, int y, int count, int button, int modifier); /** * Post a .uno: command to LOK * @param command - the command, like ".uno:Bold" + * @param arguments */ - public native void postUnoCommand(String command); + public native void postUnoCommand(String command, String arguments); /** * Change text selection. @@ -169,6 +202,8 @@ public class Document { */ public native void resetSelection(); + public native String getCommandValues(String command); + /** * Callback to retrieve messages from LOK */ diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java index 86eda5cf6873..8c616d0e9ce2 100644 --- a/android/Bootstrap/src/org/libreoffice/kit/Office.java +++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java @@ -12,9 +12,6 @@ package org.libreoffice.kit; import java.nio.ByteBuffer; public class Office { - public static final int KEY_PRESS = 0; - public static final int KEY_RELEASE = 1; - private ByteBuffer handle; public Office(ByteBuffer handle) { |