all: use expect attribute where possible
This commit is contained in:
parent
c3b50dc653
commit
e377470f3f
134 changed files with 241 additions and 296 deletions
|
|
@ -393,7 +393,7 @@ pub fn rects_to_bands(rects_tmp: &[RectRaw]) -> Container {
|
||||||
let mut res = Container::new();
|
let mut res = Container::new();
|
||||||
|
|
||||||
for &[y1, y2] in ys.array_windows_ext::<2>() {
|
for &[y1, y2] in ys.array_windows_ext::<2>() {
|
||||||
#[allow(clippy::never_loop)]
|
#[expect(clippy::never_loop)]
|
||||||
loop {
|
loop {
|
||||||
macro_rules! check_rect {
|
macro_rules! check_rect {
|
||||||
($rect:expr) => {{
|
($rect:expr) => {{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ use {
|
||||||
std::{env, io::Write},
|
std::{env, io::Write},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
#[expect(unused_macros)]
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
#[path = "../src/macros.rs"]
|
#[path = "../src/macros.rs"]
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
@ -43,7 +43,7 @@ fn get_enum_ty(variants: Vec<i128>) -> anyhow::Result<u64> {
|
||||||
fn write_ty<W: Write>(f: &mut W, vals: &[i32], ty: &str) -> anyhow::Result<()> {
|
fn write_ty<W: Write>(f: &mut W, vals: &[i32], ty: &str) -> anyhow::Result<()> {
|
||||||
let variants: Vec<_> = vals.iter().cloned().map(|v| v as i128).collect();
|
let variants: Vec<_> = vals.iter().cloned().map(|v| v as i128).collect();
|
||||||
let size = get_enum_ty(variants)?;
|
let size = get_enum_ty(variants)?;
|
||||||
writeln!(f, "#[allow(dead_code)]")?;
|
writeln!(f, "#[allow(clippy::allow_attributes, dead_code)]")?;
|
||||||
writeln!(f, "pub type {} = i{};", ty, size)?;
|
writeln!(f, "pub type {} = i{};", ty, size)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ impl<'a> Tokenizer<'a> {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Lined<T> {
|
pub struct Lined<T> {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub line: u32,
|
pub line: u32,
|
||||||
pub val: T,
|
pub val: T,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ impl<'a> Tokenizer<'a> {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Lined<T> {
|
struct Lined<T> {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
line: u32,
|
line: u32,
|
||||||
val: T,
|
val: T,
|
||||||
}
|
}
|
||||||
|
|
@ -755,7 +755,7 @@ fn write_request_handler<W: Write>(
|
||||||
parser = "crate::wl_usr::UsrCon";
|
parser = "crate::wl_usr::UsrCon";
|
||||||
error = "crate::wl_usr::UsrConError";
|
error = "crate::wl_usr::UsrConError";
|
||||||
param = "ev";
|
param = "ev";
|
||||||
writeln!(f, " #[allow(dead_code)]")?;
|
writeln!(f, " #[allow(clippy::allow_attributes, dead_code)]")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
writeln!(
|
writeln!(
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ use {
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Lined<T> {
|
struct Lined<T> {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
line: u32,
|
line: u32,
|
||||||
val: T,
|
val: T,
|
||||||
}
|
}
|
||||||
|
|
@ -637,7 +637,7 @@ fn write_interface_versions<W: Write>(f: &mut W, obj_names: &[String]) -> Result
|
||||||
writeln!(f, " }}")?;
|
writeln!(f, " }}")?;
|
||||||
for obj_name in obj_names {
|
for obj_name in obj_names {
|
||||||
writeln!(f)?;
|
writeln!(f)?;
|
||||||
writeln!(f, " #[allow(dead_code)]")?;
|
writeln!(f, " #[allow(clippy::allow_attributes, dead_code)]")?;
|
||||||
writeln!(f, " pub fn {obj_name}(&self) -> EiVersion {{")?;
|
writeln!(f, " pub fn {obj_name}(&self) -> EiVersion {{")?;
|
||||||
writeln!(f, " self.{obj_name}.version.get()")?;
|
writeln!(f, " self.{obj_name}.version.get()")?;
|
||||||
writeln!(f, " }}")?;
|
writeln!(f, " }}")?;
|
||||||
|
|
|
||||||
|
|
@ -813,7 +813,7 @@ struct Extension {
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
enum NamedType {
|
enum NamedType {
|
||||||
Struct(Rc<Struct>),
|
Struct(Rc<Struct>),
|
||||||
Bitmask(#[allow(dead_code)] Rc<Bitmask>),
|
Bitmask(#[expect(dead_code)] Rc<Bitmask>),
|
||||||
Enum(Rc<Enum>),
|
Enum(Rc<Enum>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ macro_rules! config {
|
||||||
|
|
||||||
macro_rules! try_get {
|
macro_rules! try_get {
|
||||||
() => {{
|
() => {{
|
||||||
#[allow(unused_unsafe)]
|
|
||||||
unsafe {
|
unsafe {
|
||||||
let client = crate::_private::client::CLIENT.with(|client| client.get());
|
let client = crate::_private::client::CLIENT.with(|client| client.get());
|
||||||
if client.is_null() {
|
if client.is_null() {
|
||||||
|
|
@ -35,7 +34,6 @@ macro_rules! get {
|
||||||
get!(Default::default())
|
get!(Default::default())
|
||||||
}};
|
}};
|
||||||
($def:expr) => {{
|
($def:expr) => {{
|
||||||
#[allow(unused_unsafe)]
|
|
||||||
let client = unsafe {
|
let client = unsafe {
|
||||||
let client = crate::_private::client::CLIENT.with(|client| client.get());
|
let client = crate::_private::client::CLIENT.with(|client| client.get());
|
||||||
if client.is_null() {
|
if client.is_null() {
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ impl Acceptor {
|
||||||
&self.socket.name
|
&self.socket.name
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn secure_path(&self) -> &Ustr {
|
pub fn secure_path(&self) -> &Ustr {
|
||||||
self.socket.secure_path.as_ustr()
|
self.socket.secure_path.as_ustr()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ pub trait BufferObject {
|
||||||
|
|
||||||
pub trait MappedBuffer {
|
pub trait MappedBuffer {
|
||||||
unsafe fn data(&self) -> &[u8];
|
unsafe fn data(&self) -> &[u8];
|
||||||
#[cfg_attr(not(test), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
fn data_ptr(&self) -> *mut u8;
|
fn data_ptr(&self) -> *mut u8;
|
||||||
fn stride(&self) -> i32;
|
fn stride(&self) -> i32;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ pub trait Backend {
|
||||||
fn clear(&self) {
|
fn clear(&self) {
|
||||||
// nothing
|
// nothing
|
||||||
}
|
}
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
|
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
|
||||||
|
|
||||||
fn switch_to(&self, vtnr: u32) {
|
fn switch_to(&self, vtnr: u32) {
|
||||||
|
|
@ -430,7 +430,7 @@ pub enum InputEvent {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum DrmEvent {
|
pub enum DrmEvent {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Removed,
|
Removed,
|
||||||
GfxApiChanged,
|
GfxApiChanged,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -944,7 +944,7 @@ impl XBackend {
|
||||||
if changed {
|
if changed {
|
||||||
let images = self.create_images(output.window, width, height).await?;
|
let images = self.create_images(output.window, width, height).await?;
|
||||||
for (new, old) in images.iter().zip(output.images.iter()) {
|
for (new, old) in images.iter().zip(output.images.iter()) {
|
||||||
#[allow(clippy::let_underscore_future)]
|
#[expect(clippy::let_underscore_future)]
|
||||||
let _ = self.c.call(&FreePixmap {
|
let _ = self.c.call(&FreePixmap {
|
||||||
pixmap: old.pixmap.get(),
|
pixmap: old.pixmap.get(),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ impl ClientId {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
|
||||||
pub fn from_raw(val: u64) -> Self {
|
pub fn from_raw(val: u64) -> Self {
|
||||||
Self(val)
|
Self(val)
|
||||||
}
|
}
|
||||||
|
|
@ -105,7 +104,7 @@ impl Clients {
|
||||||
ClientId(self.next_client_id.fetch_add(1))
|
ClientId(self.next_client_id.fetch_add(1))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn get(&self, id: ClientId) -> Result<Rc<Client>, ClientError> {
|
pub fn get(&self, id: ClientId) -> Result<Rc<Client>, ClientError> {
|
||||||
let clients = self.clients.borrow();
|
let clients = self.clients.borrow();
|
||||||
match clients.get(&id) {
|
match clients.get(&id) {
|
||||||
|
|
@ -443,7 +442,6 @@ impl Client {
|
||||||
self.add_obj(obj, true)
|
self.add_obj(obj, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn add_server_obj<T: WaylandObject>(&self, obj: &Rc<T>) {
|
pub fn add_server_obj<T: WaylandObject>(&self, obj: &Rc<T>) {
|
||||||
self.add_obj(obj, false).expect("add_server_obj failed")
|
self.add_obj(obj, false).expect("add_server_obj failed")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -324,7 +324,10 @@ async fn start_compositor3(state: Rc<State>, test_future: Option<TestFuture>) {
|
||||||
state.ring.stop();
|
state.ring.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn load_config(state: &Rc<State>, #[allow(unused_variables)] for_test: bool) -> ConfigProxy {
|
fn load_config(
|
||||||
|
state: &Rc<State>,
|
||||||
|
#[allow(clippy::allow_attributes, unused_variables)] for_test: bool,
|
||||||
|
) -> ConfigProxy {
|
||||||
#[cfg(feature = "it")]
|
#[cfg(feature = "it")]
|
||||||
if for_test {
|
if for_test {
|
||||||
return ConfigProxy::for_test(state);
|
return ConfigProxy::for_test(state);
|
||||||
|
|
@ -365,7 +368,7 @@ fn start_global_event_handlers(
|
||||||
|
|
||||||
async fn create_backend(
|
async fn create_backend(
|
||||||
state: &Rc<State>,
|
state: &Rc<State>,
|
||||||
#[allow(unused_variables)] test_future: Option<TestFuture>,
|
#[allow(clippy::allow_attributes, unused_variables)] test_future: Option<TestFuture>,
|
||||||
) -> Option<Rc<dyn Backend>> {
|
) -> Option<Rc<dyn Backend>> {
|
||||||
#[cfg(feature = "it")]
|
#[cfg(feature = "it")]
|
||||||
if let Some(tf) = test_future {
|
if let Some(tf) = test_future {
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ impl CursorUser {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn desired_known_cursor(&self) -> Option<KnownCursor> {
|
pub fn desired_known_cursor(&self) -> Option<KnownCursor> {
|
||||||
self.desired_known_cursor.get()
|
self.desired_known_cursor.get()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,6 @@ impl DamageVisualizer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn add(&self, rect: Rect) {
|
pub fn add(&self, rect: Rect) {
|
||||||
if !self.enabled.get() {
|
if !self.enabled.get() {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
18
src/dbus.rs
18
src/dbus.rs
|
|
@ -274,23 +274,23 @@ const MSG_ERROR: u8 = 3;
|
||||||
const MSG_SIGNAL: u8 = 4;
|
const MSG_SIGNAL: u8 = 4;
|
||||||
|
|
||||||
const NO_REPLY_EXPECTED: u8 = 0x1;
|
const NO_REPLY_EXPECTED: u8 = 0x1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NO_AUTO_START: u8 = 0x2;
|
const NO_AUTO_START: u8 = 0x2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const ALLOW_INTERACTIVE_AUTHORIZATION: u8 = 0x4;
|
const ALLOW_INTERACTIVE_AUTHORIZATION: u8 = 0x4;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DBUS_NAME_FLAG_ALLOW_REPLACEMENT: u32 = 0x1;
|
pub const DBUS_NAME_FLAG_ALLOW_REPLACEMENT: u32 = 0x1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DBUS_NAME_FLAG_REPLACE_EXISTING: u32 = 0x2;
|
pub const DBUS_NAME_FLAG_REPLACE_EXISTING: u32 = 0x2;
|
||||||
pub const DBUS_NAME_FLAG_DO_NOT_QUEUE: u32 = 0x4;
|
pub const DBUS_NAME_FLAG_DO_NOT_QUEUE: u32 = 0x4;
|
||||||
|
|
||||||
pub const DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER: u32 = 1;
|
pub const DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DBUS_REQUEST_NAME_REPLY_IN_QUEUE: u32 = 2;
|
pub const DBUS_REQUEST_NAME_REPLY_IN_QUEUE: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DBUS_REQUEST_NAME_REPLY_EXISTS: u32 = 3;
|
pub const DBUS_REQUEST_NAME_REPLY_EXISTS: u32 = 3;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER: u32 = 4;
|
pub const DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER: u32 = 4;
|
||||||
|
|
||||||
pub const BUS_DEST: &str = "org.freedesktop.DBus";
|
pub const BUS_DEST: &str = "org.freedesktop.DBus";
|
||||||
|
|
@ -698,7 +698,7 @@ pub struct PendingReply<T> {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T> PendingReply<T> {
|
impl<T> PendingReply<T> {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn reply_expected(&self) -> bool {
|
pub fn reply_expected(&self) -> bool {
|
||||||
self.reply_expected
|
self.reply_expected
|
||||||
}
|
}
|
||||||
|
|
@ -720,7 +720,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn complete<'a>(&self, res: Result<&T::Generic<'a>, &str>) {
|
pub fn complete<'a>(&self, res: Result<&T::Generic<'a>, &str>) {
|
||||||
match res {
|
match res {
|
||||||
Ok(m) => self.ok(m),
|
Ok(m) => self.ok(m),
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ impl Incoming {
|
||||||
self.incoming
|
self.incoming
|
||||||
.fill_msg_buf(remaining as usize, msg_buf)
|
.fill_msg_buf(remaining as usize, msg_buf)
|
||||||
.await?;
|
.await?;
|
||||||
#[allow(dropping_references)]
|
#[expect(dropping_references)]
|
||||||
drop(msg_buf);
|
drop(msg_buf);
|
||||||
let msg_buf = unsafe { msg_buf_data.get().deref().deref() };
|
let msg_buf = unsafe { msg_buf_data.get().deref().deref() };
|
||||||
let headers = &msg_buf[FIXED_HEADER_SIZE..FIXED_HEADER_SIZE + headers_len as usize];
|
let headers = &msg_buf[FIXED_HEADER_SIZE..FIXED_HEADER_SIZE + headers_len as usize];
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ impl DbusSocket {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn get<T, F>(&self, destination: &str, path: &str, f: F)
|
pub fn get<T, F>(&self, destination: &str, path: &str, f: F)
|
||||||
where
|
where
|
||||||
T: Property,
|
T: Property,
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ unsafe impl<'a, K: DbusType<'a>, V: DbusType<'a>> DbusType<'a> for DictEntry<K,
|
||||||
|
|
||||||
macro_rules! tuple {
|
macro_rules! tuple {
|
||||||
($($p:ident),*) => {
|
($($p:ident),*) => {
|
||||||
#[allow(non_snake_case)]
|
#[expect(non_snake_case)]
|
||||||
unsafe impl<'a, $($p: DbusType<'a>),*> DbusType<'a> for ($($p,)*) {
|
unsafe impl<'a, $($p: DbusType<'a>),*> DbusType<'a> for ($($p,)*) {
|
||||||
const ALIGNMENT: usize = 8;
|
const ALIGNMENT: usize = 8;
|
||||||
const IS_POD: bool = false;
|
const IS_POD: bool = false;
|
||||||
|
|
|
||||||
40
src/edid.rs
40
src/edid.rs
|
|
@ -30,7 +30,7 @@ pub enum DigitalVideoInterfaceStandard {
|
||||||
HdmiB,
|
HdmiB,
|
||||||
MDDI,
|
MDDI,
|
||||||
DisplayPort,
|
DisplayPort,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Unknown(u8),
|
Unknown(u8),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,7 +50,7 @@ impl Debug for SignalLevelStandard {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub enum VideoInputDefinition {
|
pub enum VideoInputDefinition {
|
||||||
Analog {
|
Analog {
|
||||||
signal_level_standard: SignalLevelStandard,
|
signal_level_standard: SignalLevelStandard,
|
||||||
|
|
@ -75,7 +75,7 @@ pub struct ScreenDimensions {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct ChromaticityCoordinates {
|
pub struct ChromaticityCoordinates {
|
||||||
pub red_x: u16,
|
pub red_x: u16,
|
||||||
pub red_y: u16,
|
pub red_y: u16,
|
||||||
|
|
@ -88,7 +88,7 @@ pub struct ChromaticityCoordinates {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct EstablishedTimings {
|
pub struct EstablishedTimings {
|
||||||
pub s_720x400_70: bool,
|
pub s_720x400_70: bool,
|
||||||
pub s_720x400_88: bool,
|
pub s_720x400_88: bool,
|
||||||
|
|
@ -119,7 +119,7 @@ pub enum AspectRatio {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct StandardTiming {
|
pub struct StandardTiming {
|
||||||
pub x_resolution: u16,
|
pub x_resolution: u16,
|
||||||
pub aspect_ratio: AspectRatio,
|
pub aspect_ratio: AspectRatio,
|
||||||
|
|
@ -133,7 +133,7 @@ pub enum AnalogSyncType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub enum SyncSignal {
|
pub enum SyncSignal {
|
||||||
Analog {
|
Analog {
|
||||||
ty: AnalogSyncType,
|
ty: AnalogSyncType,
|
||||||
|
|
@ -185,7 +185,7 @@ impl Debug for StereoViewingSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct DisplayRangeLimitsAndAdditionalTiming {
|
pub struct DisplayRangeLimitsAndAdditionalTiming {
|
||||||
pub vertical_field_rate_min: u16,
|
pub vertical_field_rate_min: u16,
|
||||||
pub vertical_field_rate_max: u16,
|
pub vertical_field_rate_max: u16,
|
||||||
|
|
@ -202,12 +202,12 @@ pub enum AspectRatioPreference {
|
||||||
A16_10,
|
A16_10,
|
||||||
A5_4,
|
A5_4,
|
||||||
A15_9,
|
A15_9,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Unknown(u8),
|
Unknown(u8),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub enum ExtendedTimingInformation {
|
pub enum ExtendedTimingInformation {
|
||||||
DefaultGtf,
|
DefaultGtf,
|
||||||
NoTimingInformation,
|
NoTimingInformation,
|
||||||
|
|
@ -241,7 +241,7 @@ pub enum ExtendedTimingInformation {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Default)]
|
#[derive(Copy, Clone, Debug, Default)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct ColorPoint {
|
pub struct ColorPoint {
|
||||||
pub white_point_index: u8,
|
pub white_point_index: u8,
|
||||||
pub white_point_x: u16,
|
pub white_point_x: u16,
|
||||||
|
|
@ -250,7 +250,7 @@ pub struct ColorPoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct EstablishedTimings3 {
|
pub struct EstablishedTimings3 {
|
||||||
pub s640x350_85: bool,
|
pub s640x350_85: bool,
|
||||||
pub s640x400_85: bool,
|
pub s640x400_85: bool,
|
||||||
|
|
@ -299,7 +299,7 @@ pub struct EstablishedTimings3 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct ColorManagementData {
|
pub struct ColorManagementData {
|
||||||
pub red_a3: u16,
|
pub red_a3: u16,
|
||||||
pub red_a2: u16,
|
pub red_a2: u16,
|
||||||
|
|
@ -326,7 +326,7 @@ pub enum CvtPreferredVerticalRate {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct Cvt3ByteCode {
|
pub struct Cvt3ByteCode {
|
||||||
pub addressable_lines_per_field: u16,
|
pub addressable_lines_per_field: u16,
|
||||||
pub aspect_ration: CvtAspectRatio,
|
pub aspect_ration: CvtAspectRatio,
|
||||||
|
|
@ -339,7 +339,7 @@ pub struct Cvt3ByteCode {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct DetailedTimingDescriptor {
|
pub struct DetailedTimingDescriptor {
|
||||||
pub pixel_clock_khz: u32,
|
pub pixel_clock_khz: u32,
|
||||||
pub horizontal_addressable_pixels: u16,
|
pub horizontal_addressable_pixels: u16,
|
||||||
|
|
@ -360,7 +360,7 @@ pub struct DetailedTimingDescriptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub enum Descriptor {
|
pub enum Descriptor {
|
||||||
Unknown(u8),
|
Unknown(u8),
|
||||||
DetailedTimingDescriptor(DetailedTimingDescriptor),
|
DetailedTimingDescriptor(DetailedTimingDescriptor),
|
||||||
|
|
@ -394,7 +394,7 @@ macro_rules! bail {
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub enum EdidParseContext {
|
pub enum EdidParseContext {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
ReadingBytes(usize),
|
ReadingBytes(usize),
|
||||||
BaseBlock,
|
BaseBlock,
|
||||||
Descriptors,
|
Descriptors,
|
||||||
|
|
@ -1031,7 +1031,7 @@ pub enum DisplayColorType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub enum FeatureSupport2 {
|
pub enum FeatureSupport2 {
|
||||||
Analog {
|
Analog {
|
||||||
display_color_type: DisplayColorType,
|
display_color_type: DisplayColorType,
|
||||||
|
|
@ -1044,7 +1044,7 @@ pub enum FeatureSupport2 {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct FeatureSupport {
|
pub struct FeatureSupport {
|
||||||
pub standby_supported: bool,
|
pub standby_supported: bool,
|
||||||
pub suspend_supported: bool,
|
pub suspend_supported: bool,
|
||||||
|
|
@ -1056,7 +1056,7 @@ pub struct FeatureSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct EdidBaseBlock {
|
pub struct EdidBaseBlock {
|
||||||
pub id_manufacturer_name: BString,
|
pub id_manufacturer_name: BString,
|
||||||
pub id_product_code: u16,
|
pub id_product_code: u16,
|
||||||
|
|
@ -1083,7 +1083,7 @@ pub enum EdidExtension {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct EdidFile {
|
pub struct EdidFile {
|
||||||
pub base_block: EdidBaseBlock,
|
pub base_block: EdidBaseBlock,
|
||||||
pub extension_blocks: Vec<EdidExtension>,
|
pub extension_blocks: Vec<EdidExtension>,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const EI_DEVICE_TYPE_VIRTUAL: u32 = 1;
|
pub const EI_DEVICE_TYPE_VIRTUAL: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const EI_DEVICE_TYPE_PHYSICAL: u32 = 2;
|
pub const EI_DEVICE_TYPE_PHYSICAL: u32 = 2;
|
||||||
|
|
||||||
pub struct EiDevice {
|
pub struct EiDevice {
|
||||||
|
|
@ -100,7 +100,7 @@ impl EiDevice {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_paused(&self, serial: u32) {
|
pub fn send_paused(&self, serial: u32) {
|
||||||
self.client.event(Paused {
|
self.client.event(Paused {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct EiPingpong {
|
pub struct EiPingpong {
|
||||||
pub id: EiPingpongId,
|
pub id: EiPingpongId,
|
||||||
pub client: Rc<EiClient>,
|
pub client: Rc<EiClient>,
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ pub const EI_HANDSHAKE_ID: EiHandshakeId = EiHandshakeId::from_raw(0);
|
||||||
pub struct EiObjectId(u64);
|
pub struct EiObjectId(u64);
|
||||||
|
|
||||||
impl EiObjectId {
|
impl EiObjectId {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const NONE: Self = EiObjectId(0);
|
pub const NONE: Self = EiObjectId(0);
|
||||||
|
|
||||||
pub fn from_raw(raw: u64) -> Self {
|
pub fn from_raw(raw: u64) -> Self {
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ const fn fourcc_code(a: char, b: char, c: char, d: char) -> u32 {
|
||||||
(a as u32) | ((b as u32) << 8) | ((c as u32) << 16) | ((d as u32) << 24)
|
(a as u32) | ((b as u32) << 8) | ((c as u32) << 16) | ((d as u32) << 24)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn debug(fourcc: u32) -> impl Debug {
|
pub fn debug(fourcc: u32) -> impl Debug {
|
||||||
debug_fn(move |fmt| {
|
debug_fn(move |fmt| {
|
||||||
fmt.write_char(fourcc as u8 as char)?;
|
fmt.write_char(fourcc as u8 as char)?;
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,12 @@ macro_rules! egl_transparent {
|
||||||
pub struct $name(pub *mut u8);
|
pub struct $name(pub *mut u8);
|
||||||
|
|
||||||
impl $name {
|
impl $name {
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub const fn none() -> Self {
|
pub const fn none() -> Self {
|
||||||
Self(std::ptr::null_mut())
|
Self(std::ptr::null_mut())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub fn is_none(self) -> bool {
|
pub fn is_none(self) -> bool {
|
||||||
self.0.is_null()
|
self.0.is_null()
|
||||||
}
|
}
|
||||||
|
|
@ -26,7 +26,7 @@ macro_rules! dynload {
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
) => {
|
) => {
|
||||||
#[allow(non_snake_case)]
|
#[expect(non_snake_case)]
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct $container {
|
pub struct $container {
|
||||||
_lib: libloading::Library,
|
_lib: libloading::Library,
|
||||||
|
|
@ -45,7 +45,7 @@ macro_rules! dynload {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
$(
|
$(
|
||||||
#[allow(non_snake_case)]
|
#[expect(non_snake_case)]
|
||||||
let $fun: $ty =
|
let $fun: $ty =
|
||||||
match lib.get(stringify!($fun).as_bytes()) {
|
match lib.get(stringify!($fun).as_bytes()) {
|
||||||
Ok(s) => *s,
|
Ok(s) => *s,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ use {crate::gfx_apis::gl::sys::GLenum, uapi::c};
|
||||||
pub type EGLint = i32;
|
pub type EGLint = i32;
|
||||||
pub type EGLenum = c::c_uint;
|
pub type EGLenum = c::c_uint;
|
||||||
pub type EGLBoolean = c::c_uint;
|
pub type EGLBoolean = c::c_uint;
|
||||||
#[allow(dead_code)]
|
|
||||||
pub type EGLuint64KHR = u64;
|
pub type EGLuint64KHR = u64;
|
||||||
pub type EGLAttrib = isize;
|
pub type EGLAttrib = isize;
|
||||||
pub type EGLSyncKHR = *mut u8;
|
pub type EGLSyncKHR = *mut u8;
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ pub type GLenum = c::c_uint;
|
||||||
pub type GLfloat = f32;
|
pub type GLfloat = f32;
|
||||||
pub type GLint = c::c_int;
|
pub type GLint = c::c_int;
|
||||||
pub type GLsizei = c::c_int;
|
pub type GLsizei = c::c_int;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub type GLubyte = u8;
|
pub type GLubyte = u8;
|
||||||
pub type GLuint = c::c_uint;
|
pub type GLuint = c::c_uint;
|
||||||
|
|
||||||
|
|
@ -32,7 +32,7 @@ pub const GL_RENDERBUFFER: GLenum = 0x8D41;
|
||||||
pub const GL_TEXTURE0: GLenum = 0x84C0;
|
pub const GL_TEXTURE0: GLenum = 0x84C0;
|
||||||
pub const GL_TEXTURE_2D: GLenum = 0x0DE1;
|
pub const GL_TEXTURE_2D: GLenum = 0x0DE1;
|
||||||
pub const GL_TEXTURE_EXTERNAL_OES: GLenum = 0x8D65;
|
pub const GL_TEXTURE_EXTERNAL_OES: GLenum = 0x8D65;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const GL_TEXTURE_MAG_FILTER: GLenum = 0x2800;
|
pub const GL_TEXTURE_MAG_FILTER: GLenum = 0x2800;
|
||||||
pub const GL_TEXTURE_MIN_FILTER: GLenum = 0x2801;
|
pub const GL_TEXTURE_MIN_FILTER: GLenum = 0x2801;
|
||||||
pub const GL_TEXTURE_WRAP_S: GLenum = 0x2802;
|
pub const GL_TEXTURE_WRAP_S: GLenum = 0x2802;
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ impl VulkanDevice {
|
||||||
.offset(push_constant_offset)
|
.offset(push_constant_offset)
|
||||||
.size(frag_push_size),
|
.size(frag_push_size),
|
||||||
);
|
);
|
||||||
#[allow(unused_assignments)]
|
#[expect(unused_assignments)]
|
||||||
{
|
{
|
||||||
push_constant_offset += frag_push_size;
|
push_constant_offset += frag_push_size;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ impl Globals {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn get_output(&self, output: GlobalName) -> Result<Rc<WlOutputGlobal>, GlobalsError> {
|
pub fn get_output(&self, output: GlobalName) -> Result<Rc<WlOutputGlobal>, GlobalsError> {
|
||||||
match self.outputs.get(&output) {
|
match self.outputs.get(&output) {
|
||||||
Some(o) => Ok(o),
|
Some(o) => Ok(o),
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const ROLE: u32 = 0;
|
const ROLE: u32 = 0;
|
||||||
|
|
||||||
pub struct WlDataDevice {
|
pub struct WlDataDevice {
|
||||||
|
|
|
||||||
|
|
@ -12,11 +12,11 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub(super) const DND_NONE: u32 = 0;
|
pub(super) const DND_NONE: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub(super) const DND_COPY: u32 = 1;
|
pub(super) const DND_COPY: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub(super) const DND_MOVE: u32 = 2;
|
pub(super) const DND_MOVE: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub(super) const DND_ASK: u32 = 4;
|
pub(super) const DND_ASK: u32 = 4;
|
||||||
pub(super) const DND_ALL: u32 = 7;
|
pub(super) const DND_ALL: u32 = 7;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,13 +21,13 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_FINISH: u32 = 0;
|
const INVALID_FINISH: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_ACTION_MASK: u32 = 1;
|
const INVALID_ACTION_MASK: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_ACTION: u32 = 2;
|
const INVALID_ACTION: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_OFFER: u32 = 3;
|
const INVALID_OFFER: u32 = 3;
|
||||||
|
|
||||||
pub struct WlDataOffer {
|
pub struct WlDataOffer {
|
||||||
|
|
|
||||||
|
|
@ -27,9 +27,9 @@ use {
|
||||||
uapi::OwnedFd,
|
uapi::OwnedFd,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_ACTION_MASK: u32 = 0;
|
const INVALID_ACTION_MASK: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_SOURCE: u32 = 1;
|
const INVALID_SOURCE: u32 = 1;
|
||||||
|
|
||||||
pub struct WlDataSource {
|
pub struct WlDataSource {
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,9 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NONE: u32 = 0;
|
const NONE: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const CLIENT: u32 = 1;
|
const CLIENT: u32 = 1;
|
||||||
const SERVER: u32 = 2;
|
const SERVER: u32 = 2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,9 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NONE: u32 = 0;
|
const NONE: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const CLIENT: u32 = 1;
|
const CLIENT: u32 = 1;
|
||||||
const SERVER: u32 = 2;
|
const SERVER: u32 = 2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,6 @@ impl WlBuffer {
|
||||||
self.destroyed.get()
|
self.destroyed.get()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
|
||||||
pub fn new_dmabuf(
|
pub fn new_dmabuf(
|
||||||
id: WlBufferId,
|
id: WlBufferId,
|
||||||
client: &Rc<Client>,
|
client: &Rc<Client>,
|
||||||
|
|
@ -82,7 +81,7 @@ impl WlBuffer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(clippy::too_many_arguments)]
|
#[expect(clippy::too_many_arguments)]
|
||||||
pub fn new_shm(
|
pub fn new_shm(
|
||||||
id: WlBufferId,
|
id: WlBufferId,
|
||||||
client: &Rc<Client>,
|
client: &Rc<Client>,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use {
|
||||||
|
|
||||||
const INVALID_OBJECT: u32 = 0;
|
const INVALID_OBJECT: u32 = 0;
|
||||||
const INVALID_METHOD: u32 = 1;
|
const INVALID_METHOD: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NO_MEMORY: u32 = 2;
|
const NO_MEMORY: u32 = 2;
|
||||||
const IMPLEMENTATION: u32 = 3;
|
const IMPLEMENTATION: u32 = 3;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,15 +26,15 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
const SP_UNKNOWN: i32 = 0;
|
const SP_UNKNOWN: i32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SP_NONE: i32 = 1;
|
const SP_NONE: i32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SP_HORIZONTAL_RGB: i32 = 2;
|
const SP_HORIZONTAL_RGB: i32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SP_HORIZONTAL_BGR: i32 = 3;
|
const SP_HORIZONTAL_BGR: i32 = 3;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SP_VERTICAL_RGB: i32 = 4;
|
const SP_VERTICAL_RGB: i32 = 4;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SP_VERTICAL_BGR: i32 = 5;
|
const SP_VERTICAL_BGR: i32 = 5;
|
||||||
|
|
||||||
pub const TF_NORMAL: i32 = 0;
|
pub const TF_NORMAL: i32 = 0;
|
||||||
|
|
@ -47,7 +47,7 @@ pub const TF_FLIPPED_180: i32 = 6;
|
||||||
pub const TF_FLIPPED_270: i32 = 7;
|
pub const TF_FLIPPED_270: i32 = 7;
|
||||||
|
|
||||||
const MODE_CURRENT: u32 = 1;
|
const MODE_CURRENT: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const MODE_PREFERRED: u32 = 2;
|
const MODE_PREFERRED: u32 = 2;
|
||||||
|
|
||||||
pub struct WlOutputGlobal {
|
pub struct WlOutputGlobal {
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ pub const POINTER: u32 = 1;
|
||||||
const KEYBOARD: u32 = 2;
|
const KEYBOARD: u32 = 2;
|
||||||
const TOUCH: u32 = 4;
|
const TOUCH: u32 = 4;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const MISSING_CAPABILITY: u32 = 0;
|
const MISSING_CAPABILITY: u32 = 0;
|
||||||
|
|
||||||
pub const BTN_LEFT: u32 = 0x110;
|
pub const BTN_LEFT: u32 = 0x110;
|
||||||
|
|
|
||||||
|
|
@ -714,7 +714,7 @@ trait NodeSelectorUsecase: Sized + 'static {
|
||||||
fn node_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, node: &Rc<dyn Node>);
|
fn node_focus(self: &Rc<Self>, seat: &Rc<WlSeatGlobal>, node: &Rc<dyn Node>);
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<U: NodeSelectorUsecase + ?Sized> SimplePointerOwnerUsecase for Rc<U> {
|
impl<U: NodeSelectorUsecase> SimplePointerOwnerUsecase for Rc<U> {
|
||||||
const FIND_TREE_USECASE: FindTreeUsecase = <U as NodeSelectorUsecase>::FIND_TREE_USECASE;
|
const FIND_TREE_USECASE: FindTreeUsecase = <U as NodeSelectorUsecase>::FIND_TREE_USECASE;
|
||||||
const IS_DEFAULT: bool = false;
|
const IS_DEFAULT: bool = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ pub enum TabletToolType {
|
||||||
Brush,
|
Brush,
|
||||||
Pencil,
|
Pencil,
|
||||||
Airbrush,
|
Airbrush,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Finger,
|
Finger,
|
||||||
Mouse,
|
Mouse,
|
||||||
Lens,
|
Lens,
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ use {
|
||||||
|
|
||||||
pub const REPEAT_INFO_SINCE: Version = Version(4);
|
pub const REPEAT_INFO_SINCE: Version = Version(4);
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NO_KEYMAP: u32 = 0;
|
const NO_KEYMAP: u32 = 0;
|
||||||
pub const XKB_V1: u32 = 1;
|
pub const XKB_V1: u32 = 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const ROLE: u32 = 0;
|
const ROLE: u32 = 0;
|
||||||
|
|
||||||
pub(super) const RELEASED: u32 = 0;
|
pub(super) const RELEASED: u32 = 0;
|
||||||
|
|
@ -24,7 +24,6 @@ pub const HORIZONTAL_SCROLL: u32 = 1;
|
||||||
pub const WHEEL: u32 = 0;
|
pub const WHEEL: u32 = 0;
|
||||||
pub const FINGER: u32 = 1;
|
pub const FINGER: u32 = 1;
|
||||||
pub const CONTINUOUS: u32 = 2;
|
pub const CONTINUOUS: u32 = 2;
|
||||||
#[allow(dead_code)]
|
|
||||||
pub const WHEEL_TILT: u32 = 3;
|
pub const WHEEL_TILT: u32 = 3;
|
||||||
|
|
||||||
pub const IDENTICAL: u32 = 0;
|
pub const IDENTICAL: u32 = 0;
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,9 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const SHAPE_SINCE_VERSION: Version = Version(6);
|
pub const SHAPE_SINCE_VERSION: Version = Version(6);
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const ORIENTATION_DIRECTION_SINCE_VERSION: Version = Version(6);
|
pub const ORIENTATION_DIRECTION_SINCE_VERSION: Version = Version(6);
|
||||||
|
|
||||||
pub struct WlTouch {
|
pub struct WlTouch {
|
||||||
|
|
@ -78,7 +78,7 @@ impl WlTouch {
|
||||||
self.seat.client.event(Cancel { self_id: self.id })
|
self.seat.client.event(Cancel { self_id: self.id })
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_shape(&self, id: i32, major: Fixed, minor: Fixed) {
|
pub fn send_shape(&self, id: i32, major: Fixed, minor: Fixed) {
|
||||||
self.seat.client.event(Shape {
|
self.seat.client.event(Shape {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
@ -88,7 +88,7 @@ impl WlTouch {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_orientation(&self, id: i32, orientation: Fixed) {
|
pub fn send_orientation(&self, id: i32, orientation: Fixed) {
|
||||||
self.seat.client.event(Orientation {
|
self.seat.client.event(Orientation {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const BAD_SURFACE: u32 = 0;
|
const BAD_SURFACE: u32 = 0;
|
||||||
|
|
||||||
pub struct WlSubcompositorGlobal {
|
pub struct WlSubcompositorGlobal {
|
||||||
|
|
|
||||||
|
|
@ -96,11 +96,11 @@ use {
|
||||||
zwp_idle_inhibitor_v1::ZwpIdleInhibitorV1,
|
zwp_idle_inhibitor_v1::ZwpIdleInhibitorV1,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_SCALE: u32 = 0;
|
const INVALID_SCALE: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_TRANSFORM: u32 = 1;
|
const INVALID_TRANSFORM: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_SIZE: u32 = 2;
|
const INVALID_SIZE: u32 = 2;
|
||||||
|
|
||||||
const OFFSET_SINCE: Version = Version(5);
|
const OFFSET_SINCE: Version = Version(5);
|
||||||
|
|
@ -634,7 +634,7 @@ impl WlSurface {
|
||||||
Ok(ext.into_xsurface().unwrap())
|
Ok(ext.into_xsurface().unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn get_output(&self) -> Rc<OutputNode> {
|
pub fn get_output(&self) -> Rc<OutputNode> {
|
||||||
self.output.get()
|
self.output.get()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const BAD_SURFACE: u32 = 0;
|
const BAD_SURFACE: u32 = 0;
|
||||||
|
|
||||||
const MAX_SUBSURFACE_DEPTH: u32 = 100;
|
const MAX_SUBSURFACE_DEPTH: u32 = 100;
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NOT_CONSTRUCTED: u32 = 1;
|
const NOT_CONSTRUCTED: u32 = 1;
|
||||||
const ALREADY_CONSTRUCTED: u32 = 2;
|
const ALREADY_CONSTRUCTED: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const UNCONFIGURED_BUFFER: u32 = 3;
|
const UNCONFIGURED_BUFFER: u32 = 3;
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_GRAB: u32 = 1;
|
const INVALID_GRAB: u32 = 1;
|
||||||
|
|
||||||
tree_id!(PopupId);
|
tree_id!(PopupId);
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,10 @@ pub enum ResizeEdge {
|
||||||
BottomRight = 10,
|
BottomRight = 10,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const STATE_MAXIMIZED: u32 = 1;
|
const STATE_MAXIMIZED: u32 = 1;
|
||||||
const STATE_FULLSCREEN: u32 = 2;
|
const STATE_FULLSCREEN: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const STATE_RESIZING: u32 = 3;
|
const STATE_RESIZING: u32 = 3;
|
||||||
const STATE_ACTIVATED: u32 = 4;
|
const STATE_ACTIVATED: u32 = 4;
|
||||||
const STATE_TILED_LEFT: u32 = 5;
|
const STATE_TILED_LEFT: u32 = 5;
|
||||||
|
|
@ -68,12 +68,12 @@ const STATE_TILED_TOP: u32 = 7;
|
||||||
const STATE_TILED_BOTTOM: u32 = 8;
|
const STATE_TILED_BOTTOM: u32 = 8;
|
||||||
pub const STATE_SUSPENDED: u32 = 9;
|
pub const STATE_SUSPENDED: u32 = 9;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const CAP_WINDOW_MENU: u32 = 1;
|
const CAP_WINDOW_MENU: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const CAP_MAXIMIZE: u32 = 2;
|
const CAP_MAXIMIZE: u32 = 2;
|
||||||
const CAP_FULLSCREEN: u32 = 3;
|
const CAP_FULLSCREEN: u32 = 3;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const CAP_MINIMIZE: u32 = 4;
|
const CAP_MINIMIZE: u32 = 4;
|
||||||
|
|
||||||
pub const WM_CAPABILITIES_SINCE: Version = Version(5);
|
pub const WM_CAPABILITIES_SINCE: Version = Version(5);
|
||||||
|
|
@ -81,7 +81,7 @@ pub const SUSPENDED_SINCE: Version = Version(6);
|
||||||
|
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
#[derive(Copy, Clone, Eq, PartialEq, Debug)]
|
||||||
pub enum Decoration {
|
pub enum Decoration {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Client,
|
Client,
|
||||||
Server,
|
Server,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
const KI_NONE: u32 = 0;
|
const KI_NONE: u32 = 0;
|
||||||
#[allow(dead_code)]
|
|
||||||
const KI_EXCLUSIVE: u32 = 1;
|
const KI_EXCLUSIVE: u32 = 1;
|
||||||
const KI_ON_DEMAND: u32 = 2;
|
const KI_ON_DEMAND: u32 = 2;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ impl ZwpInputPopupSurfaceV2 {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_text_input_rectangle(&self, rect: Rect) {
|
pub fn send_text_input_rectangle(&self, rect: Rect) {
|
||||||
self.client.event(TextInputRectangle {
|
self.client.event(TextInputRectangle {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ impl WpDrmLeaseConnectorV1 {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_description(&self, description: &str) {
|
pub fn send_description(&self, description: &str) {
|
||||||
self.client.event(Description {
|
self.client.event(Description {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,10 @@ pub struct WpPresentationFeedback {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub const KIND_VSYNC: u32 = 0x1;
|
pub const KIND_VSYNC: u32 = 0x1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const KIND_HW_CLOCK: u32 = 0x2;
|
pub const KIND_HW_CLOCK: u32 = 0x2;
|
||||||
pub const KIND_HW_COMPLETION: u32 = 0x4;
|
pub const KIND_HW_COMPLETION: u32 = 0x4;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const KIND_ZERO_COPY: u32 = 0x8;
|
pub const KIND_ZERO_COPY: u32 = 0x8;
|
||||||
|
|
||||||
impl WpPresentationFeedback {
|
impl WpPresentationFeedback {
|
||||||
|
|
|
||||||
|
|
@ -15,16 +15,16 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const ROLE: u32 = 0;
|
const ROLE: u32 = 0;
|
||||||
const DEFUNCT_SURFACES: u32 = 1;
|
const DEFUNCT_SURFACES: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const NOT_THE_TOPMOST_POPUP: u32 = 2;
|
const NOT_THE_TOPMOST_POPUP: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_POPUP_PARENT: u32 = 3;
|
const INVALID_POPUP_PARENT: u32 = 3;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_SURFACE_STATE: u32 = 4;
|
const INVALID_SURFACE_STATE: u32 = 4;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INVALID_POSITIONER: u32 = 5;
|
const INVALID_POSITIONER: u32 = 5;
|
||||||
|
|
||||||
pub struct XdgWmBaseGlobal {
|
pub struct XdgWmBaseGlobal {
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const FLAGS_Y_INVERT: u32 = 1;
|
pub const FLAGS_Y_INVERT: u32 = 1;
|
||||||
|
|
||||||
pub struct ZwlrScreencopyFrameV1 {
|
pub struct ZwlrScreencopyFrameV1 {
|
||||||
|
|
@ -81,7 +81,7 @@ impl ZwlrScreencopyFrameV1 {
|
||||||
self.client.event(BufferDone { self_id: self.id })
|
self.client.event(BufferDone { self_id: self.id })
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_flags(&self, flags: u32) {
|
pub fn send_flags(&self, flags: u32) {
|
||||||
self.client.event(Flags {
|
self.client.event(Flags {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -17,11 +17,11 @@ use {
|
||||||
thiserror::Error,
|
thiserror::Error,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const Y_INVERT: u32 = 1;
|
const Y_INVERT: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const INTERLACED: u32 = 2;
|
const INTERLACED: u32 = 2;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const BOTTOM_FIRST: u32 = 4;
|
const BOTTOM_FIRST: u32 = 4;
|
||||||
|
|
||||||
const MAX_PLANE: u32 = MAX_PLANES as u32 - 1;
|
const MAX_PLANE: u32 = MAX_PLANES as u32 - 1;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ use {
|
||||||
uapi::{c, OwnedFd},
|
uapi::{c, OwnedFd},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub const SCANOUT: u32 = 1;
|
pub const SCANOUT: u32 = 1;
|
||||||
|
|
||||||
pub struct ZwpLinuxDmabufFeedbackV1 {
|
pub struct ZwpLinuxDmabufFeedbackV1 {
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const NAME_SINCE: Version = Version(2);
|
pub const NAME_SINCE: Version = Version(2);
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const DESCRIPTION_SINCE: Version = Version(2);
|
pub const DESCRIPTION_SINCE: Version = Version(2);
|
||||||
pub const NO_DONE_SINCE: Version = Version(3);
|
pub const NO_DONE_SINCE: Version = Version(3);
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ impl ZxdgOutputV1 {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn send_description(&self, description: &str) {
|
pub fn send_description(&self, description: &str) {
|
||||||
self.client.event(Description {
|
self.client.event(Description {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ impl IoUring {
|
||||||
self.poll(fd, c::POLLIN).await.merge()
|
self.poll(fd, c::POLLIN).await.merge()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub async fn writable(&self, fd: &Rc<OwnedFd>) -> Result<c::c_short, IoUringError> {
|
pub async fn writable(&self, fd: &Rc<OwnedFd>) -> Result<c::c_short, IoUringError> {
|
||||||
self.poll(fd, c::POLLOUT).await.merge()
|
self.poll(fd, c::POLLOUT).await.merge()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ use {
|
||||||
uapi::c,
|
uapi::c,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub(super) struct timespec64 {
|
pub(super) struct timespec64 {
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ pub struct DefaultSeat {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestClient {
|
impl TestClient {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn error(&self, msg: &str) {
|
pub fn error(&self, msg: &str) {
|
||||||
self.tran.error(msg)
|
self.tran.error(msg)
|
||||||
}
|
}
|
||||||
|
|
@ -97,7 +97,7 @@ impl TestClient {
|
||||||
Ok(qoi)
|
Ok(qoi)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub async fn save_screenshot(&self, name: &str, include_cursor: bool) -> Result<(), TestError> {
|
pub async fn save_screenshot(&self, name: &str, include_cursor: bool) -> Result<(), TestError> {
|
||||||
let qoi = self.take_screenshot(include_cursor).await?;
|
let qoi = self.take_screenshot(include_cursor).await?;
|
||||||
let path = format!("{}/screenshot_{}.qoi", self.run.out_dir, name);
|
let path = format!("{}/screenshot_{}.qoi", self.run.out_dir, name);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ pub struct TestCursorShapeDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestCursorShapeDevice {
|
impl TestCursorShapeDevice {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn destroy(&self) -> TestResult {
|
pub fn destroy(&self) -> TestResult {
|
||||||
if !self.destroyed.replace(true) {
|
if !self.destroyed.replace(true) {
|
||||||
self.tran.send(Destroy { self_id: self.id })?;
|
self.tran.send(Destroy { self_id: self.id })?;
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ impl TestCursorShapeManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn destroy(&self) -> TestResult {
|
pub fn destroy(&self) -> TestResult {
|
||||||
if !self.destroyed.replace(true) {
|
if !self.destroyed.replace(true) {
|
||||||
self.tran.send(Destroy { self_id: self.id })?;
|
self.tran.send(Destroy { self_id: self.id })?;
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ pub struct TestDataControlDevice {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestDataControlDevice {
|
impl TestDataControlDevice {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn destroy(&self) -> TestResult {
|
pub fn destroy(&self) -> TestResult {
|
||||||
if !self.destroyed.replace(true) {
|
if !self.destroyed.replace(true) {
|
||||||
self.tran.send(Destroy { self_id: self.id })?;
|
self.tran.send(Destroy { self_id: self.id })?;
|
||||||
|
|
@ -45,7 +45,7 @@ impl TestDataControlDevice {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn set_primary_selection(&self, source: &TestDataControlSource) -> TestResult {
|
pub fn set_primary_selection(&self, source: &TestDataControlSource) -> TestResult {
|
||||||
self.tran.send(SetPrimarySelection {
|
self.tran.send(SetPrimarySelection {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@ impl TestDataDevice {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn set_selection(&self, source: &TestDataSource, serial: u32) -> TestResult {
|
pub fn set_selection(&self, source: &TestDataSource, serial: u32) -> TestResult {
|
||||||
self.tran.send(SetSelection {
|
self.tran.send(SetSelection {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@ impl TestDataSource {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn offer(&self, mime_type: &str) -> TestResult {
|
pub fn offer(&self, mime_type: &str) -> TestResult {
|
||||||
self.tran.send(Offer {
|
self.tran.send(Offer {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
@ -35,7 +34,6 @@ impl TestDataSource {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn set_actions(&self, actions: u32) -> TestResult {
|
pub fn set_actions(&self, actions: u32) -> TestResult {
|
||||||
self.tran.send(SetActions {
|
self.tran.send(SetActions {
|
||||||
self_id: self.id,
|
self_id: self.id,
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ impl TestDmabuf {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn get_default_feedback(&self) -> TestResult<Rc<TestDmabufFeedback>> {
|
pub fn get_default_feedback(&self) -> TestResult<Rc<TestDmabufFeedback>> {
|
||||||
let obj = Rc::new(TestDmabufFeedback::new(&self.tran));
|
let obj = Rc::new(TestDmabufFeedback::new(&self.tran));
|
||||||
self.tran.add_obj(obj.clone())?;
|
self.tran.add_obj(obj.clone())?;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ impl TestExtForeignToplevelList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn stop(&self) -> TestResult {
|
pub fn stop(&self) -> TestResult {
|
||||||
self.tran.send(Stop { self_id: self.id })?;
|
self.tran.send(Stop { self_id: self.id })?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ impl TestInputMethod {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn grab(&self) -> TestResult<Rc<TestInputMethodKeyboardGrab>> {
|
pub fn grab(&self) -> TestResult<Rc<TestInputMethodKeyboardGrab>> {
|
||||||
let obj = Rc::new(TestInputMethodKeyboardGrab {
|
let obj = Rc::new(TestInputMethodKeyboardGrab {
|
||||||
id: self.tran.id(),
|
id: self.tran.id(),
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@ impl TestShm {
|
||||||
&self.formats
|
&self.formats
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn create_pool(&self, size: usize) -> Result<Rc<TestShmPool>, TestError> {
|
pub fn create_pool(&self, size: usize) -> Result<Rc<TestShmPool>, TestError> {
|
||||||
let mem = TestMem::new(size)?;
|
let mem = TestMem::new(size)?;
|
||||||
let pool = Rc::new(TestShmPool {
|
let pool = Rc::new(TestShmPool {
|
||||||
|
|
@ -58,7 +57,6 @@ impl TestShm {
|
||||||
Ok(pool)
|
Ok(pool)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn create_buffer(&self, width: i32, height: i32) -> TestResult<Rc<TestShmBuffer>> {
|
pub fn create_buffer(&self, width: i32, height: i32) -> TestResult<Rc<TestShmBuffer>> {
|
||||||
let pool = self.create_pool((width * height * 4) as _)?;
|
let pool = self.create_pool((width * height * 4) as _)?;
|
||||||
pool.create_buffer(0, width, height, width * 4, ARGB8888)
|
pool.create_buffer(0, width, height, width * 4, ARGB8888)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ pub struct TestShmBuffer {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestShmBuffer {
|
impl TestShmBuffer {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn fill(&self, color: Color) {
|
pub fn fill(&self, color: Color) {
|
||||||
let [cr, cg, cb, ca] = color.to_rgba_premultiplied();
|
let [cr, cg, cb, ca] = color.to_rgba_premultiplied();
|
||||||
for [b, g, r, a] in self.deref().array_chunks_ext::<4>() {
|
for [b, g, r, a] in self.deref().array_chunks_ext::<4>() {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ pub struct TestShmPool {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestShmPool {
|
impl TestShmPool {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn create_buffer(
|
pub fn create_buffer(
|
||||||
&self,
|
&self,
|
||||||
offset: i32,
|
offset: i32,
|
||||||
|
|
@ -61,7 +60,7 @@ impl TestShmPool {
|
||||||
Ok(buffer)
|
Ok(buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn resize(&self, size: usize) -> Result<(), TestError> {
|
pub fn resize(&self, size: usize) -> Result<(), TestError> {
|
||||||
let mem = self.mem.get().grow(size)?;
|
let mem = self.mem.get().grow(size)?;
|
||||||
self.mem.set(mem);
|
self.mem.set(mem);
|
||||||
|
|
|
||||||
|
|
@ -44,12 +44,11 @@ impl TestSubsurface {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn set_sync(&self) -> Result<(), TestError> {
|
pub fn set_sync(&self) -> Result<(), TestError> {
|
||||||
self.tran.send(SetSync { self_id: self.id })
|
self.tran.send(SetSync { self_id: self.id })
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn set_desync(&self) -> Result<(), TestError> {
|
pub fn set_desync(&self) -> Result<(), TestError> {
|
||||||
self.tran.send(SetDesync { self_id: self.id })
|
self.tran.send(SetDesync { self_id: self.id })
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ pub struct TestMem {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TestMem {
|
impl TestMem {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn new(size: usize) -> Result<Rc<Self>, TestError> {
|
pub fn new(size: usize) -> Result<Rc<Self>, TestError> {
|
||||||
let fd = uapi::memfd_create("test_pool", c::MFD_CLOEXEC | c::MFD_ALLOW_SEALING)?;
|
let fd = uapi::memfd_create("test_pool", c::MFD_CLOEXEC | c::MFD_ALLOW_SEALING)?;
|
||||||
uapi::fcntl_add_seals(fd.raw(), c::F_SEAL_SHRINK)?;
|
uapi::fcntl_add_seals(fd.raw(), c::F_SEAL_SHRINK)?;
|
||||||
|
|
@ -25,7 +24,6 @@ impl TestMem {
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn grow(&self, size: usize) -> Result<Rc<Self>, TestError> {
|
pub fn grow(&self, size: usize) -> Result<Rc<Self>, TestError> {
|
||||||
let cur_len = uapi::fstat(self.fd.raw())?;
|
let cur_len = uapi::fstat(self.fd.raw())?;
|
||||||
if size > cur_len.st_size as _ {
|
if size > cur_len.st_size as _ {
|
||||||
|
|
@ -47,7 +45,6 @@ impl Deref for TestMem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn map(fd: c::c_int, size: usize) -> Result<*const [Cell<u8>], TestError> {
|
fn map(fd: c::c_int, size: usize) -> Result<*const [Cell<u8>], TestError> {
|
||||||
if size == 0 {
|
if size == 0 {
|
||||||
return Ok(&[]);
|
return Ok(&[]);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ macro_rules! test_object {
|
||||||
self.id.into()
|
self.id.into()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_variables, unreachable_code)]
|
#[allow(clippy::allow_attributes, unused_variables, unreachable_code)]
|
||||||
fn handle_request(
|
fn handle_request(
|
||||||
self: std::rc::Rc<Self>,
|
self: std::rc::Rc<Self>,
|
||||||
request: u32,
|
request: u32,
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,6 @@ impl<T> TestExpectedEvent<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn last(&self) -> TestResult<T> {
|
pub fn last(&self) -> TestResult<T> {
|
||||||
match self.data.events.borrow_mut().pop_back() {
|
match self.data.events.borrow_mut().pop_back() {
|
||||||
Some(t) => Ok(t),
|
Some(t) => Ok(t),
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ impl TestSurfaceExt {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn set_color(&self, r: u8, g: u8, b: u8, a: u8) {
|
pub fn set_color(&self, r: u8, g: u8, b: u8, a: u8) {
|
||||||
self.color.set(Color::from_rgba_straight(r, g, b, a));
|
self.color.set(Color::from_rgba_straight(r, g, b, a));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,6 @@ impl<'a> LibInputDevice<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn drag_enabled(&self) -> bool {
|
pub fn drag_enabled(&self) -> bool {
|
||||||
let enabled =
|
let enabled =
|
||||||
unsafe { ConfigDragState(libinput_device_config_tap_get_drag_enabled(self.dev)) };
|
unsafe { ConfigDragState(libinput_device_config_tap_get_drag_enabled(self.dev)) };
|
||||||
|
|
@ -189,7 +188,6 @@ impl<'a> LibInputDevice<'a> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn drag_lock_enabled(&self) -> bool {
|
pub fn drag_lock_enabled(&self) -> bool {
|
||||||
let enabled = unsafe {
|
let enabled = unsafe {
|
||||||
ConfigDragLockState(libinput_device_config_tap_get_drag_lock_enabled(self.dev))
|
ConfigDragLockState(libinput_device_config_tap_get_drag_lock_enabled(self.dev))
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,6 @@ impl<'a> LibInputEventKeyboard<'a> {
|
||||||
unsafe { KeyState(libinput_event_keyboard_get_key_state(self.event)) }
|
unsafe { KeyState(libinput_event_keyboard_get_key_state(self.event)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn time_usec(&self) -> u64 {
|
pub fn time_usec(&self) -> u64 {
|
||||||
unsafe { libinput_event_keyboard_get_time_usec(self.event) }
|
unsafe { libinput_event_keyboard_get_time_usec(self.event) }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ macro_rules! id {
|
||||||
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
|
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
|
||||||
pub struct $name(u32);
|
pub struct $name(u32);
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
impl $name {
|
impl $name {
|
||||||
pub const NONE: Self = $name(0);
|
pub const NONE: Self = $name(0);
|
||||||
|
|
||||||
|
|
@ -159,12 +159,12 @@ macro_rules! shared_ids {
|
||||||
pub struct $id($ty);
|
pub struct $id($ty);
|
||||||
|
|
||||||
impl $id {
|
impl $id {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn raw(&self) -> $ty {
|
pub fn raw(&self) -> $ty {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn from_raw(id: $ty) -> Self {
|
pub fn from_raw(id: $ty) -> Self {
|
||||||
Self(id)
|
Self(id)
|
||||||
}
|
}
|
||||||
|
|
@ -211,12 +211,12 @@ macro_rules! linear_ids {
|
||||||
pub struct $id($ty);
|
pub struct $id($ty);
|
||||||
|
|
||||||
impl $id {
|
impl $id {
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub fn raw(&self) -> $ty {
|
pub fn raw(&self) -> $ty {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub fn from_raw(id: $ty) -> Self {
|
pub fn from_raw(id: $ty) -> Self {
|
||||||
Self(id)
|
Self(id)
|
||||||
}
|
}
|
||||||
|
|
@ -277,12 +277,12 @@ macro_rules! tree_id {
|
||||||
pub struct $id(u32);
|
pub struct $id(u32);
|
||||||
|
|
||||||
impl $id {
|
impl $id {
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub fn raw(&self) -> u32 {
|
pub fn raw(&self) -> u32 {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub fn none() -> Self {
|
pub fn none() -> Self {
|
||||||
Self(0)
|
Self(0)
|
||||||
}
|
}
|
||||||
|
|
@ -382,7 +382,7 @@ macro_rules! assert_size_eq {
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(unused_macros)]
|
#[expect(unused_macros)]
|
||||||
macro_rules! assert_size_le {
|
macro_rules! assert_size_le {
|
||||||
($t:ty, $u:ty) => {{
|
($t:ty, $u:ty) => {{
|
||||||
struct AssertLeSize<T, U>(std::marker::PhantomData<T>, std::marker::PhantomData<U>);
|
struct AssertLeSize<T, U>(std::marker::PhantomData<T>, std::marker::PhantomData<U>);
|
||||||
|
|
@ -418,7 +418,7 @@ macro_rules! atoms {
|
||||||
$name:ident;
|
$name:ident;
|
||||||
$($field_name:ident,)*
|
$($field_name:ident,)*
|
||||||
} => {
|
} => {
|
||||||
#[allow(non_snake_case, dead_code)]
|
#[expect(non_snake_case, dead_code)]
|
||||||
#[derive(Debug, Clone, Copy)]
|
#[derive(Debug, Clone, Copy)]
|
||||||
struct $name {
|
struct $name {
|
||||||
$(
|
$(
|
||||||
|
|
@ -471,11 +471,11 @@ macro_rules! bitflags {
|
||||||
pub struct $name(pub $rep);
|
pub struct $name(pub $rep);
|
||||||
|
|
||||||
$(
|
$(
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
pub const $var: $name = $name($val);
|
pub const $var: $name = $name($val);
|
||||||
)*
|
)*
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
impl $name {
|
impl $name {
|
||||||
pub fn none() -> Self {
|
pub fn none() -> Self {
|
||||||
Self(0)
|
Self(0)
|
||||||
|
|
@ -549,7 +549,7 @@ macro_rules! bitflags {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl std::fmt::Debug for $name {
|
impl std::fmt::Debug for $name {
|
||||||
#[allow(clippy::bad_bit_mask)]
|
#[allow(clippy::allow_attributes, clippy::bad_bit_mask)]
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
let mut any = false;
|
let mut any = false;
|
||||||
let mut v = self.0;
|
let mut v = self.0;
|
||||||
|
|
@ -578,14 +578,13 @@ macro_rules! bitflags {
|
||||||
macro_rules! pw_opcodes {
|
macro_rules! pw_opcodes {
|
||||||
($name:ident; $($var:ident = $val:expr,)*) => {
|
($name:ident; $($var:ident = $val:expr,)*) => {
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(dead_code)]
|
|
||||||
pub enum $name {
|
pub enum $name {
|
||||||
$(
|
$(
|
||||||
$var,
|
$var,
|
||||||
)*
|
)*
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(clippy::allow_attributes, dead_code)]
|
||||||
impl $name {
|
impl $name {
|
||||||
pub fn from_id(id: u8) -> Option<Self> {
|
pub fn from_id(id: u8) -> Option<Self> {
|
||||||
let v = match id {
|
let v = match id {
|
||||||
|
|
@ -661,7 +660,7 @@ macro_rules! ei_id {
|
||||||
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
|
#[derive(Debug, Copy, Clone, Hash, Ord, PartialOrd, Eq, PartialEq)]
|
||||||
pub struct $name(u64);
|
pub struct $name(u64);
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
impl $name {
|
impl $name {
|
||||||
pub const NONE: Self = $name(0);
|
pub const NONE: Self = $name(0);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
clippy::unnecessary_cast,
|
clippy::unnecessary_cast,
|
||||||
clippy::manual_flatten
|
clippy::manual_flatten
|
||||||
)]
|
)]
|
||||||
|
#![warn(clippy::allow_attributes)]
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
mod macros;
|
mod macros;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ pub const WL_DISPLAY_ID: WlDisplayId = WlDisplayId::from_raw(1);
|
||||||
pub struct ObjectId(u32);
|
pub struct ObjectId(u32);
|
||||||
|
|
||||||
impl ObjectId {
|
impl ObjectId {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub const NONE: Self = ObjectId(0);
|
pub const NONE: Self = ObjectId(0);
|
||||||
|
|
||||||
pub fn from_raw(raw: u32) -> Self {
|
pub fn from_raw(raw: u32) -> Self {
|
||||||
|
|
@ -39,7 +39,7 @@ impl Display for ObjectId {
|
||||||
pub trait ObjectBase {
|
pub trait ObjectBase {
|
||||||
fn id(&self) -> ObjectId;
|
fn id(&self) -> ObjectId;
|
||||||
fn version(&self) -> Version;
|
fn version(&self) -> Version;
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
|
fn into_any(self: Rc<Self>) -> Rc<dyn Any>;
|
||||||
fn handle_request(
|
fn handle_request(
|
||||||
self: Rc<Self>,
|
self: Rc<Self>,
|
||||||
|
|
|
||||||
|
|
@ -201,7 +201,7 @@ impl PwCon {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn sync<P: PwObject>(&self, p: &P) {
|
pub fn sync<P: PwObject>(&self, p: &P) {
|
||||||
let seq = p.data().sync_id.fetch_add(1) + 1;
|
let seq = p.data().sync_id.fetch_add(1) + 1;
|
||||||
self.send2(0, "core", PwCoreMethods::Sync, |f| {
|
self.send2(0, "core", PwCoreMethods::Sync, |f| {
|
||||||
|
|
@ -218,7 +218,7 @@ impl PwCon {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn get_registry(self: &Rc<Self>) -> Rc<PwRegistry> {
|
pub fn get_registry(self: &Rc<Self>) -> Rc<PwRegistry> {
|
||||||
let registry = Rc::new(PwRegistry {
|
let registry = Rc::new(PwRegistry {
|
||||||
data: self.proxy_data(),
|
data: self.proxy_data(),
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.first = false;
|
self.first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_float(&mut self, float: f32) {
|
pub fn write_float(&mut self, float: f32) {
|
||||||
if !self.array || self.first {
|
if !self.array || self.first {
|
||||||
self.data.extend_from_slice(uapi::as_bytes(&4u32));
|
self.data.extend_from_slice(uapi::as_bytes(&4u32));
|
||||||
|
|
@ -106,7 +106,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.first = false;
|
self.first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_double(&mut self, double: f64) {
|
pub fn write_double(&mut self, double: f64) {
|
||||||
if !self.array || self.first {
|
if !self.array || self.first {
|
||||||
self.data.extend_from_slice(uapi::as_bytes(&8u32));
|
self.data.extend_from_slice(uapi::as_bytes(&8u32));
|
||||||
|
|
@ -127,7 +127,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.pad();
|
self.pad();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_bytes(&mut self, s: &[u8]) {
|
pub fn write_bytes(&mut self, s: &[u8]) {
|
||||||
self.data
|
self.data
|
||||||
.extend_from_slice(uapi::as_bytes(&(s.len() as u32)));
|
.extend_from_slice(uapi::as_bytes(&(s.len() as u32)));
|
||||||
|
|
@ -148,7 +148,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.first = false;
|
self.first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_fraction(&mut self, num: i32, denom: i32) {
|
pub fn write_fraction(&mut self, num: i32, denom: i32) {
|
||||||
if !self.array || self.first {
|
if !self.array || self.first {
|
||||||
self.data.extend_from_slice(uapi::as_bytes(&8u32));
|
self.data.extend_from_slice(uapi::as_bytes(&8u32));
|
||||||
|
|
@ -168,7 +168,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.first = false;
|
self.first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_bitmap(&mut self, s: &[u8]) {
|
pub fn write_bitmap(&mut self, s: &[u8]) {
|
||||||
self.data
|
self.data
|
||||||
.extend_from_slice(uapi::as_bytes(&(s.len() as u32)));
|
.extend_from_slice(uapi::as_bytes(&(s.len() as u32)));
|
||||||
|
|
@ -178,7 +178,6 @@ impl<'a> PwFormatter<'a> {
|
||||||
self.pad();
|
self.pad();
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn write_fd(&mut self, fd: &Rc<OwnedFd>) {
|
pub fn write_fd(&mut self, fd: &Rc<OwnedFd>) {
|
||||||
let pos = self.fds.len() as u64;
|
let pos = self.fds.len() as u64;
|
||||||
self.fds.push(fd.clone());
|
self.fds.push(fd.clone());
|
||||||
|
|
@ -205,7 +204,7 @@ impl<'a> PwFormatter<'a> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn write_array<F>(&mut self, f: F)
|
pub fn write_array<F>(&mut self, f: F)
|
||||||
where
|
where
|
||||||
F: FnOnce(&mut PwFormatter),
|
F: FnOnce(&mut PwFormatter),
|
||||||
|
|
|
||||||
|
|
@ -202,12 +202,12 @@ pub const PW_CLIENT_NODE_FACTORY: &str = "client-node";
|
||||||
pub const PW_CLIENT_NODE_INTERFACE: &str = "PipeWire:Interface:ClientNode";
|
pub const PW_CLIENT_NODE_INTERFACE: &str = "PipeWire:Interface:ClientNode";
|
||||||
pub const PW_CLIENT_NODE_VERSION: i32 = 4;
|
pub const PW_CLIENT_NODE_VERSION: i32 = 4;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const PW_CLIENT_NODE_UPDATE_PARAMS: u32 = 1 << 0;
|
const PW_CLIENT_NODE_UPDATE_PARAMS: u32 = 1 << 0;
|
||||||
const PW_CLIENT_NODE_UPDATE_INFO: u32 = 1 << 1;
|
const PW_CLIENT_NODE_UPDATE_INFO: u32 = 1 << 1;
|
||||||
|
|
||||||
const SPA_NODE_CHANGE_MASK_FLAGS: u64 = 1 << 0;
|
const SPA_NODE_CHANGE_MASK_FLAGS: u64 = 1 << 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SPA_NODE_CHANGE_MASK_PROPS: u64 = 1 << 1;
|
const SPA_NODE_CHANGE_MASK_PROPS: u64 = 1 << 1;
|
||||||
const SPA_NODE_CHANGE_MASK_PARAMS: u64 = 1 << 2;
|
const SPA_NODE_CHANGE_MASK_PARAMS: u64 = 1 << 2;
|
||||||
|
|
||||||
|
|
@ -216,7 +216,7 @@ const PW_CLIENT_NODE_PORT_UPDATE_INFO: u32 = 1 << 1;
|
||||||
|
|
||||||
const SPA_PORT_CHANGE_MASK_FLAGS: u64 = 1 << 0;
|
const SPA_PORT_CHANGE_MASK_FLAGS: u64 = 1 << 0;
|
||||||
const SPA_PORT_CHANGE_MASK_RATE: u64 = 1 << 1;
|
const SPA_PORT_CHANGE_MASK_RATE: u64 = 1 << 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const SPA_PORT_CHANGE_MASK_PROPS: u64 = 1 << 2;
|
const SPA_PORT_CHANGE_MASK_PROPS: u64 = 1 << 2;
|
||||||
const SPA_PORT_CHANGE_MASK_PARAMS: u64 = 1 << 3;
|
const SPA_PORT_CHANGE_MASK_PARAMS: u64 = 1 << 3;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ pub struct PwMemTyped<T> {
|
||||||
_phantom: PhantomData<T>,
|
_phantom: PhantomData<T>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub struct PwMemSlice {
|
pub struct PwMemSlice {
|
||||||
mem: Rc<PwMemMap>,
|
mem: Rc<PwMemMap>,
|
||||||
range: Range<usize>,
|
range: Range<usize>,
|
||||||
|
|
@ -85,19 +85,19 @@ impl PwMem {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PwMemMap {
|
impl PwMemMap {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub unsafe fn read<T: Pod>(&self) -> &T {
|
pub unsafe fn read<T: Pod>(&self) -> &T {
|
||||||
self.check::<T>(0);
|
self.check::<T>(0);
|
||||||
(self.map.ptr.cast::<u8>().add(self.range.start) as *const T).deref()
|
(self.map.ptr.cast::<u8>().add(self.range.start) as *const T).deref()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub unsafe fn write<T: Pod>(&self) -> &mut T {
|
pub unsafe fn write<T: Pod>(&self) -> &mut T {
|
||||||
self.check::<T>(0);
|
self.check::<T>(0);
|
||||||
(self.map.ptr.cast::<u8>().add(self.range.start) as *mut T).deref_mut()
|
(self.map.ptr.cast::<u8>().add(self.range.start) as *mut T).deref_mut()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub unsafe fn bytes_mut(&self) -> &mut [u8] {
|
pub unsafe fn bytes_mut(&self) -> &mut [u8] {
|
||||||
std::slice::from_raw_parts_mut(
|
std::slice::from_raw_parts_mut(
|
||||||
self.map.ptr.cast::<u8>().add(self.range.start) as _,
|
self.map.ptr.cast::<u8>().add(self.range.start) as _,
|
||||||
|
|
@ -135,7 +135,6 @@ impl PwMemMap {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Pod> PwMemTyped<T> {
|
impl<T: Pod> PwMemTyped<T> {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub unsafe fn read(&self) -> &T {
|
pub unsafe fn read(&self) -> &T {
|
||||||
(self.mem.map.ptr.cast::<u8>().add(self.offset) as *const T).deref()
|
(self.mem.map.ptr.cast::<u8>().add(self.offset) as *const T).deref()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,9 +50,9 @@ use {
|
||||||
};
|
};
|
||||||
|
|
||||||
const PORTAL_SUCCESS: u32 = 0;
|
const PORTAL_SUCCESS: u32 = 0;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const PORTAL_CANCELLED: u32 = 1;
|
const PORTAL_CANCELLED: u32 = 1;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
const PORTAL_ENDED: u32 = 2;
|
const PORTAL_ENDED: u32 = 2;
|
||||||
|
|
||||||
pub fn run_freestanding(global: GlobalArgs) {
|
pub fn run_freestanding(global: GlobalArgs) {
|
||||||
|
|
|
||||||
|
|
@ -342,11 +342,11 @@ impl GuiElement for Label {
|
||||||
|
|
||||||
#[derive(Copy, Clone, Eq, PartialEq, Default)]
|
#[derive(Copy, Clone, Eq, PartialEq, Default)]
|
||||||
pub enum Align {
|
pub enum Align {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Left,
|
Left,
|
||||||
#[default]
|
#[default]
|
||||||
Center,
|
Center,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Right,
|
Right,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -354,7 +354,6 @@ pub enum Align {
|
||||||
pub enum Orientation {
|
pub enum Orientation {
|
||||||
#[default]
|
#[default]
|
||||||
Horizontal,
|
Horizontal,
|
||||||
#[allow(dead_code)]
|
|
||||||
Vertical,
|
Vertical,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@ impl RectOverflow {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Rect {
|
impl Rect {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn new_empty(x: i32, y: i32) -> Self {
|
pub fn new_empty(x: i32, y: i32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
raw: RectRaw {
|
raw: RectRaw {
|
||||||
|
|
@ -72,7 +71,7 @@ impl Rect {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
fn new_unchecked(x1: i32, y1: i32, x2: i32, y2: i32) -> Self {
|
fn new_unchecked(x1: i32, y1: i32, x2: i32, y2: i32) -> Self {
|
||||||
Self {
|
Self {
|
||||||
raw: RectRaw { x1, y1, x2, y2 },
|
raw: RectRaw { x1, y1, x2, y2 },
|
||||||
|
|
@ -139,7 +138,7 @@ impl Rect {
|
||||||
dx * dx + dy * dy
|
dx * dx + dy * dy
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn contains_rect(&self, rect: &Self) -> bool {
|
pub fn contains_rect(&self, rect: &Self) -> bool {
|
||||||
self.raw.x1 <= rect.raw.x1
|
self.raw.x1 <= rect.raw.x1
|
||||||
&& self.raw.y1 <= rect.raw.x1
|
&& self.raw.y1 <= rect.raw.x1
|
||||||
|
|
@ -160,7 +159,7 @@ impl Rect {
|
||||||
self.raw.x1 == self.raw.x2 || self.raw.y1 == self.raw.y2
|
self.raw.x1 == self.raw.x2 || self.raw.y1 == self.raw.y2
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn to_origin(&self) -> Self {
|
pub fn to_origin(&self) -> Self {
|
||||||
Self {
|
Self {
|
||||||
raw: RectRaw {
|
raw: RectRaw {
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ impl Region {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn extents(&self) -> Rect {
|
pub fn extents(&self) -> Rect {
|
||||||
self.extents
|
self.extents
|
||||||
}
|
}
|
||||||
|
|
@ -148,7 +148,7 @@ impl RegionBuilder {
|
||||||
self.base.clone()
|
self.base.clone()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn clear(&mut self) {
|
pub fn clear(&mut self) {
|
||||||
self.pending.clear();
|
self.pending.clear();
|
||||||
self.base = Region::empty();
|
self.base = Region::empty();
|
||||||
|
|
|
||||||
|
|
@ -1112,7 +1112,6 @@ impl State {
|
||||||
self.eng.now().usec()
|
self.eng.now().usec()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn now_msec(&self) -> u64 {
|
pub fn now_msec(&self) -> u64 {
|
||||||
self.eng.now().msec()
|
self.eng.now().msec()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,6 @@ impl DrvDevHandler {
|
||||||
}
|
}
|
||||||
self.log_gfx_api();
|
self.log_gfx_api();
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
#[allow(clippy::never_loop)]
|
|
||||||
while let Some(event) = self.data.dev.event() {
|
while let Some(event) = self.data.dev.event() {
|
||||||
match event {
|
match event {
|
||||||
DrmEvent::Removed => break 'outer,
|
DrmEvent::Removed => break 'outer,
|
||||||
|
|
|
||||||
11
src/theme.rs
11
src/theme.rs
|
|
@ -47,7 +47,6 @@ fn to_f32(c: u8) -> f32 {
|
||||||
c as f32 / 255f32
|
c as f32 / 255f32
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn to_u8(c: f32) -> u8 {
|
fn to_u8(c: f32) -> u8 {
|
||||||
(c * 255f32).round() as u8
|
(c * 255f32).round() as u8
|
||||||
}
|
}
|
||||||
|
|
@ -80,7 +79,7 @@ impl Color {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Self {
|
pub fn from_rgba_premultiplied(r: u8, g: u8, b: u8, a: u8) -> Self {
|
||||||
Self {
|
Self {
|
||||||
r: to_f32(r),
|
r: to_f32(r),
|
||||||
|
|
@ -112,7 +111,7 @@ impl Color {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn to_rgba_premultiplied(self) -> [u8; 4] {
|
pub fn to_rgba_premultiplied(self) -> [u8; 4] {
|
||||||
[to_u8(self.r), to_u8(self.g), to_u8(self.b), to_u8(self.a)]
|
[to_u8(self.r), to_u8(self.g), to_u8(self.b), to_u8(self.a)]
|
||||||
}
|
}
|
||||||
|
|
@ -121,7 +120,7 @@ impl Color {
|
||||||
[self.r, self.g, self.b, self.a]
|
[self.r, self.g, self.b, self.a]
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn to_array_linear(self) -> [f32; 4] {
|
pub fn to_array_linear(self) -> [f32; 4] {
|
||||||
fn to_linear(srgb: f32) -> f32 {
|
fn to_linear(srgb: f32) -> f32 {
|
||||||
if srgb <= 0.04045 {
|
if srgb <= 0.04045 {
|
||||||
|
|
@ -138,7 +137,7 @@ impl Color {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
pub fn and_then(self, other: &Color) -> Color {
|
pub fn and_then(self, other: &Color) -> Color {
|
||||||
Color {
|
Color {
|
||||||
r: self.r * (1.0 - other.a) + other.r,
|
r: self.r * (1.0 - other.a) + other.r,
|
||||||
|
|
@ -218,7 +217,7 @@ macro_rules! sizes {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Copy, Clone, Debug)]
|
#[derive(Copy, Clone, Debug)]
|
||||||
#[allow(non_camel_case_types)]
|
#[expect(non_camel_case_types)]
|
||||||
pub enum ThemeSized {
|
pub enum ThemeSized {
|
||||||
$(
|
$(
|
||||||
$name,
|
$name,
|
||||||
|
|
|
||||||
|
|
@ -373,7 +373,7 @@ pub trait Handle: RequestParser<'static> {
|
||||||
R: 'static,
|
R: 'static,
|
||||||
H: for<'a> Fn(&R, Self::Generic<'a>) + 'static;
|
H: for<'a> Fn(&R, Self::Generic<'a>) + 'static;
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
fn handle2<R, F, H>(tl: &Rc<ToolClient>, id: impl Into<ObjectId>, r: R, h: H)
|
fn handle2<R, F, H>(tl: &Rc<ToolClient>, id: impl Into<ObjectId>, r: R, h: H)
|
||||||
where
|
where
|
||||||
R: 'static,
|
R: 'static,
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ impl NodeIds {
|
||||||
pub struct NodeId(pub u32);
|
pub struct NodeId(pub u32);
|
||||||
|
|
||||||
impl NodeId {
|
impl NodeId {
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn raw(&self) -> u32 {
|
pub fn raw(&self) -> u32 {
|
||||||
self.0
|
self.0
|
||||||
}
|
}
|
||||||
|
|
@ -508,7 +508,7 @@ pub trait Node: 'static {
|
||||||
|
|
||||||
// TYPE CONVERTERS
|
// TYPE CONVERTERS
|
||||||
|
|
||||||
#[cfg_attr(not(feature = "it"), allow(dead_code))]
|
#[cfg_attr(not(feature = "it"), expect(dead_code))]
|
||||||
fn node_into_float(self: Rc<Self>) -> Option<Rc<FloatNode>> {
|
fn node_into_float(self: Rc<Self>) -> Option<Rc<FloatNode>> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,6 @@ use {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
pub enum ContainerSplit {
|
pub enum ContainerSplit {
|
||||||
Horizontal,
|
Horizontal,
|
||||||
|
|
@ -69,7 +68,7 @@ impl Into<Axis> for ContainerSplit {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
|
||||||
pub enum ContainerFocus {
|
pub enum ContainerFocus {
|
||||||
None,
|
None,
|
||||||
|
|
|
||||||
10
src/udev.rs
10
src/udev.rs
|
|
@ -45,7 +45,7 @@ extern "C" {
|
||||||
|
|
||||||
fn udev_list_entry_get_next(list_entry: *mut udev_list_entry) -> *mut udev_list_entry;
|
fn udev_list_entry_get_next(list_entry: *mut udev_list_entry) -> *mut udev_list_entry;
|
||||||
fn udev_list_entry_get_name(list_entry: *mut udev_list_entry) -> *const c::c_char;
|
fn udev_list_entry_get_name(list_entry: *mut udev_list_entry) -> *const c::c_char;
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
fn udev_list_entry_get_value(list_entry: *mut udev_list_entry) -> *const c::c_char;
|
fn udev_list_entry_get_value(list_entry: *mut udev_list_entry) -> *const c::c_char;
|
||||||
|
|
||||||
fn udev_device_new_from_syspath(udev: *mut udev, syspath: *const c::c_char)
|
fn udev_device_new_from_syspath(udev: *mut udev, syspath: *const c::c_char)
|
||||||
|
|
@ -56,7 +56,7 @@ extern "C" {
|
||||||
fn udev_device_get_is_initialized(udev_device: *mut udev_device) -> c::c_int;
|
fn udev_device_get_is_initialized(udev_device: *mut udev_device) -> c::c_int;
|
||||||
fn udev_device_get_devnode(udev_device: *mut udev_device) -> *const c::c_char;
|
fn udev_device_get_devnode(udev_device: *mut udev_device) -> *const c::c_char;
|
||||||
fn udev_device_get_syspath(udev_device: *mut udev_device) -> *const c::c_char;
|
fn udev_device_get_syspath(udev_device: *mut udev_device) -> *const c::c_char;
|
||||||
fn udev_device_get_devtype(udev_device: *mut udev_device) -> *const c::c_char;
|
// fn udev_device_get_devtype(udev_device: *mut udev_device) -> *const c::c_char;
|
||||||
fn udev_device_get_devnum(udev_device: *mut udev_device) -> c::dev_t;
|
fn udev_device_get_devnum(udev_device: *mut udev_device) -> c::dev_t;
|
||||||
fn udev_device_get_action(udev_device: *mut udev_device) -> *const c::c_char;
|
fn udev_device_get_action(udev_device: *mut udev_device) -> *const c::c_char;
|
||||||
fn udev_device_get_subsystem(udev_device: *mut udev_device) -> *const c::c_char;
|
fn udev_device_get_subsystem(udev_device: *mut udev_device) -> *const c::c_char;
|
||||||
|
|
@ -124,7 +124,7 @@ pub struct UdevDevice {
|
||||||
|
|
||||||
pub enum UdevDeviceType {
|
pub enum UdevDeviceType {
|
||||||
Character,
|
Character,
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
Block,
|
Block,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -332,7 +332,6 @@ impl<'a> UdevListEntry<'a> {
|
||||||
|
|
||||||
macro_rules! strfn {
|
macro_rules! strfn {
|
||||||
($f:ident, $raw:ident) => {
|
($f:ident, $raw:ident) => {
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn $f(&self) -> Option<&CStr> {
|
pub fn $f(&self) -> Option<&CStr> {
|
||||||
let res = unsafe { $raw(self.device) };
|
let res = unsafe { $raw(self.device) };
|
||||||
if res.is_null() {
|
if res.is_null() {
|
||||||
|
|
@ -348,7 +347,7 @@ impl UdevDevice {
|
||||||
strfn!(sysname, udev_device_get_sysname);
|
strfn!(sysname, udev_device_get_sysname);
|
||||||
strfn!(syspath, udev_device_get_syspath);
|
strfn!(syspath, udev_device_get_syspath);
|
||||||
strfn!(devnode, udev_device_get_devnode);
|
strfn!(devnode, udev_device_get_devnode);
|
||||||
strfn!(devtype, udev_device_get_devtype);
|
// strfn!(devtype, udev_device_get_devtype);
|
||||||
strfn!(action, udev_device_get_action);
|
strfn!(action, udev_device_get_action);
|
||||||
strfn!(subsystem, udev_device_get_subsystem);
|
strfn!(subsystem, udev_device_get_subsystem);
|
||||||
|
|
||||||
|
|
@ -370,7 +369,6 @@ impl UdevDevice {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
pub fn is_initialized(&self) -> bool {
|
pub fn is_initialized(&self) -> bool {
|
||||||
unsafe { udev_device_get_is_initialized(self.device) != 0 }
|
unsafe { udev_device_get_is_initialized(self.device) != 0 }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -259,7 +259,6 @@ impl From<UdmabufError> for AllocatorError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(non_camel_case_types)]
|
|
||||||
#[repr(C)]
|
#[repr(C)]
|
||||||
struct udmabuf_create {
|
struct udmabuf_create {
|
||||||
memfd: u32,
|
memfd: u32,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ impl<'a> EiMsgFormatter<'a> {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[expect(dead_code)]
|
||||||
pub fn long(&mut self, int: i64) -> &mut Self {
|
pub fn long(&mut self, int: i64) -> &mut Self {
|
||||||
self.write(uapi::as_bytes(&int));
|
self.write(uapi::as_bytes(&int));
|
||||||
self
|
self
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue