зеркало из https://github.com/mozilla/pjs.git
[OS/2] Bug 395491: Fix files copied over from gfx for compilation, step 2 to remove nightmarish palette handling, r=mkaply
This commit is contained in:
Родитель
bf5226364d
Коммит
c03ec53877
|
@ -84,7 +84,6 @@ CPPSRCS = \
|
|||
nsFrameWindow.cpp \
|
||||
nsLookAndFeel.cpp \
|
||||
nsOS2Uni.cpp \
|
||||
nsPaletteOS2.cpp \
|
||||
nsPrintOS2.cpp \
|
||||
nsSound.cpp \
|
||||
nsToolkit.cpp \
|
||||
|
|
|
@ -79,7 +79,6 @@
|
|||
#include "nsIFile.h"
|
||||
|
||||
#include "nsOS2Uni.h"
|
||||
#include "nsPaletteOS2.h"
|
||||
|
||||
#include "imgIContainer.h"
|
||||
#include "gfxIImageFrame.h"
|
||||
|
@ -956,7 +955,7 @@ void nsWindow::RealDoCreate( HWND hwndP,
|
|||
#endif
|
||||
|
||||
// Create a window: create hidden & then size to avoid swp_noadjust problems
|
||||
// owner == parent except for 'borderless top-level' -- see nsCanvas.cpp
|
||||
// owner == parent except for 'borderless top-level'
|
||||
mWnd = WinCreateWindow( hwndP,
|
||||
WindowClass(),
|
||||
0, // text
|
||||
|
@ -2233,7 +2232,6 @@ void* nsWindow::GetNativeData(PRUint32 aDataType)
|
|||
CheckDragStatus(ACTION_DRAW, &hps);
|
||||
if (!hps)
|
||||
hps = WinGetPS(mWnd);
|
||||
nsPaletteOS2::SelectGlobalPalette(hps, mWnd);
|
||||
return (void*)hps;
|
||||
}
|
||||
|
||||
|
@ -2940,10 +2938,6 @@ PRBool nsWindow::ProcessMessage( ULONG msg, MPARAM mp1, MPARAM mp2, MRESULT &rc)
|
|||
break;
|
||||
|
||||
|
||||
case WM_REALIZEPALETTE: // hopefully only nsCanvas & nsFrame
|
||||
result = OnRealizePalette(); // will need this
|
||||
break;
|
||||
|
||||
case WM_PRESPARAMCHANGED:
|
||||
// This is really for font-change notifies. Do that first.
|
||||
rc = GetPrevWP()( mWnd, msg, mp1, mp2);
|
||||
|
@ -3015,26 +3009,6 @@ PRBool nsWindow::OnReposition( PSWP pSwp)
|
|||
return result;
|
||||
}
|
||||
|
||||
PRBool nsWindow::OnRealizePalette()
|
||||
{
|
||||
if (WinQueryWindowUShort(mWnd, QWS_ID) == FID_CLIENT) {
|
||||
HWND hwndFocus = WinQueryFocus(HWND_DESKTOP);
|
||||
if (WinIsChild(hwndFocus, mWnd)) {
|
||||
/* We are getting the focus */
|
||||
HPS hps = WinGetPS(hwndFocus);
|
||||
nsPaletteOS2::SelectGlobalPalette(hps, hwndFocus);
|
||||
WinReleasePS(hps);
|
||||
WinInvalidateRect( mWnd, 0, TRUE);
|
||||
} else {
|
||||
/* We are losing the focus */
|
||||
WinInvalidateRect( mWnd, 0, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
// Always call the default window procedure
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool nsWindow::OnPresParamChanged( MPARAM mp1, MPARAM mp2)
|
||||
{
|
||||
return PR_FALSE;
|
||||
|
@ -3142,7 +3116,6 @@ PRBool nsWindow::OnPaint()
|
|||
HPS hpsDrag = 0;
|
||||
CheckDragStatus(ACTION_PAINT, &hpsDrag);
|
||||
HPS hPS = WinBeginPaint(mWnd, hpsDrag, &rcl);
|
||||
nsPaletteOS2::SelectGlobalPalette(hPS, mWnd);
|
||||
|
||||
// if the update rect is empty, suppress the paint event
|
||||
if (!WinIsRectEmpty(0, &rcl)) {
|
||||
|
|
|
@ -75,12 +75,9 @@ class imgIContainer;
|
|||
// Base widget class.
|
||||
// This is abstract. Controls (labels, radio buttons, listboxen) derive
|
||||
// from here. A thing called a child window derives from here, and the
|
||||
// frame window class derives from the child. The content-displaying
|
||||
// classes are off on their own branch to avoid creating a palette for
|
||||
// every window we create. This may turn out to be what's required, in
|
||||
// which case the paint & palette code from nsChildWindow needs to be
|
||||
// munged in here. nsFrameWindow is separate because work needs to be done
|
||||
// there to decide whether methods apply to frame or client.
|
||||
// frame window class derives from the child.
|
||||
// nsFrameWindow is separate because work needs to be done there to decide
|
||||
// whether methods apply to frame or client.
|
||||
|
||||
/* Possible states of the window, used to emulate windows better... */
|
||||
// default state; Create() not called
|
||||
|
@ -234,7 +231,7 @@ protected:
|
|||
long cx, long cy, unsigned long flags);
|
||||
|
||||
// Message handlers - may wish to override. Default implementation for
|
||||
// palette, control, paint & scroll is to do nothing.
|
||||
// control, paint & scroll is to do nothing.
|
||||
|
||||
// Return whether message has been processed.
|
||||
virtual PRBool ProcessMessage( ULONG m, MPARAM p1, MPARAM p2, MRESULT &r);
|
||||
|
@ -244,7 +241,6 @@ protected:
|
|||
virtual PRBool OnResize( PRInt32 aX, PRInt32 aY);
|
||||
virtual PRBool OnMove( PRInt32 aX, PRInt32 aY);
|
||||
virtual PRBool OnKey( MPARAM mp1, MPARAM mp2);
|
||||
virtual PRBool OnRealizePalette();
|
||||
virtual PRBool DispatchFocus( PRUint32 aEventType, PRBool isMozWindowTakingFocus);
|
||||
virtual PRBool OnScroll( ULONG msgid, MPARAM mp1, MPARAM mp2);
|
||||
virtual PRBool OnVScroll( MPARAM mp1, MPARAM mp2);
|
||||
|
@ -383,28 +379,4 @@ extern PRUint32 WMChar2KeyCode( MPARAM mp1, MPARAM mp2);
|
|||
|
||||
extern nsWindow *NS_HWNDToWindow( HWND hwnd);
|
||||
|
||||
#define NSCANVASCLASS "WarpzillaCanvas"
|
||||
|
||||
#if 0
|
||||
|
||||
// Need to do this because the cross-platform widgets (toolbars) assume
|
||||
// that the name of the NS_CHILD_CID is ChildWindow and that it gets
|
||||
// defined in "nsWindow.h".
|
||||
//
|
||||
// However, if we've included this header *from nsCanvas.h*, then we
|
||||
// get a lovely circular dependency, and so special-case this.
|
||||
//
|
||||
// Yes, I suppose I'm just being perverse by having three separate classes
|
||||
// here, but I just baulk at naming a class 'ChildWindow'.
|
||||
//
|
||||
// (and don't tell me there's a JLib class called JMother. Believe me,
|
||||
// I know, and I regret it at least twice a week...)
|
||||
//
|
||||
#ifndef _nscanvas_h
|
||||
#include "nsCanvas.h"
|
||||
typedef nsCanvas ChildWindow;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче