FBro浏览器控制接口完整参考
📋 接口概述
IFBroSharpBrowser 是FBro浏览器框架的核心控制接口,提供了完整的浏览器操作API。该接口与"类_FBrowser_浏览器"和"FBroSharpBrowser"实现类对应,为C#开发者提供强大的浏览器自动化控制能力。
🎯 接口特性
- 完整的CEF3封装:基于Chromium Embedded Framework 3的完整功能封装
- 线程安全设计:支持多线程环境下的浏览器操作
- 事件驱动架构:提供丰富的事件回调机制
- 离屏渲染支持:支持无界面模式的浏览器操作
- VIP高级功能:包含指纹管理、代理设置等高级特性
🚀 快速使用示例
csharp
// 基础接口使用模式
// 注:需要先完成FBro初始化和浏览器创建,具体创建方法请参考相关文档
// 假设已经通过创建方法获得了浏览器实例
IFBroSharpBrowser browser = yourBrowserInstance; // 这里应该是实际的浏览器实例
// 检查浏览器有效性
if (browser != null && browser.IsValid)
{
// 导航到指定页面
browser.GetMainFrame().LoadURL("https://www.example.com");
// 等待页面加载完成
while (browser.IsLoading())
{
Thread.Sleep(100);
}
// 获取浏览器ID
int browserId = browser.GetIdentifier();
Console.WriteLine($"浏览器ID: {browserId}");
// 设置焦点
browser.SetFocus(true);
// 使用完毕后释放资源
// browser.CloseBrowser();
}
else
{
Console.WriteLine("浏览器实例无效或为空");
}📚 接口方法分类
| 功能分类 | 核心方法 | 方法数量 | 主要用途 |
|---|---|---|---|
| 基础导航 | CanGoBack(), GoBack(), CanGoForward(), GoForward() | 4个 | 页面前进后退控制 |
| 页面状态 | IsLoading(), Reload(), ReloadIgnoreCache(), StopLoad() | 4个 | 页面加载状态管理 |
| 浏览器信息 | GetIdentifier(), IsSame(), IsPopup(), HasDocument() | 4个 | 浏览器实例信息获取 |
| 框架操作 | GetMainFrame(), GetFocusedFrame(), GetFrameById() | 7个 | 多框架页面处理 |
| 窗口管理 | ShowWindow(), MoveWindow(), SetParent(), GetWindowHandle() | 8个 | 窗口显示和控制 |
| 事件处理 | SendKeyEvent(), SendMouseClickEvent(), SendTouchEvent() | 8个 | 用户输入事件模拟 |
| 开发者工具 | ShowDevTools(), CloseDevTools(), HasDevTools() | 3个 | 调试功能支持 |
| 缓存管理 | ClearCacheData() | 1个 | 浏览器缓存清理 |
| 生命周期 | CloseBrowser(), TryCloseBrowser() | 2个 | 浏览器关闭管理 |
| 高级功能 | SetProxy(), ClearProxy(), GetVIPControl() | 5个 | 代理设置和VIP功能 |
| 离屏渲染 | WasResized(), WasHidden(), Invalidate() | 15个 | 无界面模式支持 |
| 文件操作 | StartDownload(), DownloadImage(), RunFileDialog() | 3个 | 文件下载和对话框 |
| 打印功能 | Print(), PrintToPDF() | 2个 | 页面打印和PDF导出 |
| 查找功能 | Find(), StopFinding() | 2个 | 页面内容搜索 |
🔧 接口继承关系
csharp
IFBroSharpBrowser : IFBroSharpBase, IDisposable- IFBroSharpBase: 提供基础功能接口
- IDisposable: 支持资源自动释放
⚠️ 重要使用注意事项
- 线程要求: UI相关操作必须在UI线程中执行
- 资源释放: 实现了IDisposable接口,需要正确释放资源
- 有效性检查: 使用前请务必检查
IsValid属性 - VIP功能: 部分高级功能需要VIP授权才能使用
- 回调处理: 异步操作需要正确处理回调函数
- 异常捕获: 建议在所有操作中添加异常处理机制
📖 相关文档链接
📋 完整接口定义
浏览器控制类接口:与"类_FBrowser_浏览器"和"FBroSharpBrowser"对应
csharp
using System;
using System.Collections.Generic;
using FBroSharp.Callback;
using FBroSharp.Const;
using FBroSharp.DataType;
using FBroSharp.Event;
using FBroSharp.Value;
using FBroSharp.VIP;
namespace FBroSharp.Lib;
//
// 摘要:
// 浏览器控制类接口:与"类_FBrowser_浏览器"和"FBroSharpBrowser"对应
public interface IFBroSharpBrowser : IFBroSharpBase, IDisposable
{
//
// 摘要:
// 是否有效
//
// True if this object is currently attached to a valid frame.
bool IsValid { get; }
//
// 摘要:
// 可否后退
//
// 判断当前浏览器是否可以后退到之前网页
//
// 返回结果:
// 返回真表示可以后退,返回假表示不能后退
bool CanGoBack();
//
// 摘要:
// 后退
//
// 使当前浏览器后退到之前网页
void GoBack();
//
// 摘要:
// 可否前进
//
// 判断当前浏览器是否可以前进到之前网页
//
// 返回结果:
// 返回真表示可以前进,返回假表示不能前进
bool CanGoForward();
//
// 摘要:
// 前进
//
// 使当前浏览器后前进之前网页
void GoForward();
//
// 摘要:
// 是否读取中
//
// 使当前浏览器后前进之前网页
//
// 返回结果:
// Returns true if the browser is currently loading.
bool IsLoading();
//
// 摘要:
// 重新载入
//
// Reload the current page.
void Reload();
//
// 摘要:
// 重新载入_忽略缓存
//
// Reload the current page ignoring any cached data.
void ReloadIgnoreCache();
//
// 摘要:
// 停止载入
//
// Stop loading the page.
void StopLoad();
//
// 摘要:
// 取ID
//
// Returns the globally unique identifier for this browser. This value is also used
// as the tabId for extension APIs.
int GetIdentifier();
//
// 摘要:
// 是否相同:因浏览器内置指针为智能指针多次封装,无法直接判断类相同,只能通过此方法判断是不是同一个浏览器
//
// 参数:
// that:
// 要对比的浏览器
bool IsSame(IFBroSharpBrowser that);
//
// 摘要:
// 是否为弹窗
//
// 返回结果:
// Returns true if the window is a popup window.
bool IsPopup();
//
// 摘要:
// 是否有文档
//
// 返回结果:
// Returns true if a document has been loaded in the browser.
bool HasDocument();
//
// 摘要:
// 取主框架
//
// 返回结果:
// 返回当前浏览器的主框架,返回值类型为"FBroSharpFrame"和"类_FBrowser_框架"与接口"IFBroSharpFrame"对应
IFBroSharpFrame GetMainFrame();
//
// 摘要:
// 取焦点框架
//
// 返回结果:
// 返回当前浏览器的焦点框架,返回值类型为"FBroSharpFrame"和"类_FBrowser_框架"与接口"IFBroSharpFrame"对应
IFBroSharpFrame GetFocusedFrame();
//
// 摘要:
// 取框架_ID:通过框架ID取出当前浏览器框架
//
// 参数:
// identifier:
// 框架id
//
// 返回结果:
// 返回当前浏览器的对应框架ID的框架,返回值类型为"FBroSharpFrame"和"类_FBrowser_框架"与接口"IFBroSharpFrame"对应
IFBroSharpFrame GetFrameById(long identifier);
//
// 摘要:
// 取框架_名称:通过框架名取出当前浏览器框架
//
// 参数:
// name:
// 框架名
//
// 返回结果:
// 返回当前浏览器的对应框架名的框架,返回值类型为"FBroSharpFrame"和"类_FBrowser_框架"与接口"IFBroSharpFrame"对应
IFBroSharpFrame GetFrameByName(string name);
//
// 摘要:
// 取框架ID:取出当前浏览器全部框架ID
//
// 返回结果:
// 返回保存全部框架ID的List数组
List<long> GetFrameIdentifiers();
//
// 摘要:
// 取框架数:取出当前浏览器的框架数量
//
// 返回结果:
// 返回框架数量
int GetFrameCount();
//
// 摘要:
// 取框架名称:取出当前浏览器全部框架名
//
// 返回结果:
// 返回保存全部框架名的List数组
List<string> GetFrameNames();
//
// 摘要:
// 清理缓存
//
// 非cef自带功能,FBrowser特有内核实现功能,清理当前浏览器缓存,支持占用状态下清理appcache,cache_storage,cookies,indexeddb,local_storage,service_workers,websql;
// 注:如果是独立缓存又采用了单进程模式清理无效,因为独立缓存是不能使用单进程模式的,调试状态使用单进程模式的请注意,可以编译出来进行测试,或调试也不用单进程模式;
// 如要对浏览器执行其他操作需要等缓存清理完成后再操作,否则可能会出现各种意想不到的异常!
void ClearCacheData(string origin, FBroSharpRemoveData removeflag, FBroSharpCacheType quotaflag, FBroSharpClearCacheCallback callback);
//
// 摘要:
// 关闭浏览器
//
// Request that the browser close. The JavaScript 'onbeforeunload' event will be
// fired. If |force_close| is false the event handler, if any, will be allowed to
// prompt the user and the user can optionally cancel the close. If |force_close|
// is true the prompt will not be displayed and the close will proceed. Results
// in a call to CefLifeSpanHandler::DoClose() if the event handler allows the close
// or if |force_close| is true. See CefLifeSpanHandler::DoClose() documentation
// for additional usage information.
//
// 立即关闭 是否将当前设置为空,设置为真后,这里会将当前浏览器直接设置为空,如果是数组,设置空后可直接使用命令删除当前成员,不用等浏览器事件关闭时再删除
void CloseBrowser(bool force_close = false, bool set_null = false);
//
// 摘要:
// 尝试关闭浏览器
//
// Helper for closing a browser. Call this method from the top-level window close
// handler (if any). Internally this calls CloseBrowser(false) if the close has
// not yet been initiated. This method returns false while the close is pending
// and true after the close has completed. See CloseBrowser() and CefLifeSpanHandler::DoClose()
// documentation for additional usage information. This method must be called on
// the browser process UI thread.
//
// 是否执行关闭成功后直接将当前设置为空,设置为真后,这里会将当前浏览器直接设置为空,如果是数组,设置空后可直接使用命令删除当前成员,不用等浏览器事件关闭时再删除
bool TryCloseBrowser(bool set_null = false);
//
// 摘要:
// 置焦点
//
// Set whether the browser is focused.
void SetFocus(bool focus);
//
// 摘要:
// 取窗口句柄
//
// Retrieve the window handle (if any) for this browser. If this browser is wrapped
// in a CefBrowserView this method should be called on the browser process UI thread
// and it will return the handle for the top-level native window.
IntPtr GetWindowHandle();
//
// 摘要:
// 取打开者窗口句柄
//
// Retrieve the window handle (if any) of the browser that opened this browser.
// Will return NULL for non-popup browsers or if this browser is wrapped in a CefBrowserView.
// This method can be used in combination with custom handling of modal windows.
IntPtr GetOpenerWindowHandle();
//
// 摘要:
// 是否浏览器视图
//
// Returns true if this browser is wrapped in a CefBrowserView.
bool HasView();
//
// 摘要:
// 取缩放级别
//
// Get the current zoom level. The default zoom level is 0.0. This method can only
// be called on the UI thread.
double GetZoomLevel();
//
// 摘要:
// 置缩放级别
//
// Change the zoom level to the specified value. Specify 0.0 to reset the zoom level.
// If called on the UI thread the change will be applied immediately. Otherwise,
// the change will be applied asynchronously on the UI thread.
void SetZoomLevel(double zoomLevel);
//
// 摘要:
// 开始下载
//
// Download the file at |url| using CefDownloadHandler.
void StartDownload(string url);
//
// 摘要:
// 下载图片
//
// Download |image_url| and execute |callback| on completion with the images received
// from the renderer. If |is_favicon| is true then cookies are not sent and not
// accepted during download. Images with density independent pixel (DIP) sizes larger
// than |max_image_size| are filtered out from the image results. Versions of the
// image at different scale factors may be downloaded up to the maximum scale factor
// supported by the system. If there are no image results <= |max_image_size| then
// the smallest image is resized to |max_image_size| and is the only result. A |max_image_size|
// of 0 means unlimited. If |bypass_cache| is true then |image_url| is requested
// from the server even if it is present in the browser cache.
void DownloadImage(string url, bool is_favicon, uint max_image_size, bool bypass_cache, FBroSharpDownloadImageCallback hscallback);
//
// 摘要:
// 打开对话框
//
// Call to run a file chooser dialog. Only a single file chooser dialog may be pending
// at any given time. |mode| represents the type of dialog to display. |title| to
// the title to be used for the dialog and may be empty to show the default title
// ("Open" or "Save" depending on the mode). |default_file_path| is the path with
// optional directory and/or file name component that will be initially selected
// in the dialog. |accept_filters| are used to restrict the selectable file types
// and may any combination of (a) valid lower-cased MIME types (e.g. "text/*" or
// "image/*"), (b) individual file extensions (e.g. ".txt" or ".png"), or (c) combined
// description and file extension delimited using "|" and ";" (e.g. "Image Types|.png;.gif;.jpg").
// |callback| will be executed after the dialog is dismissed or immediately if another
// dialog is already pending. The dialog will be initiated asynchronously on the
// UI thread.
void RunFileDialog(FBroSharpFileDialogModeType mode, string title, string defaultfliename, List<string> acceptfilters, FBroSharpFileDialogCallback hscallback);
//
// 摘要:
// 打印
//
// Print the current browser contents.
void Print();
//
// 摘要:
// 打印为PDF
//
// Print the current browser contents to the PDF file specified by |path| and execute
// |callback| on completion. The caller is responsible for deleting |path| when
// done. For PDF printing to work on Linux you must implement the CefPrintHandler::GetPdfPaperSize
// method.
void PrintToPDF(FBroSharpPdfPrintMargintype margin_type, string path, int page_height, int page_width, int landscape, bool isprintfbackground, FBroSharpPdfPrintCallback hscallback);
//
// 摘要:
// 查找
//
// Search for |searchText|. |forward| indicates whether to search forward or backward
// within the page. |matchCase| indicates whether the search should be case-sensitive.
// |findNext| indicates whether this is the first request or a follow-up. The search
// will be restarted if |searchText| or |matchCase| change. The search will be stopped
// if |searchText| is empty. The CefFindHandler instance, if any, returned via CefClient::GetFindHandler
// will be called to report find results.
void Find(string searchText, bool forward, bool matchCase, bool findNext);
//
// 摘要:
// 停止查找
//
// Cancel all searches that are currently going on.
void StopFinding(bool clearSelection);
//
// 摘要:
// 打开开发者工具
//
// Open developer tools (DevTools) in its own browser. The DevTools browser will
// remain associated with this browser. If the DevTools browser is already open
// then it will be focused, in which case the |windowInfo|, |client| and |settings|
// parameters will be ignored. If |inspect_element_at| is non-empty then the element
// at the specified (x,y) location will be inspected. The |windowInfo| parameter
// will be ignored if this browser is wrapped in a CefBrowserView.
void ShowDevTools(string title, IntPtr parent, int x, int y, int nWidth, int nHeight, FBroSharpBrowserSetting browsersetinfo, FBroSharpElementAt element_at, FBroSharpBrowserEvent hsbroevent, FBroSharpEventDisableControl eventControl);
//
// 摘要:
// 关闭开发者工具
//
// Explicitly close the associated DevTools browser, if any.
void CloseDevTools();
//
// 摘要:
// 是否存在开发者工具
//
// Returns true if this browser currently has an associated DevTools browser. Must
// be called on the browser process UI thread.
bool HasDevTools();
//
// 摘要:
// 发送按键事件
//
// Send a key event to the browser.
void SendKeyEvent(FBroSharpKeyEvent keyevent);
//
// 摘要:
// 是否页面静音
//
// Returns true if the browser's audio is muted. This method can only be called
// on the UI thread.
bool IsAudioMuted();
//
// 摘要:
// 置自动调整大小
//
// Enable notifications of auto resize via CefDisplayHandler::OnAutoResize. Notifications
// are disabled by default. |min_size| and |max_size| define the range of allowed
// sizes.
void SetAutoResizeEnabled(bool enabled, int min_height, int min_width, int max_height, int max_width);
//
// 摘要:
// 取请求环境
//
// Returns the request context for this browser.
IFBroSharpRequestContext GetRequestContext();
//
// 摘要:
// 置页面静音
//
// Set whether the browser's audio is muted.
void SetAudioMuted(bool mute);
//
// 摘要:
// 发送焦点事件
void SendFocusEvent(bool setFocus);
//
// 摘要:
// 发送触摸事件
//
// Send a touch event to the browser for a windowless browser.
void SendTouchEvent(FBroSharpTouchEvent touchEvent);
//
// 摘要:
// 发送鼠标滚轮事件
//
// Send a mouse wheel event to the browser. The |x| and |y| coordinates are relative
// to the upper-left corner of the view. The |deltaX| and |deltaY| values represent
// the movement delta in the X and Y directions respectively. In order to scroll
// inside select popups with window rendering disabled CefRenderHandler::GetScreenPoint
// should be implemented properly.
void SendMouseWheelEvent(FBroSharpMouseEvent mouserEvent, int deltaX, int deltaY);
//
// 摘要:
// 发送鼠标移动事件
//
// Send a mouse move event to the browser. The |x| and |y| coordinates are relative
// to the upper-left corner of the view.
void SendMouseMoveEvent(FBroSharpMouseEvent mouserEvent, bool mouseLeave);
//
// 摘要:
// 发送鼠标点击事件
//
// Send a mouse click event to the browser. The |x| and |y| coordinates are relative
// to the upper-left corner of the view.
void SendMouseClickEvent(FBroSharpMouseButtonType ButtonType, FBroSharpMouseEvent mouserEvent, bool mouseUp, int clickCount);
//
// 摘要:
// 离屏渲染_离屏渲染被禁用
//
// Returns true if window rendering is disabled.
bool IsWindowRenderingDisabled();
//
// 摘要:
// 离屏渲染_通知已被调整大小
//
// Notify the browser that the widget has been resized. The browser will first call
// CefRenderHandler::GetViewRect to get the new size and then call CefRenderHandler::OnPaint
// asynchronously with the updated regions. This method is only used when window
// rendering is disabled.
void WasResized();
//
// 摘要:
// 离屏渲染_通知已被隐藏
//
// Notify the browser that it has been hidden or shown. Layouting and CefRenderHandler::OnPaint
// notification will stop when the browser is hidden. This method is only used when
// window rendering is disabled.
void WasHidden(bool hidden);
//
// 摘要:
// 离屏渲染_通知屏幕信息被改变
//
// Send a notification to the browser that the screen info has changed. The browser
// will then call CefRenderHandler::GetScreenInfo to update the screen information
// with the new values. This simulates moving the webview window from one display
// to another, or changing the properties of the current display. This method is
// only used when window rendering is disabled.
void NotifyScreenInfoChanged();
//
// 摘要:
// 离屏渲染_使视图无效
//
// Invalidate the view. The browser will call CefRenderHandler::OnPaint asynchronously.
// This method is only used when window rendering is disabled.
void Invalidate(FBroSharpPaintElementType type);
//
// 摘要:
// 离屏渲染_取帧率
//
// Returns the maximum rate in frames per second (fps) that CefRenderHandler::OnPaint
// will be called for a windowless browser. The actual fps may be lower if the browser
// cannot generate frames at the requested rate. The minimum value is 1 and the
// maximum value is 60 (default 30). This method can only be called on the UI thread.
int GetWindowlessFrameRate();
//
// 摘要:
// 离屏渲染_置帧率
//
// Set the maximum rate in frames per second (fps) that CefRenderHandler:: OnPaint
// will be called for a windowless browser. The actual fps may be lower if the browser
// cannot generate frames at the requested rate. The minimum value is 1 and the
// maximum value is 60 (default 30). Can also be set at browser creation via CefBrowserSettings.windowless_frame_rate.
void SetWindowlessFrameRate(int frame_rate);
//
// 摘要:
// 离屏渲染_IME置组成
//
// Begins a new composition or updates the existing composition. Blink has a special
// node (a composition node) that allows the input method to change text without
// affecting other DOM nodes. |text| is the optional text that will be inserted
// into the composition node. |underlines| is an optional set of ranges that will
// be underlined in the resulting text. |replacement_range| is an optional range
// of the existing text that will be replaced. |selection_range| is an optional
// range of the resulting text that will be selected after insertion or replacement.
// The |replacement_range| value is only used on OS X.
//
// This method may be called multiple times as the composition changes. When the
// client is done making changes the composition should either be canceled or completed.
// To cancel the composition call ImeCancelComposition. To complete the composition
// call either ImeCommitText or ImeFinishComposingText. Completion is usually signaled
// when:
//
// 1. The client receives a WM_IME_COMPOSITION message with a GCS_RESULTSTR flag
// (on Windows), or;
//
// 2. The client receives a "commit" signal of GtkIMContext (on Linux), or;
//
// 3. insertText of NSTextInput is called (on Mac).
//
// This method is only used when window rendering is disabled.
void ImeSetComposition(string intext, List<FBroSharpCompositionUnderline> inunderlines, FBroSharpRange inreplacement_range, FBroSharpRange inselection_range);
//
// 摘要:
// 离屏渲染_IME置交互文本
//
// Completes the existing composition by optionally inserting the specified |text|
// into the composition node. |replacement_range| is an optional range of the existing
// text that will be replaced. |relative_cursor_pos| is where the cursor will be
// positioned relative to the current cursor position. See comments on ImeSetComposition
// for usage. The |replacement_range| and |relative_cursor_pos| values are only
// used on OS X. This method is only used when window rendering is disabled.
void ImeCommitText(string intext, FBroSharpRange inreplacement_range, int relative_cursor_pos);
//
// 摘要:
// 离屏渲染_IME完成组合文本
//
// Completes the existing composition by applying the current composition node contents.
// If |keep_selection| is false the current selection, if any, will be discarded.
// See comments on ImeSetComposition for usage. This method is only used when window
// rendering is disabled.
void ImeFinishComposingText(bool keep_selection);
//
// 摘要:
// 离屏渲染_IME取消组合
//
// Cancels the existing composition and discards the composition node contents without
// applying them. See comments on ImeSetComposition for usage. This method is only
// used when window rendering is disabled.
void ImeCancelComposition();
//
// 摘要:
// 离屏渲染_拖动进入
//
// Call this method when the user drags the mouse into the web view (before calling
// DragTargetDragOver/DragTargetLeave/DragTargetDrop). |drag_data| should not contain
// file contents as this type of data is not allowed to be dragged into the web
// view. File contents can be removed using CefDragData::ResetFileContents (for
// example, if |drag_data| comes from CefRenderHandler::StartDragging). This method
// is only used when window rendering is disabled.
void DragTargetDragEnter(IFBroSharpDragData indrag_data, FBroSharpMouseEvent inevent, int inallowed_ops);
//
// 摘要:
// 离屏渲染_拖动移动
//
// Call this method each time the mouse is moved across the web view during a drag
// operation (after calling DragTargetDragEnter and before calling DragTargetDragLeave/DragTargetDrop).
// This method is only used when window rendering is disabled.
void DragTargetDragOver(FBroSharpMouseEvent inevent, int inallowed_ops);
//
// 摘要:
// 离屏渲染_拖动离开
//
// Call this method when the user drags the mouse out of the web view (after calling
// DragTargetDragEnter). This method is only used when window rendering is disabled.
void DragTargetDragLeave();
//
// 摘要:
// 离屏渲染_拖动放下
//
// Call this method when the user completes the drag operation by dropping the object
// onto the web view (after calling DragTargetDragEnter). The object being dropped
// is |drag_data|, given as an argument to the previous DragTargetDragEnter call.
// This method is only used when window rendering is disabled.
void DragTargetDrop(FBroSharpMouseEvent inevent);
//
// 摘要:
// 离屏渲染_拖动结束位置
//
// Call this method when the drag operation started by a CefRenderHandler::StartDragging
// call has ended either in a drop or by being cancelled. |x| and |y| are mouse
// coordinates relative to the upper-left corner of the view. If the web view is
// both the drag source and the drag target then all DragTarget* methods should
// be called before DragSource* mthods. This method is only used when window rendering
// is disabled.
void DragSourceEndedAt(int x, int y, FBroSharpDragOperationsMaskType op);
//
// 摘要:
// 离屏渲染_拖动系统结束
//
// Call this method when the drag operation started by a CefRenderHandler::StartDragging
// call has completed. This method may be called immediately without first calling
// DragSourceEndedAt to cancel a drag operation. If the web view is both the drag
// source and the drag target then all DragTarget* methods should be called before
// DragSource* mthods. This method is only used when window rendering is disabled.
void DragSourceSystemDragEnded();
//
// 摘要:
// 显示浏览器
//
// 参数为false隐藏,参数为true显示
void ShowWindow(bool show);
//
// 摘要:
// 移动窗口
void MoveWindow(int x, int y, int nWidth, int nHeight, bool bRepaint);
//
// 摘要:
// 置父窗口
bool SetParent(IntPtr newparent);
//
// 摘要:
// 设置浏览器窗口风格
//
// 非父窗口
void SetWinLong(FBroWinLongType gwl, long newws);
//
// 摘要:
// 清理缓存
long GetWinLong(FBroWinLongType gwl);
//
// 摘要:
// 取扩展插件
//
// Returns the extension hosted in this browser or NULL if no extension is hosted.
// See CefRequestContext::LoadExtension for details.
IFBroSharpExtension GetExtension();
//
// 摘要:
// 是否为后台
//
// Returns true if this browser is hosting an extension background script. Background
// hosts do not have a window and are not displayable. See CefRequestContext::LoadExtension
// for details.
bool IsBackgroundHost();
//
// 摘要:
// 取窗口标题
//
// 取当前浏览器窗口标题,非父窗口标题
string GetWindowsTitle();
//
// 摘要:
// 取额外数据
//
// 取出浏览器创建时传递的额外数据
IFBroSharpDictionaryValue GetExtrainfo();
//
// 摘要:
// 是否为开发者
//
// 判断当前浏览器是不是开发者工具
bool IsDevTools();
//
// 摘要:
// 取主填表框架
//
// 取出主框架对应的填表框架,取出后后可执行相关填表操作
IFBroSharpTianBiaoFrame GetMainTianBiaoFrame();
//
// 摘要:
// 取焦点填表框架
//
// 取出当前焦点框架对应的填表框架,取出后后可执行相关填表操作
IFBroSharpTianBiaoFrame GetFocusedTianBiaoFrame();
//
// 摘要:
// 取焦点框架_ID
//
// 通过框架ID取出对应的填表框架,取出后后可执行相关填表操作
IFBroSharpTianBiaoFrame GetTianBiaoFrameById(long identifier);
//
// 摘要:
// 取框架_名称
//
// 通过框架名取出对应的填表框架,取出后后可执行相关填表操作
IFBroSharpTianBiaoFrame GetTianBiaoFrameByName(string name);
//
// 摘要:
// 获取VIP控制类
//
// VIP功能需赞助后才能使用。赞助说明链接:https://www.showdoc.com.cn/FBrowserCEF3Lib/8548994810810201
//
//
// 获取后可通过VIP控制类执行指纹等高级功能
IFBroSharpVIPControl GetVIPControl();
//
// 摘要:
// 获取进程间通讯控制类
//
// 需在初始化设置中设置"enableprocessmessage"启用进程间消息后才能使用
IFBroSharpOwnProcessMessageControl GetOwnProcessMessageControl();
//
// 摘要:
// 取浏览器用户标识
//
// 这里的用户标识指的是浏览器创建的时候传递设置的值
string GetUserFlag();
//
// 摘要:
// 设置代理
//
// 设置当前浏览器代理,在"浏览器_即将导航OnBeforeBrowse"或"浏览器_创建完毕OnAfterCreated"事件中设置,也可在其他地方设置,但刷新后才会生效;
// 配合独立缓存一起使用设置的代理也会成为独立,否则还是全局,如果需要认证则需要设置账号密码; 带账号密码的S5代理,需赞助会员才可使用
//
// 参数:
// url:
// 代理地址
void SetProxy(string url);
//
// 摘要:
// 设置代理
//
// 参数:
// url:
// 代理地址
//
// user:
// 代理账号
//
// password:
// 代理密码
void SetProxy(string url, string user, string password);
//
// 摘要:
// 清空代理
//
// 清空当前浏览的代理设置
void ClearProxy();
}
#if false // 反编译日志
缓存中的 14 项
------------------
解析: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\mscorlib.dll"
------------------
解析: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
找到单个程序集: "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
从以下位置加载: "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.8\System.dll"
#endif