Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
b0efe28f
Commit
b0efe28f
authored
Aug 04, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed a few dependencies on GDI internals from USER dll.
parent
74cc65a9
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
154 additions
and
155 deletions
+154
-155
combo.c
controls/combo.c
+1
-1
menu.c
controls/menu.c
+5
-5
ttydrv_main.c
dlls/ttydrv/ttydrv_main.c
+2
-0
init.c
dlls/wineps/init.c
+0
-1
x11drv_main.c
dlls/x11drv/x11drv_main.c
+2
-0
init.c
graphics/enhmetafiledrv/init.c
+0
-1
init.c
graphics/metafiledrv/init.c
+0
-1
init.c
graphics/ttydrv/init.c
+0
-1
oembitmap.c
graphics/ttydrv/oembitmap.c
+9
-11
init.c
graphics/win16drv/init.c
+0
-1
init.c
graphics/x11drv/init.c
+0
-1
gdi.h
include/gdi.h
+0
-1
ttydrv.h
include/ttydrv.h
+4
-3
user.h
include/user.h
+2
-0
win.h
include/win.h
+2
-2
x11drv.h
include/x11drv.h
+3
-3
metafile.c
objects/metafile.c
+2
-2
caret.c
windows/caret.c
+2
-2
clipboard.c
windows/clipboard.c
+1
-1
cursoricon.c
windows/cursoricon.c
+24
-43
dce.c
windows/dce.c
+3
-6
dialog.c
windows/dialog.c
+7
-7
nonclient.c
windows/nonclient.c
+2
-2
painting.c
windows/painting.c
+55
-37
wnd.c
windows/ttydrv/wnd.c
+9
-7
winpos.c
windows/winpos.c
+5
-11
wnd.c
windows/x11drv/wnd.c
+14
-5
No files found.
controls/combo.c
View file @
b0efe28f
...
...
@@ -82,7 +82,7 @@ static BOOL COMBO_Init()
TRACE
(
"combo bitmap [%i,%i]
\n
"
,
CBitWidth
,
CBitHeight
);
hPrevB
=
SelectObject
16
(
hDC
,
hComboBmp
);
hPrevB
=
SelectObject
(
hDC
,
hComboBmp
);
SetRect
(
&
r
,
0
,
0
,
CBitWidth
,
CBitHeight
);
InvertRect
(
hDC
,
&
r
);
SelectObject
(
hDC
,
hPrevB
);
...
...
controls/menu.c
View file @
b0efe28f
...
...
@@ -1137,7 +1137,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
else
{
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_WINDOWFRAME
)
);
MoveTo
16
(
hdc
,
rect
.
left
,
0
);
MoveTo
Ex
(
hdc
,
rect
.
left
,
0
,
NULL
);
LineTo
(
hdc
,
rect
.
left
,
height
);
}
}
...
...
@@ -1156,7 +1156,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
else
{
SelectObject
(
hdc
,
GetSysColorPen
(
COLOR_WINDOWFRAME
)
);
MoveTo
16
(
hdc
,
rect
.
left
,
rect
.
top
+
SEPARATOR_HEIGHT
/
2
);
MoveTo
Ex
(
hdc
,
rect
.
left
,
rect
.
top
+
SEPARATOR_HEIGHT
/
2
,
NULL
);
LineTo
(
hdc
,
rect
.
right
,
rect
.
top
+
SEPARATOR_HEIGHT
/
2
);
}
return
;
...
...
@@ -1185,7 +1185,7 @@ static void MENU_DrawMenuItem( HWND hwnd, HMENU hmenu, HWND hwndOwner, HDC hdc,
/* helper lines for debugging */
/* FrameRect(hdc, &rect, GetStockObject(BLACK_BRUSH));
SelectObject( hdc, GetSysColorPen(COLOR_WINDOWFRAME) );
MoveTo
16( hdc, rect.left, (rect.top + rect.bottom)/2
);
MoveTo
Ex( hdc, rect.left, (rect.top + rect.bottom)/2, NULL
);
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
)
{
SelectObject
(
hDC
,
GetSysColorPen
(
COLOR_WINDOWFRAME
)
);
MoveTo
16
(
hDC
,
lprect
->
left
,
lprect
->
bottom
);
MoveTo
Ex
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
else
{
SelectObject
(
hDC
,
GetSysColorPen
(
COLOR_3DFACE
));
MoveTo
16
(
hDC
,
lprect
->
left
,
lprect
->
bottom
);
MoveTo
Ex
(
hDC
,
lprect
->
left
,
lprect
->
bottom
,
NULL
);
LineTo
(
hDC
,
lprect
->
right
,
lprect
->
bottom
);
}
...
...
dlls/ttydrv/ttydrv_main.c
View file @
b0efe28f
...
...
@@ -46,6 +46,8 @@ static USER_DRIVER user_driver =
TTYDRV_SetScreenSaveActive
,
TTYDRV_GetScreenSaveTimeout
,
TTYDRV_SetScreenSaveTimeout
,
/* resource functions */
TTYDRV_LoadOEMResource
,
/* windowing functions */
TTYDRV_IsSingleWindow
};
...
...
dlls/wineps/init.c
View file @
b0efe28f
...
...
@@ -65,7 +65,6 @@ static const DC_FUNCTIONS PSDRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
PSDRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
NULL
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg (optional) */
...
...
dlls/x11drv/x11drv_main.c
View file @
b0efe28f
...
...
@@ -59,6 +59,8 @@ static USER_DRIVER user_driver =
X11DRV_SetScreenSaveActive
,
X11DRV_GetScreenSaveTimeout
,
X11DRV_SetScreenSaveTimeout
,
/* resource functions */
X11DRV_LoadOEMResource
,
/* windowing functions */
X11DRV_IsSingleWindow
};
...
...
graphics/enhmetafiledrv/init.c
View file @
b0efe28f
...
...
@@ -62,7 +62,6 @@ static const DC_FUNCTIONS EMFDRV_Funcs =
EMFDRV_IntersectClipRect
,
/* pIntersectClipRect */
EMFDRV_InvertRgn
,
/* pInvertRgn */
EMFDRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
EMFDRV_MoveToEx
,
/* pMoveToEx */
EMFDRV_OffsetClipRgn
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg */
...
...
graphics/metafiledrv/init.c
View file @
b0efe28f
...
...
@@ -61,7 +61,6 @@ static const DC_FUNCTIONS MFDRV_Funcs =
MFDRV_IntersectClipRect
,
/* pIntersectClipRect */
MFDRV_InvertRgn
,
/* pInvertRgn */
MFDRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
MFDRV_MoveToEx
,
/* pMoveToEx */
MFDRV_OffsetClipRgn
,
/* pOffsetClipRgn */
MFDRV_OffsetViewportOrg
,
/* pOffsetViewportOrg */
...
...
graphics/ttydrv/init.c
View file @
b0efe28f
...
...
@@ -59,7 +59,6 @@ static const DC_FUNCTIONS TTYDRV_DC_Driver =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pIntersectVisRect */
TTYDRV_DC_LineTo
,
/* pLineTo */
TTYDRV_DC_LoadOEMResource
,
/* pLoadOEMResource */
NULL
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg (optional) */
...
...
graphics/ttydrv/oembitmap.c
View file @
b0efe28f
...
...
@@ -11,9 +11,9 @@
DEFAULT_DEBUG_CHANNEL
(
ttydrv
)
/**********************************************************************
* TTYDRV_
DC_
LoadOEMBitmap
* TTYDRV_LoadOEMBitmap
*/
static
HANDLE
TTYDRV_
DC_
LoadOEMBitmap
(
WORD
resid
)
static
HANDLE
TTYDRV_LoadOEMBitmap
(
WORD
resid
)
{
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
;
}
/**********************************************************************
* TTYDRV_
DC_
LoadOEMResource
* TTYDRV_LoadOEMResource
*/
HANDLE
TTYDRV_
DC_
LoadOEMResource
(
WORD
resid
,
WORD
type
)
HANDLE
TTYDRV_LoadOEMResource
(
WORD
resid
,
WORD
type
)
{
switch
(
type
)
{
case
OEM_BITMAP
:
return
TTYDRV_
DC_
LoadOEMBitmap
(
resid
);
return
TTYDRV_LoadOEMBitmap
(
resid
);
case
OEM_CURSOR
:
return
TTYDRV_
DC_
LoadOEMCursorIcon
(
resid
,
TRUE
);
return
TTYDRV_LoadOEMCursorIcon
(
resid
,
TRUE
);
case
OEM_ICON
:
return
TTYDRV_
DC_
LoadOEMCursorIcon
(
resid
,
FALSE
);
return
TTYDRV_LoadOEMCursorIcon
(
resid
,
FALSE
);
default
:
ERR
(
"unknown type (%d)
\n
"
,
type
);
}
return
(
HANDLE
)
NULL
;
}
graphics/win16drv/init.c
View file @
b0efe28f
...
...
@@ -87,7 +87,6 @@ static const DC_FUNCTIONS WIN16DRV_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
WIN16DRV_LineTo
,
/* pLineTo */
NULL
,
/* pLoadOEMResource */
WIN16DRV_MoveToEx
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrgEx */
...
...
graphics/x11drv/init.c
View file @
b0efe28f
...
...
@@ -71,7 +71,6 @@ const DC_FUNCTIONS X11DRV_DC_Funcs =
NULL
,
/* pIntersectClipRect */
NULL
,
/* pInvertRgn */
X11DRV_LineTo
,
/* pLineTo */
X11DRV_LoadOEMResource
,
/* pLoadOEMResource */
NULL
,
/* pMoveToEx */
NULL
,
/* pOffsetClipRgn */
NULL
,
/* pOffsetViewportOrg (optional) */
...
...
include/gdi.h
View file @
b0efe28f
...
...
@@ -214,7 +214,6 @@ typedef struct tagDC_FUNCS
INT
(
*
pIntersectClipRect
)(
DC
*
,
INT
,
INT
,
INT
,
INT
);
BOOL
(
*
pInvertRgn
)(
DC
*
,
HRGN
);
BOOL
(
*
pLineTo
)(
DC
*
,
INT
,
INT
);
HANDLE
(
*
pLoadOEMResource
)(
WORD
,
WORD
);
BOOL
(
*
pMoveToEx
)(
DC
*
,
INT
,
INT
,
LPPOINT
);
INT
(
*
pOffsetClipRgn
)(
DC
*
,
INT
,
INT
);
BOOL
(
*
pOffsetViewportOrg
)(
DC
*
,
INT
,
INT
);
...
...
include/ttydrv.h
View file @
b0efe28f
...
...
@@ -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_GetTextMetrics
(
struct
tagDC
*
dc
,
TEXTMETRICA
*
metrics
);
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_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
);
...
...
@@ -184,6 +183,8 @@ typedef struct tagTTYDRV_WND_DATA {
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_Finalize
(
struct
tagWND
*
wndPtr
);
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_PreSizeMove
(
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_SetDrawable
(
struct
tagWND
*
wndPtr
,
struct
tagDC
*
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
);
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
,
HDC
h
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
);
extern
BOOL
TTYDRV_WND_SetHostAttr
(
struct
tagWND
*
wndPtr
,
INT
haKey
,
INT
value
);
extern
BOOL
TTYDRV_WND_IsSelfClipping
(
struct
tagWND
*
wndPtr
);
extern
void
TTYDRV_WND_SetWindowRgn
(
struct
tagWND
*
wndPtr
,
HRGN
hrgnWnd
);
...
...
include/user.h
View file @
b0efe28f
...
...
@@ -66,6 +66,8 @@ typedef struct tagUSER_DRIVER {
void
(
*
pSetScreenSaveActive
)(
BOOL
);
int
(
*
pGetScreenSaveTimeout
)(
void
);
void
(
*
pSetScreenSaveTimeout
)(
int
);
/* resource functions */
HANDLE
(
*
pLoadOEMResource
)(
WORD
,
WORD
);
/* windowing functions */
BOOL
(
*
pIsSingleWindow
)(
void
);
}
USER_DRIVER
;
...
...
include/win.h
View file @
b0efe28f
...
...
@@ -128,8 +128,8 @@ typedef struct tagWND_DRIVER
void
(
*
pSetFocus
)(
WND
*
);
void
(
*
pPreSizeMove
)(
WND
*
);
void
(
*
pPostSizeMove
)(
WND
*
);
void
(
*
pSurfaceCopy
)(
WND
*
,
struct
tagDC
*
,
INT
,
INT
,
const
RECT
*
,
BOOL
);
void
(
*
pSetDrawable
)(
WND
*
,
struct
tagDC
*
,
WORD
,
BOOL
);
void
(
*
pSurfaceCopy
)(
WND
*
,
HDC
,
INT
,
INT
,
const
RECT
*
,
BOOL
);
void
(
*
pSetDrawable
)(
WND
*
,
HDC
,
WORD
,
BOOL
);
BOOL
(
*
pSetHostAttr
)(
WND
*
,
INT
haKey
,
INT
value
);
BOOL
(
*
pIsSelfClipping
)(
WND
*
);
void
(
*
pSetWindowRgn
)(
WND
*
,
const
HRGN
);
...
...
include/x11drv.h
View file @
b0efe28f
...
...
@@ -156,7 +156,6 @@ extern INT X11DRV_DeviceBitmapBits( struct tagDC *dc, HBITMAP hbitmap,
WORD
fGet
,
UINT
startscan
,
UINT
lines
,
LPSTR
bits
,
LPBITMAPINFO
info
,
UINT
coloruse
);
extern
HANDLE
X11DRV_LoadOEMResource
(
WORD
id
,
WORD
type
);
/* OpenGL / X11 driver functions */
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
int
X11DRV_GetScreenSaveTimeout
(
void
);
extern
void
X11DRV_SetScreenSaveTimeout
(
int
nTimeout
);
extern
HANDLE
X11DRV_LoadOEMResource
(
WORD
id
,
WORD
type
);
extern
BOOL
X11DRV_IsSingleWindow
(
void
);
/* 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_PreSizeMove
(
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_SetDrawable
(
struct
tagWND
*
wndPtr
,
struct
tagDC
*
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
);
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
,
HDC
h
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
);
extern
BOOL
X11DRV_WND_SetHostAttr
(
struct
tagWND
*
wndPtr
,
INT
haKey
,
INT
value
);
extern
BOOL
X11DRV_WND_IsSelfClipping
(
struct
tagWND
*
wndPtr
);
extern
void
X11DRV_WND_DockWindow
(
struct
tagWND
*
wndPtr
);
...
...
objects/metafile.c
View file @
b0efe28f
...
...
@@ -988,7 +988,7 @@ void WINAPI PlayMetaFileRecord16(
break
;
case
META_SELECTPALETTE
:
SelectPalette
16
(
hdc
,
*
(
ht
->
objectHandle
+
*
(
mr
->
rdParm
+
1
)),
SelectPalette
(
hdc
,
*
(
ht
->
objectHandle
+
*
(
mr
->
rdParm
+
1
)),
*
(
mr
->
rdParm
));
break
;
...
...
@@ -997,7 +997,7 @@ void WINAPI PlayMetaFileRecord16(
break
;
case
META_REALIZEPALETTE
:
RealizePalette
16
(
hdc
);
RealizePalette
(
hdc
);
break
;
case
META_ESCAPE
:
...
...
windows/caret.c
View file @
b0efe28f
...
...
@@ -152,8 +152,8 @@ BOOL WINAPI CreateCaret( HWND hwnd, HBITMAP bitmap,
if
(
bitmap
&&
(
bitmap
!=
1
))
{
BITMAP
16
bmp
;
if
(
!
GetObject
16
(
bitmap
,
sizeof
(
bmp
),
&
bmp
))
return
FALSE
;
BITMAP
bmp
;
if
(
!
GetObject
A
(
bitmap
,
sizeof
(
bmp
),
&
bmp
))
return
FALSE
;
Caret
.
width
=
bmp
.
bmWidth
;
Caret
.
height
=
bmp
.
bmHeight
;
/* FIXME: we should make a copy of the bitmap instead of a brush */
...
...
windows/clipboard.c
View file @
b0efe28f
...
...
@@ -189,7 +189,7 @@ void CLIPBOARD_DeleteRecord(LPWINE_CLIPFORMAT lpFormat, BOOL bChange)
if
(
lpFormat
->
hData32
)
DeleteObject
(
lpFormat
->
hData32
);
if
(
lpFormat
->
hData16
)
DeleteObject
16
(
lpFormat
->
hData16
);
DeleteObject
(
lpFormat
->
hData16
);
}
else
if
(
lpFormat
->
wFormatID
==
CF_METAFILEPICT
)
{
...
...
windows/cursoricon.c
View file @
b0efe28f
...
...
@@ -40,8 +40,6 @@
#include "color.h"
#include "bitmap.h"
#include "cursoricon.h"
#include "dc.h"
#include "gdi.h"
#include "global.h"
#include "module.h"
#include "debugtools.h"
...
...
@@ -429,7 +427,7 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
{
int
sizeAnd
,
sizeXor
;
HBITMAP
hAndBits
=
0
,
hXorBits
=
0
;
/* error condition for later */
BITMAP
OBJ
*
bmpXor
,
*
bmpAnd
;
BITMAP
bmpXor
,
bmpAnd
;
POINT16
hotspot
;
BITMAPINFO
*
bmi
;
HDC
hdc
;
...
...
@@ -583,10 +581,10 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
}
/* Now create the CURSORICONINFO structure */
bmpXor
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hXorBits
,
BITMAP_MAGIC
);
bmpAnd
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
hAndBits
,
BITMAP_MAGIC
);
sizeXor
=
bmpXor
->
bitmap
.
bmHeight
*
bmpXor
->
bitmap
.
bmWidthBytes
;
sizeAnd
=
bmpAnd
->
bitmap
.
bmHeight
*
bmpAnd
->
bitmap
.
bmWidthBytes
;
GetObjectA
(
hXorBits
,
sizeof
(
bmpXor
),
&
bmpXor
);
GetObjectA
(
hAndBits
,
sizeof
(
bmpAnd
),
&
bmpAnd
);
sizeXor
=
bmpXor
.
bmHeight
*
bmpXor
.
bmWidthBytes
;
sizeAnd
=
bmpAnd
.
bmHeight
*
bmpAnd
.
bmWidthBytes
;
if
(
hObj
)
hObj
=
GlobalReAlloc16
(
hObj
,
sizeof
(
CURSORICONINFO
)
+
sizeXor
+
sizeAnd
,
GMEM_MOVEABLE
);
...
...
@@ -602,11 +600,11 @@ static HGLOBAL16 CURSORICON_CreateFromResource( HINSTANCE16 hInstance, HGLOBAL16
info
=
(
CURSORICONINFO
*
)
GlobalLock16
(
hObj
);
info
->
ptHotSpot
.
x
=
hotspot
.
x
;
info
->
ptHotSpot
.
y
=
hotspot
.
y
;
info
->
nWidth
=
bmpXor
->
bitmap
.
bmWidth
;
info
->
nHeight
=
bmpXor
->
bitmap
.
bmHeight
;
info
->
nWidthBytes
=
bmpXor
->
bitmap
.
bmWidthBytes
;
info
->
bPlanes
=
bmpXor
->
bitmap
.
bmPlanes
;
info
->
bBitsPerPixel
=
bmpXor
->
bitmap
.
bmBitsPixel
;
info
->
nWidth
=
bmpXor
.
bmWidth
;
info
->
nHeight
=
bmpXor
.
bmHeight
;
info
->
nWidthBytes
=
bmpXor
.
bmWidthBytes
;
info
->
bPlanes
=
bmpXor
.
bmPlanes
;
info
->
bBitsPerPixel
=
bmpXor
.
bmBitsPixel
;
/* 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 */
{
WORD
resid
;
HDC
hdc
;
if
(
HIWORD
(
name
)
)
{
...
...
@@ -710,14 +707,7 @@ HGLOBAL CURSORICON_Load( HINSTANCE hInstance, LPCWSTR name,
}
}
else
resid
=
LOWORD
(
name
);
hdc
=
CreateDCA
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
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
);
}
h
=
USER_Driver
->
pLoadOEMResource
(
resid
,
fCursor
?
OEM_CURSOR
:
OEM_ICON
);
}
else
/* Load from resource */
...
...
@@ -1819,16 +1809,17 @@ BOOL WINAPI GetIconInfo(HICON hIcon,LPICONINFO iconinfo) {
/**********************************************************************
* CreateIconIndirect (USER32.78)
*/
HICON
WINAPI
CreateIconIndirect
(
LPICONINFO
iconinfo
)
{
BITMAPOBJ
*
bmpXor
,
*
bmpAnd
;
HICON
WINAPI
CreateIconIndirect
(
LPICONINFO
iconinfo
)
{
BITMAP
bmpXor
,
bmpAnd
;
HICON
hObj
;
int
sizeXor
,
sizeAnd
;
bmpXor
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
iconinfo
->
hbmColor
,
BITMAP_MAGIC
);
bmpAnd
=
(
BITMAPOBJ
*
)
GDI_GetObjPtr
(
iconinfo
->
hbmMask
,
BITMAP_MAGIC
);
GetObjectA
(
iconinfo
->
hbmColor
,
sizeof
(
bmpXor
),
&
bmpXor
);
GetObjectA
(
iconinfo
->
hbmMask
,
sizeof
(
bmpAnd
),
&
bmpAnd
);
sizeXor
=
bmpXor
->
bitmap
.
bmHeight
*
bmpXor
->
bitmap
.
bmWidthBytes
;
sizeAnd
=
bmpAnd
->
bitmap
.
bmHeight
*
bmpAnd
->
bitmap
.
bmWidthBytes
;
sizeXor
=
bmpXor
.
bmHeight
*
bmpXor
.
bmWidthBytes
;
sizeAnd
=
bmpAnd
.
bmHeight
*
bmpAnd
.
bmWidthBytes
;
hObj
=
GlobalAlloc16
(
GMEM_MOVEABLE
,
sizeof
(
CURSORICONINFO
)
+
sizeXor
+
sizeAnd
);
...
...
@@ -1850,11 +1841,11 @@ HICON WINAPI CreateIconIndirect(LPICONINFO iconinfo) {
info
->
ptHotSpot
.
y
=
iconinfo
->
yHotspot
;
}
info
->
nWidth
=
bmpXor
->
bitmap
.
bmWidth
;
info
->
nHeight
=
bmpXor
->
bitmap
.
bmHeight
;
info
->
nWidthBytes
=
bmpXor
->
bitmap
.
bmWidthBytes
;
info
->
bPlanes
=
bmpXor
->
bitmap
.
bmPlanes
;
info
->
bBitsPerPixel
=
bmpXor
->
bitmap
.
bmBitsPixel
;
info
->
nWidth
=
bmpXor
.
bmWidth
;
info
->
nHeight
=
bmpXor
.
bmHeight
;
info
->
nWidthBytes
=
bmpXor
.
bmWidthBytes
;
info
->
bPlanes
=
bmpXor
.
bmPlanes
;
info
->
bBitsPerPixel
=
bmpXor
.
bmBitsPixel
;
/* 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
(
!
instance
)
/* OEM bitmap */
{
HDC
hdc
;
DC
*
dc
;
if
(
HIWORD
((
int
)
name
))
return
0
;
hdc
=
CreateDCA
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
);
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
;
return
USER_Driver
->
pLoadOEMResource
(
LOWORD
((
int
)
name
),
OEM_BITMAP
);
}
if
(
!
(
hRsrc
=
FindResourceW
(
instance
,
name
,
RT_BITMAPW
)))
return
0
;
...
...
windows/dce.c
View file @
b0efe28f
...
...
@@ -80,7 +80,7 @@ DCE *DCE_AllocDCE( HWND hWnd, DCE_TYPE type )
WND
*
wnd
;
if
(
!
(
dce
=
HeapAlloc
(
SystemHeap
,
0
,
sizeof
(
DCE
)
)))
return
NULL
;
if
(
!
(
dce
->
hDC
=
CreateDC
16
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
)))
if
(
!
(
dce
->
hDC
=
CreateDC
A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
)))
{
HeapFree
(
SystemHeap
,
0
,
dce
);
return
0
;
...
...
@@ -806,7 +806,7 @@ HDC WINAPI GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
bUpdateVisRgn
=
bUpdateVisRgn
||
(
dc
->
w
.
flags
&
DC_DIRTY
);
/* recompute visible region */
wndPtr
->
pDriver
->
pSetDrawable
(
wndPtr
,
dc
,
flags
,
bUpdateClipOrigin
);
wndPtr
->
pDriver
->
pSetDrawable
(
wndPtr
,
h
dc
,
flags
,
bUpdateClipOrigin
);
if
(
bUpdateVisRgn
)
{
...
...
@@ -975,7 +975,6 @@ BOOL16 WINAPI DCHook16( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
BOOL
retv
=
TRUE
;
HRGN
hVisRgn
;
DCE
*
dce
=
(
DCE
*
)
data
;
DC
*
dc
;
WND
*
wndPtr
;
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 */
wndPtr
=
WIN_FindWndPtr
(
dce
->
hwndCurrent
);
dc
=
(
DC
*
)
GDI_GetObjPtr
(
dce
->
hDC
,
DC_MAGIC
);
if
(
dc
&&
wndPtr
)
wndPtr
->
pDriver
->
pSetDrawable
(
wndPtr
,
dc
,
dce
->
DCXflags
,
TRUE
);
if
(
wndPtr
)
wndPtr
->
pDriver
->
pSetDrawable
(
wndPtr
,
hDC
,
dce
->
DCXflags
,
TRUE
);
SetHookFlags16
(
hDC
,
DCHF_VALIDATEVISRGN
);
hVisRgn
=
DCE_GetVisRgn
(
dce
->
hwndCurrent
,
dce
->
DCXflags
,
0
,
0
);
...
...
windows/dialog.c
View file @
b0efe28f
...
...
@@ -161,12 +161,12 @@ static BOOL DIALOG_GetCharSize( HFONT hFont, SIZE * pSize )
*/
BOOL
DIALOG_Init
(
void
)
{
HDC
16
hdc
;
HDC
hdc
;
SIZE
size
;
/* Calculate the dialog base units */
if
(
!
(
hdc
=
CreateDC
16
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
)))
return
FALSE
;
if
(
!
(
hdc
=
CreateDC
A
(
"DISPLAY"
,
NULL
,
NULL
,
NULL
)))
return
FALSE
;
if
(
!
DIALOG_GetCharSizeFromDC
(
hdc
,
0
,
&
size
))
return
FALSE
;
DeleteDC
(
hdc
);
xBaseUnit
=
size
.
cx
;
...
...
@@ -681,11 +681,11 @@ HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCSTR dlgTemplate,
PROOF_QUALITY
,
FF_DONTCARE
,
(
LPCWSTR
)
template
.
faceName
);
else
hFont
=
CreateFont
16
(
-
pixels
,
0
,
0
,
0
,
FW_DONTCARE
,
FALSE
,
FALSE
,
FALSE
,
DEFAULT_CHARSET
,
0
,
0
,
PROOF_QUALITY
,
FF_DONTCARE
,
template
.
faceName
);
hFont
=
CreateFont
A
(
-
pixels
,
0
,
0
,
0
,
FW_DONTCARE
,
FALSE
,
FALSE
,
FALSE
,
DEFAULT_CHARSET
,
0
,
0
,
PROOF_QUALITY
,
FF_DONTCARE
,
template
.
faceName
);
if
(
hFont
)
{
SIZE
charSize
;
...
...
windows/nonclient.c
View file @
b0efe28f
...
...
@@ -1489,14 +1489,14 @@ static void NC_DrawCaption( HDC hdc, RECT *rect, HWND hwnd,
SelectObject
(
hdc
,
hbrushOld
);
}
WIN_ReleaseWndPtr
(
wndPtr
);
MoveTo
16
(
hdc
,
r
.
left
,
r
.
bottom
);
MoveTo
Ex
(
hdc
,
r
.
left
,
r
.
bottom
,
NULL
);
LineTo
(
hdc
,
r
.
right
,
r
.
bottom
);
if
(
style
&
WS_SYSMENU
)
{
NC_DrawSysButton
(
hwnd
,
hdc
,
FALSE
);
r
.
left
+=
GetSystemMetrics
(
SM_CXSIZE
)
+
1
;
MoveTo
16
(
hdc
,
r
.
left
-
1
,
r
.
top
);
MoveTo
Ex
(
hdc
,
r
.
left
-
1
,
r
.
top
,
NULL
);
LineTo
(
hdc
,
r
.
left
-
1
,
r
.
bottom
);
}
if
(
style
&
WS_MAXIMIZEBOX
)
...
...
windows/painting.c
View file @
b0efe28f
...
...
@@ -268,9 +268,29 @@ copyrgn:
*/
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
;
HRGN
hrgnUpdate
;
RECT
16
clipRect
,
clientRect
;
RECT
clipRect
,
clientRect
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
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 */
if
(
hrgnUpdate
)
DeleteObject
(
hrgnUpdate
);
lps
->
hdc
=
GetDCEx
16
(
hwnd
,
0
,
DCX_WINDOWPAINT
|
DCX_USESTYLE
|
lps
->
hdc
=
GetDCEx
(
hwnd
,
0
,
DCX_WINDOWPAINT
|
DCX_USESTYLE
|
(
bIcon
?
DCX_WINDOW
:
0
)
);
}
else
...
...
@@ -314,7 +334,7 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
if
(
hrgnUpdate
)
/* convert to client coordinates */
OffsetRgn
(
hrgnUpdate
,
wndPtr
->
rectWindow
.
left
-
wndPtr
->
rectClient
.
left
,
wndPtr
->
rectWindow
.
top
-
wndPtr
->
rectClient
.
top
);
lps
->
hdc
=
GetDCEx
16
(
hwnd
,
hrgnUpdate
,
DCX_INTERSECTRGN
|
lps
->
hdc
=
GetDCEx
(
hwnd
,
hrgnUpdate
,
DCX_INTERSECTRGN
|
DCX_WINDOWPAINT
|
DCX_USESTYLE
|
(
bIcon
?
DCX_WINDOW
:
0
)
);
/* 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
the window */
GetClipBox
16
(
lps
->
hdc
,
&
clipRect
);
GetClientRect
16
(
hwnd
,
&
clientRect
);
GetClipBox
(
lps
->
hdc
,
&
clipRect
);
GetClientRect
(
hwnd
,
&
clientRect
);
/* The rect obtained by GetClipBox is in logical, so make the client in logical to*/
DPtoLP
16
(
lps
->
hdc
,
(
LPPOINT16
)
&
clientRect
,
2
);
DPtoLP
(
lps
->
hdc
,
(
LPPOINT
)
&
clientRect
,
2
);
IntersectRect
16
(
&
lps
->
rcPaint
,
&
clientRect
,
&
clipRect
);
IntersectRect
(
&
lps
->
rcPaint
,
&
clientRect
,
&
clipRect
);
TRACE
(
"box = (%i,%i - %i,%i)
\n
"
,
lps
->
rcPaint
.
left
,
lps
->
rcPaint
.
top
,
lps
->
rcPaint
.
right
,
lps
->
rcPaint
.
bottom
);
...
...
@@ -347,9 +367,8 @@ HDC16 WINAPI BeginPaint16( HWND16 hwnd, LPPAINTSTRUCT16 lps )
if
(
wndPtr
->
flags
&
WIN_NEEDS_ERASEBKGND
)
{
wndPtr
->
flags
&=
~
WIN_NEEDS_ERASEBKGND
;
lps
->
fErase
=
!
SendMessage16
(
hwnd
,
(
bIcon
)
?
WM_ICONERASEBKGND
:
WM_ERASEBKGND
,
(
WPARAM16
)
lps
->
hdc
,
0
);
lps
->
fErase
=
!
SendMessageA
(
hwnd
,
(
bIcon
)
?
WM_ICONERASEBKGND
:
WM_ERASEBKGND
,
(
WPARAM16
)
lps
->
hdc
,
0
);
}
else
lps
->
fErase
=
TRUE
;
...
...
@@ -359,26 +378,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)
*/
BOOL16
WINAPI
EndPaint16
(
HWND16
hwnd
,
const
PAINTSTRUCT16
*
lps
)
...
...
@@ -405,10 +404,12 @@ BOOL WINAPI EndPaint( HWND hwnd, const PAINTSTRUCT *lps )
*/
void
WINAPI
FillWindow16
(
HWND16
hwndParent
,
HWND16
hwnd
,
HDC16
hdc
,
HBRUSH16
hbrush
)
{
RECT16
rect
;
GetClientRect16
(
hwnd
,
&
rect
);
DPtoLP16
(
hdc
,
(
LPPOINT16
)
&
rect
,
2
);
PaintRect16
(
hwndParent
,
hwnd
,
hdc
,
hbrush
,
&
rect
);
RECT
rect
;
RECT16
rc16
;
GetClientRect
(
hwnd
,
&
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
)
{
HBRUSH
16
prevBrush
;
HBRUSH
prevBrush
;
/* coordinates are logical so we cannot fast-check 'rect',
* it will be done later in the PatBlt().
*/
if
(
!
(
prevBrush
=
SelectObject
16
(
hdc
,
hbrush
)))
return
0
;
if
(
!
(
prevBrush
=
SelectObject
(
hdc
,
hbrush
)))
return
0
;
PatBlt
(
hdc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
SelectObject
16
(
hdc
,
prevBrush
);
SelectObject
(
hdc
,
prevBrush
);
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
);
}
windows/ttydrv/wnd.c
View file @
b0efe28f
...
...
@@ -192,20 +192,21 @@ void TTYDRV_WND_PostSizeMove(WND *wndPtr)
/*****************************************************************
* TTYDRV_WND_ScrollWindow
*/
void
TTYDRV_WND_ScrollWindow
(
WND
*
wndPtr
,
DC
*
dcPtr
,
INT
dx
,
INT
dy
,
const
RECT
*
clipRect
,
BOOL
bUpdate
)
void
TTYDRV_WND_ScrollWindow
(
WND
*
wndPtr
,
HDC
hdc
,
INT
dx
,
INT
dy
,
const
RECT
*
clipRect
,
BOOL
bUpdate
)
{
FIXME
(
"(%p, %
p
, %d, %d, %p, %d): stub
\n
"
,
wndPtr
,
dcPtr
,
dx
,
dy
,
clipRect
,
bUpdate
);
FIXME
(
"(%p, %
x
, %d, %d, %p, %d): stub
\n
"
,
wndPtr
,
hdc
,
dx
,
dy
,
clipRect
,
bUpdate
);
}
/***********************************************************************
* TTYDRV_WND_SetDrawable
*/
void
TTYDRV_WND_SetDrawable
(
WND
*
wndPtr
,
DC
*
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
)
void
TTYDRV_WND_SetDrawable
(
WND
*
wndPtr
,
HDC
h
dc
,
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 */
if
(
!
wndPtr
)
{
...
...
@@ -220,6 +221,7 @@ void TTYDRV_WND_SetDrawable(WND *wndPtr, DC *dc, WORD flags, BOOL bSetClipOrigin
dc
->
w
.
DCOrgY
=
wndPtr
->
rectClient
.
top
;
}
}
GDI_HEAP_UNLOCK
(
hdc
);
}
/***********************************************************************
...
...
windows/winpos.c
View file @
b0efe28f
...
...
@@ -2319,7 +2319,6 @@ nocopy:
{
RECT
rClip
;
HDC
hDC
;
DC
*
dc
;
/* get DC and clip rect with drawable rect to avoid superfluous expose events
from copying clipped areas */
...
...
@@ -2339,14 +2338,12 @@ nocopy:
}
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
)
)
{
Wnd
->
pDriver
->
pSurfaceCopy
(
Wnd
->
parent
,
dc
,
dx
,
dy
,
&
r
,
TRUE
);
if
(
IntersectRect
(
&
r
,
&
r
,
&
rClip
)
)
{
Wnd
->
pDriver
->
pSurfaceCopy
(
Wnd
->
parent
,
hDC
,
dx
,
dy
,
&
r
,
TRUE
);
/* When you copy the bits without repainting, parent doesn't
get validated appropriately. Therefore, we have to validate
...
...
@@ -2358,9 +2355,6 @@ nocopy:
OffsetRect
(
&
r
,
dx
,
dy
);
ValidateRect
(
Wnd
->
parent
->
hwndSelf
,
&
r
);
}
}
GDI_HEAP_UNLOCK
(
hDC
);
}
ReleaseDC
(
(
uFlags
&
SWP_EX_PAINTSELF
)
?
Wnd
->
hwndSelf
:
Wnd
->
parent
->
hwndSelf
,
hDC
);
...
...
windows/x11drv/wnd.c
View file @
b0efe28f
...
...
@@ -21,6 +21,7 @@
#include "color.h"
#include "debugtools.h"
#include "dce.h"
#include "dc.h"
#include "options.h"
#include "message.h"
#include "heap.h"
...
...
@@ -755,12 +756,15 @@ void X11DRV_WND_PostSizeMove(WND *wndPtr)
*
* 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
)
{
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dcPtr
->
physDev
;
X11DRV_PDEVICE
*
physDev
;
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
.
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 */
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
* a given window.
*/
void
X11DRV_WND_SetDrawable
(
WND
*
wndPtr
,
DC
*
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
)
void
X11DRV_WND_SetDrawable
(
WND
*
wndPtr
,
HDC
h
dc
,
WORD
flags
,
BOOL
bSetClipOrigin
)
{
X11DRV_PDEVICE
*
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
DC
*
dc
=
DC_GetDCPtr
(
hdc
);
X11DRV_PDEVICE
*
physDev
;
INT
dcOrgXCopy
=
0
,
dcOrgYCopy
=
0
;
BOOL
offsetClipRgn
=
FALSE
;
if
(
!
dc
)
return
;
physDev
=
(
X11DRV_PDEVICE
*
)
dc
->
physDev
;
if
(
!
wndPtr
)
/* Get a DC for the whole screen */
{
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 );
#endif
}
GDI_HEAP_UNLOCK
(
hdc
);
}
/***********************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment