summaryrefslogtreecommitdiff
path: root/vcl/win/inc
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/win/inc')
-rw-r--r--vcl/win/inc/saldata.hxx358
-rw-r--r--vcl/win/inc/salframe.h118
-rw-r--r--vcl/win/inc/salgdi.h136
-rw-r--r--vcl/win/inc/salids.hrc146
-rw-r--r--vcl/win/inc/salinst.h108
-rw-r--r--vcl/win/inc/salobj.h92
-rw-r--r--vcl/win/inc/salogl.hxx122
-rw-r--r--vcl/win/inc/salprn.h144
-rw-r--r--vcl/win/inc/salsys.h79
-rw-r--r--vcl/win/inc/salvd.h88
-rw-r--r--vcl/win/inc/svsys.h69
-rw-r--r--vcl/win/inc/wincomp.hxx453
12 files changed, 1913 insertions, 0 deletions
diff --git a/vcl/win/inc/saldata.hxx b/vcl/win/inc/saldata.hxx
new file mode 100644
index 000000000000..2d75109116e5
--- /dev/null
+++ b/vcl/win/inc/saldata.hxx
@@ -0,0 +1,358 @@
+/*************************************************************************
+ *
+ * $RCSfile: saldata.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALDATA_HXX
+#define _SV_SALDATA_HXX
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+#ifndef _SV_SVDATA_HXX
+#include <svdata.hxx>
+#endif
+#ifndef _SV_SALWTYPE_HXX
+#include <salwtype.hxx>
+#endif
+#ifndef _SV_WINCOMP_HXX
+#include <wincomp.hxx>
+#endif
+
+class AutoTimer;
+class SalInstance;
+class SalObject;
+class SalFrame;
+class SalVirtualDevice;
+class SalPrinter;
+class Font;
+struct HDCCache;
+
+// --------------------
+// - Standard-Defines -
+// --------------------
+
+#define MAX_STOCKPEN 4
+#define MAX_STOCKBRUSH 4
+#define SAL_CLIPRECT_COUNT 16
+
+// -----------
+// - SalData -
+// -----------
+
+struct SalData
+{
+ HINSTANCE mhInst; // default instance handle
+ HINSTANCE mhPrevInst; // previous instance handle
+ int mnCmdShow; // default frame show style
+ // Erst hier koennen Daten kompatible eingefuegt werden, da die
+ // oberen Daten in salmain.cxx modifiziert werden
+ 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
+ ULONG mnTimerMS; // Current Time (in MS) of the Timer
+ ULONG mnTimerOrgMS; // Current Original Time (in MS)
+ UINT mnTimerId; // windows timer id
+ SALTIMERPROC mpTimerProc; // timer callback proc
+ HHOOK mhSalObjMsgHook; // hook um SalObject relevante Message mitzubekommen
+ HWND mhWantLeaveMsg; // window handle, that want a MOUSELEAVE message
+ AutoTimer* mpMouseLeaveTimer; // Timer for MouseLeave Test
+ SalInstance* mpFirstInstance; // pointer of first instance
+ SalFrame* mpFirstFrame; // pointer of first frame
+ SalObject* mpFirstObject; // pointer of first object window
+ SalVirtualDevice* mpFirstVD; // first VirDev
+ SalPrinter* 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];
+ USHORT mnStockPenCount; // Anzahl statischer Pens
+ USHORT mnStockBrushCount; // Anzahl statischer Brushes
+ WPARAM mnSalObjWantKeyEvt; // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll
+ BOOL mbObjClassInit; // Ist SALOBJECTCLASS initialised
+ BOOL mbInPalChange; // is in WM_QUERYNEWPALETTE
+ DWORD mnAppThreadId; // Id from Applikation-Thread
+ WIN_BOOL mbScrSvrEnabled; // ScreenSaver enabled
+ int mnSageStatus; // Status der Sage-DLL (DISABLE_AGENT == nicht vorhanden)
+ HINSTANCE mhSageInst; // Instance-Handle zur Sage-DLL
+ SysAgt_Enable_PROC mpSageEnableProc; // Funktion zum deaktivieren des Systemagenten
+};
+
+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 mnVKAdd; // VK-Code von KEY_ADD
+ UINT mnVKSubtract; // VK-Code von KEY_SUBTRACT
+ UINT mnVKMultiply; // VK-Code von KEY_MULTIPLY
+ UINT mnVKDivide; // VK-Code von KEY_DIVIDE
+ UINT mnVKPoint; // VK-Code von KEY_POINT
+ UINT mnVKComma; // VK-Code von KEY_KOMMA
+ UINT mnVKLess; // VK-Code von KEY_LESS
+ UINT mnVKGreater; // VK-Code von KEY_GREATER
+ UINT mnVKEqual; // VK-Code von KEY_EQUAL
+ UINT mnWheelScrollLines; // WheelScrollLines
+ UINT mnWheelMsgId; // Wheel-Message-Id fuer W95
+ WORD mnVersion; // System-Version (311 == 3.11)
+ WIN_BOOL mbWNT; // kein W16/W95/W98 sondern ein NT
+ WIN_BOOL mbW40; // Is System-Version >= 4.0
+};
+
+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( ULONG nID, HBITMAP hBmp = 0 );
+void ImplReleaseCachedDC( ULONG nID );
+
+// ------------------------------------------------------
+// - SALSHL.CXX - Funktionen fuer DLL-Resource-Zugriffe -
+// ------------------------------------------------------
+
+HCURSOR ImplLoadSalCursor( int nId );
+HBITMAP ImplLoadSalBitmap( int nId );
+BOOL ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon );
+
+// SALGDI.CXX
+void ImplInitSalGDI();
+void ImplFreeSalGDI();
+
+// --------------
+// - Prototypes -
+// --------------
+
+// \\WIN\SOURCE\APP\SALINST.CXX
+void ImplSalYieldMutexAcquireWithWait();
+BOOL ImplSalYieldMutexTryToAcquire();
+void ImplSalYieldMutexAcquire();
+void ImplSalYieldMutexRelease();
+ULONG ImplSalReleaseYieldMutex();
+void ImplSalAcquireYieldMutex( ULONG nCount );
+
+// \\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
+void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT nId, DWORD nTime );
+
+// \WIN\SOURCE\WINDOW\SALFRAME.CXX
+void SalTestMouseLeave();
+
+// \WIN\SOURCE\WINDOW\SALFRAME.CXX
+long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
+long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam );
+BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
+
+// \WIN\SOURCE\WINDOW\SALOBJ.CXX
+SalObject* ImplFindSalObject( HWND hWndChild );
+BOOL ImplSalPreDispatchMsg( MSG* pMsg );
+void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
+
+// \WIN\SOURCE\GDI\SALGDI3.CXX
+void ImplSalLogFontToFontA( const LOGFONTA& rLogFont, Font& rFont );
+void ImplSalLogFontToFontW( const LOGFONTW& rLogFont, Font& rFont );
+
+// \WIN\SOURCE\APP\SALDATA.CXX
+rtl_TextEncoding ImplSalGetSystemEncoding();
+ByteString ImplSalGetWinAnsiString( const UniString& rStr, 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_FRAME_CLASSNAME_SBA "SALFRAMESB"
+#define SAL_FRAME_CLASSNAME_SBW L"SALFRAMESB"
+#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 == 0; lParam == this; lResult == bRet
+#define SAL_MSG_CREATESOUND (WM_USER+118)
+// wParam == 0; lParam == this
+#define SAL_MSG_DESTROYSOUND (WM_USER+119)
+
+// 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
+#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)
+
+// 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
+LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong );
+LONG ImplGetWindowLong( HWND hWnd, int nIndex );
+WIN_BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+WIN_BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
+WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
+WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
+LONG ImplDispatchMessage( CONST MSG *lpMsg );
+
+inline void SetWindowPtr( HWND hWnd, SalFrame* pThis )
+{
+ ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis );
+}
+
+inline SalFrame* GetWindowPtr( HWND hWnd )
+{
+ return (SalFrame*)ImplGetWindowLong( hWnd, SAL_FRAME_THIS );
+}
+
+inline void SetSalObjWindowPtr( HWND hWnd, SalObject* pThis )
+{
+ ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis );
+}
+
+inline SalObject* GetSalObjWindowPtr( HWND hWnd )
+{
+ return (SalObject*)ImplGetWindowLong( hWnd, SAL_OBJECT_THIS );
+}
+
+#endif // _SV_SALDATA_HXX
diff --git a/vcl/win/inc/salframe.h b/vcl/win/inc/salframe.h
new file mode 100644
index 000000000000..4991dd4937b6
--- /dev/null
+++ b/vcl/win/inc/salframe.h
@@ -0,0 +1,118 @@
+/*************************************************************************
+ *
+ * $RCSfile: salframe.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALFRAME_H
+#define _SV_SALFRAME_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+#ifndef _SV_SYSDATA_HXX
+#include <sysdata.hxx>
+#endif
+
+// ----------------
+// - SalFrameData -
+// ----------------
+
+class SalFrameData
+{
+public:
+ HWND mhWnd; // Window handle
+ HCURSOR mhCursor; // cursor handle
+ HIMC mhDefIMEContext; // default IME-Context
+ SalGraphics* mpGraphics; // current frame graphics
+ SalFrame* mpNextFrame; // pointer to next frame
+ void* mpInst; // instance handle for callback
+ SALFRAMEPROC mpProc; // callback proc
+ SystemEnvData maSysData; // system data
+ SalFrameState maState; // frame state
+ int mnShowState; // show state
+ long mnWidth; // client width in pixeln
+ long mnHeight; // client height in pixeln
+ RECT maFullScreenRect; // fullscreen rect
+ int mnFullScreenShowState; // fullscreen restore show state
+ UINT mnInputLang; // current Input Language
+ UINT mnInputCodePage; // current Input CodePage
+ USHORT mnStyle; // style
+ BOOL mbGraphics; // is Graphics used
+ BOOL mbCaption; // has window a caption
+ BOOL mbBorder; // has window a border
+ BOOL mbSizeBorder; // has window a sizeable border
+ BOOL mbFullScreen; // TRUE: in full screen mode
+ BOOL mbPresentation; // TRUE: Presentation Mode running
+ BOOL mbInShow; // innerhalb eines Show-Aufrufs
+ BOOL mbRestoreMaximize; // Restore-Maximize
+ BOOL mbInMoveMsg; // Move-Message wird verarbeitet
+ BOOL mbInSizeMsg; // Size-Message wird verarbeitet
+ BOOL mbFullScreenToolWin; // WS_EX_TOOLWINDOW reset in FullScreenMode
+ BOOL mbDefPos; // default-position
+ BOOL mbOverwriteState; // TRUE: WindowState darf umgesetzt werden
+ BOOL mbIME; // TRUE: We are in IME Mode
+ BOOL mbHandleIME; // TRUE: Wir handeln die IME-Messages
+ BOOL mbSpezIME; // TRUE: Spez IME
+ BOOL mbAtCursorIME; // TRUE: Wir behandeln nur einige IME-Messages
+ BOOL mbCompositionMode; // TRUE: Wir befinden uns im Composition-Modus
+ BOOL mbCandidateMode; // TRUE: Wir befinden uns im Candidate-Modus
+};
+
+#endif // _SV_SALFRAME_H
diff --git a/vcl/win/inc/salgdi.h b/vcl/win/inc/salgdi.h
new file mode 100644
index 000000000000..ef89bc3f1f7d
--- /dev/null
+++ b/vcl/win/inc/salgdi.h
@@ -0,0 +1,136 @@
+/*************************************************************************
+ *
+ * $RCSfile: salgdi.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALGDI_H
+#define _SV_SALGDI_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+// -----------
+// - Defines -
+// -----------
+
+#define RGB_TO_PALRGB(nRGB) ((nRGB)|0x02000000)
+#define PALRGB_TO_RGB(nPalRGB) ((nPalRGB)&0x00ffffff)
+
+// -------------------
+// - SalGraphicsData -
+// -------------------
+
+class SalGraphicsData
+{
+public:
+ HDC mhDC; // HDC
+ HWND mhWnd; // Window-Handle, when Window-Graphics
+ HPEN mhPen; // Pen
+ HBRUSH mhBrush; // Brush
+ HFONT mhFont; // Font
+ 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
+ RECT* mpNextClipRect; // Naechstes ClipRegion-Rect
+ BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ LOGFONTA* mpLogFont; // LOG-Font which is currently selected (only W9x)
+ BYTE* mpFontCharSets; // All Charsets for the current font
+ BYTE mnFontCharSetCount; // Number of Charsets of the current font; 0 - if not queried
+ KERNINGPAIR* mpFontKernPairs; // Kerning Pairs of the current Font
+ ULONG mnFontKernPairCount;// Number of Kerning Pairs of the current Font
+ BOOL mbFontKernInit; // FALSE: FontKerns must be queried
+ int mnFontOverhang; // Font-Overhang
+ int mnPenWidth; // Linienbreite
+ BOOL mbStockPen; // is Pen a stockpen
+ BOOL mbStockBrush; // is Brush a stcokbrush
+ BOOL mbPen; // is Pen (FALSE == NULL_PEN)
+ BOOL mbBrush; // is Brush (FALSE == NULL_BRUSH)
+ BOOL mbPrinter; // is Printer
+ BOOL mbVirDev; // is VirDev
+ BOOL mbWindow; // is Window
+ BOOL mbScreen; // is Screen compatible
+ BOOL mbXORMode; // _every_ output with RasterOp XOR
+ BOOL mbCalcOverhang; // calc overhang
+};
+
+// Init/Deinit Graphics
+void ImplSalInitGraphics( SalGraphicsData* mpData );
+void ImplSalDeInitGraphics( SalGraphicsData* mpData );
+void ImplUpdateSysColorEntries();
+int ImplIsSysColorEntry( SalColor nSalColor );
+
+// -----------
+// - Defines -
+// -----------
+
+#ifdef WIN
+#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-4)/sizeof(POINT))
+#else
+#define MAX_64KSALPOINTS ((((USHORT)0xFFFF)-8)/sizeof(POINTS))
+#endif
+
+#endif // _SV_SALGDI_H
diff --git a/vcl/win/inc/salids.hrc b/vcl/win/inc/salids.hrc
new file mode 100644
index 000000000000..6caf4048b13a
--- /dev/null
+++ b/vcl/win/inc/salids.hrc
@@ -0,0 +1,146 @@
+/*************************************************************************
+ *
+ * $RCSfile: salids.hrc,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#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_BITMAP_50 11000
+
+#define SAL_RESID_ICON_DEFAULT 1
+
+#endif // _SV_SALIDS_HRC
diff --git a/vcl/win/inc/salinst.h b/vcl/win/inc/salinst.h
new file mode 100644
index 000000000000..23046d961e0b
--- /dev/null
+++ b/vcl/win/inc/salinst.h
@@ -0,0 +1,108 @@
+/*************************************************************************
+ *
+ * $RCSfile: salinst.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALINST_H
+#define _SV_SALINST_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+#ifdef _VOS_NO_NAMESPACE
+class OMutex;
+#else
+namespace vos { class OMutex; }
+#endif
+class SalYieldMutex;
+class SalInstance;
+class SalFrame;
+class SalObject;
+
+// -------------------
+// - SalInstanceData -
+// -------------------
+
+class SalInstanceData
+{
+public:
+ HINSTANCE mhInst; // Instance Handle
+ HWND mhComWnd; // window, for communication (between threads and the main thread)
+ void* mpFilterInst;
+ void* mpFilterCallback;
+ SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex
+#ifdef _VOS_NO_NAMESPACE
+ OMutex* mpSalWaitMutex; // Sal-Wait-Mutex
+#else
+ vos::OMutex* mpSalWaitMutex; // Sal-Wait-Mutex
+#endif
+ USHORT mnYieldWaitCount; // Wait-Count
+};
+
+// --------------
+// - Prototypen -
+// --------------
+
+SalFrame* ImplSalCreateFrame( SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle );
+SalObject* ImplSalCreateObject( SalInstance* pInst, SalFrame* pParent );
+void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE );
+void ImplSalPrinterAbortJobAsync( HDC hPrnDC );
+
+#endif // _SV_SALINST_H
diff --git a/vcl/win/inc/salobj.h b/vcl/win/inc/salobj.h
new file mode 100644
index 000000000000..e32ba7e2d706
--- /dev/null
+++ b/vcl/win/inc/salobj.h
@@ -0,0 +1,92 @@
+/*************************************************************************
+ *
+ * $RCSfile: salobj.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALOBJ_H
+#define _SV_SALOBJ_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+#ifndef _SV_SYSDATA_HXX
+#include <sysdata.hxx>
+#endif
+
+// -----------------
+// - SalObjectData -
+// -----------------
+
+class SalObjectData
+{
+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
+ BOOL mbFirstClipRect; // Flag for first cliprect to insert
+ SalObject* mpNextObject; // pointer to next object
+ void* mpInst; // instance handle for callback
+ SALOBJECTPROC mpProc; // callback proc
+};
+
+#endif // _SV_SALOBJ_H
diff --git a/vcl/win/inc/salogl.hxx b/vcl/win/inc/salogl.hxx
new file mode 100644
index 000000000000..f3b6d480eb7c
--- /dev/null
+++ b/vcl/win/inc/salogl.hxx
@@ -0,0 +1,122 @@
+/*************************************************************************
+ *
+ * $RCSfile: salogl.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALOGL_HXX
+#define _SV_SALOGL_HXX
+
+#define _OPENGL_EXT
+
+#ifndef _SV_WINCOMP_HXX
+#include <wincomp.hxx>
+#endif
+#ifndef _GEN_HXX
+#include <tools/gen.hxx>
+#endif
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+#ifndef _SV_SALOTYPE_HXX
+#include <salotype.hxx>
+#endif
+
+// -----------------
+// - State defines -
+// -----------------
+
+#define OGL_STATE_UNLOADED (0x00000000)
+#define OGL_STATE_INVALID (0x00000001)
+#define OGL_STATE_VALID (0x00000002)
+
+// -------------
+// - SalOpenGL -
+// -------------
+
+class SalGraphics;
+class String;
+
+class SalOpenGL
+{
+private:
+ static HGLRC mhOGLContext;
+ static HDC mhOGLLastDC;
+ static ULONG mnOGLState;
+
+private:
+ static BOOL ImplInitLib();
+ static BOOL ImplInit();
+ static void ImplFreeLib();
+
+public:
+ SalOpenGL( SalGraphics* pGraphics );
+ ~SalOpenGL();
+
+ static BOOL Create();
+ static void Release();
+ static ULONG GetState() { return SalOpenGL::mnOGLState; }
+ static BOOL IsValid() { return( OGL_STATE_VALID == SalOpenGL::mnOGLState ); }
+
+ static void* GetOGLFnc( const char* pFncName );
+
+ static void OGLEntry( SalGraphics* pGraphics );
+ static void OGLExit( SalGraphics* pGraphics );
+};
+
+#endif // _SV_SALOGL_HXX
diff --git a/vcl/win/inc/salprn.h b/vcl/win/inc/salprn.h
new file mode 100644
index 000000000000..6baca8eaf352
--- /dev/null
+++ b/vcl/win/inc/salprn.h
@@ -0,0 +1,144 @@
+/*************************************************************************
+ *
+ * $RCSfile: salprn.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALPRN_H
+#define _SV_SALPRN_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+class SalGraphics;
+class SalInfoPrinter;
+
+// -----------------
+// - SalDriverData -
+// -----------------
+
+// WNT3
+#define SAL_DRIVERDATA_SYSSIGN ((ULONG)0x574E5433)
+#define SAL_DRIVERDATA_VERSION 1
+#define SAL_DEVMODE( pSetupData ) ((LPDEVMODE)((pSetupData->mpDriverData) + (((SalDriverData*)(pSetupData->mpDriverData))->mnDriverOffset)))
+
+#pragma pack( 1 )
+
+struct SalDriverData
+{
+ ULONG mnSysSignature;
+ USHORT mnVersion;
+ USHORT mnDriverOffset;
+ BYTE maDriverData[1];
+};
+
+#pragma pack()
+
+// -------------------
+// - SalSysQueueData -
+// -------------------
+
+struct SalSysQueueData
+{
+ XubString maDriverName; // printer driver name
+ XubString maDeviceName; // printer device name
+ XubString maPortName; // printer port name
+ ByteString maDriverNameA; // printer driver name
+ ByteString maDeviceNameA; // printer device name
+ ByteString maPortNameA; // printer port name
+ BOOL mbAnsi; // TRUE - use A functions
+};
+
+// ----------------------
+// - SalInfoPrinterData -
+// ----------------------
+
+class SalInfoPrinterData
+{
+public:
+ SalGraphics* mpGraphics; // current Printer graphics
+ XubString maDriverName; // printer driver name
+ XubString maDeviceName; // printer device name
+ XubString maPortName; // printer port name
+ ByteString maDriverNameA; // printer driver name
+ ByteString maDeviceNameA; // printer device name
+ ByteString maPortNameA; // printer port name
+ HDC mhDC; // printer hdc
+ BOOL mbGraphics; // is Graphics used
+ BOOL mbAnsi;
+};
+
+// ------------------
+// - SalPrinterData -
+// ------------------
+
+class SalPrinterData
+{
+public:
+ SalGraphics* mpGraphics; // current Printer graphics
+ SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter
+ SalPrinter* mpNextPrinter; // next printing printer
+ HDC mhDC; // printer hdc
+ ULONG mnError; // Error Code
+ ULONG mnCopies; // Kopien
+ BOOL mbCollate; // Sortierte Kopien
+ BOOL mbAbort; // Job Aborted
+};
+
+#endif // _SV_SALPRN_H
diff --git a/vcl/win/inc/salsys.h b/vcl/win/inc/salsys.h
new file mode 100644
index 000000000000..ea1b99504c26
--- /dev/null
+++ b/vcl/win/inc/salsys.h
@@ -0,0 +1,79 @@
+/*************************************************************************
+ *
+ * $RCSfile: salsys.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALSYS_H
+#define _SV_SALSYS_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+class SalFrame;
+
+// -----------------
+// - SalSystemData -
+// -----------------
+
+class SalSystemData
+{
+};
+
+#endif // _SV_SALSYS_H
diff --git a/vcl/win/inc/salvd.h b/vcl/win/inc/salvd.h
new file mode 100644
index 000000000000..33439dc618f0
--- /dev/null
+++ b/vcl/win/inc/salvd.h
@@ -0,0 +1,88 @@
+/*************************************************************************
+ *
+ * $RCSfile: salvd.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SALVD_H
+#define _SV_SALVD_H
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+class SalGraphics;
+class SalVirtualDevice;
+
+// -----------------
+// - SalVirDevData -
+// -----------------
+
+class SalVirDevData
+{
+public:
+ HDC mhDC; // HDC or 0 for Cache Device
+ HBITMAP mhBmp; // Memory Bitmap
+ HBITMAP mhDefBmp; // Default Bitmap
+ SalGraphics* mpGraphics; // current VirDev graphics
+ SalVirtualDevice* mpNext; // next VirDev
+ USHORT mnBitCount; // BitCount (0 or 1)
+ BOOL mbGraphics; // is Graphics used
+};
+
+#endif // _SV_SALVD_H
diff --git a/vcl/win/inc/svsys.h b/vcl/win/inc/svsys.h
new file mode 100644
index 000000000000..6dec218faed3
--- /dev/null
+++ b/vcl/win/inc/svsys.h
@@ -0,0 +1,69 @@
+/*************************************************************************
+ *
+ * $RCSfile: svsys.h,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_SVSYS_H
+#define _SV_SVSYS_H
+
+#ifndef _SVWIN_H
+#include <tools/svwin.h>
+#endif
+
+#endif // _SV_SVSYS_H
diff --git a/vcl/win/inc/wincomp.hxx b/vcl/win/inc/wincomp.hxx
new file mode 100644
index 000000000000..52c646f18c2d
--- /dev/null
+++ b/vcl/win/inc/wincomp.hxx
@@ -0,0 +1,453 @@
+/*************************************************************************
+ *
+ * $RCSfile: wincomp.hxx,v $
+ *
+ * $Revision: 1.1.1.1 $
+ *
+ * last change: $Author: hr $ $Date: 2000-09-18 17:05:49 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library 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 for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (the "License"); You may not use this file
+ * except in compliance with the License. You may obtain a copy of the
+ * License at http://www.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+
+#ifndef _SV_WINCOMP_HXX
+#define _SV_WINCOMP_HXX
+
+#ifndef _STRING_H
+#include <string.h>
+#endif
+
+#ifndef _SV_SV_H
+#include <sv.h>
+#endif
+
+// ----------
+// - 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 WIN_BOOL IsMinimized( HWND hWnd )
+{
+ return IsIconic( hWnd );
+}
+
+inline WIN_BOOL IsMaximized( HWND hWnd )
+{
+ return IsZoomed( hWnd );
+}
+
+inline void SetWindowFont( HWND hWnd, HFONT hFont, WIN_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 );
+}
+
+// ---------------------
+// - Windows/Window NT -
+// ---------------------
+
+// Anpassung fuer Unterschiede zwischen 3.x und NT
+
+inline void SetClassCursor( HWND hWnd, HCURSOR hCursor )
+{
+#ifndef WNT
+ SetClassWord( hWnd, GCW_HCURSOR, (WORD)hCursor );
+#else
+ SetClassLong( hWnd, GCL_HCURSOR, (DWORD)hCursor );
+#endif
+}
+
+inline HCURSOR GetClassCursor( HWND hWnd )
+{
+#ifndef WNT
+ return (HCURSOR)GetClassWord( hWnd, GCW_HCURSOR );
+#else
+ return (HCURSOR)GetClassLong( hWnd, GCL_HCURSOR );
+#endif
+}
+
+inline void SetClassIcon( HWND hWnd, HICON hIcon )
+{
+#ifndef WNT
+ SetClassWord( hWnd, GCW_HICON, (WORD)hIcon );
+#else
+ SetClassLong( hWnd, GCL_HICON, (DWORD)hIcon );
+#endif
+}
+
+inline HICON GetClassIcon( HWND hWnd )
+{
+#ifndef WNT
+ return (HICON)GetClassWord( hWnd, GCW_HICON );
+#else
+ return (HICON)GetClassLong( hWnd, GCL_HICON );
+#endif
+}
+
+inline HBRUSH SetClassBrush( HWND hWnd, HBRUSH hBrush )
+{
+#ifndef WNT
+ return (HBRUSH)SetClassWord( hWnd, GCW_HBRBACKGROUND, (WORD)hBrush );
+#else
+ return (HBRUSH)SetClassLong( hWnd, GCL_HBRBACKGROUND, (DWORD)hBrush );
+#endif
+}
+
+inline HBRUSH GetClassBrush( HWND hWnd )
+{
+#ifndef WNT
+ return (HBRUSH)GetClassWord( hWnd, GCW_HBRBACKGROUND );
+#else
+ return (HBRUSH)GetClassLong( hWnd, GCL_HBRBACKGROUND );
+#endif
+}
+
+inline HINSTANCE GetWindowInstance( HWND hWnd )
+{
+#ifndef WNT
+ return (HINSTANCE)GetWindowWord( hWnd, GWW_HINSTANCE );
+#else
+ return (HINSTANCE)GetWindowLong( hWnd, GWL_HINSTANCE );
+#endif
+}
+
+#ifndef WNT
+inline UINT CharLowerBuff( LPSTR lpStr, UINT nLen )
+{
+ return AnsiLowerBuff( lpStr, nLen );
+}
+#endif
+
+#ifndef WNT
+inline UINT CharUpperBuff( LPSTR lpStr, UINT nLen )
+{
+ return AnsiUpperBuff( lpStr, nLen );
+}
+#endif
+
+#ifndef WNT
+inline void OemToChar( LPCSTR lpStr1, LPSTR lpStr2 )
+{
+ OemToAnsi( lpStr1, lpStr2 );
+}
+#endif
+
+
+// -----------------------------------
+// - Unterschiede zwischen 16/32-Bit -
+// -----------------------------------
+
+#ifdef WIN
+#define SVWINAPI WINAPI
+#else
+#define SVWINAPI APIENTRY
+#endif
+
+#ifdef WIN
+#define NEARDATA _near
+#else
+#define NEARDATA
+#endif
+
+// Zum kopieren von mehr als 64 KB
+#ifdef WIN
+inline void lmemcpy( void* pDst, const void* pSrc, ULONG nSize )
+{
+ hmemcpy( pDst, pSrc, nSize );
+}
+#else
+inline void lmemcpy( void* pDst, const void* pSrc, ULONG nSize )
+{
+ memcpy( pDst, pSrc, nSize );
+}
+#endif
+
+#ifdef WNT
+typedef LONG WinWeight;
+#else
+typedef int WinWeight;
+#endif
+
+
+// ----------------------------------------------------
+// - Steuerungen fuer Versionen und Laufzeit-Abfragen -
+// ----------------------------------------------------
+
+#if defined( WNT )
+#define W95_VERSION 400
+#else
+#define W95_VERSION 395
+#endif
+
+// Wenn eine 32-Bit SV Version die nur unter W95 laeuft gebildet werden soll,
+// muss nur dieses Define W40ONLY definiert werden
+#if ( WINVER >= 0x0400 )
+#define W40ONLY
+#endif
+
+// Wenn wir sowieso erst ab W95 laufen, brauchen wir auch keine
+// Laufzeit-Abfragen
+#ifdef W40ONLY
+#define W40IF
+#define W40NIF
+#define W40ELSE
+
+#else
+
+// Nur ein 32-Bit-SDK definiert WINVER >= 0x0400 und somit brauchen wir
+// diese W40-Abfragen auch nur hier. Die Abfragen, die sowohl fuer 3.1
+// als auch fuer NT gelten sind als normale if-Abfragen kodiert
+#ifdef WIN
+#define W40NIF
+#else
+#define W40IF if ( aSalShlData.mbW40 )
+#define W40NIF if ( !aSalShlData.mbW40 )
+#define W40ELSE else
+#endif
+
+#endif
+
+/****************************
+
+Beispiel fuer Klammerung:
+
+#if ( WINVER >= 0x0400 )
+ W40IF
+ {
+ ... W40-Code
+ }
+ W40ELSE
+#endif
+#ifndef W40ONLY
+ {
+ ... Normaler 3.1 und NT 3.5(1)-Code
+ }
+#endif
+
+*****************************/
+
+
+// ------------------------
+// - ZMouse Erweiterungen -
+// ------------------------
+
+#if defined( WNT )
+
+#ifdef UNICODE
+#define MSH_MOUSEWHEEL L"MSWHEEL_ROLLMSG"
+#else
+#define MSH_MOUSEWHEEL "MSWHEEL_ROLLMSG"
+#endif
+
+// Default value for rolling one notch
+#ifndef WHEEL_DELTA
+#define WHEEL_DELTA 120
+#endif
+
+#ifndef WM_MOUSEWHEEL
+#define WM_MOUSEWHEEL 0x020A
+#endif
+
+#ifndef WHEEL_PAGESCROLL
+// signifies to scroll a page, also defined in winuser.h in the NT4.0 SDK
+#define WHEEL_PAGESCROLL (UINT_MAX)
+#endif
+
+#ifdef UNICODE
+#define MOUSEZ_CLASSNAME L"MouseZ" // wheel window class
+#define MOUSEZ_TITLE L"Magellan MSWHEEL" // wheel window title
+#else
+#define MOUSEZ_CLASSNAME "MouseZ" // wheel window class
+#define MOUSEZ_TITLE "Magellan MSWHEEL" // wheel window title
+#endif
+
+#define MSH_WHEELMODULE_CLASS (MOUSEZ_CLASSNAME)
+#define MSH_WHEELMODULE_TITLE (MOUSEZ_TITLE)
+
+#ifdef UNICODE
+#define MSH_SCROLL_LINES L"MSH_SCROLL_LINES_MSG"
+#else
+#define MSH_SCROLL_LINES "MSH_SCROLL_LINES_MSG"
+#endif
+
+#ifndef SPI_GETWHEELSCROLLLINES
+#define SPI_GETWHEELSCROLLLINES 104
+#endif
+#ifndef SPI_SETWHEELSCROLLLINES
+#define SPI_SETWHEELSCROLLLINES 105
+#endif
+
+#endif
+
+
+// -----------------------------
+// - SystemAgent Erweiterungen -
+// -----------------------------
+
+#if ( WINVER >= 0x0400 )
+#define ENABLE_AGENT 1
+#define DISABLE_AGENT 2
+#define GET_AGENT_STATUS 3
+
+typedef int (SVWINAPI* SysAgt_Enable_PROC)( int );
+#endif
+
+// ---------------------
+// - 5.0-Erweiterungen -
+// ---------------------
+
+#ifndef COLOR_HOTLIGHT
+#define COLOR_HOTLIGHT 26
+#endif
+#ifndef COLOR_GRADIENTACTIVECAPTION
+#define COLOR_GRADIENTACTIVECAPTION 27
+#endif
+#ifndef COLOR_GRADIENTINACTIVECAPTION
+#define COLOR_GRADIENTINACTIVECAPTION 28
+#endif
+
+#endif // _SV_WINCOMP_HXX