ReactOS 0.4.15-dev-7711-g5627da4
client.c File Reference
#include "oleacc_private.h"
#include "wine/debug.h"
#include "wine/heap.h"
Include dependency graph for client.c:

Go to the source code of this file.

Classes

struct  Client
 

Macros

#define COBJMACROS
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (oleacc)
 
static Clientimpl_from_Client (IAccessible *iface)
 
static HRESULT WINAPI Client_QueryInterface (IAccessible *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Client_AddRef (IAccessible *iface)
 
static ULONG WINAPI Client_Release (IAccessible *iface)
 
static HRESULT WINAPI Client_GetTypeInfoCount (IAccessible *iface, UINT *pctinfo)
 
static HRESULT WINAPI Client_GetTypeInfo (IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
static HRESULT WINAPI Client_GetIDsOfNames (IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
static HRESULT WINAPI Client_Invoke (IAccessible *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
static HRESULT WINAPI Client_get_accParent (IAccessible *iface, IDispatch **ppdispParent)
 
static HRESULT WINAPI Client_get_accChildCount (IAccessible *iface, LONG *pcountChildren)
 
static HRESULT WINAPI Client_get_accChild (IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild)
 
static HRESULT WINAPI Client_get_accName (IAccessible *iface, VARIANT varID, BSTR *pszName)
 
static HRESULT WINAPI Client_get_accValue (IAccessible *iface, VARIANT varID, BSTR *pszValue)
 
static HRESULT WINAPI Client_get_accDescription (IAccessible *iface, VARIANT varID, BSTR *pszDescription)
 
static HRESULT WINAPI Client_get_accRole (IAccessible *iface, VARIANT varID, VARIANT *pvarRole)
 
static HRESULT WINAPI Client_get_accState (IAccessible *iface, VARIANT varID, VARIANT *pvarState)
 
static HRESULT WINAPI Client_get_accHelp (IAccessible *iface, VARIANT varID, BSTR *pszHelp)
 
static HRESULT WINAPI Client_get_accHelpTopic (IAccessible *iface, BSTR *pszHelpFile, VARIANT varID, LONG *pidTopic)
 
static HRESULT WINAPI Client_get_accKeyboardShortcut (IAccessible *iface, VARIANT varID, BSTR *pszKeyboardShortcut)
 
static HRESULT WINAPI Client_get_accFocus (IAccessible *iface, VARIANT *pvarID)
 
static HRESULT WINAPI Client_get_accSelection (IAccessible *iface, VARIANT *pvarID)
 
static HRESULT WINAPI Client_get_accDefaultAction (IAccessible *iface, VARIANT varID, BSTR *pszDefaultAction)
 
static HRESULT WINAPI Client_accSelect (IAccessible *iface, LONG flagsSelect, VARIANT varID)
 
static HRESULT WINAPI Client_accLocation (IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID)
 
static HRESULT WINAPI Client_accNavigate (IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd)
 
static HRESULT WINAPI Client_accHitTest (IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID)
 
static HRESULT WINAPI Client_accDoDefaultAction (IAccessible *iface, VARIANT varID)
 
static HRESULT WINAPI Client_put_accName (IAccessible *iface, VARIANT varID, BSTR pszName)
 
static HRESULT WINAPI Client_put_accValue (IAccessible *iface, VARIANT varID, BSTR pszValue)
 
static Clientimpl_from_Client_OleWindow (IOleWindow *iface)
 
static HRESULT WINAPI Client_OleWindow_QueryInterface (IOleWindow *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Client_OleWindow_AddRef (IOleWindow *iface)
 
static ULONG WINAPI Client_OleWindow_Release (IOleWindow *iface)
 
static HRESULT WINAPI Client_OleWindow_GetWindow (IOleWindow *iface, HWND *phwnd)
 
static HRESULT WINAPI Client_OleWindow_ContextSensitiveHelp (IOleWindow *iface, BOOL fEnterMode)
 
static Clientimpl_from_Client_EnumVARIANT (IEnumVARIANT *iface)
 
static HRESULT WINAPI Client_EnumVARIANT_QueryInterface (IEnumVARIANT *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI Client_EnumVARIANT_AddRef (IEnumVARIANT *iface)
 
static ULONG WINAPI Client_EnumVARIANT_Release (IEnumVARIANT *iface)
 
static HRESULT WINAPI Client_EnumVARIANT_Next (IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched)
 
static HRESULT WINAPI Client_EnumVARIANT_Skip (IEnumVARIANT *iface, ULONG celt)
 
static HRESULT WINAPI Client_EnumVARIANT_Reset (IEnumVARIANT *iface)
 
static HRESULT WINAPI Client_EnumVARIANT_Clone (IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
 
HRESULT create_client_object (HWND hwnd, const IID *iid, void **obj)
 

Variables

static const IAccessibleVtbl ClientVtbl
 
static const IOleWindowVtbl ClientOleWindowVtbl
 
static const IEnumVARIANTVtbl ClientEnumVARIANTVtbl
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 19 of file client.c.

Function Documentation

◆ Client_accDoDefaultAction()

static HRESULT WINAPI Client_accDoDefaultAction ( IAccessible iface,
VARIANT  varID 
)
static

Definition at line 403 of file client.c.

404{
405 Client *This = impl_from_Client(iface);
406 FIXME("(%p)->(%s)\n", This, debugstr_variant(&varID));
407 return E_NOTIMPL;
408}
#define FIXME(fmt,...)
Definition: debug.h:111
#define E_NOTIMPL
Definition: ddrawi.h:99
static Client * impl_from_Client(IAccessible *iface)
Definition: client.c:39
static const char * debugstr_variant(const VARIANT *var)
Definition: container.c:46
Definition: client.c:28

◆ Client_accHitTest()

static HRESULT WINAPI Client_accHitTest ( IAccessible iface,
LONG  xLeft,
LONG  yTop,
VARIANT pvarID 
)
static

Definition at line 377 of file client.c.

379{
380 Client *This = impl_from_Client(iface);
381 HWND child;
382 POINT pt;
383
384 TRACE("(%p)->(%d %d %p)\n", This, xLeft, yTop, pvarID);
385
386 V_VT(pvarID) = VT_I4;
387 V_I4(pvarID) = 0;
388
389 pt.x = xLeft;
390 pt.y = yTop;
391 if(!IsWindowVisible(This->hwnd) || !ScreenToClient(This->hwnd, &pt))
392 return S_OK;
393
395 if(!child || child==This->hwnd)
396 return S_OK;
397
398 V_VT(pvarID) = VT_DISPATCH;
400 &IID_IDispatch, (void**)&V_DISPATCH(pvarID));
401}
@ VT_I4
Definition: compat.h:2298
@ VT_DISPATCH
Definition: compat.h:2304
HRESULT WINAPI AccessibleObjectFromWindow(HWND hwnd, DWORD dwObjectID, REFIID riid, void **ppvObject)
Definition: main.c:349
#define pt(x, y)
Definition: drawing.c:79
#define S_OK
Definition: intsafe.h:52
static HWND child
Definition: cursoricon.c:298
#define V_VT(A)
Definition: oleauto.h:211
#define V_I4(A)
Definition: oleauto.h:247
#define V_DISPATCH(A)
Definition: oleauto.h:239
const GUID IID_IDispatch
#define TRACE(s)
Definition: solgame.cpp:4
#define OBJID_WINDOW
Definition: winable.h:15
HWND WINAPI ChildWindowFromPointEx(_In_ HWND, _In_ POINT, _In_ UINT)
#define CWP_SKIPINVISIBLE
Definition: winuser.h:208
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)

◆ Client_accLocation()

static HRESULT WINAPI Client_accLocation ( IAccessible iface,
LONG pxLeft,
LONG pyTop,
LONG pcxWidth,
LONG pcyHeight,
VARIANT  varID 
)
static

Definition at line 338 of file client.c.

340{
341 Client *This = impl_from_Client(iface);
342 RECT rect;
343 POINT pt;
344
345 TRACE("(%p)->(%p %p %p %p %s)\n", This, pxLeft, pyTop,
346 pcxWidth, pcyHeight, debugstr_variant(&varID));
347
348 *pxLeft = *pyTop = *pcxWidth = *pcyHeight = 0;
349 if(convert_child_id(&varID) != CHILDID_SELF)
350 return E_INVALIDARG;
351
352 if(!GetClientRect(This->hwnd, &rect))
353 return S_OK;
354
355 pt.x = rect.left;
356 pt.y = rect.top;
357 MapWindowPoints(This->hwnd, NULL, &pt, 1);
358 *pxLeft = pt.x;
359 *pyTop = pt.y;
360
361 pt.x = rect.right;
362 pt.y = rect.bottom;
363 MapWindowPoints(This->hwnd, NULL, &pt, 1);
364 *pcxWidth = pt.x - *pxLeft;
365 *pcyHeight = pt.y - *pyTop;
366 return S_OK;
367}
#define E_INVALIDARG
Definition: ddrawi.h:101
#define NULL
Definition: types.h:112
int convert_child_id(VARIANT *v)
Definition: main.c:100
& rect
Definition: startmenu.cpp:1413
#define CHILDID_SELF
Definition: winable.h:14
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)

◆ Client_accNavigate()

static HRESULT WINAPI Client_accNavigate ( IAccessible iface,
LONG  navDir,
VARIANT  varStart,
VARIANT pvarEnd 
)
static

Definition at line 369 of file client.c.

371{
372 Client *This = impl_from_Client(iface);
373 FIXME("(%p)->(%d %s %p)\n", This, navDir, debugstr_variant(&varStart), pvarEnd);
374 return E_NOTIMPL;
375}

◆ Client_accSelect()

static HRESULT WINAPI Client_accSelect ( IAccessible iface,
LONG  flagsSelect,
VARIANT  varID 
)
static

Definition at line 331 of file client.c.

332{
333 Client *This = impl_from_Client(iface);
334 FIXME("(%p)->(%x %s)\n", This, flagsSelect, debugstr_variant(&varID));
335 return E_NOTIMPL;
336}

◆ Client_AddRef()

static ULONG WINAPI Client_AddRef ( IAccessible iface)
static

Definition at line 68 of file client.c.

69{
72
73 TRACE("(%p) ref = %u\n", This, ref);
74 return ref;
75}
#define InterlockedIncrement
Definition: armddk.h:53
Definition: send.c:48
uint32_t ULONG
Definition: typedefs.h:59

◆ Client_EnumVARIANT_AddRef()

static ULONG WINAPI Client_EnumVARIANT_AddRef ( IEnumVARIANT iface)
static

Definition at line 514 of file client.c.

515{
517 return IAccessible_AddRef(&This->IAccessible_iface);
518}
static Client * impl_from_Client_EnumVARIANT(IEnumVARIANT *iface)
Definition: client.c:503

◆ Client_EnumVARIANT_Clone()

static HRESULT WINAPI Client_EnumVARIANT_Clone ( IEnumVARIANT iface,
IEnumVARIANT **  ppEnum 
)
static

Definition at line 608 of file client.c.

609{
611 FIXME("(%p)->(%p)\n", This, ppEnum);
612 return E_NOTIMPL;
613}

◆ Client_EnumVARIANT_Next()

static HRESULT WINAPI Client_EnumVARIANT_Next ( IEnumVARIANT iface,
ULONG  celt,
VARIANT rgVar,
ULONG pCeltFetched 
)
static

Definition at line 526 of file client.c.

528{
530 HWND cur = This->enum_pos, next;
531 ULONG fetched = 0;
532 HRESULT hr;
533
534 TRACE("(%p)->(%u %p %p)\n", This, celt, rgVar, pCeltFetched);
535
536 if(!celt) {
537 if(pCeltFetched)
538 *pCeltFetched = 0;
539 return S_OK;
540 }
541
542 if(!This->enum_pos)
543 next = GetWindow(This->hwnd, GW_CHILD);
544 else
545 next = GetWindow(This->enum_pos, GW_HWNDNEXT);
546
547 while(next) {
548 cur = next;
549
550 V_VT(rgVar+fetched) = VT_DISPATCH;
552 &IID_IDispatch, (void**)&V_DISPATCH(rgVar+fetched));
553 if(FAILED(hr)) {
554 V_VT(rgVar+fetched) = VT_EMPTY;
555 while(fetched > 0) {
556 VariantClear(rgVar+fetched-1);
557 fetched--;
558 }
559 if(pCeltFetched)
560 *pCeltFetched = 0;
561 return hr;
562 }
563 fetched++;
564 if(fetched == celt)
565 break;
566
568 }
569
570 This->enum_pos = cur;
571 if(pCeltFetched)
572 *pCeltFetched = fetched;
573 return celt == fetched ? S_OK : S_FALSE;
574}
@ VT_EMPTY
Definition: compat.h:2295
FxCollectionEntry * cur
#define FAILED(hr)
Definition: intsafe.h:51
static unsigned __int64 next
Definition: rand_nt.c:6
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
Definition: variant.c:648
#define S_FALSE
Definition: winerror.h:2357
#define GW_HWNDNEXT
Definition: winuser.h:761
HWND WINAPI GetWindow(_In_ HWND, _In_ UINT)
#define GW_CHILD
Definition: winuser.h:763

◆ Client_EnumVARIANT_QueryInterface()

static HRESULT WINAPI Client_EnumVARIANT_QueryInterface ( IEnumVARIANT iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 508 of file client.c.

509{
511 return IAccessible_QueryInterface(&This->IAccessible_iface, riid, ppv);
512}
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39

◆ Client_EnumVARIANT_Release()

static ULONG WINAPI Client_EnumVARIANT_Release ( IEnumVARIANT iface)
static

Definition at line 520 of file client.c.

521{
523 return IAccessible_Release(&This->IAccessible_iface);
524}

◆ Client_EnumVARIANT_Reset()

static HRESULT WINAPI Client_EnumVARIANT_Reset ( IEnumVARIANT iface)
static

Definition at line 598 of file client.c.

599{
601
602 TRACE("(%p)\n", This);
603
604 This->enum_pos = 0;
605 return S_OK;
606}

◆ Client_EnumVARIANT_Skip()

static HRESULT WINAPI Client_EnumVARIANT_Skip ( IEnumVARIANT iface,
ULONG  celt 
)
static

Definition at line 576 of file client.c.

577{
579 HWND next;
580
581 TRACE("(%p)->(%u)\n", This, celt);
582
583 while(celt) {
584 if(!This->enum_pos)
585 next = GetWindow(This->hwnd, GW_CHILD);
586 else
587 next = GetWindow(This->enum_pos, GW_HWNDNEXT);
588 if(!next)
589 return S_FALSE;
590
591 This->enum_pos = next;
592 celt--;
593 }
594
595 return S_OK;
596}

◆ Client_get_accChild()

static HRESULT WINAPI Client_get_accChild ( IAccessible iface,
VARIANT  varChildID,
IDispatch **  ppdispChild 
)
static

Definition at line 147 of file client.c.

149{
150 Client *This = impl_from_Client(iface);
151
152 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varChildID), ppdispChild);
153
154 *ppdispChild = NULL;
155 return E_INVALIDARG;
156}

◆ Client_get_accChildCount()

static HRESULT WINAPI Client_get_accChildCount ( IAccessible iface,
LONG pcountChildren 
)
static

Definition at line 133 of file client.c.

134{
135 Client *This = impl_from_Client(iface);
136 HWND cur;
137
138 TRACE("(%p)->(%p)\n", This, pcountChildren);
139
140 *pcountChildren = 0;
142 (*pcountChildren)++;
143
144 return S_OK;
145}

◆ Client_get_accDefaultAction()

static HRESULT WINAPI Client_get_accDefaultAction ( IAccessible iface,
VARIANT  varID,
BSTR pszDefaultAction 
)
static

Definition at line 318 of file client.c.

320{
321 Client *This = impl_from_Client(iface);
322
323 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszDefaultAction);
324
325 *pszDefaultAction = NULL;
326 if(convert_child_id(&varID) != CHILDID_SELF)
327 return E_INVALIDARG;
328 return S_FALSE;
329}

◆ Client_get_accDescription()

static HRESULT WINAPI Client_get_accDescription ( IAccessible iface,
VARIANT  varID,
BSTR pszDescription 
)
static

Definition at line 198 of file client.c.

200{
201 Client *This = impl_from_Client(iface);
202
203 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszDescription);
204
205 *pszDescription = NULL;
206 if(convert_child_id(&varID) != CHILDID_SELF)
207 return E_INVALIDARG;
208 return S_FALSE;
209}

