/**************************************************************************** * The TEXTMGR110 Interfaces * Copyright (c) Microsoft Corporation, All Rights Reserved ****************************************************************************/ #ifndef INTEROPLIB import "IVsQueryEditQuerySave2.idl"; import "IVsQueryEditQuerySave80.idl"; import "msxml.idl"; import "context.idl"; import "textmgr.idl"; import "textmgr2.idl"; #endif /**************************************************************************** ******** IMPORTANT!! ********* All guids for interfaces and co-creatable objects in this file should be defined in textmgruuids.h ****************************************************************************/ #include "textmgruuids.h" #include "vsshelluuids.h" #ifndef INTEROPLIB [ uuid(uuid_lib_TextManager110), version(1.0) ] library TextMgr110 { #endif typedef struct _VIEWPREFERENCES3 { //--------------------------------------------------------------------------------------------- // The following members are copied from the original VIEWPREFERENCES2 struct. To maintain // compatibility, their size, meaning, and order must not be modified. // settings for text views unsigned fVisibleWhitespace; // show spaces/tabs etc? unsigned fSelectionMargin; // display selection margin? unsigned fAutoDelimiterHighlight; // allow automatic delimiter highlighting? unsigned fGoToAnchorAfterEscape; // go to anchor after escape? unsigned fDragDropEditing; // drag/drop editing? unsigned fUndoCaretMovements; // include caret movements and text selections in undo list? unsigned fOvertype; // overtype/insert? - NOT persisted unsigned fDragDropMove; // whether we allow drag/drop moves unsigned fWidgetMargin; // show widget margin? // Setting fUserReadOnly to true overrides setting fDragDropEditing and fDragDropMove to true unsigned fReadOnly; // whether read only unsigned fActiveInModalState; // whether active in a modal state unsigned fClientDragDropFeedback; unsigned fTrackChanges; unsigned uCompletorSize; unsigned fDetectUTF8; long lEditorEmulation; //--------------------------------------------------------------------------------------------- // End of copy of original VIEWPREFERENCES2 struct. New members must be added below this point. unsigned fHighlightCurrentLine; // highlight current line } VIEWPREFERENCES3; //////////////////////////////////////////////////////////////////////////// // IVsTextManager3 interface //////////////////////////////////////////////////////////////////////////// [ uuid(uuid_IVsTextManager3), version(1.0) ] // Preserve signature for method [custom(uuid_VsPreserveSigAttribute, "preservesig")] interface IVsTextManager3 : IUnknown { // For the LANGPREFERENCES member, specify the language in question by setting // pLangPrefs->guidLang to the language SID. [local] HRESULT GetUserPreferences3( [out] VIEWPREFERENCES3 * pViewPrefs, // struct is caller-allocated [out] FRAMEPREFERENCES2 * pFramePrefs, // struct is caller-allocated [in, out] LANGPREFERENCES2 * pLangPrefs, // struct is caller-allocated [in, out] FONTCOLORPREFERENCES2 * pColorPrefs); [local] HRESULT SetUserPreferences3( [in] const VIEWPREFERENCES3 * pViewPrefs, [in] const FRAMEPREFERENCES2 * pFramePrefs, [in] const LANGPREFERENCES2 * pLangPrefs, [in] const FONTCOLORPREFERENCES2 * pColorPrefs); HRESULT FindLanguageSIDForExtensionlessFilename( [in] LPCOLESTR pszFileName, [out] GUID * pguidLangSID); // Asynchronously prepare the expansion manager to support the given language. Attempts // to interact with the expansion manager for this language will block until the asynchronous // work has completed. Calling this method is optional, but the first call to the expansion manager // for a language that has not been primed will do this work synchronously before returning. HRESULT PrimeExpansionManager( [in] REFGUID guidLang); }; //////////////////////////////////////////////////////////////////////////// // IVsTextManagerEvents3 interface //////////////////////////////////////////////////////////////////////////// [ uuid(uuid_IVsTextManagerEvents3 ), version(1.0) ] // Preserve signature for method [custom(uuid_VsPreserveSigAttribute, "preservesig")] interface IVsTextManagerEvents3 : IUnknown { // Fired when a new marker type is registered HRESULT OnRegisterMarkerType ([in] long iMarkerType); // Fired when views are [un]registered HRESULT OnRegisterView ([in] IVsTextView *pView); HRESULT OnUnregisterView ([in] IVsTextView *pView); // Fired when the user's global preferences have changed [local] HRESULT OnUserPreferencesChanged3([in] const VIEWPREFERENCES3 * pViewPrefs, [in] const FRAMEPREFERENCES2 * pFramePrefs, [in] const LANGPREFERENCES2 * pLangPrefs, [in] const FONTCOLORPREFERENCES2 * pColorPrefs); // Fired when the a Replace All in Files operation has begun and ended HRESULT OnReplaceAllInFilesBegin(); HRESULT OnReplaceAllInFilesEnd(); }; //////////////////////////////////////////////////////////////////////////// // IVsTextView3 interface //////////////////////////////////////////////////////////////////////////// [ uuid(uuid_IVsTextView3), version(1.0) ] // Preserve signature for method [custom(uuid_VsPreserveSigAttribute, "preservesig")] interface IVsTextView3 : IUnknown { //Add a command filter that will be called even when the view's caret or selection may not map to the underlying buffer. HRESULT AddProjectionAwareCommandFilter([in] IOleCommandTarget *pNewCmdTarg, [out] IOleCommandTarget **ppNextCmdTarg); //Does this view support the specified TextViewRole? HRESULT DoesViewSupportRole([in]LPCOLESTR pszRole, [out] BOOL *pbContainsRole); //Do the caret and selection map to the underlying TextBuffer HRESULT GetCanCaretAndSelectionMapToSurfaceBuffer([out] BOOL *pbCanMap); } //////////////////////////////////////////////////////////////////////////// // IVsLanguageDebugInfo3 interface //////////////////////////////////////////////////////////////////////////// [ uuid(uuid_IVsLanguageDebugInfo3) ] interface IVsLanguageDebugInfo3 : IUnknown { // Get the valid line variance for binding a breakpoint given a source location. // The debugger will call this function if ValidateBreakpointLocation return E_NOIMPL. // As of Visual Studio 17.4, the debugger will always call this method. // If this function returns S_OK, the debugger will attempt to bind the breakpoint // within a range of lines below the requested breakpoint line as returned by this function. HRESULT GetValidBreakpointLineVariance( [in] IVsTextBuffer *pBuffer, // code buffer containing candidate breakpoint [in] long iLine, // line for candidate breakpoint [in] long iCol, // column for candidate breakpoint [out] long *piVariance); // number of lines below iLine to try and bind breakpoint or -1 for debugger default }; #ifndef INTEROPLIB }; #endif