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
3411821f
Commit
3411821f
authored
Sep 26, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Get rid of the 16-bit DC hook support.
It can only work with native user32 anyway.
parent
6ad95180
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
68 deletions
+27
-68
dc.c
dlls/gdi32/dc.c
+6
-66
gdi16.c
dlls/gdi32/gdi16.c
+20
-0
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-2
No files found.
dlls/gdi32/dc.c
View file @
3411821f
...
@@ -87,7 +87,6 @@ DC *alloc_dc_ptr( const DC_FUNCTIONS *funcs, WORD magic )
...
@@ -87,7 +87,6 @@ DC *alloc_dc_ptr( const DC_FUNCTIONS *funcs, WORD magic )
dc
->
saved_dc
=
0
;
dc
->
saved_dc
=
0
;
dc
->
dwHookData
=
0
;
dc
->
dwHookData
=
0
;
dc
->
hookProc
=
NULL
;
dc
->
hookProc
=
NULL
;
dc
->
hookThunk
=
NULL
;
dc
->
wndOrgX
=
0
;
dc
->
wndOrgX
=
0
;
dc
->
wndOrgY
=
0
;
dc
->
wndOrgY
=
0
;
dc
->
wndExtX
=
1
;
dc
->
wndExtX
=
1
;
...
@@ -224,8 +223,8 @@ void release_dc_ptr( DC *dc )
...
@@ -224,8 +223,8 @@ void release_dc_ptr( DC *dc )
*/
*/
void
update_dc
(
DC
*
dc
)
void
update_dc
(
DC
*
dc
)
{
{
if
(
InterlockedExchange
(
&
dc
->
dirty
,
0
)
&&
dc
->
hook
Thunk
)
if
(
InterlockedExchange
(
&
dc
->
dirty
,
0
)
&&
dc
->
hook
Proc
)
dc
->
hook
Thunk
(
dc
->
hSelf
,
DCHC_INVALIDVISRGN
,
dc
->
dwHookData
,
0
);
dc
->
hook
Proc
(
dc
->
hSelf
,
DCHC_INVALIDVISRGN
,
dc
->
dwHookData
,
0
);
}
}
...
@@ -403,8 +402,7 @@ INT save_dc_state( HDC hdc )
...
@@ -403,8 +402,7 @@ INT save_dc_state( HDC hdc )
PATH_InitGdiPath
(
&
newdc
->
path
);
PATH_InitGdiPath
(
&
newdc
->
path
);
newdc
->
pAbortProc
=
NULL
;
newdc
->
pAbortProc
=
NULL
;
newdc
->
hookThunk
=
NULL
;
newdc
->
hookProc
=
NULL
;
newdc
->
hookProc
=
0
;
newdc
->
saved_visrgn
=
NULL
;
newdc
->
saved_visrgn
=
NULL
;
if
(
!
(
newdc
->
hSelf
=
alloc_gdi_handle
(
&
newdc
->
header
,
dc
->
header
.
type
,
&
dc_funcs
)))
if
(
!
(
newdc
->
hSelf
=
alloc_gdi_handle
(
&
newdc
->
header
,
dc
->
header
.
type
,
&
dc_funcs
)))
...
@@ -820,7 +818,7 @@ BOOL WINAPI DeleteDC( HDC hdc )
...
@@ -820,7 +818,7 @@ BOOL WINAPI DeleteDC( HDC hdc )
}
}
/* Call hook procedure to check whether is it OK to delete this DC */
/* Call hook procedure to check whether is it OK to delete this DC */
if
(
dc
->
hook
Thunk
&&
!
dc
->
hookThunk
(
hdc
,
DCHC_DELETEDC
,
dc
->
dwHookData
,
0
))
if
(
dc
->
hook
Proc
&&
!
dc
->
hookProc
(
hdc
,
DCHC_DELETEDC
,
dc
->
dwHookData
,
0
))
{
{
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
return
FALSE
;
return
FALSE
;
...
@@ -1389,7 +1387,7 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
...
@@ -1389,7 +1387,7 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
if
(
!
(
dc
->
flags
&
DC_SAVED
))
if
(
!
(
dc
->
flags
&
DC_SAVED
))
{
{
dc
->
dwHookData
=
dwHookData
;
dc
->
dwHookData
=
dwHookData
;
dc
->
hook
Thunk
=
hookProc
;
dc
->
hook
Proc
=
hookProc
;
}
}
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
return
TRUE
;
return
TRUE
;
...
@@ -1407,65 +1405,7 @@ DWORD_PTR WINAPI GetDCHook( HDC hdc, DCHOOKPROC *proc )
...
@@ -1407,65 +1405,7 @@ DWORD_PTR WINAPI GetDCHook( HDC hdc, DCHOOKPROC *proc )
DWORD_PTR
ret
;
DWORD_PTR
ret
;
if
(
!
dc
)
return
0
;
if
(
!
dc
)
return
0
;
if
(
proc
)
*
proc
=
dc
->
hookThunk
;
if
(
proc
)
*
proc
=
dc
->
hookProc
;
ret
=
dc
->
dwHookData
;
release_dc_ptr
(
dc
);
return
ret
;
}
/* relay function to call the 16-bit DC hook proc */
static
BOOL
WINAPI
call_dc_hook16
(
HDC
hdc
,
WORD
code
,
DWORD_PTR
data
,
LPARAM
lParam
)
{
WORD
args
[
6
];
DWORD
ret
=
0
;
DC
*
dc
=
get_dc_ptr
(
hdc
);
if
(
!
dc
)
return
FALSE
;
if
(
dc
->
hookProc
)
{
args
[
5
]
=
HDC_16
(
hdc
);
args
[
4
]
=
code
;
args
[
3
]
=
HIWORD
(
data
);
args
[
2
]
=
LOWORD
(
data
);
args
[
1
]
=
HIWORD
(
lParam
);
args
[
0
]
=
LOWORD
(
lParam
);
WOWCallback16Ex
(
(
DWORD
)
dc
->
hookProc
,
WCB16_PASCAL
,
sizeof
(
args
),
args
,
&
ret
);
}
release_dc_ptr
(
dc
);
return
LOWORD
(
ret
);
}
/***********************************************************************
* SetDCHook (GDI.190)
*/
BOOL16
WINAPI
SetDCHook16
(
HDC16
hdc16
,
FARPROC16
hookProc
,
DWORD
dwHookData
)
{
DC
*
dc
=
get_dc_ptr
(
HDC_32
(
hdc16
)
);
if
(
!
dc
)
return
FALSE
;
if
(
!
(
dc
->
flags
&
DC_SAVED
))
{
dc
->
dwHookData
=
dwHookData
;
dc
->
hookThunk
=
call_dc_hook16
;
dc
->
hookProc
=
hookProc
;
}
release_dc_ptr
(
dc
);
return
TRUE
;
}
/***********************************************************************
* GetDCHook (GDI.191)
*/
DWORD
WINAPI
GetDCHook16
(
HDC16
hdc16
,
FARPROC16
*
phookProc
)
{
HDC
hdc
=
HDC_32
(
hdc16
);
DC
*
dc
=
get_dc_ptr
(
hdc
);
DWORD
ret
;
if
(
!
dc
)
return
0
;
*
phookProc
=
dc
->
hookProc
;
ret
=
dc
->
dwHookData
;
ret
=
dc
->
dwHookData
;
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
return
ret
;
return
ret
;
...
...
dlls/gdi32/gdi16.c
View file @
3411821f
...
@@ -1769,6 +1769,26 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
...
@@ -1769,6 +1769,26 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
/***********************************************************************
/***********************************************************************
* SetDCHook (GDI.190)
*/
BOOL16
WINAPI
SetDCHook16
(
HDC16
hdc16
,
FARPROC16
hookProc
,
DWORD
dwHookData
)
{
FIXME
(
"%04x %p %x: not supported
\n
"
,
hdc16
,
hookProc
,
dwHookData
);
return
FALSE
;
}
/***********************************************************************
* GetDCHook (GDI.191)
*/
DWORD
WINAPI
GetDCHook16
(
HDC16
hdc16
,
FARPROC16
*
phookProc
)
{
FIXME
(
"%04x: not supported
\n
"
,
hdc16
);
return
0
;
}
/***********************************************************************
* SetHookFlags (GDI.192)
* SetHookFlags (GDI.192)
*/
*/
WORD
WINAPI
SetHookFlags16
(
HDC16
hdc
,
WORD
flags
)
WORD
WINAPI
SetHookFlags16
(
HDC16
hdc
,
WORD
flags
)
...
...
dlls/gdi32/gdi_private.h
View file @
3411821f
...
@@ -252,8 +252,7 @@ typedef struct tagDC
...
@@ -252,8 +252,7 @@ typedef struct tagDC
INT
saveLevel
;
INT
saveLevel
;
HDC
saved_dc
;
HDC
saved_dc
;
DWORD_PTR
dwHookData
;
DWORD_PTR
dwHookData
;
FARPROC16
hookProc
;
/* the original SEGPTR ... */
DCHOOKPROC
hookProc
;
/* DC hook */
DCHOOKPROC
hookThunk
;
/* ... and the thunk to call it */
INT
wndOrgX
;
/* Window origin */
INT
wndOrgX
;
/* Window origin */
INT
wndOrgY
;
INT
wndOrgY
;
...
...
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