Files
servo/ports/servoshell/egl/gamepad.rs
Martin Robinson c4b0d21180 libservo: Clean up Servo exports and export more at the root (#40951)
This change makes it easier for embedders to embed the types that they
need by exporting almost everything necessary to use Servo at the root
of libservo, apart from a few exceptions. In addition, the `Servo` is
moved
to its own file so that public exports can be more easily spotted from
`components/servo/lib.rs`.

Testing: This should not change behavior and is thus covered by existing
tests.
Fixes: #18475.

Signed-off-by: Martin Robinson <mrobinson@igalia.com>
2025-11-29 17:26:48 +00:00

34 lines
1.1 KiB
Rust

/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
use servo::{GamepadHapticEffectType, IpcSender, WebView};
/// A dummy version of [`crate::desktop::GamepadSupport`] used to avoid conditional compilation in
/// servoshell and as a skeleton to implement gamepad support for platforms that do not
/// currently support it.
pub(crate) struct GamepadSupport;
impl GamepadSupport {
pub(crate) fn maybe_new() -> Option<Self> {
None
}
pub(crate) fn handle_gamepad_events(&mut self, _active_webview: WebView) {
unreachable!("Dummy gamepad support should never be called.");
}
pub(crate) fn play_haptic_effect(
&mut self,
_index: usize,
_effect_type: GamepadHapticEffectType,
_effect_complete_sender: IpcSender<bool>,
) {
unreachable!("Dummy gamepad support should never be called.");
}
pub(crate) fn stop_haptic_effect(&mut self, _index: usize) -> bool {
unreachable!("Dummy gamepad support should never be called.");
}
}