2012-01-16 21:26:25 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/*
|
|
|
|
* Version: MPL 1.1 / GPLv3+ / LGPLv3+
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License or as specified alternatively below. You may obtain a copy of
|
|
|
|
* the License at http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* Major Contributor(s):
|
|
|
|
* Copyright (C) 2012 Novell, Inc.
|
|
|
|
* Michael Meeks <michael.meeks@suse.com> (initial developer)
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* For minor contributions see the git repository.
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either the GNU General Public License Version 3 or later (the "GPLv3+"), or
|
|
|
|
* the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
|
|
|
|
* in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
|
|
|
|
* instead of those above.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ANDROID_SALINST_H
|
|
|
|
#define ANDROID_SALINST_H
|
|
|
|
|
2013-03-07 02:17:49 +02:00
|
|
|
#include <jni.h>
|
2012-01-25 21:13:36 +00:00
|
|
|
#include <android/input.h>
|
|
|
|
#include <android/native_window.h>
|
2012-01-16 21:26:25 +00:00
|
|
|
#include <headless/svpinst.hxx>
|
2012-01-25 21:13:36 +00:00
|
|
|
#include <headless/svpframe.hxx>
|
2012-01-16 21:26:25 +00:00
|
|
|
|
2012-02-25 14:13:08 +00:00
|
|
|
class AndroidSalFrame;
|
2012-01-16 21:26:25 +00:00
|
|
|
class AndroidSalInstance : public SvpSalInstance
|
|
|
|
{
|
2012-01-27 14:51:40 +00:00
|
|
|
void BlitFrameToWindow(ANativeWindow_Buffer *pOutBuffer,
|
2012-01-25 21:13:36 +00:00
|
|
|
const basebmp::BitmapDeviceSharedPtr& aDev);
|
2013-03-07 02:17:49 +02:00
|
|
|
|
|
|
|
// 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;
|
|
|
|
|
2012-01-16 21:26:25 +00:00
|
|
|
public:
|
|
|
|
AndroidSalInstance( SalYieldMutex *pMutex );
|
|
|
|
virtual ~AndroidSalInstance();
|
2012-01-25 21:13:36 +00:00
|
|
|
static AndroidSalInstance *getInstance();
|
2012-01-16 21:26:25 +00:00
|
|
|
|
|
|
|
virtual SalSystem* CreateSalSystem();
|
2012-01-24 22:36:25 +00:00
|
|
|
|
2012-12-13 19:33:42 +00:00
|
|
|
// frame management
|
|
|
|
void GetWorkArea( Rectangle& rRect );
|
|
|
|
SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
|
|
|
|
SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
|
|
|
|
|
2012-01-24 22:36:25 +00:00
|
|
|
// mainloop pieces
|
|
|
|
virtual bool AnyInput( sal_uInt16 nType );
|
2012-01-25 21:13:36 +00:00
|
|
|
|
2013-03-17 17:30:33 +02:00
|
|
|
void RedrawWindows(ANativeWindow_Buffer *pBuffer);
|
2012-12-13 19:33:42 +00:00
|
|
|
SalFrame *getFocusFrame() const;
|
|
|
|
|
2013-02-28 22:29:31 +02:00
|
|
|
void damaged(AndroidSalFrame *frame);
|
2012-01-16 21:26:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ANDROID_SALINST_H
|
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|