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
50dea381
Commit
50dea381
authored
Feb 17, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Export the DC hook functions as 32-bit functions.
parent
54390995
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
71 additions
and
29 deletions
+71
-29
clipping.c
dlls/gdi32/clipping.c
+6
-5
dc.c
dlls/gdi32/dc.c
+22
-3
gdi16.c
dlls/gdi32/gdi16.c
+18
-0
gdi32.spec
dlls/gdi32/gdi32.spec
+3
-2
init.c
dlls/wineps.drv/init.c
+1
-2
dce.c
dlls/winex11.drv/dce.c
+5
-8
wingdi16.h
include/wine/wingdi16.h
+0
-9
wingdi.h
include/wingdi.h
+16
-0
No files found.
dlls/gdi32/clipping.c
View file @
50dea381
...
@@ -163,22 +163,23 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
...
@@ -163,22 +163,23 @@ INT WINAPI ExtSelectClipRgn( HDC hdc, HRGN hrgn, INT fnMode )
}
}
/***********************************************************************
/***********************************************************************
* SelectVisRgn (GDI.105)
* SelectVisRgn (GDI32.@)
*
* Note: not exported on Windows, only the 16-bit version is exported.
*/
*/
INT
16
WINAPI
SelectVisRgn16
(
HDC16
hdc16
,
HRGN16
hrgn
)
INT
WINAPI
SelectVisRgn
(
HDC
hdc
,
HRGN
hrgn
)
{
{
int
retval
;
int
retval
;
HDC
hdc
=
HDC_32
(
hdc16
);
DC
*
dc
;
DC
*
dc
;
if
(
!
hrgn
)
return
ERROR
;
if
(
!
hrgn
)
return
ERROR
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
ERROR
;
if
(
!
(
dc
=
get_dc_ptr
(
hdc
)))
return
ERROR
;
TRACE
(
"%p %
04x
\n
"
,
hdc
,
hrgn
);
TRACE
(
"%p %
p
\n
"
,
hdc
,
hrgn
);
dc
->
dirty
=
0
;
dc
->
dirty
=
0
;
retval
=
CombineRgn
(
dc
->
hVisRgn
,
HRGN_32
(
hrgn
)
,
0
,
RGN_COPY
);
retval
=
CombineRgn
(
dc
->
hVisRgn
,
hrgn
,
0
,
RGN_COPY
);
CLIPPING_UpdateGCRegion
(
dc
);
CLIPPING_UpdateGCRegion
(
dc
);
release_dc_ptr
(
dc
);
release_dc_ptr
(
dc
);
return
retval
;
return
retval
;
...
...
dlls/gdi32/dc.c
View file @
50dea381
...
@@ -1395,6 +1395,24 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
...
@@ -1395,6 +1395,24 @@ BOOL WINAPI SetDCHook( HDC hdc, DCHOOKPROC hookProc, DWORD_PTR dwHookData )
}
}
/***********************************************************************
* GetDCHook (GDI32.@)
*
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
*/
DWORD_PTR
WINAPI
GetDCHook
(
HDC
hdc
,
DCHOOKPROC
*
proc
)
{
DC
*
dc
=
get_dc_ptr
(
hdc
);
DWORD_PTR
ret
;
if
(
!
dc
)
return
0
;
if
(
proc
)
*
proc
=
dc
->
hookThunk
;
ret
=
dc
->
dwHookData
;
release_dc_ptr
(
dc
);
return
ret
;
}
/* relay function to call the 16-bit DC hook proc */
/* 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
)
static
BOOL
WINAPI
call_dc_hook16
(
HDC
hdc
,
WORD
code
,
DWORD_PTR
data
,
LPARAM
lParam
)
{
{
...
@@ -1454,11 +1472,12 @@ DWORD WINAPI GetDCHook16( HDC16 hdc16, FARPROC16 *phookProc )
...
@@ -1454,11 +1472,12 @@ DWORD WINAPI GetDCHook16( HDC16 hdc16, FARPROC16 *phookProc )
/***********************************************************************
/***********************************************************************
* SetHookFlags (GDI.192)
* SetHookFlags (GDI32.@)
*
* Note: this doesn't exist in Win32, we add it here because user32 needs it.
*/
*/
WORD
WINAPI
SetHookFlags
16
(
HDC16
hdc16
,
WORD
flags
)
WORD
WINAPI
SetHookFlags
(
HDC
hdc
,
WORD
flags
)
{
{
HDC
hdc
=
HDC_32
(
hdc16
);
DC
*
dc
=
get_dc_obj
(
hdc
);
/* not get_dc_ptr, this needs to work from any thread */
DC
*
dc
=
get_dc_obj
(
hdc
);
/* not get_dc_ptr, this needs to work from any thread */
LONG
ret
=
0
;
LONG
ret
=
0
;
...
...
dlls/gdi32/gdi16.c
View file @
50dea381
...
@@ -1347,6 +1347,15 @@ BOOL16 WINAPI PtVisible16( HDC16 hdc, INT16 x, INT16 y )
...
@@ -1347,6 +1347,15 @@ BOOL16 WINAPI PtVisible16( HDC16 hdc, INT16 x, INT16 y )
/***********************************************************************
/***********************************************************************
* SelectVisRgn (GDI.105)
*/
INT16
WINAPI
SelectVisRgn16
(
HDC16
hdc
,
HRGN16
hrgn
)
{
return
SelectVisRgn
(
HDC_32
(
hdc
),
HRGN_32
(
hrgn
)
);
}
/***********************************************************************
* SetBitmapBits (GDI.106)
* SetBitmapBits (GDI.106)
*/
*/
LONG
WINAPI
SetBitmapBits16
(
HBITMAP16
hbitmap
,
LONG
count
,
LPCVOID
buffer
)
LONG
WINAPI
SetBitmapBits16
(
HBITMAP16
hbitmap
,
LONG
count
,
LPCVOID
buffer
)
...
@@ -1567,6 +1576,15 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
...
@@ -1567,6 +1576,15 @@ void WINAPI PlayMetaFileRecord16( HDC16 hdc, HANDLETABLE16 *ht, METARECORD *mr,
/***********************************************************************
/***********************************************************************
* SetHookFlags (GDI.192)
*/
WORD
WINAPI
SetHookFlags16
(
HDC16
hdc
,
WORD
flags
)
{
return
SetHookFlags
(
HDC_32
(
hdc
),
flags
);
}
/***********************************************************************
* SetBoundsRect (GDI.193)
* SetBoundsRect (GDI.193)
*/
*/
UINT16
WINAPI
SetBoundsRect16
(
HDC16
hdc
,
const
RECT16
*
rect
,
UINT16
flags
)
UINT16
WINAPI
SetBoundsRect16
(
HDC16
hdc
,
const
RECT16
*
rect
,
UINT16
flags
)
...
...
dlls/gdi32/gdi32.spec
View file @
50dea381
...
@@ -515,10 +515,11 @@
...
@@ -515,10 +515,11 @@
@ stdcall CloseJob16(long)
@ stdcall CloseJob16(long)
@ stdcall DrvGetPrinterData16(str str ptr ptr long ptr)
@ stdcall DrvGetPrinterData16(str str ptr ptr long ptr)
@ stdcall DrvSetPrinterData16(str str long ptr long)
@ stdcall DrvSetPrinterData16(str str long ptr long)
@ stdcall GetDCHook(long ptr)
@ stdcall OpenJob16(str str long)
@ stdcall OpenJob16(str str long)
@ stdcall SelectVisRgn
16
(long long)
@ stdcall SelectVisRgn(long long)
@ stdcall SetDCHook(long ptr long)
@ stdcall SetDCHook(long ptr long)
@ stdcall SetHookFlags
16
(long long)
@ stdcall SetHookFlags(long long)
@ stdcall WriteSpool16(long ptr long)
@ stdcall WriteSpool16(long ptr long)
################################################################
################################################################
...
...
dlls/wineps.drv/init.c
View file @
50dea381
...
@@ -37,7 +37,6 @@
...
@@ -37,7 +37,6 @@
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
#include "winerror.h"
#include "winerror.h"
#include "wownt32.h"
#include "winreg.h"
#include "winreg.h"
#include "psdrv.h"
#include "psdrv.h"
#include "winspool.h"
#include "winspool.h"
...
@@ -406,7 +405,7 @@ HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEW *lpInitData )
...
@@ -406,7 +405,7 @@ HDC PSDRV_ResetDC( PSDRV_PDEVICE *physDev, const DEVMODEW *lpInitData )
HeapFree
(
PSDRV_Heap
,
0
,
devmodeA
);
HeapFree
(
PSDRV_Heap
,
0
,
devmodeA
);
PSDRV_UpdateDevCaps
(
physDev
);
PSDRV_UpdateDevCaps
(
physDev
);
hrgn
=
CreateRectRgn
(
0
,
0
,
physDev
->
horzRes
,
physDev
->
vertRes
);
hrgn
=
CreateRectRgn
(
0
,
0
,
physDev
->
horzRes
,
physDev
->
vertRes
);
SelectVisRgn
16
(
HDC_16
(
physDev
->
hdc
),
HRGN_16
(
hrgn
)
);
SelectVisRgn
(
physDev
->
hdc
,
hrgn
);
DeleteObject
(
hrgn
);
DeleteObject
(
hrgn
);
}
}
return
physDev
->
hdc
;
return
physDev
->
hdc
;
...
...
dlls/winex11.drv/dce.c
View file @
50dea381
...
@@ -27,10 +27,7 @@
...
@@ -27,10 +27,7 @@
#include "win.h"
#include "win.h"
#include "windef.h"
#include "windef.h"
#include "wingdi.h"
#include "wingdi.h"
#include "wownt32.h"
#include "x11drv.h"
#include "x11drv.h"
#include "wine/winbase16.h"
#include "wine/wingdi16.h"
#include "wine/server.h"
#include "wine/server.h"
#include "wine/list.h"
#include "wine/list.h"
#include "wine/debug.h"
#include "wine/debug.h"
...
@@ -170,7 +167,7 @@ static void update_visible_region( struct dce *dce )
...
@@ -170,7 +167,7 @@ static void update_visible_region( struct dce *dce )
OffsetRgn
(
vis_rgn
,
OffsetRgn
(
vis_rgn
,
-
(
escape
.
drawable_rect
.
left
+
escape
.
dc_rect
.
left
),
-
(
escape
.
drawable_rect
.
left
+
escape
.
dc_rect
.
left
),
-
(
escape
.
drawable_rect
.
top
+
escape
.
dc_rect
.
top
)
);
-
(
escape
.
drawable_rect
.
top
+
escape
.
dc_rect
.
top
)
);
SelectVisRgn
16
(
HDC_16
(
dce
->
hdc
),
HRGN_16
(
vis_rgn
)
);
SelectVisRgn
(
dce
->
hdc
,
vis_rgn
);
DeleteObject
(
vis_rgn
);
DeleteObject
(
vis_rgn
);
}
}
...
@@ -214,7 +211,7 @@ static void delete_clip_rgn( struct dce *dce )
...
@@ -214,7 +211,7 @@ static void delete_clip_rgn( struct dce *dce )
dce
->
clip_rgn
=
0
;
dce
->
clip_rgn
=
0
;
/* make it dirty so that the vis rgn gets recomputed next time */
/* make it dirty so that the vis rgn gets recomputed next time */
SetHookFlags
16
(
HDC_16
(
dce
->
hdc
)
,
DCHF_INVALIDATEVISRGN
);
SetHookFlags
(
dce
->
hdc
,
DCHF_INVALIDATEVISRGN
);
}
}
...
@@ -317,7 +314,7 @@ void alloc_window_dce( struct x11drv_win_data *data )
...
@@ -317,7 +314,7 @@ void alloc_window_dce( struct x11drv_win_data *data )
if
(
win_style
&
WS_CLIPCHILDREN
)
dce
->
flags
|=
DCX_CLIPCHILDREN
;
if
(
win_style
&
WS_CLIPCHILDREN
)
dce
->
flags
|=
DCX_CLIPCHILDREN
;
if
(
win_style
&
WS_CLIPSIBLINGS
)
dce
->
flags
|=
DCX_CLIPSIBLINGS
;
if
(
win_style
&
WS_CLIPSIBLINGS
)
dce
->
flags
|=
DCX_CLIPSIBLINGS
;
}
}
SetHookFlags
16
(
HDC_16
(
dce
->
hdc
)
,
DCHF_INVALIDATEVISRGN
);
SetHookFlags
(
dce
->
hdc
,
DCHF_INVALIDATEVISRGN
);
EnterCriticalSection
(
&
dce_section
);
EnterCriticalSection
(
&
dce_section
);
list_add_tail
(
&
dce_list
,
&
dce
->
entry
);
list_add_tail
(
&
dce_list
,
&
dce
->
entry
);
...
@@ -427,7 +424,7 @@ void invalidate_dce( HWND hwnd, const RECT *rect )
...
@@ -427,7 +424,7 @@ void invalidate_dce( HWND hwnd, const RECT *rect )
/* Set dirty bits in the hDC and DCE structs */
/* Set dirty bits in the hDC and DCE structs */
TRACE
(
"
\t
fixed up %p dce [%p]
\n
"
,
dce
,
dce
->
hwnd
);
TRACE
(
"
\t
fixed up %p dce [%p]
\n
"
,
dce
,
dce
->
hwnd
);
SetHookFlags
16
(
HDC_16
(
dce
->
hdc
)
,
DCHF_INVALIDATEVISRGN
);
SetHookFlags
(
dce
->
hdc
,
DCHF_INVALIDATEVISRGN
);
}
}
}
}
}
/* dce list */
}
/* dce list */
...
@@ -561,7 +558,7 @@ HDC X11DRV_GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
...
@@ -561,7 +558,7 @@ HDC X11DRV_GetDCEx( HWND hwnd, HRGN hrgnClip, DWORD flags )
dce
->
hwnd
=
hwnd
;
dce
->
hwnd
=
hwnd
;
dce
->
flags
=
(
dce
->
flags
&
~
clip_flags
)
|
(
flags
&
clip_flags
);
dce
->
flags
=
(
dce
->
flags
&
~
clip_flags
)
|
(
flags
&
clip_flags
);
if
(
SetHookFlags
16
(
HDC_16
(
dce
->
hdc
)
,
DCHF_VALIDATEVISRGN
))
if
(
SetHookFlags
(
dce
->
hdc
,
DCHF_VALIDATEVISRGN
))
bUpdateVisRgn
=
TRUE
;
/* DC was dirty */
bUpdateVisRgn
=
TRUE
;
/* DC was dirty */
if
(
bUpdateVisRgn
)
update_visible_region
(
dce
);
if
(
bUpdateVisRgn
)
update_visible_region
(
dce
);
...
...
include/wine/wingdi16.h
View file @
50dea381
...
@@ -269,7 +269,6 @@ typedef struct
...
@@ -269,7 +269,6 @@ typedef struct
FONTSIGNATURE
ntmFontSig
;
FONTSIGNATURE
ntmFontSig
;
}
NEWTEXTMETRICEX16
,
*
LPNEWTEXTMETRICEX16
;
}
NEWTEXTMETRICEX16
,
*
LPNEWTEXTMETRICEX16
;
typedef
BOOL
(
CALLBACK
*
DCHOOKPROC
)(
HDC
,
WORD
,
DWORD_PTR
,
LPARAM
);
typedef
INT16
(
CALLBACK
*
FONTENUMPROC16
)(
SEGPTR
,
SEGPTR
,
UINT16
,
LPARAM
);
typedef
INT16
(
CALLBACK
*
FONTENUMPROC16
)(
SEGPTR
,
SEGPTR
,
UINT16
,
LPARAM
);
typedef
VOID
(
CALLBACK
*
LINEDDAPROC16
)(
INT16
,
INT16
,
LPARAM
);
typedef
VOID
(
CALLBACK
*
LINEDDAPROC16
)(
INT16
,
INT16
,
LPARAM
);
typedef
INT16
(
CALLBACK
*
GOBJENUMPROC16
)(
SEGPTR
,
LPARAM
);
typedef
INT16
(
CALLBACK
*
GOBJENUMPROC16
)(
SEGPTR
,
LPARAM
);
...
@@ -343,13 +342,6 @@ struct PATH_INFO {
...
@@ -343,13 +342,6 @@ struct PATH_INFO {
DWORD
BkColor
;
DWORD
BkColor
;
};
};
/* DC hook codes */
#define DCHC_INVALIDVISRGN 0x0001
#define DCHC_DELETEDC 0x0002
#define DCHF_INVALIDATEVISRGN 0x0001
#define DCHF_VALIDATEVISRGN 0x0002
/* RenderMode */
/* RenderMode */
#define RENDERMODE_NO_DISPLAY 0
#define RENDERMODE_NO_DISPLAY 0
#define RENDERMODE_OPEN 1
#define RENDERMODE_OPEN 1
...
@@ -577,7 +569,6 @@ COLORREF WINAPI SetBkColor16(HDC16,COLORREF);
...
@@ -577,7 +569,6 @@ COLORREF WINAPI SetBkColor16(HDC16,COLORREF);
INT16
WINAPI
SetBkMode16
(
HDC16
,
INT16
);
INT16
WINAPI
SetBkMode16
(
HDC16
,
INT16
);
UINT16
WINAPI
SetBoundsRect16
(
HDC16
,
const
RECT16
*
,
UINT16
);
UINT16
WINAPI
SetBoundsRect16
(
HDC16
,
const
RECT16
*
,
UINT16
);
DWORD
WINAPI
SetBrushOrg16
(
HDC16
,
INT16
,
INT16
);
DWORD
WINAPI
SetBrushOrg16
(
HDC16
,
INT16
,
INT16
);
BOOL
WINAPI
SetDCHook
(
HDC
,
DCHOOKPROC
,
DWORD_PTR
);
BOOL16
WINAPI
SetDCHook16
(
HDC16
,
FARPROC16
,
DWORD
);
BOOL16
WINAPI
SetDCHook16
(
HDC16
,
FARPROC16
,
DWORD
);
DWORD
WINAPI
SetDCOrg16
(
HDC16
,
INT16
,
INT16
);
DWORD
WINAPI
SetDCOrg16
(
HDC16
,
INT16
,
INT16
);
VOID
WINAPI
SetDCState16
(
HDC16
,
HDC16
);
VOID
WINAPI
SetDCState16
(
HDC16
,
HDC16
);
...
...
include/wingdi.h
View file @
50dea381
...
@@ -3725,6 +3725,22 @@ WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
...
@@ -3725,6 +3725,22 @@ WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
WINGDIAPI
BOOL
WINAPI
wglUseFontBitmaps
(
HDC
,
DWORD
,
DWORD
,
DWORD
);
WINGDIAPI
BOOL
WINAPI
wglUseFontBitmaps
(
HDC
,
DWORD
,
DWORD
,
DWORD
);
WINGDIAPI
BOOL
WINAPI
wglUseFontOutlines
(
HDC
,
DWORD
,
DWORD
,
DWORD
,
FLOAT
,
FLOAT
,
INT
,
LPGLYPHMETRICSFLOAT
);
WINGDIAPI
BOOL
WINAPI
wglUseFontOutlines
(
HDC
,
DWORD
,
DWORD
,
DWORD
,
FLOAT
,
FLOAT
,
INT
,
LPGLYPHMETRICSFLOAT
);
#ifdef __WINESRC__
/* the DC hook support is only exported on Win16, the 32-bit version is a Wine extension */
#define DCHC_INVALIDVISRGN 0x0001
#define DCHC_DELETEDC 0x0002
#define DCHF_INVALIDATEVISRGN 0x0001
#define DCHF_VALIDATEVISRGN 0x0002
typedef
BOOL
(
CALLBACK
*
DCHOOKPROC
)(
HDC
,
WORD
,
DWORD_PTR
,
LPARAM
);
WINGDIAPI
DWORD_PTR
WINAPI
GetDCHook
(
HDC
,
DCHOOKPROC
*
);
WINGDIAPI
BOOL
WINAPI
SetDCHook
(
HDC
,
DCHOOKPROC
,
DWORD_PTR
);
WINGDIAPI
WORD
WINAPI
SetHookFlags
(
HDC
,
WORD
);
WINGDIAPI
INT
WINAPI
SelectVisRgn
(
HDC
,
HRGN
);
#endif
/* __WINESRC__ */
#ifdef __cplusplus
#ifdef __cplusplus
}
}
#endif
#endif
...
...
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