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
ab4a0017
Commit
ab4a0017
authored
Jun 13, 2022
by
Connor McAdams
Committed by
Alexandre Julliard
Jul 19, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uiautomationcore: Implement UiaNodeFromProvider.
Signed-off-by:
Connor McAdams
<
cmcadams@codeweavers.com
>
parent
78406153
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
162 additions
and
1 deletion
+162
-1
Makefile.in
dlls/uiautomationcore/Makefile.in
+4
-0
uiautomation.c
dlls/uiautomationcore/tests/uiautomation.c
+0
-0
uia_classes.idl
dlls/uiautomationcore/uia_classes.idl
+30
-0
uia_client.c
dlls/uiautomationcore/uia_client.c
+126
-0
uiautomationcore.spec
dlls/uiautomationcore/uiautomationcore.spec
+1
-1
uiautomationcoreapi.h
include/uiautomationcoreapi.h
+1
-0
No files found.
dlls/uiautomationcore/Makefile.in
View file @
ab4a0017
...
@@ -5,6 +5,10 @@ IMPORTS = uuid ole32 oleaut32 user32 oleacc
...
@@ -5,6 +5,10 @@ IMPORTS = uuid ole32 oleaut32 user32 oleacc
EXTRADLLFLAGS
=
-Wb
,--prefer-native
EXTRADLLFLAGS
=
-Wb
,--prefer-native
C_SRCS
=
\
C_SRCS
=
\
uia_client.c
\
uia_ids.c
\
uia_ids.c
\
uia_main.c
\
uia_main.c
\
uia_provider.c
uia_provider.c
IDL_SRCS
=
\
uia_classes.idl
dlls/uiautomationcore/tests/uiautomation.c
View file @
ab4a0017
This diff is collapsed.
Click to expand it.
dlls/uiautomationcore/uia_classes.idl
0 → 100644
View file @
ab4a0017
/*
*
Copyright
2022
Connor
McAdams
for
CodeWeavers
*
*
This
library
is
free
software
; you can redistribute it and/or
*
modify
it
under
the
terms
of
the
GNU
Lesser
General
Public
*
License
as
published
by
the
Free
Software
Foundation
; either
*
version
2.1
of
the
License
,
or
(
at
your
option
)
any
later
version
.
*
*
This
library
is
distributed
in
the
hope
that
it
will
be
useful
,
*
but
WITHOUT
ANY
WARRANTY
; without even the implied warranty of
*
MERCHANTABILITY
or
FITNESS
FOR
A
PARTICULAR
PURPOSE
.
See
the
GNU
*
Lesser
General
Public
License
for
more
details
.
*
*
You
should
have
received
a
copy
of
the
GNU
Lesser
General
Public
*
License
along
with
this
library
; if not, write to the Free Software
*
Foundation
,
Inc
.
,
51
Franklin
St
,
Fifth
Floor
,
Boston
,
MA
02110
-
1301
,
USA
*/
#
pragma
makedep
header
import
"oaidl.idl"
;
[
object
,
uuid
(
bccb6799
-
d831
-
4057
-
bd50
-
6425823
ff1a3
),
pointer_default
(
unique
),
]
interface
IWineUiaNode
:
IUnknown
{
}
dlls/uiautomationcore/uia_client.c
0 → 100644
View file @
ab4a0017
/*
* Copyright 2022 Connor McAdams for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include "uiautomation.h"
#include "initguid.h"
#include "uia_classes.h"
#include "wine/debug.h"
#include "wine/heap.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
uiautomation
);
/*
* IWineUiaNode interface.
*/
struct
uia_node
{
IWineUiaNode
IWineUiaNode_iface
;
LONG
ref
;
IRawElementProviderSimple
*
elprov
;
};
static
inline
struct
uia_node
*
impl_from_IWineUiaNode
(
IWineUiaNode
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
uia_node
,
IWineUiaNode_iface
);
}
static
HRESULT
WINAPI
uia_node_QueryInterface
(
IWineUiaNode
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
*
ppv
=
NULL
;
if
(
IsEqualIID
(
riid
,
&
IID_IWineUiaNode
)
||
IsEqualIID
(
riid
,
&
IID_IUnknown
))
*
ppv
=
iface
;
else
return
E_NOINTERFACE
;
IWineUiaNode_AddRef
(
iface
);
return
S_OK
;
}
static
ULONG
WINAPI
uia_node_AddRef
(
IWineUiaNode
*
iface
)
{
struct
uia_node
*
node
=
impl_from_IWineUiaNode
(
iface
);
ULONG
ref
=
InterlockedIncrement
(
&
node
->
ref
);
TRACE
(
"%p, refcount %ld
\n
"
,
node
,
ref
);
return
ref
;
}
static
ULONG
WINAPI
uia_node_Release
(
IWineUiaNode
*
iface
)
{
struct
uia_node
*
node
=
impl_from_IWineUiaNode
(
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
node
->
ref
);
TRACE
(
"%p, refcount %ld
\n
"
,
node
,
ref
);
if
(
!
ref
)
{
IRawElementProviderSimple_Release
(
node
->
elprov
);
heap_free
(
node
);
}
return
ref
;
}
static
const
IWineUiaNodeVtbl
uia_node_vtbl
=
{
uia_node_QueryInterface
,
uia_node_AddRef
,
uia_node_Release
,
};
/***********************************************************************
* UiaNodeFromProvider (uiautomationcore.@)
*/
HRESULT
WINAPI
UiaNodeFromProvider
(
IRawElementProviderSimple
*
elprov
,
HUIANODE
*
huianode
)
{
static
const
int
supported_prov_opts
=
ProviderOptions_ServerSideProvider
;
enum
ProviderOptions
prov_opts
;
struct
uia_node
*
node
;
HRESULT
hr
;
TRACE
(
"(%p, %p)
\n
"
,
elprov
,
huianode
);
if
(
!
elprov
||
!
huianode
)
return
E_INVALIDARG
;
*
huianode
=
NULL
;
node
=
heap_alloc_zero
(
sizeof
(
*
node
));
if
(
!
node
)
return
E_OUTOFMEMORY
;
hr
=
IRawElementProviderSimple_get_ProviderOptions
(
elprov
,
&
prov_opts
);
if
(
FAILED
(
hr
))
{
heap_free
(
node
);
return
hr
;
}
if
(
prov_opts
&
~
supported_prov_opts
)
FIXME
(
"Ignoring unsupported ProviderOption(s) %#x
\n
"
,
prov_opts
&
~
supported_prov_opts
);
node
->
IWineUiaNode_iface
.
lpVtbl
=
&
uia_node_vtbl
;
node
->
elprov
=
elprov
;
IRawElementProviderSimple_AddRef
(
elprov
);
node
->
ref
=
1
;
*
huianode
=
(
void
*
)
&
node
->
IWineUiaNode_iface
;
return
hr
;
}
dlls/uiautomationcore/uiautomationcore.spec
View file @
ab4a0017
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
@ stub UiaNodeFromFocus
@ stub UiaNodeFromFocus
@ stub UiaNodeFromHandle
@ stub UiaNodeFromHandle
@ stub UiaNodeFromPoint
@ stub UiaNodeFromPoint
@ st
ub UiaNodeFromProvider
@ st
dcall UiaNodeFromProvider(ptr ptr)
@ stub UiaNodeRelease
@ stub UiaNodeRelease
@ stub UiaPatternRelease
@ stub UiaPatternRelease
#@ stub UiaProviderForNonClient
#@ stub UiaProviderForNonClient
...
...
include/uiautomationcoreapi.h
View file @
ab4a0017
...
@@ -256,6 +256,7 @@ BOOL WINAPI UiaTextRangeRelease(HUIATEXTRANGE hobj);
...
@@ -256,6 +256,7 @@ BOOL WINAPI UiaTextRangeRelease(HUIATEXTRANGE hobj);
HRESULT
WINAPI
UiaHostProviderFromHwnd
(
HWND
hwnd
,
IRawElementProviderSimple
**
elprov
);
HRESULT
WINAPI
UiaHostProviderFromHwnd
(
HWND
hwnd
,
IRawElementProviderSimple
**
elprov
);
HRESULT
WINAPI
UiaProviderFromIAccessible
(
IAccessible
*
acc
,
long
child_id
,
DWORD
flags
,
IRawElementProviderSimple
**
elprov
);
HRESULT
WINAPI
UiaProviderFromIAccessible
(
IAccessible
*
acc
,
long
child_id
,
DWORD
flags
,
IRawElementProviderSimple
**
elprov
);
HRESULT
WINAPI
UiaGetPropertyValue
(
HUIANODE
huianode
,
PROPERTYID
prop_id
,
VARIANT
*
out_val
);
HRESULT
WINAPI
UiaGetPropertyValue
(
HUIANODE
huianode
,
PROPERTYID
prop_id
,
VARIANT
*
out_val
);
HRESULT
WINAPI
UiaNodeFromProvider
(
IRawElementProviderSimple
*
elprov
,
HUIANODE
*
huianode
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
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