5#ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_TEXTPROVIDER_WIN_H_
6#define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_TEXTPROVIDER_WIN_H_
11#include <UIAutomationCore.h>
18class AX_EXPORT __declspec(uuid("3e1c192b-4348-45ac-8eb6-4b58eeb3dcca"))
19 AXPlatformNodeTextProviderWin
20 :
public CComObjectRootEx<CComMultiThreadModel>,
21 public ITextEditProvider {
23 BEGIN_COM_MAP(AXPlatformNodeTextProviderWin)
24 COM_INTERFACE_ENTRY(ITextProvider)
25 COM_INTERFACE_ENTRY(ITextEditProvider)
26 COM_INTERFACE_ENTRY(AXPlatformNodeTextProviderWin)
29 AXPlatformNodeTextProviderWin();
30 ~AXPlatformNodeTextProviderWin();
32 static AXPlatformNodeTextProviderWin*
Create(AXPlatformNodeWin* owner);
33 static
void CreateIUnknown(AXPlatformNodeWin* owner, IUnknown** unknown);
39 IFACEMETHODIMP GetSelection(SAFEARRAY** selection) override;
41 IFACEMETHODIMP GetVisibleRanges(SAFEARRAY** visible_ranges) override;
43 IFACEMETHODIMP RangeFromChild(IRawElementProviderSimple* child,
44 ITextRangeProvider** range) override;
46 IFACEMETHODIMP RangeFromPoint(UiaPoint point,
47 ITextRangeProvider** range) override;
49 IFACEMETHODIMP get_DocumentRange(ITextRangeProvider** range) override;
51 IFACEMETHODIMP get_SupportedTextSelection(
52 enum SupportedTextSelection* text_selection) override;
58 IFACEMETHODIMP GetActiveComposition(ITextRangeProvider** range) override;
60 IFACEMETHODIMP GetConversionTarget(ITextRangeProvider** range) override;
64 static ITextRangeProvider* GetRangeFromChild(
65 ui::AXPlatformNodeWin* ancestor,
66 ui::AXPlatformNodeWin* descendant);
69 static ITextRangeProvider* CreateDegenerateRangeAtStart(
70 ui::AXPlatformNodeWin* node);
73 friend class AXPlatformNodeTextProviderTest;
74 ui::AXPlatformNodeWin* owner() const;
75 HRESULT GetTextRangeProviderFromActiveComposition(ITextRangeProvider** range);
77 Microsoft::WRL::ComPtr<
ui::AXPlatformNodeWin> owner_;
static sk_sp< Effect > Create()