summaryrefslogtreecommitdiff
path: root/vcl/inc/win
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-04-22 15:09:06 +0200
committerJan Holesovsky <kendy@suse.cz>2011-04-22 15:09:06 +0200
commit83380a7805f69b18f432895fc17c53cf0354bf4d (patch)
treeb38d271cb6a768b6c2f9d3bee37d0d88e0472cb4 /vcl/inc/win
parentd5bbd70673a2d5c6f8937428b97111e9c13fd21f (diff)
parent9e84958536c737f8fdcff4d28664d0c13b9cdc8c (diff)
Merge commit 'ooo/DEV300_m106' into libreoffice-3-4
Conflicts: cppcanvas/source/mtfrenderer/transparencygroupaction.cxx l10ntools/scripts/localize.pl l10ntools/source/directory.cxx l10ntools/source/srciter.cxx padmin/Executable_spadmin.bin.mk padmin/Library_spa.mk svtools/inc/svtools/filter.hxx svtools/inc/svtools/grfmgr.hxx svtools/source/filter/filter.cxx svtools/source/filter/filter2.cxx svtools/source/filter/wmf/emfwr.cxx svtools/source/filter/wmf/enhwmf.cxx svtools/source/filter/wmf/winmtf.cxx svtools/source/filter/wmf/winmtf.hxx svtools/source/filter/wmf/winwmf.cxx svtools/source/filter/wmf/wmfwr.cxx svtools/source/graphic/grfmgr.cxx svtools/source/graphic/grfmgr2.cxx toolkit/source/controls/controlmodelcontainerbase.cxx toolkit/source/controls/unocontrol.cxx toolkit/source/helper/formpdfexport.cxx toolkit/source/helper/unowrapper.cxx vcl/Package_osx.mk vcl/aqua/source/app/salinst.cxx vcl/aqua/source/app/salsys.cxx vcl/aqua/source/dtrans/aqua_service.cxx vcl/aqua/source/dtrans/test_aquacb.cxx vcl/aqua/source/res/makefile.mk vcl/aqua/source/window/salframe.cxx vcl/aqua/source/window/salframeview.mm vcl/inc/aqua/salgdi.h vcl/inc/aqua/salinst.h vcl/inc/graphite_adaptors.hxx vcl/inc/graphite_cache.hxx vcl/inc/graphite_serverfont.hxx vcl/inc/impprn.hxx vcl/inc/svdata.hxx vcl/inc/unx/i18n_status.hxx vcl/inc/unx/saldata.hxx vcl/inc/unx/salfont.h vcl/inc/unx/salinst.h vcl/inc/unx/salprn.h vcl/inc/unx/salsys.h vcl/inc/unx/sm.hxx vcl/inc/vcl/gdimtf.hxx vcl/inc/vcl/graph.hxx vcl/inc/vcl/outdev.hxx vcl/inc/vcl/polyscan.hxx vcl/inc/vcl/svcompat.hxx vcl/inc/vcl/svgread.hxx vcl/inc/vcl/unobrok.hxx vcl/inc/win/salgdi.h vcl/inc/win/wincomp.hxx vcl/prj/d.lst vcl/source/app/dbggui.cxx vcl/source/app/idlemgr.cxx vcl/source/app/makefile.mk vcl/source/app/settings.cxx vcl/source/app/sound.cxx vcl/source/app/stdtext.cxx vcl/source/app/svapp.cxx vcl/source/app/svdata.cxx vcl/source/app/svmain.cxx vcl/source/app/timer.cxx vcl/source/app/unohelp.cxx vcl/source/components/dtranscomp.cxx vcl/source/control/button.cxx vcl/source/control/combobox.cxx vcl/source/control/ctrl.cxx vcl/source/control/edit.cxx vcl/source/control/field2.cxx vcl/source/control/ilstbox.cxx vcl/source/gdi/bitmap.cxx vcl/source/gdi/bitmapex.cxx vcl/source/gdi/cvtgrf.cxx vcl/source/gdi/font.cxx vcl/source/gdi/image.cxx vcl/source/gdi/imagerepository.cxx vcl/source/gdi/impbmp.cxx vcl/source/gdi/impgraph.cxx vcl/source/gdi/impimagetree.cxx vcl/source/gdi/jobset.cxx vcl/source/gdi/makefile.mk vcl/source/gdi/metaact.cxx vcl/source/gdi/outdev.cxx vcl/source/gdi/outdev2.cxx vcl/source/gdi/outdev5.cxx vcl/source/gdi/outdev6.cxx vcl/source/gdi/outmap.cxx vcl/source/gdi/polyscan.cxx vcl/source/gdi/print.cxx vcl/source/gdi/print2.cxx vcl/source/gdi/region.cxx vcl/source/gdi/salgdilayout.cxx vcl/source/gdi/sallayout.cxx vcl/source/gdi/svcompat.cxx vcl/source/gdi/virdev.cxx vcl/source/glyphs/gcach_ftyp.cxx vcl/source/glyphs/gcach_vdev.cxx vcl/source/glyphs/gcach_vdev.hxx vcl/source/glyphs/graphite_adaptors.cxx vcl/source/glyphs/graphite_cache.cxx vcl/source/glyphs/graphite_layout.cxx vcl/source/glyphs/graphite_serverfont.cxx vcl/source/glyphs/graphite_textsrc.hxx vcl/source/glyphs/makefile.mk vcl/source/src/makefile.mk vcl/source/window/accel.cxx vcl/source/window/brdwin.cxx vcl/source/window/btndlg.cxx vcl/source/window/dialog.cxx vcl/source/window/dndevdis.cxx vcl/source/window/dockmgr.cxx vcl/source/window/dockwin.cxx vcl/source/window/floatwin.cxx vcl/source/window/introwin.cxx vcl/source/window/keycod.cxx vcl/source/window/menu.cxx vcl/source/window/msgbox.cxx vcl/source/window/scrwnd.cxx vcl/source/window/split.cxx vcl/source/window/splitwin.cxx vcl/source/window/status.cxx vcl/source/window/syswin.cxx vcl/source/window/tabpage.cxx vcl/source/window/toolbox.cxx vcl/source/window/toolbox2.cxx vcl/source/window/window.cxx vcl/source/window/window2.cxx vcl/source/window/winproc.cxx vcl/source/window/wrkwin.cxx vcl/unx/generic/app/i18n_cb.cxx vcl/unx/generic/app/i18n_ic.cxx vcl/unx/generic/app/saldata.cxx vcl/unx/generic/app/saldisp.cxx vcl/unx/generic/app/salinst.cxx vcl/unx/generic/app/wmadaptor.cxx vcl/unx/generic/fontmanager/afm_hash.cpp vcl/unx/generic/gdi/salbmp.cxx vcl/unx/generic/gdi/salgdi3.cxx vcl/unx/generic/gdi/xrender_peer.cxx vcl/unx/generic/window/salframe.cxx vcl/unx/generic/window/salobj.cxx vcl/unx/gtk/a11y/makefile.mk vcl/unx/gtk/app/gtksys.cxx vcl/unx/gtk/app/makefile.mk vcl/unx/gtk/window/gtkframe.cxx vcl/unx/gtk/window/gtkobject.cxx vcl/unx/headless/svpinst.cxx vcl/unx/headless/svpinst.hxx vcl/unx/headless/svpprn.hxx vcl/unx/kde/kdedata.cxx vcl/unx/kde/salnativewidgets-kde.cxx vcl/unx/kde4/KDESalDisplay.hxx vcl/unx/kde4/KDEXLib.cxx vcl/unx/kde4/KDEXLib.hxx vcl/unx/kde4/VCLKDEApplication.cxx vcl/unx/kde4/makefile.mk vcl/unx/source/app/makefile.mk vcl/unx/source/fontmanager/makefile.mk vcl/unx/source/gdi/makefile.mk vcl/unx/source/inc/salcursors.h vcl/util/linksvp/makefile.mk vcl/win/source/app/saldata.cxx vcl/win/source/app/salinst.cxx vcl/win/source/app/salshl.cxx vcl/win/source/gdi/makefile.mk vcl/win/source/gdi/salbmp.cxx vcl/win/source/gdi/salgdi.cxx vcl/win/source/gdi/salgdi2.cxx vcl/win/source/gdi/salgdi3.cxx vcl/win/source/gdi/salgdi_gdiplus.cxx vcl/win/source/gdi/salprn.cxx vcl/win/source/gdi/salvd.cxx vcl/win/source/gdi/winlayout.cxx vcl/win/source/window/salframe.cxx vcl/win/source/window/salmenu.cxx vcl/win/source/window/salobj.cxx
Diffstat (limited to 'vcl/inc/win')
-rwxr-xr-xvcl/inc/win/salbmp.h93
-rw-r--r--vcl/inc/win/saldata.hxx378
-rwxr-xr-xvcl/inc/win/salframe.h155
-rw-r--r--vcl/inc/win/salgdi.h432
-rw-r--r--vcl/inc/win/salids.hrc120
-rw-r--r--vcl/inc/win/salinst.h105
-rwxr-xr-xvcl/inc/win/salmenu.h78
-rwxr-xr-xvcl/inc/win/salnativewidgets.h55
-rwxr-xr-xvcl/inc/win/salobj.h73
-rwxr-xr-xvcl/inc/win/salprn.h132
-rwxr-xr-xvcl/inc/win/salsys.h94
-rwxr-xr-xvcl/inc/win/saltimer.h47
-rwxr-xr-xvcl/inc/win/salvd.h63
-rw-r--r--vcl/inc/win/svsys.h39
-rwxr-xr-xvcl/inc/win/wincomp.hxx264
15 files changed, 2128 insertions, 0 deletions
diff --git a/vcl/inc/win/salbmp.h b/vcl/inc/win/salbmp.h
new file mode 100755
index 000000000000..5cf92bcf3591
--- /dev/null
+++ b/vcl/inc/win/salbmp.h
@@ -0,0 +1,93 @@
+/* -*- 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 _SV_SALBMP_H
+#define _SV_SALBMP_H
+
+#include <tools/gen.hxx>
+#include <win/wincomp.hxx>
+#include <salbmp.hxx>
+
+// --------------
+// - SalBitmap -
+// --------------
+
+struct BitmapBuffer;
+class BitmapColor;
+class BitmapPalette;
+class SalGraphics;
+
+class WinSalBitmap : public SalBitmap
+{
+private:
+
+ Size maSize;
+ HGLOBAL mhDIB;
+ HBITMAP mhDDB;
+ sal_uInt16 mnBitCount;
+
+public:
+
+ HGLOBAL ImplGethDIB() const { return mhDIB; }
+ HBITMAP ImplGethDDB() const { return mhDDB; }
+
+ static HGLOBAL ImplCreateDIB( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
+ static HANDLE ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB );
+ static sal_uInt16 ImplGetDIBColorCount( HGLOBAL hDIB );
+ static void ImplDecodeRLEBuffer( const BYTE* pSrcBuf, BYTE* pDstBuf,
+ const Size& rSizePixel, bool bRLE4 );
+
+public:
+
+ WinSalBitmap();
+ virtual ~WinSalBitmap();
+
+public:
+
+ bool Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle );
+ virtual bool Create( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal );
+ virtual bool Create( const SalBitmap& rSalBmpImpl );
+ virtual bool Create( const SalBitmap& rSalBmpImpl, SalGraphics* pGraphics );
+ virtual bool Create( const SalBitmap& rSalBmpImpl, 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 { return maSize; }
+ virtual sal_uInt16 GetBitCount() const { return mnBitCount; }
+
+ virtual BitmapBuffer* AcquireBuffer( bool bReadOnly );
+ virtual void ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly );
+ virtual bool GetSystemData( BitmapSystemData& rData );
+};
+
+#endif // _SV_SALBMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
new file mode 100644
index 000000000000..ca0a19f4361a
--- /dev/null
+++ b/vcl/inc/win/saldata.hxx
@@ -0,0 +1,378 @@
+/* -*- 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 _SV_SALDATA_HXX
+#define _SV_SALDATA_HXX
+
+#include "osl/module.h"
+
+#include <svdata.hxx>
+#include <salwtype.hxx>
+
+#include <win/wincomp.hxx>
+
+#include <set> // for hMenu validation
+#include <map>
+
+class AutoTimer;
+class WinSalInstance;
+class WinSalObject;
+class WinSalFrame;
+class WinSalVirtualDevice;
+class WinSalPrinter;
+class Font;
+struct HDCCache;
+struct TempFontItem;
+
+typedef HRESULT (WINAPI *DwmIsCompositionEnabled_ptr)(BOOL*);
+
+// --------------------
+// - Standard-Defines -
+// --------------------
+
+#define MAX_STOCKPEN 4
+#define MAX_STOCKBRUSH 4
+#define SAL_CLIPRECT_COUNT 16
+
+// --------------------
+// - Icon cache -
+// --------------------
+
+struct SalIcon
+{
+ int nId;
+ HICON hIcon;
+ HICON hSmallIcon;
+ SalIcon *pNext;
+};
+
+// -----------
+// - SalData -
+// -----------
+
+class SalData
+{
+public:
+ SalData();
+ ~SalData();
+
+ // native widget framework
+ void initNWF();
+ void deInitNWF();
+
+ // fill maVKMap;
+ void initKeyCodeMap();
+
+ // checks if the menuhandle was created by VCL
+ sal_Bool IsKnownMenuHandle( HMENU hMenu );
+
+public:
+ HINSTANCE mhInst; // default instance handle
+ HINSTANCE mhPrevInst; // previous instance handle
+ int mnCmdShow; // default frame show style
+ HPALETTE mhDitherPal; // dither palette
+ HGLOBAL mhDitherDIB; // dither memory handle
+ BYTE* mpDitherDIB; // dither memory
+ BYTE* mpDitherDIBData; // beginning of DIB data
+ long* mpDitherDiff; // Dither mapping table
+ BYTE* mpDitherLow; // Dither mapping table
+ BYTE* mpDitherHigh; // Dither mapping table
+ sal_uLong mnTimerMS; // Current Time (in MS) of the Timer
+ sal_uLong mnTimerOrgMS; // Current Original Time (in MS)
+ DWORD mnNextTimerTime;
+ DWORD mnLastEventTime;
+ UINT mnTimerId; // windows timer id
+ sal_Bool mbInTimerProc; // timer event is currently being dispatched
+ HHOOK mhSalObjMsgHook; // hook to get interesting msg for SalObject
+ HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
+ AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
+ WinSalInstance* mpFirstInstance; // pointer of first instance
+ WinSalFrame* mpFirstFrame; // pointer of first frame
+ WinSalObject* mpFirstObject; // pointer of first object window
+ WinSalVirtualDevice* mpFirstVD; // first VirDev
+ WinSalPrinter* mpFirstPrinter; // first printing printer
+ HDCCache* mpHDCCache; // Cache for three DC's
+ HBITMAP mh50Bmp; // 50% Bitmap
+ HBRUSH mh50Brush; // 50% Brush
+ COLORREF maStockPenColorAry[MAX_STOCKPEN];
+ COLORREF maStockBrushColorAry[MAX_STOCKBRUSH];
+ HPEN mhStockPenAry[MAX_STOCKPEN];
+ HBRUSH mhStockBrushAry[MAX_STOCKBRUSH];
+ sal_uInt16 mnStockPenCount; // count of static pens
+ sal_uInt16 mnStockBrushCount; // count of static brushes
+ WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll
+ BYTE mnCacheDCInUse; // count of CacheDC in use
+ sal_Bool mbObjClassInit; // is SALOBJECTCLASS initialised
+ sal_Bool mbInPalChange; // is in WM_QUERYNEWPALETTE
+ DWORD mnAppThreadId; // Id from Applikation-Thread
+ BOOL mbScrSvrEnabled; // ScreenSaver enabled
+ int mnSageStatus; // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden)
+ SysAgt_Enable_PROC mpSageEnableProc; // funktion to deactivate the system agent
+ SalIcon* mpFirstIcon; // icon cache, points to first icon, NULL if none
+ TempFontItem* mpTempFontItem;
+ sal_Bool mbThemeChanged; // true if visual theme was changed: throw away theme handles
+ sal_Bool mbThemeMenuSupport;
+
+ // for GdiPlus GdiplusStartup/GdiplusShutdown
+ ULONG_PTR gdiplusToken;
+
+ std::set< HMENU > mhMenuSet; // keeps track of menu handles created by VCL, used by IsKnownMenuHandle()
+ std::map< UINT,sal_uInt16 > maVKMap; // map some dynamic VK_* entries
+ oslModule maDwmLib;
+ DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled;
+};
+
+inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; }
+inline SalData* GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; }
+inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; }
+
+// --------------
+// - SalShlData -
+// --------------
+
+struct SalShlData
+{
+ HINSTANCE mhInst; // Instance of SAL-DLL
+ UINT mnWheelScrollLines; // WheelScrollLines
+ UINT mnWheelScrollChars; // WheelScrollChars
+ UINT mnWheelMsgId; // Wheel-Message-Id fuer W95
+ BOOL mbWXP; // Windows XP
+ BOOL mbWPrinter; // true: use unicode printer functions
+ // false: use anis compat printer functions
+ OSVERSIONINFO maVersionInfo;
+};
+
+extern SalShlData aSalShlData;
+
+// ------------
+// - GDICache -
+// ------------
+
+#define CACHESIZE_HDC 3
+#define CACHED_HDC_1 0
+#define CACHED_HDC_2 1
+#define CACHED_HDC_DRAW 2
+#define CACHED_HDC_DEFEXT 64
+
+struct HDCCache
+{
+ HDC mhDC;
+ HPALETTE mhDefPal;
+ HBITMAP mhDefBmp;
+ HBITMAP mhSelBmp;
+ HBITMAP mhActBmp;
+};
+
+void ImplClearHDCCache( SalData* pData );
+HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp = 0 );
+void ImplReleaseCachedDC( sal_uLong nID );
+
+bool ImplAddTempFont( SalData&, const String& rFontFileURL );
+void ImplReleaseTempFonts( SalData& );
+
+// --------------------------------------------
+// - SALSHL.CXX - for accessing DLL resources -
+// --------------------------------------------
+
+HCURSOR ImplLoadSalCursor( int nId );
+HBITMAP ImplLoadSalBitmap( int nId );
+sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon );
+
+// SALGDI.CXX
+void ImplInitSalGDI();
+void ImplFreeSalGDI();
+
+// --------------
+// - Prototypes -
+// --------------
+
+// \\WIN\SOURCE\APP\SALINST.CXX
+void ImplSalYieldMutexAcquireWithWait();
+sal_Bool ImplSalYieldMutexTryToAcquire();
+void ImplSalYieldMutexAcquire();
+void ImplSalYieldMutexRelease();
+sal_uLong ImplSalReleaseYieldMutex();
+void ImplSalAcquireYieldMutex( sal_uLong nCount );
+sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg );
+
+// \\WIN\SOURCE\WINDOW\SALFRAME.CXX
+LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
+LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
+// \SV\WIN\SOURCE\APP\SALTIMER.CXX
+#define SALTIMERPROC_RECURSIVE 0xffffffff
+void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime );
+
+// \WIN\SOURCE\WINDOW\SALFRAME.CXX
+void SalTestMouseLeave();
+sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall );
+
+// \WIN\SOURCE\WINDOW\SALFRAME.CXX
+long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
+long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam );
+sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
+
+// \WIN\SOURCE\WINDOW\SALOBJ.CXX
+WinSalObject* ImplFindSalObject( HWND hWndChild );
+sal_Bool ImplSalPreDispatchMsg( MSG* pMsg );
+void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
+
+// \WIN\SOURCE\GDI\SALGDI3.CXX
+void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA& rLogFont, Font& rFont );
+void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont );
+bool ImplIsFontAvailable( HDC hDC, const UniString& rName );
+
+// \WIN\SOURCE\APP\SALDATA.CXX
+rtl_TextEncoding ImplSalGetSystemEncoding();
+ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE );
+UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
+int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
+
+// -----------
+// - Defines -
+// -----------
+
+#define SAL_FRAME_WNDEXTRA sizeof( DWORD )
+#define SAL_FRAME_THIS 0
+#define SAL_FRAME_CLASSNAMEA "SALFRAME"
+#define SAL_FRAME_CLASSNAMEW L"SALFRAME"
+#define SAL_SUBFRAME_CLASSNAMEA "SALSUBFRAME"
+#define SAL_SUBFRAME_CLASSNAMEW L"SALSUBFRAME"
+#define SAL_TMPSUBFRAME_CLASSNAMEW L"SALTMPSUBFRAME"
+#define SAL_OBJECT_WNDEXTRA sizeof( DWORD )
+#define SAL_OBJECT_THIS 0
+#define SAL_OBJECT_CLASSNAMEA "SALOBJECT"
+#define SAL_OBJECT_CLASSNAMEW L"SALOBJECT"
+#define SAL_OBJECT_CHILDCLASSNAMEA "SALOBJECTCHILD"
+#define SAL_OBJECT_CHILDCLASSNAMEW L"SALOBJECTCHILD"
+#define SAL_COM_CLASSNAMEA "SALCOMWND"
+#define SAL_COM_CLASSNAMEW L"SALCOMWND"
+
+#define SAL_MOUSELEAVE_TIMEOUT 300
+
+// wParam == hDC; lParam == 0
+#define SAL_MSG_PRINTABORTJOB (WM_USER+110)
+// wParam == bWait; lParam == 0
+#define SAL_MSG_THREADYIELD (WM_USER+111)
+// wParam == 0; lParam == 0
+#define SAL_MSG_RELEASEWAITYIELD (WM_USER+112)
+// wParam == 0; lParam == nMS
+#define SAL_MSG_STARTTIMER (WM_USER+113)
+// wParam == nFrameStyle; lParam == pParent; lResult == pFrame
+#define SAL_MSG_CREATEFRAME (WM_USER+114)
+// wParam == 0; lParam == 0
+#define SAL_MSG_DESTROYFRAME (WM_USER+115)
+// wParam == 0; lParam == pParent; lResult == pObject
+#define SAL_MSG_CREATEOBJECT (WM_USER+116)
+// wParam == 0; lParam == pObject;
+#define SAL_MSG_DESTROYOBJECT (WM_USER+117)
+// wParam == hWnd; lParam == 0; lResult == hDC
+#define SAL_MSG_GETDC (WM_USER+120)
+// wParam == hWnd; lParam == 0
+#define SAL_MSG_RELEASEDC (WM_USER+121)
+// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
+#define SAL_MSG_RECREATEHWND (WM_USER+122)
+// wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
+#define SAL_MSG_RECREATECHILDHWND (WM_USER+123)
+// wParam == 0; lParam == HWND;
+#define SAL_MSG_DESTROYHWND (WM_USER+124)
+
+// wParam == 0; lParam == pData
+#define SAL_MSG_USEREVENT (WM_USER+130)
+// wParam == 0; lParam == MousePosition relativ to upper left of screen
+#define SAL_MSG_MOUSELEAVE (WM_USER+131)
+// NULL-Message, soll nicht verarbeitet werden
+#define SAL_MSG_DUMMY (WM_USER+132)
+// wParam == 0; lParam == 0
+#define SAL_MSG_POSTFOCUS (WM_USER+133)
+// wParam == wParam; lParam == lParam
+#define SAL_MSG_POSTQUERYNEWPAL (WM_USER+134)
+// wParam == wParam; lParam == lParam
+#define SAL_MSG_POSTPALCHANGED (WM_USER+135)
+// wParam == wParam; lParam == lParam
+#define SAL_MSG_POSTMOVE (WM_USER+136)
+// wParam == wParam; lParam == lParam
+#define SAL_MSG_POSTCALLSIZE (WM_USER+137)
+// wParam == pRECT; lParam == 0
+#define SAL_MSG_POSTPAINT (WM_USER+138)
+// wParam == 0; lParam == pFrame; lResult 0
+#define SAL_MSG_FORCEPALETTE (WM_USER+139)
+// wParam == 0; lParam == 0
+#define SAL_MSG_CAPTUREMOUSE (WM_USER+140)
+// wParam == 0; lParam == 0
+#define SAL_MSG_RELEASEMOUSE (WM_USER+141)
+// wParam == nFlags; lParam == 0
+#define SAL_MSG_TOTOP (WM_USER+142)
+// wParam == bVisible; lParam == 0
+#define SAL_MSG_SHOW (WM_USER+143)
+// wParam == 0; lParam == SalInputContext
+#define SAL_MSG_SETINPUTCONTEXT (WM_USER+144)
+// wParam == nFlags; lParam == 0
+#define SAL_MSG_ENDEXTTEXTINPUT (WM_USER+145)
+// POSTTIMER-Message; wparam = 0, lParam == time
+#define SAL_MSG_POSTTIMER (WM_USER+161)
+
+// SysChild-ToTop; wParam = 0; lParam = 0
+#define SALOBJ_MSG_TOTOP (WM_USER+160)
+// POSTFOCUS-Message; wParam == bFocus; lParam == 0
+#define SALOBJ_MSG_POSTFOCUS (WM_USER+161)
+
+
+// -----------------
+// - Helpfunctions -
+// -----------------
+
+// A/W-Wrapper
+BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
+BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
+LONG ImplDispatchMessage( CONST MSG *lpMsg );
+
+inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis )
+{
+ SetWindowLongPtr( hWnd, SAL_FRAME_THIS, (LONG_PTR)pThis );
+}
+
+inline WinSalFrame* GetWindowPtr( HWND hWnd )
+{
+ return (WinSalFrame*)GetWindowLongPtrW( hWnd, SAL_FRAME_THIS );
+}
+
+inline void SetSalObjWindowPtr( HWND hWnd, WinSalObject* pThis )
+{
+ SetWindowLongPtr( hWnd, SAL_OBJECT_THIS, (LONG_PTR)pThis );
+}
+
+inline WinSalObject* GetSalObjWindowPtr( HWND hWnd )
+{
+ return (WinSalObject*)GetWindowLongPtr( hWnd, SAL_OBJECT_THIS );
+}
+
+#endif // _SV_SALDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
new file mode 100755
index 000000000000..e62d60196a1e
--- /dev/null
+++ b/vcl/inc/win/salframe.h
@@ -0,0 +1,155 @@
+/* -*- 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 _SV_SALFRAME_H
+#define _SV_SALFRAME_H
+
+#include <vcl/sysdata.hxx>
+#include <salframe.hxx>
+
+class WinSalGraphics;
+
+// ----------------
+// - WinSalFrame -
+// ----------------
+
+class WinSalFrame : public SalFrame
+{
+public:
+ HWND mhWnd; // Window handle
+ HCURSOR mhCursor; // cursor handle
+ HIMC mhDefIMEContext; // default IME-Context
+ WinSalGraphics* mpGraphics; // current frame graphics
+ WinSalGraphics* mpGraphics2; // current frame graphics for other threads
+ WinSalFrame* mpNextFrame; // pointer to next frame
+ HMENU mSelectedhMenu; // the menu where highlighting is currently going on
+ HMENU mLastActivatedhMenu; // the menu that was most recently opened
+ SystemEnvData maSysData; // system data
+ SalFrameState maState; // frame state
+ int mnShowState; // show state
+ long mnWidth; // client width in pixeln
+ long mnHeight; // client height in pixeln
+ int mnMinWidth; // min. client width in pixeln
+ int mnMinHeight; // min. client height in pixeln
+ int mnMaxWidth; // max. client width in pixeln
+ int mnMaxHeight; // max. client height in pixeln
+ RECT maFullScreenRect; // fullscreen rect
+ int mnFullScreenShowState; // fullscreen restore show state
+ UINT mnInputLang; // current Input Language
+ UINT mnInputCodePage; // current Input CodePage
+ sal_uIntPtr mnStyle; // style
+ sal_Bool mbGraphics; // is Graphics used
+ sal_Bool mbCaption; // has window a caption
+ sal_Bool mbBorder; // has window a border
+ sal_Bool mbFixBorder; // has window a fixed border
+ sal_Bool mbSizeBorder; // has window a sizeable border
+ sal_Bool mbNoIcon; // is an window without an icon
+ sal_Bool mbFloatWin; // is a FloatingWindow
+ sal_Bool mbFullScreen; // TRUE: in full screen mode
+ sal_Bool mbPresentation; // TRUE: Presentation Mode running
+ sal_Bool mbInShow; // innerhalb eines Show-Aufrufs
+ sal_Bool mbRestoreMaximize; // Restore-Maximize
+ sal_Bool mbInMoveMsg; // Move-Message wird verarbeitet
+ sal_Bool mbInSizeMsg; // Size-Message wird verarbeitet
+ sal_Bool mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode
+ sal_Bool mbDefPos; // default-position
+ sal_Bool mbOverwriteState; // TRUE: WindowState darf umgesetzt werden
+ sal_Bool mbIME; // TRUE: We are in IME Mode
+ sal_Bool mbHandleIME; // TRUE: Wir handeln die IME-Messages
+ sal_Bool mbSpezIME; // TRUE: Spez IME
+ sal_Bool mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages
+ sal_Bool mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
+ static sal_Bool mbInReparent; // TRUE: ignore focus lost and gain due to reparenting
+
+ RGNDATA* mpClipRgnData;
+ RECT* mpNextClipRect;
+ sal_Bool mbFirstClipRect;
+ sal_Int32 mnDisplay; // Display used for Fullscreen, 0 is primary monitor
+
+ void updateScreenNumber();
+public:
+ WinSalFrame();
+ virtual ~WinSalFrame();
+
+ 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* pSalMenu );
+ virtual void DrawMenuBar();
+ virtual void SetExtendedFrameStyle( SalExtStyle nExtStyle );
+ virtual void Show( sal_Bool bVisible, sal_Bool bNoActivate = 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* );
+ virtual void SetScreenNumber( unsigned int );
+ virtual void SetApplicationID( const rtl::OUString &rApplicationID );
+ virtual void ResetClipRegion();
+ virtual void BeginSetClipRegion( sal_uIntPtr nRects );
+ virtual void UnionClipRegion( long nX, long nY, long nWidth, long nHeight );
+ virtual void EndSetClipRegion();
+};
+
+void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect );
+
+#endif // _SV_SALFRAME_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
new file mode 100644
index 000000000000..b7082baecad7
--- /dev/null
+++ b/vcl/inc/win/salgdi.h
@@ -0,0 +1,432 @@
+/* -*- 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 _SV_SALGDI_H
+#define _SV_SALGDI_H
+
+#include <sallayout.hxx>
+#include <salgdi.hxx>
+#include <outfont.hxx>
+#include <impfont.hxx>
+#include <vcl/fontcapabilities.hxx>
+
+#include "boost/scoped_ptr.hpp"
+#include <boost/unordered_set.hpp>
+
+#ifdef ENABLE_GRAPHITE
+#include <graphite2/Font.h>
+#endif
+
+class ImplFontSelectData;
+class ImplWinFontEntry;
+class ImplFontAttrCache;
+
+// -----------
+// - Defines -
+// -----------
+
+#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
+#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
+
+// win32 platform specific options. Move them to the PMK file?
+
+#define GCP_KERN_HACK
+#define GNG_VERT_HACK
+
+#ifdef ENABLE_GRAPHITE
+class RawFontData;
+class GrFontData
+{
+public:
+ GrFontData(HDC hDC);
+ ~GrFontData();
+ const void * getTable(unsigned int name, size_t *len) const;
+ const gr_face * getFace() const { return mpFace; }
+ void AddReference() { ++mnRefCount; }
+ void DeReference() { if (--mnRefCount == 0) delete this; }
+private:
+ GrFontData(GrFontData &) {};
+ HDC mhDC;
+ mutable std::vector<RawFontData*> mvData;
+ gr_face * mpFace;
+ unsigned int mnRefCount;
+};
+#endif
+
+// win32 specific physically available font face
+class ImplWinFontData : public ImplFontData
+{
+public:
+ explicit ImplWinFontData( const ImplDevFontAttributes&,
+ int nFontHeight, BYTE eWinCharSet,
+ BYTE nPitchAndFamily );
+ virtual ~ImplWinFontData();
+
+ virtual ImplFontData* Clone() const;
+ virtual ImplFontEntry* CreateFontInstance( ImplFontSelectData& ) const;
+ virtual sal_IntPtr GetFontId() const;
+ void SetFontId( sal_IntPtr nId ) { mnId = nId; }
+ void UpdateFromHDC( HDC ) const;
+
+ bool HasChar( sal_uInt32 cChar ) const;
+
+ BYTE GetCharSet() const { return meWinCharSet; }
+ BYTE GetPitchAndFamily() const { return mnPitchAndFamily; }
+ bool IsGlyphApiDisabled() const { return mbDisableGlyphApi; }
+ bool SupportsKorean() const { return mbHasKoreanRange; }
+ bool SupportsCJK() const { return mbHasCJKSupport; }
+ bool SupportsArabic() const { return mbHasArabicSupport; }
+ bool AliasSymbolsHigh() const { return mbAliasSymbolsHigh; }
+ bool AliasSymbolsLow() const { return mbAliasSymbolsLow; }
+#ifdef ENABLE_GRAPHITE
+ bool SupportsGraphite() const { return mbHasGraphiteSupport; }
+ const gr_face* GraphiteFace() const;
+#endif
+
+ const ImplFontCharMap* GetImplFontCharMap() const;
+ bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
+ const Ucs2SIntMap* GetEncodingVector() const { return mpEncodingVector; }
+ void SetEncodingVector( const Ucs2SIntMap* pNewVec ) const
+ {
+ if( mpEncodingVector )
+ delete mpEncodingVector;
+ mpEncodingVector = pNewVec;
+ }
+private:
+ sal_IntPtr mnId;
+
+ // some members that are initalized lazily when the font gets selected into a HDC
+ mutable bool mbDisableGlyphApi;
+ mutable bool mbHasKoreanRange;
+ mutable bool mbHasCJKSupport;
+#ifdef ENABLE_GRAPHITE
+ mutable GrFontData* mpGraphiteData;
+ mutable bool mbHasGraphiteSupport;
+#endif
+ mutable bool mbHasArabicSupport;
+ mutable bool mbFontCapabilitiesRead;
+ mutable ImplFontCharMap* mpUnicodeMap;
+ mutable const Ucs2SIntMap* mpEncodingVector;
+ mutable vcl::FontCapabilities maFontCapabilities;
+
+ // TODO: get rid of the members below needed to work with the Win9x non-unicode API
+ BYTE* mpFontCharSets; // all Charsets for the current font (used on W98 for kerning)
+ BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
+ BYTE meWinCharSet;
+ BYTE mnPitchAndFamily;
+ bool mbAliasSymbolsHigh;
+ bool mbAliasSymbolsLow;
+private:
+ void ReadCmapTable( HDC ) const;
+ void GetFontCapabilities( HDC hDC ) const;
+
+#ifdef GNG_VERT_HACK
+ void ReadGsubTable( HDC ) const;
+
+ typedef boost::unordered_set<sal_UCS4> UcsHashSet;
+ mutable UcsHashSet maGsubTable;
+ mutable bool mbGsubRead;
+public:
+ bool HasGSUBstitutions( HDC ) const;
+ bool IsGSUBstituted( sal_UCS4 ) const;
+#endif // GNG_VERT_HACK
+};
+
+// ------------------
+// - WinSalGraphics -
+// ------------------
+
+class WinSalGraphics : public SalGraphics
+{
+public:
+ HDC mhDC; // HDC
+ HWND mhWnd; // Window-Handle, when Window-Graphics
+ HFONT mhFonts[ MAX_FALLBACK ]; // Font + Fallbacks
+ const ImplWinFontData* mpWinFontData[ MAX_FALLBACK ]; // pointer to the most recent font face
+ ImplWinFontEntry* mpWinFontEntry[ MAX_FALLBACK ]; // pointer to the most recent font instance
+ float mfFontScale[ MAX_FALLBACK ]; // allows metrics emulation of huge font sizes
+ float mfCurrentFontScale;
+ HPEN mhPen; // Pen
+ HBRUSH mhBrush; // Brush
+ HRGN mhRegion; // Region Handle
+ HPEN mhDefPen; // DefaultPen
+ HBRUSH mhDefBrush; // DefaultBrush
+ HFONT mhDefFont; // DefaultFont
+ HPALETTE mhDefPal; // DefaultPalette
+ COLORREF mnPenColor; // PenColor
+ COLORREF mnBrushColor; // BrushColor
+ COLORREF mnTextColor; // TextColor
+ RGNDATA* mpClipRgnData; // ClipRegion-Data
+ RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
+ LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x)
+ ImplFontAttrCache* mpFontAttrCache; // Cache font attributes from files in so/share/fonts
+ BYTE* mpFontCharSets; // All Charsets for the current font
+ BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
+ sal_Bool mbFontKernInit; // FALSE: FontKerns must be queried
+ KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font
+ sal_uIntPtr mnFontKernPairCount;// Number of Kerning Pairs of the current Font
+ int mnPenWidth; // Linienbreite
+ sal_Bool mbStockPen; // is Pen a stockpen
+ sal_Bool mbStockBrush; // is Brush a stcokbrush
+ sal_Bool mbPen; // is Pen (FALSE == NULL_PEN)
+ sal_Bool mbBrush; // is Brush (FALSE == NULL_BRUSH)
+ sal_Bool mbPrinter; // is Printer
+ sal_Bool mbVirDev; // is VirDev
+ sal_Bool mbWindow; // is Window
+ sal_Bool mbScreen; // is Screen compatible
+ bool mbXORMode; // _every_ output with RasterOp XOR
+
+ // remember RGB values for SetLineColor/SetFillColor
+ SalColor maLineColor;
+ SalColor maFillColor;
+
+ HFONT ImplDoSetFont( ImplFontSelectData* i_pFont, float& o_rFontScale, HFONT& o_rOldFont );
+
+public:
+ explicit WinSalGraphics();
+ virtual ~WinSalGraphics();
+
+protected:
+ virtual bool setClipRegion( const Region& );
+ // draw --> LineColor and FillColor and RasterOp and ClipRegion
+ 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_uIntPtr nPoints, const SalPoint* pPtAry );
+ virtual void drawPolygon( sal_uIntPtr nPoints, const SalPoint* pPtAry );
+ virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry );
+ virtual bool drawPolyPolygon( const ::basegfx::B2DPolyPolygon&, double fTransparency );
+ virtual bool drawPolyLine( const ::basegfx::B2DPolygon&, double fTransparency, const ::basegfx::B2DVector& rLineWidth, basegfx::B2DLineJoin );
+ virtual sal_Bool drawPolyLineBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolygonBezier( sal_uIntPtr nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry );
+ virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const BYTE* const* pFlgAry );
+
+ // CopyArea --> No RasterOp, but ClipRegion
+ virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth,
+ long nSrcHeight, sal_uInt16 nFlags );
+
+ // CopyBits and DrawBitmap --> RasterOp and ClipRegion
+ // CopyBits() --> pSrcGraphics == NULL, then CopyBits on same Graphics
+ 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 );
+
+ // invert --> ClipRegion (only Windows or VirDevs)
+ virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags);
+ virtual void invert( sal_uIntPtr nPoints, const SalPoint* pPtAry, SalInvert nFlags );
+
+ virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize );
+
+ // native widget rendering methods that require mirroring
+ virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ const Point& aPos, sal_Bool& rIsInside );
+ virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ ControlState nState, const ImplControlValue& aValue,
+ const rtl::OUString& aCaption );
+ virtual sal_Bool drawNativeControlText( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion,
+ ControlState nState, const ImplControlValue& aValue,
+ const rtl::OUString& aCaption );
+ virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState,
+ const ImplControlValue& aValue, const rtl::OUString& aCaption,
+ Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion );
+
+ 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:
+ // public SalGraphics methods, the interface to teh independent vcl part
+
+ // get device resolution
+ virtual void GetResolution( long& rDPIX, long& rDPIY );
+ // get the depth of the device
+ virtual sal_uInt16 GetBitCount() const;
+ // get the width of the device
+ virtual long GetGraphicsWidth() const;
+
+ // set the clip region to empty
+ virtual void ResetClipRegion();
+
+ // set the line color to transparent (= don't draw lines)
+ virtual void SetLineColor();
+ // set the line color to a specific color
+ virtual void SetLineColor( SalColor nSalColor );
+ // set the fill color to transparent (= don't fill)
+ virtual void SetFillColor();
+ // set the fill color to a specific color, shapes will be
+ // filled accordingly
+ virtual void SetFillColor( SalColor nSalColor );
+ // enable/disable XOR drawing
+ virtual void SetXORMode( bool bSet, bool );
+ // set line color for raster operations
+ virtual void SetROPLineColor( SalROPColor nROPColor );
+ // set fill color for raster operations
+ virtual void SetROPFillColor( SalROPColor nROPColor );
+ // set the text color to a specific color
+ virtual void SetTextColor( SalColor nSalColor );
+ // set the font
+ virtual sal_uInt16 SetFont( ImplFontSelectData*, int nFallbackLevel );
+ // get the current font's etrics
+ virtual void GetFontMetric( ImplFontMetricData*, int nFallbackLevel );
+ // get kernign pairs of the current font
+ // return only PairCount if (pKernPairs == NULL)
+ virtual sal_uLong GetKernPairs( sal_uLong nPairs, ImplKernPairData* pKernPairs );
+ // get the repertoire of the current font
+ virtual const ImplFontCharMap* GetImplFontCharMap() const;
+ // get the layout capabilities of the current font
+ virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const;
+ // graphics must fill supplied font list
+ virtual void GetDevFontList( ImplDevFontList* );
+ // graphics should call ImplAddDevFontSubstitute on supplied
+ // OutputDevice for all its device specific preferred font substitutions
+ virtual void GetDevFontSubstList( OutputDevice* );
+ virtual bool AddTempDevFont( ImplDevFontList*, const String& rFileURL, const String& rFontName );
+ // CreateFontSubset: a method to get a subset of glyhps of a font
+ // inside a new valid font file
+ // returns TRUE if creation of subset was successfull
+ // parameters: rToFile: contains a osl file URL to write the subset to
+ // pFont: describes from which font to create a subset
+ // pGlyphIDs: the glyph ids to be extracted
+ // pEncoding: the character code corresponding to each glyph
+ // pWidths: the advance widths of the correspoding glyphs (in PS font units)
+ // nGlyphs: the number of glyphs
+ // rInfo: additional outgoing information
+ // implementation note: encoding 0 with glyph id 0 should be added implicitly
+ // as "undefined character"
+ virtual sal_Bool CreateFontSubset( const rtl::OUString& rToFile,
+ const ImplFontData*,
+ long* pGlyphIDs,
+ sal_uInt8* pEncoding,
+ sal_Int32* pWidths,
+ int nGlyphs,
+ FontSubsetInfo& rInfo // out parameter
+ );
+
+ // GetFontEncodingVector: a method to get the encoding map Unicode
+ // to font encoded character; this is only used for type1 fonts and
+ // may return NULL in case of unknown encoding vector
+ // if ppNonEncoded is set and non encoded characters (that is type1
+ // glyphs with only a name) exist it is set to the corresponding
+ // map for non encoded glyphs; the encoding vector contains -1
+ // as encoding for these cases
+ virtual const Ucs2SIntMap* GetFontEncodingVector( const ImplFontData*, const Ucs2OStrMap** ppNonEncoded );
+
+ // GetEmbedFontData: gets the font data for a font marked
+ // embeddable by GetDevFontList or NULL in case of error
+ // parameters: pFont: describes the font in question
+ // pWidths: the widths of all glyphs from char code 0 to 255
+ // pWidths MUST support at least 256 members;
+ // rInfo: additional outgoing information
+ // pDataLen: out parameter, contains the byte length of the returned buffer
+ virtual const void* GetEmbedFontData( const ImplFontData*,
+ const sal_Ucs* pUnicodes,
+ sal_Int32* pWidths,
+ FontSubsetInfo& rInfo,
+ long* pDataLen );
+ // frees the font data again
+ virtual void FreeEmbedFontData( const void* pData, long nDataLen );
+ virtual void GetGlyphWidths( const ImplFontData*,
+ bool bVertical,
+ Int32Vector& rWidths,
+ Ucs2UIntMap& rUnicodeEnc );
+ virtual int GetMinKashidaWidth();
+
+ virtual sal_Bool GetGlyphBoundRect( long nIndex, Rectangle& );
+ virtual sal_Bool GetGlyphOutline( long nIndex, ::basegfx::B2DPolyPolygon& );
+
+ virtual SalLayout* GetTextLayout( ImplLayoutArgs&, int nFallbackLevel );
+ virtual void DrawServerFontLayout( const ServerFontLayout& );
+
+ virtual bool supportsOperation( OutDevSupportType ) const;
+ // Query the platform layer for control support
+ virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart );
+
+ virtual SystemGraphicsData GetGraphicsData() const;
+ virtual SystemFontData GetSysFontData( int nFallbacklevel ) const;
+};
+
+// Init/Deinit Graphics
+void ImplSalInitGraphics( WinSalGraphics* );
+void ImplSalDeInitGraphics( WinSalGraphics* );
+void ImplUpdateSysColorEntries();
+int ImplIsSysColorEntry( SalColor nSalColor );
+void ImplGetLogFontFromFontSelect( HDC, const ImplFontSelectData*,
+ LOGFONTW&, bool bTestVerticalAvail );
+
+// -----------
+// - Defines -
+// -----------
+
+#define MAX_64KSALPOINTS ((((sal_uInt16)0xFFFF)-8)/sizeof(POINTS))
+
+// -----------
+// - Inlines -
+// -----------
+
+// #102411# Win's GCP mishandles kerning => we need to do it ourselves
+// SalGraphicsData::mpFontKernPairs is sorted by
+inline bool ImplCmpKernData( const KERNINGPAIR& a, const KERNINGPAIR& b )
+{
+ if( a.wFirst < b.wFirst )
+ return true;
+ if( a.wFirst > b.wFirst )
+ return false;
+ return (a.wSecond < b.wSecond);
+}
+
+// called extremely often from just one spot => inline
+inline bool ImplWinFontData::HasChar( sal_uInt32 cChar ) const
+{
+ if( mpUnicodeMap->HasChar( cChar ) )
+ return true;
+ // second chance to allow symbol aliasing
+ if( mbAliasSymbolsLow && ((cChar-0xF000) <= 0xFF) )
+ cChar -= 0xF000;
+ else if( mbAliasSymbolsHigh && (cChar <= 0xFF) )
+ cChar += 0xF000;
+ else
+ return false;
+ return mpUnicodeMap->HasChar( cChar );
+}
+
+#endif // _SV_SALGDI_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salids.hrc b/vcl/inc/win/salids.hrc
new file mode 100644
index 000000000000..3049f11b551b
--- /dev/null
+++ b/vcl/inc/win/salids.hrc
@@ -0,0 +1,120 @@
+/*************************************************************************
+ *
+ * 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 _SV_SALIDS_HRC
+#define _SV_SALIDS_HRC
+
+// Cursor
+#define SAL_RESID_POINTER_NULL 10000
+#ifndef W40ONLY
+#define SAL_RESID_POINTER_HELP 10001
+#endif
+#ifndef WNT
+#define SAL_RESID_POINTER_HSIZE 10002
+#define SAL_RESID_POINTER_VSIZE 10003
+#define SAL_RESID_POINTER_NESWSIZE 10004
+#define SAL_RESID_POINTER_NWSESIZE 10005
+#endif
+#define SAL_RESID_POINTER_CROSS 10006
+#define SAL_RESID_POINTER_MOVE 10007
+#define SAL_RESID_POINTER_HSPLIT 10008
+#define SAL_RESID_POINTER_VSPLIT 10009
+#define SAL_RESID_POINTER_HSIZEBAR 10010
+#define SAL_RESID_POINTER_VSIZEBAR 10011
+#define SAL_RESID_POINTER_HAND 10012
+#define SAL_RESID_POINTER_REFHAND 10013
+#define SAL_RESID_POINTER_PEN 10014
+#define SAL_RESID_POINTER_MAGNIFY 10015
+#define SAL_RESID_POINTER_FILL 10016
+#define SAL_RESID_POINTER_ROTATE 10017
+#define SAL_RESID_POINTER_HSHEAR 10018
+#define SAL_RESID_POINTER_VSHEAR 10019
+#define SAL_RESID_POINTER_MIRROR 10020
+#define SAL_RESID_POINTER_CROOK 10021
+#define SAL_RESID_POINTER_CROP 10022
+#define SAL_RESID_POINTER_MOVEPOINT 10023
+#define SAL_RESID_POINTER_MOVEBEZIERWEIGHT 10024
+#define SAL_RESID_POINTER_MOVEDATA 10025
+#define SAL_RESID_POINTER_COPYDATA 10026
+#define SAL_RESID_POINTER_LINKDATA 10027
+#define SAL_RESID_POINTER_MOVEDATALINK 10028
+#define SAL_RESID_POINTER_COPYDATALINK 10029
+#define SAL_RESID_POINTER_MOVEFILE 10030
+#define SAL_RESID_POINTER_COPYFILE 10031
+#define SAL_RESID_POINTER_LINKFILE 10032
+#define SAL_RESID_POINTER_MOVEFILELINK 10033
+#define SAL_RESID_POINTER_COPYFILELINK 10034
+#define SAL_RESID_POINTER_MOVEFILES 10035
+#define SAL_RESID_POINTER_COPYFILES 10036
+#define SAL_RESID_POINTER_NOTALLOWED 10037
+#define SAL_RESID_POINTER_DRAW_LINE 10038
+#define SAL_RESID_POINTER_DRAW_RECT 10039
+#define SAL_RESID_POINTER_DRAW_POLYGON 10040
+#define SAL_RESID_POINTER_DRAW_BEZIER 10041
+#define SAL_RESID_POINTER_DRAW_ARC 10042
+#define SAL_RESID_POINTER_DRAW_PIE 10043
+#define SAL_RESID_POINTER_DRAW_CIRCLECUT 10044
+#define SAL_RESID_POINTER_DRAW_ELLIPSE 10045
+#define SAL_RESID_POINTER_DRAW_FREEHAND 10046
+#define SAL_RESID_POINTER_DRAW_CONNECT 10047
+#define SAL_RESID_POINTER_DRAW_TEXT 10048
+#define SAL_RESID_POINTER_DRAW_CAPTION 10049
+#define SAL_RESID_POINTER_CHART 10050
+#define SAL_RESID_POINTER_DETECTIVE 10051
+#define SAL_RESID_POINTER_PIVOT_COL 10052
+#define SAL_RESID_POINTER_PIVOT_ROW 10053
+#define SAL_RESID_POINTER_PIVOT_FIELD 10054
+#define SAL_RESID_POINTER_CHAIN 10055
+#define SAL_RESID_POINTER_CHAIN_NOTALLOWED 10056
+#define SAL_RESID_POINTER_TIMEEVENT_MOVE 10057
+#define SAL_RESID_POINTER_TIMEEVENT_SIZE 10058
+#define SAL_RESID_POINTER_AUTOSCROLL_N 10059
+#define SAL_RESID_POINTER_AUTOSCROLL_S 10060
+#define SAL_RESID_POINTER_AUTOSCROLL_W 10061
+#define SAL_RESID_POINTER_AUTOSCROLL_E 10062
+#define SAL_RESID_POINTER_AUTOSCROLL_NW 10063
+#define SAL_RESID_POINTER_AUTOSCROLL_NE 10064
+#define SAL_RESID_POINTER_AUTOSCROLL_SW 10065
+#define SAL_RESID_POINTER_AUTOSCROLL_SE 10066
+#define SAL_RESID_POINTER_AUTOSCROLL_NS 10067
+#define SAL_RESID_POINTER_AUTOSCROLL_WE 10068
+#define SAL_RESID_POINTER_AUTOSCROLL_NSWE 10069
+#define SAL_RESID_POINTER_AIRBRUSH 10070
+#define SAL_RESID_POINTER_TEXT_VERTICAL 10071
+#define SAL_RESID_POINTER_PIVOT_DELETE 10072
+#define SAL_RESID_POINTER_TAB_SELECT_S 10073
+#define SAL_RESID_POINTER_TAB_SELECT_E 10074
+#define SAL_RESID_POINTER_TAB_SELECT_SE 10075
+#define SAL_RESID_POINTER_TAB_SELECT_W 10076
+#define SAL_RESID_POINTER_TAB_SELECT_SW 10077
+#define SAL_RESID_POINTER_PAINTBRUSH 10078
+
+#define SAL_RESID_BITMAP_50 11000
+
+#define SAL_RESID_ICON_DEFAULT 1
+
+#endif // _SV_SALIDS_HRC
diff --git a/vcl/inc/win/salinst.h b/vcl/inc/win/salinst.h
new file mode 100644
index 000000000000..04ea296e13d4
--- /dev/null
+++ b/vcl/inc/win/salinst.h
@@ -0,0 +1,105 @@
+/* -*- 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 _SV_SALINST_H
+#define _SV_SALINST_H
+
+#include <salinst.hxx>
+
+// -------------------
+// - SalInstanceData -
+// -------------------
+
+class SalYieldMutex;
+
+class WinSalInstance : public SalInstance
+{
+public:
+ HINSTANCE mhInst; // Instance Handle
+ HWND mhComWnd; // window, for communication (between threads and the main thread)
+ SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
+ osl::Mutex* mpSalWaitMutex; // Sal-Wait-Mutex
+ sal_uInt16 mnYieldWaitCount; // Wait-Count
+public:
+ WinSalInstance();
+ virtual ~WinSalInstance();
+
+ virtual SalFrame* CreateChildFrame( SystemParentData* pParent, sal_uIntPtr nStyle );
+ virtual SalFrame* CreateFrame( SalFrame* pParent, sal_uIntPtr 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 String GetDefaultPrinter();
+ virtual SalTimer* CreateSalTimer();
+ virtual SalI18NImeStatus* CreateI18NImeStatus();
+ virtual SalSystem* CreateSalSystem();
+ virtual SalBitmap* CreateSalBitmap();
+ virtual osl::SolarMutex* GetYieldMutex();
+ virtual sal_uIntPtr ReleaseYieldMutex();
+ virtual void AcquireYieldMutex( sal_uIntPtr nCount );
+ virtual bool CheckYieldMutex();
+
+ virtual void Yield( bool bWait, bool bHandleAllCurrentEvents );
+ virtual bool AnyInput( sal_uInt16 nType );
+ virtual SalMenu* CreateMenu( sal_Bool bMenuBar, Menu* );
+ 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);
+
+ static int WorkaroundExceptionHandlingInUSER32Lib(int nExcept, LPEXCEPTION_POINTERS pExceptionInfo);
+};
+
+// --------------
+// - Prototypen -
+// --------------
+
+SalFrame* ImplSalCreateFrame( WinSalInstance* pInst, HWND hWndParent, sal_uIntPtr nSalFrameStyle );
+SalObject* ImplSalCreateObject( WinSalInstance* pInst, WinSalFrame* pParent );
+HWND ImplSalReCreateHWND( HWND hWndParent, HWND oldhWnd, sal_Bool bAsChild );
+void ImplSalStartTimer( sal_uIntPtr nMS, sal_Bool bMutex = sal_False );
+void ImplSalPrinterAbortJobAsync( HDC hPrnDC );
+
+#endif // _SV_SALINST_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salmenu.h b/vcl/inc/win/salmenu.h
new file mode 100755
index 000000000000..99239d7b8191
--- /dev/null
+++ b/vcl/inc/win/salmenu.h
@@ -0,0 +1,78 @@
+/* -*- 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 _SV_SALMENU_H
+#define _SV_SALMENU_H
+
+#include <vcl/bitmap.hxx>
+#include <salmenu.hxx>
+
+class WinSalMenu : public SalMenu
+{
+public:
+ WinSalMenu();
+ virtual ~WinSalMenu();
+ virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars
+ // otherwise only menu messages are processed (eg, OLE on Windows)
+
+ virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos );
+ virtual void RemoveItem( unsigned nPos );
+ virtual void SetSubMenu( SalMenuItem* pSalMenuItem, SalMenu* pSubMenu, unsigned nPos );
+ virtual void SetFrame( const SalFrame* pFrame );
+ virtual void CheckItem( unsigned nPos, sal_Bool bCheck );
+ virtual void EnableItem( unsigned nPos, sal_Bool bEnable );
+ virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const XubString& rText );
+ virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const Image& rImage );
+ virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, const KeyCode& rKeyCode, const XubString& rKeyName );
+ virtual void GetSystemMenuData( SystemMenuData* pData );
+
+ HMENU mhMenu; // the menu handle
+ sal_Bool mbMenuBar; // true for menu bars
+ HWND mhWnd; // the window handle where the menubar is attached, may be NULL
+ WinSalMenu *mpParentMenu; // the parent menu
+};
+
+class WinSalMenuItem : public SalMenuItem
+{
+public:
+ WinSalMenuItem();
+ virtual ~WinSalMenuItem();
+
+
+ MENUITEMINFOW mInfo;
+ void* mpMenu; // pointer to corresponding VCL menu
+ XubString mText; // the item text
+ XubString mAccelText; // the accelerator string
+ Bitmap maBitmap; // item image
+ int mnId; // item id
+ WinSalMenu* mpSalMenu; // the menu where this item is inserted
+};
+
+#endif // _SV_SALMENU_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salnativewidgets.h b/vcl/inc/win/salnativewidgets.h
new file mode 100755
index 000000000000..33ba8de4ba87
--- /dev/null
+++ b/vcl/inc/win/salnativewidgets.h
@@ -0,0 +1,55 @@
+/* -*- 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 _SV_NATIVEWIDGETS_H
+#define _SV_NATIVEWIDGETS_H
+
+
+#ifdef __cplusplus
+
+/* SalControlHandleData:
+ *
+ * Holds platform specific theming data.
+ */
+
+class SalControlHandleData
+{
+ public:
+ SalControlHandleData( void );
+ ~SalControlHandleData( void );
+
+ public:
+ // nothing needed on Win32
+};
+
+
+#endif /* __cplusplus */
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salobj.h b/vcl/inc/win/salobj.h
new file mode 100755
index 000000000000..068d65a611f2
--- /dev/null
+++ b/vcl/inc/win/salobj.h
@@ -0,0 +1,73 @@
+/* -*- 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 _SV_SALOBJ_H
+#define _SV_SALOBJ_H
+
+#include <salobj.hxx>
+
+// -----------------
+// - SalObjectData -
+// -----------------
+
+class WinSalObject : public SalObject
+{
+public:
+ HWND mhWnd; // Window handle
+ HWND mhWndChild; // Child Window handle
+ HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte
+ SystemChildData maSysData; // SystemEnvData
+ RGNDATA* mpClipRgnData; // ClipRegion-Data
+ RGNDATA* mpStdClipRgnData; // Cache Standard-ClipRegion-Data
+ RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
+ sal_Bool mbFirstClipRect; // Flag for first cliprect to insert
+ sal_Bool mbInterceptChildWindowKeyDown; // Intercept the KeyDown event sent to system child window
+ WinSalObject* mpNextObject; // pointer to next object
+
+
+ WinSalObject();
+ virtual ~WinSalObject();
+
+ virtual void ResetClipRegion();
+ virtual sal_uInt16 GetClipRegionType();
+ virtual void BeginSetClipRegion( sal_uIntPtr 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 );
+};
+
+#endif // _SV_SALOBJ_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salprn.h b/vcl/inc/win/salprn.h
new file mode 100755
index 000000000000..6b399f99f971
--- /dev/null
+++ b/vcl/inc/win/salprn.h
@@ -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 _SV_SALPRN_H
+#define _SV_SALPRN_H
+
+#include <salprn.hxx>
+
+// -----------------
+// - SalDriverData -
+// -----------------
+
+// WNT3
+#define SAL_DRIVERDATA_SYSSIGN ((sal_uIntPtr)0x574E5433)
+#define SAL_DRIVERDATA_VERSION_A 1
+#define SAL_DRIVERDATA_VERSION_W 2
+
+#pragma pack( 1 )
+
+struct SalDriverData
+{
+ sal_uIntPtr mnSysSignature;
+ sal_uInt16 mnVersion;
+ sal_uInt16 mnDriverOffset;
+ BYTE maDriverData[1];
+};
+
+#pragma pack()
+
+// ---------------------
+// - WinSalInfoPrinter -
+// ---------------------
+
+class WinSalGraphics;
+
+class WinSalInfoPrinter : public SalInfoPrinter
+{
+public:
+ WinSalGraphics* mpGraphics; // current Printer graphics
+ XubString maDriverName; // printer driver name
+ XubString maDeviceName; // printer device name
+ XubString maPortName; // printer port name
+ HDC mhDC; // printer hdc
+ sal_Bool mbGraphics; // is Graphics used
+public:
+ WinSalInfoPrinter();
+ virtual ~WinSalInfoPrinter();
+
+ virtual SalGraphics* GetGraphics();
+ virtual void ReleaseGraphics( SalGraphics* pGraphics );
+ virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData );
+ virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData );
+ virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData );
+ virtual void GetPageInfo( const ImplJobSetup* pSetupData,
+ long& rOutWidth, long& rOutHeight,
+ long& rPageOffX, long& rPageOffY,
+ long& rPageWidth, long& rPageHeight );
+ virtual sal_uIntPtr GetCapabilities( const ImplJobSetup* pSetupData, sal_uInt16 nType );
+ virtual sal_uIntPtr GetPaperBinCount( const ImplJobSetup* pSetupData );
+ virtual String GetPaperBinName( const ImplJobSetup* pSetupData, sal_uIntPtr nPaperBin );
+ virtual void InitPaperFormats( const ImplJobSetup* pSetupData );
+ virtual int GetLandscapeAngle( const ImplJobSetup* pSetupData );
+};
+
+// -----------------
+// - WinSalPrinter -
+// -----------------
+
+class WinSalPrinter : public SalPrinter
+{
+public:
+ WinSalGraphics* mpGraphics; // current Printer graphics
+ WinSalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ WinSalPrinter* mpNextPrinter; // next printing printer
+ HDC mhDC; // printer hdc
+ sal_uIntPtr mnError; // Error Code
+ sal_uIntPtr mnCopies; // Kopien
+ sal_Bool mbCollate; // Sortierte Kopien
+ sal_Bool mbAbort; // Job Aborted
+
+ bool mbValid;
+
+public:
+ WinSalPrinter();
+ virtual ~WinSalPrinter();
+
+ using SalPrinter::StartJob;
+ virtual sal_Bool StartJob( const XubString* pFileName,
+ const XubString& rJobName,
+ const XubString& rAppName,
+ sal_uIntPtr nCopies,
+ bool bCollate,
+ bool bDirect,
+ ImplJobSetup* pSetupData );
+ virtual sal_Bool EndJob();
+ virtual sal_Bool AbortJob();
+ virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData );
+ virtual sal_Bool EndPage();
+ virtual sal_uIntPtr GetErrorCode();
+
+ void markInvalid();
+ bool isValid() const { return mbValid; }
+};
+
+#endif // _SV_SALPRN_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salsys.h b/vcl/inc/win/salsys.h
new file mode 100755
index 000000000000..6f133b57d15f
--- /dev/null
+++ b/vcl/inc/win/salsys.h
@@ -0,0 +1,94 @@
+/* -*- 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 _SV_SALSYS_H
+#define _SV_SALSYS_H
+
+#include <salsys.hxx>
+
+#include <vector>
+#include <map>
+
+class WinSalSystem : public SalSystem
+{
+ public:
+ struct DisplayMonitor
+ {
+ rtl::OUString m_aName;
+ rtl::OUString m_aDeviceName;
+ Rectangle m_aArea;
+ Rectangle m_aWorkArea;
+ sal_Int32 m_nStateFlags;
+
+ DisplayMonitor() : m_nStateFlags( 0 ) {}
+ DisplayMonitor( const rtl::OUString& rName,
+ const rtl::OUString& rDevName,
+ const Rectangle& rArea,
+ const Rectangle& rWorkArea,
+ DWORD nStateFlags )
+ : m_aName( rName ),
+ m_aDeviceName( rDevName ),
+ m_aArea( rArea ),
+ m_aWorkArea( rWorkArea ),
+ m_nStateFlags( nStateFlags )
+ {
+ }
+ ~DisplayMonitor() {}
+ };
+ private:
+ std::vector<DisplayMonitor> m_aMonitors;
+ std::map<rtl::OUString, unsigned int> m_aDeviceNameToMonitor;
+ unsigned int m_nPrimary;
+public:
+ WinSalSystem() : m_nPrimary( 0 ) {}
+ virtual ~WinSalSystem();
+
+ 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);
+ bool initMonitors();
+ // discards monitorinfo; used by WM_DISPLAYCHANGED handler
+ void clearMonitors();
+ const std::vector<DisplayMonitor>& getMonitors()
+ { initMonitors(); return m_aMonitors;}
+
+ sal_Bool handleMonitorCallback( sal_IntPtr /*HMONITOR*/,
+ sal_IntPtr /*HDC*/,
+ sal_IntPtr /*LPRECT*/ );
+};
+
+#endif // _SV_SALSYS_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
new file mode 100755
index 000000000000..d408e099eaaf
--- /dev/null
+++ b/vcl/inc/win/saltimer.h
@@ -0,0 +1,47 @@
+/* -*- 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 _SV_SALTIMER_H
+#define _SV_SALTIMER_H
+
+#include <saltimer.hxx>
+
+class WinSalTimer : public SalTimer
+{
+public:
+ WinSalTimer() {}
+ virtual ~WinSalTimer();
+
+ // overload all pure virtual methods
+ void Start( sal_uIntPtr nMS );
+ void Stop();
+};
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/salvd.h b/vcl/inc/win/salvd.h
new file mode 100755
index 000000000000..0f213ed5a6f3
--- /dev/null
+++ b/vcl/inc/win/salvd.h
@@ -0,0 +1,63 @@
+/* -*- 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 _SV_SALVD_H
+#define _SV_SALVD_H
+
+#include <salvd.hxx>
+
+class WinSalGraphics;
+
+// -----------------
+// - SalVirDevData -
+// -----------------
+
+class WinSalVirtualDevice : public SalVirtualDevice
+{
+public:
+ HDC mhDC; // HDC or 0 for Cache Device
+ HBITMAP mhBmp; // Memory Bitmap
+ HBITMAP mhDefBmp; // Default Bitmap
+ WinSalGraphics* mpGraphics; // current VirDev graphics
+ WinSalVirtualDevice* mpNext; // next VirDev
+ sal_uInt16 mnBitCount; // BitCount (0 or 1)
+ sal_Bool mbGraphics; // is Graphics used
+ sal_Bool mbForeignDC; // uses a foreign DC instead of a bitmap
+
+ WinSalVirtualDevice();
+ virtual ~WinSalVirtualDevice();
+
+ 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/win/svsys.h b/vcl/inc/win/svsys.h
new file mode 100644
index 000000000000..f7bc87b0c514
--- /dev/null
+++ b/vcl/inc/win/svsys.h
@@ -0,0 +1,39 @@
+/* -*- 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 _SV_SVSYS_H
+#define _SV_SVSYS_H
+
+#ifdef WNT
+#include <prewin.h>
+#include <postwin.h>
+#endif
+
+#endif // _SV_SVSYS_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/wincomp.hxx b/vcl/inc/win/wincomp.hxx
new file mode 100755
index 000000000000..6e20eb8e16e5
--- /dev/null
+++ b/vcl/inc/win/wincomp.hxx
@@ -0,0 +1,264 @@
+/* -*- 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 _SV_WINCOMP_HXX
+#define _SV_WINCOMP_HXX
+
+#include <string.h>
+
+// ----------
+// - Strict -
+// ----------
+
+// Anpassungen fuer TypeChecking
+
+inline HPEN SelectPen( HDC hDC, HPEN hPen )
+{
+ return (HPEN)SelectObject( hDC, (HGDIOBJ)hPen );
+}
+
+inline void DeletePen( HPEN hPen )
+{
+ DeleteObject( (HGDIOBJ)hPen );
+}
+
+inline HPEN GetStockPen( int nObject )
+{
+ return (HPEN)GetStockObject( nObject );
+}
+
+inline HBRUSH SelectBrush( HDC hDC, HBRUSH hBrush )
+{
+ return (HBRUSH)SelectObject( hDC, (HGDIOBJ)hBrush );
+}
+
+inline void DeleteBrush( HBRUSH hBrush )
+{
+ DeleteObject( (HGDIOBJ)hBrush );
+}
+
+inline HBRUSH GetStockBrush( int nObject )
+{
+ return (HBRUSH)GetStockObject( nObject );
+}
+
+inline HFONT SelectFont( HDC hDC, HFONT hFont )
+{
+ return (HFONT)SelectObject( hDC, (HGDIOBJ)hFont );
+}
+
+inline void DeleteFont( HFONT hFont )
+{
+ DeleteObject( (HGDIOBJ)hFont );
+}
+
+inline HFONT GetStockFont( int nObject )
+{
+ return (HFONT)GetStockObject( nObject );
+}
+
+inline HBITMAP SelectBitmap( HDC hDC, HBITMAP hBitmap )
+{
+ return (HBITMAP)SelectObject( hDC, (HGDIOBJ)hBitmap );
+}
+
+inline void DeleteBitmap( HBITMAP hBitmap )
+{
+ DeleteObject( (HGDIOBJ)hBitmap );
+}
+
+inline void DeleteRegion( HRGN hRegion )
+{
+ DeleteObject( (HGDIOBJ)hRegion );
+}
+
+inline HPALETTE GetStockPalette( int nObject )
+{
+ return (HPALETTE)GetStockObject( nObject );
+}
+
+inline void DeletePalette( HPALETTE hPalette )
+{
+ DeleteObject( (HGDIOBJ)hPalette );
+}
+
+inline void SetWindowStyle( HWND hWnd, DWORD nStyle )
+{
+ SetWindowLong( hWnd, GWL_STYLE, nStyle );
+}
+
+inline DWORD GetWindowStyle( HWND hWnd )
+{
+ return GetWindowLong( hWnd, GWL_STYLE );
+}
+
+inline void SetWindowExStyle( HWND hWnd, DWORD nStyle )
+{
+ SetWindowLong( hWnd, GWL_EXSTYLE, nStyle );
+}
+
+inline DWORD GetWindowExStyle( HWND hWnd )
+{
+ return GetWindowLong( hWnd, GWL_EXSTYLE );
+}
+
+inline BOOL IsMinimized( HWND hWnd )
+{
+ return IsIconic( hWnd );
+}
+
+inline BOOL IsMaximized( HWND hWnd )
+{
+ return IsZoomed( hWnd );
+}
+
+inline void SetWindowFont( HWND hWnd, HFONT hFont, BOOL bRedraw )
+{
+ SendMessage( hWnd, WM_SETFONT, (WPARAM)hFont, MAKELPARAM((UINT)bRedraw,0) );
+}
+
+inline HFONT GetWindowFont( HWND hWnd )
+{
+ return (HFONT)(UINT)SendMessage( hWnd, WM_GETFONT, 0, 0 );
+}
+
+inline void SetClassCursor( HWND hWnd, HCURSOR hCursor )
+{
+ SetClassLongPtr( hWnd, GCLP_HCURSOR, (LONG_PTR)hCursor );
+}
+
+inline HCURSOR GetClassCursor( HWND hWnd )
+{
+ return (HCURSOR)GetClassLongPtr( hWnd, GCLP_HCURSOR );
+}
+
+inline void SetClassIcon( HWND hWnd, HICON hIcon )
+{
+ SetClassLongPtr( hWnd, GCLP_HICON, (LONG_PTR)hIcon );
+}
+
+inline HICON GetClassIcon( HWND hWnd )
+{
+ return (HICON)GetClassLongPtr( hWnd, GCLP_HICON );
+}
+
+inline HBRUSH SetClassBrush( HWND hWnd, HBRUSH hBrush )
+{
+ return (HBRUSH)SetClassLongPtr( hWnd, GCLP_HBRBACKGROUND, (LONG_PTR)hBrush );
+}
+
+inline HBRUSH GetClassBrush( HWND hWnd )
+{
+ return (HBRUSH)GetClassLongPtr( hWnd, GCLP_HBRBACKGROUND );
+}
+
+inline HINSTANCE GetWindowInstance( HWND hWnd )
+{
+ return (HINSTANCE)GetWindowLongPtr( hWnd, GWLP_HINSTANCE );
+}
+
+// ------------------------
+// - ZMouse Erweiterungen -
+// ------------------------
+
+#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG"
+
+#define MOUSEZ_CLASSNAME "MouseZ" // wheel window class
+#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title
+
+#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME)
+#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE)
+
+#define MSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG"
+
+#ifndef WHEEL_DELTA
+#define WHEEL_DELTA 120
+#endif
+#ifndef WM_MOUSEWHEEL
+#define WM_MOUSEWHEEL 0x020A
+#endif
+#ifndef SPI_GETWHEELSCROLLLINES
+#define SPI_GETWHEELSCROLLLINES 104
+#endif
+#ifndef SPI_SETWHEELSCROLLLINES
+#define SPI_SETWHEELSCROLLLINES 105
+#endif
+#ifndef WHEEL_PAGESCROLL
+#define WHEEL_PAGESCROLL (UINT_MAX)
+#endif
+
+
+// -----------------------------
+// - SystemAgent Erweiterungen -
+// -----------------------------
+
+#define ENABLE_AGENT 1
+#define DISABLE_AGENT 2
+#define GET_AGENT_STATUS 3
+typedef int (APIENTRY* SysAgt_Enable_PROC)( int );
+
+// ---------------------
+// - 5.0-Erweiterungen -
+// ---------------------
+
+#ifndef COLOR_GRADIENTACTIVECAPTION
+#define COLOR_GRADIENTACTIVECAPTION 27
+#endif
+#ifndef COLOR_GRADIENTINACTIVECAPTION
+#define COLOR_GRADIENTINACTIVECAPTION 28
+#endif
+
+#ifndef SPI_GETFLATMENU
+#define SPI_GETFLATMENU 0x1022
+#endif
+#ifndef COLOR_MENUBAR
+#define COLOR_MENUBAR 30
+#endif
+#ifndef COLOR_MENUHILIGHT
+#define COLOR_MENUHILIGHT 29
+#endif
+
+#ifndef CS_DROPSHADOW
+#define CS_DROPSHADOW 0x00020000
+#endif
+
+// -------------------------------------------------------
+// MT 12/03: From winuser.h, only needed in salframe.cxx
+// Better change salframe.cxx to include winuser.h
+// -------------------------------------------------------
+
+#define WS_EX_LAYERED 0x00080000
+
+#ifndef WM_UNICHAR
+#define WM_UNICHAR 0x0109
+#define UNICODE_NOCHAR 0xFFFF
+#endif
+
+#endif // _SV_WINCOMP_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */