' ########################################################################################
' Microsoft Windows
' File: TextStor.inc
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_TextStor_PBI)
#DEFINE PBX_TextStor_PBI
%EQUATE `TEXTSTOR_INC = 1
'/* header files for imported files */
#INCLUDE ONCE "Legacy/COM/OAIdl.inc"
$GUID_TS_SERVICE_DATAOBJECT = GUID$("{6086FBB5-E225-46CE-A770-C1BBD3E05D7B}")
$GUID_TS_SERVICE_ACCESSIBLE = GUID$("{F9786200-A5BF-4A0F-8C24-FB16F5D1AABB}")
$GUID_TS_SERVICE_ACTIVEX = GUID$("{EA937A50-C9A6-4B7D-894A-49D99B784834}")
%EQUATE `TS_E_INVALIDPOS = &H80040200 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0200)
%EQUATE `TS_E_NOLOCK = &H80040201 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0201)
%EQUATE `TS_E_NOOBJECT = &H80040202 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0202)
%EQUATE `TS_E_NOSERVICE = &H80040203 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0203)
%EQUATE `TS_E_NOINTERFACE = &H80040204 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0204)
%EQUATE `TS_E_NOSELECTION = &H80040205 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0205)
%EQUATE `TS_E_NOLAYOUT = &H80040206 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0206)
%EQUATE `TS_E_INVALIDPOINT = &H80040207 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0207)
%EQUATE `TS_E_SYNCHRONOUS = &H80040208 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0208)
%EQUATE `TS_E_READONLY = &H80040209 ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x0209)
%EQUATE `TS_E_FORMAT = &H8004020A ' MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x020a)
%EQUATE `TS_S_ASYNC = &H00040300 ' MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, 0x0300)
%EQUATE `TS_AS_TEXT_CHANGE = &H1
%EQUATE `TS_AS_SEL_CHANGE = &H2
%EQUATE `TS_AS_LAYOUT_CHANGE = &H4
%EQUATE `TS_AS_ATTR_CHANGE = &H8
%EQUATE `TS_AS_STATUS_CHANGE = &H10
%EQUATE `TS_AS_ALL_SINKS = %TS_AS_TEXT_CHANGE OR %TS_AS_SEL_CHANGE OR %TS_AS_LAYOUT_CHANGE OR %TS_AS_ATTR_CHANGE OR %TS_AS_STATUS_CHANGE
%EQUATE `TS_LF_SYNC = &H1
%EQUATE `TS_LF_READ = &H2
%EQUATE `TS_LF_READWRITE = &H6
%EQUATE `TS_SD_READONLY = &H1
%EQUATE `TS_SD_LOADING = &H2
%EQUATE `TS_SS_DISJOINTSEL = &H1
%EQUATE `TS_SS_REGIONS = &H2
%EQUATE `TS_SS_TRANSITORY = &H4
%EQUATE `TS_SS_NOHIDDENTEXT = &H8
%EQUATE `TS_SD_MASKALL = %TS_SD_READONLY OR %TS_SD_LOADING
%EQUATE `TS_ST_CORRECTION = &H1
%EQUATE `TS_IE_CORRECTION = &H1
%EQUATE `TS_IE_COMPOSITION = &H2
%EQUATE `TS_TC_CORRECTION = &H1
%EQUATE `TS_IAS_NOQUERY = &H1
%EQUATE `TS_IAS_QUERYONLY = &H2
' GUID = "FEC4F516-C503-45B1-A5FD-7A3D8AB07049"
' // Size = 8 bytes
TYPE TS_STATUS DWORD
 dwDynamicFlags AS DWORD
 dwStaticFlags AS DWORD
END TYPE
' GUID = "F3181BD6-BCF0-41D3-A81C-474B17EC38FB"
' // Size = 12 bytes
TYPE TS_TEXTCHANGE DWORD
 acpStart AS LONG
 acpOldEnd AS LONG
 acpNewEnd AS LONG
END TYPE
' TsActiveSelEnd enum
' GUID = "05FCF85B-5E9C-4C3E-AB71-29471D4F38E7"
%EQUATE `TS_AE_NONE = 0
%EQUATE `TS_AE_START = 1
%EQUATE `TS_AE_END = 2
' GUID = "7ECC3FFA-8F73-4D91-98ED-76F8AC5B1600"
' // Size = 8 bytes
TYPE TS_SELECTIONSTYLE DWORD
 ase AS LONG ' TsActiveSelEnd enum
 fInterimChar AS LONG