◆ Client_get_accFocus()

static HRESULT WINAPI Client_get_accFocus ( IAccessible iface,
VARIANT pvarID 
)
static

Definition at line 304 of file client.c.

305{
306 Client *This = impl_from_Client(iface);
307 FIXME("(%p)->(%p)\n", This, pvarID);
308 return E_NOTIMPL;
309}

◆ Client_get_accHelp()

static HRESULT WINAPI Client_get_accHelp ( IAccessible iface,
VARIANT  varID,
BSTR pszHelp 
)
static

Definition at line 254 of file client.c.

255{
256 Client *This = impl_from_Client(iface);
257
258 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszHelp);
259
260 *pszHelp = NULL;
261 if(convert_child_id(&varID) != CHILDID_SELF)
262 return E_INVALIDARG;
263 return S_FALSE;
264}

◆ Client_get_accHelpTopic()

static HRESULT WINAPI Client_get_accHelpTopic ( IAccessible iface,
BSTR pszHelpFile,
VARIANT  varID,
LONG pidTopic 
)
static

Definition at line 266 of file client.c.

268{
269 Client *This = impl_from_Client(iface);
270 FIXME("(%p)->(%p %s %p)\n", This, pszHelpFile, debugstr_variant(&varID), pidTopic);
271 return E_NOTIMPL;
272}

