#[repr(C)]pub struct _cef_frame_t {Show 27 fields
pub base: cef_base_ref_counted_t,
pub is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>,
pub undo: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub redo: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub cut: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub copy: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub paste: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub paste_and_match_style: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub del: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub select_all: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub view_source: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>,
pub get_source: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t)>,
pub get_text: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t)>,
pub load_request: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, request: *mut _cef_request_t)>,
pub load_url: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, url: *const cef_string_t)>,
pub execute_java_script: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, code: *const cef_string_t, script_url: *const cef_string_t, start_line: c_int)>,
pub is_main: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>,
pub is_focused: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>,
pub get_name: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>,
pub get_identifier: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>,
pub get_parent: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_frame_t>,
pub get_url: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>,
pub get_browser: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_browser_t>,
pub get_v8_context: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_v8_context_t>,
pub visit_dom: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_domvisitor_t)>,
pub create_urlrequest: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, request: *mut _cef_request_t, client: *mut _cef_urlrequest_client_t) -> *mut _cef_urlrequest_t>,
pub send_process_message: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, target_process: cef_process_id_t, message: *mut _cef_process_message_t)>,
}Expand description
Structure used to represent a frame in the browser window. When used in the browser process the functions of this structure may be called on any thread unless otherwise indicated in the comments. When used in the render process the functions of this structure may only be called on the main thread.
NOTE: This struct is allocated DLL-side.
Fields§
§base: cef_base_ref_counted_tBase structure.
is_valid: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>True if this object is currently attached to a valid frame.
undo: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute undo in this frame.
redo: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute redo in this frame.
cut: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute cut in this frame.
copy: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute copy in this frame.
paste: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute paste in this frame.
paste_and_match_style: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute paste and match style in this frame.
del: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute delete in this frame.
select_all: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Execute select all in this frame.
view_source: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t)>Save this frame’s HTML source to a temporary file and open it in the default text viewing application. This function can only be called from the browser process.
get_source: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t)>Retrieve this frame’s HTML source as a string sent to the specified visitor.
get_text: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_string_visitor_t)>Retrieve this frame’s display text as a string sent to the specified visitor.
load_request: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, request: *mut _cef_request_t)>Load the request represented by the |request| object.
WARNING: This function will fail with “bad IPC message” reason INVALID_INITIATOR_ORIGIN (213) unless you first navigate to the request origin using some other mechanism (LoadURL, link click, etc).
load_url: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, url: *const cef_string_t)>Load the specified |url|.
execute_java_script: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, code: *const cef_string_t, script_url: *const cef_string_t, start_line: c_int)>Execute a string of JavaScript code in this frame. The |script_url| parameter is the URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error. The |start_line| parameter is the base line number to use for error reporting.
is_main: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>Returns true (1) if this is the main (top-level) frame.
is_focused: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> c_int>Returns true (1) if this is the focused frame.
get_name: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>Returns the name for this frame. If the frame has an assigned name (for example, set via the iframe “name” attribute) then that value will be returned. Otherwise a unique name will be constructed based on the frame parent hierarchy. The main (top-level) frame will always have an NULL name value.
get_identifier: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>Returns the globally unique identifier for this frame or NULL if the underlying frame does not yet exist.
get_parent: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_frame_t>Returns the parent of this frame or NULL if this is the main (top-level) frame.
get_url: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> cef_string_userfree_t>Returns the URL currently loaded in this frame.
get_browser: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_browser_t>Returns the browser that this frame belongs to.
get_v8_context: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t) -> *mut _cef_v8_context_t>Get the V8 context associated with the frame. This function can only be called from the render process.
visit_dom: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, visitor: *mut _cef_domvisitor_t)>Visit the DOM document. This function can only be called from the render process.
create_urlrequest: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, request: *mut _cef_request_t, client: *mut _cef_urlrequest_client_t) -> *mut _cef_urlrequest_t>Create a new URL request that will be treated as originating from this frame and the associated browser. Use cef_urlrequest_t::Create instead if you do not want the request to have this association, in which case it may be handled differently (see documentation on that function). A request created with this function may only originate from the browser process, and will behave as follows:
- It may be intercepted by the client via CefResourceRequestHandler or CefSchemeHandlerFactory.
- POST data may only contain a single element of type PDE_TYPE_FILE or PDE_TYPE_BYTES.
The |request| object will be marked as read-only after calling this function.
send_process_message: Option<unsafe extern "C" fn(self_: *mut _cef_frame_t, target_process: cef_process_id_t, message: *mut _cef_process_message_t)>Send a message to the specified |target_process|. Ownership of the message contents will be transferred and the |message| reference will be invalidated. Message delivery is not guaranteed in all cases (for example, if the browser is closing, navigating, or if the target process crashes). Send an ACK message back from the target process if confirmation is required.
Trait Implementations§
Source§impl Clone for _cef_frame_t
impl Clone for _cef_frame_t
Source§fn clone(&self) -> _cef_frame_t
fn clone(&self) -> _cef_frame_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more