END TYPE
' GUID = "C4B9C33B-8A0D-4426-BEBE-D444A4701FE9"
' // Size = 16 bytes
TYPE TS_SELECTION_ACP DWORD
 acpStart AS LONG
 acpEnd AS LONG
 style AS TS_SELECTIONSTYLE
END TYPE
' GUID = "B03413D2-0723-4C4E-9E08-2E9C1FF3772B"
' // Size = 16 bytes
TYPE TS_SELECTION_ANCHOR DWORD
 paStart AS DWORD PTR ' IAnchor*
 paEnd AS DWORD PTR ' IAnchor*
 style AS TS_SELECTIONSTYLE
END TYPE
%EQUATE `TS_DEFAULT_SELECTION = &HFFFFFFFF ' ( ( ULONG )-1 )
%EQUATE `GXFPF_ROUND_NEAREST = &H1
%EQUATE `GXFPF_NEAREST = &H2
%EQUATE `TS_CHAR_EMBEDDED = &HFFFC
%EQUATE `TS_CHAR_REGION = 0
%EQUATE `TS_CHAR_REPLACEMENT = &HFFFD
' GUID("ef3457d9-8446-49a7-a9e6-b50d9d5f3fd9")
' GUID TS_ATTRID;
' GUID = "2CC2B33F-1174-4507-B8D9-5BC0EB37C197"
' // Size = 40 bytes
TYPE TS_ATTRVAL DWORD ' Must be 8 byte aligned
 idAttr AS GUID ' TS_ATTRID
 dwOverlapId AS DWORD
 alignment__ AS DWORD
 varValue AS tagVARIANT
