Signed-off-by: Connor McAdams cmcadams@codeweavers.com --- dlls/oleacc/client.c | 17 +++++++++++++++-- dlls/oleacc/main.c | 2 +- dlls/oleacc/oleacc_private.h | 1 + 3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c index 93f6b590f78..99be7d9fa37 100644 --- a/dlls/oleacc/client.c +++ b/dlls/oleacc/client.c @@ -34,6 +34,7 @@ typedef struct {
HWND hwnd; HWND enum_pos; + INT role; } Client;
static inline Client* impl_from_Client(IAccessible *iface) @@ -220,7 +221,7 @@ static HRESULT WINAPI Client_get_accRole(IAccessible *iface, VARIANT varID, VARI }
V_VT(pvarRole) = VT_I4; - V_I4(pvarRole) = ROLE_SYSTEM_CLIENT; + V_I4(pvarRole) = This->role; return S_OK; }
@@ -650,7 +651,8 @@ static const IEnumVARIANTVtbl ClientEnumVARIANTVtbl = { Client_EnumVARIANT_Clone };
-HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj) +static HRESULT create_class_object(HWND hwnd, const IID *iid, void **obj, + INT role) { Client *client; HRESULT hres; @@ -668,8 +670,19 @@ HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj) client->ref = 1; client->hwnd = hwnd; client->enum_pos = 0; + client->role = role;
hres = IAccessible_QueryInterface(&client->IAccessible_iface, iid, obj); IAccessible_Release(&client->IAccessible_iface); return hres; } + +HRESULT create_client_object(HWND hwnd, const IID *iid, void **obj) +{ + return create_class_object(hwnd, iid, obj, ROLE_SYSTEM_CLIENT); +} + +HRESULT create_edit_client_object(HWND hwnd, const IID *iid, void **obj) +{ + return create_class_object(hwnd, iid, obj, ROLE_SYSTEM_TEXT); +} diff --git a/dlls/oleacc/main.c b/dlls/oleacc/main.c index db9f646988c..813ebc64a6e 100644 --- a/dlls/oleacc/main.c +++ b/dlls/oleacc/main.c @@ -54,7 +54,7 @@ static struct { {L"#32768", 0x10001, NULL, NULL}, /* menu */ {WC_BUTTONW, 0x10002, NULL, NULL}, {WC_STATICW, 0x10003, NULL, NULL}, - {WC_EDITW, 0x10004, NULL, NULL}, + {WC_EDITW, 0x10004, create_edit_client_object, NULL}, {WC_COMBOBOXW, 0x10005, NULL, NULL}, {L"#32770", 0x10006, NULL, NULL}, /* dialog */ {L"#32771", 0x10007, NULL, NULL}, /* winswitcher */ diff --git a/dlls/oleacc/oleacc_private.h b/dlls/oleacc/oleacc_private.h index 32561ef3d2f..144009b1f33 100644 --- a/dlls/oleacc/oleacc_private.h +++ b/dlls/oleacc/oleacc_private.h @@ -19,6 +19,7 @@ #include "oleacc_classes.h"
HRESULT create_client_object(HWND, const IID*, void**) DECLSPEC_HIDDEN; +HRESULT create_edit_client_object(HWND, const IID*, void**) DECLSPEC_HIDDEN; HRESULT create_window_object(HWND, const IID*, void**) DECLSPEC_HIDDEN; HRESULT get_accpropservices_factory(REFIID, void**) DECLSPEC_HIDDEN;