summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-20 09:07:52 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-21 13:28:32 +0200
commit63dcca42cebd3cb6f020ec75c0d225e1d7232e1c (patch)
treef1b1442af9d7f6f4736ca9621389f6fcc78179e8 /sal
parent27388c9483b5e00b593ac126092c5bbb131492b0 (diff)
Re-work the vcl aspects of the iOS port
Don't try to use similar code as for OS X to manage windows, events etc. I.e. don't use UIKit in vcl to do that. Instead, just do as in the Android port, use the "headless" vcl backend. Do keep using CoreText, though, not FreeType & fontconfig. Start changing the iOS "Viewer" app to correspond to the Android "desktop" app (so it should be renamed). Work in progress since a long time, several crucial details still missing, but committing for now. Change-Id: Iac5fbf8def415e4d0d21e5200450a373420ad7ee
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/osl/detail/ios-bootstrap.h54
-rw-r--r--sal/osl/unx/security.c4
2 files changed, 32 insertions, 26 deletions
diff --git a/sal/inc/osl/detail/ios-bootstrap.h b/sal/inc/osl/detail/ios-bootstrap.h
index 5e4ced7934a0..d5fd9471cbf7 100644
--- a/sal/inc/osl/detail/ios-bootstrap.h
+++ b/sal/inc/osl/detail/ios-bootstrap.h
@@ -1,30 +1,10 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
- * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ * This file is part of the LibreOffice project.
*
- * 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) 2011 Tor Lillqvist <tml@iki.fi> (initial developer)
- * Copyright (C) 2011 SUSE Linux http://suse.com (initial developer's employer)
- *
- * 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.
+ * 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 IOS_BOOSTRAP_H
@@ -38,6 +18,32 @@ extern "C" {
#include <osl/detail/component-mapping.h>
+/* These functions are the interface between the upper GUI layers of a
+ * LibreOffice-based iOS app and the lower "core" layers, used in cases
+ * where the core parts need to call functions in the upper parts or
+ * vice versa.
+ *
+ * Thus there are two classes of functions here:
+ *
+ * 1) Those to be implemented in the upper layer and called by the
+ * lower layer
+ *
+ * 2) Those implmented in the lower layers to be called by the upper
+ * layer, in cases where we don't want to include a bunch of the
+ * "normal" LibreOffice C++ headers in an otherwise purely Objective-C
+ * CocoaTouch-based source file. Of course it depends on the case
+ * where that is wanted, and this all is work in progress.
+ */
+
+/* 1) */
+
+void lo_damaged();
+
+/* 2) */
+
+void lo_runMain();
+void lo_render_windows(char *pixelBuffer, int width, int height);
+
#ifdef __cplusplus
}
#endif
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c
index 7cb3fc08f864..82f97a95e6fc 100644
--- a/sal/osl/unx/security.c
+++ b/sal/osl/unx/security.c
@@ -389,7 +389,7 @@ sal_Bool SAL_CALL osl_getConfigDir(oslSecurity Security, rtl_uString **pustrDire
return bRet;
}
-#ifndef MACOSX
+#if !defined(MACOSX) && !defined(IOS)
#define DOT_CONFIG "/.config"
@@ -431,7 +431,7 @@ static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* ps
* support for Objective-C in the build environment
*/
-#define MACOSX_CONFIG_DIR "/Library/Application Support"
+#define MACOSX_CONFIG_DIR "/Library/Application Support" /* Used on iOS, too */
static sal_Bool SAL_CALL osl_psz_getConfigDir(oslSecurity Security, sal_Char* pszDirectory, sal_uInt32 nMax)
{
if( osl_psz_getHomeDir(Security, pszDirectory, nMax - sizeof(MACOSX_CONFIG_DIR) + 1) )