LibreOffice Module vcl (master) 1
androidinst.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; 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 */
9
10#pragma once
11
12#include <jni.h>
13#include <android/input.h>
14#include <android/log.h>
15#include <android/native_window.h>
16#include <headless/svpinst.hxx>
17#include <headless/svpframe.hxx>
18
19#define LOGTAG "LibreOffice/androidinst"
20#define LOGI(...) ((void)__android_log_print(ANDROID_LOG_INFO, LOGTAG, __VA_ARGS__))
21#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOGTAG, __VA_ARGS__))
22
23class AndroidSalFrame;
25{
26 // This JNIEnv is valid only in the thread where this
27 // AndroidSalInstance object is created, which is the "LO" thread
28 // in which soffice_main() runs
29 JNIEnv* m_pJNIEnv;
30
31public:
32 AndroidSalInstance(std::unique_ptr<SalYieldMutex> pMutex);
35
37
38 // frame management
42
43 // mainloop pieces
44 virtual bool AnyInput(VclInputFlags nType);
45
46 virtual void updateMainThread();
47 virtual void releaseMainThread();
48};
49
50/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual ~AndroidSalInstance()
static AndroidSalInstance * getInstance()
virtual void updateMainThread()
Set the app's (somewhat) magic/main-thread to this one.
virtual SalSystem * CreateSalSystem()
AndroidSalInstance(std::unique_ptr< SalYieldMutex > pMutex)
void GetWorkArea(tools::Rectangle &rRect)
SalFrame * CreateFrame(SalFrame *pParent, SalFrameStyleFlags nStyle)
SalFrame * CreateChildFrame(SystemParentData *pParent, SalFrameStyleFlags nStyle)
virtual bool AnyInput(VclInputFlags nType)
virtual void releaseMainThread()
Disconnect that - good for detaching from the JavaVM on Android.
A SalFrame is a system window (e.g. an X11 window).
Definition: salframe.hxx:115
VclInputFlags
Definition: inputtypes.hxx:25
SalFrameStyleFlags
Definition: salframe.hxx:65