uidevices_resources/
lib.rs1#![forbid(unsafe_code)]
7
8use mesh::MeshPayload;
9use vm_resource::Resource;
10use vm_resource::ResourceId;
11use vm_resource::kind::FramebufferHandleKind;
12use vm_resource::kind::KeyboardInputHandleKind;
13use vm_resource::kind::MouseInputHandleKind;
14use vm_resource::kind::VmbusDeviceHandleKind;
15
16#[derive(MeshPayload)]
18pub struct SynthKeyboardHandle {
19 pub source: Resource<KeyboardInputHandleKind>,
21}
22
23impl ResourceId<VmbusDeviceHandleKind> for SynthKeyboardHandle {
24 const ID: &'static str = "keyboard";
25}
26
27#[derive(MeshPayload)]
29pub struct SynthMouseHandle {
30 pub source: Resource<MouseInputHandleKind>,
32}
33
34impl ResourceId<VmbusDeviceHandleKind> for SynthMouseHandle {
35 const ID: &'static str = "mouse";
36}
37
38#[derive(MeshPayload)]
40pub struct SynthVideoHandle {
41 pub framebuffer: Resource<FramebufferHandleKind>,
43}
44
45impl ResourceId<VmbusDeviceHandleKind> for SynthVideoHandle {
46 const ID: &'static str = "video";
47}