[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/Bootstrap android/experimental

Tomaž Vajngerl tomaz.vajngerl at collabora.co.uk
Mon Jan 12 03:36:58 PST 2015


 android/Bootstrap/src/org/libreoffice/kit/Document.java                    |    8 ++++++++
 android/Bootstrap/src/org/libreoffice/kit/Office.java                      |    7 +++++++
 android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java |   10 ++++++++++
 3 files changed, 25 insertions(+)

New commits:
commit 455c4b726135c1eed25e34d3632a14822c31be96
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Mon Jan 12 19:48:33 2015 +0900

    android: comments for new interfaces and methods
    
    Change-Id: I742e232b3a9994f82423bc4bdfa1a5b656f8af87

diff --git a/android/Bootstrap/src/org/libreoffice/kit/Document.java b/android/Bootstrap/src/org/libreoffice/kit/Document.java
index 10d0a0c..4c791cb 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Document.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Document.java
@@ -85,7 +85,15 @@ public class Document {
 
     public native void initializeForRendering();
 
+    /**
+     * Callback to retrieve messages from LOK
+     */
     public interface MessageCallback {
+        /**
+         * Invoked when a message is retrieved from LOK
+         * @param signalNumber - signal type / number
+         * @param payload - retrieved for the signal
+         */
         void messageRetrieved(int signalNumber, String payload);
     }
 
diff --git a/android/Bootstrap/src/org/libreoffice/kit/Office.java b/android/Bootstrap/src/org/libreoffice/kit/Office.java
index 8759e85..25861c9 100644
--- a/android/Bootstrap/src/org/libreoffice/kit/Office.java
+++ b/android/Bootstrap/src/org/libreoffice/kit/Office.java
@@ -12,6 +12,8 @@ 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;
 
@@ -32,6 +34,11 @@ public class Office {
         return document;
     }
 
+    /**
+     * Post a key event to LibreOffice.
+     * @param type - type of key event
+     * @param code - key event code
+     */
     public native void postKeyEvent(int type, int code);
 
     public native void destroy();
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
index c705a94..faa55a8 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
@@ -16,6 +16,9 @@ public interface TileProvider {
 
     CairoImage createTile(float x, float y, IntSize tileSize, float zoom);
 
+    /**
+     * Rerender and overwrite tile's image buffer directly
+     */
     void rerenderTile(CairoImage image, float x, float y, IntSize tileSize, float zoom);
 
     void changePart(int partIndex);
@@ -30,7 +33,14 @@ public interface TileProvider {
 
     void registerInvalidationCallback(TileProvider.TileInvalidationCallback tileInvalidationCallback);
 
+    /**
+     * Callback to retrieve invalidation calls
+     */
     public interface TileInvalidationCallback {
+        /**
+         * Invoked when a region is invalidated.
+         * @param rect area in pixels which was invalidated and needs to be redrawn
+         */
         void invalidate(RectF rect);
     }
 }


More information about the Libreoffice-commits mailing list