2011-07-09 19:26:30 +00:00
|
|
|
#ifndef __UIAUTO_HH_INCLUDED__
|
|
|
|
#define __UIAUTO_HH_INCLUDED__
|
|
|
|
|
|
|
|
//#include <objbase.h>
|
|
|
|
#include <unknwn.h>
|
|
|
|
#include <oaidl.h>
|
|
|
|
#include <oleacc.h>
|
|
|
|
#include <servprov.h>
|
|
|
|
|
2012-01-24 12:39:23 +00:00
|
|
|
#ifdef INTERFACE
|
|
|
|
#undef INTERFACE
|
|
|
|
#endif
|
|
|
|
|
2011-07-09 19:26:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
extern const IID IID_IAccessibleEx;
|
|
|
|
extern const IID IID_IRawElementProviderSimple;
|
|
|
|
extern const IID IID_ITextProvider;
|
|
|
|
extern const IID IID_ITextRangeProvider;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
|
|
|
typedef int PROPERTYID;
|
|
|
|
typedef int PATTERNID;
|
|
|
|
typedef int TEXTATTRIBUTEID;
|
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
typedef struct _UiaPoint
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
|
|
|
double x;
|
|
|
|
double y;
|
2011-07-12 12:52:07 +00:00
|
|
|
} UiaPoint;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
typedef enum
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
|
|
|
ProviderOptions_ClientSideProvider = 0x1,
|
|
|
|
ProviderOptions_ServerSideProvider = 0x2,
|
|
|
|
ProviderOptions_NonClientAreaProvider = 0x4,
|
|
|
|
ProviderOptions_OverrideProvider = 0x8,
|
|
|
|
ProviderOptions_ProviderOwnsSetFocus = 0x10,
|
|
|
|
ProviderOptions_UseComThreading = 0x20
|
2011-07-12 12:52:07 +00:00
|
|
|
} ProviderOptions;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
typedef enum
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
|
|
|
SupportedTextSelection_None = 0,
|
|
|
|
SupportedTextSelection_Single = 1,
|
|
|
|
SupportedTextSelection_Multiple = 2
|
2011-07-12 12:52:07 +00:00
|
|
|
} SupportedTextSelection;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
typedef enum
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
|
|
|
TextUnit_Character = 0,
|
|
|
|
TextUnit_Format = 1,
|
|
|
|
TextUnit_Word = 2,
|
|
|
|
TextUnit_Line = 3,
|
|
|
|
TextUnit_Paragraph = 4,
|
|
|
|
TextUnit_Page = 5,
|
|
|
|
TextUnit_Document = 6
|
2011-07-12 12:52:07 +00:00
|
|
|
} TextUnit;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
typedef enum
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
|
|
|
TextPatternRangeEndpoint_Start = 0,
|
|
|
|
TextPatternRangeEndpoint_End = 1
|
2011-07-12 12:52:07 +00:00
|
|
|
} TextPatternRangeEndpoint;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
|
|
|
/* UIA_PatternIds */
|
2011-07-12 12:52:07 +00:00
|
|
|
extern const long UIA_InvokePatternId;
|
|
|
|
extern const long UIA_SelectionPatternId;
|
|
|
|
extern const long UIA_ValuePatternId;
|
|
|
|
extern const long UIA_RangeValuePatternId;
|
|
|
|
extern const long UIA_ScrollPatternId;
|
|
|
|
extern const long UIA_ExpandCollapsePatternId;
|
|
|
|
extern const long UIA_GridPatternId;
|
|
|
|
extern const long UIA_GridItemPatternId;
|
|
|
|
extern const long UIA_MultipleViewPatternId;
|
|
|
|
extern const long UIA_WindowPatternId;
|
|
|
|
extern const long UIA_SelectionItemPatternId;
|
|
|
|
extern const long UIA_DockPatternId;
|
|
|
|
extern const long UIA_TablePatternId;
|
|
|
|
extern const long UIA_TableItemPatternId;
|
|
|
|
extern const long UIA_TextPatternId;
|
|
|
|
extern const long UIA_TogglePatternId;
|
|
|
|
extern const long UIA_TransformPatternId;
|
|
|
|
extern const long UIA_ScrollItemPatternId;
|
|
|
|
extern const long UIA_LegacyIAccessiblePatternId;
|
|
|
|
extern const long UIA_ItemContainerPatternId;
|
|
|
|
extern const long UIA_VirtualizedItemPatternId;
|
|
|
|
extern const long UIA_SynchronizedInputPatternId;
|
2011-07-09 19:26:30 +00:00
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
#define INTERFACE IRawElementProviderSimple
|
|
|
|
DECLARE_INTERFACE_(IRawElementProviderSimple, IUnknown)
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
|
|
|
|
STDMETHOD(get_ProviderOptions)(THIS_ ProviderOptions *) PURE;
|
|
|
|
STDMETHOD(GetPatternProvider)(THIS_ PATTERNID, IUnknown **) PURE;
|
|
|
|
STDMETHOD(GetPropertyValue)(THIS_ PROPERTYID, VARIANT *) PURE;
|
|
|
|
STDMETHOD(get_HostRawElementProvider)(THIS_ IRawElementProviderSimple **) PURE;
|
2011-07-09 19:26:30 +00:00
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
|
|
|
#define INTERFACE ITextRangeProvider
|
|
|
|
DECLARE_INTERFACE_(ITextRangeProvider, IUnknown)
|
|
|
|
{
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
|
2011-07-09 19:26:30 +00:00
|
|
|
STDMETHOD(Clone)(THIS_ ITextRangeProvider **) PURE;
|
|
|
|
STDMETHOD(Compare)(THIS_ ITextRangeProvider *, BOOL *) PURE;
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(CompareEndpoints)(THIS_ TextPatternRangeEndpoint, ITextRangeProvider *, TextPatternRangeEndpoint, int *) PURE;
|
|
|
|
STDMETHOD(ExpandToEnclosingUnit)(THIS_ TextUnit) PURE;
|
2011-07-09 19:26:30 +00:00
|
|
|
STDMETHOD(FindAttribute)(THIS_ TEXTATTRIBUTEID, VARIANT, BOOL, ITextRangeProvider **) PURE;
|
|
|
|
STDMETHOD(FindText)(THIS_ BSTR, BOOL, BOOL, ITextRangeProvider **) PURE;
|
|
|
|
STDMETHOD(GetAttributeValue)(THIS_ TEXTATTRIBUTEID, VARIANT *) PURE;
|
|
|
|
STDMETHOD(GetBoundingRectangles)(THIS_ SAFEARRAY **) PURE;
|
|
|
|
STDMETHOD(GetEnclosingElement)(THIS_ IRawElementProviderSimple **) PURE;
|
|
|
|
STDMETHOD(GetText)(THIS_ int, BSTR *) PURE;
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(Move)(THIS_ TextUnit, int, int *) PURE;
|
|
|
|
STDMETHOD(MoveEndpointByUnit)(THIS_ TextPatternRangeEndpoint, TextUnit, int *) PURE;
|
|
|
|
STDMETHOD(MoveEndpointByRange)(THIS_ TextPatternRangeEndpoint, ITextRangeProvider *, TextPatternRangeEndpoint) PURE;
|
2011-07-09 19:26:30 +00:00
|
|
|
STDMETHOD(Select)(THIS) PURE;
|
|
|
|
STDMETHOD(AddToSelection)(THIS) PURE;
|
|
|
|
STDMETHOD(RemoveFromSelection)(THIS) PURE;
|
|
|
|
STDMETHOD(ScrollIntoView)(THIS_ BOOL) PURE;
|
|
|
|
STDMETHOD(GetChildren)(THIS_ SAFEARRAY **) PURE;
|
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
2011-07-12 12:52:07 +00:00
|
|
|
#define INTERFACE ITextProvider
|
|
|
|
DECLARE_INTERFACE_(ITextProvider, IUnknown)
|
2011-07-09 19:26:30 +00:00
|
|
|
{
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
|
|
|
|
STDMETHOD(GetSelection)(THIS_ SAFEARRAY **) PURE;
|
|
|
|
STDMETHOD(GetVisibleRanges)(THIS_ SAFEARRAY **) PURE;
|
|
|
|
STDMETHOD(RangeFromChild)(THIS_ IRawElementProviderSimple *, ITextRangeProvider **) PURE;
|
|
|
|
STDMETHOD(RangeFromPoint)(THIS_ UiaPoint, ITextRangeProvider **pRetVal) PURE;
|
|
|
|
STDMETHOD(get_DocumentRange)(THIS_ ITextRangeProvider **) PURE;
|
|
|
|
STDMETHOD(get_SupportedTextSelection)(THIS_ SupportedTextSelection *) PURE;
|
2011-07-09 19:26:30 +00:00
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
|
|
|
#define INTERFACE IAccessibleEx
|
|
|
|
DECLARE_INTERFACE_(IAccessibleEx, IUnknown)
|
|
|
|
{
|
2011-07-12 12:52:07 +00:00
|
|
|
STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE;
|
|
|
|
STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
|
|
STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
|
|
|
2011-07-09 19:26:30 +00:00
|
|
|
STDMETHOD(GetObjectForChild)(THIS_ long, IAccessibleEx **) PURE;
|
|
|
|
STDMETHOD(GetIAccessiblePair)(THIS_ IAccessible **, long *) PURE;
|
|
|
|
STDMETHOD(GetRuntimeId)(THIS_ SAFEARRAY **) PURE;
|
|
|
|
STDMETHOD(ConvertReturnedElement)(THIS_ IRawElementProviderSimple *, IAccessibleEx **) PURE;
|
|
|
|
};
|
|
|
|
#undef INTERFACE
|
|
|
|
|
|
|
|
HRESULT GetIAccessibleExFromIAccessible( IAccessible *pAcc, long idChild, IAccessibleEx **ppaex );
|
|
|
|
HRESULT GetIRawElementProviderFromIAccessible( IAccessible * pAcc, long idChild, IRawElementProviderSimple **ppEl );
|
|
|
|
HRESULT GetPatternFromIAccessible( IAccessible * pAcc, long idChild, PATTERNID patternId, REFIID iid, void **ppv );
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif // UIAUTO_HH
|