diff options
author | Patrick Luby <pluby@openoffice.org> | 2000-11-01 02:12:46 +0000 |
---|---|---|
committer | Patrick Luby <pluby@openoffice.org> | 2000-11-01 02:12:46 +0000 |
commit | 41bf1d03e4d55ce09613f844e3a4b0bd0821647a (patch) | |
tree | 139ffbadd302b3db01b1c04dab86d394a9b5591b | |
parent | 4311801b7d0d1ed604a8269e0487bef33cbfe6a7 (diff) |
Reorganized all Objective-C object definitions and C wrapper functions so that they are separate from C++ definitions
-rw-r--r-- | vcl/aqua/inc/saldata.hxx | 66 | ||||
-rw-r--r-- | vcl/aqua/inc/salframe.h | 28 | ||||
-rw-r--r-- | vcl/aqua/inc/salgdi.h | 12 | ||||
-rw-r--r-- | vcl/aqua/inc/salinst.h | 32 | ||||
-rw-r--r-- | vcl/aqua/inc/salobj.h | 10 | ||||
-rw-r--r-- | vcl/aqua/inc/salprn.h | 8 | ||||
-rw-r--r-- | vcl/aqua/inc/salvd.h | 6 | ||||
-rw-r--r-- | vcl/aqua/source/app/makefile.mk | 11 | ||||
-rw-r--r-- | vcl/aqua/source/app/saldata.cxx | 16 | ||||
-rw-r--r-- | vcl/aqua/source/app/salinst.cxx | 110 | ||||
-rw-r--r-- | vcl/aqua/source/app/saltimer.cxx | 6 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salbmp.cxx | 12 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salgdi.cxx | 32 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salogl.cxx | 29 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salprn.cxx | 36 | ||||
-rw-r--r-- | vcl/aqua/source/gdi/salvd.cxx | 8 | ||||
-rw-r--r-- | vcl/aqua/source/window/makefile.mk | 12 | ||||
-rw-r--r-- | vcl/aqua/source/window/salframe.cxx | 124 | ||||
-rw-r--r-- | vcl/aqua/source/window/salobj.cxx | 44 |
19 files changed, 255 insertions, 347 deletions
diff --git a/vcl/aqua/inc/saldata.hxx b/vcl/aqua/inc/saldata.hxx index 1fef19ea69c3..b9ac1e22c420 100644 --- a/vcl/aqua/inc/saldata.hxx +++ b/vcl/aqua/inc/saldata.hxx @@ -2,9 +2,9 @@ * * $RCSfile: saldata.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pluby $ $Date: 2000-10-29 06:29:57 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,7 @@ class SalFrame; class SalVirtualDevice; class SalPrinter; class Font; -struct HDCCache; +struct VCLVIEWCache; // -------------------- // - Standard-Defines - @@ -98,8 +98,6 @@ struct HDCCache; 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 @@ -115,14 +113,14 @@ struct SalData 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 + VCLWINDOW 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 + VCLVIEWCache* mpVCLVIEWCache; // Cache for three DC's HBITMAP mh50Bmp; // 50% Bitmap HBRUSH mh50Brush; // 50% Brush COLORREF maStockPenColorAry[MAX_STOCKPEN]; @@ -137,7 +135,6 @@ struct SalData 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 }; @@ -151,7 +148,6 @@ inline SalData* GetAppSalData() { return (SalData*)ImplGetAppSVData()->mpSalData 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 @@ -171,23 +167,23 @@ 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 +#define CACHESIZE_VCLVIEW 3 +#define CACHED_VCLVIEW_1 0 +#define CACHED_VCLVIEW_2 1 +#define CACHED_VCLVIEW_DRAW 2 +#define CACHED_VCLVIEW_DEFEXT 64 -struct HDCCache +struct VCLVIEWCache { - HDC mhDC; + VCLVIEW mhDC; HPALETTE mhDefPal; HBITMAP mhDefBmp; HBITMAP mhSelBmp; HBITMAP mhActBmp; }; -void ImplClearHDCCache( SalData* pData ); -HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 ); +void ImplClearVCLVIEWCache( SalData* pData ); +VCLVIEW ImplGetCachedDC( ULONG nID, HBITMAP hBmp = 0 ); void ImplReleaseCachedDC( ULONG nID ); // ------------------------------------------------------ @@ -212,17 +208,17 @@ void ImplSalYieldMutexRelease(); ULONG ImplSalReleaseYieldMutex(); void ImplSalAcquireYieldMutex( ULONG nCount ); -LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -void CALLBACK SalTimerProc( HWND hWnd, UINT nMsg, UINT nId, DWORD nTime ); +LRESULT CALLBACK SalFrameWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +LRESULT CALLBACK SalFrameWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +void CALLBACK SalTimerProc( VCLWINDOW hWnd, UINT nMsg, UINT nId, DWORD nTime ); void SalTestMouseLeave(); -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 ); +long ImplHandleSalObjKeyMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +long ImplHandleSalObjSysCharMsg( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ); +BOOL ImplHandleGlobalMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ); -SalObject* ImplFindSalObject( HWND hWndChild ); +SalObject* ImplFindSalObject( VCLWINDOW hWndChild ); #ifdef WIN BOOL ImplSalPreDispatchMsg( MSG* pMsg ); void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult ); @@ -318,23 +314,23 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ); // A/W-Wrapper #ifdef WIN -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 ImplSetWindowLong( VCLWINDOW hWnd, int nIndex, DWORD dwNewLong ); +LONG ImplGetWindowLong( VCLWINDOW hWnd, int nIndex ); +WIN_BOOL ImplPostMessage( VCLWINDOW hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +WIN_BOOL ImplSendMessage( VCLWINDOW hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); +WIN_BOOL ImplGetMessage( LPMSG lpMsg, VCLWINDOW hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ); +WIN_BOOL ImplPeekMessage( LPMSG lpMsg, VCLWINDOW hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ); LONG ImplDispatchMessage( const MSG *pMsg ); #endif -inline void SetWindowPtr( HWND hWnd, SalFrame* pThis ) +inline void SetWindowPtr( VCLWINDOW hWnd, SalFrame* pThis ) { #ifdef WIN ImplSetWindowLong( hWnd, SAL_FRAME_THIS, (LONG)pThis ); #endif } -inline SalFrame* GetWindowPtr( HWND hWnd ) +inline SalFrame* GetWindowPtr( VCLWINDOW hWnd ) { #ifdef WIN return (SalFrame*)ImplGetWindowLong( hWnd, SAL_FRAME_THIS ); @@ -343,14 +339,14 @@ inline SalFrame* GetWindowPtr( HWND hWnd ) #endif } -inline void SetSalObjWindowPtr( HWND hWnd, SalObject* pThis ) +inline void SetSalObjWindowPtr( VCLWINDOW hWnd, SalObject* pThis ) { #ifdef WIN ImplSetWindowLong( hWnd, SAL_OBJECT_THIS, (LONG)pThis ); #endif } -inline SalObject* GetSalObjWindowPtr( HWND hWnd ) +inline SalObject* GetSalObjWindowPtr( VCLWINDOW hWnd ) { #ifdef WIN return (SalObject*)ImplGetWindowLong( hWnd, SAL_OBJECT_THIS ); diff --git a/vcl/aqua/inc/salframe.h b/vcl/aqua/inc/salframe.h index 12f45288dffe..2bacd51e0d06 100644 --- a/vcl/aqua/inc/salframe.h +++ b/vcl/aqua/inc/salframe.h @@ -2,9 +2,9 @@ * * $RCSfile: salframe.h,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: pluby $ $Date: 2000-10-31 22:21:50 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,27 +66,11 @@ #include <sv.h> #endif -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Instantiate a native NSWindow. -HWND NSWindow_new( ULONG nSalFrameStyle, HWND hParentWindow ); - -// Get NSWindow contentView -HDC NSWindow_contentView( HWND hWindow ); - -// Display NSWindow -NSWindow_makeKeyAndOrderFront( HWND hWindow ); - -// Hide NSWindow -NSWindow_close( HWND hWindow ); - -// Release a native NSWindow -void NSWindow_release( HWND hWindow ); +#ifndef _SV_VCLWINDOW_H +#include <VCLWindow.h> +#endif #ifdef __cplusplus -} #ifndef _SV_SYSDATA_HXX #include <sysdata.hxx> @@ -99,7 +83,7 @@ void NSWindow_release( HWND hWindow ); class SalFrameData { public: - HWND mhWnd; // Window handle + VCLWINDOW mhWnd; // Window handle HCURSOR mhCursor; // cursor handle HIMC mhDefIMEContext; // default IME-Context SalGraphics* mpGraphics; // current frame graphics diff --git a/vcl/aqua/inc/salgdi.h b/vcl/aqua/inc/salgdi.h index 0ce9eb842cb5..d54fe404fc31 100644 --- a/vcl/aqua/inc/salgdi.h +++ b/vcl/aqua/inc/salgdi.h @@ -2,9 +2,9 @@ * * $RCSfile: salgdi.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:25 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,6 +66,10 @@ #include <sv.h> #endif +#ifndef _SV_VCLWINDOW_H +#include <VCLWindow.h> +#endif + // ----------- // - Defines - // ----------- @@ -80,8 +84,8 @@ class SalGraphicsData { public: - HDC mhDC; // HDC - HWND mhWnd; // Window-Handle, when Window-Graphics + VCLVIEW mhDC; // VCLVIEW + VCLWINDOW mhWnd; // Window-Handle, when Window-Graphics HPEN mhPen; // Pen HBRUSH mhBrush; // Brush HFONT mhFont; // Font diff --git a/vcl/aqua/inc/salinst.h b/vcl/aqua/inc/salinst.h index c6b896b9418e..ad7f82c56740 100644 --- a/vcl/aqua/inc/salinst.h +++ b/vcl/aqua/inc/salinst.h @@ -2,9 +2,9 @@ * * $RCSfile: salinst.h,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: pluby $ $Date: 2000-10-29 06:29:57 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,26 +66,11 @@ #include <sv.h> #endif -#ifdef __cplusplus -extern "C" { -#endif // __cplusplus - -// Instantialize application's global GUI objects -void NSApp_init(); - -// Release applications's global GUI objects -void NSApp_release(); - -// Get next event from the application event queue. If there are no events in -// the queue and bWait is true, wait for next event to be posted to the queue. -// Otherwise, return immediately. -MSG NSApp_nextEvent( BOOL bWait ); - -// Dispatch events -void NSApp_sendEvent( MSG hMsg ); +#ifndef _SV_VCLWINDOW_H +#include <VCLWindow.h> +#endif #ifdef __cplusplus -} #ifdef _VOS_NO_NAMESPACE class OMutex; @@ -104,8 +89,7 @@ class SalObject; class SalInstanceData { public: - HINSTANCE mhInst; // Instance Handle - HWND mhComWnd; // window, for communication (between threads and the main thread) + VCLWINDOW mhComWnd; // window, for communication (between threads and the main thread) void* mpFilterInst; void* mpFilterCallback; SalYieldMutex* mpSalYieldMutex; // Sal-Yield-Mutex @@ -121,10 +105,10 @@ public: // - Prototypen - // -------------- -SalFrame* ImplSalCreateFrame( SalInstance* pInst, HWND hWndParent, ULONG nSalFrameStyle ); +SalFrame* ImplSalCreateFrame( SalInstance* pInst, VCLWINDOW hWndParent, ULONG nSalFrameStyle ); SalObject* ImplSalCreateObject( SalInstance* pInst, SalFrame* pParent ); void ImplSalStartTimer( ULONG nMS, BOOL bMutex = FALSE ); -void ImplSalPrinterAbortJobAsync( HDC hPrnDC ); +void ImplSalPrinterAbortJobAsync( VCLVIEW hPrnDC ); #endif // __cplusplus diff --git a/vcl/aqua/inc/salobj.h b/vcl/aqua/inc/salobj.h index 07cba9defb49..f6e7c3a9d26b 100644 --- a/vcl/aqua/inc/salobj.h +++ b/vcl/aqua/inc/salobj.h @@ -2,9 +2,9 @@ * * $RCSfile: salobj.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,9 +76,9 @@ class SalObjectData { public: - HWND mhWnd; // Window handle - HWND mhWndChild; // Child Window handle - HWND mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte + VCLWINDOW mhWnd; // Window handle + VCLWINDOW mhWndChild; // Child Window handle + VCLWINDOW mhLastFocusWnd; // Child-Window, welches als letztes den Focus hatte SystemChildData maSysData; // SystemEnvData #ifdef WIN RGNDATA* mpClipRgnData; // ClipRegion-Data diff --git a/vcl/aqua/inc/salprn.h b/vcl/aqua/inc/salprn.h index 483d351fd8fa..2028dfbd322a 100644 --- a/vcl/aqua/inc/salprn.h +++ b/vcl/aqua/inc/salprn.h @@ -2,9 +2,9 @@ * * $RCSfile: salprn.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -119,7 +119,7 @@ public: ByteString maDriverNameA; // printer driver name ByteString maDeviceNameA; // printer device name ByteString maPortNameA; // printer port name - HDC mhDC; // printer hdc + VCLVIEW mhDC; // printer hdc BOOL mbGraphics; // is Graphics used BOOL mbAnsi; }; @@ -134,7 +134,7 @@ public: SalGraphics* mpGraphics; // current Printer graphics SalInfoPrinter* mpInfoPrinter; // pointer to the compatible InfoPrinter SalPrinter* mpNextPrinter; // next printing printer - HDC mhDC; // printer hdc + VCLVIEW mhDC; // printer hdc ULONG mnError; // Error Code ULONG mnCopies; // Kopien BOOL mbCollate; // Sortierte Kopien diff --git a/vcl/aqua/inc/salvd.h b/vcl/aqua/inc/salvd.h index e6eea8235698..d95e5f816388 100644 --- a/vcl/aqua/inc/salvd.h +++ b/vcl/aqua/inc/salvd.h @@ -2,9 +2,9 @@ * * $RCSfile: salvd.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,7 @@ class SalVirtualDevice; class SalVirDevData { public: - HDC mhDC; // HDC or 0 for Cache Device + VCLVIEW mhDC; // VCLVIEW or 0 for Cache Device HBITMAP mhBmp; // Memory Bitmap HBITMAP mhDefBmp; // Default Bitmap SalGraphics* mpGraphics; // current VirDev graphics diff --git a/vcl/aqua/source/app/makefile.mk b/vcl/aqua/source/app/makefile.mk index d10b2b5069ac..02b32b590840 100644 --- a/vcl/aqua/source/app/makefile.mk +++ b/vcl/aqua/source/app/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.5 $ +# $Revision: 1.6 $ # -# last change: $Author: pluby $ $Date: 2000-10-29 06:29:58 $ +# last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -82,18 +82,19 @@ dummy: .ELSE # "$(OS)"!="MACOSX" OBJFILES= $(OBJ)$/salmain.obj \ - $(OBJ)$/salmain_impl.obj + $(OBJ)$/VCLApplication.obj \ + $(OBJ)$/VCLAutoreleasePool.obj SLOFILES= $(SLO)$/salshl.obj \ $(SLO)$/saldata.obj \ $(SLO)$/salinst.obj \ - $(SLO)$/salinst_impl.obj \ $(SLO)$/saltimer.obj \ $(SLO)$/salsound.obj \ $(SLO)$/salinfo.obj \ $(SLO)$/salsys.obj \ $(SLO)$/salmain.obj \ - $(SLO)$/salmain_impl.obj + $(SLO)$/VCLApplication.obj \ + $(SLO)$/VCLAutoreleasePool.obj EXCEPTIONSFILES=$(SLO)$/salmain.obj \ $(OBJ)$/salmain.obj diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx index 39c8b22e342c..a185bce05456 100644 --- a/vcl/aqua/source/app/saldata.cxx +++ b/vcl/aqua/source/app/saldata.cxx @@ -2,9 +2,9 @@ * * $RCSfile: saldata.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -200,7 +200,7 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ) // ======================================================================= #ifdef WIN -LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ) +LONG ImplSetWindowLong( VCLWINDOW hWnd, int nIndex, DWORD dwNewLong ) { return SetWindowLongA( hWnd, nIndex, dwNewLong ); } @@ -209,7 +209,7 @@ LONG ImplSetWindowLong( HWND hWnd, int nIndex, DWORD dwNewLong ) // ----------------------------------------------------------------------- #ifdef WIN -LONG ImplGetWindowLong( HWND hWnd, int nIndex ) +LONG ImplGetWindowLong( VCLWINDOW hWnd, int nIndex ) { return GetWindowLongA( hWnd, nIndex ); } @@ -218,7 +218,7 @@ LONG ImplGetWindowLong( HWND hWnd, int nIndex ) // ----------------------------------------------------------------------- #ifdef WIN -WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +WIN_BOOL ImplPostMessage( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { return PostMessageA( hWnd, nMsg, wParam, lParam ); } @@ -227,7 +227,7 @@ WIN_BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- #ifdef WIN -WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +WIN_BOOL ImplSendMessage( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { return SendMessageA( hWnd, nMsg, wParam, lParam ); } @@ -236,7 +236,7 @@ WIN_BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- #ifdef WIN -WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) +WIN_BOOL ImplGetMessage( LPMSG lpMsg, VCLWINDOW hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax ) { return GetMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax ); } @@ -245,7 +245,7 @@ WIN_BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFi // ----------------------------------------------------------------------- #ifdef WIN -WIN_BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) +WIN_BOOL ImplPeekMessage( LPMSG lpMsg, VCLWINDOW hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg ) { return PeekMessageA( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg ); } diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx index aa013deefc14..fbcc17b32843 100644 --- a/vcl/aqua/source/app/salinst.cxx +++ b/vcl/aqua/source/app/salinst.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salinst.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: pluby $ $Date: 2000-10-31 22:21:51 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -108,14 +108,15 @@ #ifndef _SV_SYSDATA_HXX #include <sysdata.hxx> #endif - #ifndef _SV_TIMER_HXX #include <timer.hxx> #endif - #ifndef _SV_SVAPP_HXX #include <svapp.hxx> #endif +#ifndef _SV_VCLAPPLICATION_H +#include <VCLApplication.h> +#endif // ======================================================================= @@ -136,8 +137,8 @@ void SalAbort( const XubString& rErrorText ) // ======================================================================= -LRESULT CALLBACK SalComWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); -LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +LRESULT CALLBACK SalComWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); +LRESULT CALLBACK SalComWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ); // ======================================================================= @@ -477,10 +478,10 @@ SalInstance* CreateSalInstance() pSalData->mnAppThreadId = GetCurrentThreadId(); #endif +#ifdef WIN // register frame class if ( !pSalData->mhPrevInst ) { -#ifdef WIN WNDCLASSEXA aWndClassEx; aWndClassEx.cbSize = sizeof( aWndClassEx ); aWndClassEx.style = CS_OWNDC; @@ -508,10 +509,10 @@ SalInstance* CreateSalInstance() aWndClassEx.lpszClassName = SAL_COM_CLASSNAMEA; if ( !RegisterClassExA( &aWndClassEx ) ) return NULL; -#endif } +#endif - HWND hComWnd; + VCLWINDOW hComWnd; #ifdef WIN hComWnd = CreateWindowExA( WS_EX_TOOLWINDOW, SAL_COM_CLASSNAMEA, "", WS_POPUP, 0, 0, 0, 0, 0, 0, @@ -527,7 +528,6 @@ SalInstance* CreateSalInstance() // init instance (only one instance in this version !!!) pSalData->mpFirstInstance = pInst; - pInst->maInstData.mhInst = pSalData->mhInst; pInst->maInstData.mhComWnd = hComWnd; // init static GDI Data @@ -622,81 +622,19 @@ static void ImplSalDispatchMessage( MSG *pMsg ) // ----------------------------------------------------------------------- -#ifdef WIN -void ImplSalYield( BOOL bWait ) -{ - MSG aMsg; - - if ( bWait ) - { - if ( ImplGetMessage( &aMsg, 0, 0, 0 ) ) - { - TranslateMessage( &aMsg ); - ImplSalDispatchMessage( &aMsg ); - } - } - else - { - if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) ) - { - TranslateMessage( &aMsg ); - ImplSalDispatchMessage( &aMsg ); - } - } -} -#endif - -// ----------------------------------------------------------------------- - void SalInstance::Yield( BOOL bWait ) { - SalYieldMutex* pYieldMutex = maInstData.mpSalYieldMutex; - SalData* pSalData = GetSalData(); -#ifdef WIN - DWORD nCurThreadId = GetCurrentThreadId(); - ULONG nCount = pYieldMutex->GetAcquireCount( nCurThreadId ); - ULONG n = nCount; - while ( n ) - { - pYieldMutex->release(); - n--; - } - if ( pSalData->mnAppThreadId != nCurThreadId ) - { - ImplSendMessage( maInstData.mhComWnd, SAL_MSG_THREADYIELD, (WPARAM)bWait, (LPARAM)0 ); - n = nCount; - while ( n ) - { - pYieldMutex->acquire(); - n--; - } - } - else - { - ImplSalYield( bWait ); - - n = nCount; - while ( n ) - { - ImplSalYieldMutexAcquireWithWait(); - n--; - } - } -#else - // Try to get an event from the event queue. If an event is available, - // dispatch it. Note that if bWait is true, we will wait indefinitely - // for the next event if no event is pending in the queue. - MSG aMsg = NSApp_nextEvent( bWait ); - if ( aMsg ) - { - NSApp_sendEvent( aMsg ); - } -#endif + // Start the event queue. Note that VCLApplication_run() will not return until + // the application shuts down. On other platforms, this function returns + // after each event is pulled off the event queue and dispatched. + // Instead, we have enter this method only once and let VCLApplication_run do + // all of the pulling and dispatching of events. + VCLApplication_run(); } // ----------------------------------------------------------------------- -LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) +LRESULT CALLBACK SalComWndProc( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { LRESULT nRet = 0; @@ -704,7 +642,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar switch ( nMsg ) { case SAL_MSG_PRINTABORTJOB: - ImplSalPrinterAbortJobAsync( (HDC)wParam ); + ImplSalPrinterAbortJobAsync( (VCLVIEW)wParam ); rDef = FALSE; break; case SAL_MSG_THREADYIELD: @@ -727,7 +665,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar rDef = FALSE; break; case SAL_MSG_CREATEFRAME: - nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (HWND)lParam, (ULONG)wParam ); + nRet = (LRESULT)ImplSalCreateFrame( GetSalData()->mpFirstInstance, (VCLWINDOW)lParam, (ULONG)wParam ); rDef = FALSE; break; case SAL_MSG_DESTROYFRAME: @@ -757,7 +695,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar } #ifdef WIN -LRESULT CALLBACK SalComWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalComWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalComWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -771,7 +709,7 @@ LRESULT CALLBACK SalComWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa #endif #ifdef WIN -LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalComWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalComWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -891,13 +829,13 @@ SalFrame* SalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle ) // Stub code: Mac OS X does not support child windows so return NULL until // we figure how to implement a good substitute for a child window - HWND hWndParent; + VCLWINDOW hWndParent; if( pParent ) hWndParent = pParent->maFrameData.mhWnd; else hWndParent = NULL; - pFrame->maFrameData.mhWnd = NSWindow_new( nSalFrameStyle, hWndParent ); + pFrame->maFrameData.mhWnd = VCLWindow_new( nSalFrameStyle, hWndParent ); return pFrame; } @@ -906,7 +844,7 @@ SalFrame* SalInstance::CreateFrame( SalFrame* pParent, ULONG nSalFrameStyle ) void SalInstance::DestroyFrame( SalFrame* pFrame ) { - NSWindow_release( pFrame->maFrameData.mhWnd ); + VCLWindow_release( pFrame->maFrameData.mhWnd ); } // ----------------------------------------------------------------------- diff --git a/vcl/aqua/source/app/saltimer.cxx b/vcl/aqua/source/app/saltimer.cxx index f55bbc77d34e..41c4d51a148d 100644 --- a/vcl/aqua/source/app/saltimer.cxx +++ b/vcl/aqua/source/app/saltimer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: saltimer.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:44 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -128,7 +128,7 @@ void SalTimer::SetCallback( SALTIMERPROC pProc ) // ----------------------------------------------------------------------- -void CALLBACK SalTimerProc( HWND, UINT, UINT, DWORD ) +void CALLBACK SalTimerProc( VCLWINDOW, UINT, UINT, DWORD ) { SalData* pSalData = GetSalData(); diff --git a/vcl/aqua/source/gdi/salbmp.cxx b/vcl/aqua/source/gdi/salbmp.cxx index 7802fb20e132..3eb2c50d0803 100644 --- a/vcl/aqua/source/gdi/salbmp.cxx +++ b/vcl/aqua/source/gdi/salbmp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salbmp.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -226,7 +226,7 @@ BOOL SalBitmap::Create( const SalBitmap& rSalBmp, SalGraphics* pGraphics ) #ifdef WIN PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( rSalBmp.mhDIB ); PBITMAPINFOHEADER pBIH = (PBITMAPINFOHEADER) pBI; - HDC hDC = pGraphics->maGraphicsData.mhDC; + VCLVIEW hDC = pGraphics->maGraphicsData.mhDC; HBITMAP hNewDDB; BITMAP aDDBInfo; PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI + @@ -282,7 +282,7 @@ BOOL SalBitmap::Create( const SalBitmap& rSalBmp, USHORT nNewBitCount ) #ifdef WIN PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB ); const int nLines = (int) rSalBmp.maSize.Height(); - HDC hDC = GetDC( 0 ); + VCLVIEW hDC = GetDC( 0 ); PBYTE pBits = (PBYTE) pBI + *(DWORD*) pBI + ImplGetDIBColorCount( mhDIB ) * sizeof( RGBQUAD ); SalData* pSalData = GetSalData(); @@ -444,9 +444,9 @@ HANDLE SalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, BOOL bDIB ) // Destination-Bitmap erzeugen if ( hCopy = CreateBitmapIndirect( &aBmp ) ) { - HDC hBmpDC = CreateCompatibleDC( 0 ); + VCLVIEW hBmpDC = CreateCompatibleDC( 0 ); HBITMAP hBmpOld = (HBITMAP) SelectObject( hBmpDC, hHdl ); - HDC hCopyDC = CreateCompatibleDC( hBmpDC ); + VCLVIEW hCopyDC = CreateCompatibleDC( hBmpDC ); HBITMAP hCopyOld = (HBITMAP) SelectObject( hCopyDC, hCopy ); BitBlt( hCopyDC, 0, 0, aBmp.bmWidth, aBmp.bmHeight, hBmpDC, 0, 0, SRCCOPY ); diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx index 18e82f845f0f..03a6699135fe 100644 --- a/vcl/aqua/source/gdi/salgdi.cxx +++ b/vcl/aqua/source/gdi/salgdi.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salgdi.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -206,12 +206,12 @@ void ImplInitSalGDI() #endif // DC-Cache aufbauen - pSalData->mpHDCCache = new HDCCache[ CACHESIZE_HDC ]; - memset( pSalData->mpHDCCache, 0, CACHESIZE_HDC * sizeof( HDCCache ) ); + pSalData->mpVCLVIEWCache = new VCLVIEWCache[ CACHESIZE_VCLVIEW ]; + memset( pSalData->mpVCLVIEWCache, 0, CACHESIZE_VCLVIEW * sizeof( VCLVIEWCache ) ); #ifdef WIN // Nur bei 256 Farben Displays, die Paletten unterstuetzen - HDC hDC = GetDC( 0 ); + VCLVIEW hDC = GetDC( 0 ); int nBitsPixel = GetDeviceCaps( hDC, BITSPIXEL ); int nPlanes = GetDeviceCaps( hDC, PLANES ); int nRasterCaps = GetDeviceCaps( hDC, RASTERCAPS ); @@ -220,7 +220,7 @@ void ImplInitSalGDI() if ( (nBitCount > 8) && (nBitCount < 24) ) { // test, if we have to dither - HDC hMemDC = ::CreateCompatibleDC( hDC ); + VCLVIEW hMemDC = ::CreateCompatibleDC( hDC ); HBITMAP hMemBmp = ::CreateCompatibleBitmap( hDC, 8, 8 ); HBITMAP hBmpOld = (HBITMAP) ::SelectObject( hMemDC, hMemBmp ); HBRUSH hMemBrush = ::CreateSolidBrush( PALETTERGB( 175, 171, 169 ) ); @@ -383,8 +383,8 @@ void ImplFreeSalGDI() pSalData->mh50Bmp = 0; } - ImplClearHDCCache( pSalData ); - delete[] pSalData->mpHDCCache; + ImplClearVCLVIEWCache( pSalData ); + delete[] pSalData->mpVCLVIEWCache; // Ditherpalette loeschen, wenn vorhanden if ( pSalData->mhDitherPal ) @@ -587,15 +587,15 @@ void ImplSalDeInitGraphics( SalGraphicsData* pData ) // ======================================================================= -HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) +VCLVIEW ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) { SalData* pSalData = GetSalData(); - HDCCache* pC = &pSalData->mpHDCCache[ nID ]; + VCLVIEWCache* pC = &pSalData->mpVCLVIEWCache[ nID ]; #ifdef WIN if( !pC->mhDC ) { - HDC hDC = GetDC( 0 ); + VCLVIEW hDC = GetDC( 0 ); // neuen DC mit DefaultBitmap anlegen pC->mhDC = CreateCompatibleDC( hDC ); @@ -606,7 +606,7 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) RealizePalette( pC->mhDC ); } - pC->mhSelBmp = CreateCompatibleBitmap( hDC, CACHED_HDC_DEFEXT, CACHED_HDC_DEFEXT ); + pC->mhSelBmp = CreateCompatibleBitmap( hDC, CACHED_VCLVIEW_DEFEXT, CACHED_VCLVIEW_DEFEXT ); pC->mhDefBmp = (HBITMAP) SelectObject( pC->mhDC, pC->mhSelBmp ); ReleaseDC( 0, hDC ); @@ -626,7 +626,7 @@ HDC ImplGetCachedDC( ULONG nID, HBITMAP hBmp ) void ImplReleaseCachedDC( ULONG nID ) { SalData* pSalData = GetSalData(); - HDCCache* pC = &pSalData->mpHDCCache[ nID ]; + VCLVIEWCache* pC = &pSalData->mpVCLVIEWCache[ nID ]; #ifdef WIN if ( pC->mhActBmp ) @@ -636,11 +636,11 @@ void ImplReleaseCachedDC( ULONG nID ) // ======================================================================= -void ImplClearHDCCache( SalData* pData ) +void ImplClearVCLVIEWCache( SalData* pData ) { - for( ULONG i = 0; i < CACHESIZE_HDC; i++ ) + for( ULONG i = 0; i < CACHESIZE_VCLVIEW; i++ ) { - HDCCache* pC = &pData->mpHDCCache[ i ]; + VCLVIEWCache* pC = &pData->mpVCLVIEWCache[ i ]; #ifdef WIN if( pC->mhDC ) diff --git a/vcl/aqua/source/gdi/salogl.cxx b/vcl/aqua/source/gdi/salogl.cxx index dc6cb109f5fa..f4bc6def0789 100644 --- a/vcl/aqua/source/gdi/salogl.cxx +++ b/vcl/aqua/source/gdi/salogl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salogl.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,10 +76,10 @@ // - Additional typedefs for init. // ------------------------------- -typedef HGLRC ( *OGLFncCreateContext )( HDC hDC ); +typedef HGLRC ( *OGLFncCreateContext )( VCLVIEW hDC ); typedef BOOL ( *OGLFncDeleteContext )( HGLRC hContext ); typedef HGLRC ( *OGLFncGetCurrentContext )( void ); -typedef void ( *OGLFncMakeCurrent )( HDC hDC, HGLRC hContext ); +typedef void ( *OGLFncMakeCurrent )( VCLVIEW hDC, HGLRC hContext ); // ------------ // - Lib-Name - @@ -105,12 +105,11 @@ if( !pImplOpenWGLFnc##FncName ) bRet = FALSE; // ----------------- // Members -static HINSTANCE hImplOGLLib; HGLRC SalOpenGL::mhOGLContext = 0; -HDC SalOpenGL::mhOGLLastDC = 0; +VCLVIEW SalOpenGL::mhOGLLastDC = 0; ULONG SalOpenGL::mnOGLState = OGL_STATE_UNLOADED; -#ifdef +#ifdef WIN INIT_OGLFNC_WGL( CreateContext ); INIT_OGLFNC_WGL( DeleteContext ); INIT_OGLFNC_WGL( GetCurrentContext ); @@ -122,7 +121,7 @@ INIT_OGLFNC_WGL( MakeCurrent ); // ----------- #ifdef WIN -LRESULT CALLBACK OpenGLWndProc( HWND hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 ) +LRESULT CALLBACK OpenGLWndProc( VCLWINDOW hWnd,UINT nMsg, WPARAM nPar1, LPARAM nPar2 ) { return DefWindowProc( hWnd, nMsg, nPar1, nPar2 ); } @@ -187,7 +186,7 @@ BOOL SalOpenGL::Create() (mhOGLContext = pImplOpenWGLFncCreateContext( mhOGLLastDC )) != 0 ) { WNDCLASS aWc; - HWND hDummyWnd; + VCLWINDOW hDummyWnd; SaveDC( mhOGLLastDC ); SelectClipRgn( mhOGLLastDC, NULL ); @@ -201,7 +200,7 @@ BOOL SalOpenGL::Create() aWc.lpfnWndProc = OpenGLWndProc; aWc.lpszClassName = "OpenGLWnd"; RegisterClass( &aWc ); - hDummyWnd = CreateWindow( aWc.lpszClassName, NULL, WS_OVERLAPPED, 0, -50, 1, 1, HWND_DESKTOP, NULL, aWc.hInstance, 0 ); + hDummyWnd = CreateWindow( aWc.lpszClassName, NULL, WS_OVERLAPPED, 0, -50, 1, 1, VCLWINDOW_DESKTOP, NULL, aWc.hInstance, 0 ); ShowWindow( hDummyWnd, SW_SHOW ); DestroyWindow( hDummyWnd ); UnregisterClass( aWc.lpszClassName, aWc.hInstance ); @@ -247,7 +246,7 @@ void* SalOpenGL::GetOGLFnc( const char* pFncName ) // ------------------------------------------------------------------------ #ifdef WIN -typedef BOOL (WINAPI *MyFuncType)(HDC, HGLRC); +typedef BOOL (WINAPI *MyFuncType)(VCLVIEW, HGLRC); #endif void SalOpenGL::OGLEntry( SalGraphics* pGraphics ) @@ -279,7 +278,7 @@ void SalOpenGL::OGLEntry( SalGraphics* pGraphics ) if ( nIndex && SetPixelFormat( pGraphics->maGraphicsData.mhDC, nIndex, &pfd ) ) { WNDCLASS aWc; - HWND hDummyWnd; + VCLWINDOW hDummyWnd; pImplOpenWGLFncDeleteContext( mhOGLContext ); mhOGLLastDC = pGraphics->maGraphicsData.mhDC; @@ -295,7 +294,7 @@ void SalOpenGL::OGLEntry( SalGraphics* pGraphics ) aWc.lpfnWndProc = OpenGLWndProc; aWc.lpszClassName = "OpenGLWnd"; RegisterClass( &aWc ); - hDummyWnd = CreateWindow( aWc.lpszClassName, NULL, WS_OVERLAPPED, 0, -50, 1, 1, HWND_DESKTOP, NULL, aWc.hInstance, 0 ); + hDummyWnd = CreateWindow( aWc.lpszClassName, NULL, WS_OVERLAPPED, 0, -50, 1, 1, VCLWINDOW_DESKTOP, NULL, aWc.hInstance, 0 ); ShowWindow( hDummyWnd, SW_SHOW ); DestroyWindow( hDummyWnd ); UnregisterClass( aWc.lpszClassName, aWc.hInstance ); @@ -323,14 +322,14 @@ BOOL SalOpenGL::ImplInitLib() void SalOpenGL::ImplFreeLib() { +#ifdef WIN if ( hImplOGLLib ) { -#ifdef WIN FreeLibrary( hImplOGLLib ); -#endif hImplOGLLib = NULL; mnOGLState = OGL_STATE_UNLOADED; } +#endif } // ------------------------------------------------------------------------ diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 522c9ef18e91..cb8e40859128 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salprn.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -493,7 +493,7 @@ static BOOL ImplUpdateSalJobSetup( SalInfoPrinter* pPrinter, ImplJobSetup* pSetu LONG nRet; LONG nSysJobSize; - HWND hWnd = 0; + VCLWINDOW hWnd = 0; DWORD nMode = DM_OUT_BUFFER; ULONG nDriverDataLen = 0; SalDriverData* pOutBuffer = NULL; @@ -797,7 +797,7 @@ static void ImplJobSetupToDevMode( SalInfoPrinter* pPrinter, ImplJobSetup* pSetu // ----------------------------------------------------------------------- -static HDC ImplCreateSalPrnIC( SalInfoPrinter* pPrinter, ImplJobSetup* pSetupData ) +static VCLVIEW ImplCreateSalPrnIC( SalInfoPrinter* pPrinter, ImplJobSetup* pSetupData ) { #ifdef WIN LPDEVMODE pDevMode; @@ -806,7 +806,7 @@ static HDC ImplCreateSalPrnIC( SalInfoPrinter* pPrinter, ImplJobSetup* pSetupDat else pDevMode = NULL; // !!! UNICODE - NT Optimierung !!! - HDC hDC = CreateICA( ImplSalGetWinAnsiString( pPrinter->maPrinterData.maDriverName, TRUE ).GetBuffer(), + VCLVIEW hDC = CreateICA( ImplSalGetWinAnsiString( pPrinter->maPrinterData.maDriverName, TRUE ).GetBuffer(), ImplSalGetWinAnsiString( pPrinter->maPrinterData.maDeviceName, TRUE ).GetBuffer(), 0, (LPDEVMODE)pDevMode ); @@ -818,7 +818,7 @@ static HDC ImplCreateSalPrnIC( SalInfoPrinter* pPrinter, ImplJobSetup* pSetupDat // ----------------------------------------------------------------------- -static SalGraphics* ImplCreateSalPrnGraphics( HDC hDC ) +static SalGraphics* ImplCreateSalPrnGraphics( VCLVIEW hDC ) { SalGraphics* pGraphics = new SalGraphics; pGraphics->maGraphicsData.mhDC = hDC; @@ -835,7 +835,7 @@ static SalGraphics* ImplCreateSalPrnGraphics( HDC hDC ) static BOOL ImplUpdateSalPrnIC( SalInfoPrinter* pPrinter, ImplJobSetup* pSetupData ) { - HDC hNewDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); + VCLVIEW hNewDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); if ( !hNewDC ) return FALSE; @@ -869,7 +869,7 @@ SalInfoPrinter* SalInstance::CreateInfoPrinter( SalPrinterQueueInfo* pQueueInfo, // die Member gesetzt sind, da diese in dieser Routine abgefragt werden) ImplTestSalJobSetup( pPrinter, pSetupData, TRUE ); - HDC hDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); + VCLVIEW hDC = ImplCreateSalPrnIC( pPrinter, pSetupData ); if ( !hDC ) { delete pPrinter; @@ -1065,7 +1065,7 @@ void SalInfoPrinter::GetPageInfo( const ImplJobSetup*, long& rPageOffX, long& rPageOffY, long& rPageWidth, long& rPageHeight ) { - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; #ifdef WIN rOutWidth = GetDeviceCaps( hDC, HORZRES ); @@ -1096,7 +1096,7 @@ void SalInstance::DestroyPrinter( SalPrinter* pPrinter ) // ======================================================================= -WIN_BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ ) +WIN_BOOL CALLBACK SalPrintAbortProc( VCLVIEW hPrnDC, int /* nError */ ) { SalData* pSalData = GetSalData(); SalPrinter* pPrinter; @@ -1191,7 +1191,7 @@ SalPrinter::~SalPrinter() SalData* pSalData = GetSalData(); // DC freigeben, wenn er noch durch ein AbortJob existiert - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; if ( hDC ) { if ( maPrinterData.mpGraphics ) @@ -1245,7 +1245,7 @@ BOOL SalPrinter::StartJob( const XubString* pFileName, pDevMode = NULL; // !!! UNICODE - NT Optimierung !!! - HDC hDC = CreateDCA( ImplSalGetWinAnsiString( maPrinterData.mpInfoPrinter->maPrinterData.maDriverName, TRUE ).GetBuffer(), + VCLVIEW hDC = CreateDCA( ImplSalGetWinAnsiString( maPrinterData.mpInfoPrinter->maPrinterData.maDriverName, TRUE ).GetBuffer(), ImplSalGetWinAnsiString( maPrinterData.mpInfoPrinter->maPrinterData.maDeviceName, TRUE ).GetBuffer(), 0, (LPDEVMODEA)pDevMode ); @@ -1335,7 +1335,7 @@ BOOL SalPrinter::StartJob( const XubString* pFileName, BOOL SalPrinter::EndJob() { - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; if ( hDC ) { if ( maPrinterData.mpGraphics ) @@ -1361,7 +1361,7 @@ BOOL SalPrinter::AbortJob() maPrinterData.mbAbort = TRUE; // Abort asyncron ausloesen - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; if ( hDC ) { SalData* pSalData = GetSalData(); @@ -1376,7 +1376,7 @@ BOOL SalPrinter::AbortJob() // ----------------------------------------------------------------------- -void ImplSalPrinterAbortJobAsync( HDC hPrnDC ) +void ImplSalPrinterAbortJobAsync( VCLVIEW hPrnDC ) { SalData* pSalData = GetSalData(); SalPrinter* pPrinter = pSalData->mpFirstPrinter; @@ -1393,7 +1393,7 @@ void ImplSalPrinterAbortJobAsync( HDC hPrnDC ) // Wenn Printer noch existiert, dann den Job abbrechen if ( pPrinter ) { - HDC hDC = pPrinter->maPrinterData.mhDC; + VCLVIEW hDC = pPrinter->maPrinterData.mhDC; if ( hDC ) { if ( pPrinter->maPrinterData.mpGraphics ) @@ -1415,7 +1415,7 @@ void ImplSalPrinterAbortJobAsync( HDC hPrnDC ) SalGraphics* SalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) { - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; #ifdef WIN if ( pSetupData && pSetupData->mpDriverData && bNewJobData ) { @@ -1458,7 +1458,7 @@ SalGraphics* SalPrinter::StartPage( ImplJobSetup* pSetupData, BOOL bNewJobData ) BOOL SalPrinter::EndPage() { - HDC hDC = maPrinterData.mhDC; + VCLVIEW hDC = maPrinterData.mhDC; if ( hDC && maPrinterData.mpGraphics ) { ImplSalDeInitGraphics( &(maPrinterData.mpGraphics->maGraphicsData) ); diff --git a/vcl/aqua/source/gdi/salvd.cxx b/vcl/aqua/source/gdi/salvd.cxx index f0c33af6d17e..14662e16c228 100644 --- a/vcl/aqua/source/gdi/salvd.cxx +++ b/vcl/aqua/source/gdi/salvd.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salvd.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,7 @@ // ======================================================================= -static HBITMAP ImplCreateVirDevBitmap( HDC hDC, long nDX, long nDY, +static HBITMAP ImplCreateVirDevBitmap( VCLVIEW hDC, long nDX, long nDY, USHORT nBitCount ) { HBITMAP hBitmap; @@ -105,7 +105,7 @@ SalVirtualDevice* SalInstance::CreateVirtualDevice( SalGraphics* pGraphics, USHORT nBitCount ) { #ifdef WIN - HDC hDC = CreateCompatibleDC( pGraphics->maGraphicsData.mhDC ); + VCLVIEW hDC = CreateCompatibleDC( pGraphics->maGraphicsData.mhDC ); HBITMAP hBmp = ImplCreateVirDevBitmap( pGraphics->maGraphicsData.mhDC, nDX, nDY, nBitCount ); diff --git a/vcl/aqua/source/window/makefile.mk b/vcl/aqua/source/window/makefile.mk index d56e107145bd..a6ac37cc5104 100644 --- a/vcl/aqua/source/window/makefile.mk +++ b/vcl/aqua/source/window/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.3 $ +# $Revision: 1.4 $ # -# last change: $Author: pluby $ $Date: 2000-10-26 03:48:35 $ +# last change: $Author: pluby $ $Date: 2000-11-01 03:12:46 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -85,14 +85,14 @@ dummy: SLOFILES= \ $(SLO)/salframe.obj \ - $(SLO)/salframe_impl.obj \ - $(SLO)/salobj.obj + $(SLO)/salobj.obj \ + $(SLO)/VCLWindow.obj .IF "$(UPDATER)"=="YES" OBJFILES= \ $(OBJ)/salframe.obj \ - $(OBJ)/salframe_impl.obj \ - $(OBJ)/salobj.obj + $(OBJ)/salobj.obj \ + $(OBJ)/VCLWindow.obj .ENDIF .ENDIF # "$(OS)"!="MACOSX" diff --git a/vcl/aqua/source/window/salframe.cxx b/vcl/aqua/source/window/salframe.cxx index c89bc39c6047..c6e391516145 100644 --- a/vcl/aqua/source/window/salframe.cxx +++ b/vcl/aqua/source/window/salframe.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salframe.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: pluby $ $Date: 2000-10-31 22:21:51 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -104,7 +104,6 @@ #ifndef _SV_SALVD_HXX #include <salvd.hxx> #endif - #ifndef _SV_TIMER_HXX #include <timer.hxx> #endif @@ -114,6 +113,9 @@ #ifndef _SV_KEYCOES_HXX #include <keycodes.hxx> #endif +#ifndef _SV_VCLWINDOW_H +#include <VCLWindow.h> +#endif // ======================================================================= @@ -168,11 +170,11 @@ static void ImplSaveFrameState( SalFrame* pFrame ) // ======================================================================= SalFrame* ImplSalCreateFrame( SalInstance* pInst, - HWND hWndParent, ULONG nSalFrameStyle ) + VCLWINDOW hWndParent, ULONG nSalFrameStyle ) { SalFrame* pFrame = new SalFrame; #ifdef WIN - HWND hWnd; + VCLWINDOW hWnd; DWORD nSysStyle = 0; DWORD nExSysStyle = 0; BOOL bSaveBits = FALSE; @@ -270,7 +272,7 @@ SalFrame* ImplSalCreateFrame( SalInstance* pInst, ImplSaveFrameState( pFrame ); pFrame->maFrameData.mbDefPos = TRUE; - // CreateHDC in the main thread + // CreateVCLVIEW in the main thread pFrame->ReleaseGraphics( pFrame->GetGraphics() ); #endif @@ -446,7 +448,7 @@ static UINT ImplSalGetWheelScrollLines() { UINT nScrLines = 0; #ifdef WIN - HWND hWndMsWheel = WIN_FindWindow( MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE ); + VCLWINDOW hWndMsWheel = WIN_FindWindow( MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE ); if ( hWndMsWheel ) { UINT nGetScrollLinesMsgId = RegisterWindowMessage( MSH_SCROLL_LINES ); @@ -642,12 +644,12 @@ SalGraphics* SalFrame::GetGraphics() if ( !maFrameData.mpGraphics ) { - HDC hDC = NSWindow_contentView( maFrameData.mhWnd ); - if ( hDC ) + VCLVIEW hView = VCLWindow_contentView( maFrameData.mhWnd ); + if ( hView ) { SalData* pSalData = GetSalData(); maFrameData.mpGraphics = new SalGraphics; - maFrameData.mpGraphics->maGraphicsData.mhDC = hDC; + maFrameData.mpGraphics->maGraphicsData.mhDC = hView; maFrameData.mpGraphics->maGraphicsData.mhWnd = maFrameData.mhWnd; maFrameData.mpGraphics->maGraphicsData.mbPrinter = FALSE; maFrameData.mpGraphics->maGraphicsData.mbVirDev = FALSE; @@ -656,8 +658,8 @@ SalGraphics* SalFrame::GetGraphics() #ifdef WIN if ( pSalData->mhDitherPal ) { - maFrameData.mpGraphics->maGraphicsData.mhDefPal = SelectPalette( hDC, pSalData->mhDitherPal, TRUE ); - RealizePalette( hDC ); + maFrameData.mpGraphics->maGraphicsData.mhDefPal = SelectPalette( hView, pSalData->mhDitherPal, TRUE ); + RealizePalette( hView ); } ImplSalInitGraphics( &(maFrameData.mpGraphics->maGraphicsData) ); #endif @@ -713,7 +715,7 @@ void SalFrame::SetIcon( USHORT nIcon ) // ----------------------------------------------------------------------- -static void ImplSalShow( HWND hWnd, BOOL bVisible ) +static void ImplSalShow( VCLWINDOW hWnd, BOOL bVisible ) { SalFrame* pFrame = GetWindowPtr( hWnd ); if ( !pFrame ) @@ -731,7 +733,7 @@ static void ImplSalShow( HWND hWnd, BOOL bVisible ) if ( pFrame->maFrameData.mbPresentation ) { #ifdef WIN - HWND hWndParent = ::GetParent( hWnd ); + VCLWINDOW hWndParent = ::GetParent( hWnd ); if ( hWndParent ) SetForegroundWindow( hWndParent ); SetForegroundWindow( hWnd ); @@ -784,9 +786,9 @@ static void ImplSalShow( HWND hWnd, BOOL bVisible ) void SalFrame::Show( BOOL bVisible ) { if ( bVisible ) - NSWindow_makeKeyAndOrderFront( maFrameData.mhWnd ); + VCLWindow_makeKeyAndOrderFront( maFrameData.mhWnd ); else - NSWindow_close( maFrameData.mhWnd ); + VCLWindow_close( maFrameData.mhWnd ); } // ----------------------------------------------------------------------- @@ -1116,18 +1118,18 @@ void SalFrame::StartPresentation( BOOL bStart ) void SalFrame::SetAlwaysOnTop( BOOL bOnTop ) { #ifdef WIN - HWND hWnd; + VCLWINDOW hWnd; if ( bOnTop ) - hWnd = HWND_TOPMOST; + hWnd = VCLWINDOW_TOPMOST; else - hWnd = HWND_NOTOPMOST; + hWnd = VCLWINDOW_NOTOPMOST; SetWindowPos( maFrameData.mhWnd, hWnd, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); #endif } // ----------------------------------------------------------------------- -static void ImplSalToTop( HWND hWnd, USHORT nFlags ) +static void ImplSalToTop( VCLWINDOW hWnd, USHORT nFlags ) { #ifdef WIN if ( nFlags & SAL_FRAME_TOTOP_FOREGROUNDTASK ) @@ -1379,7 +1381,7 @@ void SalFrame::UpdateExtTextInputArea() void SalFrame::EndExtTextInput( USHORT nFlags ) { #ifdef WIN - HWND hWnd = maFrameData.mhWnd; + VCLWINDOW hWnd = maFrameData.mhWnd; HIMC hIMC = ImmGetContext( hWnd ); if ( hIMC ) { @@ -2022,7 +2024,7 @@ void SalFrame::SetCallback( void* pInst, SALFRAMEPROC pProc ) // ----------------------------------------------------------------------- -static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, +static long ImplHandleMouseMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { SalFrame* pFrame = GetWindowPtr( hWnd ); @@ -2171,7 +2173,7 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg, // ----------------------------------------------------------------------- -static long ImplHandleMouseActivateMsg( HWND hWnd ) +static long ImplHandleMouseActivateMsg( VCLWINDOW hWnd ) { SalFrame* pFrame = GetWindowPtr( hWnd ); if ( !pFrame ) @@ -2191,7 +2193,7 @@ static long ImplHandleMouseActivateMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static long ImplHandleWheelMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) +static long ImplHandleWheelMsg( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ) { ImplSalYieldMutexAcquireWithWait(); @@ -2337,7 +2339,7 @@ static sal_Unicode ImplGetCharCode( SalFrame* pFrame, WPARAM nCharCode ) // ----------------------------------------------------------------------- -static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, +static long ImplHandleKeyMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { #ifdef WIN @@ -2365,7 +2367,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, // Wir restaurieren den Background-Modus bei jeder Texteingabe, // da einige Tools wie RichWin uns diesen hin- und wieder umsetzen if ( pFrame->maFrameData.mpGraphics && - pFrame->maFrameData.mpGraphics->maGraphicsData.mhDC ) + pFrame->maFrameData.mpGraphics->maGraphicsData.mhDC ) SetBkMode( pFrame->maFrameData.mpGraphics->maGraphicsData.mhDC, TRANSPARENT ); // determine modifiers @@ -2541,7 +2543,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, // ----------------------------------------------------------------------- -long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, +long ImplHandleSalObjKeyMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { #ifdef WIN @@ -2601,7 +2603,7 @@ long ImplHandleSalObjKeyMsg( HWND hWnd, UINT nMsg, // ----------------------------------------------------------------------- -long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) +long ImplHandleSalObjSysCharMsg( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ) { SalFrame* pFrame = GetWindowPtr( hWnd ); if ( !pFrame ) @@ -2647,7 +2649,7 @@ long ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -static void ImplHandlePaintMsg( HWND hWnd ) +static void ImplHandlePaintMsg( VCLWINDOW hWnd ) { // Clip-Region muss zurueckgesetzt werden, da wir sonst kein // ordentliches Bounding-Rectangle bekommen @@ -2717,7 +2719,7 @@ static void ImplHandlePaintMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplHandlePaintMsg2( HWND hWnd, RECT* pRect ) +static void ImplHandlePaintMsg2( VCLWINDOW hWnd, RECT* pRect ) { // Paint if ( ImplSalYieldMutexTryToAcquire() ) @@ -2744,7 +2746,7 @@ static void ImplHandlePaintMsg2( HWND hWnd, RECT* pRect ) // ----------------------------------------------------------------------- -static void ImplHandleMoveMsg( HWND hWnd ) +static void ImplHandleMoveMsg( VCLWINDOW hWnd ) { if ( ImplSalYieldMutexTryToAcquire() ) { @@ -2780,7 +2782,7 @@ static void ImplHandleMoveMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplCallSizeHdl( HWND hWnd ) +static void ImplCallSizeHdl( VCLWINDOW hWnd ) { // Da Windows diese Messages auch senden kann, muss hier auch die // Solar-Semaphore beruecksichtigt werden @@ -2808,7 +2810,7 @@ static void ImplCallSizeHdl( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) +static void ImplHandleSizeMsg( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ) { #ifdef WIN if ( (wParam != SIZE_MAXSHOW) && (wParam != SIZE_MAXHIDE) ) @@ -2829,7 +2831,7 @@ static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -static void ImplHandleFocusMsg( HWND hWnd ) +static void ImplHandleFocusMsg( VCLWINDOW hWnd ) { #ifdef WIN if ( ImplSalYieldMutexTryToAcquire() ) @@ -2861,7 +2863,7 @@ static void ImplHandleFocusMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplHandleCloseMsg( HWND hWnd ) +static void ImplHandleCloseMsg( VCLWINDOW hWnd ) { if ( ImplSalYieldMutexTryToAcquire() ) { @@ -2882,7 +2884,7 @@ static void ImplHandleCloseMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static long ImplHandleShutDownMsg( HWND hWnd ) +static long ImplHandleShutDownMsg( VCLWINDOW hWnd ) { ImplSalYieldMutexAcquireWithWait(); long nRet = 0; @@ -2898,7 +2900,7 @@ static long ImplHandleShutDownMsg( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg, +static void ImplHandleSettingsChangeMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { #ifdef WIN @@ -2959,7 +2961,7 @@ static void ImplHandleSettingsChangeMsg( HWND hWnd, UINT nMsg, // ----------------------------------------------------------------------- -static void ImplHandleUserEvent( HWND hWnd, LPARAM lParam ) +static void ImplHandleUserEvent( VCLWINDOW hWnd, LPARAM lParam ) { ImplSalYieldMutexAcquireWithWait(); SalFrame* pFrame = GetWindowPtr( hWnd ); @@ -2973,7 +2975,7 @@ static void ImplHandleUserEvent( HWND hWnd, LPARAM lParam ) // ----------------------------------------------------------------------- -static void ImplHandleForcePalette( HWND hWnd ) +static void ImplHandleForcePalette( VCLWINDOW hWnd ) { SalData* pSalData = GetSalData(); HPALETTE hPal = pSalData->mhDitherPal; @@ -3012,7 +3014,7 @@ static void ImplHandleForcePalette( HWND hWnd ) // ----------------------------------------------------------------------- -static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, +static LRESULT ImplHandlePalette( BOOL bFrame, VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { SalData* pSalData = GetSalData(); @@ -3026,7 +3028,7 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, #ifdef WIN if ( (nMsg == WM_PALETTECHANGED) || (nMsg == SAL_MSG_POSTPALCHANGED) ) { - if ( (HWND)wParam == hWnd ) + if ( (VCLWINDOW)wParam == hWnd ) return 0; } @@ -3046,7 +3048,7 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, SalVirtualDevice* pTempVD; SalFrame* pTempFrame; SalGraphics* pGraphics; - HDC hDC; + VCLVIEW hDC; HPALETTE hOldPal; UINT nCols; BOOL bStdDC; @@ -3166,7 +3168,7 @@ static LRESULT ImplHandlePalette( BOOL bFrame, HWND hWnd, UINT nMsg, // ----------------------------------------------------------------------- -static int ImplHandleMinMax( HWND hWnd, LPARAM lParam ) +static int ImplHandleMinMax( VCLWINDOW hWnd, LPARAM lParam ) { int bRet = FALSE; @@ -3215,7 +3217,7 @@ static int ImplHandleMinMax( HWND hWnd, LPARAM lParam ) // ----------------------------------------------------------------------- -static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ) +static int ImplHandleSysCommand( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ) { SalFrame* pFrame = GetWindowPtr( hWnd ); if ( !pFrame ) @@ -3275,7 +3277,7 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ) else { // Testen, ob ein SysChild den Focus hat - HWND hFocusWnd = ::GetFocus(); + VCLWINDOW hFocusWnd = ::GetFocus(); if ( hFocusWnd && ImplFindSalObject( hFocusWnd ) ) { char cKeyCode = (char)(unsigned char)LOWORD( lParam ); @@ -3321,7 +3323,7 @@ static int ImplHandleSysCommand( HWND hWnd, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -static void ImplHandleInputLangChange( HWND hWnd, WPARAM wParam, LPARAM lParam ) +static void ImplHandleInputLangChange( VCLWINDOW hWnd, WPARAM wParam, LPARAM lParam ) { ImplSalYieldMutexAcquireWithWait(); @@ -3330,7 +3332,7 @@ static void ImplHandleInputLangChange( HWND hWnd, WPARAM wParam, LPARAM lParam ) if ( pFrame && pFrame->maFrameData.mbIME && pFrame->maFrameData.mhDefIMEContext ) { #ifdef WIN - HWND hWnd = pFrame->maFrameData.mhWnd; + VCLWINDOW hWnd = pFrame->maFrameData.mhWnd; HKL hKL = (HKL)lParam; UINT nImeProps = ImmGetProperty( hKL, IGP_PROPERTY ); @@ -3345,7 +3347,7 @@ static void ImplHandleInputLangChange( HWND hWnd, WPARAM wParam, LPARAM lParam ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEStartComposition( HWND hWnd ) +static BOOL ImplHandleIMEStartComposition( VCLWINDOW hWnd ) { BOOL bDef = TRUE; @@ -3398,7 +3400,7 @@ static BOOL ImplHandleIMEStartComposition( HWND hWnd ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) +static BOOL ImplHandleIMEComposition( VCLWINDOW hWnd, LPARAM lParam ) { BOOL bDef = TRUE; #ifdef WIN @@ -3528,7 +3530,7 @@ static BOOL ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) // ----------------------------------------------------------------------- -static BOOL ImplHandleIMEEndComposition( HWND hWnd ) +static BOOL ImplHandleIMEEndComposition( VCLWINDOW hWnd ) { BOOL bDef = TRUE; @@ -3559,7 +3561,7 @@ static BOOL ImplHandleIMEEndComposition( HWND hWnd ) // ----------------------------------------------------------------------- -static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam ) +static void ImplHandleIMENotify( VCLWINDOW hWnd, WPARAM wParam ) { if ( wParam == (WPARAM)IMN_OPENCANDIDATE ) { @@ -3574,7 +3576,7 @@ static void ImplHandleIMENotify( HWND hWnd, WPARAM wParam ) pFrame->maFrameData.mbCandidateMode = TRUE; ImplHandleIMEComposition( hWnd, GCS_CURSORPOS ); - HWND hWnd = pFrame->maFrameData.mhWnd; + VCLWINDOW hWnd = pFrame->maFrameData.mhWnd; HIMC hIMC = ImmGetContext( hWnd ); if ( hIMC ) { @@ -3667,7 +3669,7 @@ void SalTestMouseLeave() // ----------------------------------------------------------------------- -static int ImplSalWheelMousePos( HWND hWnd, UINT nMsg, WPARAM wParam, +static int ImplSalWheelMousePos( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rResult ) { #ifdef WIN @@ -3677,8 +3679,8 @@ static int ImplSalWheelMousePos( HWND hWnd, UINT nMsg, WPARAM wParam, aScreenPt.y = (short)HIWORD( lParam ); // Child-Fenster suchen, welches an der entsprechenden // Position liegt - HWND hChildWnd; - HWND hWheelWnd = hWnd; + VCLWINDOW hChildWnd; + VCLWINDOW hWheelWnd = hWnd; do { hChildWnd = hWheelWnd; @@ -3700,7 +3702,7 @@ static int ImplSalWheelMousePos( HWND hWnd, UINT nMsg, WPARAM wParam, // ----------------------------------------------------------------------- -LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) +LRESULT CALLBACK SalFrameWndProc( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { LRESULT nRet = 0; #ifdef WIN @@ -3715,7 +3717,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP CREATESTRUCTA* pStruct = (CREATESTRUCTA*)lParam; SalFrame* pFrame = (SalFrame*)pStruct->lpCreateParams; SetWindowPtr( hWnd, pFrame ); - // HWND schon hier setzen, da schon auf den Instanzdaten + // VCLWINDOW schon hier setzen, da schon auf den Instanzdaten // gearbeitet werden kann, wenn Messages waehrend // CreateWindow() gesendet werden pFrame->maFrameData.mhWnd = hWnd; @@ -3931,7 +3933,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP rDef = !ImplHandleWheelMsg( hWnd, MAKEWPARAM( nKeyState, (WORD)wParam ), lParam ); if ( rDef ) { - HWND hWheelWnd = ::GetFocus(); + VCLWINDOW hWheelWnd = ::GetFocus(); if ( hWheelWnd && (hWheelWnd != hWnd) ) { nRet = ImplSendMessage( hWheelWnd, nMsg, wParam, lParam ); @@ -3949,7 +3951,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP } #ifdef WIN -LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalFrameWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalFrameWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -3960,7 +3962,7 @@ LRESULT CALLBACK SalFrameWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l #endif #ifdef WIN -LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalFrameWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalFrameWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -3972,7 +3974,7 @@ LRESULT CALLBACK SalFrameWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l // ----------------------------------------------------------------------- -BOOL ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ) +BOOL ImplHandleGlobalMsg( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult ) { #ifdef WIN // Hier verarbeiten wir alle Messages, die fuer alle Frame-Fenster gelten, diff --git a/vcl/aqua/source/window/salobj.cxx b/vcl/aqua/source/window/salobj.cxx index 69d98b87bbd2..1a9a93a85987 100644 --- a/vcl/aqua/source/window/salobj.cxx +++ b/vcl/aqua/source/window/salobj.cxx @@ -2,9 +2,9 @@ * * $RCSfile: salobj.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:05:26 $ + * last change: $Author: pluby $ $Date: 2000-11-01 03:12:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -89,13 +89,13 @@ // ======================================================================= -static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) +static BOOL ImplIsSysWindowOrChild( VCLWINDOW hWndParent, VCLWINDOW hWndChild ) { if ( hWndParent == hWndChild ) return TRUE; #ifdef WIN - HWND hTempWnd = ::GetParent( hWndChild ); + VCLWINDOW hTempWnd = ::GetParent( hWndChild ); while ( hTempWnd ) { // Ab nicht Child-Fenstern hoeren wir auf zu suchen @@ -112,7 +112,7 @@ static BOOL ImplIsSysWindowOrChild( HWND hWndParent, HWND hWndChild ) // ----------------------------------------------------------------------- -SalObject* ImplFindSalObject( HWND hWndChild ) +SalObject* ImplFindSalObject( VCLWINDOW hWndChild ) { SalData* pSalData = GetSalData(); SalObject* pObject = pSalData->mpFirstObject; @@ -129,7 +129,7 @@ SalObject* ImplFindSalObject( HWND hWndChild ) // ----------------------------------------------------------------------- -SalFrame* ImplFindSalObjectFrame( HWND hWnd ) +SalFrame* ImplFindSalObjectFrame( VCLWINDOW hWnd ) { SalFrame* pFrame = NULL; SalObject* pObject = ImplFindSalObject( hWnd ); @@ -137,7 +137,7 @@ SalFrame* ImplFindSalObjectFrame( HWND hWnd ) { #ifdef WIN // Dazugehoerenden Frame suchen - HWND hWnd = ::GetParent( pObject->maObjectData.mhWnd ); + VCLWINDOW hWnd = ::GetParent( pObject->maObjectData.mhWnd ); pFrame = GetSalData()->mpFirstFrame; while ( pFrame ) { @@ -189,11 +189,11 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) else if ( pData->message == WM_KILLFOCUS ) { pObject = ImplFindSalObject( pData->hwnd ); - if ( pObject && !ImplFindSalObject( (HWND)pData->wParam ) ) + if ( pObject && !ImplFindSalObject( (VCLWINDOW)pData->wParam ) ) { // LoseFocus nur rufen, wenn wirklich kein ChildFenster // den Focus bekommt - if ( !pData->wParam || !ImplFindSalObject( (HWND)pData->wParam ) ) + if ( !pData->wParam || !ImplFindSalObject( (VCLWINDOW)pData->wParam ) ) { if ( ImplSalYieldMutexTryToAcquire() ) { @@ -205,7 +205,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam ) ImplPostMessage( pObject->maObjectData.mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 ); } else - pObject->maObjectData.mhLastFocusWnd = (HWND)pData->wParam; + pObject->maObjectData.mhLastFocusWnd = (VCLWINDOW)pData->wParam; } } } @@ -336,7 +336,7 @@ void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ ) // ======================================================================= -LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) +LRESULT CALLBACK SalSysObjWndProc( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { SalObject* pSysObj; LRESULT nRet = 0; @@ -394,7 +394,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l if ( ImplSalYieldMutexTryToAcquire() ) { pSysObj = GetSalObjWindowPtr( hWnd ); - HWND hFocusWnd = ::GetFocus(); + VCLWINDOW hFocusWnd = ::GetFocus(); USHORT nEvent; if ( hFocusWnd && ImplIsSysWindowOrChild( hWnd, hFocusWnd ) ) nEvent = SALOBJ_EVENT_GETFOCUS; @@ -411,7 +411,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l case WM_SIZE: { - HWND hWndChild = GetWindow( hWnd, GW_CHILD ); + VCLWINDOW hWndChild = GetWindow( hWnd, GW_CHILD ); if ( hWndChild ) { SetWindowPos( hWndChild, @@ -430,7 +430,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l CREATESTRUCTA* pStruct = (CREATESTRUCTA*)lParam; pSysObj = (SalObject*)pStruct->lpCreateParams; SetSalObjWindowPtr( hWnd, pSysObj ); - // HWND schon hier setzen, da schon auf den Instanzdaten + // VCLWINDOW schon hier setzen, da schon auf den Instanzdaten // gearbeitet werden kann, wenn Messages waehrend // CreateWindow() gesendet werden pSysObj->maObjectData.mhWnd = hWnd; @@ -444,7 +444,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l } #ifdef WIN -LRESULT CALLBACK SalSysObjWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalSysObjWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalSysObjWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -455,7 +455,7 @@ LRESULT CALLBACK SalSysObjWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM #endif #ifdef WIN -LRESULT CALLBACK SalSysObjWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalSysObjWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalSysObjWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -467,7 +467,7 @@ LRESULT CALLBACK SalSysObjWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM // ----------------------------------------------------------------------- -LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) +LRESULT CALLBACK SalSysObjChildWndProc( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef ) { LRESULT nRet = 0; @@ -494,7 +494,7 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA } #ifdef WIN -LRESULT CALLBACK SalSysObjChildWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalSysObjChildWndProcA( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalSysObjChildWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -505,7 +505,7 @@ LRESULT CALLBACK SalSysObjChildWndProcA( HWND hWnd, UINT nMsg, WPARAM wParam, LP #endif #ifdef WIN -LRESULT CALLBACK SalSysObjChildWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) +LRESULT CALLBACK SalSysObjChildWndProcW( VCLWINDOW hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam ) { int bDef = TRUE; LRESULT nRet = SalSysObjChildWndProc( hWnd, nMsg, wParam, lParam, bDef ); @@ -563,8 +563,8 @@ SalObject* ImplSalCreateObject( SalInstance* pInst, SalFrame* pParent ) { #ifdef WIN SalObject* pObject = new SalObject; - HWND hWnd; - HWND hWndChild = 0; + VCLWINDOW hWnd; + VCLWINDOW hWndChild = 0; hWnd = CreateWindowExA( 0, SAL_OBJECT_CLASSNAMEA, "", WS_CHILD, 0, 0, 0, 0, pParent->maFrameData.mhWnd, 0, pInst->maInstData.mhInst, (void*)pObject ); if ( hWnd ) { @@ -649,7 +649,7 @@ SalObject::~SalObject() if ( maObjectData.mpStdClipRgnData ) delete maObjectData.mpStdClipRgnData; - HWND hWndParent = ::GetParent( maObjectData.mhWnd ); + VCLWINDOW hWndParent = ::GetParent( maObjectData.mhWnd ); if ( maObjectData.mhWndChild ) DestroyWindow( maObjectData.mhWndChild ); |