Skip to repository content

tenant.openagents/omega

No repository description is available.

OpenAgents Git authority 2026-07-28T02:53:45.145Z Public web read
NIP-34 coordinate30617:7649603503856e5148d571eac2766b288a8ff1e9e35d380337a1d2b0015b4f92:omega
MaintainersHidden in public view
References2 branches · 1 tag
Read-only clonegit clone https://openagents.com/git/tenant.openagents/omega.git
Browse files

wrapper.rs

54 lines · 940 B · rust
1use std::ops::Deref;
2
3use windows::Win32::{Foundation::HWND, UI::WindowsAndMessaging::HCURSOR};
4
5#[derive(Debug, Clone, Copy)]
6pub(crate) struct SafeCursor {
7    raw: HCURSOR,
8}
9
10unsafe impl Send for SafeCursor {}
11unsafe impl Sync for SafeCursor {}
12
13impl From<HCURSOR> for SafeCursor {
14    fn from(value: HCURSOR) -> Self {
15        SafeCursor { raw: value }
16    }
17}
18
19impl Deref for SafeCursor {
20    type Target = HCURSOR;
21
22    fn deref(&self) -> &Self::Target {
23        &self.raw
24    }
25}
26
27#[derive(Debug, Clone, Copy)]
28pub(crate) struct SafeHwnd {
29    raw: HWND,
30}
31
32impl SafeHwnd {
33    pub(crate) fn as_raw(&self) -> HWND {
34        self.raw
35    }
36}
37
38unsafe impl Send for SafeHwnd {}
39unsafe impl Sync for SafeHwnd {}
40
41impl From<HWND> for SafeHwnd {
42    fn from(value: HWND) -> Self {
43        SafeHwnd { raw: value }
44    }
45}
46
47impl Deref for SafeHwnd {
48    type Target = HWND;
49
50    fn deref(&self) -> &Self::Target {
51        &self.raw
52    }
53}
54
Served at tenant.openagents/omega Member data and write actions are omitted.