r=pedemont, sr=blizzard (OS/2 only)
OS/2 only - Add 256 color support


git-svn-id: svn://10.0.0.236/trunk@136392 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mkaply%us.ibm.com
2003-01-16 00:23:32 +00:00
parent 6266e3e3a0
commit bd7ac1d4e8
7 changed files with 47 additions and 249 deletions

View File

@@ -56,6 +56,7 @@
#include "nsIPromptService.h"
#include "nsNetCID.h"
#include "nsIObserverService.h"
#include "nsPaletteOS2.h"
// These are needed to load a URL in a browser window.
#include "nsIDOMLocation.h"
@@ -338,7 +339,8 @@ private:
* whether Mozilla is already running.
*/
class nsNativeAppSupportOS2 : public nsNativeAppSupportBase {
class nsNativeAppSupportOS2 : public nsNativeAppSupportBase
{
public:
// Overrides of base implementation.
NS_IMETHOD Start( PRBool *aResult );
@@ -589,6 +591,7 @@ MRESULT EXPENTRY DialogProc( HWND dlg, ULONG msg, MPARAM mp1, MPARAM mp2 ) {
else if ( msg == WM_PAINT ) {
nsSplashScreenOS2 *splashScreen = (nsSplashScreenOS2*)WinQueryWindowPtr( dlg, QWL_USER );
HPS hps = WinBeginPaint (dlg, NULLHANDLE, NULL);
nsPaletteOS2::SelectGlobalPalette(hps, dlg);
GpiErase (hps);
POINTL aptl[8] = {0, 0, splashScreen->mBitmapCX, splashScreen->mBitmapCY,
0, 0, 0, 0,
@@ -599,6 +602,13 @@ MRESULT EXPENTRY DialogProc( HWND dlg, ULONG msg, MPARAM mp1, MPARAM mp2 ) {
WinEndPaint( hps );
return (MRESULT)TRUE;
}
else if ( msg == WM_REALIZEPALETTE ) {
HPS hps = WinGetPS(dlg);
nsPaletteOS2::SelectGlobalPalette(hps, dlg);
WinReleasePS(hps);
WinInvalidateRect( dlg, 0, TRUE);
return (MRESULT)TRUE;
}
return WinDefDlgProc (dlg, msg, mp1, mp2);
}