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
8c808f3e
Commit
8c808f3e
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 IOleWindow interface stub to default client accessible object.
parent
94b72100
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
3 deletions
+60
-3
client.c
dlls/oleacc/client.c
+55
-3
main.c
dlls/oleacc/tests/main.c
+5
-0
No files found.
dlls/oleacc/client.c
View file @
8c808f3e
...
...
@@ -27,6 +27,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(oleacc);
typedef
struct
{
IAccessible
IAccessible_iface
;
IOleWindow
IOleWindow_iface
;
LONG
ref
;
...
...
@@ -48,11 +49,16 @@ static HRESULT WINAPI Client_QueryInterface(IAccessible *iface, REFIID riid, voi
IsEqualIID
(
riid
,
&
IID_IDispatch
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
{
*
ppv
=
iface
;
IAccessible_AddRef
(
iface
);
return
S_OK
;
}
else
if
(
IsEqualIID
(
riid
,
&
IID_IOleWindow
))
{
*
ppv
=
&
This
->
IOleWindow_iface
;
}
else
{
WARN
(
"no interface: %s
\n
"
,
debugstr_guid
(
riid
));
*
ppv
=
NULL
;
return
E_NOINTERFACE
;
}
return
E_NOINTERFACE
;
IAccessible_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
Client_AddRef
(
IAccessible
*
iface
)
...
...
@@ -439,6 +445,51 @@ static const IAccessibleVtbl ClientVtbl = {
Client_put_accValue
};
static
inline
Client
*
impl_from_Client_OleWindow
(
IOleWindow
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
Client
,
IOleWindow_iface
);
}
static
HRESULT
WINAPI
Client_OleWindow_QueryInterface
(
IOleWindow
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
Client
*
This
=
impl_from_Client_OleWindow
(
iface
);
return
IAccessible_QueryInterface
(
&
This
->
IAccessible_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
Client_OleWindow_AddRef
(
IOleWindow
*
iface
)
{
Client
*
This
=
impl_from_Client_OleWindow
(
iface
);
return
IAccessible_AddRef
(
&
This
->
IAccessible_iface
);
}
static
ULONG
WINAPI
Client_OleWindow_Release
(
IOleWindow
*
iface
)
{
Client
*
This
=
impl_from_Client_OleWindow
(
iface
);
return
IAccessible_Release
(
&
This
->
IAccessible_iface
);
}
static
HRESULT
WINAPI
Client_OleWindow_GetWindow
(
IOleWindow
*
iface
,
HWND
*
phwnd
)
{
Client
*
This
=
impl_from_Client_OleWindow
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
phwnd
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
Client_OleWindow_ContextSensitiveHelp
(
IOleWindow
*
iface
,
BOOL
fEnterMode
)
{
Client
*
This
=
impl_from_Client_OleWindow
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
fEnterMode
);
return
E_NOTIMPL
;
}
static
const
IOleWindowVtbl
ClientOleWindowVtbl
=
{
Client_OleWindow_QueryInterface
,
Client_OleWindow_AddRef
,
Client_OleWindow_Release
,
Client_OleWindow_GetWindow
,
Client_OleWindow_ContextSensitiveHelp
};
HRESULT
create_client_object
(
HWND
hwnd
,
const
IID
*
iid
,
void
**
obj
)
{
Client
*
client
;
...
...
@@ -452,6 +503,7 @@ HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj)
return
E_OUTOFMEMORY
;
client
->
IAccessible_iface
.
lpVtbl
=
&
ClientVtbl
;
client
->
IOleWindow_iface
.
lpVtbl
=
&
ClientOleWindowVtbl
;
client
->
ref
=
1
;
client
->
hwnd
=
hwnd
;
...
...
dlls/oleacc/tests/main.c
View file @
8c808f3e
...
...
@@ -383,6 +383,7 @@ static void test_default_client_accessible_object(void)
IAccessible
*
acc
;
IDispatch
*
disp
;
IOleWindow
*
ow
;
HWND
chld
,
hwnd
;
HRESULT
hr
;
VARIANT
vid
,
v
;
...
...
@@ -404,6 +405,10 @@ static void test_default_client_accessible_object(void)
hr
=
CreateStdAccessibleObject
(
hwnd
,
OBJID_CLIENT
,
&
IID_IAccessible
,
(
void
**
)
&
acc
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
hr
=
IAccessible_QueryInterface
(
acc
,
&
IID_IOleWindow
,
(
void
**
)
&
ow
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
IOleWindow_Release
(
ow
);
hr
=
IAccessible_get_accChildCount
(
acc
,
&
l
);
ok
(
hr
==
S_OK
,
"got %x
\n
"
,
hr
);
ok
(
l
==
1
,
"l = %d
\n
"
,
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