Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
6bd87c6b
Commit
6bd87c6b
authored
May 15, 2014
by
Piotr Caban
Committed by
Alexandre Julliard
May 15, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
oleacc: Add WindowFromAccessibleObject implementation.
parent
25312a10
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
1 deletion
+38
-1
main.c
dlls/oleacc/main.c
+34
-0
oleacc.spec
dlls/oleacc/oleacc.spec
+1
-1
main.c
dlls/oleacc/tests/main.c
+3
-0
No files found.
dlls/oleacc/main.c
View file @
6bd87c6b
...
...
@@ -295,6 +295,40 @@ HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID,
return
CreateStdAccessibleObject
(
hwnd
,
dwObjectID
,
riid
,
ppvObject
);
}
HRESULT
WINAPI
WindowFromAccessibleObject
(
IAccessible
*
acc
,
HWND
*
phwnd
)
{
IDispatch
*
parent
;
IOleWindow
*
ow
;
HRESULT
hres
;
TRACE
(
"%p %p
\n
"
,
acc
,
phwnd
);
IAccessible_AddRef
(
acc
);
while
(
1
)
{
hres
=
IAccessible_QueryInterface
(
acc
,
&
IID_IOleWindow
,
(
void
**
)
&
ow
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IOleWindow_GetWindow
(
ow
,
phwnd
);
IOleWindow_Release
(
ow
);
IAccessible_Release
(
acc
);
return
hres
;
}
hres
=
IAccessible_get_accParent
(
acc
,
&
parent
);
IAccessible_Release
(
acc
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
hres
!=
S_OK
||
!
parent
)
{
*
phwnd
=
NULL
;
return
hres
;
}
hres
=
IDispatch_QueryInterface
(
parent
,
&
IID_IAccessible
,
(
void
**
)
&
acc
);
IDispatch_Release
(
parent
);
if
(
FAILED
(
hres
))
return
hres
;
}
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hinstDLL
,
DWORD
fdwReason
,
LPVOID
lpvReserved
)
{
...
...
dlls/oleacc/oleacc.spec
View file @
6bd87c6b
...
...
@@ -19,4 +19,4 @@
@ stub LIBID_Accessibility
@ stdcall LresultFromObject(ptr long ptr)
@ stdcall ObjectFromLresult(long ptr long ptr)
@ st
ub WindowFromAccessibleObject
@ st
dcall WindowFromAccessibleObject(ptr ptr)
dlls/oleacc/tests/main.c
View file @
6bd87c6b
...
...
@@ -410,6 +410,9 @@ static void test_default_client_accessible_object(void)
hr
=
IOleWindow_GetWindow
(
ow
,
&
hwnd2
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
hwnd
==
hwnd2
,
"hwnd2 = %p, expected %p
\n
"
,
hwnd2
,
hwnd
);
hr
=
WindowFromAccessibleObject
(
acc
,
&
hwnd2
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
hwnd
==
hwnd2
,
"hwnd2 = %p, expected %p
\n
"
,
hwnd2
,
hwnd
);
IOleWindow_Release
(
ow
);
hr
=
IAccessible_get_accChildCount
(
acc
,
&
l
);
...
...
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