◆ Client_get_accKeyboardShortcut()

static HRESULT WINAPI Client_get_accKeyboardShortcut ( IAccessible iface,
VARIANT  varID,
BSTR pszKeyboardShortcut 
)
static

Definition at line 274 of file client.c.

276{
277 static const WCHAR shortcut_fmt[] = {'A','l','t','+','!',0};
278 Client *This = impl_from_Client(iface);
279 WCHAR name[1024];
280 UINT i, len;
281
282 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszKeyboardShortcut);
283
284 *pszKeyboardShortcut = NULL;
285 if(convert_child_id(&varID) != CHILDID_SELF)
286 return E_INVALIDARG;
287
289 for(i=0; i<len; i++) {
290 if(name[i] == '&')
291 break;
292 }
293 if(i+1 >= len)
294 return S_FALSE;
295
296 *pszKeyboardShortcut = SysAllocString(shortcut_fmt);
297 if(!*pszKeyboardShortcut)
298 return E_OUTOFMEMORY;
299
300 (*pszKeyboardShortcut)[4] = name[i+1];
301 return S_OK;
302}
#define ARRAY_SIZE(A)
Definition: main.h:33
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
GLenum GLsizei len
Definition: glext.h:6722
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
BSTR WINAPI SysAllocString(LPCOLESTR str)
Definition: oleaut.c:238
Definition: name.c:39
LONG_PTR LPARAM
Definition: windef.h:208
#define WM_GETTEXT
Definition: winuser.h:1617
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ Client_get_accName()

