summaryrefslogtreecommitdiffstats
path: root/vcl/inc/unx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/inc/unx')
-rw-r--r--vcl/inc/unx/Xproto.h3
-rw-r--r--vcl/inc/unx/gtk/gtkdata.hxx3
-rw-r--r--vcl/inc/unx/gtk/gtkframe.hxx1
-rw-r--r--vcl/inc/unx/gtk/gtkgdi.hxx3
-rw-r--r--vcl/inc/unx/headless/svpbmp.hxx72
-rw-r--r--vcl/inc/unx/headless/svpdummies.hxx100
-rw-r--r--vcl/inc/unx/headless/svpelement.hxx49
-rw-r--r--vcl/inc/unx/headless/svpframe.hxx132
-rw-r--r--vcl/inc/unx/headless/svpgdi.hxx174
-rw-r--r--vcl/inc/unx/headless/svpinst.hxx204
-rw-r--r--vcl/inc/unx/headless/svpprn.hxx57
-rw-r--r--vcl/inc/unx/headless/svppspgraphics.hxx189
-rw-r--r--vcl/inc/unx/headless/svpvd.hxx62
-rw-r--r--vcl/inc/unx/salbmp.h248
-rw-r--r--vcl/inc/unx/saldata.hxx3
-rw-r--r--vcl/inc/unx/saldisp.hxx7
-rw-r--r--vcl/inc/unx/x11_cursors/salcursors.h3
17 files changed, 1193 insertions, 117 deletions
diff --git a/vcl/inc/unx/Xproto.h b/vcl/inc/unx/Xproto.h
index 804b3ffa98cc..b6db98dbfe15 100644
--- a/vcl/inc/unx/Xproto.h
+++ b/vcl/inc/unx/Xproto.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,3 +48,5 @@
#include <tools/postx.h>
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 307a3f2b3e01..24860b8f80df 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -93,9 +93,8 @@ class GtkSalDisplay : public SalDisplay
GdkDisplay* m_pGdkDisplay;
GdkCursor *m_aCursors[ POINTER_COUNT ];
bool m_bStartupCompleted;
- std::vector< int > m_aXineramaScreenIndexMap;
- GdkCursor* getFromXPM( const unsigned char *pBitmap, const unsigned char *pMask,
+ GdkCursor* getFromXBM( const unsigned char *pBitmap, const unsigned char *pMask,
int nWidth, int nHeight, int nXHot, int nYHot );
public:
GtkSalDisplay( GdkDisplay* pDisplay );
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 6caf39dc9644..78aea06017a8 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -30,6 +30,7 @@
#define _VCL_GTKFRAME_HXX
#include <tools/prex.h>
+#include <cairo/cairo.h>
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx
index 41e500c49027..83d4aa827da9 100644
--- a/vcl/inc/unx/gtk/gtkgdi.hxx
+++ b/vcl/inc/unx/gtk/gtkgdi.hxx
@@ -39,6 +39,8 @@
#if GTK_CHECK_VERSION(3,0,0)
+#include <unx/headless/svpgdi.hxx>
+
// Disabled for gtk3 - use legacy theming code
#define GTK_GRAPHICS_DISABLED
class GtkSalFrame;
@@ -46,7 +48,6 @@ class GtkSalGraphics : public X11SalGraphics {
public:
GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow );
};
-
#else
class GtkSalGraphics : public X11SalGraphics
diff --git a/vcl/inc/unx/headless/svpbmp.hxx b/vcl/inc/unx/headless/svpbmp.hxx
new file mode 100644
index 000000000000..b3adb3b9951f
--- /dev/null
+++ b/vcl/inc/unx/headless/svpbmp.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef SVP_SVBMP_HXX
+#define SVP_SVBMP_HXX
+
+#include <salbmp.hxx>
+#include "svpelement.hxx"
+
+class SvpSalBitmap : public SalBitmap, public SvpElement
+{
+ basebmp::BitmapDeviceSharedPtr m_aBitmap;
+public:
+ SvpSalBitmap() {}
+ virtual ~SvpSalBitmap();
+
+ const basebmp::BitmapDeviceSharedPtr& getBitmap() const { return m_aBitmap; }
+ void setBitmap( const basebmp::BitmapDeviceSharedPtr& rSrc ) { m_aBitmap = rSrc; }
+
+ // SvpElement
+ virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aBitmap; }
+
+ // SalBitmap
+ virtual bool Create( const Size& rSize,
+ sal_uInt16 nBitCount,
+ const BitmapPalette& rPal );
+ virtual bool Create( const SalBitmap& rSalBmp );
+ virtual bool Create( const SalBitmap& rSalBmp,
+ SalGraphics* pGraphics );
+ virtual bool Create( const SalBitmap& rSalBmp,
+ sal_uInt16 nNewBitCount );
+ virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
+ Size& rSize,
+ bool bMask = false );
+ virtual void Destroy();
+ virtual Size GetSize() const;
+ virtual sal_uInt16 GetBitCount() const;
+
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+ virtual bool GetSystemData( BitmapSystemData& rData );
+
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpdummies.hxx b/vcl/inc/unx/headless/svpdummies.hxx
new file mode 100644
index 000000000000..bc46e9b22f70
--- /dev/null
+++ b/vcl/inc/unx/headless/svpdummies.hxx
@@ -0,0 +1,100 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPDUMMIES_HXX
+
+#include <vcl/sysdata.hxx>
+
+#include <salobj.hxx>
+#include <salimestatus.hxx>
+#include <salsys.hxx>
+
+class SalGraphics;
+
+class SvpSalObject : public SalObject
+{
+public:
+ SystemChildData m_aSystemChildData;
+
+ SvpSalObject();
+ virtual ~SvpSalObject();
+
+ // overload all pure virtual methods
+ 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 void Enable( sal_Bool nEnable );
+ virtual void GrabFocus();
+
+ virtual void SetBackground();
+ virtual void SetBackground( SalColor nSalColor );
+
+ virtual const SystemEnvData* GetSystemData() const;
+
+ virtual void InterceptChildWindowKeyDown( sal_Bool bIntercept );
+};
+
+class SvpImeStatus : public SalI18NImeStatus
+{
+ public:
+ SvpImeStatus() {}
+ virtual ~SvpImeStatus();
+
+ virtual bool canToggle();
+ virtual void toggle();
+};
+
+class SvpSalSystem : public SalSystem
+{
+ public:
+ SvpSalSystem() {}
+ virtual ~SvpSalSystem();
+ // get info about the display
+ virtual unsigned int GetDisplayScreenCount();
+ virtual bool IsMultiDisplay();
+ virtual unsigned int GetDefaultDisplayNumber();
+ virtual Rectangle GetDisplayScreenPosSizePixel( unsigned int nScreen );
+ virtual Rectangle GetDisplayWorkAreaPosSizePixel( unsigned int nScreen );
+ virtual rtl::OUString GetScreenName( unsigned int nScreen );
+
+
+ virtual int ShowNativeMessageBox( const String& rTitle,
+ const String& rMessage,
+ int nButtonCombination,
+ int nDefaultButton);
+};
+
+
+#endif // _SVP_SVPDUMMIES_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpelement.hxx b/vcl/inc/unx/headless/svpelement.hxx
new file mode 100644
index 000000000000..c7f647cf3a03
--- /dev/null
+++ b/vcl/inc/unx/headless/svpelement.hxx
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPELEMENT_HXX
+#define _SVP_SVPELEMENT_HXX
+
+#include <basebmp/bitmapdevice.hxx>
+
+#define SVP_DEFAULT_BITMAP_FORMAT basebmp::Format::TWENTYFOUR_BIT_TC_MASK
+
+class SvpElement
+{
+ protected:
+ SvpElement();
+ virtual ~SvpElement();
+ public:
+ virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const = 0;
+
+ static sal_uInt32 getBitCountFromScanlineFormat( sal_Int32 nFormat );
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpframe.hxx b/vcl/inc/unx/headless/svpframe.hxx
new file mode 100644
index 000000000000..e57381780f61
--- /dev/null
+++ b/vcl/inc/unx/headless/svpframe.hxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPFRAME_HXX
+
+#include <vcl/sysdata.hxx>
+
+#include <salframe.hxx>
+#include "svpelement.hxx"
+
+#include <list>
+
+class SvpSalInstance;
+class SvpSalGraphics;
+
+class SvpSalFrame : public SalFrame, public SvpElement
+{
+ SvpSalInstance* m_pInstance;
+ SvpSalFrame* m_pParent; // pointer to parent frame
+ std::list< SvpSalFrame* > m_aChildren; // List of child frames
+ sal_uLong m_nStyle;
+ bool m_bVisible;
+ long m_nMinWidth;
+ long m_nMinHeight;
+ long m_nMaxWidth;
+ long m_nMaxHeight;
+
+ SystemEnvData m_aSystemChildData;
+
+ basebmp::BitmapDeviceSharedPtr m_aFrame;
+ std::list< SvpSalGraphics* > m_aGraphics;
+
+ static SvpSalFrame* s_pFocusFrame;
+public:
+ SvpSalFrame( SvpSalInstance* pInstance,
+ SalFrame* pParent,
+ sal_uLong nSalFrameStyle,
+ SystemParentData* pSystemParent = NULL );
+ virtual ~SvpSalFrame();
+
+ void GetFocus();
+ void LoseFocus();
+ void PostPaint() const;
+
+ // SvpElement
+ virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aFrame; }
+
+ // SalFrame
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+
+ virtual sal_Bool PostEvent( void* pData );
+
+ virtual void SetTitle( const XubString& rTitle );
+ virtual void SetIcon( sal_uInt16 nIcon );
+ virtual void SetMenu( SalMenu* pMenu );
+ virtual void DrawMenuBar();
+
+ virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
+ 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 );
+ using SalFrame::Flush;
+ virtual void Flush();
+ virtual void Sync();
+ virtual void SetInputContext( SalInputContext* pContext );
+ virtual void EndExtTextInput( sal_uInt16 nFlags );
+ virtual String GetKeyName( sal_uInt16 nKeyCode );
+ virtual String GetSymbolKeyName( const XubString& rFontName, sal_uInt16 nKeyCode );
+ virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode );
+ virtual LanguageType GetInputLanguage();
+ virtual SalBitmap* SnapShot();
+ virtual void UpdateSettings( AllSettings& rSettings );
+ virtual void Beep( SoundType eSoundType );
+ 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 SetBackgroundBitmap( SalBitmap* pBitmap );
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( sal_uLong nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
+
+ /*TODO: functional implementation */
+ virtual void SetScreenNumber( unsigned int nScreen ) { (void)nScreen; }
+ virtual void SetApplicationID(const rtl::OUString &rApplicationID) { (void) rApplicationID; }
+};
+#endif // _SVP_SVPFRAME_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpgdi.hxx b/vcl/inc/unx/headless/svpgdi.hxx
new file mode 100644
index 000000000000..8291a3c2f7bc
--- /dev/null
+++ b/vcl/inc/unx/headless/svpgdi.hxx
@@ -0,0 +1,174 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPGDI_HXX
+
+#include <basebmp/bitmapdevice.hxx>
+#include <basebmp/color.hxx>
+
+#include <salgdi.hxx>
+#include <sallayout.hxx>
+
+class ServerFont;
+
+class SvpSalGraphics : public SalGraphics
+{
+ basebmp::BitmapDeviceSharedPtr m_aDevice;
+ basebmp::BitmapDeviceSharedPtr m_aOrigDevice;
+ basebmp::BitmapDeviceSharedPtr m_aClipMap;
+
+ bool m_bUseLineColor;
+ basebmp::Color m_aLineColor;
+ bool m_bUseFillColor;
+ basebmp::Color m_aFillColor;
+ basebmp::Color m_aTextColor;
+
+ basebmp::DrawMode m_aDrawMode;
+
+ ServerFont* m_pServerFont[ MAX_FALLBACK ];
+ sal_uInt32 m_eTextFmt;
+
+protected:
+ 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 );
+
+public:
+ SvpSalGraphics();
+ virtual ~SvpSalGraphics();
+
+ 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;
+
+ virtual void ResetClipRegion();
+ virtual bool setClipRegion( const Region& );
+
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
+
+ virtual void SetFillColor( SalColor nSalColor );
+
+ virtual void SetXORMode( bool bSet, bool );
+
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
+
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
+ virtual const ImplFontCharMap* GetImplFontCharMap() const;
+ virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
+ const ImplFontData*,
+ sal_Int32* pGlyphIDs,
+ sal_uInt8* pEncoding,
+ sal_Int32* pWidths,
+ int nGlyphs,
+ FontSubsetInfo& rInfo
+ );
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
+ virtual const void* GetEmbedFontData( const ImplFontData*,
+ const sal_Ucs* pUnicodes,
+ sal_Int32* pWidths,
+ FontSubsetInfo& rInfo,
+ long* pDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void GetGlyphWidths( const ImplFontData*,
+ bool bVertical,
+ Int32Vector& rWidths,
+ Ucs2UIntMap& rUnicodeEnc );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual bool supportsOperation( OutDevSupportType ) const;
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
+ virtual void drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ const sal_uInt32* pPoints,
+ PCONSTSALPOINT* pPtAry );
+ virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints,
+ const SalPoint* pPtAry,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uLong nPoints,
+ const SalPoint* pPtAry,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ const sal_uInt32* pPoints,
+ const SalPoint* const* pPtAry,
+ const sal_uInt8* const* pFlgAry );
+
+ virtual void copyArea( long nDestX,
+ long nDestY,
+ long nSrcX,
+ long nSrcY,
+ long nSrcWidth,
+ long nSrcHeight,
+ sal_uInt16 nFlags );
+ virtual void copyBits( const SalTwoRect* pPosAry,
+ SalGraphics* pSrcGraphics );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nTransparentColor );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransparentBitmap );
+ virtual void drawMask( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nMaskColor );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+
+ virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize );
+
+ virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpinst.hxx b/vcl/inc/unx/headless/svpinst.hxx
new file mode 100644
index 000000000000..6fcafe0c7f66
--- /dev/null
+++ b/vcl/inc/unx/headless/svpinst.hxx
@@ -0,0 +1,204 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SALINST_HXX
+#define _SVP_SALINST_HXX
+
+#include <vcl/solarmutex.hxx>
+
+#include <osl/mutex.hxx>
+#include <osl/thread.hxx>
+#include <salinst.hxx>
+#include <salwtype.hxx>
+#include <saltimer.hxx>
+
+#include <list>
+
+#include <time.h> // timeval
+
+#define VIRTUAL_DESKTOP_WIDTH 1024
+#define VIRTUAL_DESKTOP_HEIGHT 768
+#define VIRTUAL_DESKTOP_DEPTH 24
+
+// -------------------------------------------------------------------------
+// SalYieldMutex
+// -------------------------------------------------------------------------
+
+class SvpSalYieldMutex : public ::vcl::SolarMutexObject
+{
+protected:
+ sal_uLong mnCount;
+ oslThreadIdentifier mnThreadId;
+
+public:
+ SvpSalYieldMutex();
+
+ virtual void acquire();
+ virtual void release();
+ virtual sal_Bool tryToAcquire();
+
+ sal_uLong GetAcquireCount() const { return mnCount; }
+ oslThreadIdentifier GetThreadId() const { return mnThreadId; }
+};
+
+// ---------------
+// - SalTimer -
+// ---------------
+class SvpSalInstance;
+class SvpSalTimer : public SalTimer
+{
+ SvpSalInstance* m_pInstance;
+public:
+ SvpSalTimer( SvpSalInstance* pInstance ) : m_pInstance( pInstance ) {}
+ virtual ~SvpSalTimer();
+
+ // overload all pure virtual methods
+ virtual void Start( sal_uLong nMS );
+ virtual void Stop();
+};
+
+// ---------------
+// - SalInstance -
+// ---------------
+class SvpSalFrame;
+class SvpSalInstance : public SalInstance
+{
+ timeval m_aTimeout;
+ sal_uLong m_nTimeoutMS;
+ int m_pTimeoutFDS[2];
+ SvpSalYieldMutex m_aYieldMutex;
+
+ // internal event queue
+ struct SalUserEvent
+ {
+ const SalFrame* m_pFrame;
+ void* m_pData;
+ sal_uInt16 m_nEvent;
+
+ SalUserEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent = SALEVENT_USEREVENT )
+ : m_pFrame( pFrame ),
+ m_pData( pData ),
+ m_nEvent( nEvent )
+ {}
+ };
+
+ oslMutex m_aEventGuard;
+ std::list< SalUserEvent > m_aUserEvents;
+
+ std::list< SalFrame* > m_aFrames;
+
+ bool isFrameAlive( const SalFrame* pFrame ) const;
+
+public:
+ static SvpSalInstance* s_pDefaultInstance;
+
+ SvpSalInstance();
+ virtual ~SvpSalInstance();
+
+ void PostEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent );
+ void CancelEvent( const SalFrame* pFrame, void* pData, sal_uInt16 nEvent );
+
+ void StartTimer( sal_uLong nMS );
+ void StopTimer();
+ void Wakeup();
+
+ void registerFrame( SalFrame* pFrame ) { m_aFrames.push_back( pFrame ); }
+ void deregisterFrame( SalFrame* pFrame );
+ const std::list< SalFrame* >& getFrames() const { return m_aFrames; }
+
+ bool CheckTimeout( bool bExecuteTimers = true );
+
+ // Frame
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uLong nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uLong nStyle );
+ virtual void DestroyFrame( SalFrame* pFrame );
+
+ // Object (System Child Window)
+ virtual SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True );
+ virtual void DestroyObject( SalObject* pObject );
+
+ // VirtualDevice
+ // nDX and nDY in Pixel
+ // nBitCount: 0 == Default(=as window) / 1 == Mono
+ // pData allows for using a system dependent graphics or device context
+ virtual SalVirtualDevice* CreateVirtualDevice( SalGraphics* pGraphics,
+ long nDX, long nDY,
+ sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL );
+ virtual void DestroyVirtualDevice( SalVirtualDevice* pDevice );
+
+ // Printer
+ // pSetupData->mpDriverData can be 0
+ // pSetupData must be updatet with the current
+ // JobSetup
+ 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 String GetDefaultPrinter();
+
+ // SalTimer
+ virtual SalTimer* CreateSalTimer();
+ // SalI18NImeStatus
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ // SalSystem
+ virtual SalSystem* CreateSalSystem();
+ // SalBitmap
+ virtual SalBitmap* CreateSalBitmap();
+
+ // YieldMutex
+ virtual osl::SolarMutex* GetYieldMutex();
+ virtual sal_uLong ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uLong nCount );
+ virtual bool CheckYieldMutex();
+
+ // wait next event and dispatch
+ // must returned by UserEvent (SalFrame::PostEvent)
+ // and timer
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( sal_uInt16 nType );
+
+ // may return NULL to disable session management
+ virtual SalSession* CreateSalSession();
+
+ virtual void* GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes );
+
+ virtual void AddToRecentDocumentList(const rtl::OUString& rFileUrl, const rtl::OUString& rMimeType);
+
+ virtual void updatePrinterUpdate();
+ virtual void jobStartedPrinterUpdate();
+ virtual void jobEndedPrinterUpdate();
+};
+
+#endif // _SV_SALINST_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpprn.hxx b/vcl/inc/unx/headless/svpprn.hxx
new file mode 100644
index 000000000000..f7e6a671f4b3
--- /dev/null
+++ b/vcl/inc/unx/headless/svpprn.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPPRN_HXX
+#define _SVP_SVPPRN_HXX
+
+#include "vcl/jobdata.hxx"
+
+#include "printergfx.hxx"
+#include "printerjob.hxx"
+#include <unx/salprn.h>
+
+#include "vclpluginapi.h"
+
+class PspGraphics;
+
+class SvpSalInfoPrinter : public PspSalInfoPrinter
+{
+public:
+ virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+};
+
+class SvpSalPrinter : public PspSalPrinter
+{
+public:
+ SvpSalPrinter( SalInfoPrinter* pInfoPrinter ) : PspSalPrinter(pInfoPrinter) {}
+};
+
+#endif // _SVP_SVPPRN_HXX
+
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svppspgraphics.hxx b/vcl/inc/unx/headless/svppspgraphics.hxx
new file mode 100644
index 000000000000..1ce9109918d5
--- /dev/null
+++ b/vcl/inc/unx/headless/svppspgraphics.hxx
@@ -0,0 +1,189 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_PSPGRAPHICS_HXX
+#define _SVP_PSPGRAPHICS_HXX
+
+
+#include "vcl/fontmanager.hxx"
+
+#include "sallayout.hxx"
+#include "salgdi.hxx"
+
+namespace psp { struct JobData; class PrinterGfx; }
+
+class ServerFont;
+class ImplDevFontAttributes;
+class SalInfoPrinter;
+
+class PspGraphics : public SalGraphics
+{
+ psp::JobData* m_pJobData;
+ psp::PrinterGfx* m_pPrinterGfx;
+ String* m_pPhoneNr;
+ bool m_bSwallowFaxNo;
+ String m_aPhoneCollection;
+ bool m_bPhoneCollectionActive;
+
+ ServerFont* m_pServerFont[ MAX_FALLBACK ];
+ bool m_bFontVertical;
+ SalInfoPrinter* m_pInfoPrinter;
+
+protected:
+ 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 );
+
+public:
+ PspGraphics( psp::JobData* pJob, psp::PrinterGfx* pGfx, String* pPhone, bool bSwallow, SalInfoPrinter* pInfoPrinter )
+ : m_pJobData( pJob ),
+ m_pPrinterGfx( pGfx ),
+ m_pPhoneNr( pPhone ),
+ m_bSwallowFaxNo( bSwallow ),
+ m_bPhoneCollectionActive( false ),
+ m_bFontVertical( false ),
+ m_pInfoPrinter( pInfoPrinter )
+ { for( int i = 0; i < MAX_FALLBACK; i++ ) m_pServerFont[i] = 0; }
+ virtual ~PspGraphics();
+
+ // helper methods for sharing with X11SalGraphics
+ static const void* DoGetEmbedFontData( psp::fontID aFont, const sal_Ucs* pUnicodes, sal_Int32* pWidths, FontSubsetInfo& rInfo, long* pDataLen );
+ static void DoFreeEmbedFontData( const void* pData, long nLen );
+ static const Ucs2SIntMap* DoGetFontEncodingVector( psp::fontID aFont, const Ucs2OStrMap** pNonEncoded );
+ static void DoGetGlyphWidths( psp::fontID aFont,
+ bool bVertical,
+ Int32Vector& rWidths,
+ Ucs2UIntMap& rUnicodeEnc );
+ static ImplDevFontAttributes Info2DevFontAttributes( const psp::FastPrintFontInfo& );
+ static void AnnounceFonts( ImplDevFontList*, const psp::FastPrintFontInfo& );
+
+ // overload all pure virtual methods
+ virtual void GetResolution( sal_Int32& rDPIX, sal_Int32& rDPIY );
+ virtual sal_uInt16 GetBitCount() const;
+ virtual long GetGraphicsWidth() const;
+
+ virtual void ResetClipRegion();
+ virtual bool setClipRegion( const Region& );
+
+ virtual void SetLineColor();
+ virtual void SetLineColor( SalColor nSalColor );
+ virtual void SetFillColor();
+ virtual void SetFillColor( SalColor nSalColor );
+ virtual void SetXORMode( bool bSet, bool );
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ virtual void SetROPFillColor( SalROPColor nROPColor );
+
+ virtual void SetTextColor( SalColor nSalColor );
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
+ virtual const ImplFontCharMap* GetImplFontCharMap() const;
+ virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
+ virtual void GetDevFontList( ImplDevFontList* );
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
+ const ImplFontData*,
+ sal_Int32* pGlyphIDs,
+ sal_uInt8* pEncoding,
+ sal_Int32* pWidths,
+ int nGlyphs,
+ FontSubsetInfo& rInfo
+ );
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
+ virtual const void* GetEmbedFontData( const ImplFontData*,
+ const sal_Ucs* pUnicodes,
+ sal_Int32* pWidths,
+ FontSubsetInfo& rInfo,
+ long* pDataLen );
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void GetGlyphWidths( const ImplFontData*,
+ bool bVertical,
+ Int32Vector& rWidths,
+ Ucs2UIntMap& rUnicodeEnc );
+ virtual sal_Bool GetGlyphBoundRect( sal_GlyphId nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( sal_GlyphId nIndex, ::basegfx::B2DPolyPolygon& );
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
+ virtual bool supportsOperation( OutDevSupportType ) const;
+ virtual void drawPixel( long nX, long nY );
+ virtual void drawPixel( long nX, long nY, SalColor nSalColor );
+ virtual void drawLine( long nX1, long nY1, long nX2, long nY2 );
+ virtual void drawRect( long nX, long nY, long nWidth, long nHeight );
+ virtual void drawPolyLine( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uLong nPoints, const SalPoint* pPtAry );
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly,
+ const sal_uInt32* pPoints,
+ PCONSTSALPOINT* pPtAry );
+ virtual sal_Bool drawPolyLineBezier( sal_uLong nPoints,
+ const SalPoint* pPtAry,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uLong nPoints,
+ const SalPoint* pPtAry,
+ const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly,
+ const sal_uInt32* pPoints,
+ const SalPoint* const* pPtAry,
+ const sal_uInt8* const* pFlgAry );
+
+ virtual void copyArea( long nDestX,
+ long nDestY,
+ long nSrcX,
+ long nSrcY,
+ long nSrcWidth,
+ long nSrcHeight,
+ sal_uInt16 nFlags );
+ virtual void copyBits( const SalTwoRect* pPosAry,
+ SalGraphics* pSrcGraphics );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nTransparentColor );
+ virtual void drawBitmap( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ const SalBitmap& rTransparentBitmap );
+ virtual void drawMask( const SalTwoRect* pPosAry,
+ const SalBitmap& rSalBitmap,
+ SalColor nMaskColor );
+ virtual SalBitmap* getBitmap( long nX, long nY, long nWidth, long nHeight );
+ virtual SalColor getPixel( long nX, long nY );
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags );
+ virtual void invert( sal_uLong nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+
+ virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize );
+ virtual bool filterText( const String& rOrigText, String& rNewText, xub_StrLen nIndex, xub_StrLen& rLen, xub_StrLen& rCutStart, xub_StrLen& rCutStop );
+
+ virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
+};
+
+#endif // _SVP_PSPGRAPHICS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/headless/svpvd.hxx b/vcl/inc/unx/headless/svpvd.hxx
new file mode 100644
index 000000000000..211cf36846f9
--- /dev/null
+++ b/vcl/inc/unx/headless/svpvd.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SVP_SVPVD_HXX
+#define _SVP_SVPVD_HXX
+
+#include <salvd.hxx>
+#include "svpelement.hxx"
+
+#include <list>
+
+class SvpSalGraphics;
+
+class SvpSalVirtualDevice : public SalVirtualDevice, public SvpElement
+{
+ sal_uInt16 m_nBitCount;
+ basebmp::BitmapDeviceSharedPtr m_aDevice;
+ std::list< SvpSalGraphics* > m_aGraphics;
+
+public:
+ SvpSalVirtualDevice( sal_uInt16 nBitCount ) : SvpElement(), m_nBitCount(nBitCount) {}
+ virtual ~SvpSalVirtualDevice();
+
+ // SvpElement
+ virtual const basebmp::BitmapDeviceSharedPtr& getDevice() const { return m_aDevice; }
+
+ // SalVirtualDevice
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+
+ virtual sal_Bool SetSize( long nNewDX, long nNewDY );
+ virtual void GetSize( long& rWidth, long& rHeight );
+};
+
+#endif // _SVP_SVPVD_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/salbmp.h b/vcl/inc/unx/salbmp.h
index a389195308d3..0fa69ae5a72f 100644
--- a/vcl/inc/unx/salbmp.h
+++ b/vcl/inc/unx/salbmp.h
@@ -36,6 +36,7 @@
#include <unx/saldisp.hxx>
#include <salbmp.hxx>
#include <vclpluginapi.h>
+#include <list>
struct BitmapBuffer;
class BitmapPalette;
@@ -51,80 +52,118 @@ class VCLPLUG_GEN_PUBLIC X11SalBitmap : public SalBitmap
{
private:
- static BitmapBuffer* ImplCreateDIB( const Size& rSize,
- sal_uInt16 nBitCount,
- const BitmapPalette& rPal );
- static BitmapBuffer* ImplCreateDIB( Drawable aDrawable,
- int nScreen,
- long nDrawableDepth,
- long nX, long nY,
- long nWidth, long nHeight,
- bool bGrey );
+ static BitmapBuffer* ImplCreateDIB(
+ const Size& rSize,
+ sal_uInt16 nBitCount,
+ const BitmapPalette& rPal
+ );
+
+ static BitmapBuffer* ImplCreateDIB(
+ Drawable aDrawable,
+ int nScreen,
+ long nDrawableDepth,
+ long nX,
+ long nY,
+ long nWidth,
+ long nHeight,
+ bool bGrey
+ );
public:
static ImplSalBitmapCache* mpCache;
- static sal_uIntPtr mnCacheInstCount;
+ static sal_uIntPtr mnCacheInstCount;
static void ImplCreateCache();
static void ImplDestroyCache();
void ImplRemovedFromCache();
bool SnapShot (Display* pDisplay, XLIB_Window hWindow);
- bool ImplCreateFromXImage( Display* pDisplay,
- XLIB_Window hWindow,
- int nScreen,
- XImage* pImage);
+ bool ImplCreateFromXImage(
+ Display* pDisplay,
+ XLIB_Window hWindow,
+ int nScreen,
+ XImage* pImage
+ );
private:
-
BitmapBuffer* mpDIB;
ImplSalDDB* mpDDB;
bool mbGrey;
public:
- SAL_DLLPRIVATE bool ImplCreateFromDrawable( Drawable aDrawable,
- int nScreen,
- long nDrawableDepth,
- long nX, long nY,
- long nWidth, long nHeight );
-
- SAL_DLLPRIVATE XImage* ImplCreateXImage( SalDisplay* pSalDisp,
- int nScreen, long nDepth,
- const SalTwoRect& rTwoRect ) const;
-
- SAL_DLLPRIVATE ImplSalDDB* ImplGetDDB( Drawable, int nScreen, long nDrawableDepth,
- const SalTwoRect& ) const;
- void ImplDraw( Drawable aDrawable, int nScreen, long nDrawableDepth,
- const SalTwoRect& rTwoRect, const GC& rGC ) const;
+ SAL_DLLPRIVATE bool ImplCreateFromDrawable(
+ Drawable aDrawable,
+ int nScreen,
+ long nDrawableDepth,
+ long nX,
+ long nY,
+ long nWidth,
+ long nHeight
+ );
+
+ SAL_DLLPRIVATE XImage* ImplCreateXImage(
+ SalDisplay* pSalDisp,
+ int nScreen,
+ long nDepth,
+ const SalTwoRect& rTwoRect
+ ) const;
+
+ SAL_DLLPRIVATE ImplSalDDB* ImplGetDDB(
+ Drawable,
+ int nScreen,
+ long nDrawableDepth,
+ const SalTwoRect&
+ ) const;
+
+ void ImplDraw(
+ Drawable aDrawable,
+ int nScreen,
+ long nDrawableDepth,
+ const SalTwoRect& rTwoRect,
+ const GC& rGC
+ ) const;
public:
- X11SalBitmap();
- virtual ~X11SalBitmap();
+ X11SalBitmap();
+ virtual ~X11SalBitmap();
// overload pure virtual methods
- virtual bool Create( const Size& rSize,
- sal_uInt16 nBitCount,
- const BitmapPalette& rPal );
- virtual bool Create( const SalBitmap& rSalBmp );
- virtual bool Create( const SalBitmap& rSalBmp,
- SalGraphics* pGraphics );
- virtual bool Create( const SalBitmap& rSalBmp,
- sal_uInt16 nNewBitCount );
- virtual bool Create( const ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XBitmapCanvas > xBitmapCanvas,
+ virtual bool Create(
+ const Size& rSize,
+ sal_uInt16 nBitCount,
+ const BitmapPalette& rPal
+ );
+
+ virtual bool Create( const SalBitmap& rSalBmp );
+ virtual bool Create(
+ const SalBitmap& rSalBmp,
+ SalGraphics* pGraphics
+ );
+
+ virtual bool Create(
+ const SalBitmap& rSalBmp,
+ sal_uInt16 nNewBitCount
+ );
+
+ virtual bool Create(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::rendering::XBitmapCanvas
+ > xBitmapCanvas,
Size& rSize,
- bool bMask = false );
+ bool bMask = false
+ );
- virtual void Destroy();
+ virtual void Destroy();
- virtual Size GetSize() const;
+ virtual Size GetSize() const;
virtual sal_uInt16 GetBitCount() const;
- virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
- virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
- virtual bool GetSystemData( BitmapSystemData& rData );
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+ virtual bool GetSystemData( BitmapSystemData& rData );
};
// --------------
@@ -142,49 +181,81 @@ private:
ImplSalDDB() {}
- static void ImplDraw( Drawable aSrcDrawable, long nSrcDrawableDepth,
- Drawable aDstDrawable, long nDstDrawableDepth,
- long nSrcX, long nSrcY,
- long nDestWidth, long nDestHeight,
- long nDestX, long nDestY, const GC& rGC );
+ static void ImplDraw(
+ Drawable aSrcDrawable,
+ long nSrcDrawableDepth,
+ Drawable aDstDrawable,
+ long nDstDrawableDepth,
+ long nSrcX,
+ long nSrcY,
+ long nDestWidth,
+ long nDestHeight,
+ long nDestX,
+ long nDestY,
+ const GC& rGC
+ );
public:
- ImplSalDDB( XImage* pImage,
- Drawable aDrawable, int nScreen,
- const SalTwoRect& rTwoRect );
- ImplSalDDB( Drawable aDrawable,
- int nScreen,
- long nDrawableDepth,
- long nX, long nY, long nWidth, long nHeight );
- ImplSalDDB( Display* pDisplay,
- XLIB_Window hWindow,
- int nScreen,
- XImage* pImage);
+ ImplSalDDB(
+ XImage* pImage,
+ Drawable aDrawable,
+ int nScreen,
+ const SalTwoRect& rTwoRect
+ );
+
+ ImplSalDDB(
+ Drawable aDrawable,
+ int nScreen,
+ long nDrawableDepth,
+ long nX,
+ long nY,
+ long nWidth,
+ long nHeight
+ );
+
+ ImplSalDDB(
+ Display* pDisplay,
+ XLIB_Window hWindow,
+ int nScreen,
+ XImage* pImage
+ );
+
~ImplSalDDB();
Pixmap ImplGetPixmap() const { return maPixmap; }
long ImplGetWidth() const { return maTwoRect.mnDestWidth; }
long ImplGetHeight() const { return maTwoRect.mnDestHeight; }
long ImplGetDepth() const { return mnDepth; }
- sal_uIntPtr ImplGetMemSize() const { return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 ); }
+ sal_uIntPtr ImplGetMemSize() const
+ {
+ return( ( maTwoRect.mnDestWidth * maTwoRect.mnDestHeight * mnDepth ) >> 3 );
+ }
int ImplGetScreen() const { return mnScreen; }
bool ImplMatches( int nScreen, long nDepth, const SalTwoRect& rTwoRect ) const;
- void ImplDraw( Drawable aDrawable, long nDrawableDepth,
- const SalTwoRect& rTwoRect, const GC& rGC ) const;
+
+ void ImplDraw(
+ Drawable aDrawable,
+ long nDrawableDepth,
+ const SalTwoRect& rTwoRect,
+ const GC& rGC
+ ) const;
};
// ----------------------
// - ImplSalBitmapCache -
// ----------------------
+struct ImplBmpObj;
+
class ImplSalBitmapCache
{
private:
+ typedef ::std::list< ImplBmpObj* > BmpList_impl;
- List maBmpList;
- sal_uIntPtr mnTotalSize;
+ BmpList_impl maBmpList;
+ sal_uIntPtr mnTotalSize;
public:
@@ -198,47 +269,4 @@ public:
#endif // _SV_SALBMP_HXX
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index 7bce61cc9ce7..825c148cfa1f 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -46,7 +46,8 @@ class SalPrinter;
// -=-= typedefs -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
#if defined LINUX || defined NETBSD || defined AIX || \
- defined FREEBSD || defined OPENBSD || defined DRAGONFLY
+ defined FREEBSD || defined OPENBSD || defined DRAGONFLY || \
+ defined ANDROID
#include <pthread.h>
#else
typedef unsigned int pthread_t;
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 6687762c1e9d..194e050df2b0 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -372,7 +372,7 @@ protected:
KeySym nShiftKeySym_; // first shift modifier
KeySym nCtrlKeySym_; // first control modifier
KeySym nMod1KeySym_; // first mod1 modifier
- ByteString m_aKeyboardName;
+ rtl::OString m_aKeyboardName;
vcl_sal::WMAdaptor* m_pWMAdaptor;
DtIntegrator* m_pDtIntegrator;
@@ -420,8 +420,9 @@ public:
bool DispatchInternalEvent();
void PrintInfo() const;
- void PrintEvent( const ByteString &rComment,
- XEvent *pEvent ) const;
+#ifdef DBG_UTIL
+ void DbgPrintDisplayEvent(const char *pComment, XEvent *pEvent) const;
+#endif
void Beep() const;
diff --git a/vcl/inc/unx/x11_cursors/salcursors.h b/vcl/inc/unx/x11_cursors/salcursors.h
index e0d34e122336..6af2c111fb57 100644
--- a/vcl/inc/unx/x11_cursors/salcursors.h
+++ b/vcl/inc/unx/x11_cursors/salcursors.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -160,3 +161,5 @@
#include "unx/x11_cursors/tblselsw_mask.h"
#include "unx/x11_cursors/paintbrush_curs.h"
#include "unx/x11_cursors/paintbrush_mask.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */