mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* fix(linux): quit Settings without closing its window inside the close request * fix(linux): vendor GPUI with a missing-keymap guard on Wayland GPUI 0.2.2 unwraps the XKB state on wl_keyboard modifier and key events, which a compositor sends before any XkbV1 keymap when the seat's only keyboard is a keymap-less virtual one. vendor/gpui is 0.2.2 without its examples, with those three unwraps turned into early returns.
55 lines
1.3 KiB
Rust
55 lines
1.3 KiB
Rust
use gpui::{Action, actions};
|
|
use gpui_macros::register_action;
|
|
use schemars::JsonSchema;
|
|
use serde::Deserialize;
|
|
|
|
#[test]
|
|
fn test_action_macros() {
|
|
actions!(
|
|
test_only,
|
|
[
|
|
SomeAction,
|
|
/// Documented action
|
|
SomeActionWithDocs,
|
|
]
|
|
);
|
|
|
|
#[derive(PartialEq, Clone, Deserialize, JsonSchema, Action)]
|
|
#[action(namespace = test_only)]
|
|
#[serde(deny_unknown_fields)]
|
|
struct AnotherAction;
|
|
|
|
#[derive(PartialEq, Clone, gpui::private::serde::Deserialize)]
|
|
#[serde(deny_unknown_fields)]
|
|
struct RegisterableAction {}
|
|
|
|
register_action!(RegisterableAction);
|
|
|
|
impl gpui::Action for RegisterableAction {
|
|
fn boxed_clone(&self) -> Box<dyn gpui::Action> {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn partial_eq(&self, _action: &dyn gpui::Action) -> bool {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn name(&self) -> &'static str {
|
|
unimplemented!()
|
|
}
|
|
|
|
fn name_for_type() -> &'static str
|
|
where
|
|
Self: Sized,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
|
|
fn build(_value: serde_json::Value) -> anyhow::Result<Box<dyn gpui::Action>>
|
|
where
|
|
Self: Sized,
|
|
{
|
|
unimplemented!()
|
|
}
|
|
}
|
|
}
|