Removed a few dependencies on GDI internals from USER dll.
This commit is contained in:
parent
74cc65a940
commit
b0efe28f6c
|
@ -82,7 +82,7 @@ static BOOL COMBO_Init()
|
||||||
|
|
||||||
TRACE("combo bitmap [%i,%i]\n", CBitWidth, CBitHeight );
|
TRACE("combo bitmap [%i,%i]\n", CBitWidth, CBitHeight );
|
||||||
|
|
||||||
hPrevB = SelectObject16( hDC, hComboBmp);
|
hPrevB = SelectObject( hDC, hComboBmp);
|
||||||
SetRect( &r, 0, 0, CBitWidth, CBitHeight );
|
SetRect( &r, 0, 0, CBitWidth, CBitHeight );
|
||||||
InvertRect( hDC, &r );
|
InvertRect( hDC, &r );
|
||||||
SelectObject( hDC, hPrevB );
|
SelectObject( hDC, hPrevB );
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
||||||
MoveTo16( hdc, rect.left, 0 );
|
MoveToEx( hdc, rect.left, 0, NULL );
|
||||||
LineTo( hdc, rect.left, height );
|
LineTo( hdc, rect.left, height );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1156,7 +1156,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
||||||
MoveTo16( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2 );
|
MoveToEx( hdc, rect.left, rect.top + SEPARATOR_HEIGHT/2, NULL );
|
||||||
LineTo( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
|
LineTo( hdc, rect.right, rect.top + SEPARATOR_HEIGHT/2 );
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1185,7 +1185,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
|
||||||
/* helper lines for debugging */
|
/* helper lines for debugging */
|
||||||
/* FrameRect(hdc, &rect, GetStockObject(BLACK_BRUSH));
|
/* FrameRect(hdc, &rect, GetStockObject(BLACK_BRUSH));
|
||||||
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
|
||||||
MoveTo16( hdc, rect.left, (rect.top + rect.bottom)/2 );
|
MoveToEx( hdc, rect.left, (rect.top + rect.bottom)/2, NULL );
|
||||||
LineTo( hdc, rect.right, (rect.top + rect.bottom)/2 );
|
LineTo( hdc, rect.right, (rect.top + rect.bottom)/2 );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -1479,13 +1479,13 @@ UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, HWND hwnd,
|
||||||
if (TWEAK_WineLook == WIN31_LOOK)
|
if (TWEAK_WineLook == WIN31_LOOK)
|
||||||
{
|
{
|
||||||
SelectObject( hDC, GetSysColorPen(COLOR_WINDOWFRAME) );
|
SelectObject( hDC, GetSysColorPen(COLOR_WINDOWFRAME) );
|
||||||
MoveTo16( hDC, lprect->left, lprect->bottom );
|
MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
|
||||||
LineTo( hDC, lprect->right, lprect->bottom );
|
LineTo( hDC, lprect->right, lprect->bottom );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SelectObject( hDC, GetSysColorPen(COLOR_3DFACE));
|
SelectObject( hDC, GetSysColorPen(COLOR_3DFACE));
|
||||||
MoveTo16( hDC, lprect->left, lprect->bottom );
|
MoveToEx( hDC, lprect->left, lprect->bottom, NULL );
|
||||||
LineTo( hDC, lprect->right, lprect->bottom );
|
LineTo( hDC, lprect->right, lprect->bottom );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,8 @@ static USER_DRIVER user_driver =
|
||||||
TTYDRV_SetScreenSaveActive,
|
TTYDRV_SetScreenSaveActive,
|
||||||
TTYDRV_GetScreenSaveTimeout,
|
TTYDRV_GetScreenSaveTimeout,
|
||||||
TTYDRV_SetScreenSaveTimeout,
|
TTYDRV_SetScreenSaveTimeout,
|
||||||
|
/* resource functions */
|
||||||
|
TTYDRV_LoadOEMResource,
|
||||||
/* windowing functions */
|
/* windowing functions */
|
||||||
TTYDRV_IsSingleWindow
|
TTYDRV_IsSingleWindow
|
||||||
};
|
};
|
||||||
|
|
|
@ -65,7 +65,6 @@ static const DC_FUNCTIONS PSDRV_Funcs =
|
||||||
NULL, /* pIntersectClipRect */
|
NULL, /* pIntersectClipRect */
|
||||||
NULL, /* pInvertRgn */
|
NULL, /* pInvertRgn */
|
||||||
PSDRV_LineTo, /* pLineTo */
|
PSDRV_LineTo, /* pLineTo */
|
||||||
NULL, /* pLoadOEMResource */
|
|
||||||
NULL, /* pMoveToEx */
|
NULL, /* pMoveToEx */
|
||||||
NULL, /* pOffsetClipRgn */
|
NULL, /* pOffsetClipRgn */
|
||||||
NULL, /* pOffsetViewportOrg (optional) */
|
NULL, /* pOffsetViewportOrg (optional) */
|
||||||
|
|
|
@ -59,6 +59,8 @@ static USER_DRIVER user_driver =
|
||||||
X11DRV_SetScreenSaveActive,
|
X11DRV_SetScreenSaveActive,
|
||||||
X11DRV_GetScreenSaveTimeout,
|
X11DRV_GetScreenSaveTimeout,
|
||||||
X11DRV_SetScreenSaveTimeout,
|
X11DRV_SetScreenSaveTimeout,
|
||||||
|
/* resource functions */
|
||||||
|
X11DRV_LoadOEMResource,
|
||||||
/* windowing functions */
|
/* windowing functions */
|
||||||
X11DRV_IsSingleWindow
|
X11DRV_IsSingleWindow
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,7 +62,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
|
||||||
EMFDRV_IntersectClipRect, /* pIntersectClipRect */
|
EMFDRV_IntersectClipRect, /* pIntersectClipRect */
|
||||||
EMFDRV_InvertRgn, /* pInvertRgn */
|
EMFDRV_InvertRgn, /* pInvertRgn */
|
||||||
EMFDRV_LineTo, /* pLineTo */
|
EMFDRV_LineTo, /* pLineTo */
|
||||||
NULL, /* pLoadOEMResource */
|
|
||||||
EMFDRV_MoveToEx, /* pMoveToEx */
|
EMFDRV_MoveToEx, /* pMoveToEx */
|
||||||
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
|
EMFDRV_OffsetClipRgn, /* pOffsetClipRgn */
|
||||||
NULL, /* pOffsetViewportOrg */
|
NULL, /* pOffsetViewportOrg */
|
||||||
|
|
|
@ -61,7 +61,6 @@ static const DC_FUNCTIONS MFDRV_Funcs =
|
||||||
MFDRV_IntersectClipRect, /* pIntersectClipRect */
|
MFDRV_IntersectClipRect, /* pIntersectClipRect */
|
||||||
MFDRV_InvertRgn, /* pInvertRgn */
|
MFDRV_InvertRgn, /* pInvertRgn */
|
||||||
MFDRV_LineTo, /* pLineTo */
|
MFDRV_LineTo, /* pLineTo */
|
||||||
NULL, /* pLoadOEMResource */
|
|
||||||
MFDRV_MoveToEx, /* pMoveToEx */
|
MFDRV_MoveToEx, /* pMoveToEx */
|
||||||
MFDRV_OffsetClipRgn, /* pOffsetClipRgn */
|
MFDRV_OffsetClipRgn, /* pOffsetClipRgn */
|
||||||
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
|
MFDRV_OffsetViewportOrg, /* pOffsetViewportOrg */
|
||||||
|
|
|
@ -59,7 +59,6 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
|
||||||
NULL, /* pIntersectClipRect */
|
NULL, /* pIntersectClipRect */
|
||||||
NULL, /* pIntersectVisRect */
|
NULL, /* pIntersectVisRect */
|
||||||
TTYDRV_DC_LineTo, /* pLineTo */
|
TTYDRV_DC_LineTo, /* pLineTo */
|
||||||
TTYDRV_DC_LoadOEMResource, /* pLoadOEMResource */
|
|
||||||
NULL, /* pMoveToEx */
|
NULL, /* pMoveToEx */
|
||||||
NULL, /* pOffsetClipRgn */
|
NULL, /* pOffsetClipRgn */
|
||||||
NULL, /* pOffsetViewportOrg (optional) */
|
NULL, /* pOffsetViewportOrg (optional) */
|
||||||
|
|
|
@ -11,9 +11,9 @@
|
||||||
DEFAULT_DEBUG_CHANNEL(ttydrv)
|
DEFAULT_DEBUG_CHANNEL(ttydrv)
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* TTYDRV_DC_LoadOEMBitmap
|
* TTYDRV_LoadOEMBitmap
|
||||||
*/
|
*/
|
||||||
static HANDLE TTYDRV_DC_LoadOEMBitmap(WORD resid)
|
static HANDLE TTYDRV_LoadOEMBitmap(WORD resid)
|
||||||
{
|
{
|
||||||
HBITMAP hbitmap;
|
HBITMAP hbitmap;
|
||||||
|
|
||||||
|
@ -26,31 +26,29 @@ static HANDLE TTYDRV_DC_LoadOEMBitmap(WORD resid)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* TTYDRV_DC_LoadOEMCursorIcon
|
* TTYDRV_LoadOEMCursorIcon
|
||||||
*/
|
*/
|
||||||
static HANDLE TTYDRV_DC_LoadOEMCursorIcon(WORD resid, BOOL bCursor)
|
static HANDLE TTYDRV_LoadOEMCursorIcon(WORD resid, BOOL bCursor)
|
||||||
{
|
{
|
||||||
return (HANDLE) NULL;
|
return (HANDLE) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* TTYDRV_DC_LoadOEMResource
|
* TTYDRV_LoadOEMResource
|
||||||
*/
|
*/
|
||||||
HANDLE TTYDRV_DC_LoadOEMResource(WORD resid, WORD type)
|
HANDLE TTYDRV_LoadOEMResource(WORD resid, WORD type)
|
||||||
{
|
{
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case OEM_BITMAP:
|
case OEM_BITMAP:
|
||||||
return TTYDRV_DC_LoadOEMBitmap(resid);
|
return TTYDRV_LoadOEMBitmap(resid);
|
||||||
case OEM_CURSOR:
|
case OEM_CURSOR:
|
||||||
return TTYDRV_DC_LoadOEMCursorIcon(resid, TRUE);
|
return TTYDRV_LoadOEMCursorIcon(resid, TRUE);
|
||||||
case OEM_ICON:
|
case OEM_ICON:
|
||||||
return TTYDRV_DC_LoadOEMCursorIcon(resid, FALSE);
|
return TTYDRV_LoadOEMCursorIcon(resid, FALSE);
|
||||||
default:
|
default:
|
||||||
ERR("unknown type (%d)\n", type);
|
ERR("unknown type (%d)\n", type);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (HANDLE) NULL;
|
return (HANDLE) NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,6 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
|
||||||
NULL, /* pIntersectClipRect */
|
NULL, /* pIntersectClipRect */
|
||||||
NULL, /* pInvertRgn */
|
NULL, /* pInvertRgn */
|
||||||
WIN16DRV_LineTo, /* pLineTo */
|
WIN16DRV_LineTo, /* pLineTo */
|
||||||
NULL, /* pLoadOEMResource */
|
|
||||||
WIN16DRV_MoveToEx, /* pMoveToEx */
|
WIN16DRV_MoveToEx, /* pMoveToEx */
|
||||||
NULL, /* pOffsetClipRgn */
|
NULL, /* pOffsetClipRgn */
|
||||||
NULL, /* pOffsetViewportOrgEx */
|
NULL, /* pOffsetViewportOrgEx */
|
||||||
|
|
|
@ -71,7 +71,6 @@ const DC_FUNCTIONS X11DRV_DC_Funcs =
|
||||||
NULL, /* pIntersectClipRect */
|
NULL, /* pIntersectClipRect */
|
||||||
NULL, /* pInvertRgn */
|
NULL, /* pInvertRgn */
|
||||||
X11DRV_LineTo, /* pLineTo */
|
X11DRV_LineTo, /* pLineTo */
|
||||||
X11DRV_LoadOEMResource, /* pLoadOEMResource */
|
|
||||||
NULL, /* pMoveToEx */
|
NULL, /* pMoveToEx */
|
||||||
NULL, /* pOffsetClipRgn */
|
NULL, /* pOffsetClipRgn */
|
||||||
NULL, /* pOffsetViewportOrg (optional) */
|
NULL, /* pOffsetViewportOrg (optional) */
|
||||||
|
|
|
@ -214,7 +214,6 @@ typedef struct tagDC_FUNCS
|
||||||
INT (*pIntersectClipRect)(DC*,INT,INT,INT,INT);
|
INT (*pIntersectClipRect)(DC*,INT,INT,INT,INT);
|
||||||
BOOL (*pInvertRgn)(DC*,HRGN);
|
BOOL (*pInvertRgn)(DC*,HRGN);
|
||||||
BOOL (*pLineTo)(DC*,INT,INT);
|
BOOL (*pLineTo)(DC*,INT,INT);
|
||||||
HANDLE (*pLoadOEMResource)(WORD,WORD);
|
|
||||||
BOOL (*pMoveToEx)(DC*,INT,INT,LPPOINT);
|
BOOL (*pMoveToEx)(DC*,INT,INT,LPPOINT);
|
||||||
INT (*pOffsetClipRgn)(DC*,INT,INT);
|
INT (*pOffsetClipRgn)(DC*,INT,INT);
|
||||||
BOOL (*pOffsetViewportOrg)(DC*,INT,INT);
|
BOOL (*pOffsetViewportOrg)(DC*,INT,INT);
|
||||||
|
|
|
@ -88,7 +88,6 @@ extern COLORREF TTYDRV_DC_GetPixel(struct tagDC *dc, INT x, INT y);
|
||||||
extern BOOL TTYDRV_DC_GetTextExtentPoint(struct tagDC *dc, LPCWSTR str, INT count, LPSIZE size);
|
extern BOOL TTYDRV_DC_GetTextExtentPoint(struct tagDC *dc, LPCWSTR str, INT count, LPSIZE size);
|
||||||
extern BOOL TTYDRV_DC_GetTextMetrics(struct tagDC *dc, TEXTMETRICA *metrics);
|
extern BOOL TTYDRV_DC_GetTextMetrics(struct tagDC *dc, TEXTMETRICA *metrics);
|
||||||
extern BOOL TTYDRV_DC_LineTo(struct tagDC *dc, INT x, INT y);
|
extern BOOL TTYDRV_DC_LineTo(struct tagDC *dc, INT x, INT y);
|
||||||
extern HANDLE TTYDRV_DC_LoadOEMResource(WORD resid, WORD type);
|
|
||||||
extern BOOL TTYDRV_DC_PaintRgn(struct tagDC *dc, HRGN hrgn);
|
extern BOOL TTYDRV_DC_PaintRgn(struct tagDC *dc, HRGN hrgn);
|
||||||
extern BOOL TTYDRV_DC_PatBlt(struct tagDC *dc, INT left, INT top, INT width, INT height, DWORD rop);
|
extern BOOL TTYDRV_DC_PatBlt(struct tagDC *dc, INT left, INT top, INT width, INT height, DWORD rop);
|
||||||
extern BOOL TTYDRV_DC_Pie(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
extern BOOL TTYDRV_DC_Pie(struct tagDC *dc, INT left, INT top, INT right, INT bottom, INT xstart, INT ystart, INT xend, INT yend);
|
||||||
|
@ -184,6 +183,8 @@ typedef struct tagTTYDRV_WND_DATA {
|
||||||
|
|
||||||
WINDOW *TTYDRV_WND_GetCursesWindow(struct tagWND *wndPtr);
|
WINDOW *TTYDRV_WND_GetCursesWindow(struct tagWND *wndPtr);
|
||||||
|
|
||||||
|
extern HANDLE TTYDRV_LoadOEMResource(WORD resid, WORD type);
|
||||||
|
|
||||||
extern void TTYDRV_WND_Initialize(struct tagWND *wndPtr);
|
extern void TTYDRV_WND_Initialize(struct tagWND *wndPtr);
|
||||||
extern void TTYDRV_WND_Finalize(struct tagWND *wndPtr);
|
extern void TTYDRV_WND_Finalize(struct tagWND *wndPtr);
|
||||||
extern BOOL TTYDRV_WND_CreateDesktopWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, BOOL bUnicode);
|
extern BOOL TTYDRV_WND_CreateDesktopWindow(struct tagWND *wndPtr, struct tagCLASS *classPtr, BOOL bUnicode);
|
||||||
|
@ -196,8 +197,8 @@ extern void TTYDRV_WND_SetText(struct tagWND *wndPtr, LPCWSTR text);
|
||||||
extern void TTYDRV_WND_SetFocus(struct tagWND *wndPtr);
|
extern void TTYDRV_WND_SetFocus(struct tagWND *wndPtr);
|
||||||
extern void TTYDRV_WND_PreSizeMove(struct tagWND *wndPtr);
|
extern void TTYDRV_WND_PreSizeMove(struct tagWND *wndPtr);
|
||||||
extern void TTYDRV_WND_PostSizeMove(struct tagWND *wndPtr);
|
extern void TTYDRV_WND_PostSizeMove(struct tagWND *wndPtr);
|
||||||
extern void TTYDRV_WND_ScrollWindow(struct tagWND *wndPtr, struct tagDC *dcPtr, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
|
extern void TTYDRV_WND_ScrollWindow(struct tagWND *wndPtr, HDC hdc, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
|
||||||
extern void TTYDRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD flags, BOOL bSetClipOrigin);
|
extern void TTYDRV_WND_SetDrawable(struct tagWND *wndPtr, HDC hdc, WORD flags, BOOL bSetClipOrigin);
|
||||||
extern BOOL TTYDRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
|
extern BOOL TTYDRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
|
||||||
extern BOOL TTYDRV_WND_IsSelfClipping(struct tagWND *wndPtr);
|
extern BOOL TTYDRV_WND_IsSelfClipping(struct tagWND *wndPtr);
|
||||||
extern void TTYDRV_WND_SetWindowRgn(struct tagWND *wndPtr, HRGN hrgnWnd);
|
extern void TTYDRV_WND_SetWindowRgn(struct tagWND *wndPtr, HRGN hrgnWnd);
|
||||||
|
|
|
@ -66,6 +66,8 @@ typedef struct tagUSER_DRIVER {
|
||||||
void (*pSetScreenSaveActive)(BOOL);
|
void (*pSetScreenSaveActive)(BOOL);
|
||||||
int (*pGetScreenSaveTimeout)(void);
|
int (*pGetScreenSaveTimeout)(void);
|
||||||
void (*pSetScreenSaveTimeout)(int);
|
void (*pSetScreenSaveTimeout)(int);
|
||||||
|
/* resource functions */
|
||||||
|
HANDLE (*pLoadOEMResource)(WORD,WORD);
|
||||||
/* windowing functions */
|
/* windowing functions */
|
||||||
BOOL (*pIsSingleWindow)(void);
|
BOOL (*pIsSingleWindow)(void);
|
||||||
} USER_DRIVER;
|
} USER_DRIVER;
|
||||||
|
|
|
@ -128,8 +128,8 @@ typedef struct tagWND_DRIVER
|
||||||
void (*pSetFocus)(WND *);
|
void (*pSetFocus)(WND *);
|
||||||
void (*pPreSizeMove)(WND *);
|
void (*pPreSizeMove)(WND *);
|
||||||
void (*pPostSizeMove)(WND *);
|
void (*pPostSizeMove)(WND *);
|
||||||
void (*pSurfaceCopy)(WND *, struct tagDC *, INT, INT, const RECT *, BOOL);
|
void (*pSurfaceCopy)(WND *, HDC, INT, INT, const RECT *, BOOL);
|
||||||
void (*pSetDrawable)(WND *, struct tagDC *, WORD, BOOL);
|
void (*pSetDrawable)(WND *, HDC, WORD, BOOL);
|
||||||
BOOL (*pSetHostAttr)(WND *, INT haKey, INT value);
|
BOOL (*pSetHostAttr)(WND *, INT haKey, INT value);
|
||||||
BOOL (*pIsSelfClipping)(WND *);
|
BOOL (*pIsSelfClipping)(WND *);
|
||||||
void (*pSetWindowRgn)(WND *, const HRGN);
|
void (*pSetWindowRgn)(WND *, const HRGN);
|
||||||
|
|
|
@ -156,7 +156,6 @@ extern INT X11DRV_DeviceBitmapBits( struct tagDC *dc, HBITMAP hbitmap,
|
||||||
WORD fGet, UINT startscan,
|
WORD fGet, UINT startscan,
|
||||||
UINT lines, LPSTR bits,
|
UINT lines, LPSTR bits,
|
||||||
LPBITMAPINFO info, UINT coloruse );
|
LPBITMAPINFO info, UINT coloruse );
|
||||||
extern HANDLE X11DRV_LoadOEMResource( WORD id, WORD type );
|
|
||||||
|
|
||||||
/* OpenGL / X11 driver functions */
|
/* OpenGL / X11 driver functions */
|
||||||
extern int X11DRV_ChoosePixelFormat(DC *dc, const PIXELFORMATDESCRIPTOR *pppfd) ;
|
extern int X11DRV_ChoosePixelFormat(DC *dc, const PIXELFORMATDESCRIPTOR *pppfd) ;
|
||||||
|
@ -336,6 +335,7 @@ extern BOOL X11DRV_GetScreenSaveActive(void);
|
||||||
extern void X11DRV_SetScreenSaveActive(BOOL bActivate);
|
extern void X11DRV_SetScreenSaveActive(BOOL bActivate);
|
||||||
extern int X11DRV_GetScreenSaveTimeout(void);
|
extern int X11DRV_GetScreenSaveTimeout(void);
|
||||||
extern void X11DRV_SetScreenSaveTimeout(int nTimeout);
|
extern void X11DRV_SetScreenSaveTimeout(int nTimeout);
|
||||||
|
extern HANDLE X11DRV_LoadOEMResource( WORD id, WORD type );
|
||||||
extern BOOL X11DRV_IsSingleWindow(void);
|
extern BOOL X11DRV_IsSingleWindow(void);
|
||||||
|
|
||||||
/* X11 clipboard driver */
|
/* X11 clipboard driver */
|
||||||
|
@ -429,8 +429,8 @@ extern void X11DRV_WND_SetText(struct tagWND *wndPtr, LPCWSTR text);
|
||||||
extern void X11DRV_WND_SetFocus(struct tagWND *wndPtr);
|
extern void X11DRV_WND_SetFocus(struct tagWND *wndPtr);
|
||||||
extern void X11DRV_WND_PreSizeMove(struct tagWND *wndPtr);
|
extern void X11DRV_WND_PreSizeMove(struct tagWND *wndPtr);
|
||||||
extern void X11DRV_WND_PostSizeMove(struct tagWND *wndPtr);
|
extern void X11DRV_WND_PostSizeMove(struct tagWND *wndPtr);
|
||||||
extern void X11DRV_WND_SurfaceCopy(struct tagWND *wndPtr, struct tagDC *dcPtr, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
|
extern void X11DRV_WND_SurfaceCopy(struct tagWND *wndPtr, HDC hdc, INT dx, INT dy, const RECT *clipRect, BOOL bUpdate);
|
||||||
extern void X11DRV_WND_SetDrawable(struct tagWND *wndPtr, struct tagDC *dc, WORD flags, BOOL bSetClipOrigin);
|
extern void X11DRV_WND_SetDrawable(struct tagWND *wndPtr, HDC hdc, WORD flags, BOOL bSetClipOrigin);
|
||||||
extern BOOL X11DRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
|
extern BOOL X11DRV_WND_SetHostAttr(struct tagWND *wndPtr, INT haKey, INT value);
|
||||||
extern BOOL X11DRV_WND_IsSelfClipping(struct tagWND *wndPtr);
|
extern BOOL X11DRV_WND_IsSelfClipping(struct tagWND *wndPtr);
|
||||||
extern void X11DRV_WND_DockWindow(struct tagWND *wndPtr);
|
extern void X11DRV_WND_DockWindow(struct tagWND *wndPtr);
|
||||||
|
|
|
@ -988,7 +988,7 @@ void WINAPI PlayMetaFileRecord16(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_SELECTPALETTE:
|
case META_SELECTPALETTE:
|
||||||
SelectPalette16(hdc, *(ht->objectHandle + *(mr->rdParm+1)),
|
SelectPalette(hdc, *(ht->objectHandle + *(mr->rdParm+1)),
|
||||||
*(mr->rdParm));
|
*(mr->rdParm));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -997,7 +997,7 @@ void WINAPI PlayMetaFileRecord16(
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_REALIZEPALETTE:
|
case META_REALIZEPALETTE:
|
||||||
RealizePalette16(hdc);
|
RealizePalette(hdc);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case META_ESCAPE:
|
case META_ESCAPE:
|
||||||
|
|
|
@ -152,8 +152,8 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap,
|
||||||
|
|
||||||
if (bitmap && (bitmap != 1))
|
if (bitmap && (bitmap != 1))
|
||||||
{
|
{
|
||||||
BITMAP16 bmp;
|
BITMAP bmp;
|
||||||
if (!GetObject16( bitmap, sizeof(bmp), &bmp )) return FALSE;
|
if (!GetObjectA( bitmap, sizeof(bmp), &bmp )) return FALSE;
|
||||||
Caret.width = bmp.bmWidth;
|
Caret.width = bmp.bmWidth;
|
||||||
Caret.height = bmp.bmHeight;
|
Caret.height = bmp.bmHeight;
|
||||||
/* FIXME: we should make a copy of the bitmap instead of a brush */
|
/* FIXME: we should make a copy of the bitmap instead of a brush */
|
||||||
|
|
|
@ -189,7 +189,7 @@ void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange)
|
||||||
if (lpFormat->hData32)
|
if (lpFormat->hData32)
|
||||||
DeleteObject(lpFormat->hData32);
|
DeleteObject(lpFormat->hData32);
|
||||||
if (lpFormat->hData16)
|
if (lpFormat->hData16)
|
||||||
DeleteObject16(lpFormat->hData16);
|
DeleteObject(lpFormat->hData16);
|
||||||
}
|
}
|
||||||
else if( lpFormat->wFormatID == CF_METAFILEPICT )
|
else if( lpFormat->wFormatID == CF_METAFILEPICT )
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,8 +40,6 @@
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "bitmap.h"
|
#include "bitmap.h"
|
||||||
#include "cursoricon.h"
|
#include "cursoricon.h"
|
||||||
#include "dc.h"
|
|
||||||
#include "gdi.h"
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "module.h"
|
#include "module.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
|
@ -429,7 +427,7 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
|
||||||
{
|
{
|
||||||
int sizeAnd, sizeXor;
|
int sizeAnd, sizeXor;
|
||||||
HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */
|
HBITMAP hAndBits = 0, hXorBits = 0; /* error condition for later */
|
||||||
BITMAPOBJ *bmpXor, *bmpAnd;
|
BITMAP bmpXor, bmpAnd;
|
||||||
POINT16 hotspot;
|
POINT16 hotspot;
|
||||||
BITMAPINFO *bmi;
|
BITMAPINFO *bmi;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
|
@ -583,10 +581,10 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now create the CURSORICONINFO structure */
|
/* Now create the CURSORICONINFO structure */
|
||||||
bmpXor = (BITMAPOBJ *) GDI_GetObjPtr( hXorBits, BITMAP_MAGIC );
|
GetObjectA( hXorBits, sizeof(bmpXor), &bmpXor );
|
||||||
bmpAnd = (BITMAPOBJ *) GDI_GetObjPtr( hAndBits, BITMAP_MAGIC );
|
GetObjectA( hAndBits, sizeof(bmpAnd), &bmpAnd );
|
||||||
sizeXor = bmpXor->bitmap.bmHeight * bmpXor->bitmap.bmWidthBytes;
|
sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
|
||||||
sizeAnd = bmpAnd->bitmap.bmHeight * bmpAnd->bitmap.bmWidthBytes;
|
sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
|
||||||
|
|
||||||
if (hObj) hObj = GlobalReAlloc16( hObj,
|
if (hObj) hObj = GlobalReAlloc16( hObj,
|
||||||
sizeof(CURSORICONINFO) + sizeXor + sizeAnd, GMEM_MOVEABLE );
|
sizeof(CURSORICONINFO) + sizeXor + sizeAnd, GMEM_MOVEABLE );
|
||||||
|
@ -602,11 +600,11 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
|
||||||
info = (CURSORICONINFO *)GlobalLock16( hObj );
|
info = (CURSORICONINFO *)GlobalLock16( hObj );
|
||||||
info->ptHotSpot.x = hotspot.x;
|
info->ptHotSpot.x = hotspot.x;
|
||||||
info->ptHotSpot.y = hotspot.y;
|
info->ptHotSpot.y = hotspot.y;
|
||||||
info->nWidth = bmpXor->bitmap.bmWidth;
|
info->nWidth = bmpXor.bmWidth;
|
||||||
info->nHeight = bmpXor->bitmap.bmHeight;
|
info->nHeight = bmpXor.bmHeight;
|
||||||
info->nWidthBytes = bmpXor->bitmap.bmWidthBytes;
|
info->nWidthBytes = bmpXor.bmWidthBytes;
|
||||||
info->bPlanes = bmpXor->bitmap.bmPlanes;
|
info->bPlanes = bmpXor.bmPlanes;
|
||||||
info->bBitsPerPixel = bmpXor->bitmap.bmBitsPixel;
|
info->bBitsPerPixel = bmpXor.bmBitsPixel;
|
||||||
|
|
||||||
/* Transfer the bitmap bits to the CURSORICONINFO structure */
|
/* Transfer the bitmap bits to the CURSORICONINFO structure */
|
||||||
|
|
||||||
|
@ -693,7 +691,6 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
|
||||||
else if ( !hInstance ) /* Load OEM cursor/icon */
|
else if ( !hInstance ) /* Load OEM cursor/icon */
|
||||||
{
|
{
|
||||||
WORD resid;
|
WORD resid;
|
||||||
HDC hdc;
|
|
||||||
|
|
||||||
if ( HIWORD(name) )
|
if ( HIWORD(name) )
|
||||||
{
|
{
|
||||||
|
@ -710,14 +707,7 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else resid = LOWORD(name);
|
else resid = LOWORD(name);
|
||||||
hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
|
h = USER_Driver->pLoadOEMResource( resid, fCursor ? OEM_CURSOR : OEM_ICON );
|
||||||
if (hdc) {
|
|
||||||
DC *dc = DC_GetDCPtr( hdc );
|
|
||||||
if (dc->funcs->pLoadOEMResource)
|
|
||||||
h = dc->funcs->pLoadOEMResource( resid, fCursor ? OEM_CURSOR : OEM_ICON );
|
|
||||||
GDI_HEAP_UNLOCK( hdc );
|
|
||||||
DeleteDC( hdc );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
else /* Load from resource */
|
else /* Load from resource */
|
||||||
|
@ -1819,16 +1809,17 @@ BOOL WINAPI GetIconInfo(HICON hIcon,LPICONINFO iconinfo) {
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
* CreateIconIndirect (USER32.78)
|
* CreateIconIndirect (USER32.78)
|
||||||
*/
|
*/
|
||||||
HICON WINAPI CreateIconIndirect(LPICONINFO iconinfo) {
|
HICON WINAPI CreateIconIndirect(LPICONINFO iconinfo)
|
||||||
BITMAPOBJ *bmpXor,*bmpAnd;
|
{
|
||||||
|
BITMAP bmpXor,bmpAnd;
|
||||||
HICON hObj;
|
HICON hObj;
|
||||||
int sizeXor,sizeAnd;
|
int sizeXor,sizeAnd;
|
||||||
|
|
||||||
bmpXor = (BITMAPOBJ *) GDI_GetObjPtr( iconinfo->hbmColor, BITMAP_MAGIC );
|
GetObjectA( iconinfo->hbmColor, sizeof(bmpXor), &bmpXor );
|
||||||
bmpAnd = (BITMAPOBJ *) GDI_GetObjPtr( iconinfo->hbmMask, BITMAP_MAGIC );
|
GetObjectA( iconinfo->hbmMask, sizeof(bmpAnd), &bmpAnd );
|
||||||
|
|
||||||
sizeXor = bmpXor->bitmap.bmHeight * bmpXor->bitmap.bmWidthBytes;
|
sizeXor = bmpXor.bmHeight * bmpXor.bmWidthBytes;
|
||||||
sizeAnd = bmpAnd->bitmap.bmHeight * bmpAnd->bitmap.bmWidthBytes;
|
sizeAnd = bmpAnd.bmHeight * bmpAnd.bmWidthBytes;
|
||||||
|
|
||||||
hObj = GlobalAlloc16( GMEM_MOVEABLE,
|
hObj = GlobalAlloc16( GMEM_MOVEABLE,
|
||||||
sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
|
sizeof(CURSORICONINFO) + sizeXor + sizeAnd );
|
||||||
|
@ -1850,11 +1841,11 @@ HICON WINAPI CreateIconIndirect(LPICONINFO iconinfo) {
|
||||||
info->ptHotSpot.y = iconinfo->yHotspot;
|
info->ptHotSpot.y = iconinfo->yHotspot;
|
||||||
}
|
}
|
||||||
|
|
||||||
info->nWidth = bmpXor->bitmap.bmWidth;
|
info->nWidth = bmpXor.bmWidth;
|
||||||
info->nHeight = bmpXor->bitmap.bmHeight;
|
info->nHeight = bmpXor.bmHeight;
|
||||||
info->nWidthBytes = bmpXor->bitmap.bmWidthBytes;
|
info->nWidthBytes = bmpXor.bmWidthBytes;
|
||||||
info->bPlanes = bmpXor->bitmap.bmPlanes;
|
info->bPlanes = bmpXor.bmPlanes;
|
||||||
info->bBitsPerPixel = bmpXor->bitmap.bmBitsPixel;
|
info->bBitsPerPixel = bmpXor.bmBitsPixel;
|
||||||
|
|
||||||
/* Transfer the bitmap bits to the CURSORICONINFO structure */
|
/* Transfer the bitmap bits to the CURSORICONINFO structure */
|
||||||
|
|
||||||
|
@ -2104,18 +2095,8 @@ static HBITMAP BITMAP_Load( HINSTANCE instance,LPCWSTR name, UINT loadflags )
|
||||||
if (!(loadflags & LR_LOADFROMFILE)) {
|
if (!(loadflags & LR_LOADFROMFILE)) {
|
||||||
if (!instance) /* OEM bitmap */
|
if (!instance) /* OEM bitmap */
|
||||||
{
|
{
|
||||||
HDC hdc;
|
|
||||||
DC *dc;
|
|
||||||
|
|
||||||
if (HIWORD((int)name)) return 0;
|
if (HIWORD((int)name)) return 0;
|
||||||
hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL );
|
return USER_Driver->pLoadOEMResource( LOWORD((int)name), OEM_BITMAP );
|
||||||
dc = DC_GetDCPtr( hdc );
|
|
||||||
if(dc->funcs->pLoadOEMResource)
|
|
||||||
hbitmap = dc->funcs->pLoadOEMResource( LOWORD((int)name),
|
|
||||||
OEM_BITMAP );
|
|
||||||
GDI_HEAP_UNLOCK( hdc );
|
|
||||||
DeleteDC( hdc );
|
|
||||||
return hbitmap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(hRsrc = FindResourceW( instance, name, RT_BITMAPW ))) return 0;
|
if (!(hRsrc = FindResourceW( instance, name, RT_BITMAPW ))) return 0;
|
||||||
|
|
|
@ -80,7 +80,7 @@ DCE *DCE_AllocDCE( HWND hWnd, DCE_TYPE type )
|
||||||
WND* wnd;
|
WND* wnd;
|
||||||
|
|
||||||
if (!(dce = HeapAlloc( SystemHeap, 0, sizeof(DCE) ))) return NULL;
|
if (!(dce = HeapAlloc( SystemHeap, 0, sizeof(DCE) ))) return NULL;
|
||||||
if (!(dce->hDC = CreateDC16( "DISPLAY", NULL, NULL, NULL )))
|
if (!(dce->hDC = CreateDCA( "DISPLAY", NULL, NULL, NULL )))
|
||||||
{
|
{
|
||||||
HeapFree( SystemHeap, 0, dce );
|
HeapFree( SystemHeap, 0, dce );
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -806,7 +806,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
|
||||||
bUpdateVisRgn = bUpdateVisRgn || (dc->w.flags & DC_DIRTY);
|
bUpdateVisRgn = bUpdateVisRgn || (dc->w.flags & DC_DIRTY);
|
||||||
|
|
||||||
/* recompute visible region */
|
/* recompute visible region */
|
||||||
wndPtr->pDriver->pSetDrawable( wndPtr, dc, flags, bUpdateClipOrigin );
|
wndPtr->pDriver->pSetDrawable( wndPtr, hdc, flags, bUpdateClipOrigin );
|
||||||
|
|
||||||
if( bUpdateVisRgn )
|
if( bUpdateVisRgn )
|
||||||
{
|
{
|
||||||
|
@ -975,7 +975,6 @@ BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
|
||||||
BOOL retv = TRUE;
|
BOOL retv = TRUE;
|
||||||
HRGN hVisRgn;
|
HRGN hVisRgn;
|
||||||
DCE *dce = (DCE *)data;
|
DCE *dce = (DCE *)data;
|
||||||
DC *dc;
|
|
||||||
WND *wndPtr;
|
WND *wndPtr;
|
||||||
|
|
||||||
TRACE("hDC = %04x, %i\n", hDC, code);
|
TRACE("hDC = %04x, %i\n", hDC, code);
|
||||||
|
@ -1000,9 +999,7 @@ BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
|
||||||
|
|
||||||
/* Update stale DC in DCX */
|
/* Update stale DC in DCX */
|
||||||
wndPtr = WIN_FindWndPtr( dce->hwndCurrent);
|
wndPtr = WIN_FindWndPtr( dce->hwndCurrent);
|
||||||
dc = (DC *) GDI_GetObjPtr( dce->hDC, DC_MAGIC);
|
if (wndPtr) wndPtr->pDriver->pSetDrawable( wndPtr, hDC, dce->DCXflags, TRUE);
|
||||||
if( dc && wndPtr)
|
|
||||||
wndPtr->pDriver->pSetDrawable( wndPtr, dc,dce->DCXflags,TRUE);
|
|
||||||
|
|
||||||
SetHookFlags16(hDC, DCHF_VALIDATEVISRGN);
|
SetHookFlags16(hDC, DCHF_VALIDATEVISRGN);
|
||||||
hVisRgn = DCE_GetVisRgn(dce->hwndCurrent, dce->DCXflags, 0, 0);
|
hVisRgn = DCE_GetVisRgn(dce->hwndCurrent, dce->DCXflags, 0, 0);
|
||||||
|
|
|
@ -161,12 +161,12 @@ static BOOL DIALOG_GetCharSize( HFONT hFont, SIZE * pSize )
|
||||||
*/
|
*/
|
||||||
BOOL DIALOG_Init(void)
|
BOOL DIALOG_Init(void)
|
||||||
{
|
{
|
||||||
HDC16 hdc;
|
HDC hdc;
|
||||||
SIZE size;
|
SIZE size;
|
||||||
|
|
||||||
/* Calculate the dialog base units */
|
/* Calculate the dialog base units */
|
||||||
|
|
||||||
if (!(hdc = CreateDC16( "DISPLAY", NULL, NULL, NULL ))) return FALSE;
|
if (!(hdc = CreateDCA( "DISPLAY", NULL, NULL, NULL ))) return FALSE;
|
||||||
if (!DIALOG_GetCharSizeFromDC( hdc, 0, &size )) return FALSE;
|
if (!DIALOG_GetCharSizeFromDC( hdc, 0, &size )) return FALSE;
|
||||||
DeleteDC( hdc );
|
DeleteDC( hdc );
|
||||||
xBaseUnit = size.cx;
|
xBaseUnit = size.cx;
|
||||||
|
@ -681,11 +681,11 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
|
||||||
PROOF_QUALITY, FF_DONTCARE,
|
PROOF_QUALITY, FF_DONTCARE,
|
||||||
(LPCWSTR)template.faceName );
|
(LPCWSTR)template.faceName );
|
||||||
else
|
else
|
||||||
hFont = CreateFont16( -pixels, 0, 0, 0, FW_DONTCARE,
|
hFont = CreateFontA( -pixels, 0, 0, 0, FW_DONTCARE,
|
||||||
FALSE, FALSE, FALSE,
|
FALSE, FALSE, FALSE,
|
||||||
DEFAULT_CHARSET, 0, 0,
|
DEFAULT_CHARSET, 0, 0,
|
||||||
PROOF_QUALITY, FF_DONTCARE,
|
PROOF_QUALITY, FF_DONTCARE,
|
||||||
template.faceName );
|
template.faceName );
|
||||||
if (hFont)
|
if (hFont)
|
||||||
{
|
{
|
||||||
SIZE charSize;
|
SIZE charSize;
|
||||||
|
|
|
@ -1489,14 +1489,14 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
|
||||||
SelectObject( hdc, hbrushOld );
|
SelectObject( hdc, hbrushOld );
|
||||||
}
|
}
|
||||||
WIN_ReleaseWndPtr(wndPtr);
|
WIN_ReleaseWndPtr(wndPtr);
|
||||||
MoveTo16( hdc, r.left, r.bottom );
|
MoveToEx( hdc, r.left, r.bottom, NULL );
|
||||||
LineTo( hdc, r.right, r.bottom );
|
LineTo( hdc, r.right, r.bottom );
|
||||||
|
|
||||||
if (style & WS_SYSMENU)
|
if (style & WS_SYSMENU)
|
||||||
{
|
{
|
||||||
NC_DrawSysButton( hwnd, hdc, FALSE );
|
NC_DrawSysButton( hwnd, hdc, FALSE );
|
||||||
r.left += GetSystemMetrics(SM_CXSIZE) + 1;
|
r.left += GetSystemMetrics(SM_CXSIZE) + 1;
|
||||||
MoveTo16( hdc, r.left - 1, r.top );
|
MoveToEx( hdc, r.left - 1, r.top, NULL );
|
||||||
LineTo( hdc, r.left - 1, r.bottom );
|
LineTo( hdc, r.left - 1, r.bottom );
|
||||||
}
|
}
|
||||||
if (style & WS_MAXIMIZEBOX)
|
if (style & WS_MAXIMIZEBOX)
|
||||||
|
|
|
@ -267,10 +267,30 @@ copyrgn:
|
||||||
* BeginPaint16 (USER.39)
|
* BeginPaint16 (USER.39)
|
||||||
*/
|
*/
|
||||||
HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
|
{
|
||||||
|
PAINTSTRUCT ps;
|
||||||
|
|
||||||
|
BeginPaint( hwnd, &ps );
|
||||||
|
lps->hdc = ps.hdc;
|
||||||
|
lps->fErase = ps.fErase;
|
||||||
|
lps->rcPaint.top = ps.rcPaint.top;
|
||||||
|
lps->rcPaint.left = ps.rcPaint.left;
|
||||||
|
lps->rcPaint.right = ps.rcPaint.right;
|
||||||
|
lps->rcPaint.bottom = ps.rcPaint.bottom;
|
||||||
|
lps->fRestore = ps.fRestore;
|
||||||
|
lps->fIncUpdate = ps.fIncUpdate;
|
||||||
|
return lps->hdc;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* BeginPaint (USER32.10)
|
||||||
|
*/
|
||||||
|
HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
||||||
{
|
{
|
||||||
BOOL bIcon;
|
BOOL bIcon;
|
||||||
HRGN hrgnUpdate;
|
HRGN hrgnUpdate;
|
||||||
RECT16 clipRect, clientRect;
|
RECT clipRect, clientRect;
|
||||||
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
WND *wndPtr = WIN_FindWndPtr( hwnd );
|
||||||
if (!wndPtr) return 0;
|
if (!wndPtr) return 0;
|
||||||
|
|
||||||
|
@ -306,7 +326,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
/* Don't clip the output to the update region for CS_PARENTDC window */
|
/* Don't clip the output to the update region for CS_PARENTDC window */
|
||||||
if( hrgnUpdate )
|
if( hrgnUpdate )
|
||||||
DeleteObject(hrgnUpdate);
|
DeleteObject(hrgnUpdate);
|
||||||
lps->hdc = GetDCEx16( hwnd, 0, DCX_WINDOWPAINT | DCX_USESTYLE |
|
lps->hdc = GetDCEx( hwnd, 0, DCX_WINDOWPAINT | DCX_USESTYLE |
|
||||||
(bIcon ? DCX_WINDOW : 0) );
|
(bIcon ? DCX_WINDOW : 0) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -314,7 +334,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
if( hrgnUpdate ) /* convert to client coordinates */
|
if( hrgnUpdate ) /* convert to client coordinates */
|
||||||
OffsetRgn( hrgnUpdate, wndPtr->rectWindow.left - wndPtr->rectClient.left,
|
OffsetRgn( hrgnUpdate, wndPtr->rectWindow.left - wndPtr->rectClient.left,
|
||||||
wndPtr->rectWindow.top - wndPtr->rectClient.top );
|
wndPtr->rectWindow.top - wndPtr->rectClient.top );
|
||||||
lps->hdc = GetDCEx16(hwnd, hrgnUpdate, DCX_INTERSECTRGN |
|
lps->hdc = GetDCEx(hwnd, hrgnUpdate, DCX_INTERSECTRGN |
|
||||||
DCX_WINDOWPAINT | DCX_USESTYLE | (bIcon ? DCX_WINDOW : 0) );
|
DCX_WINDOWPAINT | DCX_USESTYLE | (bIcon ? DCX_WINDOW : 0) );
|
||||||
/* ReleaseDC() in EndPaint() will delete the region */
|
/* ReleaseDC() in EndPaint() will delete the region */
|
||||||
}
|
}
|
||||||
|
@ -333,13 +353,13 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
than the window itself, so we need to intersect the cliprect with
|
than the window itself, so we need to intersect the cliprect with
|
||||||
the window */
|
the window */
|
||||||
|
|
||||||
GetClipBox16( lps->hdc, &clipRect );
|
GetClipBox( lps->hdc, &clipRect );
|
||||||
GetClientRect16( hwnd, &clientRect );
|
GetClientRect( hwnd, &clientRect );
|
||||||
|
|
||||||
/* The rect obtained by GetClipBox is in logical, so make the client in logical to*/
|
/* The rect obtained by GetClipBox is in logical, so make the client in logical to*/
|
||||||
DPtoLP16(lps->hdc, (LPPOINT16) &clientRect, 2);
|
DPtoLP(lps->hdc, (LPPOINT)&clientRect, 2);
|
||||||
|
|
||||||
IntersectRect16(&lps->rcPaint, &clientRect, &clipRect);
|
IntersectRect(&lps->rcPaint, &clientRect, &clipRect);
|
||||||
|
|
||||||
TRACE("box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top,
|
TRACE("box = (%i,%i - %i,%i)\n", lps->rcPaint.left, lps->rcPaint.top,
|
||||||
lps->rcPaint.right, lps->rcPaint.bottom );
|
lps->rcPaint.right, lps->rcPaint.bottom );
|
||||||
|
@ -347,9 +367,8 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
if (wndPtr->flags & WIN_NEEDS_ERASEBKGND)
|
if (wndPtr->flags & WIN_NEEDS_ERASEBKGND)
|
||||||
{
|
{
|
||||||
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
|
wndPtr->flags &= ~WIN_NEEDS_ERASEBKGND;
|
||||||
lps->fErase = !SendMessage16(hwnd, (bIcon) ? WM_ICONERASEBKGND
|
lps->fErase = !SendMessageA(hwnd, (bIcon) ? WM_ICONERASEBKGND : WM_ERASEBKGND,
|
||||||
: WM_ERASEBKGND,
|
(WPARAM16)lps->hdc, 0 );
|
||||||
(WPARAM16)lps->hdc, 0 );
|
|
||||||
}
|
}
|
||||||
else lps->fErase = TRUE;
|
else lps->fErase = TRUE;
|
||||||
|
|
||||||
|
@ -358,26 +377,6 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
|
||||||
* BeginPaint (USER32.10)
|
|
||||||
*/
|
|
||||||
HDC WINAPI BeginPaint( HWND hwnd, PAINTSTRUCT *lps )
|
|
||||||
{
|
|
||||||
PAINTSTRUCT16 ps;
|
|
||||||
|
|
||||||
BeginPaint16( hwnd, &ps );
|
|
||||||
lps->hdc = (HDC)ps.hdc;
|
|
||||||
lps->fErase = ps.fErase;
|
|
||||||
lps->rcPaint.top = ps.rcPaint.top;
|
|
||||||
lps->rcPaint.left = ps.rcPaint.left;
|
|
||||||
lps->rcPaint.right = ps.rcPaint.right;
|
|
||||||
lps->rcPaint.bottom = ps.rcPaint.bottom;
|
|
||||||
lps->fRestore = ps.fRestore;
|
|
||||||
lps->fIncUpdate = ps.fIncUpdate;
|
|
||||||
return lps->hdc;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* EndPaint16 (USER.40)
|
* EndPaint16 (USER.40)
|
||||||
*/
|
*/
|
||||||
|
@ -405,10 +404,12 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
|
||||||
*/
|
*/
|
||||||
void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush )
|
void WINAPI FillWindow16( HWND16 hwndParent, HWND16 hwnd, HDC16 hdc, HBRUSH16 hbrush )
|
||||||
{
|
{
|
||||||
RECT16 rect;
|
RECT rect;
|
||||||
GetClientRect16( hwnd, &rect );
|
RECT16 rc16;
|
||||||
DPtoLP16( hdc, (LPPOINT16)&rect, 2 );
|
GetClientRect( hwnd, &rect );
|
||||||
PaintRect16( hwndParent, hwnd, hdc, hbrush, &rect );
|
DPtoLP( hdc, (LPPOINT)&rect, 2 );
|
||||||
|
CONV_RECT32TO16( &rect, &rc16 );
|
||||||
|
PaintRect16( hwndParent, hwnd, hdc, hbrush, &rc16 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1240,16 +1241,16 @@ INT WINAPI ExcludeUpdateRgn( HDC hdc, HWND hwnd )
|
||||||
*/
|
*/
|
||||||
INT16 WINAPI FillRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
|
INT16 WINAPI FillRect16( HDC16 hdc, const RECT16 *rect, HBRUSH16 hbrush )
|
||||||
{
|
{
|
||||||
HBRUSH16 prevBrush;
|
HBRUSH prevBrush;
|
||||||
|
|
||||||
/* coordinates are logical so we cannot fast-check 'rect',
|
/* coordinates are logical so we cannot fast-check 'rect',
|
||||||
* it will be done later in the PatBlt().
|
* it will be done later in the PatBlt().
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!(prevBrush = SelectObject16( hdc, hbrush ))) return 0;
|
if (!(prevBrush = SelectObject( hdc, hbrush ))) return 0;
|
||||||
PatBlt( hdc, rect->left, rect->top,
|
PatBlt( hdc, rect->left, rect->top,
|
||||||
rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
|
rect->right - rect->left, rect->bottom - rect->top, PATCOPY );
|
||||||
SelectObject16( hdc, prevBrush );
|
SelectObject( hdc, prevBrush );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1641,3 +1642,20 @@ BOOL16 WINAPI DrawState16(HDC16 hdc, HBRUSH16 hbr,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SelectPalette16 (USER.282)
|
||||||
|
*/
|
||||||
|
HPALETTE16 WINAPI SelectPalette16( HDC16 hDC, HPALETTE16 hPal,
|
||||||
|
BOOL16 bForceBackground )
|
||||||
|
{
|
||||||
|
return SelectPalette( hDC, hPal, bForceBackground );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* RealizePalette16 (USER.283)
|
||||||
|
*/
|
||||||
|
UINT16 WINAPI RealizePalette16( HDC16 hDC )
|
||||||
|
{
|
||||||
|
return RealizePalette( hDC );
|
||||||
|
}
|
||||||
|
|
|
@ -192,20 +192,21 @@ void TTYDRV_WND_PostSizeMove(WND *wndPtr)
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
* TTYDRV_WND_ScrollWindow
|
* TTYDRV_WND_ScrollWindow
|
||||||
*/
|
*/
|
||||||
void TTYDRV_WND_ScrollWindow(
|
void TTYDRV_WND_ScrollWindow( WND *wndPtr, HDC hdc, INT dx, INT dy,
|
||||||
WND *wndPtr, DC *dcPtr, INT dx, INT dy,
|
const RECT *clipRect, BOOL bUpdate)
|
||||||
const RECT *clipRect, BOOL bUpdate)
|
|
||||||
{
|
{
|
||||||
FIXME("(%p, %p, %d, %d, %p, %d): stub\n",
|
FIXME("(%p, %x, %d, %d, %p, %d): stub\n",
|
||||||
wndPtr, dcPtr, dx, dy, clipRect, bUpdate);
|
wndPtr, hdc, dx, dy, clipRect, bUpdate);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* TTYDRV_WND_SetDrawable
|
* TTYDRV_WND_SetDrawable
|
||||||
*/
|
*/
|
||||||
void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin)
|
void TTYDRV_WND_SetDrawable(WND *wndPtr, HDC hdc, WORD flags, BOOL bSetClipOrigin)
|
||||||
{
|
{
|
||||||
TRACE("(%p, %p, %d, %d)\n", wndPtr, dc, flags, bSetClipOrigin);
|
DC *dc = DC_GetDCPtr( hdc );
|
||||||
|
if (!dc) return;
|
||||||
|
TRACE("(%p, %p, %d, %d)\n", wndPtr, dc, flags, bSetClipOrigin);
|
||||||
|
|
||||||
/* FIXME: Should be done in the common code instead */
|
/* FIXME: Should be done in the common code instead */
|
||||||
if(!wndPtr) {
|
if(!wndPtr) {
|
||||||
|
@ -220,6 +221,7 @@ void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin
|
||||||
dc->w.DCOrgY = wndPtr->rectClient.top;
|
dc->w.DCOrgY = wndPtr->rectClient.top;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
GDI_HEAP_UNLOCK( hdc );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
|
@ -2319,7 +2319,6 @@ nocopy:
|
||||||
{
|
{
|
||||||
RECT rClip;
|
RECT rClip;
|
||||||
HDC hDC;
|
HDC hDC;
|
||||||
DC* dc;
|
|
||||||
|
|
||||||
/* get DC and clip rect with drawable rect to avoid superfluous expose events
|
/* get DC and clip rect with drawable rect to avoid superfluous expose events
|
||||||
from copying clipped areas */
|
from copying clipped areas */
|
||||||
|
@ -2339,14 +2338,12 @@ nocopy:
|
||||||
}
|
}
|
||||||
rClip.left = rClip.top = 0;
|
rClip.left = rClip.top = 0;
|
||||||
|
|
||||||
if( (dc = (DC *)GDI_GetObjPtr(hDC, DC_MAGIC)) )
|
if( oh > nh ) r.bottom = r.top + nh;
|
||||||
{
|
if( ow < nw ) r.right = r.left + nw;
|
||||||
if( oh > nh ) r.bottom = r.top + nh;
|
|
||||||
if( ow < nw ) r.right = r.left + nw;
|
|
||||||
|
|
||||||
if( IntersectRect( &r, &r, &rClip ) )
|
if( IntersectRect( &r, &r, &rClip ) )
|
||||||
{
|
{
|
||||||
Wnd->pDriver->pSurfaceCopy( Wnd->parent, dc, dx, dy, &r, TRUE );
|
Wnd->pDriver->pSurfaceCopy( Wnd->parent, hDC, dx, dy, &r, TRUE );
|
||||||
|
|
||||||
/* When you copy the bits without repainting, parent doesn't
|
/* When you copy the bits without repainting, parent doesn't
|
||||||
get validated appropriately. Therefore, we have to validate
|
get validated appropriately. Therefore, we have to validate
|
||||||
|
@ -2358,9 +2355,6 @@ nocopy:
|
||||||
OffsetRect(&r, dx, dy);
|
OffsetRect(&r, dx, dy);
|
||||||
ValidateRect(Wnd->parent->hwndSelf, &r);
|
ValidateRect(Wnd->parent->hwndSelf, &r);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
GDI_HEAP_UNLOCK( hDC );
|
|
||||||
}
|
}
|
||||||
ReleaseDC( (uFlags & SWP_EX_PAINTSELF) ?
|
ReleaseDC( (uFlags & SWP_EX_PAINTSELF) ?
|
||||||
Wnd->hwndSelf : Wnd->parent->hwndSelf, hDC);
|
Wnd->hwndSelf : Wnd->parent->hwndSelf, hDC);
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include "color.h"
|
#include "color.h"
|
||||||
#include "debugtools.h"
|
#include "debugtools.h"
|
||||||
#include "dce.h"
|
#include "dce.h"
|
||||||
|
#include "dc.h"
|
||||||
#include "options.h"
|
#include "options.h"
|
||||||
#include "message.h"
|
#include "message.h"
|
||||||
#include "heap.h"
|
#include "heap.h"
|
||||||
|
@ -755,12 +756,15 @@ void X11DRV_WND_PostSizeMove(WND *wndPtr)
|
||||||
*
|
*
|
||||||
* Copies rect to (rect.left + dx, rect.top + dy).
|
* Copies rect to (rect.left + dx, rect.top + dy).
|
||||||
*/
|
*/
|
||||||
void X11DRV_WND_SurfaceCopy(WND* wndPtr, DC *dcPtr, INT dx, INT dy,
|
void X11DRV_WND_SurfaceCopy(WND* wndPtr, HDC hdc, INT dx, INT dy,
|
||||||
const RECT *rect, BOOL bUpdate)
|
const RECT *rect, BOOL bUpdate)
|
||||||
{
|
{
|
||||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dcPtr->physDev;
|
X11DRV_PDEVICE *physDev;
|
||||||
POINT dst, src;
|
POINT dst, src;
|
||||||
|
DC *dcPtr = DC_GetDCPtr( hdc );
|
||||||
|
|
||||||
|
if (!dcPtr) return;
|
||||||
|
physDev = (X11DRV_PDEVICE *)dcPtr->physDev;
|
||||||
dst.x = (src.x = dcPtr->w.DCOrgX + rect->left) + dx;
|
dst.x = (src.x = dcPtr->w.DCOrgX + rect->left) + dx;
|
||||||
dst.y = (src.y = dcPtr->w.DCOrgY + rect->top) + dy;
|
dst.y = (src.y = dcPtr->w.DCOrgY + rect->top) + dy;
|
||||||
|
|
||||||
|
@ -777,6 +781,7 @@ void X11DRV_WND_SurfaceCopy(WND* wndPtr, DC *dcPtr, INT dx, INT dy,
|
||||||
|
|
||||||
if (bUpdate) /* Make sure exposure events have been processed */
|
if (bUpdate) /* Make sure exposure events have been processed */
|
||||||
EVENT_Synchronize();
|
EVENT_Synchronize();
|
||||||
|
GDI_HEAP_UNLOCK( hdc );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
@ -785,12 +790,15 @@ void X11DRV_WND_SurfaceCopy(WND* wndPtr, DC *dcPtr, INT dx, INT dy,
|
||||||
* Set the drawable, origin and dimensions for the DC associated to
|
* Set the drawable, origin and dimensions for the DC associated to
|
||||||
* a given window.
|
* a given window.
|
||||||
*/
|
*/
|
||||||
void X11DRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin)
|
void X11DRV_WND_SetDrawable(WND *wndPtr, HDC hdc, WORD flags, BOOL bSetClipOrigin)
|
||||||
{
|
{
|
||||||
X11DRV_PDEVICE *physDev = (X11DRV_PDEVICE *)dc->physDev;
|
DC *dc = DC_GetDCPtr( hdc );
|
||||||
|
X11DRV_PDEVICE *physDev;
|
||||||
INT dcOrgXCopy = 0, dcOrgYCopy = 0;
|
INT dcOrgXCopy = 0, dcOrgYCopy = 0;
|
||||||
BOOL offsetClipRgn = FALSE;
|
BOOL offsetClipRgn = FALSE;
|
||||||
|
|
||||||
|
if (!dc) return;
|
||||||
|
physDev = (X11DRV_PDEVICE *)dc->physDev;
|
||||||
if (!wndPtr) /* Get a DC for the whole screen */
|
if (!wndPtr) /* Get a DC for the whole screen */
|
||||||
{
|
{
|
||||||
dc->w.DCOrgX = 0;
|
dc->w.DCOrgX = 0;
|
||||||
|
@ -855,6 +863,7 @@ void X11DRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin
|
||||||
TSXSetClipOrigin( display, physDev->gc, dc->w.DCOrgX, dc->w.DCOrgY );
|
TSXSetClipOrigin( display, physDev->gc, dc->w.DCOrgX, dc->w.DCOrgY );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
GDI_HEAP_UNLOCK( hdc );
|
||||||
}
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
|
|
Loading…
Reference in New Issue