summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-09-25 16:07:20 +0300
committerTor Lillqvist <tml@collabora.com>2014-09-25 20:05:25 +0300
commit50c627257e5856c44e1a2f2ced3a948496df0cc6 (patch)
treedbc4cfbee50831dd35e00ecb42f992f83e5500f4 /vcl
parentc40a8f6c0466f609e49ad1bd4b9da339552d18dc (diff)
Bin pointless single-line wrappers of Win32 API
Change-Id: I9c56dbee65c93dd98344577d9e696dc61c1edbd8
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/win/saldata.hxx7
-rw-r--r--vcl/win/source/app/saldata.cxx25
-rw-r--r--vcl/win/source/app/salinst.cxx50
-rw-r--r--vcl/win/source/app/saltimer.cxx6
-rw-r--r--vcl/win/source/gdi/salgdi3.cxx2
-rw-r--r--vcl/win/source/gdi/salprn.cxx12
-rw-r--r--vcl/win/source/window/salframe.cxx72
-rw-r--r--vcl/win/source/window/salobj.cxx16
8 files changed, 79 insertions, 111 deletions
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 409ca3eb13e6..9d9321d4b9ba 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -288,13 +288,6 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 );
// Call the Timer's callback from the main thread
#define SAL_MSG_TIMER_CALLBACK (WM_USER+162)
-// A/W-Wrapper
-BOOL ImplPostMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
-BOOL ImplSendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam );
-BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax );
-BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg );
-LONG ImplDispatchMessage( CONST MSG *lpMsg );
-
inline void SetWindowPtr( HWND hWnd, WinSalFrame* pThis )
{
SetWindowLongPtr( hWnd, SAL_FRAME_THIS, (LONG_PTR)pThis );
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx
index 0e9a32a8541b..f149a1629ad2 100644
--- a/vcl/win/source/app/saldata.cxx
+++ b/vcl/win/source/app/saldata.cxx
@@ -75,29 +75,4 @@ int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 )
return nRet;
}
-BOOL ImplPostMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
-{
- return PostMessageW( hWnd, nMsg, wParam, lParam );
-}
-
-BOOL ImplSendMessage( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
-{
- return SendMessageW( hWnd, nMsg, wParam, lParam );
-}
-
-BOOL ImplGetMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax )
-{
- return GetMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax );
-}
-
-BOOL ImplPeekMessage( LPMSG lpMsg, HWND hWnd, UINT wMsgFilterMin, UINT wMsgFilterMax, UINT wRemoveMsg )
-{
- return PeekMessageW( lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg );
-}
-
-LONG ImplDispatchMessage( CONST MSG *lpMsg )
-{
- return DispatchMessageW( lpMsg );
-}
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index c8eb1106315e..e6ae9539218d 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -152,7 +152,7 @@ void SalYieldMutex::release()
mpInstData->mpSalWaitMutex->acquire();
if ( mpInstData->mnYieldWaitCount )
- ImplPostMessage( mpInstData->mhComWnd, SAL_MSG_RELEASEWAITYIELD, 0, 0 );
+ PostMessageW( mpInstData->mhComWnd, SAL_MSG_RELEASEWAITYIELD, 0, 0 );
mnThreadId = 0;
mnCount--;
m_mutex.release();
@@ -227,10 +227,10 @@ void ImplSalYieldMutexAcquireWithWait()
pInst->mnYieldWaitCount++;
pInst->mpSalWaitMutex->release();
MSG aTmpMsg;
- ImplGetMessage( &aTmpMsg, pInst->mhComWnd, SAL_MSG_RELEASEWAITYIELD, SAL_MSG_RELEASEWAITYIELD );
+ GetMessageW( &aTmpMsg, pInst->mhComWnd, SAL_MSG_RELEASEWAITYIELD, SAL_MSG_RELEASEWAITYIELD );
pInst->mnYieldWaitCount--;
if ( pInst->mnYieldWaitCount )
- ImplPostMessage( pInst->mhComWnd, SAL_MSG_RELEASEWAITYIELD, 0, 0 );
+ PostMessageW( pInst->mhComWnd, SAL_MSG_RELEASEWAITYIELD, 0, 0 );
}
}
}
@@ -579,7 +579,7 @@ static void ImplSalDispatchMessage( MSG* pMsg )
if ( ImplSalPreDispatchMsg( pMsg ) )
return;
}
- LRESULT lResult = ImplDispatchMessage( pMsg );
+ LRESULT lResult = DispatchMessageW( pMsg );
if ( pSalData->mpFirstObject )
ImplSalPostDispatchMsg( pMsg, lResult );
}
@@ -592,7 +592,7 @@ void ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
do
{
- if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
+ if ( PeekMessageW( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &aMsg );
ImplSalDispatchMessage( &aMsg );
@@ -605,7 +605,7 @@ void ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
if ( bWait && ! bWasMsg )
{
- if ( ImplGetMessage( &aMsg, 0, 0, 0 ) )
+ if ( GetMessageW( &aMsg, 0, 0, 0 ) )
{
TranslateMessage( &aMsg );
ImplSalDispatchMessage( &aMsg );
@@ -640,7 +640,7 @@ void WinSalInstance::Yield( bool bWait, bool bHandleAllCurrentEvents )
if( ImplGetSVData()->maAppData.mnModalMode )
Sleep(1);
else
- ImplSendMessage( mhComWnd, SAL_MSG_THREADYIELD, (WPARAM)bWait, (LPARAM)bHandleAllCurrentEvents );
+ SendMessageW( mhComWnd, SAL_MSG_THREADYIELD, (WPARAM)bWait, (LPARAM)bHandleAllCurrentEvents );
n = nCount;
while ( n )
@@ -683,7 +683,7 @@ LRESULT CALLBACK SalComWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPar
{
WinSalInstance* pInst = GetSalData()->mpFirstInstance;
if ( pInst && pInst->mnYieldWaitCount )
- ImplPostMessage( hWnd, SAL_MSG_RELEASEWAITYIELD, wParam, lParam );
+ PostMessageW( hWnd, SAL_MSG_RELEASEWAITYIELD, wParam, lParam );
}
rDef = FALSE;
break;
@@ -785,7 +785,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
{
// revert bugfix for #108919# which never reported timeouts when called from the timer handler
// which made the application completely unresponsive during background formatting
- if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
+ if ( PeekMessageW( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
return true;
}
else
@@ -793,7 +793,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
if ( nType & VCL_INPUT_MOUSE )
{
// Test for mouse input
- if ( ImplPeekMessage( &aMsg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
+ if ( PeekMessageW( &aMsg, 0, WM_MOUSEFIRST, WM_MOUSELAST,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
}
@@ -801,7 +801,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
if ( nType & VCL_INPUT_KEYBOARD )
{
// Test for key input
- if ( ImplPeekMessage( &aMsg, 0, WM_KEYDOWN, WM_KEYDOWN,
+ if ( PeekMessageW( &aMsg, 0, WM_KEYDOWN, WM_KEYDOWN,
PM_NOREMOVE | PM_NOYIELD ) )
{
if ( (aMsg.wParam == VK_SHIFT) ||
@@ -816,23 +816,23 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
if ( nType & VCL_INPUT_PAINT )
{
// Test for paint input
- if ( ImplPeekMessage( &aMsg, 0, WM_PAINT, WM_PAINT,
+ if ( PeekMessageW( &aMsg, 0, WM_PAINT, WM_PAINT,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
- if ( ImplPeekMessage( &aMsg, 0, WM_SIZE, WM_SIZE,
+ if ( PeekMessageW( &aMsg, 0, WM_SIZE, WM_SIZE,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
- if ( ImplPeekMessage( &aMsg, 0, SAL_MSG_POSTCALLSIZE, SAL_MSG_POSTCALLSIZE,
+ if ( PeekMessageW( &aMsg, 0, SAL_MSG_POSTCALLSIZE, SAL_MSG_POSTCALLSIZE,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
- if ( ImplPeekMessage( &aMsg, 0, WM_MOVE, WM_MOVE,
+ if ( PeekMessageW( &aMsg, 0, WM_MOVE, WM_MOVE,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
- if ( ImplPeekMessage( &aMsg, 0, SAL_MSG_POSTMOVE, SAL_MSG_POSTMOVE,
+ if ( PeekMessageW( &aMsg, 0, SAL_MSG_POSTMOVE, SAL_MSG_POSTMOVE,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
}
@@ -840,7 +840,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
if ( nType & VCL_INPUT_TIMER )
{
// Test for timer input
- if ( ImplPeekMessage( &aMsg, 0, WM_TIMER, WM_TIMER,
+ if ( PeekMessageW( &aMsg, 0, WM_TIMER, WM_TIMER,
PM_NOREMOVE | PM_NOYIELD ) )
return true;
@@ -849,7 +849,7 @@ bool WinSalInstance::AnyInput( sal_uInt16 nType )
if ( nType & VCL_INPUT_OTHER )
{
// Test for any input
- if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
+ if ( PeekMessageW( &aMsg, 0, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
return true;
}
}
@@ -864,9 +864,9 @@ void SalTimer::Start( sal_uLong nMS )
if ( pSalData->mpFirstInstance )
{
if ( pSalData->mnAppThreadId != GetCurrentThreadId() )
- ImplPostMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
+ PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
else
- ImplSendMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
+ SendMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
}
else
ImplSalStartTimer( nMS, FALSE );
@@ -875,7 +875,7 @@ void SalTimer::Start( sal_uLong nMS )
SalFrame* WinSalInstance::CreateChildFrame( SystemParentData* pSystemParentData, sal_uLong nSalFrameStyle )
{
// to switch to Main-Thread
- return (SalFrame*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
+ return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)pSystemParentData->hWnd );
}
SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameStyle )
@@ -886,12 +886,12 @@ SalFrame* WinSalInstance::CreateFrame( SalFrame* pParent, sal_uLong nSalFrameSty
hWndParent = static_cast<WinSalFrame*>(pParent)->mhWnd;
else
hWndParent = 0;
- return (SalFrame*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)hWndParent );
+ return (SalFrame*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEFRAME, nSalFrameStyle, (LPARAM)hWndParent );
}
void WinSalInstance::DestroyFrame( SalFrame* pFrame )
{
- ImplSendMessage( mhComWnd, SAL_MSG_DESTROYFRAME, 0, (LPARAM)pFrame );
+ SendMessageW( mhComWnd, SAL_MSG_DESTROYFRAME, 0, (LPARAM)pFrame );
}
SalObject* WinSalInstance::CreateObject( SalFrame* pParent,
@@ -899,12 +899,12 @@ SalObject* WinSalInstance::CreateObject( SalFrame* pParent,
bool /*bShow*/ )
{
// to switch to Main-Thread
- return (SalObject*)(sal_IntPtr)ImplSendMessage( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
+ return (SalObject*)(sal_IntPtr)SendMessageW( mhComWnd, SAL_MSG_CREATEOBJECT, 0, (LPARAM)static_cast<WinSalFrame*>(pParent) );
}
void WinSalInstance::DestroyObject( SalObject* pObject )
{
- ImplSendMessage( mhComWnd, SAL_MSG_DESTROYOBJECT, 0, (LPARAM)pObject );
+ SendMessageW( mhComWnd, SAL_MSG_DESTROYOBJECT, 0, (LPARAM)pObject );
}
void* WinSalInstance::GetConnectionIdentifier( ConnectionIdentifierType& rReturnedType, int& rReturnedBytes )
diff --git a/vcl/win/source/app/saltimer.cxx b/vcl/win/source/app/saltimer.cxx
index fdfa5c0500ac..f54e2a3570c3 100644
--- a/vcl/win/source/app/saltimer.cxx
+++ b/vcl/win/source/app/saltimer.cxx
@@ -72,9 +72,9 @@ void WinSalTimer::Start( sal_uLong nMS )
if ( pSalData->mpFirstInstance )
{
if ( pSalData->mnAppThreadId != GetCurrentThreadId() )
- ImplPostMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
+ PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
else
- ImplSendMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
+ SendMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_STARTTIMER, 0, (LPARAM)nMS );
}
else
ImplSalStartTimer( nMS, FALSE );
@@ -111,7 +111,7 @@ void CALLBACK SalTimerProc(PVOID, BOOLEAN)
#endif
SalData* pSalData = GetSalData();
- ImplPostMessage(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK, 0, 0);
+ PostMessageW(pSalData->mpFirstInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK, 0, 0);
#if defined ( __MINGW32__ ) && !defined ( _WIN64 )
}
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 7986777293eb..45fbe3fe9051 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -1915,7 +1915,7 @@ void ImplReleaseTempFonts( SalData& rSalData )
// notify every other application
// unless the temp fonts were installed as private fonts
if( nCount > 0 )
- ::PostMessage( HWND_BROADCAST, WM_FONTCHANGE, 0, NULL );
+ PostMessageW( HWND_BROADCAST, WM_FONTCHANGE, 0, NULL );
#endif // FR_PRIVATE
}
diff --git a/vcl/win/source/gdi/salprn.cxx b/vcl/win/source/gdi/salprn.cxx
index 03af06c6a090..6d6b8ea49f01 100644
--- a/vcl/win/source/gdi/salprn.cxx
+++ b/vcl/win/source/gdi/salprn.cxx
@@ -1331,10 +1331,10 @@ BOOL CALLBACK SalPrintAbortProc( HDC hPrnDC, int /* nError */ )
{
// process messages
MSG aMsg;
- if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
+ if ( PeekMessageW( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &aMsg );
- ImplDispatchMessage( &aMsg );
+ DispatchMessageW( &aMsg );
i++;
if ( i > 15 )
@@ -1511,10 +1511,10 @@ bool WinSalPrinter::StartJob( const OUString* pFileName,
{
// process messages
MSG aMsg;
- if ( ImplPeekMessage( &aMsg, 0, 0, 0, PM_REMOVE ) )
+ if ( PeekMessageW( &aMsg, 0, 0, 0, PM_REMOVE ) )
{
TranslateMessage( &aMsg );
- ImplDispatchMessage( &aMsg );
+ DispatchMessageW( &aMsg );
i++;
if ( i > 15 )
@@ -1524,7 +1524,7 @@ bool WinSalPrinter::StartJob( const OUString* pFileName,
bWhile = FALSE;
}
while ( bWhile );
- ImplPostMessage( GetSalData()->mpFirstInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0 );
+ PostMessageW( GetSalData()->mpFirstInstance->mhComWnd, SAL_MSG_DUMMY, 0, 0 );
// bring up a file choser if printing to file port but no file name given
OUString aOutFileName;
@@ -1621,7 +1621,7 @@ bool WinSalPrinter::AbortJob()
if ( hDC )
{
SalData* pSalData = GetSalData();
- ImplPostMessage( pSalData->mpFirstInstance->mhComWnd,
+ PostMessageW( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_PRINTABORTJOB, (WPARAM)hDC, 0 );
}
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index d37b009adf79..2428135518a8 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -676,7 +676,7 @@ static UINT ImplSalGetWheelScrollLines()
if ( hWndMsWheel )
{
UINT nGetScrollLinesMsgId = RegisterWindowMessage( MSH_SCROLL_LINES );
- nScrLines = (UINT)ImplSendMessage( hWndMsWheel, nGetScrollLinesMsgId, 0, 0 );
+ nScrLines = (UINT)SendMessageW( hWndMsWheel, nGetScrollLinesMsgId, 0, 0 );
}
if ( !nScrLines )
@@ -992,7 +992,7 @@ SalGraphics* WinSalFrame::AcquireGraphics()
mpGraphics2->mbScreen = TRUE;
}
- HDC hDC = (HDC)(sal_IntPtr)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HDC hDC = (HDC)(sal_IntPtr)SendMessageW( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_GETDC,
(WPARAM)mhWnd, 0 );
if ( hDC )
@@ -1052,7 +1052,7 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
if ( mpGraphics2->mhDefPal )
SelectPalette( mpGraphics2->getHDC(), mpGraphics2->mhDefPal, TRUE );
ImplSalDeInitGraphics( mpGraphics2 );
- ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ SendMessageW( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_RELEASEDC,
(WPARAM)mhWnd,
(LPARAM)mpGraphics2->getHDC() );
@@ -1066,7 +1066,7 @@ void WinSalFrame::ReleaseGraphics( SalGraphics* pGraphics )
bool WinSalFrame::PostEvent( void* pData )
{
- return (bool)ImplPostMessage( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData );
+ return (bool)PostMessageW( mhWnd, SAL_MSG_USEREVENT, 0, (LPARAM)pData );
}
void WinSalFrame::SetTitle( const OUString& rTitle )
@@ -1092,8 +1092,8 @@ void WinSalFrame::SetIcon( sal_uInt16 nIcon )
DBG_ASSERT( hIcon , "WinSalFrame::SetIcon(): Could not load large icon !" );
DBG_ASSERT( hSmIcon , "WinSalFrame::SetIcon(): Could not load small icon !" );
- ImplSendMessage( mhWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon );
- ImplSendMessage( mhWnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmIcon );
+ SendMessageW( mhWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon );
+ SendMessageW( mhWnd, WM_SETICON, ICON_SMALL, (LPARAM)hSmIcon );
}
void WinSalFrame::SetMenu( SalMenu* pSalMenu )
@@ -1212,7 +1212,7 @@ void WinSalFrame::Show( bool bVisible, bool bNoActivate )
// in the thread of the window, which has create this window.
// We post this message to avoid deadlocks
if ( GetSalData()->mnAppThreadId != GetCurrentThreadId() )
- ImplPostMessage( mhWnd, SAL_MSG_SHOW, bVisible, bNoActivate );
+ PostMessageW( mhWnd, SAL_MSG_SHOW, bVisible, bNoActivate );
else
ImplSalShow( mhWnd, bVisible, bNoActivate );
}
@@ -1508,7 +1508,7 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, bool bAs
// create a new hwnd with the same styles
HWND hWndParent = hNewParentWnd;
// forward to main thread
- HWND hWnd = (HWND) (sal_IntPtr) ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HWND hWnd = (HWND) (sal_IntPtr) SendMessageW( pSalData->mpFirstInstance->mhComWnd,
bAsChild ? SAL_MSG_RECREATECHILDHWND : SAL_MSG_RECREATEHWND,
(WPARAM) hWndParent, (LPARAM)pThis->mhWnd );
@@ -1525,7 +1525,7 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, bool bAs
if( bNeedCacheDC )
{
// re-create cached DC
- HDC hDC = (HDC)(sal_IntPtr)ImplSendMessage( pSalData->mpFirstInstance->mhComWnd,
+ HDC hDC = (HDC)(sal_IntPtr)SendMessageW( pSalData->mpFirstInstance->mhComWnd,
SAL_MSG_GETDC,
(WPARAM) hWnd, 0 );
if ( hDC )
@@ -1581,7 +1581,7 @@ static void ImplSetParentFrame( WinSalFrame* pThis, HWND hNewParentWnd, bool bAs
systemChildren.clear();
// Now destroy original HWND in the thread where it was created.
- ImplSendMessage( GetSalData()->mpFirstInstance->mhComWnd,
+ SendMessageW( GetSalData()->mpFirstInstance->mhComWnd,
SAL_MSG_DESTROYHWND, (WPARAM) 0, (LPARAM)hWndOld);
}
@@ -2051,7 +2051,7 @@ void WinSalFrame::ToTop( sal_uInt16 nFlags )
// in the thread of the window, which has create this window.
// We post this message to avoid deadlocks
if ( GetSalData()->mnAppThreadId != GetCurrentThreadId() )
- ImplPostMessage( mhWnd, SAL_MSG_TOTOP, nFlags, 0 );
+ PostMessageW( mhWnd, SAL_MSG_TOTOP, nFlags, 0 );
else
ImplSalToTop( mhWnd, nFlags );
}
@@ -2198,7 +2198,7 @@ void WinSalFrame::CaptureMouse( bool bCapture )
nMsg = SAL_MSG_CAPTUREMOUSE;
else
nMsg = SAL_MSG_RELEASEMOUSE;
- ImplSendMessage( mhWnd, nMsg, 0, 0 );
+ SendMessageW( mhWnd, nMsg, 0, 0 );
}
void WinSalFrame::SetPointerPos( long nX, long nY )
@@ -2283,7 +2283,7 @@ static void ImplSalFrameSetInputContext( HWND hWnd, const SalInputContext* pCont
void WinSalFrame::SetInputContext( SalInputContext* pContext )
{
// Must be called in the main thread!
- ImplSendMessage( mhWnd, SAL_MSG_SETINPUTCONTEXT, 0, (LPARAM)(void*)pContext );
+ SendMessageW( mhWnd, SAL_MSG_SETINPUTCONTEXT, 0, (LPARAM)(void*)pContext );
}
static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags )
@@ -2305,7 +2305,7 @@ static void ImplSalFrameEndExtTextInput( HWND hWnd, sal_uInt16 nFlags )
void WinSalFrame::EndExtTextInput( sal_uInt16 nFlags )
{
// Must be called in the main thread!
- ImplSendMessage( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 );
+ SendMessageW( mhWnd, SAL_MSG_ENDEXTTEXTINPUT, (WPARAM)nFlags, 0 );
}
static void ImplGetKeyNameText( LONG lParam, sal_Unicode* pBuf,
@@ -3046,7 +3046,7 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
vcl::Window *pWin = pFrame->GetWindow();
if( pWin && pWin->ImplGetWindowImpl()->mpFrameData->mnFocusId )
{
- ImplPostMessage( hWnd, nMsg, wParam, lParam );
+ PostMessageW( hWnd, nMsg, wParam, lParam );
return 1;
}
}
@@ -3086,7 +3086,7 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
if ( aMouseEvt.mnCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2) )
{
MSG aTempMsg;
- if ( ImplPeekMessage( &aTempMsg, hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE | PM_NOYIELD ) )
+ if ( PeekMessageW( &aTempMsg, hWnd, WM_MOUSEFIRST, WM_MOUSELAST, PM_NOREMOVE | PM_NOYIELD ) )
{
if ( (aTempMsg.message == WM_MOUSEMOVE) &&
(aTempMsg.wParam == wParam) )
@@ -3097,7 +3097,7 @@ static long ImplHandleMouseMsg( HWND hWnd, UINT nMsg,
SalData* pSalData = GetSalData();
// Test for MouseLeave
if ( pSalData->mhWantLeaveMsg && (pSalData->mhWantLeaveMsg != hWnd) )
- ImplSendMessage( pSalData->mhWantLeaveMsg, SAL_MSG_MOUSELEAVE, 0, GetMessagePos() );
+ SendMessageW( pSalData->mhWantLeaveMsg, SAL_MSG_MOUSELEAVE, 0, GetMessagePos() );
pSalData->mhWantLeaveMsg = hWnd;
// Start MouseLeave-Timer
@@ -3568,7 +3568,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
// The WM_CHAR message is always at the beginning of the
// message queue. Also it is made certain that there is always only
// one WM_CHAR message in the queue.
- bCharPeek = ImplPeekMessage( &aCharMsg, hWnd,
+ bCharPeek = PeekMessageW( &aCharMsg, hWnd,
WM_CHAR, WM_CHAR, PM_NOREMOVE | PM_NOYIELD );
if ( bCharPeek && (nDeadChar == aCharMsg.wParam) )
{
@@ -3577,7 +3577,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
if ( wParam == VK_BACK )
{
- ImplPeekMessage( &aCharMsg, hWnd,
+ PeekMessageW( &aCharMsg, hWnd,
nCharMsg, nCharMsg, PM_REMOVE | PM_NOYIELD );
return 0;
}
@@ -3586,7 +3586,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
{
if ( !bCharPeek )
{
- bCharPeek = ImplPeekMessage( &aCharMsg, hWnd,
+ bCharPeek = PeekMessageW( &aCharMsg, hWnd,
WM_SYSCHAR, WM_SYSCHAR, PM_NOREMOVE | PM_NOYIELD );
nCharMsg = WM_SYSCHAR;
}
@@ -3642,7 +3642,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
nDeadChar = 0;
if ( nRet )
{
- ImplPeekMessage( &aCharMsg, hWnd,
+ PeekMessageW( &aCharMsg, hWnd,
nCharMsg, nCharMsg, PM_REMOVE | PM_NOYIELD );
}
else
@@ -3790,7 +3790,7 @@ static bool ImplHandlePaintMsg( HWND hWnd )
{
RECT* pRect = new RECT;
CopyRect( pRect, &aUpdateRect );
- ImplPostMessage( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 );
+ PostMessageW( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 );
}
EndPaint( hWnd, &aPs );
}
@@ -3826,7 +3826,7 @@ static void ImplHandlePaintMsg2( HWND hWnd, RECT* pRect )
delete pRect;
}
else
- ImplPostMessage( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 );
+ PostMessageW( hWnd, SAL_MSG_POSTPAINT, (WPARAM)pRect, 0 );
}
static void SetMaximizedFrameGeometry( HWND hWnd, WinSalFrame* pFrame, RECT* pParentRect )
@@ -3968,7 +3968,7 @@ static void ImplHandleMoveMsg( HWND hWnd )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( hWnd, SAL_MSG_POSTMOVE, 0, 0 );
+ PostMessageW( hWnd, SAL_MSG_POSTMOVE, 0, 0 );
}
static void ImplCallSizeHdl( HWND hWnd )
@@ -3989,7 +3989,7 @@ static void ImplCallSizeHdl( HWND hWnd )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( hWnd, SAL_MSG_POSTCALLSIZE, 0, 0 );
+ PostMessageW( hWnd, SAL_MSG_POSTCALLSIZE, 0, 0 );
}
static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam )
@@ -4044,7 +4044,7 @@ static void ImplHandleFocusMsg( HWND hWnd )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( hWnd, SAL_MSG_POSTFOCUS, 0, 0 );
+ PostMessageW( hWnd, SAL_MSG_POSTFOCUS, 0, 0 );
}
static void ImplHandleCloseMsg( HWND hWnd )
@@ -4060,7 +4060,7 @@ static void ImplHandleCloseMsg( HWND hWnd )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( hWnd, WM_CLOSE, 0, 0 );
+ PostMessageW( hWnd, WM_CLOSE, 0, 0 );
}
static long ImplHandleShutDownMsg( HWND hWnd )
@@ -4145,7 +4145,7 @@ static void ImplHandleForcePalette( HWND hWnd )
{
if ( !ImplSalYieldMutexTryToAcquire() )
{
- ImplPostMessage( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 );
+ PostMessageW( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 );
return;
}
@@ -4195,9 +4195,9 @@ static LRESULT ImplHandlePalette( bool bFrame, HWND hWnd, UINT nMsg,
if ( ImplSalYieldMutexTryToAcquire() )
bReleaseMutex = TRUE;
else if ( nMsg == WM_QUERYNEWPALETTE )
- ImplPostMessage( hWnd, SAL_MSG_POSTQUERYNEWPAL, wParam, lParam );
+ PostMessageW( hWnd, SAL_MSG_POSTQUERYNEWPAL, wParam, lParam );
else /* ( nMsg == WM_PALETTECHANGED ) */
- ImplPostMessage( hWnd, SAL_MSG_POSTPALCHANGED, wParam, lParam );
+ PostMessageW( hWnd, SAL_MSG_POSTPALCHANGED, wParam, lParam );
}
WinSalVirtualDevice*pTempVD;
@@ -5455,7 +5455,7 @@ void SalTestMouseLeave()
POINT aPt;
GetCursorPos( &aPt );
if ( pSalData->mhWantLeaveMsg != WindowFromPoint( aPt ) )
- ImplSendMessage( pSalData->mhWantLeaveMsg, SAL_MSG_MOUSELEAVE, 0, MAKELPARAM( aPt.x, aPt.y ) );
+ SendMessageW( pSalData->mhWantLeaveMsg, SAL_MSG_MOUSELEAVE, 0, MAKELPARAM( aPt.x, aPt.y ) );
}
}
@@ -5480,7 +5480,7 @@ static int ImplSalWheelMousePos( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
if ( hWheelWnd && (hWheelWnd != hWnd) &&
(hWheelWnd != ::GetFocus()) && IsWindowEnabled( hWheelWnd ) )
{
- rResult = ImplSendMessage( hWheelWnd, nMsg, wParam, lParam );
+ rResult = SendMessageW( hWheelWnd, nMsg, wParam, lParam );
return FALSE;
}
@@ -5688,7 +5688,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
// and not recursively, as at all other places it is set only as
// the background palette.
if ( LOWORD( wParam ) != WA_INACTIVE )
- ImplSendMessage( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 );
+ SendMessageW( hWnd, SAL_MSG_FORCEPALETTE, 0, 0 );
break;
case WM_ENABLE:
@@ -5906,7 +5906,7 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
HWND hWheelWnd = ::GetFocus();
if ( hWheelWnd && (hWheelWnd != hWnd) )
{
- nRet = ImplSendMessage( hWheelWnd, nMsg, wParam, lParam );
+ nRet = SendMessageW( hWheelWnd, nMsg, wParam, lParam );
rDef = FALSE;
}
else
@@ -5925,8 +5925,8 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
if( pSalData->mnNextTimerTime < nCurTime )
{
MSG aMsg;
- if( ! ImplPeekMessage( &aMsg, 0, WM_PAINT, WM_PAINT, PM_NOREMOVE | PM_NOYIELD ) )
- ImplPostMessage( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_POSTTIMER, 0, nCurTime );
+ if( ! PeekMessageW( &aMsg, 0, WM_PAINT, WM_PAINT, PM_NOREMOVE | PM_NOYIELD ) )
+ PostMessageW( pSalData->mpFirstInstance->mhComWnd, SAL_MSG_POSTTIMER, 0, nCurTime );
}
}
}
diff --git a/vcl/win/source/window/salobj.cxx b/vcl/win/source/window/salobj.cxx
index 4f42fa2308a9..2ab837c9d5d9 100644
--- a/vcl/win/source/window/salobj.cxx
+++ b/vcl/win/source/window/salobj.cxx
@@ -112,7 +112,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
+ PostMessageW( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
}
}
else if ( pData->message == WM_KILLFOCUS )
@@ -129,7 +129,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
+ PostMessageW( pObject->mhWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
}
else
pObject->mhLastFocusWnd = (HWND)pData->wParam;
@@ -153,7 +153,7 @@ bool ImplSalPreDispatchMsg( MSG* pMsg )
ImplSalYieldMutexAcquireWithWait();
pObject = ImplFindSalObject( pMsg->hwnd );
if ( pObject && !pObject->IsMouseTransparent() )
- ImplPostMessage( pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0 );
+ PostMessageW( pObject->mhWnd, SALOBJ_MSG_TOTOP, 0, 0 );
ImplSalYieldMutexRelease();
}
@@ -288,7 +288,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
ImplSalYieldMutexAcquireWithWait();
pSysObj = GetSalObjWindowPtr( hWnd );
if ( pSysObj && !pSysObj->IsMouseTransparent() )
- ImplPostMessage( hWnd, SALOBJ_MSG_TOTOP, 0, 0 );
+ PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 );
ImplSalYieldMutexRelease();
}
break;
@@ -302,7 +302,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
rDef = FALSE;
}
else
- ImplPostMessage( hWnd, SALOBJ_MSG_TOTOP, 0, 0 );
+ PostMessageW( hWnd, SALOBJ_MSG_TOTOP, 0, 0 );
break;
case SALOBJ_MSG_POSTFOCUS:
@@ -319,7 +319,7 @@ LRESULT CALLBACK SalSysObjWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM l
ImplSalYieldMutexRelease();
}
else
- ImplPostMessage( hWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
+ PostMessageW( hWnd, SALOBJ_MSG_POSTFOCUS, 0, 0 );
rDef = FALSE;
break;
@@ -416,7 +416,7 @@ LRESULT CALLBACK SalSysObjChildWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPA
MapWindowPoints( hWnd, hWndParent, &pt, 1 );
lParam = MAKELPARAM( (WORD) pt.x, (WORD) pt.y );
- nRet = ImplSendMessage( hWndParent, nMsg, wParam, lParam );
+ nRet = SendMessageW( hWndParent, nMsg, wParam, lParam );
rDef = FALSE;
}
}
@@ -582,7 +582,7 @@ WinSalObject::~WinSalObject()
if ( hWndParent &&
::GetActiveWindow() == hWndParent &&
!GetWindow( hWndParent, GW_CHILD ) )
- ImplSendMessage( hWndParent, SAL_MSG_FORCEPALETTE, 0, 0 );
+ SendMessageW( hWndParent, SAL_MSG_FORCEPALETTE, 0, 0 );
}
void WinSalObject::ResetClipRegion()