1
0
Fork 0
forked from wry/wry

config: add Window

This commit is contained in:
Julian Orth 2025-04-29 15:29:39 +02:00
parent ab095b89cf
commit 9977f9dfdf
19 changed files with 1172 additions and 203 deletions

View file

@ -1,9 +1,12 @@
use {
crate::utils::{
linkedlist::NodeRef,
ptr_ext::{MutPtrExt, PtrExt},
crate::{
tree::NodeId,
utils::{
linkedlist::NodeRef,
ptr_ext::{MutPtrExt, PtrExt},
},
},
jay_config::keyboard::mods::Modifiers,
jay_config::{keyboard::mods::Modifiers, window::Window},
std::{
cell::UnsafeCell,
fmt::{Debug, Formatter},
@ -97,3 +100,7 @@ unsafe impl UnsafeCellCloneSafe for usize {}
unsafe impl<A: UnsafeCellCloneSafe, B: UnsafeCellCloneSafe> UnsafeCellCloneSafe for (A, B) {}
unsafe impl UnsafeCellCloneSafe for Modifiers {}
unsafe impl UnsafeCellCloneSafe for NodeId {}
unsafe impl UnsafeCellCloneSafe for Window {}

View file

@ -1,5 +1,8 @@
use {
crate::utils::opaque::{OPAQUE_LEN, Opaque, OpaqueError, opaque},
crate::utils::{
clonecell::UnsafeCellCloneSafe,
opaque::{OPAQUE_LEN, Opaque, OpaqueError, opaque},
},
arrayvec::ArrayString,
std::{
fmt::{Display, Formatter},
@ -10,6 +13,8 @@ use {
#[derive(Debug, Eq, PartialEq, Copy, Clone, Hash)]
pub struct ToplevelIdentifier(Opaque);
unsafe impl UnsafeCellCloneSafe for ToplevelIdentifier {}
pub fn toplevel_identifier() -> ToplevelIdentifier {
ToplevelIdentifier(opaque())
}