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
97611dca
Commit
97611dca
authored
Sep 27, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Implement MirrorRgn.
parent
440cf085
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
gdi32.spec
dlls/gdi32/gdi32.spec
+1
-1
region.c
dlls/gdi32/region.c
+21
-0
win.c
dlls/user32/tests/win.c
+18
-2
wingdi.h
include/wingdi.h
+1
-0
No files found.
dlls/gdi32/gdi32.spec
View file @
97611dca
...
...
@@ -363,7 +363,7 @@
@ stub LoadImageColorMatcherA
@ stub LoadImageColorMatcherW
@ stdcall MaskBlt(long long long long long long long long long long long long)
# @ stub MirrorRgn
@ stdcall MirrorRgn(long long)
@ stdcall ModifyWorldTransform(long ptr long)
@ stdcall MoveToEx(long long long ptr)
@ stdcall NamedEscape(long wstr long long ptr long ptr)
...
...
dlls/gdi32/region.c
View file @
97611dca
...
...
@@ -1516,6 +1516,27 @@ INT mirror_region( HRGN dst, HRGN src, INT width )
}
/***********************************************************************
* MirrorRgn (GDI32.@)
*/
BOOL
WINAPI
MirrorRgn
(
HWND
hwnd
,
HRGN
hrgn
)
{
static
const
WCHAR
user32W
[]
=
{
'u'
,
's'
,
'e'
,
'r'
,
'3'
,
'2'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
static
BOOL
(
WINAPI
*
pGetWindowRect
)(
HWND
hwnd
,
LPRECT
rect
);
RECT
rect
;
/* yes, a HWND in gdi32, don't ask */
if
(
!
pGetWindowRect
)
{
HMODULE
user32
=
GetModuleHandleW
(
user32W
);
if
(
!
user32
)
return
FALSE
;
if
(
!
(
pGetWindowRect
=
(
void
*
)
GetProcAddress
(
user32
,
"GetWindowRect"
)))
return
FALSE
;
}
pGetWindowRect
(
hwnd
,
&
rect
);
return
mirror_region
(
hrgn
,
hrgn
,
rect
.
right
-
rect
.
left
)
!=
ERROR
;
}
/***********************************************************************
* REGION_Coalesce
*
* Attempt to merge the rects in the current band with those in the
...
...
dlls/user32/tests/win.c
View file @
97611dca
...
...
@@ -58,6 +58,7 @@ static BOOL (WINAPI *pGetProcessDefaultLayout)( DWORD *layout );
static
BOOL
(
WINAPI
*
pSetProcessDefaultLayout
)(
DWORD
layout
);
static
DWORD
(
WINAPI
*
pSetLayout
)(
HDC
hdc
,
DWORD
layout
);
static
DWORD
(
WINAPI
*
pGetLayout
)(
HDC
hdc
);
static
BOOL
(
WINAPI
*
pMirrorRgn
)(
HWND
hwnd
,
HRGN
hrgn
);
static
BOOL
test_lbuttondown_flag
;
static
HWND
hwndMessage
;
...
...
@@ -6126,7 +6127,7 @@ static void test_winregion(void)
{
HWND
hwnd
;
RECT
r
;
int
ret
;
int
ret
,
width
;
HRGN
hrgn
;
if
(
!
pGetWindowRgnBox
)
...
...
@@ -6159,7 +6160,21 @@ static void test_winregion(void)
ok
(
r
.
left
==
2
&&
r
.
top
==
3
&&
r
.
right
==
10
&&
r
.
bottom
==
15
,
"Expected (2,3,10,15), got (%d,%d,%d,%d)
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
DeleteObject
(
hrgn
);
if
(
pMirrorRgn
)
{
hrgn
=
CreateRectRgn
(
2
,
3
,
10
,
15
);
ret
=
pMirrorRgn
(
hwnd
,
hrgn
);
ok
(
ret
==
TRUE
,
"MirrorRgn failed %u
\n
"
,
ret
);
r
.
left
=
r
.
top
=
r
.
right
=
r
.
bottom
=
0
;
GetWindowRect
(
hwnd
,
&
r
);
width
=
r
.
right
-
r
.
left
;
r
.
left
=
r
.
top
=
r
.
right
=
r
.
bottom
=
0
;
ret
=
GetRgnBox
(
hrgn
,
&
r
);
ok
(
ret
==
SIMPLEREGION
,
"GetRgnBox failed %u
\n
"
,
ret
);
ok
(
r
.
left
==
width
-
10
&&
r
.
top
==
3
&&
r
.
right
==
width
-
2
&&
r
.
bottom
==
15
,
"Wrong rectangle (%d,%d,%d,%d) for width %d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
,
width
);
}
else
win_skip
(
"MirrorRgn not supported
\n
"
);
}
DestroyWindow
(
hwnd
);
}
...
...
@@ -6220,6 +6235,7 @@ START_TEST(win)
pSetProcessDefaultLayout
=
(
void
*
)
GetProcAddress
(
user32
,
"SetProcessDefaultLayout"
);
pGetLayout
=
(
void
*
)
GetProcAddress
(
gdi32
,
"GetLayout"
);
pSetLayout
=
(
void
*
)
GetProcAddress
(
gdi32
,
"SetLayout"
);
pMirrorRgn
=
(
void
*
)
GetProcAddress
(
gdi32
,
"MirrorRgn"
);
if
(
!
RegisterWindowClasses
())
assert
(
0
);
...
...
include/wingdi.h
View file @
97611dca
...
...
@@ -3601,6 +3601,7 @@ WINGDIAPI BOOL WINAPI LineDDA(INT,INT,INT,INT,LINEDDAPROC,LPARAM);
WINGDIAPI
BOOL
WINAPI
LineTo
(
HDC
,
INT
,
INT
);
WINGDIAPI
BOOL
WINAPI
LPtoDP
(
HDC
,
LPPOINT
,
INT
);
WINGDIAPI
BOOL
WINAPI
MaskBlt
(
HDC
,
INT
,
INT
,
INT
,
INT
,
HDC
,
INT
,
INT
,
HBITMAP
,
INT
,
INT
,
DWORD
);
WINGDIAPI
BOOL
WINAPI
MirrorRgn
(
HWND
,
HRGN
);
WINGDIAPI
BOOL
WINAPI
ModifyWorldTransform
(
HDC
,
const
XFORM
*
,
DWORD
);
WINGDIAPI
BOOL
WINAPI
MoveToEx
(
HDC
,
INT
,
INT
,
LPPOINT
);
WINGDIAPI
INT
WINAPI
OffsetClipRgn
(
HDC
,
INT
,
INT
);
...
...
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