Kaydet (Commit) a2e4be6d authored tarafından Tor Lillqvist's avatar Tor Lillqvist

The touch module, ByteBufferWrapper, and the libotouch library can go away now

Change-Id: I6f4a6679c263ac81d1cf5c66f18782e857da5ff8
üst a6467341
...@@ -201,7 +201,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \ ...@@ -201,7 +201,6 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE, \
$(if $(filter $(OS),ANDROID), \ $(if $(filter $(OS),ANDROID), \
lo-bootstrap \ lo-bootstrap \
) \ ) \
libotouch \
)) ))
endif endif
......
...@@ -137,7 +137,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ ...@@ -137,7 +137,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
testtools \ testtools \
toolkit \ toolkit \
tools \ tools \
touch \
tubes \ tubes \
ucb \ ucb \
ucbhelper \ ucbhelper \
......
/* -*- Mode: C++; 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/.
*/
#ifndef INCLUDED_SAL_BYTEBUFFERWRAPPER_HXX
#define INCLUDED_SAL_BYTEBUFFERWRAPPER_HXX
#ifdef ANDROID
#include <jni.h>
#include <sal/types.h>
namespace org { namespace libreoffice { namespace touch {
class ByteBufferWrapper
{
private:
jobject object;
public:
ByteBufferWrapper(JNIEnv *env, jobject o);
sal_uInt8* pointer();
void operator()(sal_uInt8 *p);
};
}; }; };
#endif
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -151,7 +151,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_headers,$(SDKDIRNAME)/include,\ ...@@ -151,7 +151,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_headers,$(SDKDIRNAME)/include,\
rtl/ustring.h \ rtl/ustring.h \
rtl/ustring.hxx \ rtl/ustring.hxx \
rtl/uuid.h \ rtl/uuid.h \
sal/ByteBufferWrapper.hxx \
sal/alloca.h \ sal/alloca.h \
sal/config.h \ sal/config.h \
sal/detail/log.h \ sal/detail/log.h \
......
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
$(eval $(call gb_Library_Library,libotouch))
$(eval $(call gb_Library_use_sdk_api,libotouch))
$(eval $(call gb_Library_add_exception_objects,libotouch,\
touch/source/generic/libotouch \
))
ifeq ($(OS),ANDROID)
$(eval $(call gb_Library_use_libraries,libotouch,\
lo-bootstrap \
))
$(eval $(call gb_Library_add_exception_objects,libotouch,\
touch/source/android/android \
))
endif
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
$(eval $(call gb_Module_Module,touch))
ifneq (,$(filter IOS ANDROID,$(OS)))
$(eval $(call gb_Module_add_targets,touch,\
Library_libotouch \
))
endif
$(eval $(call gb_Module_add_targets,touch,\
))
# vim: set noet sw=4 ts=4:
Library that provides API used by LO-based apps on touch devices
This is all very much a work in progress and the design can change
radically at any moment. And actually at the moment it is unclear
whether this will be used or not.
The name "touch" for this module and the library name "libotouch" are
not fixed and might change if somebody comes up with niftier names.
This module will contain an UNO API to be called either from Java (for
Android), or directly (iOS). (Or, on iOS, possibly through some thin
Objective-C layer to hide the UNO.)
The API will provide a mechanism to render "tiles" of a document at some
requested zoom level. Initially for viewer style apps, but the work should
ideally be open-ended to potentially be a base for editing apps, too.
For starters, concentrating on text ("Writer") documents as they are
easiest. With spreadsheets come the added complexity of the cell grid being
potentially unbounded and no clear "page" area. With presentations come the
animation complications, and possibly LO-based viewer apps for presentations
will be done in a totally different fashion.
/* -*- Mode: C++; 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/.
*/
#include <jni.h>
#include <sal/ByteBufferWrapper.hxx>
#include <osl/detail/android-bootstrap.h>
using org::libreoffice::touch::ByteBufferWrapper;
static JNIEnv *get_env()
{
JavaVMAttachArgs args = {
JNI_VERSION_1_2,
NULL,
NULL
};
JavaVM *jvm = lo_get_javavm();
JNIEnv *env = NULL;
jvm->AttachCurrentThread(&env, &args);
return env;
}
__attribute__ ((visibility("default")))
ByteBufferWrapper::ByteBufferWrapper(JNIEnv *env, jobject o)
{
object = env->NewGlobalRef(o);
}
__attribute__ ((visibility("default")))
sal_uInt8* ByteBufferWrapper::pointer()
{
return (sal_uInt8 *) get_env()->GetDirectBufferAddress(object);
}
__attribute__ ((visibility("default")))
void ByteBufferWrapper::operator()(sal_uInt8 * /* p */)
{
get_env()->DeleteGlobalRef(object);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* -*- Mode: C++; 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/.
*/
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment