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
e99dc1ac
Commit
e99dc1ac
authored
May 09, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
May 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleacc: Add Client_accHitTest implementation.
parent
6474f8c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
67 additions
and
5 deletions
+67
-5
client.c
dlls/oleacc/client.c
+20
-2
main.c
dlls/oleacc/tests/main.c
+47
-3
No files found.
dlls/oleacc/client.c
View file @
e99dc1ac
...
...
@@ -340,8 +340,26 @@ static HRESULT WINAPI Client_accHitTest(IAccessible *iface,
LONG
xLeft
,
LONG
yTop
,
VARIANT
*
pvarID
)
{
Client
*
This
=
impl_from_Client
(
iface
);
FIXME
(
"(%p)->(%d %d %p)
\n
"
,
This
,
xLeft
,
yTop
,
pvarID
);
return
E_NOTIMPL
;
HWND
child
;
POINT
pt
;
TRACE
(
"(%p)->(%d %d %p)
\n
"
,
This
,
xLeft
,
yTop
,
pvarID
);
V_VT
(
pvarID
)
=
VT_I4
;
V_I4
(
pvarID
)
=
0
;
pt
.
x
=
xLeft
;
pt
.
y
=
yTop
;
if
(
!
IsWindowVisible
(
This
->
hwnd
)
||
!
ScreenToClient
(
This
->
hwnd
,
&
pt
))
return
S_OK
;
child
=
ChildWindowFromPointEx
(
This
->
hwnd
,
pt
,
CWP_SKIPINVISIBLE
);
if
(
!
child
||
child
==
This
->
hwnd
)
return
S_OK
;
V_VT
(
pvarID
)
=
VT_DISPATCH
;
return
AccessibleObjectFromWindow
(
child
,
OBJID_WINDOW
,
&
IID_IDispatch
,
(
void
**
)
&
V_DISPATCH
(
pvarID
));
}
static
HRESULT
WINAPI
Client_accDoDefaultAction
(
IAccessible
*
iface
,
VARIANT
varID
)
...
...
dlls/oleacc/tests/main.c
View file @
e99dc1ac
...
...
@@ -315,13 +315,14 @@ static void test_default_client_accessible_object(void)
HRESULT
hr
;
VARIANT
vid
,
v
;
BSTR
str
;
POINT
pt
;
LONG
l
;
hwnd
=
CreateWindowA
(
"oleacc_test"
,
"test &t &junk"
,
WS_OVERLAPPEDWINDOW
,
0
,
0
,
0
,
0
,
NULL
,
NULL
,
NULL
,
NULL
);
0
,
0
,
100
,
10
0
,
NULL
,
NULL
,
NULL
,
NULL
);
ok
(
hwnd
!=
NULL
,
"CreateWindow failed
\n
"
);
chld
=
CreateWindowA
(
"static"
,
"message"
,
WS_CHILD
,
0
,
0
,
0
,
0
,
hwnd
,
NULL
,
NULL
,
NULL
);
chld
=
CreateWindowA
(
"static"
,
"message"
,
WS_CHILD
|
WS_VISIBLE
,
0
,
0
,
50
,
5
0
,
hwnd
,
NULL
,
NULL
,
NULL
);
ok
(
chld
!=
NULL
,
"CreateWindow failed
\n
"
);
hr
=
CreateStdAccessibleObject
(
NULL
,
OBJID_CLIENT
,
&
IID_IAccessible
,
(
void
**
)
&
acc
);
...
...
@@ -388,6 +389,44 @@ static void test_default_client_accessible_object(void)
ok
(
hr
==
S_FALSE
,
"got %x
\n
"
,
hr
);
ok
(
!
str
,
"str != NULL
\n
"
);
pt
.
x
=
pt
.
y
=
60
;
ok
(
ClientToScreen
(
hwnd
,
&
pt
),
"ClientToScreen failed
\n
"
);
hr
=
IAccessible_accHitTest
(
acc
,
pt
.
x
,
pt
.
y
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
0
,
"V_I4(&v) = %d
\n
"
,
V_I4
(
&
v
));
pt
.
x
=
pt
.
y
=
25
;
ok
(
ClientToScreen
(
hwnd
,
&
pt
),
"ClientToScreen failed
\n
"
);
hr
=
IAccessible_accHitTest
(
acc
,
pt
.
x
,
pt
.
y
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
0
,
"V_I4(&v) = %d
\n
"
,
V_I4
(
&
v
));
ShowWindow
(
hwnd
,
TRUE
);
pt
.
x
=
pt
.
y
=
60
;
ok
(
ClientToScreen
(
hwnd
,
&
pt
),
"ClientToScreen failed
\n
"
);
hr
=
IAccessible_accHitTest
(
acc
,
pt
.
x
,
pt
.
y
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
0
,
"V_I4(&v) = %d
\n
"
,
V_I4
(
&
v
));
pt
.
x
=
pt
.
y
=
25
;
ok
(
ClientToScreen
(
hwnd
,
&
pt
),
"ClientToScreen failed
\n
"
);
hr
=
IAccessible_accHitTest
(
acc
,
pt
.
x
,
pt
.
y
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_DISPATCH
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_DISPATCH
(
&
v
)
!=
NULL
,
"V_DISPATCH(&v) = %p
\n
"
,
V_DISPATCH
(
&
v
));
VariantClear
(
&
v
);
ShowWindow
(
chld
,
FALSE
);
pt
.
x
=
pt
.
y
=
25
;
ok
(
ClientToScreen
(
hwnd
,
&
pt
),
"ClientToScreen failed
\n
"
);
hr
=
IAccessible_accHitTest
(
acc
,
pt
.
x
,
pt
.
y
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
0
,
"V_I4(&v) = %d
\n
"
,
V_I4
(
&
v
));
DestroyWindow
(
hwnd
);
hr
=
IAccessible_get_accChildCount
(
acc
,
&
l
);
...
...
@@ -410,6 +449,11 @@ static void test_default_client_accessible_object(void)
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
STATE_SYSTEM_INVISIBLE
,
"V_I4(&v) = %x
\n
"
,
V_I4
(
&
v
));
hr
=
IAccessible_accHitTest
(
acc
,
200
,
200
,
&
v
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
V_VT
(
&
v
)
==
VT_I4
,
"V_VT(&v) = %d
\n
"
,
V_VT
(
&
v
));
ok
(
V_I4
(
&
v
)
==
0
,
"V_I4(&v) = %d
\n
"
,
V_I4
(
&
v
));
IAccessible_Release
(
acc
);
}
...
...
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