Enum compositing::windowing::WindowEvent[][src]

pub enum WindowEvent {
Show 29 variants Idle, Refresh, Resize, AllowNavigationResponse(PipelineIdbool), LoadUrl(TopLevelBrowsingContextIdServoUrl), MouseWindowEventClass(MouseWindowEvent), MouseWindowMoveEventClass(DevicePoint), Touch(TouchEventTypeTouchIdDevicePoint), Wheel(WheelDeltaDevicePoint), Scroll(ScrollLocationDeviceIntPointTouchEventType), Zoom(f32), PinchZoom(f32), ResetZoom, Navigation(TopLevelBrowsingContextIdTraversalDirection), Quit, ExitFullScreen(TopLevelBrowsingContextId), Keyboard(KeyboardEvent), Reload(TopLevelBrowsingContextId), NewBrowser(ServoUrlTopLevelBrowsingContextId), CloseBrowser(TopLevelBrowsingContextId), SendError(Option<TopLevelBrowsingContextId>, String), SelectBrowser(TopLevelBrowsingContextId), ToggleWebRenderDebug(WebRenderDebugOption), CaptureWebRender, ClearCache, ToggleSamplingProfiler(DurationDuration), MediaSessionAction(MediaSessionActionType), ChangeBrowserVisibility(TopLevelBrowsingContextIdbool), IMEDismissed,
}
Expand description

Events that the windowing system sends to Servo.

Variants

Idle

Sent when no message has arrived, but the event loop was kicked for some reason (perhaps by another Servo subsystem).

FIXME(pcwalton): This is kind of ugly and may not work well with multiprocess Servo. It’s possible that this should be something like CompositorMessageWindowEvent(compositor_thread::Msg) instead.

Refresh

Sent when part of the window is marked dirty and needs to be redrawn. Before sending this message, the window must make the same GL context as in PrepareRenderingEvent current.

Resize

Sent when the window is resized.

AllowNavigationResponse(PipelineIdbool)

Sent when a navigation request from script is allowed/refused.

Tuple Fields of AllowNavigationResponse

0: PipelineId1: bool
LoadUrl(TopLevelBrowsingContextIdServoUrl)

Sent when a new URL is to be loaded.

Tuple Fields of LoadUrl

0: TopLevelBrowsingContextId1: ServoUrl
MouseWindowEventClass(MouseWindowEvent)

Sent when a mouse hit test is to be performed.

Tuple Fields of MouseWindowEventClass

0: MouseWindowEvent
MouseWindowMoveEventClass(DevicePoint)

Sent when a mouse move.

Tuple Fields of MouseWindowMoveEventClass

0: DevicePoint
Touch(TouchEventTypeTouchIdDevicePoint)

Touch event: type, identifier, point

Tuple Fields of Touch

0: TouchEventType1: TouchId2: DevicePoint
Wheel(WheelDeltaDevicePoint)

Sent when user moves the mouse wheel.

Tuple Fields of Wheel

0: WheelDelta1: DevicePoint
Scroll(ScrollLocationDeviceIntPointTouchEventType)

Sent when the user scrolls. The first point is the delta and the second point is the origin.

Tuple Fields of Scroll

0: ScrollLocation1: DeviceIntPoint2: TouchEventType
Zoom(f32)

Sent when the user zooms.

Tuple Fields of Zoom

0: f32
PinchZoom(f32)

Simulated “pinch zoom” gesture for non-touch platforms (e.g. ctrl-scrollwheel).

Tuple Fields of PinchZoom

0: f32
ResetZoom

Sent when the user resets zoom to default.

Navigation(TopLevelBrowsingContextIdTraversalDirection)

Sent when the user uses chrome navigation (i.e. backspace or shift-backspace).

Tuple Fields of Navigation

0: TopLevelBrowsingContextId1: TraversalDirection
Quit

Sent when the user quits the application

ExitFullScreen(TopLevelBrowsingContextId)

Sent when the user exits from fullscreen mode

Tuple Fields of ExitFullScreen

0: TopLevelBrowsingContextId
Keyboard(KeyboardEvent)

Sent when a key input state changes

Tuple Fields of Keyboard

0: KeyboardEvent
Reload(TopLevelBrowsingContextId)

Sent when Ctr+R/Apple+R is called to reload the current page.

Tuple Fields of Reload

0: TopLevelBrowsingContextId
NewBrowser(ServoUrlTopLevelBrowsingContextId)

Create a new top level browsing context

Tuple Fields of NewBrowser

0: ServoUrl1: TopLevelBrowsingContextId
CloseBrowser(TopLevelBrowsingContextId)

Close a top level browsing context

Tuple Fields of CloseBrowser

0: TopLevelBrowsingContextId
SendError(Option<TopLevelBrowsingContextId>, String)

Panic a top level browsing context.

Tuple Fields of SendError

0: Option<TopLevelBrowsingContextId>1: String
SelectBrowser(TopLevelBrowsingContextId)

Make a top level browsing context visible, hiding the previous visible one.

Tuple Fields of SelectBrowser

0: TopLevelBrowsingContextId
ToggleWebRenderDebug(WebRenderDebugOption)

Toggles a debug flag in WebRender

Tuple Fields of ToggleWebRenderDebug

0: WebRenderDebugOption
CaptureWebRender

Capture current WebRender

ClearCache

Clear the network cache.

ToggleSamplingProfiler(DurationDuration)

Toggle sampling profiler with the given sampling rate and max duration.

Tuple Fields of ToggleSamplingProfiler

0: Duration1: Duration
MediaSessionAction(MediaSessionActionType)

Sent when the user triggers a media action through the UA exposed media UI (play, pause, seek, etc.).

Tuple Fields of MediaSessionAction

0: MediaSessionActionType
ChangeBrowserVisibility(TopLevelBrowsingContextIdbool)

Set browser visibility. A hidden browser will not tick the animations.

Tuple Fields of ChangeBrowserVisibility

0: TopLevelBrowsingContextId1: bool
IMEDismissed

Virtual keyboard was dismissed

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Convert

Convert

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.