// Copyright © 2014 The CefSharp Authors. All rights reserved. // // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. using System; using System.Collections.Generic; namespace CefSharp { /// /// Wrapper for the CefContextMenuParams /// public interface IContextMenuParams : IDisposable { /// /// Returns the Y coordinate of the mouse where the context menu was invoked. /// Coords are relative to the associated RenderView's origin. /// int YCoord { get; } /// /// Returns the X coordinate of the mouse where the context menu was invoked. /// Coords are relative to the associated RenderView's origin. /// int XCoord { get; } /// /// Returns flags representing the type of node that the context menu was invoked on. /// ContextMenuType TypeFlags { get; } /// /// Returns the URL of the link, if any, that encloses the node that the /// context menu was invoked on. /// string LinkUrl { get; } /// /// Returns the link URL, if any, to be used ONLY for "copy link address". We /// don't validate this field in the frontend process. /// string UnfilteredLinkUrl { get; } /// /// Returns the source URL, if any, for the element that the context menu was /// invoked on. Example of elements with source URLs are img, audio, and video. /// string SourceUrl { get; } /// /// Returns true if the context menu was invoked on an image which has /// non-empty contents. /// bool HasImageContents { get; } /// /// Returns the URL of the top level page that the context menu was invoked on. /// string PageUrl { get; } /// /// Returns the URL of the subframe that the context menu was invoked on. /// string FrameUrl { get; } /// /// Returns the character encoding of the subframe that the context menu was /// invoked on. /// string FrameCharset { get; } /// /// Returns the type of context node that the context menu was invoked on. /// ContextMenuMediaType MediaType { get; } /// /// Returns flags representing the actions supported by the media element, if /// any, that the context menu was invoked on. /// ContextMenuMediaState MediaStateFlags { get; } /// /// Returns the text of the selection, if any, that the context menu was /// invoked on. /// string SelectionText { get; } /// /// Returns the text of the misspelled word, if any, that the context menu was /// invoked on. /// string MisspelledWord { get; } /// /// Returns a list of strings from the spell check service for the misspelled word if there is one. /// List DictionarySuggestions { get; } /// /// Returns true if the context menu was invoked on an editable node. /// bool IsEditable { get; } /// /// Returns true if the context menu was invoked on an editable node where /// spell-check is enabled. /// bool IsSpellCheckEnabled { get; } /// /// Returns flags representing the actions supported by the editable node, if /// any, that the context menu was invoked on. /// /// Returns ContextMenuEditState as flags ContextMenuEditState EditStateFlags { get; } /// /// Returns true if the context menu contains items specified by the renderer /// process (for example, plugin placeholder or pepper plugin menu items). /// bool IsCustomMenu { get; } /// /// Returns true if the context menu was invoked from a pepper plugin. /// bool IsPepperMenu { get; } /// /// Gets a value indicating whether the object has been disposed of. /// bool IsDisposed { get; } } }