22#include "wine/rbtree.h"
56 case EVENT_OBJECT_FOCUS:
return UIA_AutomationFocusChangedEventId;
57 case EVENT_SYSTEM_ALERT:
return UIA_SystemAlertEventId;
58 case EVENT_OBJECT_SHOW:
return UIA_StructureChangedEventId;
59 case EVENT_OBJECT_DESTROY:
return UIA_StructureChangedEventId;
78 WARN(
"Failed to add hwnd to map, hr %#lx\n",
hr);
137 return (event_id->
proc_id >
event->u.serverside.proc_id) - (event_id->
proc_id <
event->u.serverside.proc_id);
147 0, 0, { (
DWORD_PTR)(__FILE__
": event_map_cs") }
175 if (((
event->scope & subtree_scope) == subtree_scope) &&
event->runtime_id &&
177 event->desktop_subtree_event =
TRUE;
183 if (!(event_entry =
calloc(1,
sizeof(*event_entry))))
189 event_entry->
event_id =
event->event_id;
199 IWineUiaEvent_AddRef(&
event->IWineUiaEvent_iface);
206 event->event_map_entry = event_entry;
241 IWineUiaEvent_Release(&
event->IWineUiaEvent_iface);
248 IWineUiaEvent_Release(&
event->IWineUiaEvent_iface);
256 BOOL clientside_only)
270 for (
i = 0;
i < 2;
i++)
275 if (
i && clientside_only)
294 WARN(
"Event callback failed with hr %#lx\n",
hr);
341 IRawElementProviderSimple_AddRef(
elprov);
377 return IUnknown_QueryInterface(
sink->marshal,
riid,
obj);
381 IProxyProviderWinEventSink_AddRef(iface);
405 IUnknown_Release(
sink->marshal);
426 TRACE(
"%p, %p, %d\n", iface, elprov, event_id);
428 if (event_id !=
sink->event_id)
444 FIXME(
"%p, %p, %d, %p: stub\n", iface, elprov, structure_change_type, runtime_id);
495#define WM_UIA_EVENT_THREAD_STOP (WM_USER + 1)
496#define WM_UIA_EVENT_THREAD_PROCESS_QUEUE (WM_USER + 2)
503 0, 0, { (
DWORD_PTR)(__FILE__
": event_thread_cs") }
592 HUIANODE
node, nav_start_node;
599 WARN(
"Failed to create node from lresult, hr %#lx\n",
hr);
604 if (
event->u.clientside.nav_start_node)
609 WARN(
"Failed to create nav_start_node from lresult, hr %#lx\n",
hr);
650 hr = IWineUiaEvent_raise_event(
event->event->u.serverside.event_iface,
v,
v2);
679 IRawElementProviderSimple *elprov;
689 child_id = in_child_id;
697 hr = IAccessible_get_accChild(acc,
cid, &disp);
699 TRACE(
"get_accChild failed with %#lx!\n",
hr);
703 IAccessible_Release(acc);
704 hr = IDispatch_QueryInterface(disp, &IID_IAccessible, (
void **)&acc);
705 IDispatch_Release(disp);
714 IAccessible_Release(acc);
718 *ret_elprov = elprov;
738 IRawElementProviderSimple *elprov;
765 IRawElementProviderSimple_Release(elprov);
776 win_event->
child_id, &
sink->IProxyProviderWinEventSink_iface);
789 WARN(
"uia_raise_elprov_event_callback failed with hr %#lx\n",
hr);
794 IRawElementProviderSimple_Release(sink_event->
elprov);
799 IProxyProviderWinEventSink_Release(&
sink->IProxyProviderWinEventSink_iface);
816 switch (
event->queue_event_type)
840 WARN(
"uia_com_win_event_callback failed with hr %#lx\n",
hr);
843 (
void *)win_event,
TRUE);
852 WARN(
"Failed to raise event type %d with hr %#lx\n",
event->queue_event_type,
hr);
863 TRACE(
"%p, %ld, %p, %ld, %ld, %ld, %ld\n",
hook,
event_id,
hwnd,
obj_id,
child_id,
thread_id,
event_time);
868 if (!(win_event =
calloc(1,
sizeof(*win_event))))
870 ERR(
"Failed to allocate uia_queue_win_event structure\n");
887 struct list event_queue;
894 hwnd =
CreateWindowW(
L"Message",
NULL, 0, 0, 0, 0, 0,
HWND_MESSAGE,
NULL,
NULL,
NULL);
909 TRACE(
"Event thread started.\n");
924 TRACE(
"Shutting down UI Automation event thread.\n");
950 ready_event, 0,
NULL)))
990 if (!
event->u.clientside.event_thread_started)
993 return event->u.clientside.event_thread_started;
1000 for (
i = 0;
i <
event->event_advisers_count;
i++)
1001 IWineUiaEventAdviser_Release(
event->event_advisers[
i]);
1003 event->event_advisers =
NULL;
1004 event->event_advisers_count =
event->event_advisers_arr_size = 0;
1023 IWineUiaEvent_AddRef(iface);
1054 if (
event->u.clientside.event_thread_started)
1064 if (
event->u.serverside.event_iface)
1065 IWineUiaEvent_Release(
event->u.serverside.event_iface);
1082 TRACE(
"%p, %d, %ld\n",
event, advise_added, adviser_start_idx);
1084 for (
i = adviser_start_idx;
i <
event->event_advisers_count;
i++)
1099 WARN(
"Failed to add event to event map, hr %#lx\n",
hr);
1110 event->event_map_entry =
NULL;
1128 event->scope =
scope;
1136 WARN(
"Failed to copy runtime id, hr %#lx\n",
hr);
1171 IWineUiaEvent_AddRef(&
event->IWineUiaEvent_iface);
1215 static LONG next_event_cookie;
1225 event->scope =
scope;
1226 event->u.clientside.event_callback = cback;
1227 event->u.clientside.callback_data = cback_data;
1265 event->u.serverside.proc_id = process_id;
1280 event->event_advisers_count + 1,
sizeof(*
event->event_advisers)))
1283 event->event_advisers[
event->event_advisers_count] = adviser;
1284 IWineUiaEventAdviser_AddRef(adviser);
1285 event->event_advisers_count++;
1314 IWineUiaEventAdviser_AddRef(iface);
1323 TRACE(
"%p, refcount %ld\n", adv_events,
ref);
1332 TRACE(
"%p, refcount %ld\n", adv_events,
ref);
1338 WARN(
"Failed to revoke advise events interface from GIT\n");
1340 IRawElementProviderAdviseEvents_Release(adv_events->
advise_events);
1351 IRawElementProviderAdviseEvents *advise_events;
1354 TRACE(
"%p, %d, %#Ix\n", adv_events, advise_added, huiaevent);
1366 IRawElementProviderAdviseEvents_AddRef(advise_events);
1370 hr = IRawElementProviderAdviseEvents_AdviseEventAdded(advise_events, event_data->
event_id,
NULL);
1372 hr = IRawElementProviderAdviseEvents_AdviseEventRemoved(advise_events, event_data->
event_id,
NULL);
1374 IRawElementProviderAdviseEvents_Release(advise_events);
1388 IRawElementProviderSimple *elprov;
1392 hr = IRawElementProviderAdviseEvents_QueryInterface(
advise_events, &IID_IRawElementProviderSimple,
1396 ERR(
"Failed to get IRawElementProviderSimple from advise events\n");
1400 hr = IRawElementProviderSimple_get_ProviderOptions(elprov, &prov_opts);
1401 IRawElementProviderSimple_Release(elprov);
1405 if (!(adv_events =
calloc(1,
sizeof(*adv_events))))
1420 adv_events->
ref = 1;
1453 IWineUiaEventAdviser_AddRef(iface);
1462 TRACE(
"%p, refcount %ld\n", adv_events,
ref);
1471 TRACE(
"%p, refcount %ld\n", adv_events,
ref);
1486 TRACE(
"%p, %d, %#Ix\n", adv_events, advise_added, huiaevent);
1504 WARN(
"Failed to set event data on serverside event, hr %#lx\n",
hr);
1509 return IWineUiaEvent_advise_events(adv_events->
event_iface, advise_added, 0);
1528 if (!
event->u.clientside.git_cookie)
1534 &
event->u.clientside.git_cookie);
1539 if (!(adv_events =
calloc(1,
sizeof(*adv_events))))
1543 adv_events->
ref = 1;
1545 IWineUiaEvent_AddRef(serverside_event);
1558 if (
event->u.clientside.git_cookie)
1571 hr = IWineUiaEvent_advise_events(
event_iface, advise_added, start_idx);
1579 int old_event_advisers_count =
event->event_advisers_count;
1586 if (
event->event_advisers_count != old_event_advisers_count)
1630 void *cback_data, HUIAEVENT *huiaevent)
1663 *huiaevent = (HUIAEVENT)
event;
1667 IWineUiaEvent_Release(&
event->IWineUiaEvent_iface);
1682 TRACE(
"(%p, %d, %p, %#x, %p, %d, %p, %p)\n", huianode,
event_id,
callback, scope, prop_ids, prop_ids_count,
1683 cache_req, huiaevent);
1685 if (!huianode || !
callback || !cache_req || !huiaevent)
1689 WARN(
"No event information for event ID %d\n",
event_id);
1694 FIXME(
"Property changed event registration currently unimplemented\n");
1727 if (
event->u.clientside.git_cookie)
1734 IWineUiaEvent_Release(&
event->IWineUiaEvent_iface);
1754 hr =
event->u.clientside.event_callback(
event,
args, out_req, tree_struct);
1756 WARN(
"Event callback failed with hr %#lx\n",
hr);
1764 HUIANODE node2, nav_start_node2;
1769 node2 = nav_start_node2 =
NULL;
1791 queue_event->u.serverside.nav_start_node = nav_start_node2;
1794 IWineUiaEvent_AddRef(&
event->IWineUiaEvent_iface);
1815 HUIANODE *clientside_nav_node_out)
1822 if (clientside_nav_node_out)
1823 *clientside_nav_node_out =
NULL;
1826 assert(clientside_nav_node_out);
1833 if (!
event->runtime_id)
1836 if (
event->desktop_subtree_event)
1851 HUIANODE node2 =
NULL;
1861 if (node_data->
hwnd)
1902 HUIANODE nav_node =
NULL;
1905 if (!event_data->
node)
1934 hr = IRawElementProviderSimple_get_ProviderOptions(
elprov, &prov_opts);
1942 WARN(
"uia_event_for_each failed with hr %#lx\n",
hr);
1959 TRACE(
"(%p, %d)\n", elprov,
id);
1967 FIXME(
"No event info structure for event id %d\n",
id);
1969 WARN(
"Wrong event raising function for event args type %d\n",
event_info->event_arg_type);
static struct sockaddr_in sa
#define InterlockedIncrement
#define InterlockedDecrement
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
static void list_remove(struct list_entry *entry)
static int list_empty(struct list_entry *head)
static void list_add_tail(struct list_entry *head, struct list_entry *entry)
static void list_add_head(struct list_entry *head, struct list_entry *entry)
static void list_init(struct list_entry *head)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(void *reserved, DWORD model)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CoCreateFreeThreadedMarshaler(IUnknown *outer, IUnknown **marshaler)
BOOL WINAPI GetModuleHandleExW(IN DWORD dwFlags, IN LPCWSTR lpwModuleName OPTIONAL, OUT HMODULE *phModule)
VOID WINAPI FreeLibraryAndExitThread(HMODULE hLibModule, DWORD dwExitCode)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI InitOnceExecuteOnce(_Inout_ PINIT_ONCE InitOnce, _In_ __callback PINIT_ONCE_FN InitFn, _Inout_opt_ PVOID Parameter, _Outptr_opt_result_maybenull_ LPVOID *Context)
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
HRESULT WINAPI SafeArrayCopy(SAFEARRAY *psa, SAFEARRAY **ppsaOut)
SAFEARRAY *WINAPI SafeArrayCreateVector(VARTYPE vt, LONG lLbound, ULONG cElements)
HRESULT WINAPI SafeArrayDestroy(SAFEARRAY *psa)
static const char * debugstr_variant(const VARIANT *var)
#define rb_entry(ptr, type, member)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLsizei GLenum GLboolean sink
GLfloat GLfloat GLfloat v2
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
static const event_info_t event_info[]
#define InterlockedCompareExchange
static IPrintDialogCallback callback
static HWINEVENTHOOK(WINAPI *pSetWinEventHook)(DWORD
unsigned __int3264 UINT_PTR
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define IsEqualIID(riid1, riid2)
#define LIST_FOR_EACH_ENTRY_SAFE(cursor, cursor2, list, type, field)
#define LIST_FOR_EACH_SAFE(cursor, cursor2, list)
#define RB_ENTRY_VALUE(element, type, field)
static int rb_put(struct rb_tree *tree, const void *key, struct rb_entry *entry)
static struct rb_entry * rb_get(const struct rb_tree *tree, const void *key)
static void rb_remove(struct rb_tree *tree, struct rb_entry *entry)
static void rb_init(struct rb_tree *tree, rb_compare_func_t compare)
LIST_ENTRY ProcessLocksList
struct uia_event_args * args
struct list event_sink_list_entry
IRawElementProviderSimple * elprov
IRawElementProviderSimple * elprov
struct uia_event_args * args
IRawElementProviderAdviseEvents * advise_events
IWineUiaEventAdviser IWineUiaEventAdviser_iface
struct list serverside_events_list
LONG serverside_event_count
struct rb_tree serverside_event_map
struct list * event_queue
HRESULT(* event_callback)(struct uia_event *, struct uia_event_args *, SAFEARRAY *, BSTR)
struct UiaCacheRequest cache_req
IWineUiaEvent IWineUiaEvent_iface
IWineUiaEvent * event_iface
struct list event_list_entry
IWineUiaNode IWineUiaNode_iface
BOOL refuse_hwnd_node_providers
IProxyProviderWinEventSink IProxyProviderWinEventSink_iface
struct list event_queue_entry
struct uia_queue_event queue_entry
union uia_queue_uia_event::@591 u
struct uia_event_args * args
struct uia_queue_event queue_entry
IWineUiaEventAdviser IWineUiaEventAdviser_iface
IWineUiaEvent * event_iface
DWORD WINAPI WaitForMultipleObjects(IN DWORD nCount, IN CONST HANDLE *lpHandles, IN BOOL bWaitAll, IN DWORD dwMilliseconds)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
int get_node_provider_type_at_idx(struct uia_node *node, int idx)
HRESULT uia_condition_check(HUIANODE node, struct UiaCondition *condition)
HRESULT WINAPI UiaGetRuntimeId(HUIANODE huianode, SAFEARRAY **runtime_id)
HRESULT WINAPI UiaGetUpdatedCache(HUIANODE huianode, struct UiaCacheRequest *cache_req, enum NormalizeState normalize_state, struct UiaCondition *normalize_cond, SAFEARRAY **out_req, BSTR *tree_struct)
BOOL WINAPI UiaNodeRelease(HUIANODE huianode)
HRESULT attach_event_to_uia_node(HUIANODE node, struct uia_event *event)
HRESULT respond_to_win_event_on_node_provider(IWineUiaNode *node, int idx, DWORD win_event, HWND hwnd, LONG obj_id, LONG child_id, IProxyProviderWinEventSink *sink)
HRESULT clone_uia_node(HUIANODE in_node, HUIANODE *out_node)
HRESULT navigate_uia_node(struct uia_node *node, int nav_dir, HUIANODE *out_node)
HRESULT WINAPI UiaNodeFromHandle(HWND hwnd, HUIANODE *huianode)
HRESULT uia_node_from_lresult(LRESULT lr, HUIANODE *huianode, int node_flags)
void uia_node_lresult_release(LRESULT lr)
HRESULT create_uia_node_from_elprov(IRawElementProviderSimple *elprov, HUIANODE *out_node, BOOL get_hwnd_providers, int node_flags)
BOOL uia_condition_matched(HRESULT hr)
BOOL WINAPI UiaHasServerSideProvider(HWND hwnd)
HRESULT uia_com_win_event_callback(DWORD event_id, HWND hwnd, LONG obj_id, LONG child_id, DWORD thread_id, DWORD event_time)
static ULONG WINAPI uia_proxy_win_event_sink_AddRef(IProxyProviderWinEventSink *iface)
static ULONG WINAPI uia_serverside_event_adviser_Release(IWineUiaEventAdviser *iface)
HRESULT uia_event_add_provider_event_adviser(IRawElementProviderAdviseEvents *advise_events, struct uia_event *event)
static void uia_stop_event_thread(void)
static HRESULT WINAPI uia_event_adviser_QueryInterface(IWineUiaEventAdviser *iface, REFIID riid, void **ppv)
static void uia_event_args_release(struct uia_event_args *args)
static const IProxyProviderWinEventSinkVtbl uia_proxy_event_sink_vtbl
static HRESULT create_uia_event(struct uia_event **out_event, LONG event_cookie, int event_type)
HRESULT create_serverside_uia_event(struct uia_event **out_event, LONG process_id, LONG event_cookie)
static HRESULT WINAPI uia_serverside_event_adviser_QueryInterface(IWineUiaEventAdviser *iface, REFIID riid, void **ppv)
#define WM_UIA_EVENT_THREAD_STOP
static ULONG WINAPI uia_event_adviser_AddRef(IWineUiaEventAdviser *iface)
static BOOL uia_win_event_hwnd_map_contains_ancestors(struct rb_tree *hwnd_map, HWND hwnd)
static HRESULT uia_raise_elprov_event(IRawElementProviderSimple *elprov, struct uia_event_args *args)
static void uia_event_map_entry_release(struct uia_event_map_entry *entry)
static void set_refuse_hwnd_providers(struct uia_node *node, BOOL refuse_hwnd_providers)
HRESULT WINAPI UiaRaiseAutomationEvent(IRawElementProviderSimple *elprov, EVENTID id)
static HRESULT uia_raise_clientside_event(struct uia_queue_uia_event *event)
static CRITICAL_SECTION_DEBUG event_thread_cs_debug
static HRESULT uia_event_sink_list_add_event(struct list *sink_events, IRawElementProviderSimple *elprov, struct uia_event_args *args)
static HRESULT uia_event_advise(struct uia_event *event, BOOL advise_added, LONG start_idx)
#define WM_UIA_EVENT_THREAD_PROCESS_QUEUE
static HRESULT uia_win_event_for_each_callback(struct uia_event *event, void *data)
static struct uia_event_adviser * impl_from_IWineUiaEventAdviser(IWineUiaEventAdviser *iface)
static HRESULT uia_event_map_add_event(struct uia_event *event)
static DWORD WINAPI uia_event_thread_proc(void *arg)
static struct uia_proxy_win_event_sink * impl_from_IProxyProviderWinEventSink(IProxyProviderWinEventSink *iface)
static struct uia_queue_event * uia_event_queue_pop(struct list *event_queue)
HRESULT uia_add_clientside_event(HUIANODE huianode, EVENTID event_id, enum TreeScope scope, PROPERTYID *prop_ids, int prop_ids_count, struct UiaCacheRequest *cache_req, SAFEARRAY *rt_id, UiaWineEventCallback *cback, void *cback_data, HUIAEVENT *huiaevent)
static CRITICAL_SECTION event_map_cs
static const IWineUiaEventVtbl uia_event_vtbl
static struct uia_event * impl_from_IWineUiaEvent(IWineUiaEvent *iface)
static int uia_serverside_event_id_compare(const void *key, const struct rb_entry *entry)
static HRESULT create_proxy_win_event_sink(struct uia_proxy_win_event_sink **out_sink, int event_id)
static void uia_event_queue_push(struct uia_queue_event *event, int queue_event_type)
static ULONG WINAPI uia_event_Release(IWineUiaEvent *iface)
static int win_event_to_uia_event_id(int win_event)
static int uia_event_map_id_compare(const void *key, const struct rb_entry *entry)
HRESULT uia_event_add_win_event_hwnd(struct uia_event *event, HWND hwnd)
static HRESULT WINAPI uia_event_QueryInterface(IWineUiaEvent *iface, REFIID riid, void **ppv)
static ULONG WINAPI uia_event_AddRef(IWineUiaEvent *iface)
static void uia_event_clear_advisers(struct uia_event *event)
static HRESULT WINAPI uia_proxy_win_event_sink_AddAutomationEvent(IProxyProviderWinEventSink *iface, IRawElementProviderSimple *elprov, EVENTID event_id)
static SAFEARRAY * uia_desktop_node_rt_id
static HRESULT WINAPI uia_proxy_win_event_sink_QueryInterface(IProxyProviderWinEventSink *iface, REFIID riid, void **obj)
static HRESULT WINAPI uia_proxy_win_event_sink_AddStructureChangedEvent(IProxyProviderWinEventSink *iface, IRawElementProviderSimple *elprov, enum StructureChangeType structure_change_type, SAFEARRAY *runtime_id)
static struct uia_serverside_event_adviser * impl_from_serverside_IWineUiaEventAdviser(IWineUiaEventAdviser *iface)
static ULONG WINAPI uia_proxy_win_event_sink_Release(IProxyProviderWinEventSink *iface)
HRESULT uia_event_check_node_within_event_scope(struct uia_event *event, HUIANODE node, SAFEARRAY *rt_id, HUIANODE *clientside_nav_node_out)
static CRITICAL_SECTION_DEBUG event_map_cs_debug
static SAFEARRAY * uia_get_desktop_rt_id(void)
HRESULT WINAPI UiaRemoveEvent(HUIAEVENT huiaevent)
static HRESULT WINAPI uia_event_set_event_data(IWineUiaEvent *iface, const GUID *event_guid, LONG scope, VARIANT runtime_id, IWineUiaEvent *event_iface)
static struct uia_event_thread event_thread
static ULONG WINAPI uia_serverside_event_adviser_AddRef(IWineUiaEventAdviser *iface)
static BOOL WINAPI uia_init_desktop_rt_id(INIT_ONCE *once, void *param, void **ctx)
static void CALLBACK uia_event_thread_win_event_proc(HWINEVENTHOOK hook, DWORD event_id, HWND hwnd, LONG obj_id, LONG child_id, DWORD thread_id, DWORD event_time)
BOOL uia_clientside_event_start_event_thread(struct uia_event *event)
static HRESULT uia_raise_serverside_event(struct uia_queue_uia_event *event)
static const IWineUiaEventAdviserVtbl uia_event_adviser_vtbl
@ QUEUE_EVENT_TYPE_SERVERSIDE
@ QUEUE_EVENT_TYPE_WIN_EVENT
@ QUEUE_EVENT_TYPE_CLIENTSIDE
static HRESULT WINAPI uia_event_raise_event(IWineUiaEvent *iface, VARIANT in_node, VARIANT in_nav_start_node)
static CRITICAL_SECTION event_thread_cs
static HRESULT WINAPI uia_proxy_win_event_sink_AddAutomationPropertyChangedEvent(IProxyProviderWinEventSink *iface, IRawElementProviderSimple *elprov, PROPERTYID prop_id, VARIANT new_value)
HRESULT create_msaa_provider_from_hwnd(HWND hwnd, int in_child_id, IRawElementProviderSimple **ret_elprov)
static struct uia_event_map_entry * uia_get_event_map_entry_for_event(int event_id)
static HRESULT uia_event_add_event_adviser(IWineUiaEventAdviser *adviser, struct uia_event *event)
HRESULT WINAPI UiaAddEvent(HUIANODE huianode, EVENTID event_id, UiaEventCallback *callback, enum TreeScope scope, PROPERTYID *prop_ids, int prop_ids_count, struct UiaCacheRequest *cache_req, HUIAEVENT *huiaevent)
HRESULT WINAPI UiaEventAddWindow(HUIAEVENT huiaevent, HWND hwnd)
static HRESULT create_clientside_uia_event(struct uia_event **out_event, int event_id, int scope, UiaWineEventCallback *cback, void *cback_data, SAFEARRAY *runtime_id)
static HRESULT WINAPI uia_serverside_event_adviser_advise(IWineUiaEventAdviser *iface, BOOL advise_added, LONG_PTR huiaevent)
static HRESULT uia_raise_elprov_event_callback(struct uia_event *event, void *data)
static struct uia_event * unsafe_impl_from_IWineUiaEvent(IWineUiaEvent *iface)
HRESULT uia_event_advise_node(struct uia_event *event, HUIANODE node)
static struct uia_event_args * create_uia_event_args(const struct uia_event_info *event_info)
static HRESULT WINAPI uia_event_adviser_advise(IWineUiaEventAdviser *iface, BOOL advise_added, LONG_PTR huiaevent)
static BOOL uia_start_event_thread(void)
static ULONG WINAPI uia_event_adviser_Release(IWineUiaEventAdviser *iface)
static const IWineUiaEventAdviserVtbl uia_serverside_event_adviser_vtbl
static BOOL CALLBACK uia_win_event_enum_top_level_hwnds(HWND hwnd, LPARAM lparam)
HRESULT uia_event_for_each(int event_id, UiaWineEventForEachCallback *callback, void *user_data, BOOL clientside_only)
HRESULT uia_event_invoke(HUIANODE node, HUIANODE nav_start_node, struct uia_event_args *args, struct uia_event *event)
static HRESULT uia_clientside_event_callback(struct uia_event *event, struct uia_event_args *args, SAFEARRAY *cache_req, BSTR tree_struct)
static void uia_event_thread_process_queue(struct list *event_queue)
static HRESULT WINAPI uia_event_advise_events(IWineUiaEvent *iface, BOOL advise_added, LONG adviser_start_idx)
HRESULT uia_event_add_serverside_event_adviser(IWineUiaEvent *serverside_event, struct uia_event *event)
int WINAPI UiaLookupId(enum AutomationIdentifierType type, const GUID *guid)
const struct uia_event_info * uia_event_info_from_id(EVENTID event_id)
BOOL uia_hwnd_is_visible(HWND hwnd)
void uia_hwnd_map_init(struct rb_tree *hwnd_map)
HRESULT uia_cache_request_clone(struct UiaCacheRequest *dst, struct UiaCacheRequest *src)
static struct uia_provider * impl_from_IWineUiaProvider(IWineUiaProvider *iface)
HRESULT register_interface_in_git(IUnknown *iface, REFIID riid, DWORD *ret_cookie)
HRESULT create_msaa_provider(IAccessible *acc, LONG child_id, HWND hwnd, BOOL root_acc_known, BOOL is_root_acc, IRawElementProviderSimple **elprov)
HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface)
@ NODE_FLAG_IGNORE_COM_THREADING
BOOL uia_hwnd_map_check_hwnd(struct rb_tree *hwnd_map, HWND hwnd)
HRESULT UiaWineEventCallback(struct uia_event *, struct uia_event_args *, SAFEARRAY *, BSTR)
HRESULT uia_hwnd_map_add_hwnd(struct rb_tree *hwnd_map, HWND hwnd)
LRESULT uia_lresult_from_node(HUIANODE huianode)
void uia_hwnd_map_destroy(struct rb_tree *hwnd_map)
HRESULT write_runtime_id_base(SAFEARRAY *sa, HWND hwnd)
static struct uia_node * impl_from_IWineUiaNode(IWineUiaNode *iface)
HRESULT unregister_interface_in_git(DWORD git_cookie)
HRESULT UiaWineEventForEachCallback(struct uia_event *, void *)
void uia_cache_request_destroy(struct UiaCacheRequest *cache_req)
static void variant_init_i4(VARIANT *v, int val)
int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type)
static BOOL uia_array_reserve(void **elements, SIZE_T *capacity, SIZE_T count, SIZE_T size)
@ ProviderOptions_ServerSideProvider
@ ProviderOptions_UseComThreading
@ NavigateDirection_Parent
void WINAPI UiaEventCallback(struct UiaEventArgs *pArgs, SAFEARRAY *pRequestedData, BSTR pTreeStructure)
@ EventArgsType_PropertyChanged
@ AutomationIdentifierType_Event
void WINAPI VariantInit(VARIANTARG *pVarg)
HWINEVENTHOOK WINAPI SetWinEventHook(UINT, UINT, HMODULE, WINEVENTPROC, DWORD, DWORD, UINT)
BOOL WINAPI UnhookWinEvent(HWINEVENTHOOK)
#define WINEVENT_OUTOFCONTEXT
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define INIT_ONCE_STATIC_INIT
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
#define CreateWindowW(a, b, c, d, e, f, g, h, i, j, k)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
BOOL WINAPI DestroyWindow(_In_ HWND)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)