mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
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>
34 lines
1.1 KiB
Rust
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.");
|
|
}
|
|
}
|