From 3143ecdae32270bfedc31157d61683742e95f4ac Mon Sep 17 00:00:00 2001
From: Vijay Kiran Kamuju <infyquest@gmail.com>
Date: Sun, 17 Jan 2021 18:43:09 +0100
Subject: [PATCH] uiautomationcore: Add stub UiaRegisterProviderCallback
 function

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50508
Signed-off-by: Vijay Kiran Kamuju <infyquest@gmail.com>
---
 dlls/uiautomationcore/uia_main.c            |  5 +++++
 dlls/uiautomationcore/uiautomationcore.spec |  2 +-
 include/uiautomationcoreapi.h               | 10 ++++++++++
 3 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/dlls/uiautomationcore/uia_main.c b/dlls/uiautomationcore/uia_main.c
index f0d8247724d..77460aa174c 100644
--- a/dlls/uiautomationcore/uia_main.c
+++ b/dlls/uiautomationcore/uia_main.c
@@ -94,6 +94,11 @@ HRESULT WINAPI UiaRaiseAutomationEvent(IRawElementProviderSimple *provider, EVEN
     return S_OK;
 }
 
+void WINAPI UiaRegisterProviderCallback(UiaProviderCallback *callback)
+{
+    FIXME("(%p): stub\n", callback);
+}
+
 HRESULT WINAPI UiaHostProviderFromHwnd(HWND hwnd, IRawElementProviderSimple **provider)
 {
     FIXME("(%p, %p): stub\n", hwnd, provider);
diff --git a/dlls/uiautomationcore/uiautomationcore.spec b/dlls/uiautomationcore/uiautomationcore.spec
index 53ef893064c..5da89c3451c 100644
--- a/dlls/uiautomationcore/uiautomationcore.spec
+++ b/dlls/uiautomationcore/uiautomationcore.spec
@@ -91,7 +91,7 @@
 #@ stub UiaRaiseNotificationEvent
 @ stub UiaRaiseStructureChangedEvent
 #@ stub UiaRaiseTextEditTextChangedEvent
-@ stub UiaRegisterProviderCallback
+@ stdcall UiaRegisterProviderCallback(ptr)
 @ stub UiaRemoveEvent
 @ stdcall UiaReturnRawElementProvider(long long long ptr)
 @ stub UiaSetFocus
diff --git a/include/uiautomationcoreapi.h b/include/uiautomationcoreapi.h
index 0acdc29e0eb..46804d22daa 100644
--- a/include/uiautomationcoreapi.h
+++ b/include/uiautomationcoreapi.h
@@ -52,6 +52,16 @@ enum AutomationIdentifierType
     AutomationIdentifierType_Style
 };
 
+enum ProviderType
+{
+    ProviderType_BaseHwnd,
+    ProviderType_Proxy,
+    ProviderType_NonClientArea
+};
+
+typedef WINAPI (SAFEARRAY *UiaProviderCallback)(HWND hwnd, ProviderType providerType);
+void WINAPI UiaRegisterProviderCallback(UiaProviderCallback *pCallback);
+
 HRESULT WINAPI UiaGetReservedMixedAttributeValue(IUnknown **value);
 HRESULT WINAPI UiaGetReservedNotSupportedValue(IUnknown **value);
 int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid);
-- 
2.30.0

