From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- vcl/inc/android/androidinst.hxx | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 vcl/inc/android/androidinst.hxx (limited to 'vcl/inc/android/androidinst.hxx') diff --git a/vcl/inc/android/androidinst.hxx b/vcl/inc/android/androidinst.hxx new file mode 100644 index 0000000000..58ebdbb253 --- /dev/null +++ b/vcl/inc/android/androidinst.hxx @@ -0,0 +1,50 @@ +/* -*- 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/. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include + +#define LOGTAG "LibreOffice/androidinst" +#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__)) +#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__)) + +class AndroidSalFrame; +class AndroidSalInstance : public SvpSalInstance +{ + // This JNIEnv is valid only in the thread where this + // AndroidSalInstance object is created, which is the "LO" thread + // in which soffice_main() runs + JNIEnv* m_pJNIEnv; + +public: + AndroidSalInstance(std::unique_ptr pMutex); + virtual ~AndroidSalInstance(); + static AndroidSalInstance* getInstance(); + + virtual SalSystem* CreateSalSystem(); + + // frame management + void GetWorkArea(AbsoluteScreenPixelRectangle& rRect); + SalFrame* CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle); + SalFrame* CreateChildFrame(SystemParentData* pParent, SalFrameStyleFlags nStyle); + + // mainloop pieces + virtual bool AnyInput(VclInputFlags nType); + + virtual void updateMainThread(); + virtual void releaseMainThread(); +}; + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3