Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
0ffb877c
Kaydet (Commit)
0ffb877c
authored
Şub 19, 2015
tarafından
Tomaž Vajngerl
Kaydeden (comit)
Miklos Vajna
Şub 23, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
anndroid: bind "LongPress" to mouse double click
Change-Id: Iba56deccf3c342ac82ca6cf78e09caf323f4a14d
üst
67c9a6dc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
12 deletions
+26
-12
LOKitThread.java
...ntal/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
+7
-2
LOKitTileProvider.java
...OAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
+6
-6
MockTileProvider.java
...LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
+2
-2
TileProvider.java
...tal/LOAndroid3/src/java/org/libreoffice/TileProvider.java
+11
-2
No files found.
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitThread.java
Dosyayı görüntüle @
0ffb877c
...
@@ -229,8 +229,13 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation
...
@@ -229,8 +229,13 @@ public class LOKitThread extends Thread implements TileProvider.TileInvalidation
if
(
mTileProvider
==
null
)
{
if
(
mTileProvider
==
null
)
{
return
;
return
;
}
}
LibreOfficeMainActivity
.
mAppContext
.
showSoftKeyboard
();
if
(
touchType
.
equals
(
"LongPress"
))
{
mTileProvider
.
mouseButtonDown
(
mDocumentTouchCoordinate
);
LibreOfficeMainActivity
.
mAppContext
.
hideSoftKeyboard
();
mTileProvider
.
mouseButtonDown
(
mDocumentTouchCoordinate
,
2
);
}
else
{
// "SingleTap"
LibreOfficeMainActivity
.
mAppContext
.
showSoftKeyboard
();
mTileProvider
.
mouseButtonDown
(
mDocumentTouchCoordinate
,
1
);
}
}
}
private
void
createThumbnail
(
final
ThumbnailCreator
.
ThumbnailCreationTask
task
)
{
private
void
createThumbnail
(
final
ThumbnailCreator
.
ThumbnailCreationTask
task
)
{
...
...
android/experimental/LOAndroid3/src/java/org/libreoffice/LOKitTileProvider.java
Dosyayı görüntüle @
0ffb877c
...
@@ -323,21 +323,21 @@ public class LOKitTileProvider implements TileProvider, Document.MessageCallback
...
@@ -323,21 +323,21 @@ public class LOKitTileProvider implements TileProvider, Document.MessageCallback
mOffice
.
postKeyEvent
(
Office
.
KEY_RELEASE
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
mOffice
.
postKeyEvent
(
Office
.
KEY_RELEASE
,
getCharCode
(
keyEvent
),
getKeyCode
(
keyEvent
));
}
}
private
void
mouseButton
(
int
type
,
PointF
inDocument
)
{
private
void
mouseButton
(
int
type
,
PointF
inDocument
,
int
numberOfClicks
)
{
int
x
=
(
int
)
pixelToTwip
(
inDocument
.
x
,
mDPI
);
int
x
=
(
int
)
pixelToTwip
(
inDocument
.
x
,
mDPI
);
int
y
=
(
int
)
pixelToTwip
(
inDocument
.
y
,
mDPI
);
int
y
=
(
int
)
pixelToTwip
(
inDocument
.
y
,
mDPI
);
mDocument
.
postMouseEvent
(
type
,
x
,
y
,
1
);
mDocument
.
postMouseEvent
(
type
,
x
,
y
,
numberOfClicks
);
}
}
@Override
@Override
public
void
mouseButtonDown
(
PointF
inDocument
)
{
public
void
mouseButtonDown
(
PointF
documentCoordinate
,
int
numberOfClicks
)
{
mouseButton
(
Document
.
MOUSE_BUTTON_DOWN
,
inDocument
);
mouseButton
(
Document
.
MOUSE_BUTTON_DOWN
,
documentCoordinate
,
numberOfClicks
);
}
}
@Override
@Override
public
void
mouseButtonUp
(
PointF
inDocument
)
{
public
void
mouseButtonUp
(
PointF
documentCoordinate
,
int
numberOfClicks
)
{
mouseButton
(
Document
.
MOUSE_BUTTON_UP
,
inDocument
);
mouseButton
(
Document
.
MOUSE_BUTTON_UP
,
documentCoordinate
,
numberOfClicks
);
}
}
@Override
@Override
...
...
android/experimental/LOAndroid3/src/java/org/libreoffice/MockTileProvider.java
Dosyayı görüntüle @
0ffb877c
...
@@ -103,12 +103,12 @@ public class MockTileProvider implements TileProvider {
...
@@ -103,12 +103,12 @@ public class MockTileProvider implements TileProvider {
}
}
@Override
@Override
public
void
mouseButtonDown
(
PointF
inDocument
)
{
public
void
mouseButtonDown
(
PointF
documentCoordinate
,
int
numberOfClicks
)
{
}
}
@Override
@Override
public
void
mouseButtonUp
(
PointF
inDocument
)
{
public
void
mouseButtonUp
(
PointF
documentCoordinate
,
int
numberOfClicks
)
{
}
}
...
...
android/experimental/LOAndroid3/src/java/org/libreoffice/TileProvider.java
Dosyayı görüntüle @
0ffb877c
...
@@ -31,12 +31,14 @@ public interface TileProvider {
...
@@ -31,12 +31,14 @@ public interface TileProvider {
/**
/**
* Change the document part to the one specified by the partIndex input parameter.
* Change the document part to the one specified by the partIndex input parameter.
*
* @param partIndex - part index to change to
* @param partIndex - part index to change to
*/
*/
void
changePart
(
int
partIndex
);
void
changePart
(
int
partIndex
);
/**
/**
* Get the current document part number.
* Get the current document part number.
*
* @return
* @return
*/
*/
int
getCurrentPartNumber
();
int
getCurrentPartNumber
();
...
@@ -68,27 +70,33 @@ public interface TileProvider {
...
@@ -68,27 +70,33 @@ public interface TileProvider {
/**
/**
* Trigger a key press.
* Trigger a key press.
*
* @param keyEvent - contains information about key event
* @param keyEvent - contains information about key event
*/
*/
void
keyPress
(
KeyEvent
keyEvent
);
void
keyPress
(
KeyEvent
keyEvent
);
/**
/**
* Trigger a key release.
* Trigger a key release.
*
* @param keyEvent - contains information about key event
* @param keyEvent - contains information about key event
*/
*/
void
keyRelease
(
KeyEvent
keyEvent
);
void
keyRelease
(
KeyEvent
keyEvent
);
/**
/**
* Trigger a mouse button down event.
* Trigger a mouse button down event.
*
* @param documentCoordinate - coordinate relative to the document where the mouse button should be triggered
* @param documentCoordinate - coordinate relative to the document where the mouse button should be triggered
* @param numberOfClicks - number of clicks (1 - single click, 2 - double click)
*/
*/
void
mouseButtonDown
(
PointF
documentCoordinate
);
void
mouseButtonDown
(
PointF
documentCoordinate
,
int
numberOfClicks
);
/**
/**
* Trigger a mouse button up event.
* Trigger a mouse button up event.
*
* @param documentCoordinate - coordinate relative to the document where the mouse button should be triggered
* @param documentCoordinate - coordinate relative to the document where the mouse button should be triggered
* @param numberOfClicks - number of clicks (1 - single click, 2 - double click)
*/
*/
void
mouseButtonUp
(
PointF
documentCoordinate
);
void
mouseButtonUp
(
PointF
documentCoordinate
,
int
numberOfClicks
);
/**
/**
* Callback to retrieve invalidation calls
* Callback to retrieve invalidation calls
...
@@ -96,6 +104,7 @@ public interface TileProvider {
...
@@ -96,6 +104,7 @@ public interface TileProvider {
public
interface
TileInvalidationCallback
{
public
interface
TileInvalidationCallback
{
/**
/**
* Invoked when a region is invalidated.
* Invoked when a region is invalidated.
*
* @param rect area in pixels which was invalidated and needs to be redrawn
* @param rect area in pixels which was invalidated and needs to be redrawn
*/
*/
void
invalidate
(
RectF
rect
);
void
invalidate
(
RectF
rect
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment