[Libreoffice-commits] .: 2 commits - toolkit/Library_tk.mk toolkit/source vcl/workben

Tor Lillqvist tml at kemper.freedesktop.org
Thu Jul 21 04:43:54 PDT 2011


 toolkit/Library_tk.mk                            |    5 +++++
 toolkit/source/awt/vclxsystemdependentwindow.cxx |   11 +++++++++++
 toolkit/source/awt/vclxtoolkit.cxx               |   11 +++++++++++
 toolkit/source/awt/vclxtopwindow.cxx             |   11 +++++++++++
 toolkit/source/awt/vclxwindow1.cxx               |    6 ++++++
 vcl/workben/makefile.mk                          |    4 ++++
 vcl/workben/svdem.cxx                            |    2 +-
 vcl/workben/vcldemo.cxx                          |    2 +-
 8 files changed, 50 insertions(+), 2 deletions(-)

New commits:
commit b2ed20a4ec2bea58b43bb3151b0b8c8af52cf3ff
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 18 20:30:24 2011 +0300

    Start at trying to build these test programs for iOS

diff --git a/vcl/workben/makefile.mk b/vcl/workben/makefile.mk
index d527375..810b1fb 100644
--- a/vcl/workben/makefile.mk
+++ b/vcl/workben/makefile.mk
@@ -49,6 +49,10 @@ OBJFILES= \
 
 # --- Targets ------------------------------------------------------
 
+.IF "$(OS)" == "IOS"
+CFLAGS += -x objective-c++ -fobjc-abi-version=2 -fobjc-legacy-dispatch -D__IPHONE_OS_VERSION_MIN_REQUIRED=40300
+.ENDIF
+
 # svdem
 
 APP1NOSAL=		TRUE
diff --git a/vcl/workben/svdem.cxx b/vcl/workben/svdem.cxx
index d7fa9d5..82c3d53 100644
--- a/vcl/workben/svdem.cxx
+++ b/vcl/workben/svdem.cxx
@@ -51,7 +51,7 @@ void Main();
 
 // -----------------------------------------------------------------------
 
