Skip to main content

Module input

Module input 

Source
Expand description

Input as the page receives it: a controlling viewer’s gesture, routed to the part of the browser that can deliver it as a person’s own.

A pointer gesture is the host’s, a keystroke is the page’s. CEF routes its own mouse calls into a windowless popup - a select’s menu is a separate view - and only CefBrowserHost::SendMouse*Event reaches that routing; the same click sent to the page target over CDP dismisses the menu instead of choosing from it. Keys and text stay on CDP, where a page’s trusted input is already right. The mapping is pure, so the shapes are tested without a browser.

Re-exports§

use forge_primitives::browser::BrowserInputEvent; 🔒
use forge_primitives::browser::BrowserNavState; 🔒
use forge_primitives::browser::InputModifiers; 🔒
use forge_primitives::browser::MouseAction; 🔒
use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use serde::Serialize; 🔒
use serde::Serialize; 🔒
use serde_json::Value; 🔒
use serde_json::json; 🔒

Enums§

HostInput
One pointer gesture as the host delivers it, in whole page pixels.
Route
What carries one input event.

Functions§

cdp_modifiers
The modifier mask CDP wants: Alt 1, Control 2, Meta 4, Shift 8.
cef_modifiers
The modifier bits CEF’s mouse events carry, from cef_types.h: shift 2, control 4, alt 8, and Command 128 on macOS.
history_event
Whether a page event asks the bar’s history again. Only the main frame’s navigation moves it: a subframe’s frameNavigated fires too, and a read per ad iframe is nobody’s time. A same-document entry moves no frame and fires no load, so it names itself - and names the frame it happened in, which is why main is checked for it too.
history_position
The current index and the entries, when the reply holds both.
history_state
Where the page’s history sits, from a Page.getNavigationHistory reply.
host_line
One input as the line the host reads.
main_frame_id
The main frame’s id, from a Page.getFrameTree reply.
navigated_frame_id
The main frame’s id, from a parentless Page.frameNavigated.
parse_host_line
The input one host line names, or None for a line it cannot read.
rounded 🔒
A page coordinate rounded to the whole pixel CEF’s calls take.
route
The route one event takes, into the tab whose page the viewer is on.