"Implemented" get_accName().

This commit is contained in:
Pietro Gagliardi 2015-02-17 10:35:36 -05:00
parent 7ca8ebadf7
commit bad241bd93
1 changed files with 25 additions and 11 deletions

View File

@ -273,19 +273,33 @@ static HRESULT STDMETHODCALLTYPE tableAccget_accChild(IAccessible *this, VARIANT
static HRESULT STDMETHODCALLTYPE tableAccget_accName(IAccessible *this, VARIANT varChild, BSTR *pszName) static HRESULT STDMETHODCALLTYPE tableAccget_accName(IAccessible *this, VARIANT varChild, BSTR *pszName)
{ {
printf("get_accName() t %p std %p\n", TA->t, TA->std); HRESULT hr;
if (TA->t == NULL || TA->std == NULL) { tableAccWhat what;
printf("returning RPC_E_DISCONNECTED\n");
// TODO set values on error if (pszName == NULL)
return E_POINTER;
*pszName = NULL;
if (TA->t == NULL || TA->std == NULL)
return RPC_E_DISCONNECTED; return RPC_E_DISCONNECTED;
what = TA->what;
hr = normalizeWhat(TA, varChild, &what);
if (hr != S_OK)
return hr;
switch (what.role) {
case ROLE_SYSTEM_TABLE:
// defer to standard accessible object
return IAccessible_get_accName(TA->std, varChild, pszName);
case ROLE_SYSTEM_ROW:
// TODO
return S_FALSE;
case ROLE_SYSTEM_CELL:
// TODO
return S_FALSE;
} }
printf("running main function\n"); // TODO actually do this right
//TODO // TODO un-GetLastError() this
if (pszName == NULL) panic("impossible blah blah blah TODO write this");
return E_POINTER; return E_FAIL;
*pszName = SysAllocString(L"accessible table");
return S_OK;
return IAccessible_get_accName(TA->std, varChild, pszName);
} }
static HRESULT STDMETHODCALLTYPE tableAccget_accValue(IAccessible *this, VARIANT varChild, BSTR *pszValue) static HRESULT STDMETHODCALLTYPE tableAccget_accValue(IAccessible *this, VARIANT varChild, BSTR *pszValue)