summaryrefslogtreecommitdiffstats
path: root/vcl/inc
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 /vcl/inc
parentdo not pass -isystem to winres (diff)
downloadcore-63dcca42cebd3cb6f020ec75c0d225e1d7232e1c.tar.gz
core-63dcca42cebd3cb6f020ec75c0d225e1d7232e1c.zip
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 'vcl/inc')
-rw-r--r--vcl/inc/aqua/atsui/salgdi.h2
-rw-r--r--vcl/inc/aqua/salinst.h5
-rw-r--r--vcl/inc/coretext/salcoretextfontutils.hxx1
-rw-r--r--vcl/inc/coretext/salcoretextstyle.hxx6
-rw-r--r--vcl/inc/coretext/salgdi.h46
-rw-r--r--vcl/inc/headless/svpgdi.hxx29
-rw-r--r--vcl/inc/ios/iosinst.hxx60
-rw-r--r--vcl/inc/ios/saldata.hxx100
-rw-r--r--vcl/inc/ios/salframe.h206
-rw-r--r--vcl/inc/ios/salframeview.h60
-rw-r--r--vcl/inc/ios/salgdicommon.hxx79
-rw-r--r--vcl/inc/ios/salinst.h172
-rw-r--r--vcl/inc/ios/salmathutils.hxx81
-rw-r--r--vcl/inc/ios/salmenu.h44
-rw-r--r--vcl/inc/ios/salnstimer.h34
-rw-r--r--vcl/inc/ios/salobj.h72
-rw-r--r--vcl/inc/ios/salprn.h164
-rw-r--r--vcl/inc/ios/salsys.h45
-rw-r--r--vcl/inc/ios/saluimenu.h53
-rw-r--r--vcl/inc/ios/salvd.h67
-rw-r--r--vcl/inc/ios/vcluiapp.h43
-rw-r--r--vcl/inc/quartz/salbmp.h2
-rw-r--r--vcl/inc/quartz/salgdicommon.hxx (renamed from vcl/inc/aqua/salgdicommon.hxx)8
-rw-r--r--vcl/inc/quartz/utils.h (renamed from vcl/inc/ios/saltimer.h)32
-rw-r--r--vcl/inc/saldatabasic.hxx9
-rw-r--r--vcl/inc/vcl/sysdata.hxx10
26 files changed, 126 insertions, 1304 deletions
diff --git a/vcl/inc/aqua/atsui/salgdi.h b/vcl/inc/aqua/atsui/salgdi.h
index ddda552cd979..2faf8462fe1a 100644
--- a/vcl/inc/aqua/atsui/salgdi.h
+++ b/vcl/inc/aqua/atsui/salgdi.h
@@ -35,7 +35,7 @@
#include "aqua/salframe.h"
#include "salgdi.hxx"
-#include "aqua/salgdicommon.hxx"
+#include "quartz/salgdicommon.hxx"
class AquaSalFrame;
class ImplDevFontAttributes;
diff --git a/vcl/inc/aqua/salinst.h b/vcl/inc/aqua/salinst.h
index a295e066df2b..7498d57ee7cb 100644
--- a/vcl/inc/aqua/salinst.h
+++ b/vcl/inc/aqua/salinst.h
@@ -167,11 +167,6 @@ class YieldMutexReleaser
~YieldMutexReleaser();
};
-rtl::OUString GetOUString( CFStringRef );
-rtl::OUString GetOUString( NSString* );
-CFStringRef CreateCFString( const rtl::OUString& );
-NSString* CreateNSString( const rtl::OUString& );
-
CGImageRef CreateCGImage( const Image& );
NSImage* CreateNSImage( const Image& );
diff --git a/vcl/inc/coretext/salcoretextfontutils.hxx b/vcl/inc/coretext/salcoretextfontutils.hxx
index 00c61aa14e1d..bfd3d7643112 100644
--- a/vcl/inc/coretext/salcoretextfontutils.hxx
+++ b/vcl/inc/coretext/salcoretextfontutils.hxx
@@ -24,6 +24,7 @@
#include <vcl/fontcapabilities.hxx>
+#include "coretext/common.h"
#include "outfont.hxx"
#include "impfont.hxx"
diff --git a/vcl/inc/coretext/salcoretextstyle.hxx b/vcl/inc/coretext/salcoretextstyle.hxx
index 245e08f42db1..f05d6d5f0eb8 100644
--- a/vcl/inc/coretext/salcoretextstyle.hxx
+++ b/vcl/inc/coretext/salcoretextstyle.hxx
@@ -20,11 +20,7 @@
#ifndef _VCL_CORETEXT_SALCORETEXTSTYLE_HXX
#define _VCL_CORETEXT_SALCORETEXTSTYLE_HXX
-#ifdef MACOSX
-#include "aqua/salgdicommon.hxx"
-#else // IOS
-#include "ios/salgdicommon.hxx"
-#endif
+#include "quartz/salgdicommon.hxx"
#include "coretext/salcoretextfontutils.hxx"
#include "outfont.hxx"
diff --git a/vcl/inc/coretext/salgdi.h b/vcl/inc/coretext/salgdi.h
index c93894aae1ba..4ca5eb638a67 100644
--- a/vcl/inc/coretext/salgdi.h
+++ b/vcl/inc/coretext/salgdi.h
@@ -20,27 +20,20 @@
#ifndef _VCL_CORETEXT_SALGDI_H
#define _VCL_CORETEXT_SALGDI_H
-#ifdef MACOSX
+#ifndef MACOSX
+#error This file should be included only for OS X
+#endif
+
#include "premac.h"
#include <ApplicationServices/ApplicationServices.h>
#include "postmac.h"
-#endif
-#ifdef MACOSX
#include "aqua/aquavcltypes.h"
-#else
-#include "ios/iosvcltypes.h"
-#endif
#include "coretext/salcoretextfontutils.hxx"
-#ifdef MACOSX
#include "aqua/salframe.h"
-#include "aqua/salgdicommon.hxx"
-#else
-#include "ios/salframe.h"
-#include "ios/salgdicommon.hxx"
-#endif
+#include "quartz/salgdicommon.hxx"
#include "salgdi.hxx"
@@ -50,19 +43,13 @@ class CoreTextStyleInfo;
// - QuartzSalGraphics -
// -------------------
-#ifdef MACOSX
#define QuartzSalGraphics AquaSalGraphics
-#endif
class QuartzSalGraphics : public SalGraphics
{
friend class CoreTextLayout;
protected:
-#ifdef MACOSX
AquaSalFrame* mpFrame;
-#else
- IosSalFrame* mpFrame;
-#endif
CGLayerRef mxLayer; //< Quartz graphics layer
CGContextRef mrContext; //< Quartz drawing context
class XorEmulation* mpXorEmulation;
@@ -93,9 +80,7 @@ protected:
bool mbVirDev; //< is this a virtual device graphics
bool mbWindow; //< is this a window graphics
-#ifdef MACOSX
RGBColor m_TextColor;
-#endif
public:
QuartzSalGraphics();
@@ -104,17 +89,10 @@ public:
bool IsPenVisible() const { return maLineColor.IsVisible(); }
bool IsBrushVisible() const { return maFillColor.IsVisible(); }
-#ifdef MACOSX
void SetWindowGraphics( AquaSalFrame* pFrame );
AquaSalFrame* getGraphicsFrame() const { return mpFrame; }
void setGraphicsFrame( AquaSalFrame* pFrame ) { mpFrame = pFrame; }
void initResolution( NSWindow* );
-#else
- void SetWindowGraphics( IosSalFrame* pFrame );
- IosSalFrame* getGraphicsFrame() const { return mpFrame; }
- void setGraphicsFrame( IosSalFrame* pFrame ) { mpFrame = pFrame; }
- void initResolution( UIWindow* );
-#endif
void SetPrinterGraphics( CGContextRef, long nRealDPIX, long nRealDPIY, double fFakeScale );
void SetVirDevGraphics( CGLayerRef, CGContextRef, int nBitDepth = 0 );
@@ -129,19 +107,13 @@ public:
bool CheckContext();
CGContextRef GetContext();
-#ifdef MACOSX
void UpdateWindow( NSRect& ); // delivered in NSView coordinates
-#else
- void UpdateWindow( CGRect& ); // delivered in UIView coordinates
-#endif
-#if (defined(MACOSX) && !defined(__LP64__) && !defined(NS_BUILD_32_LIKE_64)) || defined(IOS)
+#if !defined(__LP64__) && !defined(NS_BUILD_32_LIKE_64)
void RefreshRect( const CGRect& );
#endif
-#ifdef MACOSX
void RefreshRect( const NSRect& );
-#endif
void RefreshRect(float lX, float lY, float lWidth, float lHeight);
void SetState();
@@ -342,7 +314,7 @@ private:
bool* pJustCFF );
};
-#if (defined(MACOSX) && !defined(__LP64__) && !defined(NS_BUILD_32_LIKE_64)) || defined(IOS)
+#if !defined(__LP64__) && !defined(NS_BUILD_32_LIKE_64)
inline void QuartzSalGraphics::RefreshRect( const CGRect& rRect )
{
@@ -351,15 +323,11 @@ inline void QuartzSalGraphics::RefreshRect( const CGRect& rRect )
#endif
-#ifdef MACOSX
-
inline void QuartzSalGraphics::RefreshRect( const NSRect& rRect )
{
RefreshRect( rRect.origin.x, rRect.origin.y, rRect.size.width, rRect.size.height );
}
-#endif
-
#endif /* _VCL_CORETEXT_SALGDI_H */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index fbceb7df141c..ad544df1f12a 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -23,11 +23,19 @@
#include <basebmp/bitmapdevice.hxx>
#include <basebmp/color.hxx>
-#include <salgdi.hxx>
-#include <sallayout.hxx>
+#include "salgdi.hxx"
+#include "sallayout.hxx"
+
+#ifdef IOS
+#include "coretext/salcoretextstyle.hxx"
+#endif
class ServerFont;
+#ifdef IOS
+#define QuartzSalGraphics SvpSalGraphics
+#endif
+
class SvpSalGraphics : public SalGraphics
{
basebmp::BitmapDeviceSharedPtr m_aDevice;
@@ -49,6 +57,7 @@ class SvpSalGraphics : public SalGraphics
protected:
Region m_aClipRegion;
basegfx::B2IVector GetSize() { return m_aOrigDevice->getSize(); }
+
private:
bool m_bClipSetup;
struct ClipUndoHandle {
@@ -61,6 +70,16 @@ private:
void ensureClip();
protected:
+
+#ifdef IOS
+ friend class CoreTextLayout;
+
+ CGContextRef mrContext;
+ CoreTextStyleInfo* m_style;
+ double mfFakeDPIScale;
+ bool mbNonAntialiasedText;
+#endif
+
virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, const SalBitmap& rAlphaBitmap );
virtual bool drawAlphaRect( long nX, long nY, long nWidth, long nHeight, sal_uInt8 nTransparency );
@@ -71,7 +90,6 @@ public:
const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
void setDevice( basebmp::BitmapDeviceSharedPtr& rDevice );
- // overload all pure virtual methods
virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
virtual sal_uInt16 GetBitCount() const;
virtual long GetGraphicsWidth() const;
@@ -178,6 +196,11 @@ public:
virtual SystemGraphicsData GetGraphicsData() const;
virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
+
+#ifdef IOS
+ bool CheckContext();
+ CGContextRef GetContext();
+#endif
};
#endif
diff --git a/vcl/inc/ios/iosinst.hxx b/vcl/inc/ios/iosinst.hxx
new file mode 100644
index 000000000000..0884ff1e1976
--- /dev/null
+++ b/vcl/inc/ios/iosinst.hxx
@@ -0,0 +1,60 @@
+/* -*- 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef IOS_SALINST_H
+#define IOS_SALINST_H
+
+#include "headless/svpinst.hxx"
+#include "headless/svpframe.hxx"
+
+class IosSalFrame;
+class IosSalInstance : public SvpSalInstance
+{
+ void BlitFrameToBuffer(char *pPixelBuffer,
+ int nPBWidth, int nPBHeight,
+ int destX, int nDestY,
+ int nDestWidth, int nDestHeight,
+ const basebmp::BitmapDeviceSharedPtr& aDev);
+
+public:
+ IosSalInstance( SalYieldMutex *pMutex );
+ virtual ~IosSalInstance();
+ static IosSalInstance *getInstance();
+
+ virtual SalSystem* CreateSalSystem();
+
+ void GetWorkArea( Rectangle& rRect );
+ SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+ SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+
+ virtual bool AnyInput( sal_uInt16 nType );
+
+ SalFrame *getFocusFrame() const;
+
+ void RedrawWindows(char *pPixelBuffer,
+ int nPBWidth, int nPBHeight,
+ int destX, int nDestY,
+ int nDestWidth, int nDestHeight);
+
+ void damaged(IosSalFrame *frame);
+};
+
+#endif // IOS_SALINST_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/saldata.hxx b/vcl/inc/ios/saldata.hxx
deleted file mode 100644
index 8163a6d2f510..000000000000
--- a/vcl/inc/ios/saldata.hxx
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALDATA_HXX
-#define _SV_SALDATA_HXX
-
-#include "premac.h"
-#include <UIKit/UIKit.h>
-#include "postmac.h"
-
-#include "com/sun/star/uno/Reference.hxx"
-
-#include "vcl/ptrstyle.hxx"
-
-#include "svdata.hxx"
-#include "salwtype.hxx"
-
-#include <list>
-#include <vector>
-#include <map>
-#include <boost/unordered_set.hpp>
-
-#include <cstdio>
-#include <cstdarg>
-
-class IosSalInstance;
-class SalObject;
-class SalFrame;
-class SalVirtualDevice;
-class SalPrinter;
-class SystemFontList;
-
-#define SAL_CLIPRECT_COUNT 16
-
-class IosSalFrame;
-struct FrameHash : public boost::hash<sal_IntPtr>
-{
- size_t operator()(const IosSalFrame* frame) const
- { return boost::hash<sal_IntPtr>::operator()( reinterpret_cast<const sal_IntPtr>(frame) ); }
-};
-
-class SalData
-{
-public:
- SALTIMERPROC mpTimerProc; // timer callback proc
- IosSalInstance *mpFirstInstance; // pointer of first instance
- std::list<IosSalFrame*> maFrames; // pointer of first frame
- boost::unordered_set<const IosSalFrame*,FrameHash> maFrameCheck; // for fast check of frame existance
- SalObject *mpFirstObject; // pointer of first object window
- SalVirtualDevice *mpFirstVD; // first VirDev
- SalPrinter *mpFirstPrinter; // first printing printer
- SystemFontList *mpFontList;
-
- CGColorSpaceRef mxRGBSpace;
- CGColorSpaceRef mxGraySpace;
- CGColorSpaceRef mxP50Space;
- CGPatternRef mxP50Pattern;
-
- std::vector< UIMenuItem* > maFallbackMenu;
-
- static oslThreadKey s_aAutoReleaseKey;
-
- long mnDPIX; // #i100617# read DPI only once per office life
- long mnDPIY; // #i100617# read DPI only once per office life
-
- com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
- mxClipboard;
-
- SalData();
- ~SalData();
-
- static void ensureThreadAutoreleasePool();
-};
-
-inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = pData; }
-inline SalData *GetSalData() { return ImplGetSVData()->mpSalData; }
-
-sal_Bool ImplSalYieldMutexTryToAcquire();
-void ImplSalYieldMutexAcquire();
-void ImplSalYieldMutexRelease();
-
-#endif // _SV_SALDATA_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salframe.h b/vcl/inc/ios/salframe.h
deleted file mode 100644
index 9ca4fe72f4ed..000000000000
--- a/vcl/inc/ios/salframe.h
+++ /dev/null
@@ -1,206 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALFRAME_H
-#define _SV_SALFRAME_H
-
-#include "vcl/sysdata.hxx"
-
-#include "ios/salmenu.h"
-#include "ios/saldata.hxx"
-#include "ios/iosvcltypes.h"
-
-#include "salframe.hxx"
-
-#include <vector>
-#include <utility>
-#include <stdexcept>
-
-#include <boost/shared_ptr.hpp>
-
-class QuartzSalGraphics;
-class IosSalFrame;
-class IosSalTimer;
-class IosSalInstance;
-class IosSalMenu;
-class IosBlinker;
-
-typedef struct SalFrame::SalPointerState SalPointerState;
-
-// ----------------
-// - IosSalFrame -
-// ----------------
-
-class IosSalFrame : public SalFrame
-{
-public:
- UIWindow* mpWindow;
- UIView* mpView;
- CGRect maScreenRect; // for mirroring purposes
- QuartzSalGraphics* mpGraphics;
- IosSalFrame* mpParent;
- SystemEnvData maSysData;
- int mnMinWidth; // min. client width in pixels
- int mnMinHeight; // min. client height in pixels
- int mnMaxWidth; // max. client width in pixels
- int mnMaxHeight; // max. client height in pixels
- CGRect maFullScreenRect; // old window size when in FullScreen
- bool mbGraphics:1; // is Graphics used?
- bool mbShown:1;
- bool mbInitShow:1;
- bool mbPositioned:1;
- bool mbSized:1;
- bool mbPresentation:1;
-
- sal_uLong mnStyle;
- unsigned int mnStyleMask; // our style mask from UIWindow creation
-
- sal_uLong mnLastEventTime;
- unsigned int mnLastModifierFlags;
- IosSalMenu* mpMenu;
-
- SalExtStyle mnExtStyle; // currently document frames are marked this way
-
- PointerStyle mePointerStyle; // currently active pointer style
-
- CGMutablePathRef mrClippingPath; // used for "shaping"
- std::vector< CGRect > maClippingRects;
-
- std::list<IosBlinker*> maBlinkers;
-
- Rectangle maInvalidRect;
-
- sal_uLong mnICOptions;
-
- boost::shared_ptr< Timer > mpActivityTimer; // Timer to prevent system sleep during presentation
-public:
- /** Constructor
-
- Creates a system window and connects this frame with it.
-
- @throws std::runtime_error in case window creation fails
- */
- IosSalFrame( SalFrame* pParent, sal_uLong salFrameStyle );
-
- virtual ~IosSalFrame();
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual sal_Bool PostEvent( void* pData );
- virtual void SetTitle( const rtl::OUString& rTitle );
- virtual void SetIcon( sal_uInt16 nIcon );
- virtual void SetRepresentedURL( const rtl::OUString& );
- virtual void SetMenu( SalMenu* pSalMenu );
- virtual void DrawMenuBar();
- virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = sal_False );
- virtual void Enable( sal_Bool bEnable );
- virtual void SetMinClientSize( long nWidth, long nHeight );
- virtual void SetMaxClientSize( long nWidth, long nHeight );
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
- virtual void GetClientSize( long& rWidth, long& rHeight );
- virtual void GetWorkArea( Rectangle& rRect );
- virtual SalFrame* GetParent() const;
- virtual void SetWindowState( const SalFrameState* pState );
- virtual sal_Bool GetWindowState( SalFrameState* pState );
- virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay );
- virtual void StartPresentation( sal_Bool bStart );
- virtual void SetAlwaysOnTop( sal_Bool bOnTop );
- virtual void ToTop( sal_uInt16 nFlags );
- virtual void SetPointer( PointerStyle ePointerStyle );
- virtual void CaptureMouse( sal_Bool bMouse );
- virtual void SetPointerPos( long nX, long nY );
- virtual void Flush( void );
- virtual void Flush( const Rectangle& );
- virtual void Sync();
- virtual void SetInputContext( SalInputContext* pContext );
- virtual void EndExtTextInput( sal_uInt16 nFlags );
- virtual rtl::OUString GetKeyName( sal_uInt16 nKeyCode );
- virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
- virtual LanguageType GetInputLanguage();
- virtual void UpdateSettings( AllSettings& rSettings );
- virtual const SystemEnvData* GetSystemData() const;
- virtual SalPointerState GetPointerState();
- virtual SalIndicatorState GetIndicatorState();
- virtual void SimulateKeyPress( sal_uInt16 nKeyCode );
- virtual void SetParent( SalFrame* pNewParent );
- virtual bool SetPluginParent( SystemParentData* pNewParent );
- virtual void SetExtendedFrameStyle( SalExtStyle );
- virtual void SetScreenNumber(unsigned int);
- virtual void SetApplicationID( const rtl::OUString &rApplicationID );
-
- // shaped system windows
- // set clip region to none (-> rectangular windows, normal state)
- virtual void ResetClipRegion();
- // start setting the clipregion consisting of nRects rectangles
- virtual void BeginSetClipRegion( sal_uLong nRects );
- // add a rectangle to the clip region
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- // done setting up the clipregion
- virtual void EndSetClipRegion();
-
- virtual void SetClientSize( long nWidth, long nHeight );
-
- void UpdateFrameGeometry();
-
- // trigger painting of the window
- void SendPaintEvent( const Rectangle* pRect = NULL );
-
- static bool isAlive( const IosSalFrame* pFrame )
- { return GetSalData()->maFrameCheck.find( pFrame ) != GetSalData()->maFrameCheck.end(); }
-
- static IosSalFrame* GetCaptureFrame() { return s_pCaptureFrame; }
-
- UIWindow* getWindow() const { return mpWindow; }
- UIView* getView() const { return mpView; }
- unsigned int getStyleMask() const { return mnStyleMask; }
-
- void getResolution( long& o_rDPIX, long& o_rDPIY );
-
- // actually the follwing methods do the same thing: flipping y coordinates
- // but having two of them makes clearer what the coordinate system
- // is supposed to be before and after
- void VCLToCocoaTouch( CGRect& io_rRect, bool bRelativeToScreen = true );
- void CocoaTouchToVCL( CGRect& io_rRect, bool bRelativeToScreen = true );
-
- void VCLToCocoaTouch( CGPoint& io_rPoint, bool bRelativeToScreen = true );
- void CocoaTouchToVCL( CGPoint& io_Point, bool bRelativeToScreen = true );
-
- CGMutablePathRef getClipPath() const { return mrClippingPath; }
-
- // called by VCL_UIApplication to indicate screen settings have changed
- void screenParametersChanged();
-
- private: // methods
- /** do things on initial show (like centering on parent or on screen)
- */
- void initShow();
-
- void initWindowAndView();
-
- private: // data
- static IosSalFrame* s_pCaptureFrame;
-
- // make IosSalFrame non copyable
- IosSalFrame( const IosSalFrame& );
- IosSalFrame& operator=(const IosSalFrame&);
-};
-
-#endif // _SV_SALFRAME_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salframeview.h b/vcl/inc/ios/salframeview.h
deleted file mode 100644
index 4c8248053da1..000000000000
--- a/vcl/inc/ios/salframeview.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _VCL_SALFRAMEVIEW_H
-#define _VCL_SALFRAMEVIEW_H
-
-@interface SalFrameWindow : UIWindow
-{
- IosSalFrame* mpFrame;
- id mDraggingDestinationHandler;
-}
--(id)initWithSalFrame: (IosSalFrame*)pFrame;
--(BOOL)canBecomeKeyWindow;
--(void)displayIfNeeded;
--(IosSalFrame*)getSalFrame;
-@end
-
-@interface SalFrameView : UIView
-{
- IosSalFrame* mpFrame;
-
- // for UITextInput
- UIEvent* mpLastEvent;
- BOOL mbNeedSpecialKeyHandle;
- BOOL mbInKeyInput;
- BOOL mbKeyHandled;
- NSRange mMarkedRange;
- NSRange mSelectedRange;
- id mDraggingDestinationHandler;
- UIEvent* mpLastSuperEvent;
-
- NSTimeInterval mfLastMagnifyTime;
- float mfMagnifyDeltaSum;
-}
--(id)initWithSalFrame: (IosSalFrame*)pFrame;
--(IosSalFrame*)getSalFrame;
--(BOOL)acceptsFirstResponder;
--(BOOL)isOpaque;
--(void)drawRect: (CGRect)aRect;
-@end
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salgdicommon.hxx b/vcl/inc/ios/salgdicommon.hxx
deleted file mode 100644
index 6d8edcfd95db..000000000000
--- a/vcl/inc/ios/salgdicommon.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _VCL_IOS_SALGDICOMMON_H
-#define _VCL_IOS_SALGDICOMMON_H
-
-#include <vcl/salgtype.hxx>
-
-// abstracting quartz color instead of having to use an CGFloat[] array
-class RGBAColor
-{
-public:
- RGBAColor( SalColor );
- RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha ); //NOTUSEDYET
- const CGFloat* AsArray() const { return m_fRGBA; }
- bool IsVisible() const { return m_fRGBA[3] > 0; }
- void SetAlpha( float fAlpha ) { m_fRGBA[3] = fAlpha; }
-private:
- CGFloat m_fRGBA[4]; // red, green, blue, alpha
-};
-
-inline RGBAColor::RGBAColor( SalColor nSalColor )
-{
- m_fRGBA[0] = SALCOLOR_RED(nSalColor) * (1.0/255);
- m_fRGBA[1] = SALCOLOR_GREEN(nSalColor) * (1.0/255);
- m_fRGBA[2] = SALCOLOR_BLUE(nSalColor) * (1.0/255);
- m_fRGBA[3] = 1.0; // opaque
-}
-
-inline RGBAColor::RGBAColor( float fRed, float fGreen, float fBlue, float fAlpha )
-{
- m_fRGBA[0] = fRed;
- m_fRGBA[1] = fGreen;
- m_fRGBA[2] = fBlue;
- m_fRGBA[3] = fAlpha;
-}
-
-class XorEmulation
-{
-public:
- XorEmulation();
- ~XorEmulation();
-
- void SetTarget( int nWidth, int nHeight, int nBitmapDepth, CGContextRef, CGLayerRef );
- bool UpdateTarget();
- void Enable() { m_bIsEnabled = true; }
- void Disable() { m_bIsEnabled = false; }
- bool IsEnabled() const { return m_bIsEnabled; }
- CGContextRef GetTargetContext() const { return m_xTargetContext; }
- CGContextRef GetMaskContext() const { return (m_bIsEnabled ? m_xMaskContext : NULL); }
-
-private:
- CGLayerRef m_xTargetLayer;
- CGContextRef m_xTargetContext;
- CGContextRef m_xMaskContext;
- CGContextRef m_xTempContext;
- sal_uLong* m_pMaskBuffer;
- sal_uLong* m_pTempBuffer;
- int m_nBufferLongs;
- bool m_bIsEnabled;
-};
-
-#endif /* _VCL_IOS_SALGDICOMMON_H */
diff --git a/vcl/inc/ios/salinst.h b/vcl/inc/ios/salinst.h
deleted file mode 100644
index f7ff822ebeb5..000000000000
--- a/vcl/inc/ios/salinst.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALINST_H
-#define _SV_SALINST_H
-
-#include "osl/mutex.hxx"
-#include "osl/thread.hxx"
-#include "osl/conditn.h"
-#include <vcl/solarmutex.hxx>
-
-#include "ios/iosvcltypes.h"
-
-#include "salinst.hxx"
-
-#include <list>
-
-class IosSalFrame;
-class ApplicationEvent;
-class Image;
-
-class SalYieldMutex : public vcl::SolarMutexObject
-{
- sal_uLong mnCount;
- oslThreadIdentifier mnThreadId;
-
-public:
- SalYieldMutex();
- virtual void acquire();
- virtual void release();
- virtual sal_Bool tryToAcquire();
- sal_uLong GetAcquireCount() const { return mnCount; }
- oslThreadIdentifier GetThreadId() const { return mnThreadId; }
-};
-
-#define YIELD_GUARD osl::SolarGuard aGuard( GetSalData()->mpFirstInstance->GetYieldMutex() )
-
-
-class IosSalInstance : public SalInstance
-{
- struct SalUserEvent
- {
- IosSalFrame* mpFrame;
- void* mpData;
- sal_uInt16 mnType;
-
- SalUserEvent( IosSalFrame* pFrame, void* pData, sal_uInt16 nType ) :
- mpFrame( pFrame ), mpData( pData ), mnType( nType )
- {}
- };
-
-public:
- SalYieldMutex* mpSalYieldMutex;
- rtl::OUString maDefaultPrinter;
- oslThreadIdentifier maMainThread;
- bool mbWaitingYield;
- int mnActivePrintJobs;
- std::list< SalUserEvent > maUserEvents;
- oslMutex maUserEventListMutex;
- oslCondition maWaitingYieldCond;
-
- typedef std::list<const ApplicationEvent*> AppEventList;
- static AppEventList aAppEventList;
-
-public:
- IosSalInstance();
- virtual ~IosSalInstance();
-
- virtual SalSystem* CreateSystem();
- virtual void DestroySystem(SalSystem*);
- virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
- virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
- virtual void DestroyFrame( SalFrame* pFrame );
- virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
- virtual void DestroyObject( SalObject* pObject );
- virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
- long nDX, long nDY,
- sal_uInt16 nBitCount, const SystemGraphicsData *pData );
- virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
-
- virtual SalInfoPrinter* CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo,
- ImplJobSetup* pSetupData );
- virtual void DestroyInfoPrinter( SalInfoPrinter* pPrinter );
- virtual SalPrinter* CreatePrinter( SalInfoPrinter* pInfoPrinter );
- virtual void DestroyPrinter( SalPrinter* pPrinter );
- virtual void GetPrinterQueueInfo( ImplPrnQueueList* pList );
- virtual void GetPrinterQueueState( SalPrinterQueueInfo* pInfo );
- virtual void DeletePrinterQueueInfo( SalPrinterQueueInfo* pInfo );
- virtual rtl::OUString GetDefaultPrinter();
- virtual SalTimer* CreateSalTimer();
- virtual SalI18NImeStatus* CreateI18NImeStatus();
- virtual SalSystem* CreateSalSystem();
- virtual SalBitmap* CreateSalBitmap();
- virtual osl::SolarMutex* GetYieldMutex();
- virtual sal_uLong ReleaseYieldMutex();
- virtual void AcquireYieldMutex( sal_uLong nCount );
- virtual bool CheckYieldMutex();
- virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
- virtual bool AnyInput( sal_uInt16 nType );
- virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* pVCLMenu );
- virtual void DestroyMenu( SalMenu* );
- virtual SalMenuItem* CreateMenuItem( const SalItemParams* pItemData );
- virtual void DestroyMenuItem( SalMenuItem* );
- virtual SalSession* CreateSalSession();
- virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
- virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
- virtual void SetEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
- virtual void SetErrorEventCallback( void* pInstance, bool(*pCallback)(void*,void*,int) );
-
- // dtrans implementation
- virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
- CreateClipboard( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& i_rArguments );
- virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDragSource();
- virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > CreateDropTarget();
-
- void wakeupYield();
-
- public:
- friend class IosSalFrame;
-
- void PostUserEvent( IosSalFrame* pFrame, sal_uInt16 nType, void* pData );
- void delayedSettingsChanged( bool bInvalidate );
-
- bool isUIAppThread() const;
-
- void startedPrintJob() { mnActivePrintJobs++; }
- void endedPrintJob() { mnActivePrintJobs--; }
-
- // event subtypes for NSApplicationDefined events
- static const short AppExecuteSVMain = 0x7fff;
- static const short AppEndLoopEvent = 1;
- static const short AppStartTimerEvent = 10;
- static const short AppleRemoteEvent = 15;
- static const short YieldWakeupEvent = 20;
-};
-
-// helper class: inverted solar guard
-class YieldMutexReleaser
-{
- sal_uLong mnCount;
- public:
- YieldMutexReleaser();
- ~YieldMutexReleaser();
-};
-
-rtl::OUString GetOUString( CFStringRef );
-rtl::OUString GetOUString( NSString* );
-CFStringRef CreateCFString( const rtl::OUString& );
-NSString* CreateNSString( const rtl::OUString& );
-
-CGImageRef CreateCGImage( const Image& );
-UIImage* CreateUIImage( const Image& );
-
-#endif // _SV_SALINST_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salmathutils.hxx b/vcl/inc/ios/salmathutils.hxx
deleted file mode 100644
index a4f24277b560..000000000000
--- a/vcl/inc/ios/salmathutils.hxx
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALMATHUTILS_HXX
-#define _SV_SALMATHUTILS_HXX
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// ------------------------------------------------------------------
-//
-// Structures
-//
-// ------------------------------------------------------------------
-
-// LRectCoor is an abreviation for rectangular coordinates
-// represented as long integers
-
-struct LRectCoor
-{
- long x;
- long y;
- long z;
-};
-
-// ------------------------------------------------------------------
-//
-// Type Definitions
-//
-// ------------------------------------------------------------------
-
-// LRectCoorVec is an abreviation for vectors in rectangular
-// coordinates represented as long integers
-
-typedef struct LRectCoor LRectCoor;
-typedef LRectCoor *LRectCoorVector;
-typedef LRectCoorVector *LRectCoorTensor;
-
-// ------------------------------------------------------------------
-//
-// Function Headers
-//
-// ------------------------------------------------------------------
-
-void CSwap ( char &rX, char &rY );
-void UCSwap ( unsigned char &rX, unsigned char &rY );
-void SSwap ( short &rX, short &rY );
-void USSwap ( unsigned short &rX, unsigned short &rY );
-void LSwap ( long &rX, long &rY );
-void ULSwap ( unsigned long &rX, unsigned long &rY );
-
-// ------------------------------------------------------------------
-
-unsigned long Euclidian2Norm ( const LRectCoorVector pVec );
-
-// ------------------------------------------------------------------
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _SV_SALMATHUTILS_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salmenu.h b/vcl/inc/ios/salmenu.h
deleted file mode 100644
index 1e1648db3932..000000000000
--- a/vcl/inc/ios/salmenu.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALMENU_H
-#define _SV_SALMENU_H
-
-#include "premac.h"
-#include <UIKit/UIKit.h>
-#include "postmac.h"
-
-#include "salmenu.hxx"
-
-#include <vector>
-
-class IosSalFrame;
-class IosSalMenuItem;
-
-class IosSalMenu : public SalMenu
-{
-};
-
-class IosSalMenuItem : public SalMenuItem
-{
-};
-
-#endif // _SV_SALMENU_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salnstimer.h b/vcl/inc/ios/salnstimer.h
deleted file mode 100644
index 7a65d6f9c9ca..000000000000
--- a/vcl/inc/ios/salnstimer.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef _VCL_SALNSTIMER_H
-#define _VCL_SALNSTIMER_H
-
-#include "premac.h"
-#include <Foundation/Foundation.h>
-#include "postmac.h"
-
-@interface TimerCallbackCaller : NSObject
-{
-}
--(void)timerElapsed:(NSTimer*)pTimer;
-@end
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salobj.h b/vcl/inc/ios/salobj.h
deleted file mode 100644
index b3966ec43871..000000000000
--- a/vcl/inc/ios/salobj.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALOBJ_H
-#define _SV_SALOBJ_H
-
-#include "vcl/sysdata.hxx"
-#include "salobj.hxx"
-
-class IosSalFrame;
-class IosSalObject;
-
-
-// -----------------
-// - SalObjectData -
-// -----------------
-
-struct SalObjectData
-{
-};
-
-class IosSalObject : public SalObject
-{
-public:
- IosSalFrame* mpFrame; // parent frame
- SystemEnvData maSysData;
-
- long mnClipX;
- long mnClipY;
- long mnClipWidth;
- long mnClipHeight;
- bool mbClip;
-
- long mnX;
- long mnY;
- long mnWidth;
- long mnHeight;
-
- void setClippedPosSize();
-
- IosSalObject( IosSalFrame* pFrame );
- virtual ~IosSalObject();
-
- virtual void ResetClipRegion();
- virtual sal_uInt16 GetClipRegionType();
- virtual void BeginSetClipRegion( sal_uLong nRects );
- virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
- virtual void EndSetClipRegion();
- virtual void SetPosSize( long nX, long nY, long nWidth, long nHeight );
- virtual void Show( sal_Bool bVisible );
- virtual const SystemEnvData* GetSystemData() const;
-};
-
-#endif // _SV_SALOBJ_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salprn.h b/vcl/inc/ios/salprn.h
deleted file mode 100644
index c383af4341ad..000000000000
--- a/vcl/inc/ios/salprn.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALPRN_H
-#define _SV_SALPRN_H
-
-#include "ios/iosvcltypes.h"
-
-#include "salprn.hxx"
-
-#include <boost/shared_array.hpp>
-
-
-// ---------------------
-// - IosSalInfoPrinter -
-// ---------------------
-
-class IosSalGraphics;
-
-class IosSalInfoPrinter : public SalInfoPrinter
-{
- /// Printer graphics
- IosSalGraphics* mpGraphics;
- /// is Graphics used
- bool mbGraphics;
- /// job active ?
- bool mbJob;
-
- UIPrintFormatter* mpPrinter;
- /// cocoa print info object
- UIPrintInfo* mpPrintInfo;
-
- /// FIXME: get real printer context for infoprinter if possible
- /// fake context for info printer
- /// graphics context for Quartz 2D
- CGContextRef mrContext;
- /// memory for graphics bitmap context for querying metrics
- boost::shared_array< sal_uInt8 > maContextMemory;
-
- // since changes to UIPrintInfo during a job are ignored
- // we have to care for some settings ourselves
- // currently we do this for orientation;
- // really needed however is a solution for paper formats
- Orientation mePageOrientation;
-
- int mnStartPageOffsetX;
- int mnStartPageOffsetY;
- sal_Int32 mnCurPageRangeStart;
- sal_Int32 mnCurPageRangeCount;
-
- public:
- IosSalInfoPrinter( const SalPrinterQueueInfo& pInfo );
- virtual ~IosSalInfoPrinter();
-
- void SetupPrinterGraphics( CGContextRef i_xContext ) const;
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* i_pGraphics );
- virtual sal_Bool Setup( SalFrame* i_pFrame, ImplJobSetup* i_pSetupData );
- virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData );
- virtual sal_Bool SetData( sal_uLong i_nFlags, ImplJobSetup* i_pSetupData );
- virtual void GetPageInfo( const ImplJobSetup* i_pSetupData,
- long& o_rOutWidth, long& o_rOutHeight,
- long& o_rPageOffX, long& o_rPageOffY,
- long& o_rPageWidth, long& o_rPageHeight );
- virtual sal_uLong GetCapabilities( const ImplJobSetup* i_pSetupData, sal_uInt16 i_nType );
- virtual sal_uLong GetPaperBinCount( const ImplJobSetup* i_pSetupData );
- virtual rtl::OUString GetPaperBinName( const ImplJobSetup* i_pSetupData, sal_uLong i_nPaperBin );
- virtual void InitPaperFormats( const ImplJobSetup* i_pSetupData );
- virtual int GetLandscapeAngle( const ImplJobSetup* i_pSetupData );
-
- // the artificial separation between InfoPrinter and Printer
- // is not really useful for us
- // so let's make IosSalPrinter just a forwarder to IosSalInfoPrinter
- // and concentrate the real work in one class
- // implement pull model print system
- sal_Bool StartJob( const String* i_pFileName,
- const String& rJobName,
- const String& i_rAppName,
- ImplJobSetup* i_pSetupData,
- vcl::PrinterController& i_rController );
- sal_Bool EndJob();
- sal_Bool AbortJob();
- SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData );
- sal_Bool EndPage();
- sal_uLong GetErrorCode() const;
-
- UIPrintInfo* getPrintInfo() const { return mpPrintInfo; }
- void setStartPageOffset( int nOffsetX, int nOffsetY ) { mnStartPageOffsetX = nOffsetX; mnStartPageOffsetY = nOffsetY; }
- sal_Int32 getCurPageRangeStart() const { return mnCurPageRangeStart; }
- sal_Int32 getCurPageRangeCount() const { return mnCurPageRangeCount; }
-
- // match width/height against known paper formats, possibly switching orientation
- const PaperInfo* matchPaper( long i_nWidth, long i_nHeight, Orientation& o_rOrientation ) const;
- void setPaperSize( long i_nWidth, long i_nHeight, Orientation i_eSetOrientation );
-
- private:
- IosSalInfoPrinter( const IosSalInfoPrinter& );
- IosSalInfoPrinter& operator=(const IosSalInfoPrinter&);
-};
-
-// -----------------
-// - IosSalPrinter -
-// -----------------
-
-class IosSalPrinter : public SalPrinter
-{
- IosSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
- public:
- IosSalPrinter( IosSalInfoPrinter* i_pInfoPrinter );
- virtual ~IosSalPrinter();
-
- virtual sal_Bool StartJob( const rtl::OUString* pFileName,
- const rtl::OUString& rJobName,
- const rtl::OUString& rAppName,
- sal_uLong i_nCopies,
- bool i_bCollate,
- bool i_bDirect,
- ImplJobSetup* i_pSetupData );
- // implement pull model print system
- virtual sal_Bool StartJob( const rtl::OUString* pFileName,
- const rtl::OUString& rJobName,
- const rtl::OUString& rAppName,
- ImplJobSetup* i_pSetupData,
- vcl::PrinterController& i_rListener );
-
- virtual sal_Bool EndJob();
- virtual sal_Bool AbortJob();
- virtual SalGraphics* StartPage( ImplJobSetup* i_pSetupData, sal_Bool i_bNewJobData );
- virtual sal_Bool EndPage();
- virtual sal_uLong GetErrorCode();
-
- private:
- IosSalPrinter( const IosSalPrinter& );
- IosSalPrinter& operator=(const IosSalPrinter&);
-};
-
-const double fPtTo100thMM = 35.27777778;
-
-inline int PtTo10Mu( double nPoints ) { return (int)(((nPoints)*fPtTo100thMM)+0.5); }
-
-inline double TenMuToPt( double nUnits ) { return floor(((nUnits)/fPtTo100thMM)+0.5); }
-
-
-
-#endif // _SV_SALPRN_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salsys.h b/vcl/inc/ios/salsys.h
deleted file mode 100644
index b8b48cce4bb3..000000000000
--- a/vcl/inc/ios/salsys.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALSYS_H
-#define _SV_SALSYS_H
-
-#include "salsys.hxx"
-
-class VCL_DLLPUBLIC IosSalSystem : public SalSystem
-{
-public:
- IosSalSystem() {}
- virtual ~IosSalSystem();
-
- // get info about the display
- virtual unsigned int GetDisplayScreenCount();
- virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
- virtual Rectangle GetDisplayScreenWorkAreaPosSizePixel( unsigned int nScreen );
-
- virtual rtl::OUString GetDisplayScreenName( unsigned int nScreen );
- virtual int ShowNativeMessageBox( const rtl::OUString& rTitle,
- const rtl::OUString& rMessage,
- int nButtonCombination,
- int nDefaultButton, bool bUseResources);
-};
-
-#endif // _SV_SALSYS_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/saluimenu.h b/vcl/inc/ios/saluimenu.h
deleted file mode 100644
index bb9a3415ddd8..000000000000
--- a/vcl/inc/ios/saluimenu.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _VCL_SALUIMENU_H
-#define _VCL_SALUIMENU_H
-
-class IosSalMenu;
-class IosSalMenuItem;
-
-@interface SalUIMenu : UIMenuController
-{
- /* Caution: SalNSMenu instances occasionally are binary copied
- in IosSalMenu::ShowNativePopupMenu. If any members are added,
- please take this into account !
- */
- IosSalMenu* mpMenu;
-}
--(id)initWithMenu: (IosSalMenu*)pMenu;
--(void)menuNeedsUpdate: (UIMenuController*)pMenu;
--(void)setSalMenu: (IosSalMenu*)pMenu;
-@end
-
-@interface SalUIMenuItem : UIMenuItem
-{
- /* Caution: SalUIMenuItem instances occasionally are binary copied
- in IosSalMenu::ShowNativePopupMenu. If any members are added,
- please take this into account !
- */
- IosSalMenuItem* mpMenuItem;
-}
--(id)initWithMenuItem: (IosSalMenuItem*)pMenuItem;
--(void)menuItemTriggered: (id)aSender;
-@end
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/salvd.h b/vcl/inc/ios/salvd.h
deleted file mode 100644
index 83c9d4544d94..000000000000
--- a/vcl/inc/ios/salvd.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _SV_SALVD_H
-#define _SV_SALVD_H
-
-#include "coretext/salgdi.h"
-
-#include "salvd.hxx"
-
-#if PRAGMA_ONCE
- #pragma once
-#endif
-
-struct SalVirDevData
-{
-};
-
-typedef struct SalVirDevData SalVirDevData;
-typedef SalVirDevData *SalVirDevDataPtr;
-typedef SalVirDevDataPtr *SalVirDevDataHandle;
-
-// =======================================================================
-
-class IosSalVirtualDevice : public SalVirtualDevice
-{
-private:
- bool mbGraphicsUsed; // is Graphics used
- bool mbForeignContext; // is mxContext from outside VCL
- CGContextRef mxBitmapContext;
- int mnBitmapDepth;
- CGLayerRef mxLayer; // Quartz layer
- QuartzSalGraphics* mpGraphics; // current VirDev graphics
-
- void Destroy();
-
-public:
- IosSalVirtualDevice( QuartzSalGraphics* pGraphic, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData );
- virtual ~IosSalVirtualDevice();
-
- virtual SalGraphics* GetGraphics();
- virtual void ReleaseGraphics( SalGraphics* pGraphics );
- virtual sal_Bool SetSize( long nNewDX, long nNewDY );
- virtual void GetSize( long& rWidth, long& rHeight );
-};
-
-// =======================================================================
-
-#endif // _SV_SALVD_H
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/ios/vcluiapp.h b/vcl/inc/ios/vcluiapp.h
deleted file mode 100644
index 5671fcf68614..000000000000
--- a/vcl/inc/ios/vcluiapp.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/* -*- 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/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _VCL_VCLUIAPP_H
-#define _VCL_VCLUIAPP_H
-
-#include "premac.h"
-#include "UIKit/UIKit.h"
-#include "postmac.h"
-
-class IosSalFrame;
-
-// our very own application
-@interface VCL_UIApplication : UIApplication
-{
-}
--(void)sendEvent:(UIEvent*)pEvent;
--(void)sendSuperEvent:(UIEvent*)pEvent;
--(BOOL)application: (UIApplication*) app openFile: (NSString*)file;
--(void)application: (UIApplication*) app openFiles: (NSArray*)files;
--(void)addFallbackMenuItem: (UIMenuItem*)pNewItem;
--(void)removeFallbackMenuItem: (UIMenuItem*)pOldItem;
-@end
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/quartz/salbmp.h b/vcl/inc/quartz/salbmp.h
index 16460abf3794..24aebeb87c18 100644
--- a/vcl/inc/quartz/salbmp.h
+++ b/vcl/inc/quartz/salbmp.h
@@ -29,7 +29,7 @@
#ifdef MACOSX
#include "aqua/salgdi.h"
#else
-#include "coretext/salgdi.h"
+#include "headless/svpgdi.hxx"
#endif
#include "salinst.hxx"
diff --git a/vcl/inc/aqua/salgdicommon.hxx b/vcl/inc/quartz/salgdicommon.hxx
index 2d4f611b168d..bbc6f8f9a550 100644
--- a/vcl/inc/aqua/salgdicommon.hxx
+++ b/vcl/inc/quartz/salgdicommon.hxx
@@ -20,6 +20,14 @@
#ifndef _VCL_AQUA_SALGDICOMMON_H
#define _VCL_AQUA_SALGDICOMMON_H
+#include <premac.h>
+#ifdef IOS
+#include <CoreGraphics/CoreGraphics.h>
+#else
+#include <ApplicationServices/ApplicationServices.h>
+#endif
+#include <postmac.h>
+
#include <vcl/salgtype.hxx>
// abstracting quartz color instead of having to use an CGFloat[] array
diff --git a/vcl/inc/ios/saltimer.h b/vcl/inc/quartz/utils.h
index d9bfc377b1cb..01b1f1372fa8 100644
--- a/vcl/inc/ios/saltimer.h
+++ b/vcl/inc/quartz/utils.h
@@ -17,29 +17,21 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _SV_SALTIMER_H
-#define _SV_SALTIMER_H
+#ifndef INCLUDED_QUARTZ_UTILS_HXX
+#define INCLUDED_QUARTZ_UTILS_HXX
-#include "premac.h"
-#include <Foundation/Foundation.h>
-#include "postmac.h"
-
-#include "saltimer.hxx"
-
-class IosSalTimer : public SalTimer
-{
- public:
+#include <rtl/ustring.hxx>
- IosSalTimer();
- virtual ~IosSalTimer();
-
- void Start( sal_uLong nMS );
- void Stop();
+#include <premac.h>
+#include <CoreFoundation/CoreFoundation.h>
+#include <Foundation/Foundation.h>
+#include <postmac.h>
- static NSTimer* pRunningTimer;
- static bool bDispatchTimer;
-};
+rtl::OUString GetOUString( CFStringRef );
+rtl::OUString GetOUString( NSString* );
+CFStringRef CreateCFString( const rtl::OUString& );
+NSString* CreateNSString( const rtl::OUString& );
-#endif
+#endif // INCLUDED_QUARTZ_UTILS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/saldatabasic.hxx b/vcl/inc/saldatabasic.hxx
index e4ef22c03d35..b12415df4731 100644
--- a/vcl/inc/saldatabasic.hxx
+++ b/vcl/inc/saldatabasic.hxx
@@ -26,6 +26,10 @@
#include "vcl/dllapi.h"
+#ifdef IOS
+#include "coretext/salcoretextfontutils.hxx"
+#endif
+
namespace psp
{
class PrinterInfoManager;
@@ -40,6 +44,11 @@ public:
SalData();
virtual ~SalData();
+#ifdef IOS
+ CGColorSpaceRef mxRGBSpace;
+ CGColorSpaceRef mxGraySpace;
+ SystemFontList* mpFontList;
+#endif
};
inline void SetSalData( SalData* pData )
diff --git a/vcl/inc/vcl/sysdata.hxx b/vcl/inc/vcl/sysdata.hxx
index c23e486adf66..6d26bc2ff2f8 100644
--- a/vcl/inc/vcl/sysdata.hxx
+++ b/vcl/inc/vcl/sysdata.hxx
@@ -40,12 +40,6 @@ class NSView;
#ifdef IOS
typedef const struct __CTFont * CTFontRef;
typedef struct CGContext *CGContextRef;
-typedef struct CGLayer *CGLayerRef;
-#ifdef __OBJC__
-@class UIView;
-#else
-class UIView;
-#endif
#endif
#if defined( WNT )
@@ -70,8 +64,6 @@ struct SystemEnvData
HWND hWnd; // the window hwnd
#elif defined( MACOSX )
NSView* pView; // the cocoa (NSView *) implementing this object
-#elif defined( IOS )
- UIView* pView; // the CocoaTouch (UIView *) implementing this object
#elif defined( UNX )
void* pDisplay; // the relevant display connection
long aWindow; // the window of the object
@@ -100,8 +92,6 @@ struct SystemParentData
HWND hWnd; // the window hwnd
#elif defined( MACOSX )
NSView* pView; // the cocoa (NSView *) implementing this object
-#elif defined( IOS )
- UIView* pView; // the CocoaTouch (UIView *) implementing this object
#elif defined( UNX )
long aWindow; // the window of the object
bool bXEmbedSupport:1; // decides whether the object in question