xref: /aoo41x/main/vcl/inc/win/saldata.hxx (revision 67e470da)
1*161f4cd1SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*161f4cd1SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*161f4cd1SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*161f4cd1SAndrew Rist  * distributed with this work for additional information
6*161f4cd1SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*161f4cd1SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*161f4cd1SAndrew Rist  * "License"); you may not use this file except in compliance
9*161f4cd1SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*161f4cd1SAndrew Rist  *
11*161f4cd1SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*161f4cd1SAndrew Rist  *
13*161f4cd1SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*161f4cd1SAndrew Rist  * software distributed under the License is distributed on an
15*161f4cd1SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*161f4cd1SAndrew Rist  * KIND, either express or implied.  See the License for the
17*161f4cd1SAndrew Rist  * specific language governing permissions and limitations
18*161f4cd1SAndrew Rist  * under the License.
19*161f4cd1SAndrew Rist  *
20*161f4cd1SAndrew Rist  *************************************************************/
21*161f4cd1SAndrew Rist 
22*161f4cd1SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef _SV_SALDATA_HXX
25cdf0e10cSrcweir #define _SV_SALDATA_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #include "osl/module.h"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #include <svdata.hxx>
30cdf0e10cSrcweir #include <salwtype.hxx>
31cdf0e10cSrcweir 
32cdf0e10cSrcweir #include <win/wincomp.hxx>
33cdf0e10cSrcweir 
34cdf0e10cSrcweir #include <set>  // for hMenu validation
35cdf0e10cSrcweir #include <map>
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class AutoTimer;
38cdf0e10cSrcweir class WinSalInstance;
39cdf0e10cSrcweir class WinSalObject;
40cdf0e10cSrcweir class WinSalFrame;
41cdf0e10cSrcweir class WinSalVirtualDevice;
42cdf0e10cSrcweir class WinSalPrinter;
43cdf0e10cSrcweir class Font;
44cdf0e10cSrcweir struct HDCCache;
45cdf0e10cSrcweir struct TempFontItem;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir typedef HRESULT (WINAPI  *DwmIsCompositionEnabled_ptr)(BOOL*);
48cdf0e10cSrcweir 
49cdf0e10cSrcweir // --------------------
50cdf0e10cSrcweir // - Standard-Defines -
51cdf0e10cSrcweir // --------------------
52cdf0e10cSrcweir 
53cdf0e10cSrcweir #define MAX_STOCKPEN            4
54cdf0e10cSrcweir #define MAX_STOCKBRUSH          4
55cdf0e10cSrcweir #define SAL_CLIPRECT_COUNT      16
56cdf0e10cSrcweir 
57cdf0e10cSrcweir // --------------------
58cdf0e10cSrcweir // - Icon cache       -
59cdf0e10cSrcweir // --------------------
60cdf0e10cSrcweir 
61cdf0e10cSrcweir struct SalIcon
62cdf0e10cSrcweir {
63cdf0e10cSrcweir     int     nId;
64cdf0e10cSrcweir     HICON   hIcon;
65cdf0e10cSrcweir     HICON   hSmallIcon;
66cdf0e10cSrcweir     SalIcon *pNext;
67cdf0e10cSrcweir };
68cdf0e10cSrcweir 
69cdf0e10cSrcweir // -----------
70cdf0e10cSrcweir // - SalData -
71cdf0e10cSrcweir // -----------
72cdf0e10cSrcweir 
73cdf0e10cSrcweir class SalData
74cdf0e10cSrcweir {
75cdf0e10cSrcweir public:
76cdf0e10cSrcweir     SalData();
77cdf0e10cSrcweir     ~SalData();
78cdf0e10cSrcweir 
79cdf0e10cSrcweir     // native widget framework
80cdf0e10cSrcweir     void    initNWF();
81cdf0e10cSrcweir     void    deInitNWF();
82cdf0e10cSrcweir 
83cdf0e10cSrcweir     // fill maVKMap;
84cdf0e10cSrcweir     void initKeyCodeMap();
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     // checks if the menuhandle was created by VCL
87cdf0e10cSrcweir     sal_Bool    IsKnownMenuHandle( HMENU hMenu );
88cdf0e10cSrcweir 
89cdf0e10cSrcweir public:
90cdf0e10cSrcweir     HINSTANCE               mhInst;                 // default instance handle
91cdf0e10cSrcweir     HINSTANCE               mhPrevInst;             // previous instance handle
92cdf0e10cSrcweir     int                     mnCmdShow;              // default frame show style
93cdf0e10cSrcweir     HPALETTE                mhDitherPal;            // dither palette
94cdf0e10cSrcweir     HGLOBAL                 mhDitherDIB;            // dither memory handle
95cdf0e10cSrcweir     BYTE*                   mpDitherDIB;            // dither memory
96cdf0e10cSrcweir     BYTE*                   mpDitherDIBData;        // beginning of DIB data
97cdf0e10cSrcweir     long*                   mpDitherDiff;           // Dither mapping table
98cdf0e10cSrcweir     BYTE*                   mpDitherLow;            // Dither mapping table
99cdf0e10cSrcweir     BYTE*                   mpDitherHigh;           // Dither mapping table
100cdf0e10cSrcweir     sal_uLong                   mnTimerMS;              // Current Time (in MS) of the Timer
101cdf0e10cSrcweir     sal_uLong                   mnTimerOrgMS;           // Current Original Time (in MS)
102cdf0e10cSrcweir 	DWORD					mnNextTimerTime;
103cdf0e10cSrcweir 	DWORD					mnLastEventTime;
104cdf0e10cSrcweir     UINT                    mnTimerId;              // windows timer id
105cdf0e10cSrcweir     sal_Bool                    mbInTimerProc;          // timer event is currently being dispatched
106cdf0e10cSrcweir     HHOOK                   mhSalObjMsgHook;        // hook to get interesting msg for SalObject
107cdf0e10cSrcweir     HWND                    mhWantLeaveMsg;         // window handle, that want a MOUSELEAVE message
108cdf0e10cSrcweir     AutoTimer*              mpMouseLeaveTimer;      // Timer for MouseLeave Test
109cdf0e10cSrcweir     WinSalInstance*         mpFirstInstance;        // pointer of first instance
110cdf0e10cSrcweir     WinSalFrame*            mpFirstFrame;           // pointer of first frame
111cdf0e10cSrcweir     WinSalObject*           mpFirstObject;          // pointer of first object window
112cdf0e10cSrcweir     WinSalVirtualDevice*    mpFirstVD;              // first VirDev
113cdf0e10cSrcweir     WinSalPrinter*          mpFirstPrinter;         // first printing printer
114cdf0e10cSrcweir     HDCCache*               mpHDCCache;             // Cache for three DC's
115cdf0e10cSrcweir     HBITMAP                 mh50Bmp;                // 50% Bitmap
116cdf0e10cSrcweir     HBRUSH                  mh50Brush;              // 50% Brush
117cdf0e10cSrcweir     COLORREF                maStockPenColorAry[MAX_STOCKPEN];
118cdf0e10cSrcweir     COLORREF                maStockBrushColorAry[MAX_STOCKBRUSH];
119cdf0e10cSrcweir     HPEN                    mhStockPenAry[MAX_STOCKPEN];
120cdf0e10cSrcweir     HBRUSH                  mhStockBrushAry[MAX_STOCKBRUSH];
121cdf0e10cSrcweir     sal_uInt16                  mnStockPenCount;        // count of static pens
122cdf0e10cSrcweir     sal_uInt16                  mnStockBrushCount;      // count of static brushes
123cdf0e10cSrcweir     WPARAM                  mnSalObjWantKeyEvt;     // KeyEvent, welcher vom SalObj-Hook verarbeitet werden soll
124cdf0e10cSrcweir     BYTE                    mnCacheDCInUse;         // count of CacheDC in use
125cdf0e10cSrcweir     sal_Bool                    mbObjClassInit;         // is SALOBJECTCLASS initialised
126cdf0e10cSrcweir     sal_Bool                    mbInPalChange;          // is in WM_QUERYNEWPALETTE
127cdf0e10cSrcweir     DWORD                   mnAppThreadId;          // Id from Applikation-Thread
128cdf0e10cSrcweir     BOOL                mbScrSvrEnabled;        // ScreenSaver enabled
129cdf0e10cSrcweir     int                     mnSageStatus;           // status of Sage-DLL (DISABLE_AGENT == nicht vorhanden)
130cdf0e10cSrcweir     SysAgt_Enable_PROC      mpSageEnableProc;       // funktion to deactivate the system agent
131cdf0e10cSrcweir     SalIcon*                mpFirstIcon;            // icon cache, points to first icon, NULL if none
132cdf0e10cSrcweir     TempFontItem*           mpTempFontItem;
133cdf0e10cSrcweir     sal_Bool                mbThemeChanged;         // true if visual theme was changed: throw away theme handles
134cdf0e10cSrcweir     sal_Bool                mbThemeMenuSupport;
135cdf0e10cSrcweir 
136cdf0e10cSrcweir     // for GdiPlus GdiplusStartup/GdiplusShutdown
137cdf0e10cSrcweir     ULONG_PTR               gdiplusToken;
138cdf0e10cSrcweir 
139cdf0e10cSrcweir     std::set< HMENU >       mhMenuSet;              // keeps track of menu handles created by VCL, used by IsKnownMenuHandle()
140cdf0e10cSrcweir     std::map< UINT,USHORT > maVKMap;      // map some dynamic VK_* entries
141cdf0e10cSrcweir     oslModule               maDwmLib;
142cdf0e10cSrcweir     DwmIsCompositionEnabled_ptr mpDwmIsCompositionEnabled;
143cdf0e10cSrcweir };
144cdf0e10cSrcweir 
SetSalData(SalData * pData)145cdf0e10cSrcweir inline void SetSalData( SalData* pData ) { ImplGetSVData()->mpSalData = (void*)pData; }
GetSalData()146cdf0e10cSrcweir inline SalData* GetSalData() { return (SalData*)ImplGetSVData()->mpSalData; }
GetAppSalData()147cdf0e10cSrcweir inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData; }
148cdf0e10cSrcweir 
149cdf0e10cSrcweir // --------------
150cdf0e10cSrcweir // - SalShlData -
151cdf0e10cSrcweir // --------------
152cdf0e10cSrcweir 
153cdf0e10cSrcweir struct SalShlData
154cdf0e10cSrcweir {
155cdf0e10cSrcweir     HINSTANCE               mhInst;                 // Instance of SAL-DLL
156cdf0e10cSrcweir     UINT                    mnWheelScrollLines;     // WheelScrollLines
157cdf0e10cSrcweir     UINT                    mnWheelScrollChars;     // WheelScrollChars
158cdf0e10cSrcweir     UINT                    mnWheelMsgId;           // Wheel-Message-Id fuer W95
159cdf0e10cSrcweir     WORD                    mnVersion;              // System-Version (311 == 3.11)
160cdf0e10cSrcweir     BOOL                    mbW40;                  // Is System-Version >= 4.0
161cdf0e10cSrcweir     BOOL                    mbWXP;                  // Windows XP
162cdf0e10cSrcweir     BOOL                    mbWPrinter;             // true: use unicode printer functions
163cdf0e10cSrcweir                                                     // false: use anis compat printer functions
164cdf0e10cSrcweir     OSVERSIONINFO           maVersionInfo;
165cdf0e10cSrcweir };
166cdf0e10cSrcweir 
167cdf0e10cSrcweir extern SalShlData aSalShlData;
168cdf0e10cSrcweir 
169cdf0e10cSrcweir // ------------
170cdf0e10cSrcweir // - GDICache -
171cdf0e10cSrcweir // ------------
172cdf0e10cSrcweir 
173cdf0e10cSrcweir #define CACHESIZE_HDC       3
174cdf0e10cSrcweir #define CACHED_HDC_1        0
175cdf0e10cSrcweir #define CACHED_HDC_2        1
176cdf0e10cSrcweir #define CACHED_HDC_DRAW     2
177cdf0e10cSrcweir #define CACHED_HDC_DEFEXT   64
178cdf0e10cSrcweir 
179cdf0e10cSrcweir struct HDCCache
180cdf0e10cSrcweir {
181cdf0e10cSrcweir     HDC         mhDC;
182cdf0e10cSrcweir     HPALETTE    mhDefPal;
183cdf0e10cSrcweir     HBITMAP     mhDefBmp;
184cdf0e10cSrcweir     HBITMAP     mhSelBmp;
185cdf0e10cSrcweir     HBITMAP     mhActBmp;
186cdf0e10cSrcweir };
187cdf0e10cSrcweir 
188cdf0e10cSrcweir void ImplClearHDCCache( SalData* pData );
189cdf0e10cSrcweir HDC ImplGetCachedDC( sal_uLong nID, HBITMAP hBmp = 0 );
190cdf0e10cSrcweir void ImplReleaseCachedDC( sal_uLong nID );
191cdf0e10cSrcweir 
192cdf0e10cSrcweir bool ImplAddTempFont( SalData&, const String& rFontFileURL );
193cdf0e10cSrcweir void ImplReleaseTempFonts( SalData& );
194cdf0e10cSrcweir 
195cdf0e10cSrcweir // --------------------------------------------
196cdf0e10cSrcweir // - SALSHL.CXX - for accessing DLL resources -
197cdf0e10cSrcweir // --------------------------------------------
198cdf0e10cSrcweir 
199cdf0e10cSrcweir HCURSOR ImplLoadSalCursor( int nId );
200cdf0e10cSrcweir HBITMAP ImplLoadSalBitmap( int nId );
201cdf0e10cSrcweir sal_Bool ImplLoadSalIcon( int nId, HICON& rIcon, HICON& rSmallIcon );
202cdf0e10cSrcweir 
203cdf0e10cSrcweir // SALGDI.CXX
204cdf0e10cSrcweir void ImplInitSalGDI();
205cdf0e10cSrcweir void ImplFreeSalGDI();
206cdf0e10cSrcweir 
207cdf0e10cSrcweir // --------------
208cdf0e10cSrcweir // - Prototypes -
209cdf0e10cSrcweir // --------------
210cdf0e10cSrcweir 
211cdf0e10cSrcweir // \\WIN\SOURCE\APP\SALINST.CXX
212cdf0e10cSrcweir void ImplSalYieldMutexAcquireWithWait();
213cdf0e10cSrcweir sal_Bool ImplSalYieldMutexTryToAcquire();
214cdf0e10cSrcweir void ImplSalYieldMutexAcquire();
215cdf0e10cSrcweir void ImplSalYieldMutexRelease();
216cdf0e10cSrcweir sal_uLong ImplSalReleaseYieldMutex();
217cdf0e10cSrcweir void ImplSalAcquireYieldMutex( sal_uLong nCount );
218cdf0e10cSrcweir sal_Bool ImplInterceptChildWindowKeyDown( MSG& rMsg );
219cdf0e10cSrcweir 
220cdf0e10cSrcweir // \\WIN\SOURCE\WINDOW\SALFRAME.CXX
221cdf0e10cSrcweir LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
222cdf0e10cSrcweir LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
223cdf0e10cSrcweir // \SV\WIN\SOURCE\APP\SALTIMER.CXX
224cdf0e10cSrcweir #define SALTIMERPROC_RECURSIVE 0xffffffff
225cdf0e10cSrcweir void    CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT_PTR nId, DWORD nTime );
226cdf0e10cSrcweir 
227cdf0e10cSrcweir // \WIN\SOURCE\WINDOW\SALFRAME.CXX
228cdf0e10cSrcweir void SalTestMouseLeave();
229cdf0e10cSrcweir sal_Bool ImplWriteLastError( DWORD lastError, const char *szApiCall );
230cdf0e10cSrcweir 
231cdf0e10cSrcweir // \WIN\SOURCE\WINDOW\SALFRAME.CXX
232cdf0e10cSrcweir long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam );
233cdf0e10cSrcweir long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam );
234cdf0e10cSrcweir sal_Bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
235cdf0e10cSrcweir 
236cdf0e10cSrcweir // \WIN\SOURCE\WINDOW\SALOBJ.CXX
237cdf0e10cSrcweir WinSalObject* ImplFindSalObject( HWND hWndChild );
238cdf0e10cSrcweir sal_Bool ImplSalPreDispatchMsg( MSG* pMsg );
239cdf0e10cSrcweir void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
240cdf0e10cSrcweir 
241cdf0e10cSrcweir // \WIN\SOURCE\GDI\SALGDI3.CXX
242cdf0e10cSrcweir void ImplSalLogFontToFontA( HDC hDC, const LOGFONTA& rLogFont, Font& rFont );
243cdf0e10cSrcweir void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont );
244cdf0e10cSrcweir bool ImplIsFontAvailable( HDC hDC, const UniString& rName );
245cdf0e10cSrcweir 
246cdf0e10cSrcweir // \WIN\SOURCE\APP\SALDATA.CXX
247cdf0e10cSrcweir rtl_TextEncoding ImplSalGetSystemEncoding();
248cdf0e10cSrcweir ByteString ImplSalGetWinAnsiString( const UniString& rStr, sal_Bool bFileName = FALSE );
249cdf0e10cSrcweir UniString ImplSalGetUniString( const sal_Char* pStr, xub_StrLen nLen = STRING_LEN );
250cdf0e10cSrcweir int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
251cdf0e10cSrcweir 
252cdf0e10cSrcweir // -----------
253cdf0e10cSrcweir // - Defines -
254cdf0e10cSrcweir // -----------
255cdf0e10cSrcweir 
256cdf0e10cSrcweir #define SAL_FRAME_WNDEXTRA          sizeof( DWORD )
257cdf0e10cSrcweir #define SAL_FRAME_THIS              0
258cdf0e10cSrcweir #define SAL_FRAME_CLASSNAMEA        "SALFRAME"
259cdf0e10cSrcweir #define SAL_FRAME_CLASSNAMEW        L"SALFRAME"
260cdf0e10cSrcweir #define SAL_SUBFRAME_CLASSNAMEA     "SALSUBFRAME"
261cdf0e10cSrcweir #define SAL_SUBFRAME_CLASSNAMEW     L"SALSUBFRAME"
262cdf0e10cSrcweir #define SAL_TMPSUBFRAME_CLASSNAMEW  L"SALTMPSUBFRAME"
263cdf0e10cSrcweir #define SAL_OBJECT_WNDEXTRA         sizeof( DWORD )
264cdf0e10cSrcweir #define SAL_OBJECT_THIS             0
265cdf0e10cSrcweir #define SAL_OBJECT_CLASSNAMEA       "SALOBJECT"
266cdf0e10cSrcweir #define SAL_OBJECT_CLASSNAMEW       L"SALOBJECT"
267cdf0e10cSrcweir #define SAL_OBJECT_CHILDCLASSNAMEA  "SALOBJECTCHILD"
268cdf0e10cSrcweir #define SAL_OBJECT_CHILDCLASSNAMEW  L"SALOBJECTCHILD"
269cdf0e10cSrcweir #define SAL_COM_CLASSNAMEA          "SALCOMWND"
270cdf0e10cSrcweir #define SAL_COM_CLASSNAMEW          L"SALCOMWND"
271cdf0e10cSrcweir 
272cdf0e10cSrcweir #define SAL_MOUSELEAVE_TIMEOUT      300
273cdf0e10cSrcweir 
274cdf0e10cSrcweir // wParam == hDC; lParam == 0
275cdf0e10cSrcweir #define SAL_MSG_PRINTABORTJOB       (WM_USER+110)
276cdf0e10cSrcweir // wParam == bWait; lParam == 0
277cdf0e10cSrcweir #define SAL_MSG_THREADYIELD         (WM_USER+111)
278cdf0e10cSrcweir // wParam == 0; lParam == 0
279cdf0e10cSrcweir #define SAL_MSG_RELEASEWAITYIELD    (WM_USER+112)
280cdf0e10cSrcweir // wParam == 0; lParam == nMS
281cdf0e10cSrcweir #define SAL_MSG_STARTTIMER          (WM_USER+113)
282cdf0e10cSrcweir // wParam == nFrameStyle; lParam == pParent; lResult == pFrame
283cdf0e10cSrcweir #define SAL_MSG_CREATEFRAME         (WM_USER+114)
284cdf0e10cSrcweir // wParam == 0; lParam == 0
285cdf0e10cSrcweir #define SAL_MSG_DESTROYFRAME        (WM_USER+115)
286cdf0e10cSrcweir // wParam == 0; lParam == pParent; lResult == pObject
287cdf0e10cSrcweir #define SAL_MSG_CREATEOBJECT        (WM_USER+116)
288cdf0e10cSrcweir // wParam == 0; lParam == pObject;
289cdf0e10cSrcweir #define SAL_MSG_DESTROYOBJECT       (WM_USER+117)
290cdf0e10cSrcweir // wParam == hWnd; lParam == 0; lResult == hDC
291cdf0e10cSrcweir #define SAL_MSG_GETDC               (WM_USER+120)
292cdf0e10cSrcweir // wParam == hWnd; lParam == 0
293cdf0e10cSrcweir #define SAL_MSG_RELEASEDC           (WM_USER+121)
294cdf0e10cSrcweir // wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
295cdf0e10cSrcweir #define SAL_MSG_RECREATEHWND         (WM_USER+122)
296cdf0e10cSrcweir // wParam == newParentHwnd; lParam == oldHwnd; lResult == newhWnd
297cdf0e10cSrcweir #define SAL_MSG_RECREATECHILDHWND    (WM_USER+123)
298cdf0e10cSrcweir // wParam == 0; lParam == HWND;
299cdf0e10cSrcweir #define SAL_MSG_DESTROYHWND         (WM_USER+124)
300cdf0e10cSrcweir 
301cdf0e10cSrcweir // wParam == 0; lParam == pData
302cdf0e10cSrcweir #define SAL_MSG_USEREVENT           (WM_USER+130)
303cdf0e10cSrcweir // wParam == 0; lParam == MousePosition relativ to upper left of screen
304cdf0e10cSrcweir #define SAL_MSG_MOUSELEAVE          (WM_USER+131)
305cdf0e10cSrcweir // NULL-Message, soll nicht verarbeitet werden
306cdf0e10cSrcweir #define SAL_MSG_DUMMY               (WM_USER+132)
307cdf0e10cSrcweir // wParam == 0; lParam == 0
308cdf0e10cSrcweir #define SAL_MSG_POSTFOCUS           (WM_USER+133)
309cdf0e10cSrcweir // wParam == wParam; lParam == lParam
310cdf0e10cSrcweir #define SAL_MSG_POSTQUERYNEWPAL     (WM_USER+134)
311cdf0e10cSrcweir // wParam == wParam; lParam == lParam
312cdf0e10cSrcweir #define SAL_MSG_POSTPALCHANGED      (WM_USER+135)
313cdf0e10cSrcweir // wParam == wParam; lParam == lParam
314cdf0e10cSrcweir #define SAL_MSG_POSTMOVE            (WM_USER+136)
315cdf0e10cSrcweir // wParam == wParam; lParam == lParam
316cdf0e10cSrcweir #define SAL_MSG_POSTCALLSIZE        (WM_USER+137)
317cdf0e10cSrcweir // wParam == pRECT; lParam == 0
318cdf0e10cSrcweir #define SAL_MSG_POSTPAINT           (WM_USER+138)
319cdf0e10cSrcweir // wParam == 0; lParam == pFrame; lResult 0
320cdf0e10cSrcweir #define SAL_MSG_FORCEPALETTE        (WM_USER+139)
321cdf0e10cSrcweir // wParam == 0; lParam == 0
322cdf0e10cSrcweir #define SAL_MSG_CAPTUREMOUSE        (WM_USER+140)
323cdf0e10cSrcweir // wParam == 0; lParam == 0
324cdf0e10cSrcweir #define SAL_MSG_RELEASEMOUSE        (WM_USER+141)
325cdf0e10cSrcweir // wParam == nFlags; lParam == 0
326cdf0e10cSrcweir #define SAL_MSG_TOTOP               (WM_USER+142)
327cdf0e10cSrcweir // wParam == bVisible; lParam == 0
328cdf0e10cSrcweir #define SAL_MSG_SHOW                (WM_USER+143)
329cdf0e10cSrcweir // wParam == 0; lParam == SalInputContext
330cdf0e10cSrcweir #define SAL_MSG_SETINPUTCONTEXT     (WM_USER+144)
331cdf0e10cSrcweir // wParam == nFlags; lParam == 0
332cdf0e10cSrcweir #define SAL_MSG_ENDEXTTEXTINPUT     (WM_USER+145)
333cdf0e10cSrcweir // POSTTIMER-Message; wparam = 0, lParam == time
334cdf0e10cSrcweir #define SAL_MSG_POSTTIMER        (WM_USER+161)
335cdf0e10cSrcweir 
336cdf0e10cSrcweir // SysChild-ToTop; wParam = 0; lParam = 0
337cdf0e10cSrcweir #define SALOBJ_MSG_TOTOP            (WM_USER+160)
338cdf0e10cSrcweir // POSTFOCUS-Message; wParam == bFocus; lParam == 0
339cdf0e10cSrcweir #define SALOBJ_MSG_POSTFOCUS        (WM_USER+161)
340cdf0e10cSrcweir 
341cdf0e10cSrcweir 
342cdf0e10cSrcweir // -----------------
343cdf0e10cSrcweir // - Helpfunctions -
344cdf0e10cSrcweir // -----------------
345cdf0e10cSrcweir 
346cdf0e10cSrcweir // A/W-Wrapper
347cdf0e10cSrcweir LONG        ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong );
348cdf0e10cSrcweir LONG        ImplGetWindowLong( HWND hWnd, int nIndex );
349cdf0e10cSrcweir BOOL    ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
350cdf0e10cSrcweir BOOL    ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
351cdf0e10cSrcweir BOOL    ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
352cdf0e10cSrcweir BOOL    ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
353cdf0e10cSrcweir LONG        ImplDispatchMessage( CONST MSG *lpMsg );
354cdf0e10cSrcweir 
SetWindowPtr(HWND hWnd,WinSalFrame * pThis)355cdf0e10cSrcweir inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis )
356cdf0e10cSrcweir {
357cdf0e10cSrcweir     ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis );
358cdf0e10cSrcweir }
359cdf0e10cSrcweir 
GetWindowPtr(HWND hWnd)360cdf0e10cSrcweir inline WinSalFrame* GetWindowPtr( HWND hWnd )
361cdf0e10cSrcweir {
362cdf0e10cSrcweir     return (WinSalFrame*)ImplGetWindowLong( hWnd, SAL_FRAME_THIS );
363cdf0e10cSrcweir }
364cdf0e10cSrcweir 
SetSalObjWindowPtr(HWND hWnd,WinSalObject * pThis)365cdf0e10cSrcweir inline void SetSalObjWindowPtr( HWND hWnd, WinSalObject* pThis )
366cdf0e10cSrcweir {
367cdf0e10cSrcweir     ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis );
368cdf0e10cSrcweir }
369cdf0e10cSrcweir 
GetSalObjWindowPtr(HWND hWnd)370cdf0e10cSrcweir inline WinSalObject* GetSalObjWindowPtr( HWND hWnd )
371cdf0e10cSrcweir {
372cdf0e10cSrcweir     return (WinSalObject*)ImplGetWindowLong( hWnd, SAL_OBJECT_THIS );
373cdf0e10cSrcweir }
374cdf0e10cSrcweir 
375cdf0e10cSrcweir #endif  // _SV_SALDATA_HXX
376