Piotr Caban : oleacc: Add Client_get_accRole implementaiton.

Alexandre Julliard julliard at winehq.org
Thu May 1 14:40:00 CDT 2014


Module: wine
Branch: master
Commit: 0793010063a0714ec523438f675412aeeb59480c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0793010063a0714ec523438f675412aeeb59480c

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu May  1 16:15:03 2014 +0200

oleacc: Add Client_get_accRole implementaiton.

---

 dlls/oleacc/client.c |   24 ++++++++++++++++++++++--
 1 file changed, 22 insertions(+), 2 deletions(-)

diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c
index a60ec24..e768657 100644
--- a/dlls/oleacc/client.c
+++ b/dlls/oleacc/client.c
@@ -211,8 +211,28 @@ static HRESULT WINAPI Client_get_accRole(IAccessible *iface, VARIANT varID, VARI
 static HRESULT WINAPI Client_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState)
 {
     Client *This = impl_from_Client(iface);
-    FIXME("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarState);
-    return E_NOTIMPL;
+    LONG style;
+
+    TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarState);
+
+    if(convert_child_id(&varID) != CHILDID_SELF) {
+        V_VT(pvarState) = VT_EMPTY;
+        return E_INVALIDARG;
+    }
+
+    V_VT(pvarState) = VT_I4;
+    V_I4(pvarState) = 0;
+
+    style = GetWindowLongW(This->hwnd, GWL_STYLE);
+    if(style & WS_DISABLED)
+        V_I4(pvarState) |= STATE_SYSTEM_UNAVAILABLE;
+    else if(IsWindow(This->hwnd))
+        V_I4(pvarState) |= STATE_SYSTEM_FOCUSABLE;
+    if(GetFocus() == This->hwnd)
+        V_I4(pvarState) |= STATE_SYSTEM_FOCUSED;
+    if(!(style & WS_VISIBLE))
+        V_I4(pvarState) |= STATE_SYSTEM_INVISIBLE;
+    return S_OK;
 }
 
 static HRESULT WINAPI Client_get_accHelp(IAccessible *iface, VARIANT varID, BSTR *pszHelp)




More information about the wine-cvs mailing list