33 CLSCTX_INPROC_SERVER, &IID_IGlobalInterfaceTable, (
void **)git);
35 WARN(
"Failed to get GlobalInterfaceTable, hr %#lx\n",
hr);
51 hr = IGlobalInterfaceTable_RegisterInterfaceInGlobal(git, iface,
riid, &git_cookie);
54 WARN(
"Failed to register interface in GlobalInterfaceTable, hr %#lx\n",
hr);
58 *ret_cookie = git_cookie;
72 hr = IGlobalInterfaceTable_RevokeInterfaceFromGlobal(git, git_cookie);
74 WARN(
"Failed to revoke interface from GlobalInterfaceTable, hr %#lx\n",
hr);
89 hr = IGlobalInterfaceTable_GetInterfaceFromGlobal(git, git_cookie,
riid, (
void **)&iface);
92 ERR(
"Failed to get interface from Global Interface Table, hr %#lx\n",
hr);
101#define UIA_RUNTIME_ID_PREFIX 42
168 switch (
src->ConditionType)
175 (*dst)->ConditionType =
src->ConditionType;
240 WARN(
"Tried to clone condition with invalid type %d\n",
src->ConditionType);
273 dst->automationElementMode =
src->automationElementMode;
274 if (
src->cProperties)
276 if (!(
dst->pProperties =
calloc(
src->cProperties,
sizeof(*
dst->pProperties))))
282 dst->cProperties =
src->cProperties;
283 memcpy(
dst->pProperties,
src->pProperties,
sizeof(*
dst->pProperties) *
dst->cProperties);
288 if (!(
dst->pPatterns =
calloc(
src->cPatterns,
sizeof(*
dst->pPatterns))))
294 dst->cPatterns =
src->cPatterns;
306 *lbound = *elems = 0;
315 *elems = (ubound - (*lbound)) + 1;
323 *lbound = *elems = 0;
327 WARN(
"Invalid dimensions %d for safearray.\n", dims);
343 ERR(
"Failed to get safearray bounds from sa1 with hr %#lx\n",
hr);
350 ERR(
"Failed to get safearray bounds from sa2 with hr %#lx\n",
hr);
354 if (elems[0] != elems[1])
355 return (elems[0] > elems[1]) - (elems[0] < elems[1]);
357 if (prop_type != UIAutomationType_IntArray)
359 FIXME(
"Array type %#x value comparison currently unimplemented.\n", prop_type);
363 for (
i = 0;
i < elems[0];
i++)
369 ERR(
"Failed to get element from sa1 with hr %#lx\n",
hr);
377 ERR(
"Failed to get element from sa2 with hr %#lx\n",
hr);
448 TRACE(
"hwnd %p already in map %p\n",
hwnd, hwnd_map);
455 TRACE(
"Adding hwnd %p to map %p\n",
hwnd, hwnd_map);
469 TRACE(
"hwnd %p not in map %p, nothing to remove.\n",
hwnd, hwnd_map);
473 TRACE(
"Removing hwnd %p from map %p\n",
hwnd, hwnd_map);
static struct sockaddr_in sa
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
const CLSID CLSID_StdGlobalInterfaceTable
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
HRESULT WINAPI SafeArrayGetUBound(SAFEARRAY *psa, UINT nDim, LONG *plUbound)
HRESULT WINAPI SafeArrayGetElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
UINT WINAPI SafeArrayGetDim(SAFEARRAY *psa)
HRESULT WINAPI SafeArrayGetLBound(SAFEARRAY *psa, UINT nDim, LONG *plLbound)
HRESULT WINAPI SafeArrayPutElement(SAFEARRAY *psa, LONG *rgIndices, void *pvData)
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
#define memcpy(s1, s2, n)
#define RB_ENTRY_VALUE(element, type, field)
static void rb_destroy(struct rb_tree *tree, rb_traverse_func_t *callback, void *context)
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)
enum ConditionType ConditionType
struct UiaCondition ** ppConditions
struct UiaCondition * pViewCondition
enum ConditionType ConditionType
struct UiaCondition * pConditions
enum ConditionType ConditionType
enum ConditionType ConditionType
enum PropertyConditionFlags Flags
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)
#define UIA_RUNTIME_ID_PREFIX
HRESULT register_interface_in_git(IUnknown *iface, REFIID riid, DWORD *ret_cookie)
HRESULT get_interface_in_git(REFIID riid, DWORD git_cookie, IUnknown **ret_iface)
BOOL uia_is_top_level_hwnd(HWND hwnd)
BOOL uia_hwnd_map_check_hwnd(struct rb_tree *hwnd_map, HWND hwnd)
static int uia_hwnd_map_hwnd_compare(const void *key, const struct rb_entry *entry)
HRESULT uia_hwnd_map_add_hwnd(struct rb_tree *hwnd_map, HWND hwnd)
HRESULT get_safearray_bounds(SAFEARRAY *sa, LONG *lbound, LONG *elems)
void uia_hwnd_map_destroy(struct rb_tree *hwnd_map)
HRESULT write_runtime_id_base(SAFEARRAY *sa, HWND hwnd)
static HRESULT get_global_interface_table(IGlobalInterfaceTable **git)
void uia_hwnd_map_remove_hwnd(struct rb_tree *hwnd_map, HWND hwnd)
HRESULT unregister_interface_in_git(DWORD git_cookie)
HRESULT get_safearray_dim_bounds(SAFEARRAY *sa, UINT dim, LONG *lbound, LONG *elems)
static HRESULT uia_condition_clone(struct UiaCondition **dst, struct UiaCondition *src)
static void uia_hwnd_map_free(struct rb_entry *entry, void *context)
static void uia_condition_destroy(struct UiaCondition *cond)
void uia_cache_request_destroy(struct UiaCacheRequest *cache_req)
int uia_compare_safearrays(SAFEARRAY *sa1, SAFEARRAY *sa2, int prop_type)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
void WINAPI VariantInit(VARIANTARG *pVarg)
HRESULT WINAPI VariantCopy(VARIANTARG *pvargDest, VARIANTARG *pvargSrc)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI IsWindowVisible(_In_ HWND)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)