all: address clippy lints
This commit is contained in:
parent
84ac6d47d0
commit
0a20f03a81
6 changed files with 50 additions and 15 deletions
|
|
@ -5,6 +5,7 @@ use {
|
||||||
ei_client::{EiClient, EiClientError},
|
ei_client::{EiClient, EiClientError},
|
||||||
ei_ifs::{
|
ei_ifs::{
|
||||||
ei_callback::EiCallback,
|
ei_callback::EiCallback,
|
||||||
|
ei_pingpong::EiPingpong,
|
||||||
ei_seat::{
|
ei_seat::{
|
||||||
EI_CAP_BUTTON, EI_CAP_KEYBOARD, EI_CAP_POINTER, EI_CAP_POINTER_ABSOLUTE,
|
EI_CAP_BUTTON, EI_CAP_KEYBOARD, EI_CAP_POINTER, EI_CAP_POINTER_ABSOLUTE,
|
||||||
EI_CAP_SCROLL, EI_CAP_TOUCHSCREEN, EiSeat,
|
EI_CAP_SCROLL, EI_CAP_TOUCHSCREEN, EiSeat,
|
||||||
|
|
@ -18,7 +19,7 @@ use {
|
||||||
EiButton, EiConnectionId, EiKeyboard, EiPointer, EiPointerAbsolute, EiScroll,
|
EiButton, EiConnectionId, EiKeyboard, EiPointer, EiPointerAbsolute, EiScroll,
|
||||||
EiTouchscreen,
|
EiTouchscreen,
|
||||||
ei_connection::{
|
ei_connection::{
|
||||||
Disconnect, Disconnected, EiConnectionRequestHandler, InvalidObject, Seat,
|
Disconnect, Disconnected, EiConnectionRequestHandler, InvalidObject, Ping, Seat,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -59,6 +60,15 @@ impl EiConnection {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[expect(dead_code)]
|
||||||
|
pub fn send_ping(&self, ping: &EiPingpong, version: u32) {
|
||||||
|
self.client.event(Ping {
|
||||||
|
self_id: self.id,
|
||||||
|
ping: ping.id,
|
||||||
|
version,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
pub fn announce_seat(&self, seat: &Rc<WlSeatGlobal>) {
|
pub fn announce_seat(&self, seat: &Rc<WlSeatGlobal>) {
|
||||||
let version = self.client.versions.ei_seat.version.get();
|
let version = self.client.versions.ei_seat.version.get();
|
||||||
if version == EiVersion(0) {
|
if version == EiVersion(0) {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,9 @@ use {
|
||||||
EiDeviceId,
|
EiDeviceId,
|
||||||
ei_device::{
|
ei_device::{
|
||||||
ClientFrame, ClientStartEmulating, ClientStopEmulating, Destroyed, DeviceType,
|
ClientFrame, ClientStartEmulating, ClientStopEmulating, Destroyed, DeviceType,
|
||||||
Done, EiDeviceRequestHandler, Interface, Paused, Region, RegionMappingId, Release,
|
Dimensions, Done, EiDeviceRequestHandler, Interface, Name, Paused, Region,
|
||||||
Resumed, ServerFrame, ServerStartEmulating,
|
RegionMappingId, Release, Resumed, ServerFrame, ServerStartEmulating,
|
||||||
|
ServerStopEmulating,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -92,6 +93,31 @@ impl EiDevice {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[expect(dead_code)]
|
||||||
|
pub fn send_stop_emulating(&self, serial: u32) {
|
||||||
|
self.client.event(ServerStopEmulating {
|
||||||
|
self_id: self.id,
|
||||||
|
serial,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[expect(dead_code)]
|
||||||
|
pub fn send_dimensions(&self, width: u32, height: u32) {
|
||||||
|
self.client.event(Dimensions {
|
||||||
|
self_id: self.id,
|
||||||
|
width,
|
||||||
|
height,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
#[expect(dead_code)]
|
||||||
|
pub fn send_name(&self, name: &str) {
|
||||||
|
self.client.event(Name {
|
||||||
|
self_id: self.id,
|
||||||
|
name,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
pub fn send_region(&self, rect: Rect, scale: Scale) {
|
pub fn send_region(&self, rect: Rect, scale: Scale) {
|
||||||
self.client.event(Region {
|
self.client.event(Region {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,8 @@
|
||||||
clippy::needless_borrow,
|
clippy::needless_borrow,
|
||||||
clippy::unnecessary_cast,
|
clippy::unnecessary_cast,
|
||||||
clippy::manual_flatten,
|
clippy::manual_flatten,
|
||||||
clippy::manual_bits
|
clippy::manual_bits,
|
||||||
|
clippy::manual_is_multiple_of
|
||||||
)]
|
)]
|
||||||
#![warn(clippy::allow_attributes, unsafe_op_in_unsafe_fn)]
|
#![warn(clippy::allow_attributes, unsafe_op_in_unsafe_fn)]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@ use {
|
||||||
video::drm::sys::{
|
video::drm::sys::{
|
||||||
DRM_DISPLAY_MODE_LEN, DRM_MODE_ATOMIC_TEST_ONLY, DRM_MODE_FB_MODIFIERS,
|
DRM_DISPLAY_MODE_LEN, DRM_MODE_ATOMIC_TEST_ONLY, DRM_MODE_FB_MODIFIERS,
|
||||||
DRM_MODE_OBJECT_BLOB, DRM_MODE_OBJECT_CONNECTOR, DRM_MODE_OBJECT_CRTC,
|
DRM_MODE_OBJECT_BLOB, DRM_MODE_OBJECT_CONNECTOR, DRM_MODE_OBJECT_CRTC,
|
||||||
DRM_MODE_OBJECT_ENCODER, DRM_MODE_OBJECT_FB, DRM_MODE_OBJECT_MODE,
|
DRM_MODE_OBJECT_ENCODER, DRM_MODE_OBJECT_FB, DRM_MODE_OBJECT_PLANE,
|
||||||
DRM_MODE_OBJECT_PLANE, DRM_MODE_OBJECT_PROPERTY, create_lease, drm_event,
|
DRM_MODE_OBJECT_PROPERTY, create_lease, drm_event, drm_event_vblank, gem_close,
|
||||||
drm_event_vblank, gem_close, get_cap, get_device_name_from_fd2, get_minor_name_from_fd,
|
get_cap, get_device_name_from_fd2, get_minor_name_from_fd, get_node_type_from_fd,
|
||||||
get_node_type_from_fd, get_nodes, mode_addfb2, mode_atomic, mode_create_blob,
|
get_nodes, mode_addfb2, mode_atomic, mode_create_blob, mode_destroy_blob,
|
||||||
mode_destroy_blob, mode_get_resources, mode_getconnector, mode_getencoder,
|
mode_get_resources, mode_getconnector, mode_getencoder, mode_getplane,
|
||||||
mode_getplane, mode_getplaneresources, mode_getprobblob, mode_getproperty,
|
mode_getplaneresources, mode_getprobblob, mode_getproperty, mode_obj_getproperties,
|
||||||
mode_obj_getproperties, mode_rmfb, prime_fd_to_handle, set_client_cap,
|
mode_rmfb, prime_fd_to_handle, set_client_cap,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
ahash::AHashMap,
|
ahash::AHashMap,
|
||||||
|
|
@ -734,7 +734,6 @@ macro_rules! drm_obj {
|
||||||
drm_obj!(DrmCrtc, DRM_MODE_OBJECT_CRTC);
|
drm_obj!(DrmCrtc, DRM_MODE_OBJECT_CRTC);
|
||||||
drm_obj!(DrmConnector, DRM_MODE_OBJECT_CONNECTOR);
|
drm_obj!(DrmConnector, DRM_MODE_OBJECT_CONNECTOR);
|
||||||
drm_obj!(DrmEncoder, DRM_MODE_OBJECT_ENCODER);
|
drm_obj!(DrmEncoder, DRM_MODE_OBJECT_ENCODER);
|
||||||
drm_obj!(DrmMode, DRM_MODE_OBJECT_MODE);
|
|
||||||
drm_obj!(DrmProperty, DRM_MODE_OBJECT_PROPERTY);
|
drm_obj!(DrmProperty, DRM_MODE_OBJECT_PROPERTY);
|
||||||
drm_obj!(DrmFb, DRM_MODE_OBJECT_FB);
|
drm_obj!(DrmFb, DRM_MODE_OBJECT_FB);
|
||||||
drm_obj!(DrmBlob, DRM_MODE_OBJECT_BLOB);
|
drm_obj!(DrmBlob, DRM_MODE_OBJECT_BLOB);
|
||||||
|
|
|
||||||
|
|
@ -400,7 +400,6 @@ pub fn mode_obj_getproperties(
|
||||||
pub const DRM_MODE_OBJECT_CRTC: u32 = 0xcccccccc;
|
pub const DRM_MODE_OBJECT_CRTC: u32 = 0xcccccccc;
|
||||||
pub const DRM_MODE_OBJECT_CONNECTOR: u32 = 0xc0c0c0c0;
|
pub const DRM_MODE_OBJECT_CONNECTOR: u32 = 0xc0c0c0c0;
|
||||||
pub const DRM_MODE_OBJECT_ENCODER: u32 = 0xe0e0e0e0;
|
pub const DRM_MODE_OBJECT_ENCODER: u32 = 0xe0e0e0e0;
|
||||||
pub const DRM_MODE_OBJECT_MODE: u32 = 0xdededede;
|
|
||||||
pub const DRM_MODE_OBJECT_PROPERTY: u32 = 0xb0b0b0b0;
|
pub const DRM_MODE_OBJECT_PROPERTY: u32 = 0xb0b0b0b0;
|
||||||
pub const DRM_MODE_OBJECT_FB: u32 = 0xfbfbfbfb;
|
pub const DRM_MODE_OBJECT_FB: u32 = 0xfbfbfbfb;
|
||||||
pub const DRM_MODE_OBJECT_BLOB: u32 = 0xbbbbbbbb;
|
pub const DRM_MODE_OBJECT_BLOB: u32 = 0xbbbbbbbb;
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@ fn Get(interface_name: string, property_name: string) {
|
||||||
value: variant,
|
value: variant,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn Set(interface_name: string, property_name: string, value: variant) {
|
# fn Set(interface_name: string, property_name: string, value: variant) {
|
||||||
}
|
# }
|
||||||
|
|
||||||
fn GetAll(interface_name: string) {
|
fn GetAll(interface_name: string) {
|
||||||
props: array(dict(string, variant)),
|
props: array(dict(string, variant)),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue