diff options
| author | Pietro Gagliardi <[email protected]> | 2015-02-16 16:56:24 -0500 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-02-16 16:56:24 -0500 |
| commit | 6729c96c1d9f92b24602f896c75c49f6e8a652fa (patch) | |
| tree | 3846dad56117f0712672701385f151c280db7050 /wintable/accessibility.h | |
| parent | 96ef6635e77c3bf2aaa96e1ccdfa959fe88e7f0f (diff) | |
Implemented get_accChildCount().
Diffstat (limited to 'wintable/accessibility.h')
| -rw-r--r-- | wintable/accessibility.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/wintable/accessibility.h b/wintable/accessibility.h index 7b8b876..2bf062b 100644 --- a/wintable/accessibility.h +++ b/wintable/accessibility.h @@ -200,16 +200,27 @@ static HRESULT STDMETHODCALLTYPE tableAccget_accParent(IAccessible *this, IDispa static HRESULT STDMETHODCALLTYPE tableAccget_accChildCount(IAccessible *this, long *pcountChildren) { - if (TA->t == NULL || TA->std == NULL) { - // TODO set values on error + if (pcountChildren == NULL) + return E_POINTER; + // TODO set pcountChildren to zero? + if (TA->t == NULL || TA->std == NULL) return RPC_E_DISCONNECTED; + switch (TA->what.role) { + case ROLE_SYSTEM_TABLE: + // TODO header row + *pcountChildren = (long) (TA->t->count); + return S_OK; + case ROLE_SYSTEM_ROW: + *pcountChildren = (long) (TA->t->nColumns); + return S_OK; + case ROLE_SYSTEM_CELL: + *pcountChildren = 0; + return S_OK; } -//TODO -if (pcountChildren == NULL) -return E_POINTER; -*pcountChildren = 0; -return S_OK; - return IAccessible_get_accChildCount(TA->std, pcountChildren); + // TODO actually do this right + // TODO un-GetLastError() this + panic("impossible blah blah blah TODO write this"); + return E_FAIL; } // TODO [EDGE CASE/NOT DOCUMENTED/CHECK SAMPLE] what happens if CHILDID_SELF is passed? |