-SAL_IMPLEMENT_MAIN()
+SAL_IMPLEMENT_MAIN_WITH_GUI()
 {
     tools::extendApplicationEnvironment();
 
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index e8c5786..29f4f51 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -56,7 +56,7 @@ void Main();
 
 // -----------------------------------------------------------------------
 
-SAL_IMPLEMENT_MAIN()
+SAL_IMPLEMENT_MAIN_WITH_GUI()
 {
     tools::extendApplicationEnvironment();
 
commit 06ce0bd40439ea077cc1df508e1ce5a18d98125e
Author: Tor Lillqvist <tml at iki.fi>
Date:   Fri Jul 15 01:40:22 2011 +0300

    Make this compile for iOS
    
    I said compile, not work.

diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk
index 84c05eb..e07878f 100644
--- a/toolkit/Library_tk.mk
+++ b/toolkit/Library_tk.mk
@@ -167,6 +167,11 @@ $(eval $(call gb_Library_set_cxxflags,tk,\
     $$(CXXFLAGS) $(gb_OBJCXXFLAGS)))
 endif
 
+ifeq ($(GUIBASE),cocoatouch)
+$(eval $(call gb_Library_set_cxxflags,tk,\
+    $$(CXXFLAGS) $(gb_OBJCXXFLAGS)))
+endif
+
 ifneq (,$(filter LINUX DRAGONFLY OPENBSD FREEBSD NETBSD, $(OS)))
 $(eval $(call gb_Library_add_linked_libs,tk,\
     X11 \
diff --git a/toolkit/source/awt/vclxsystemdependentwindow.cxx b/toolkit/source/awt/vclxsystemdependentwindow.cxx
index 5213ada..22da2a1 100644
--- a/toolkit/source/awt/vclxsystemdependentwindow.cxx
+++ b/toolkit/source/awt/vclxsystemdependentwindow.cxx
@@ -46,6 +46,12 @@
 #include "postmac.h"
 #endif
 
+#ifdef IOS
+#include "premac.h"
+#include <UIKit/UIKit.h>
+#include "postmac.h"
+#endif
+
 #include <vcl/svapp.hxx>
 #include <vcl/syschild.hxx>
 #include <vcl/sysdata.hxx>
@@ -97,6 +103,11 @@ IMPL_XTYPEPROVIDER_END
             {
                  aRet <<= (sal_IntPtr)pSysData->pView;
             }
+#elif (defined IOS)
+            if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_IOS )
+            {
+                 aRet <<= (sal_IntPtr)pSysData->pView;
+            }
 #elif (defined UNX)
             if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW )
             {
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index ccc1cb1..1e8d9d5 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -64,6 +64,13 @@
 #include <Cocoa/Cocoa.h>
 #include "postmac.h"
 #endif
+
+#ifdef IOS
+#include "premac.h"
+#include <UIKit/UIKit.h>
+#include "postmac.h"
+#endif
+
 #include <vcl/sysdata.hxx>
 
 #include <toolkit/awt/vclxwindows.hxx>
@@ -982,6 +989,8 @@ Window*	VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
                                     aParentData.nSize	= sizeof( aParentData );
                                     #if defined QUARTZ
                                     aParentData.pView	= reinterpret_cast<NSView*>(nWindowHandle);
+                                    #elif defined IOS
+                                    aParentData.pView	= reinterpret_cast<UIView*>(nWindowHandle);
                                     #elif defined UNX
                                     aParentData.aWindow = nWindowHandle;
                                     aParentData.bXEmbedSupport = bXEmbed;
@@ -1206,6 +1215,8 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
             aParentData.nSize	= sizeof( aParentData );
             #if defined QUARTZ
             aParentData.pView	= reinterpret_cast<NSView*>(nWindowHandle);
+            #elif defined IOS
+            aParentData.pView	= reinterpret_cast<UIView*>(nWindowHandle);
             #elif defined UNX
             aParentData.aWindow = nWindowHandle;
             aParentData.bXEmbedSupport = bXEmbed;
diff --git a/toolkit/source/awt/vclxtopwindow.cxx b/toolkit/source/awt/vclxtopwindow.cxx
index d2be4c5..04407bb 100644
--- a/toolkit/source/awt/vclxtopwindow.cxx
+++ b/toolkit/source/awt/vclxtopwindow.cxx
@@ -37,6 +37,12 @@
 #include "postmac.h"
 #endif
 
+#if defined ( IOS )
+#include "premac.h"
+#include <UIKit/UIKit.h>
+#include "postmac.h"
+#endif
+
 #include <vcl/syschild.hxx>
 #include <vcl/sysdata.hxx>
 #include <cppuhelper/typeprovider.hxx>
@@ -109,6 +115,11 @@ Sequence< Type > VCLXTopWindow_Base::getTypes() throw(RuntimeException)
             {
                  aRet <<= (sal_IntPtr)pSysData->pView;
             }
+#elif (defined IOS)
+            if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_IOS )
+            {
+                 aRet <<= (sal_IntPtr)pSysData->pView;
+            }
 #elif (defined UNX)
             if( SystemType == ::com::sun::star::lang::SystemDependent::SYSTEM_XWINDOW )
             {
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index 00fef50..a8056bb 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -43,6 +43,10 @@
 #include "premac.h"
 #include <Cocoa/Cocoa.h>
 #include "postmac.h"
+#elif defined ( IOS )
+#include "premac.h"
+#include <UIKit/UIKit.h>
+#include "postmac.h"
 #endif
 #include <vcl/sysdata.hxx>
 
@@ -96,6 +100,8 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle )
     aSysParentData.hWnd = (HWND) nHandle;
 #elif defined( QUARTZ )
     aSysParentData.pView = reinterpret_cast<NSView*>(nHandle);
+#elif defined( IOS )
+    aSysParentData.pView = reinterpret_cast<UIView*>(nHandle);
 #elif defined( UNX )
     aSysParentData.aWindow = (long)nHandle;
     aSysParentData.bXEmbedSupport = bXEmbed;


More information about the Libreoffice-commits mailing list