LibreOffice Module android (master) 1
TileProvider.java
Go to the documentation of this file.
1/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9package org.libreoffice;
10
11
12import android.graphics.Bitmap;
13import android.graphics.PointF;
14import android.view.KeyEvent;
15
18
22public interface TileProvider {
23
34 boolean saveDocumentAs(String filePath, String format, boolean takeOwnership);
35
42 boolean saveDocumentAs(String filePath, boolean takeOwnership);
43
48
53
54 boolean isReady();
55
56 CairoImage createTile(float x, float y, IntSize tileSize, float zoom);
57
61 void rerenderTile(CairoImage image, float x, float y, IntSize tileSize, float zoom);
62
68 void changePart(int partIndex);
69
76
81
82 Bitmap thumbnail(int size);
83
87 void close();
88
92 boolean isDrawing();
93
97 boolean isTextDocument();
98
102 boolean isSpreadsheet();
103
107 boolean isPresentation();
108
114 void sendKeyEvent(KeyEvent keyEvent);
115
122 void mouseButtonDown(PointF documentCoordinate, int numberOfClicks, float zoomFactor);
123
124
129
134
141 void mouseButtonUp(PointF documentCoordinate, int numberOfClicks, float zoomFactor);
142
148 void postUnoCommand(String command, String arguments);
149
156 void postUnoCommand(String command, String arguments, boolean notifyWhenFinished);
157
162 void setTextSelectionStart(PointF documentCoordinate);
163
168 void setTextSelectionEnd(PointF documentCoordinate);
169
174 String getTextSelection(String mimeType);
175
182 boolean paste(String mimeType, String data);
187 void setTextSelectionReset(PointF documentCoordinate);
188
192 void setGraphicSelectionStart(PointF documentCoordinate);
193
197 void setGraphicSelectionEnd(PointF documentCoordinate);
198
202 void setDocumentSize(int pageWidth, int pageHeight);
203}
204
205/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Provides the tiles and other document information.
void mouseButtonDown(PointF documentCoordinate, int numberOfClicks, float zoomFactor)
Trigger a mouse button down event.
boolean isTextDocument()
Returns true if the current open document is a text document.
void mouseButtonUp(PointF documentCoordinate, int numberOfClicks, float zoomFactor)
Trigger a mouse button up event.
String getTextSelection(String mimeType)
get selected text
CairoImage createTile(float x, float y, IntSize tileSize, float zoom)
boolean isPresentation()
Returns true if the current open document is a presentation.
void changePart(int partIndex)
Change the document part to the one specified by the partIndex input parameter.
boolean paste(String mimeType, String data)
copy
void setGraphicSelectionStart(PointF documentCoordinate)
Send a request to change start the change of graphic selection.
int getPageHeight()
Returns the page height in pixels.
int getCurrentPartNumber()
Get the current document part number.
void postUnoCommand(String command, String arguments)
Post a UNO command to LOK.
void close()
Closes the document.
void onSwipeLeft()
Trigger a swipe left event.
void rerenderTile(CairoImage image, float x, float y, IntSize tileSize, float zoom)
Rerender and overwrite tile's image buffer directly.
void postUnoCommand(String command, String arguments, boolean notifyWhenFinished)
This is the actual reference to the function in LOK, used for getting notified when uno:save event fi...
void sendKeyEvent(KeyEvent keyEvent)
Trigger a key event.
int getPageWidth()
Returns the page width in pixels.
void setTextSelectionEnd(PointF documentCoordinate)
Send text selection end coordinate.
boolean saveDocumentAs(String filePath, boolean takeOwnership)
Saves the current document under the given path, using the default file format.
boolean saveDocumentAs(String filePath, String format, boolean takeOwnership)
Save the current document under the given path.
void onSwipeRight()
Trigger a swipe left event.
int getPartsCount()
Get the total number of parts.
Bitmap thumbnail(int size)
boolean isSpreadsheet()
Returns true if the current open document is a spreadsheet.
void setTextSelectionStart(PointF documentCoordinate)
Send text selection start coordinate.
void setDocumentSize(int pageWidth, int pageHeight)
Set the new page size of the document when changed.
void setTextSelectionReset(PointF documentCoordinate)
Send text selection reset coordinate.
void setGraphicSelectionEnd(PointF documentCoordinate)
Send a request to change end the change of graphic selection...
boolean isDrawing()
Returns true if the current open document is a drawing.