mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 457032 - Windows Mobile compile fixes to widget. r=emaijala@kolumbus.fi
This commit is contained in:
parent
c75159123b
commit
205feede36
@ -327,7 +327,11 @@ nsresult nsLookAndFeel::NativeGetColor(const nsColorID aID, nscolor &aColor)
|
||||
idx = COLOR_3DDKSHADOW;
|
||||
break;
|
||||
case eColor__moz_nativehyperlinktext:
|
||||
#ifndef WINCE
|
||||
idx = COLOR_HOTLIGHT;
|
||||
#else
|
||||
idx = COLOR_HIGHLIGHTTEXT;
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
idx = COLOR_WINDOW;
|
||||
|
@ -44,10 +44,10 @@
|
||||
#include "nsUXThemeConstants.h"
|
||||
#include "nsUXThemeData.h"
|
||||
|
||||
const char
|
||||
nsUXThemeData::kThemeLibraryName[] = "uxtheme.dll";
|
||||
const char
|
||||
nsUXThemeData::kDwmLibraryName[] = "dwmapi.dll";
|
||||
const PRUnichar
|
||||
nsUXThemeData::kThemeLibraryName[] = L"uxtheme.dll";
|
||||
const PRUnichar
|
||||
nsUXThemeData::kDwmLibraryName[] = L"dwmapi.dll";
|
||||
|
||||
HANDLE
|
||||
nsUXThemeData::sThemes[eUXNumClasses];
|
||||
@ -96,7 +96,7 @@ nsUXThemeData::Initialize()
|
||||
{
|
||||
::ZeroMemory(sThemes, sizeof(sThemes));
|
||||
NS_ASSERTION(!sThemeDLL, "nsUXThemeData being initialized twice!");
|
||||
sThemeDLL = ::LoadLibrary(kThemeLibraryName);
|
||||
sThemeDLL = ::LoadLibraryW(kThemeLibraryName);
|
||||
if (sThemeDLL) {
|
||||
openTheme = (OpenThemeDataPtr)GetProcAddress(sThemeDLL, "OpenThemeData");
|
||||
closeTheme = (CloseThemeDataPtr)GetProcAddress(sThemeDLL, "CloseThemeData");
|
||||
@ -111,7 +111,7 @@ nsUXThemeData::Initialize()
|
||||
getCurrentThemeName = (GetCurrentThemeNamePtr)GetProcAddress(sThemeDLL, "GetCurrentThemeName");
|
||||
getThemeSysColor = (GetThemeSysColorPtr)GetProcAddress(sThemeDLL, "GetThemeSysColor");
|
||||
}
|
||||
sDwmDLL = ::LoadLibrary(kDwmLibraryName);
|
||||
sDwmDLL = ::LoadLibraryW(kDwmLibraryName);
|
||||
if(sDwmDLL) {
|
||||
dwmExtendFrameIntoClientAreaPtr = (DwmExtendFrameIntoClientAreaProc)::GetProcAddress(sDwmDLL, "DwmExtendFrameIntoClientArea");
|
||||
dwmIsCompositionEnabledPtr = (DwmIsCompositionEnabledProc)::GetProcAddress(sDwmDLL, "DwmIsCompositionEnabled");
|
||||
|
@ -84,8 +84,8 @@ class nsUXThemeData {
|
||||
static const wchar_t *GetClassName(nsUXThemeClass);
|
||||
|
||||
public:
|
||||
static const char kThemeLibraryName[];
|
||||
static const char kDwmLibraryName[];
|
||||
static const PRUnichar kThemeLibraryName[];
|
||||
static const PRUnichar kDwmLibraryName[];
|
||||
static BOOL sFlatMenus;
|
||||
static PRPackedBool sIsXPOrLater;
|
||||
static PRPackedBool sIsVistaOrLater;
|
||||
|
@ -1080,15 +1080,10 @@ nsWindow::EventIsInsideWindow(UINT Msg, nsWindow* aWindow)
|
||||
{
|
||||
RECT r;
|
||||
|
||||
if (Msg == WM_ACTIVATEAPP)
|
||||
#ifndef WINCE
|
||||
if (Msg == WM_ACTIVATEAPP)
|
||||
// don't care about activation/deactivation
|
||||
return PR_FALSE;
|
||||
#else
|
||||
// but on Windows CE we do care about
|
||||
// activation/deactivation because there doesn't exist
|
||||
// cancelable Mouse Activation events
|
||||
return TRUE;
|
||||
#endif
|
||||
|
||||
::GetWindowRect(aWindow->mWnd, &r);
|
||||
@ -5808,6 +5803,8 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
||||
#else
|
||||
if (aDC) {
|
||||
#endif
|
||||
|
||||
#ifndef WINCE
|
||||
RECT paintRect;
|
||||
::GetClientRect(mWnd, &paintRect);
|
||||
paintRgn = ::CreateRectRgn(paintRect.left, paintRect.top, paintRect.right, paintRect.bottom);
|
||||
@ -5822,6 +5819,19 @@ PRBool nsWindow::OnPaint(HDC aDC)
|
||||
::OffsetRgn(paintRgn, pt.x, pt.y);
|
||||
}
|
||||
}
|
||||
#else
|
||||
// GetRandomRgn is not supported on windows mobile.
|
||||
|
||||
RECT paintRect;
|
||||
paintRect = ps.rcPaint;
|
||||
paintRgn = ::CreateRectRgn(paintRect.left, paintRect.top, paintRect.right, paintRect.bottom);
|
||||
|
||||
// Now shift the region to accommodate the client area verses the
|
||||
// "desktop" area
|
||||
POINT pt = {0,0};
|
||||
::MapWindowPoints(NULL, mWnd, &pt, 1);
|
||||
::OffsetRgn(paintRgn, pt.x, pt.y);
|
||||
#endif
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIRegion> paintRgnWin;
|
||||
@ -8060,6 +8070,8 @@ void nsWindow::SetTransparencyMode(nsTransparencyMode aMode)
|
||||
|
||||
void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
|
||||
{
|
||||
#ifndef WINCE
|
||||
|
||||
if (aMode == mTransparencyMode)
|
||||
return;
|
||||
|
||||
@ -8097,6 +8109,7 @@ void nsWindow::SetWindowTranslucencyInner(nsTransparencyMode aMode)
|
||||
margins.cxLeftWidth = -1;
|
||||
if(nsUXThemeData::sHaveCompositor)
|
||||
nsUXThemeData::dwmExtendFrameIntoClientAreaPtr(hWnd, &margins);
|
||||
#endif
|
||||
}
|
||||
|
||||
void nsWindow::SetupTranslucentWindowMemoryBitmap(nsTransparencyMode aMode)
|
||||
@ -8111,6 +8124,7 @@ void nsWindow::SetupTranslucentWindowMemoryBitmap(nsTransparencyMode aMode)
|
||||
|
||||
nsresult nsWindow::UpdateTranslucentWindow()
|
||||
{
|
||||
#ifndef WINCE
|
||||
if (mBounds.IsEmpty())
|
||||
return NS_OK;
|
||||
|
||||
@ -8126,8 +8140,9 @@ nsresult nsWindow::UpdateTranslucentWindow()
|
||||
// perform the alpha blend
|
||||
if (!::UpdateLayeredWindow(hWnd, NULL, (POINT*)&winRect, &winSize, mMemoryDC, &srcPos, 0, &bf, ULW_ALPHA))
|
||||
return NS_ERROR_FAILURE;
|
||||
#endif
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif //MOZ_XUL
|
||||
|
Loading…
Reference in New Issue
Block a user