mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-09-26 08:52:26 +00:00
Added more missing APIs
This commit is contained in:
18
src/ElectronNET.API/API/Entities/AdjustSelectionOptions.cs
Normal file
18
src/ElectronNET.API/API/Entities/AdjustSelectionOptions.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for <see cref="WebContents.AdjustSelection"/>.
|
||||
/// </summary>
|
||||
public class AdjustSelectionOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Amount to shift the start index of the current selection.
|
||||
/// </summary>
|
||||
public int? Start { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Amount to shift the end index of the current selection.
|
||||
/// </summary>
|
||||
public int? End { get; set; }
|
||||
}
|
||||
}
|
||||
24
src/ElectronNET.API/API/Entities/FindInPageOptions.cs
Normal file
24
src/ElectronNET.API/API/Entities/FindInPageOptions.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for <see cref="WebContents.FindInPageAsync"/>.
|
||||
/// </summary>
|
||||
public class FindInPageOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether to search forward or backward, defaults to true.
|
||||
/// </summary>
|
||||
public bool? Forward { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether to begin a new text finding session with this request. Should be true
|
||||
/// for initial requests, and false for subsequent requests. Defaults to false.
|
||||
/// </summary>
|
||||
public bool? FindNext { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether search should be case-sensitive, defaults to false.
|
||||
/// </summary>
|
||||
public bool? MatchCase { get; set; }
|
||||
}
|
||||
}
|
||||
33
src/ElectronNET.API/API/Entities/FoundInPageResult.cs
Normal file
33
src/ElectronNET.API/API/Entities/FoundInPageResult.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// The result of a text finding session, reported by the found-in-page event.
|
||||
/// </summary>
|
||||
public class FoundInPageResult
|
||||
{
|
||||
/// <summary>
|
||||
/// The identifier of the request returned by FindInPageAsync.
|
||||
/// </summary>
|
||||
public int RequestId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Position of the active match.
|
||||
/// </summary>
|
||||
public int ActiveMatchOrdinal { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Number of matches.
|
||||
/// </summary>
|
||||
public int Matches { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Coordinates of the first match region.
|
||||
/// </summary>
|
||||
public Rectangle SelectionArea { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether more responses are to follow.
|
||||
/// </summary>
|
||||
public bool FinalUpdate { get; set; }
|
||||
}
|
||||
}
|
||||
25
src/ElectronNET.API/API/Entities/LoadFileOptions.cs
Normal file
25
src/ElectronNET.API/API/Entities/LoadFileOptions.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Options for loading a local file into a web page.
|
||||
/// </summary>
|
||||
public class LoadFileOptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Passed to url.format().
|
||||
/// </summary>
|
||||
public Dictionary<string, string> Query { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Passed to url.format().
|
||||
/// </summary>
|
||||
public string Search { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Passed to url.format().
|
||||
/// </summary>
|
||||
public string Hash { get; set; }
|
||||
}
|
||||
}
|
||||
23
src/ElectronNET.API/API/Entities/StopFindInPageAction.cs
Normal file
23
src/ElectronNET.API/API/Entities/StopFindInPageAction.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace ElectronNET.API.Entities
|
||||
{
|
||||
/// <summary>
|
||||
/// Determines what happens to the selection when a text finding session is stopped.
|
||||
/// </summary>
|
||||
public enum StopFindInPageAction
|
||||
{
|
||||
/// <summary>
|
||||
/// Clear the selection.
|
||||
/// </summary>
|
||||
ClearSelection,
|
||||
|
||||
/// <summary>
|
||||
/// Translate the selection into a normal selection.
|
||||
/// </summary>
|
||||
KeepSelection,
|
||||
|
||||
/// <summary>
|
||||
/// Focus and click the selection node.
|
||||
/// </summary>
|
||||
ActivateSelection
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user