You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve libservo API (WindowMethods and WindowEvent) #15645
As of now, the embedder must implement the WindowMethods trait.
I would split these methods in 4 groups:
asking the embedder to perform an action
prepare_for_composite
create_compositor_channel
present
asking the embedder about the geometry of the viewport
scale_factor
framebuffer_size
size
client_window
asking the embedder about capabilities
supports_clipboard
events. Notifying the embedder of a change. Up to the embedder to honour them:
set_inner_size
set_position
set_fullscreen_state
set_page_title
set_page_url
status
load_start
load_end
load_error
head_parsed
set_cursor
set_favicon
handle_key
I think we can offer a better API:
create_compositor_channel: this could be a clonable object passed to Browser::new()
geometry related methods could be removed, and instead, the browser object would have a updateGeometry(AGeometryStruct) method. AGeometryStruct would include the scale factor, the inner size and the window position.
capability methods would be regular callbacks
present and prepare_for_composite, and all the other events as events. (browser.getEvents()).
As for browser.handle_events, it accepts WindowEvent. Not everything is a window event. We need a better semantic here. Maybe ServoCommand.
Activity
[-]Improve libservo API[/-][+]Improve libservo API (WindowMethods)[/+][-]Improve libservo API (WindowMethods)[/-][+]Improve libservo API (WindowMethods and WindowEvent)[/+]paulrouget commentedon Mar 14, 2017
Superseded by #15934