static HRESULT WINAPI Client_get_accName ( IAccessible iface,
VARIANT  varID,
BSTR pszName 
)
static

Definition at line 158 of file client.c.

159{
160 Client *This = impl_from_Client(iface);
161 WCHAR name[1024];
162 UINT i, len;
163
164 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszName);
165
166 *pszName = NULL;
167 if(convert_child_id(&varID) != CHILDID_SELF || !IsWindow(This->hwnd))
168 return E_INVALIDARG;
169
171 if(!len)
172 return S_FALSE;
173
174 for(i=0; i<len; i++) {
175 if(name[i] == '&') {
176 len--;
177 memmove(name+i, name+i+1, (len-i)*sizeof(WCHAR));
178 break;
179 }
180 }
181
182 *pszName = SysAllocStringLen(name, len);
183 return *pszName ? S_OK : E_OUTOFMEMORY;
184}
#define memmove(s1, s2, n)
Definition: mkisofs.h:881
BSTR WINAPI SysAllocStringLen(const OLECHAR *str, unsigned int len)
Definition: oleaut.c:339
BOOL WINAPI IsWindow(_In_opt_ HWND)

◆ Client_get_accParent()

static HRESULT WINAPI Client_get_accParent ( IAccessible iface,
IDispatch **  ppdispParent 
)
static

