Skip to content

Commit 5b478bd

Browse files
[UIAUTOMATIONCORE] import from wine-10.0
1 parent 06ae7ec commit 5b478bd

34 files changed

Lines changed: 43518 additions & 1 deletion

dll/win32/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ add_subdirectory(ucrtbase)
218218
add_subdirectory(uext2)
219219
add_subdirectory(ufat)
220220
add_subdirectory(ufatx)
221+
add_subdirectory(uiautomationcore)
221222
add_subdirectory(untfs)
222223
add_subdirectory(updspapi)
223224
add_subdirectory(url)
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
add_definitions(-D__WINESRC__)
3+
remove_definitions(-D_WIN32_WINNT=0x502)
4+
add_definitions(-D_WIN32_WINNT=0x600)
5+
include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
6+
7+
spec2def(uiautomationcore.dll uiautomationcore.spec ADD_IMPORTLIB)
8+
9+
list(APPEND SOURCE
10+
reactos.c
11+
uia_client.c
12+
uia_com_client.c
13+
uia_event.c
14+
uia_ids.c
15+
uia_main.c
16+
uia_provider.c
17+
uia_utils.c
18+
rsrc.rc
19+
${CMAKE_CURRENT_BINARY_DIR}/uiautomationcore_stubs.c
20+
${CMAKE_CURRENT_BINARY_DIR}/uiautomationcore.def)
21+
22+
add_idl_headers(uiautomationcore_idlheader uia_classes_client.idl uia_classes_core.idl uia_classes.idl)
23+
add_typelib(uia_classes_client.idl uia_classes_core.idl uia_classes.idl)
24+
set_source_files_properties(rsrc.rc PROPERTIES OBJECT_DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/uia_classes_client.tlb;${CMAKE_CURRENT_BINARY_DIR}/uia_classes_core.tlb;${CMAKE_CURRENT_BINARY_DIR}/uia_classes.tlb")
25+
add_library(uiautomationcore SHARED ${SOURCE})
26+
set_module_type(uiautomationcore win32dll ENTRYPOINT 0)
27+
target_link_libraries(uiautomationcore wine wine_dll_register uuid)
28+
add_dependencies(uiautomationcore psdk uiautomationcore_idlheader)
29+
add_importlibs(uiautomationcore shell32 shlwapi oleaut32 ole32 oleacc combase user32 user32_vista gdi32 ucrtbase advapi32 advapi32_vista kernel32_vista kernel32 ntdll )
30+
add_cd_file(TARGET uiautomationcore DESTINATION reactos/system32 FOR all)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <windows.h>
2+
3+
HRESULT WINAPI DllCanUnloadNow(void)
4+
{
5+
return S_FALSE;
6+
}

dll/win32/uiautomationcore/rsrc.rc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
1 WINE_REGISTRY uia_classes_client_t.rgs
2+
2 WINE_REGISTRY uia_classes_core_t.rgs
3+
3 WINE_REGISTRY uia_classes_t.rgs
4+
5+
4 TYPELIB uia_classes_client.tlb
6+
5 TYPELIB uia_classes_core.tlb
7+
6 TYPELIB uia_classes.tlb
8+
9+
#include "wine/wine_common_ver.rc"
Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
/*
2+
* Copyright 2022 Connor McAdams for CodeWeavers
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17+
*/
18+
19+
#pragma makedep regtypelib
20+
21+
import "oaidl.idl";
22+
import "uiautomationcore.idl";
23+
24+
struct uia_prop_info {
25+
const GUID *guid;
26+
int prop_id;
27+
int prop_type;
28+
int type;
29+
int pattern_id;
30+
};
31+
32+
struct uia_event_info {
33+
const GUID *guid;
34+
int event_id;
35+
int event_arg_type;
36+
};
37+
38+
struct uia_pattern_info {
39+
const GUID *guid;
40+
int pattern_id;
41+
const GUID *pattern_iid;
42+
};
43+
44+
struct uia_control_type_info {
45+
const GUID *guid;
46+
int control_type_id;
47+
};
48+
49+
[
50+
version(1.0),
51+
uuid(8a9ca8eb-856b-43d9-abd7-4a590054064f),
52+
id(1),
53+
]
54+
library UIA_wine_private
55+
{
56+
importlib("stdole2.tlb");
57+
58+
[
59+
object,
60+
uuid(9a754e12-e570-49ab-b223-6f6871007d28),
61+
pointer_default(unique),
62+
]
63+
interface IWineUiaEventAdviser : IUnknown
64+
{
65+
HRESULT advise([in]BOOL advise_added, [in]LONG_PTR huiaevent);
66+
}
67+
68+
[
69+
object,
70+
uuid(5e60162c-ab0e-4e22-a61d-3a3acd442aba),
71+
pointer_default(unique),
72+
oleautomation,
73+
]
74+
interface IWineUiaEvent : IUnknown
75+
{
76+
HRESULT advise_events([in]BOOL advise_added, [in]long adviser_start_idx);
77+
HRESULT set_event_data([in]const GUID *event_guid, [in]long scope, [in]VARIANT runtime_id,
78+
[in]IWineUiaEvent *event_iface);
79+
HRESULT raise_event([in]VARIANT in_node, [in]VARIANT in_nav_start_node);
80+
}
81+
82+
[
83+
object,
84+
uuid(57865755-6c05-4522-98df-4ca658b768ef),
85+
pointer_default(unique),
86+
oleautomation,
87+
]
88+
interface IWineUiaProvider : IUnknown
89+
{
90+
HRESULT get_prop_val([in]const struct uia_prop_info *prop_info, [out, retval]VARIANT *ret_val);
91+
HRESULT get_prov_opts([out, retval]int *out_opts);
92+
HRESULT has_parent([out, retval]BOOL *out_val);
93+
HRESULT navigate([in]int nav_dir, [out, retval]VARIANT *ret_val);
94+
HRESULT get_focus([in]long flags, [out, retval]VARIANT *ret_val);
95+
HRESULT attach_event([in]LONG_PTR huiaevent);
96+
HRESULT respond_to_win_event([in]DWORD win_event, [in]ULONG hwnd, [in]LONG obj_id, [in]LONG child_id,
97+
[in]IProxyProviderWinEventSink *sink);
98+
HRESULT create_node_from_prov([in]long flags, [out, retval]VARIANT *ret_val);
99+
}
100+
101+
[
102+
object,
103+
uuid(bccb6799-d831-4057-bd50-6425823ff1a3),
104+
pointer_default(unique),
105+
oleautomation,
106+
]
107+
interface IWineUiaNode : IUnknown
108+
{
109+
HRESULT get_provider([in]int idx, [out, retval]IWineUiaProvider **out_prov);
110+
HRESULT get_prop_val([in]const GUID *prop_guid, [out, retval]VARIANT *ret_val);
111+
HRESULT disconnect();
112+
HRESULT get_hwnd([out, retval]ULONG *out_hwnd);
113+
HRESULT attach_event([in]long proc_id, [in]long event_cookie, [out, retval]IWineUiaEvent **ret_event);
114+
}
115+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2022 Connor McAdams for CodeWeavers
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17+
*/
18+
19+
#pragma makedep regtypelib
20+
21+
#include "uiautomationclient.idl"
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
HKCR
2+
{
3+
NoRemove Typelib
4+
{
5+
NoRemove '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}'
6+
{
7+
'1.0' = s 'UIAutomationClient'
8+
{
9+
'0' { win64 = s '%MODULE%\2' }
10+
FLAGS = s '0'
11+
}
12+
}
13+
}
14+
NoRemove Interface
15+
{
16+
'{146C3C17-F12E-4E22-8C27-F894B9B79C69}' = s 'IUIAutomationEventHandler'
17+
{
18+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
19+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
20+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
21+
}
22+
'{40CD37D4-C756-4B0C-8C6F-BDDFEEB13B50}' = s 'IUIAutomationPropertyChangedEventHandler'
23+
{
24+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
25+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
26+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
27+
}
28+
'{E81D1B4E-11C5-42F8-9754-E7036C79F054}' = s 'IUIAutomationStructureChangedEventHandler'
29+
{
30+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
31+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
32+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
33+
}
34+
'{C270F6B5-5C69-4290-9745-7A7F97169468}' = s 'IUIAutomationFocusChangedEventHandler'
35+
{
36+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
37+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
38+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
39+
}
40+
'{92FAA680-E704-4156-931A-E32D5BB38F3F}' = s 'IUIAutomationTextEditTextChangedEventHandler'
41+
{
42+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
43+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
44+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
45+
}
46+
'{58EDCA55-2C3E-4980-B1B9-56C17F27A2A0}' = s 'IUIAutomationChangesEventHandler'
47+
{
48+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
49+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
50+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
51+
}
52+
'{C7CB2637-E6C2-4D0C-85DE-4948C02175C7}' = s 'IUIAutomationNotificationEventHandler'
53+
{
54+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
55+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
56+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
57+
}
58+
'{F97933B0-8DAE-4496-8997-5BA015FE0D82}' = s 'IUIAutomationActiveTextPositionChangedEventHandler'
59+
{
60+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
61+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
62+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
63+
}
64+
'{618736E0-3C3D-11CF-810C-00AA00389B71}' = s 'IAccessible'
65+
{
66+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
67+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
68+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
69+
}
70+
'{D6DD68D1-86FD-4332-8666-9ABEDEA2D24C}' = s 'IRawElementProviderSimple'
71+
{
72+
ProxyStubClsid = s '{00020424-0000-0000-C000-000000000046}'
73+
ProxyStubClsid32 = s '{00020424-0000-0000-C000-000000000046}'
74+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}' { val Version = s '1.0' }
75+
}
76+
}
77+
NoRemove CLSID
78+
{
79+
'{FF48DBA4-60EF-4201-AA87-54103EEF594E}' = s 'CUIAutomation'
80+
{
81+
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
82+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}'
83+
Version = s '1.0'
84+
}
85+
'{E22AD333-B25F-460C-83D0-0581107395C9}' = s 'CUIAutomation8'
86+
{
87+
InprocServer32 = s '%MODULE%' { val ThreadingModel = s 'Both' }
88+
TypeLib = s '{944DE083-8FB8-45CF-BCB7-C477ACB2F897}'
89+
Version = s '1.0'
90+
}
91+
}
92+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright 2022 Connor McAdams for CodeWeavers
3+
*
4+
* This library is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU Lesser General Public
6+
* License as published by the Free Software Foundation; either
7+
* version 2.1 of the License, or (at your option) any later version.
8+
*
9+
* This library is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12+
* Lesser General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU Lesser General Public
15+
* License along with this library; if not, write to the Free Software
16+
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17+
*/
18+
19+
#pragma makedep regtypelib
20+
21+
#include "uiautomationcore.idl"

0 commit comments

Comments
 (0)