Bug 501475 - Remove nsPaletteInfo and friends. r=joe

This commit is contained in:
Rob Arnold 2009-07-09 12:27:44 -07:00
parent b9fdd0c7d0
commit d2be65d245
4 changed files with 0 additions and 59 deletions

View File

@ -173,17 +173,6 @@ const PRUint8 kUseAltDCFor_SURFACE_DIM = 0x08; // Use it for getting the Sur
{ 0x40aebd88, 0xa82b, 0x48b0, \
{ 0x8a, 0x44, 0xbe, 0x51, 0x51, 0x00, 0x64, 0xa7 } }
//a cross platform way of specifying a native palette handle
typedef void * nsPalette;
//structure used to return information about a device's palette capabilities
struct nsPaletteInfo {
PRPackedBool isPaletteDevice;
PRUint16 sizePalette; // number of entries in the palette
PRUint16 numReserved; // number of reserved palette entries
nsPalette palette; // native palette handle
};
typedef enum {
eSystemFont_Caption, // css2
eSystemFont_Icon,
@ -377,11 +366,6 @@ public:
*/
NS_IMETHOD GetDepth(PRUint32& aDepth) = 0;
/**
* Returns information about the device's palette capabilities.
*/
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo) = 0;
/**
* Get the size of the displayable area of the output device
* in app units.

View File

@ -941,16 +941,6 @@ nsThebesDeviceContext::GetDepth(PRUint32& aDepth)
return NS_OK;
}
NS_IMETHODIMP
nsThebesDeviceContext::GetPaletteInfo(nsPaletteInfo& aPaletteInfo)
{
aPaletteInfo.isPaletteDevice = PR_FALSE;
aPaletteInfo.sizePalette = 0;
aPaletteInfo.numReserved = 0;
aPaletteInfo.palette = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsThebesDeviceContext::ConvertPixel(nscolor aColor, PRUint32 & aPixel)
{

View File

@ -114,8 +114,6 @@ public:
NS_IMETHOD GetDepth(PRUint32& aDepth);
NS_IMETHOD GetPaletteInfo(nsPaletteInfo& aPaletteInfo);
NS_IMETHOD ConvertPixel(nscolor aColor, PRUint32& aPixel);
NS_IMETHOD GetDeviceSurfaceDimensions(nscoord& aWidth, nscoord& aHeight);

View File

@ -3683,7 +3683,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
static UINT vkKeyCached = 0; // caches VK code fon WM_KEYDOWN
PRBool result = PR_FALSE; // call the default nsWindow proc
*aRetValue = 0;
nsPaletteInfo palInfo;
#if !defined (WINCE_WINDOWS_MOBILE)
static PRBool getWheelInfo = PR_TRUE;
@ -4323,36 +4322,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
OnSettingsChange(wParam, lParam);
break;
case WM_PALETTECHANGED:
if ((HWND)wParam == mWnd) {
// We caused the WM_PALETTECHANGED message so avoid realizing
// another foreground palette
result = PR_TRUE;
break;
}
// fall thru...
case WM_QUERYNEWPALETTE: // this window is about to become active
mContext->GetPaletteInfo(palInfo);
if (palInfo.isPaletteDevice && palInfo.palette) {
HDC hDC = ::GetDC(mWnd);
HPALETTE hOldPal = ::SelectPalette(hDC, (HPALETTE)palInfo.palette, TRUE);
// Realize the drawing palette
int i = ::RealizePalette(hDC);
#ifdef DEBUG
//printf("number of colors that changed=%d\n",i);
#endif
// we should always invalidate.. because the lookup may have changed
::InvalidateRect(mWnd, (LPRECT)NULL, TRUE);
::ReleaseDC(mWnd, hDC);
*aRetValue = TRUE;
}
result = PR_TRUE;
break;
#ifndef WINCE
case WM_INPUTLANGCHANGEREQUEST:
*aRetValue = TRUE;