Definition at line 123 of file client.c.

124{
125 Client *This = impl_from_Client(iface);
126
127 TRACE("(%p)->(%p)\n", This, ppdispParent);
128
130 &IID_IDispatch, (void**)ppdispParent);
131}

◆ Client_get_accRole()

static HRESULT WINAPI Client_get_accRole ( IAccessible iface,
VARIANT  varID,
VARIANT pvarRole 
)
static

Definition at line 211 of file client.c.

212{
213 Client *This = impl_from_Client(iface);
214
215 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarRole);
216
217 if(convert_child_id(&varID) != CHILDID_SELF) {
218 V_VT(pvarRole) = VT_EMPTY;
219 return E_INVALIDARG;
220 }
221
222 V_VT(pvarRole) = VT_I4;
223 V_I4(pvarRole) = ROLE_SYSTEM_CLIENT;
224 return S_OK;
225}

◆ Client_get_accSelection()

static HRESULT WINAPI Client_get_accSelection ( IAccessible iface,
VARIANT pvarID 
)
static

Definition at line 311 of file client.c.

312{
313 Client *This = impl_from_Client(iface);
314 FIXME("(%p)->(%p)\n", This, pvarID);
315 return E_NOTIMPL;
316}

◆ Client_get_accState()

static HRESULT WINAPI Client_get_accState ( IAccessible iface,
VARIANT  varID,
VARIANT pvarState 
)
static

Definition at line 227 of file client.c.

228{
229 Client *This = impl_from_Client(iface);
230 LONG style;
231
232 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pvarState);
233
234 if(convert_child_id(&varID) != CHILDID_SELF) {
235 V_VT(pvarState) = VT_EMPTY;
236 return E_INVALIDARG;
237 }
238
239 V_VT(pvarState) = VT_I4;
240 V_I4(pvarState) = 0;
241
243 if(style & WS_DISABLED)
244 V_I4(pvarState) |= STATE_SYSTEM_UNAVAILABLE;
245 else if(IsWindow(This->hwnd))
246 V_I4(pvarState) |= STATE_SYSTEM_FOCUSABLE;
247 if(GetFocus() == This->hwnd)
248 V_I4(pvarState) |= STATE_SYSTEM_FOCUSED;
249 if(!(style & WS_VISIBLE))
250 V_I4(pvarState) |= STATE_SYSTEM_INVISIBLE;
251 return S_OK;
252}
Arabic default style
Definition: afstyles.h:94
#define WS_VISIBLE
Definition: pedump.c:620
long LONG
Definition: pedump.c:60
#define WS_DISABLED
Definition: pedump.c:621
HWND WINAPI GetFocus(void)
Definition: window.c:1893
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define STATE_SYSTEM_FOCUSED
Definition: winuser.h:2863
#define STATE_SYSTEM_FOCUSABLE
Definition: winuser.h:2881
#define STATE_SYSTEM_INVISIBLE
Definition: winuser.h:2876
#define STATE_SYSTEM_UNAVAILABLE
Definition: winuser.h:2861
#define GWL_STYLE
Definition: winuser.h:851