END TYPE
%EQUATE `TS_ATTR_FIND_BACKWARDS = &H1
%EQUATE `TS_ATTR_FIND_WANT_OFFSET = &H2
%EQUATE `TS_ATTR_FIND_UPDATESTART = &H4
%EQUATE `TS_ATTR_FIND_WANT_VALUE = &H8
%EQUATE `TS_ATTR_FIND_WANT_END = &H10
%EQUATE `TS_ATTR_FIND_HIDDEN = &H20
'typedef /* [uuid] */ DECLSPEC_UUID("1faf509e-44c1-458e-950a-38a96705a62b") DWORD TsViewCookie;
%EQUATE `TS_VCOOKIE_NUL = &HFFFFFFFF
' GUID = "7899D7C4-5F07-493C-A89A-FAC8E777F476"
' TsLayoutCode enum
%EQUATE `TS_LC_CREATE = 0
%EQUATE `TS_LC_CHANGE = 1
%EQUATE `TS_LC_DESTROY = 2
' GUID = "033B0DF0-F193-4170-B47B-141AFC247878"
' TsRunType enum
%EQUATE `TS_RT_PLAIN = 0
%EQUATE `TS_RT_HIDDEN = %TS_RT_PLAIN + 1
%EQUATE `TS_RT_OPAQUE = %TS_RT_HIDDEN + 1
' GUID = "A6231949-37C5-4B74-A24E-2A26C327201D"
' // Size = 8 bytes
TYPE TS_RUNINFO DWORD
 uCount AS DWORD ' ULONG
 type AS LONG ' TsRunType enum
END TYPE
' ########################################################################################
' Interface name = ITextStoreACP
' IID = 28888FE3-C2A0-483A-A3EA-8CB1CE51FF3D
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITextStoreACP_INTERFACE_DEFINED)
 %ITextStoreACP_INTERFACE_DEFINED = 1
$IID_ITextStoreACP = GUID$("{28888FE3-C2A0-483A-A3EA-8CB1CE51FF3D}")
INTERFACE ITextStoreACP $IID_ITextStoreACP
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AdviseSink ( ' VTable offset = 12
 BYREF riid AS GUID
 , BYVAL punk AS IUnknown
 , BYVAL dwMask AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnadviseSink ( ' VTable offset = 16
 BYVAL punk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RequestLock ( ' VTable offset = 20
 BYVAL dwLockFlags AS DWORD
 , BYREF phrSession AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 24
 BYREF pdcs AS TS_STATUS
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInsert ( ' VTable offset = 28
 BYVAL acpTestStart AS LONG
 , BYVAL acpTestEnd AS LONG
 , BYVAL cch AS DWORD
 , BYREF pacpResultStart AS LONG
 , BYREF pacpResultEnd AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetSelection ( ' VTable offset = 32
 BYVAL ulIndex AS DWORD
 , BYVAL ulCount AS DWORD
 , BYREF pSelection AS TS_SELECTION_ACP
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSelection ( ' VTable offset = 36
 BYVAL ulCount AS DWORD
 , BYREF pSelection AS TS_SELECTION_ACP
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 40
 BYVAL acpStart AS LONG
 , BYVAL acpEnd AS LONG
 , BYREF pchPlain AS WSTRINGZ
 , BYVAL cchPlainReq AS DWORD
 , BYREF pcchPlainRet AS DWORD
 , BYREF prgRunInfo AS TS_RUNINFO
 , BYVAL cRunInfoReq AS DWORD
 , BYREF pcRunInfoRet AS DWORD
 , BYREF pacpNext AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetText ( ' VTable offset = 44
 BYVAL dwFlags AS DWORD
 , BYVAL acpStart AS LONG
 , BYVAL acpEnd AS LONG
 , BYREF pchText AS WSTRINGZ
 , BYVAL cch AS DWORD
 , BYREF pChange AS TS_TEXTCHANGE
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormattedText ( ' VTable offset = 48
 BYVAL acpStart AS LONG
 , BYVAL acpEnd AS LONG
 , BYREF ppDataObject AS IDataObject
 ) AS LONG
 ' =====================================================================================
 METHOD GetEmbedded ( ' VTable offset = 52
 BYVAL acpPos AS LONG
 , BYREF rguidService AS GUID
 , BYREF riid AS GUID
 , BYREF ppunk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInsertEmbedded ( ' VTable offset = 56
 BYREF pguidService AS GUID
 , BYREF pFormatEtc AS FORMATETC
 , BYREF pfInsertable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD InsertEmbedded ( ' VTable offset = 60
 BYVAL dwFlags AS DWORD
 , BYVAL acpStart AS DWORD
 , BYVAL acpEnd AS LONG
 , BYVAL pDataObject AS IDataObject
 , BYREF pChange AS TS_TEXTCHANGE
 ) AS LONG
 ' =====================================================================================
 METHOD InsertTextAtSelection ( ' VTable offset = 64
 BYVAL dwFlags AS DWORD
 , BYREF pchText AS WSTRINGZ
 , BYVAL cch AS DWORD
 , BYREF pacpStart AS LONG
 , BYREF pacpEnd AS LONG
 , BYREF pChange AS TS_TEXTCHANGE
 ) AS LONG
 ' =====================================================================================
 METHOD InsertEmbeddedAtSelection ( ' VTable offset = 68
 BYVAL dwFlags AS DWORD
 , BYVAL pDataObject AS IDataObject
 , BYREF pacpStart AS LONG
 , BYREF pacpEnd AS LONG
 , BYREF pChange AS TS_TEXTCHANGE
 ) AS LONG
 ' =====================================================================================
 METHOD RequestSupportedAttrs ( ' VTable offset = 72
 BYVAL dwFlags AS DWORD
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD RequestAttrsAtPosition ( ' VTable offset = 76
 BYVAL acpPos AS LONG
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RequestAttrsTransitioningAtPosition ( ' VTable offset = 80
 BYVAL acpPos AS LONG
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNextAttrTransition ( ' VTable offset = 84
 BYVAL acpStart AS LONG
 , BYVAL acpHalt AS LONG
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 , BYREF pacpNext AS LONG
 , BYREF pfFound AS LONG
 , BYREF plFoundOffset AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD RetrieveRequestedAttrs ( ' VTable offset = 88
 BYVAL ulCount AS DWORD
 , BYREF paAttrVals AS TS_ATTRVAL
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetEndACP ( ' VTable offset = 92
 BYREF pacp AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetActiveView ( ' VTable offset = 96
 BYREF pvcView AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetACPFromPoint ( ' VTable offset = 100
 BYREF pvcView AS DWORD
 , BYREF ptScreen AS POINT
 , BYVAL dwFlags AS DWORD
 , BYREF pacp AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetTextExt ( ' VTable offset = 104
 BYVAL vcView AS DWORD
 , BYVAL acpStart AS LONG
 , BYVAL acpEnd AS LONG
 , BYREF prc AS RECT
 , BYREF pfClipped AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetScreenExt ( ' VTable offset = 108
 BYVAL vcView AS DWORD
 , BYREF prc AS RECT
 ) AS LONG
 ' =====================================================================================
 METHOD GetWnd ( ' VTable offset = 112
 BYVAL vcView AS DWORD
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITextStoreACP_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ITextStoreACPSink
' IID = 22D44C94-A419-4542-A272-AE26093ECECF
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITextStoreACPSink_INTERFACE_DEFINED)
 %ITextStoreACPSink_INTERFACE_DEFINED = 1
$IID_ITextStoreACPSink = GUID$("{22D44C94-A419-4542-A272-AE26093ECECF}")
INTERFACE ITextStoreACPSink $IID_ITextStoreACPSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnTextChange ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYREF pChange AS TS_TEXTCHANGE
 ) AS LONG
 ' =====================================================================================
 METHOD OnSelectionChange ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD OnLayoutChange ( ' VTable offset = 20
 BYVAL lcode AS LONG
 , BYVAL vcView AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnStatusChange ( ' VTable offset = 24
 BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnAttrsChange ( ' VTable offset = 28
 BYVAL acpStart AS LONG
 , BYVAL acpEnd AS LONG
 , BYVAL cAttrs AS DWORD
 , BYREF paAttrs AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD OnLockGranted ( ' VTable offset = 32
 BYVAL dwLockFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnStartEditTransaction ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD OnEndEditTransaction ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITextStoreACPSink_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = IAnchor
' IID = 0FEB7E34-5A60-4356-8EF7-ABDEC2FF7CF8
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%IAnchor_INTERFACE_DEFINED)
 %IAnchor_INTERFACE_DEFINED = 1
' TsGravity enum
' GUID = "DAA8601E-7695-426F-9BB7-498A6AA64B68"
%EQUATE `TS_GR_BACKWARD = 0
%EQUATE `TS_GR_FORWARD = 1
' TsShiftDir enum
' GUID = "898E19DF-4FB4-4AF3-8DAF-9B3C1145C79D"
%EQUATE `TS_SD_BACKWARD = 0
%EQUATE `TS_SD_FORWARD = 1
%EQUATE `TS_CH_PRECEDING_DEL = 1
%EQUATE `TS_CH_FOLLOWING_DEL = 2
%EQUATE `TS_SHIFT_COUNT_HIDDEN = &H1
%EQUATE `TS_SHIFT_HALT_HIDDEN = &H2
%EQUATE `TS_SHIFT_HALT_VISIBLE = &H4
%EQUATE `TS_SHIFT_COUNT_ONLY = &H8
$IID_IAnchor = GUID$("{0FEB7E34-5A60-4356-8EF7-ABDEC2FF7CF8}")
INTERFACE IAnchor $IID_IAnchor
 INHERIT IUnknown
 ' =====================================================================================
 METHOD SetGravity ( ' VTable offset = 12
 BYVAL gravity AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetGravity ( ' VTable offset = 16
 BYREF pgravity AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD IsEqual ( ' VTable offset = 20
 BYVAL paWith AS IAnchor
 , BYREF pfEqual AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Compare ( ' VTable offset = 24
 BYVAL paWith AS IAnchor
 , BYREF plResult AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD Shift ( ' VTable offset = 28
 BYVAL dwFlags AS DWORD
 , BYVAL cchReq AS LONG
 , BYREF pcch AS LONG
 , BYVAL paHaltAnchor AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD ShiftTo ( ' VTable offset = 32
 BYVAL paSite AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD ShiftRegion ( ' VTable offset = 36
 BYVAL dwFlags AS DWORD
 , BYVAL dir AS LONG
 , BYREF pfNoRegion AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetChangeHistoryMask ( ' VTable offset = 40
 BYVAL dwMask AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetChangeHistory ( ' VTable offset = 44
 BYREF pdwHistory AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD ClearChangeHistory ( ' VTable offset = 48
 ) AS LONG
 ' =====================================================================================
 METHOD Clone ( ' VTable offset = 52
 BYREF ppaClone AS IAnchor
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __IAnchor_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ITextStoreAnchor
' IID = 9B2077B0-5F18-4DEC-BEE9-3CC722F5DFE0
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITextStoreAnchor_INTERFACE_DEFINED)
 %ITextStoreAnchor_INTERFACE_DEFINED = 1
%EQUATE `TS_GTA_HIDDEN = &H1
%EQUATE `TS_GEA_HIDDEN = &H1
$IID_ITextStoreAnchor = GUID$("{9B2077B0-5F18-4DEC-BEE9-3CC722F5DFE0}")
INTERFACE ITextStoreAnchor $IID_ITextStoreAnchor
 INHERIT IUnknown
 ' =====================================================================================
 METHOD AdviseSink ( ' VTable offset = 12
 BYREF riid AS GUID
 , BYVAL punk AS IUnknown
 , BYVAL dwMask AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD UnadviseSink ( ' VTable offset = 16
 BYVAL punk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD RequestLock ( ' VTable offset = 20
 BYVAL dwLockFlags AS DWORD
 , BYREF phrSession AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetStatus ( ' VTable offset = 24
 BYREF pdcs AS TS_STATUS
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInsert ( ' VTable offset = 28
 BYVAL paTestStart AS IAnchor
 , BYVAL paTestEnd AS IAnchor
 , BYVAL cch AS DWORD
 , BYREF ppaResultStart AS IAnchor
 , BYREF ppaResultEnd AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD GetSelection ( ' VTable offset = 32
 BYVAL ulIndex AS DWORD
 , BYVAL ulCount AS DWORD
 , BYREF pSelection AS TS_SELECTION_ANCHOR
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD SetSelection ( ' VTable offset = 36
 BYVAL ulCount AS DWORD
 , BYREF pSelection AS TS_SELECTION_ANCHOR
 ) AS LONG
 ' =====================================================================================
 METHOD GetText ( ' VTable offset = 40
 BYVAL dwFlags AS DWORD
 , BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYREF pchText AS WSTRINGZ
 , BYVAL cchReq AS DWORD
 , BYREF pcch AS DWORD
 , BYVAL fUpdateAnchor AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD SetText ( ' VTable offset = 44
 BYVAL dwFlags AS DWORD
 , BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYREF pchText AS WSTRINGZ
 , BYVAL cch AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetFormattedText ( ' VTable offset = 48
 BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYREF ppDataObject AS IDataObject
 ) AS LONG
 ' =====================================================================================
 METHOD GetEmbedded ( ' VTable offset = 52
 BYVAL dwFlags AS DWORD
 , BYVAL paPos AS IAnchor
 , BYREF rguidService AS GUID
 , BYREF riid AS GUID
 , BYREF ppunk AS IUnknown
 ) AS LONG
 ' =====================================================================================
 METHOD InsertEmbedded ( ' VTable offset = 56
 BYVAL dwFlags AS DWORD
 , BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYVAL pDataObject AS IDataObject
 ) AS LONG
 ' =====================================================================================
 METHOD RequestSupportedAttrs ( ' VTable offset = 60
 BYVAL dwFlags AS DWORD
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD RequestAttrsAtPosition ( ' VTable offset = 64
 BYVAL paPos AS IAnchor
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD RequestAttrsTransitioningAtPosition ( ' VTable offset = 68
 BYVAL paPos AS IAnchor
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD FindNextAttrTransition ( ' VTable offset = 72
 BYVAL paStart AS IAnchor
 , BYVAL paHalt AS IAnchor
 , BYVAL cFilterAttrs AS DWORD
 , BYREF paFilterAttrs AS GUID
 , BYVAL dwFlags AS DWORD
 , BYREF pfFound AS LONG
 , BYREF plFoundOffset AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD RetrieveRequestedAttrs ( ' VTable offset = 76
 BYVAL ulCount AS DWORD
 , BYREF paAttrVals AS TS_ATTRVAL
 , BYREF pcFetched AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetStart ( ' VTable offset = 80
 BYREF ppaStart AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD GetEnd ( ' VTable offset = 84
 BYREF ppaEnd AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD GetActiveView ( ' VTable offset = 88
 BYREF pvcView AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD GetAnchorFromPoint ( ' VTable offset = 92
 BYVAL vcView AS DWORD
 , BYREF ptScreen AS POINT
 , BYVAL dwFlags AS DWORD
 , BYREF ppaSite AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD GetTextExt ( ' VTable offset = 96
 BYVAL vcView AS DWORD
 , BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYREF prc AS RECT
 , BYREF pfClipped AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD GetScreenExt ( ' VTable offset = 100
 BYVAL vcView AS DWORD
 , BYREF prc AS RECT
 ) AS LONG
 ' =====================================================================================
 METHOD GetWnd ( ' VTable offset = 104
 BYVAL vcView AS DWORD
 , BYREF phwnd AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD QueryInsertEmbedded ( ' VTable offset = 108
 BYREF pguidService AS GUID
 , BYREF pFormatEtc AS FORMATETC
 , BYREF pfInsertable AS LONG
 ) AS LONG
 ' =====================================================================================
 METHOD InsertTextAtSelection ( ' VTable offset = 112
 BYVAL dwFlags AS DWORD
 , BYREF pchText AS WSTRINGZ
 , BYVAL cch AS DWORD
 , BYREF ppaStart AS IAnchor
 , BYREF ppaEnd AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD InsertEmbeddedAtSelection ( ' VTable offset = 116
 BYVAL dwFlags AS DWORD
 , BYVAL pDataObject AS IDataObject
 , BYREF ppaStart AS IAnchor
 , BYREF ppaEnd AS IAnchor
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITextStoreAnchor_INTERFACE_DEFINED__ */
' ########################################################################################
' Interface name = ITextStoreAnchorSink
' IID = AA80E905-2021-11D2-93E0-0060B067B86E
' Inherited interface = IUnknown
' ########################################################################################
#IF NOT %DEF(%ITextStoreAnchorSink_INTERFACE_DEFINED)
 %ITextStoreAnchorSink_INTERFACE_DEFINED = 1
$IID_ITextStoreAnchorSink = GUID$("{AA80E905-2021-11D2-93E0-0060B067B86E}")
INTERFACE ITextStoreAnchorSink $IID_ITextStoreAnchorSink
 INHERIT IUnknown
 ' =====================================================================================
 METHOD OnTextChange ( ' VTable offset = 12
 BYVAL dwFlags AS DWORD
 , BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 ) AS LONG
 ' =====================================================================================
 METHOD OnSelectionChange ( ' VTable offset = 16
 ) AS LONG
 ' =====================================================================================
 METHOD OnLayoutChange ( ' VTable offset = 20
 BYVAL lcode AS LONG
 , BYVAL vcView AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnStatusChange ( ' VTable offset = 24
 BYVAL dwFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnAttrsChange ( ' VTable offset = 28
 BYVAL paStart AS IAnchor
 , BYVAL paEnd AS IAnchor
 , BYVAL cAttrs AS DWORD
 , BYREF paAttrs AS GUID
 ) AS LONG
 ' =====================================================================================
 METHOD OnLockGranted ( ' VTable offset = 32
 BYVAL dwLockFlags AS DWORD
 ) AS LONG
 ' =====================================================================================
 METHOD OnStartEditTransaction ( ' VTable offset = 36
 ) AS LONG
 ' =====================================================================================
 METHOD OnEndEditTransaction ( ' VTable offset = 40
 ) AS LONG
 ' =====================================================================================
END INTERFACE
#ENDIF ' /* __ITextStoreAnchorSink_INTERFACE_DEFINED__ */
#ENDIF
