static HRESULT WINAPI Client_get_accHelpTopic(IAccessible *iface, BSTR *pszHelpFile, VARIANT varID, LONG *pidTopic) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%p %s %p)\n", This, pszHelpFile, debugstr_variant(&varID), pidTopic); return E_NOTIMPL; }
static HRESULT WINAPI Client_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%u %x %p)\n", This, iTInfo, lcid, ppTInfo); return E_NOTIMPL; }
static HRESULT WINAPI Client_get_accChild(IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%s %p)\n", This, debugstr_variant(&varChildID), ppdispChild); return E_NOTIMPL; }
static HRESULT WINAPI Client_get_accName(IAccessible *iface, VARIANT varID, BSTR *pszName) { Client *This = impl_from_Client(iface); WCHAR name[1024]; UINT i, len; TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszName); *pszName = NULL; if(convert_child_id(&varID) != CHILDID_SELF || !IsWindow(This->hwnd)) return E_INVALIDARG; len = SendMessageW(This->hwnd, WM_GETTEXT, sizeof(name)/sizeof(WCHAR), (LPARAM)name); if(!len) return S_FALSE; for(i=0; i<len; i++) { if(name[i] == '&') { len--; memmove(name+i, name+i+1, (len-i)*sizeof(WCHAR)); break; } } *pszName = SysAllocStringLen(name, len); return *pszName ? S_OK : E_OUTOFMEMORY; }
static HRESULT WINAPI Client_accLocation(IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID) { Client *This = impl_from_Client(iface); RECT rect; POINT pt; TRACE("(%p)->(%p %p %p %p %s)\n", This, pxLeft, pyTop, pcxWidth, pcyHeight, debugstr_variant(&varID)); *pxLeft = *pyTop = *pcxWidth = *pcyHeight = 0; if(convert_child_id(&varID) != CHILDID_SELF) return E_INVALIDARG; if(!GetClientRect(This->hwnd, &rect)) return S_OK; pt.x = rect.left, pt.y = rect.top; MapWindowPoints(This->hwnd, NULL, &pt, 1); *pxLeft = pt.x; *pyTop = pt.y; pt.x = rect.right; pt.y = rect.bottom; MapWindowPoints(This->hwnd, NULL, &pt, 1); *pcxWidth = pt.x - *pxLeft; *pcyHeight = pt.y - *pyTop; return S_OK; }
static HRESULT WINAPI Client_accHitTest(IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%d %d %p)\n", This, xLeft, yTop, pvarID); return E_NOTIMPL; }
static HRESULT WINAPI Client_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%d %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd); return E_NOTIMPL; }
static HRESULT WINAPI Client_accHitTest(IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID) { Client *This = impl_from_Client(iface); HWND child; POINT pt; TRACE("(%p)->(%d %d %p)\n", This, xLeft, yTop, pvarID); V_VT(pvarID) = VT_I4; V_I4(pvarID) = 0; pt.x = xLeft; pt.y = yTop; if(!IsWindowVisible(This->hwnd) || !ScreenToClient(This->hwnd, &pt)) return S_OK; child = ChildWindowFromPointEx(This->hwnd, pt, CWP_SKIPINVISIBLE); if(!child || child==This->hwnd) return S_OK; V_VT(pvarID) = VT_DISPATCH; return AccessibleObjectFromWindow(child, OBJID_WINDOW, &IID_IDispatch, (void**)&V_DISPATCH(pvarID)); }
static HRESULT WINAPI Client_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState) { Client *This = impl_from_Client(iface); 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_accKeyboardShortcut(IAccessible *iface, VARIANT varID, BSTR *pszKeyboardShortcut) { static const WCHAR shortcut_fmt[] = {'A','l','t','+','!',0}; Client *This = impl_from_Client(iface); WCHAR name[1024]; UINT i, len; TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszKeyboardShortcut); *pszKeyboardShortcut = NULL; if(convert_child_id(&varID) != CHILDID_SELF) return E_INVALIDARG; len = SendMessageW(This->hwnd, WM_GETTEXT, sizeof(name)/sizeof(WCHAR), (LPARAM)name); for(i=0; i<len; i++) { if(name[i] == '&') break; } if(i+1 >= len) return S_FALSE; *pszKeyboardShortcut = SysAllocString(shortcut_fmt); if(!*pszKeyboardShortcut) return E_OUTOFMEMORY; (*pszKeyboardShortcut)[4] = name[i+1]; return S_OK; }
static HRESULT WINAPI Client_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%s %p %u %x %p)\n", This, debugstr_guid(riid), rgszNames, cNames, lcid, rgDispId); return E_NOTIMPL; }
static HRESULT WINAPI Client_accLocation(IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%p %p %p %p %s)\n", This, pxLeft, pyTop, pcxWidth, pcyHeight, debugstr_variant(&varID)); return E_NOTIMPL; }
static ULONG WINAPI Client_AddRef(IAccessible *iface) { Client *This = impl_from_Client(iface); ULONG ref = InterlockedIncrement(&This->ref); TRACE("(%p) ref = %u\n", This, ref); return ref; }
static HRESULT WINAPI Client_Invoke(IAccessible *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid), lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr); return E_NOTIMPL; }
static HRESULT WINAPI Client_get_accParent(IAccessible *iface, IDispatch **ppdispParent) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%p)\n", This, ppdispParent); return AccessibleObjectFromWindow(This->hwnd, OBJID_WINDOW, &IID_IDispatch, (void**)ppdispParent); }
static HRESULT WINAPI Client_get_accChild(IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varChildID), ppdispChild); *ppdispChild = NULL; return E_INVALIDARG; }
static ULONG WINAPI Client_Release(IAccessible *iface) { Client *This = impl_from_Client(iface); ULONG ref = InterlockedDecrement(&This->ref); TRACE("(%p) ref = %u\n", This, ref); if(!ref) heap_free(This); return ref; }
static HRESULT WINAPI Client_get_accHelp(IAccessible *iface, VARIANT varID, BSTR *pszHelp) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszHelp); *pszHelp = NULL; if(convert_child_id(&varID) != CHILDID_SELF) return E_INVALIDARG; return S_FALSE; }
static HRESULT WINAPI Client_get_accChildCount(IAccessible *iface, LONG *pcountChildren) { Client *This = impl_from_Client(iface); HWND cur; TRACE("(%p)->(%p)\n", This, pcountChildren); *pcountChildren = 0; for(cur = GetWindow(This->hwnd, GW_CHILD); cur; cur = GetWindow(cur, GW_HWNDNEXT)) (*pcountChildren)++; return S_OK; }
static HRESULT WINAPI Client_get_accRole(IAccessible *iface, VARIANT varID, VARIANT *pvarRole) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarRole); if(convert_child_id(&varID) != CHILDID_SELF) { V_VT(pvarRole) = VT_EMPTY; return E_INVALIDARG; } V_VT(pvarRole) = VT_I4; V_I4(pvarRole) = ROLE_SYSTEM_CLIENT; return S_OK; }
static HRESULT WINAPI Client_QueryInterface(IAccessible *iface, REFIID riid, void **ppv) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); if(IsEqualIID(riid, &IID_IAccessible) || IsEqualIID(riid, &IID_IDispatch) || IsEqualIID(riid, &IID_IUnknown)) { *ppv = iface; IAccessible_AddRef(iface); return S_OK; } return E_NOINTERFACE; }
static HRESULT WINAPI Client_QueryInterface(IAccessible *iface, REFIID riid, void **ppv) { Client *This = impl_from_Client(iface); TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); if(IsEqualIID(riid, &IID_IAccessible) || IsEqualIID(riid, &IID_IDispatch) || IsEqualIID(riid, &IID_IUnknown)) { *ppv = iface; }else if(IsEqualIID(riid, &IID_IOleWindow)) { *ppv = &This->IOleWindow_iface; }else if(IsEqualIID(riid, &IID_IEnumVARIANT)) { *ppv = &This->IEnumVARIANT_iface; }else { WARN("no interface: %s\n", debugstr_guid(riid)); *ppv = NULL; return E_NOINTERFACE; } IAccessible_AddRef(iface); return S_OK; }
static HRESULT WINAPI Client_get_accParent(IAccessible *iface, IDispatch **ppdispParent) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%p)\n", This, ppdispParent); return E_NOTIMPL; }
static HRESULT WINAPI Client_GetTypeInfoCount(IAccessible *iface, UINT *pctinfo) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%p)\n", This, pctinfo); return E_NOTIMPL; }
static HRESULT WINAPI Client_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&varID), debugstr_w(pszValue)); return E_NOTIMPL; }
static HRESULT WINAPI Client_accDoDefaultAction(IAccessible *iface, VARIANT varID) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%s)\n", This, debugstr_variant(&varID)); return E_NOTIMPL; }
static HRESULT WINAPI Client_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%x %s)\n", This, flagsSelect, debugstr_variant(&varID)); return E_NOTIMPL; }
static HRESULT WINAPI Client_get_accSelection(IAccessible *iface, VARIANT *pvarID) { Client *This = impl_from_Client(iface); FIXME("(%p)->(%p)\n", This, pvarID); return E_NOTIMPL; }