◆ Client_get_accValue()

static HRESULT WINAPI Client_get_accValue ( IAccessible iface,
VARIANT  varID,
BSTR pszValue 
)
static

Definition at line 186 of file client.c.

187{
188 Client *This = impl_from_Client(iface);
189
190 TRACE("(%p)->(%s %p)\n", This, debugstr_variant(&varID), pszValue);
191
192 *pszValue = NULL;
193 if(convert_child_id(&varID) != CHILDID_SELF)
194 return E_INVALIDARG;
195 return S_FALSE;
196}

◆ Client_GetIDsOfNames()

static HRESULT WINAPI Client_GetIDsOfNames ( IAccessible iface,
REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
static

Definition at line 104 of file client.c.

106{
107 Client *This = impl_from_Client(iface);
108 FIXME("(%p)->(%s %p %u %x %p)\n", This, debugstr_guid(riid),
109 rgszNames, cNames, lcid, rgDispId);
110 return E_NOTIMPL;
111}
#define debugstr_guid
Definition: kernel32.h:35

◆ Client_GetTypeInfo()

static HRESULT WINAPI Client_GetTypeInfo ( IAccessible iface,
UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
static

Definition at line 96 of file client.c.

98{
100 FIXME("(%p)->(%u %x %p)\n", This, iTInfo, lcid, ppTInfo);
101 return E_NOTIMPL;
102}

◆ Client_GetTypeInfoCount()

static HRESULT WINAPI Client_GetTypeInfoCount ( IAccessible iface,
UINT pctinfo 
)
static

Definition at line 89 of file client.c.

90{
92 FIXME("(%p)->(%p)\n", This, pctinfo);
93 return E_NOTIMPL;
94}

◆ Client_Invoke()

static HRESULT WINAPI Client_Invoke ( IAccessible iface,
DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
static

Definition at line 113 of file client.c.

116{
117 Client *This = impl_from_Client(iface);
118 FIXME("(%p)->(%x %s %x %x %p %p %p %p)\n", This, dispIdMember, debugstr_guid(riid),
119 lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
120 return E_NOTIMPL;
121}
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531

◆ Client_OleWindow_AddRef()

static ULONG WINAPI Client_OleWindow_AddRef ( IOleWindow iface)
static

Definition at line 466 of file client.c.

467{
469 return IAccessible_AddRef(&This->IAccessible_iface);
470}
static Client * impl_from_Client_OleWindow(IOleWindow *iface)
Definition: client.c:455

◆ Client_OleWindow_ContextSensitiveHelp()

static HRESULT WINAPI Client_OleWindow_ContextSensitiveHelp ( IOleWindow iface,
BOOL  fEnterMode 
)
static

Definition at line 488 of file client.c.

489{
491 FIXME("(%p)->(%x)\n", This, fEnterMode);
492 return E_NOTIMPL;
493}

◆ Client_OleWindow_GetWindow()

static HRESULT WINAPI Client_OleWindow_GetWindow ( IOleWindow iface,
HWND phwnd 
)
static

Definition at line 478 of file client.c.

479{
481
482 TRACE("(%p)->(%p)\n", This, phwnd);
483
484 *phwnd = This->hwnd;
485 return S_OK;
486}

◆ Client_OleWindow_QueryInterface()

static HRESULT WINAPI Client_OleWindow_QueryInterface ( IOleWindow iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 460 of file client.c.

461{
463 return IAccessible_QueryInterface(&This->IAccessible_iface, riid, ppv);
464}

◆ Client_OleWindow_Release()

static ULONG WINAPI Client_OleWindow_Release ( IOleWindow iface)
static

Definition at line 472 of file client.c.

473{
475 return IAccessible_Release(&This->IAccessible_iface);
476}

◆ Client_put_accName()

static HRESULT WINAPI Client_put_accName ( IAccessible iface,
VARIANT  varID,
BSTR  pszName 
)
static

Definition at line 410 of file client.c.

411{
412 Client *This = impl_from_Client(iface);
413 FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&varID), debugstr_w(pszName));
414 return E_NOTIMPL;
415}
#define debugstr_w
Definition: kernel32.h:32

◆ Client_put_accValue()

static HRESULT WINAPI Client_put_accValue ( IAccessible iface,
VARIANT  varID,
BSTR  pszValue 
)
static

Definition at line 417 of file client.c.

418{
419 Client *This = impl_from_Client(iface);
420 FIXME("(%p)->(%s %s)\n", This, debugstr_variant(&varID), debugstr_w(pszValue));
421 return E_NOTIMPL;
422}

◆ Client_QueryInterface()

static HRESULT WINAPI Client_QueryInterface ( IAccessible iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 44 of file client.c.

45{
47
48 TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv);
49
50 if(IsEqualIID(riid, &IID_IAccessible) ||
53 *ppv = iface;
54 }else if(IsEqualIID(riid, &IID_IOleWindow)) {
55 *ppv = &This->IOleWindow_iface;
56 }else if(IsEqualIID(riid, &IID_IEnumVARIANT)) {
57 *ppv = &This->IEnumVARIANT_iface;
58 }else {
59 WARN("no interface: %s\n", debugstr_guid(riid));
60 *ppv = NULL;
61 return E_NOINTERFACE;
62 }
63
64 IAccessible_AddRef(iface);
65 return S_OK;
66}
const GUID IID_IUnknown
#define WARN(fmt,...)
Definition: debug.h:112
const GUID IID_IOleWindow
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Client_Release()

static ULONG WINAPI Client_Release ( IAccessible iface)
static

Definition at line 77 of file client.c.

78{
81
82 TRACE("(%p) ref = %u\n", This, ref);
83
84 if(!ref)
86 return ref;
87}
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedDecrement
Definition: armddk.h:52

◆ create_client_object()

HRESULT create_client_object ( HWND  hwnd,
const IID iid,
void **  obj 
)

Definition at line 625 of file client.c.

626{
627 Client *client;
629
630 if(!IsWindow(hwnd))
631 return E_FAIL;
632
633 client = heap_alloc_zero(sizeof(Client));
634 if(!client)
635 return E_OUTOFMEMORY;
636
637 client->IAccessible_iface.lpVtbl = &ClientVtbl;
638 client->IOleWindow_iface.lpVtbl = &ClientOleWindowVtbl;
639 client->IEnumVARIANT_iface.lpVtbl = &ClientEnumVARIANTVtbl;
640 client->ref = 1;
641 client->hwnd = hwnd;
642 client->enum_pos = 0;
643
644 hres = IAccessible_QueryInterface(&client->IAccessible_iface, iid, obj);
645 IAccessible_Release(&client->IAccessible_iface);
646 return hres;
647}
#define E_FAIL
Definition: ddrawi.h:102
static const IAccessibleVtbl ClientVtbl
Definition: client.c:424
static const IOleWindowVtbl ClientOleWindowVtbl
Definition: client.c:495
static const IEnumVARIANTVtbl ClientEnumVARIANTVtbl
Definition: client.c:615
HRESULT hres
Definition: protocol.c:465
static FILE * client
Definition: client.c:41
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by CreateStdAccessibleObject().

◆ impl_from_Client()

◆ impl_from_Client_EnumVARIANT()

static Client * impl_from_Client_EnumVARIANT ( IEnumVARIANT iface)
inlinestatic

◆ impl_from_Client_OleWindow()

static Client * impl_from_Client_OleWindow ( IOleWindow iface)
inlinestatic

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( oleacc  )

Variable Documentation

◆ ClientEnumVARIANTVtbl

const IEnumVARIANTVtbl ClientEnumVARIANTVtbl
static
Initial value:
= {
}
static ULONG WINAPI Client_EnumVARIANT_Release(IEnumVARIANT *iface)
Definition: client.c:520
static HRESULT WINAPI Client_EnumVARIANT_Skip(IEnumVARIANT *iface, ULONG celt)
Definition: client.c:576
static HRESULT WINAPI Client_EnumVARIANT_QueryInterface(IEnumVARIANT *iface, REFIID riid, void **ppv)
Definition: client.c:508
static HRESULT WINAPI Client_EnumVARIANT_Reset(IEnumVARIANT *iface)
Definition: client.c:598
static HRESULT WINAPI Client_EnumVARIANT_Next(IEnumVARIANT *iface, ULONG celt, VARIANT *rgVar, ULONG *pCeltFetched)
Definition: client.c:526
static HRESULT WINAPI Client_EnumVARIANT_Clone(IEnumVARIANT *iface, IEnumVARIANT **ppEnum)
Definition: client.c:608
static ULONG WINAPI Client_EnumVARIANT_AddRef(IEnumVARIANT *iface)
Definition: client.c:514

Definition at line 615 of file client.c.

Referenced by create_client_object().

◆ ClientOleWindowVtbl

const IOleWindowVtbl ClientOleWindowVtbl
static
Initial value:
= {
}
static ULONG WINAPI Client_OleWindow_Release(IOleWindow *iface)
Definition: client.c:472
static HRESULT WINAPI Client_OleWindow_QueryInterface(IOleWindow *iface, REFIID riid, void **ppv)
Definition: client.c:460
static HRESULT WINAPI Client_OleWindow_ContextSensitiveHelp(IOleWindow *iface, BOOL fEnterMode)
Definition: client.c:488
static ULONG WINAPI Client_OleWindow_AddRef(IOleWindow *iface)
Definition: client.c:466
static HRESULT WINAPI Client_OleWindow_GetWindow(IOleWindow *iface, HWND *phwnd)
Definition: client.c:478

Definition at line 495 of file client.c.

Referenced by create_client_object().

◆ ClientVtbl

const IAccessibleVtbl ClientVtbl
static
Initial value:
= {
}
static HRESULT WINAPI Client_get_accSelection(IAccessible *iface, VARIANT *pvarID)
Definition: client.c:311
static HRESULT WINAPI Client_get_accChild(IAccessible *iface, VARIANT varChildID, IDispatch **ppdispChild)
Definition: client.c:147
static HRESULT WINAPI Client_accHitTest(IAccessible *iface, LONG xLeft, LONG yTop, VARIANT *pvarID)
Definition: client.c:377
static HRESULT WINAPI Client_GetTypeInfo(IAccessible *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: client.c:96
static HRESULT WINAPI Client_get_accHelpTopic(IAccessible *iface, BSTR *pszHelpFile, VARIANT varID, LONG *pidTopic)
Definition: client.c:266
static HRESULT WINAPI Client_get_accKeyboardShortcut(IAccessible *iface, VARIANT varID, BSTR *pszKeyboardShortcut)
Definition: client.c:274
static ULONG WINAPI Client_AddRef(IAccessible *iface)
Definition: client.c:68
static HRESULT WINAPI Client_put_accValue(IAccessible *iface, VARIANT varID, BSTR pszValue)
Definition: client.c:417
static HRESULT WINAPI Client_get_accState(IAccessible *iface, VARIANT varID, VARIANT *pvarState)
Definition: client.c:227
static HRESULT WINAPI Client_accNavigate(IAccessible *iface, LONG navDir, VARIANT varStart, VARIANT *pvarEnd)
Definition: client.c:369
static HRESULT WINAPI Client_get_accParent(IAccessible *iface, IDispatch **ppdispParent)
Definition: client.c:123
static HRESULT WINAPI Client_get_accFocus(IAccessible *iface, VARIANT *pvarID)
Definition: client.c:304
static HRESULT WINAPI Client_accDoDefaultAction(IAccessible *iface, VARIANT varID)
Definition: client.c:403
static HRESULT WINAPI Client_get_accChildCount(IAccessible *iface, LONG *pcountChildren)
Definition: client.c:133
static HRESULT WINAPI Client_QueryInterface(IAccessible *iface, REFIID riid, void **ppv)
Definition: client.c:44
static HRESULT WINAPI Client_get_accDescription(IAccessible *iface, VARIANT varID, BSTR *pszDescription)
Definition: client.c:198
static HRESULT WINAPI Client_GetTypeInfoCount(IAccessible *iface, UINT *pctinfo)
Definition: client.c:89
static HRESULT WINAPI Client_get_accValue(IAccessible *iface, VARIANT varID, BSTR *pszValue)
Definition: client.c:186
static ULONG WINAPI Client_Release(IAccessible *iface)
Definition: client.c:77
static HRESULT WINAPI Client_GetIDsOfNames(IAccessible *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: client.c:104
static HRESULT WINAPI Client_get_accHelp(IAccessible *iface, VARIANT varID, BSTR *pszHelp)
Definition: client.c:254
static HRESULT WINAPI Client_get_accName(IAccessible *iface, VARIANT varID, BSTR *pszName)
Definition: client.c:158
static HRESULT WINAPI Client_accSelect(IAccessible *iface, LONG flagsSelect, VARIANT varID)
Definition: client.c:331
static HRESULT WINAPI Client_accLocation(IAccessible *iface, LONG *pxLeft, LONG *pyTop, LONG *pcxWidth, LONG *pcyHeight, VARIANT varID)
Definition: client.c:338
static HRESULT WINAPI Client_get_accRole(IAccessible *iface, VARIANT varID, VARIANT *pvarRole)
Definition: client.c:211
static HRESULT WINAPI Client_get_accDefaultAction(IAccessible *iface, VARIANT varID, BSTR *pszDefaultAction)
Definition: client.c:318
static HRESULT WINAPI Client_put_accName(IAccessible *iface, VARIANT varID, BSTR pszName)
Definition: client.c:410
static HRESULT WINAPI Client_Invoke(IAccessible *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
Definition: client.c:113

Definition at line 424 of file client.c.

Referenced by create_client_object().