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
f3071b04
Kaydet (Commit)
f3071b04
authored
May 21, 2015
tarafından
Tor Lillqvist
Kaydeden (comit)
Tomaž Vajngerl
Eki 15, 2015
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove more obsolete Android code: The 'AppSupport' stuff
(cherry picked from commit
72a688db
)
üst
e77fb2cc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
216 deletions
+0
-216
AppSupport.java
...oid/Bootstrap/src/org/libreoffice/android/AppSupport.java
+0
-31
sofficemain.cxx
desktop/source/app/sofficemain.cxx
+0
-15
native-code.py
solenv/bin/native-code.py
+0
-9
androidinst.cxx
vcl/android/androidinst.cxx
+0
-161
No files found.
android/Bootstrap/src/org/libreoffice/android/AppSupport.java
deleted
100644 → 0
Dosyayı görüntüle @
e77fb2cc
// -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
//
// This file is part of the LibreOffice project.
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// Native functions that are used by "desktop" approach apps. That means apps
// that have a "real" LibreOffice "main loop" running (headless).
package
org
.
libreoffice
.
android
;
import
android.graphics.Bitmap
;
public
final
class
AppSupport
{
/* In desktop */
public
static
native
void
runMain
();
/* In vcl */
public
static
native
void
renderVCL
(
Bitmap
bitmap
);
public
static
native
void
registerForDamageCallback
(
Class
destinationClass
);
public
static
native
void
setViewSize
(
int
width
,
int
height
);
public
static
native
void
key
(
char
c
);
public
static
native
void
touch
(
int
action
,
int
x
,
int
y
);
public
static
native
void
zoom
(
float
scale
,
int
x
,
int
y
);
public
static
native
void
scroll
(
int
x
,
int
y
);
}
// vim:set shiftwidth=4 softtabstop=4 expandtab:
desktop/source/app/sofficemain.cxx
Dosyayı görüntüle @
f3071b04
...
...
@@ -105,21 +105,6 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
#if defined(ANDROID) || defined(IOS)
#ifdef ANDROID
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_runMain
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
)
{
int
nRet
;
do
{
nRet
=
soffice_main
();
LOGI
(
"soffice_main returned %d"
,
nRet
);
}
while
(
nRet
==
EXITHELPER_NORMAL_RESTART
||
nRet
==
EXITHELPER_CRASH_WITH_RESTART
);
// pretend to re-start.
}
#endif
extern
"C"
void
PtylTestEncryptionAndExport
(
const
char
*
pathname
)
{
OUString
sUri
(
pathname
,
strlen
(
pathname
),
RTL_TEXTENCODING_UTF8
);
...
...
solenv/bin/native-code.py
Dosyayı görüntüle @
f3071b04
...
...
@@ -464,15 +464,6 @@ print ("""
if
options
.
java
:
print
(
"""
// Guard against possible function-level link-time pruning of
// "unused" code. We need to pull these in, too, as they aren't in
// any of the libs we link with -Wl,--whole-archive. Is this necessary?
extern void Java_org_libreoffice_android_AppSupport_runMain();
volatile void *p = (void *) Java_org_libreoffice_android_AppSupport_runMain;
extern void Java_org_libreoffice_android_AppSupport_renderVCL();
p = (void *) Java_org_libreoffice_android_AppSupport_renderVCL;
extern void Java_org_libreoffice_kit_LibreOfficeKit_initializeNative();
p = (void *) Java_org_libreoffice_kit_LibreOfficeKit_initializeNative;
...
...
vcl/android/androidinst.cxx
Dosyayı görüntüle @
f3071b04
...
...
@@ -382,165 +382,4 @@ int AndroidSalSystem::ShowNativeDialog( const OUString& rTitle,
return
0
;
}
// public static native void renderVCL(Bitmap bitmap);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_renderVCL
(
JNIEnv
*
env
,
jobject
/* clazz */
,
jobject
bitmap
)
{
AndroidBitmapInfo
info
;
void
*
pixels
;
int
ret
;
if
((
ret
=
AndroidBitmap_getInfo
(
env
,
bitmap
,
&
info
))
<
0
)
{
LOGI
(
"AndroidBitmap_getInfo() failed ! error=%d"
,
ret
);
return
;
}
if
((
ret
=
AndroidBitmap_lockPixels
(
env
,
bitmap
,
&
pixels
))
<
0
)
{
LOGI
(
"AndroidBitmap_lockPixels() failed ! error=%d"
,
ret
);
}
/*
typedef struct ANativeWindow_Buffer {
// The number of pixels that are show horizontally.
int32_t width;
// The number of pixels that are shown vertically.
int32_t height;
// The number of *pixels* that a line in the buffer takes in
// memory. This may be >= width.
int32_t stride;
// The format of the buffer. One of WINDOW_FORMAT_*
int32_t format;
// The actual bits.
void* bits;
// Do not touch.
uint32_t reserved[6];
} ANativeWindow_Buffer;
*/
ANativeWindow_Buffer
dummyOut
;
// look like a window for now ...
dummyOut
.
width
=
info
.
width
;
dummyOut
.
height
=
info
.
height
;
dummyOut
.
stride
=
info
.
stride
/
4
;
// sigh !
dummyOut
.
format
=
info
.
format
;
dummyOut
.
bits
=
pixels
;
AndroidSalInstance
::
getInstance
()
->
RedrawWindows
(
&
dummyOut
);
AndroidBitmap_unlockPixels
(
env
,
bitmap
);
}
// public static native void registerForDamageCallback(Class destinationClass);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_registerForDamageCallback
(
JNIEnv
*
env
,
jobject
/* clazz */
,
jclass
destinationClass
)
{
appClass
=
(
jclass
)
env
->
NewGlobalRef
(
destinationClass
);
}
// public static native void setViewSize(int width, int height);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_setViewSize
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
,
jint
width
,
jint
height
)
{
// Horrible
viewWidth
=
width
;
viewHeight
=
height
;
}
// public static native void key(char c);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_key
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
,
jchar
c
)
{
SalFrame
*
pFocus
=
AndroidSalInstance
::
getInstance
()
->
getFocusFrame
();
if
(
pFocus
)
{
KeyEvent
aEvent
(
c
,
c
,
0
);
Application
::
PostKeyEvent
(
VCLEVENT_WINDOW_KEYINPUT
,
pFocus
->
GetWindow
(),
&
aEvent
);
Application
::
PostKeyEvent
(
VCLEVENT_WINDOW_KEYUP
,
pFocus
->
GetWindow
(),
&
aEvent
);
}
else
LOGW
(
"No focused frame to emit event on"
);
}
// public static native void touch(int action, int x, int y);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_touch
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
,
jint
action
,
jint
x
,
jint
y
)
{
SalFrame
*
pFocus
=
AndroidSalInstance
::
getInstance
()
->
getFocusFrame
();
if
(
pFocus
)
{
MouseEvent
aEvent
;
sal_uLong
nEvent
;
switch
(
action
)
{
case
AMOTION_EVENT_ACTION_DOWN
:
aEvent
=
MouseEvent
(
Point
(
x
,
y
),
1
,
MouseEventModifiers
::
SIMPLECLICK
,
MOUSE_LEFT
);
nEvent
=
VCLEVENT_WINDOW_MOUSEBUTTONDOWN
;
break
;
case
AMOTION_EVENT_ACTION_UP
:
aEvent
=
MouseEvent
(
Point
(
x
,
y
),
1
,
MouseEventModifiers
::
SIMPLECLICK
,
MOUSE_LEFT
);
nEvent
=
VCLEVENT_WINDOW_MOUSEBUTTONUP
;
break
;
case
AMOTION_EVENT_ACTION_MOVE
:
aEvent
=
MouseEvent
(
Point
(
x
,
y
),
1
,
MouseEventModifiers
::
SIMPLEMOVE
,
MOUSE_LEFT
);
nEvent
=
VCLEVENT_WINDOW_MOUSEMOVE
;
break
;
default
:
LOGE
(
"AppSupport.touch: Invalid action %d"
,
action
);
return
;
}
Application
::
PostMouseEvent
(
nEvent
,
pFocus
->
GetWindow
(),
&
aEvent
);
}
else
LOGW
(
"No focused frame to emit event on"
);
}
// public static native void zoom(float scale, int x, int y);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_zoom
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
,
jfloat
scale
,
jint
x
,
jint
y
)
{
SalFrame
*
pFocus
=
AndroidSalInstance
::
getInstance
()
->
getFocusFrame
();
if
(
pFocus
)
{
SAL_INFO
(
"vcl.androidinst"
,
"zoom: "
<<
scale
<<
"@("
<<
x
<<
","
<<
y
<<
")"
);
ZoomEvent
aEvent
(
Point
(
x
,
y
),
scale
);
Application
::
PostZoomEvent
(
VCLEVENT_WINDOW_ZOOM
,
pFocus
->
GetWindow
(),
&
aEvent
);
}
else
LOGW
(
"No focused frame to emit event on"
);
}
// public static native void scroll(int x, int y);
extern
"C"
SAL_JNI_EXPORT
void
JNICALL
Java_org_libreoffice_android_AppSupport_scroll
(
JNIEnv
*
/* env */
,
jobject
/* clazz */
,
jint
x
,
jint
y
)
{
SalFrame
*
pFocus
=
AndroidSalInstance
::
getInstance
()
->
getFocusFrame
();
if
(
pFocus
)
{
SAL_INFO
(
"vcl.androidinst"
,
"scroll: "
<<
"("
<<
x
<<
","
<<
y
<<
")"
);
ScrollEvent
aEvent
(
x
,
y
);
Application
::
PostScrollEvent
(
VCLEVENT_WINDOW_SCROLL
,
pFocus
->
GetWindow
(),
&
aEvent
);
}
else
LOGW
(
"No focused frame to emit event on"
);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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