diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:23:22 +0900 |
---|---|---|
committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2024-02-25 10:23:22 +0900 |
commit | 7d369155dc3897236afe101261605941b426a261 (patch) | |
tree | 2a621019ebc1785ed5fd41f4ed92f1132c604865 | |
parent | 262179348749f1fd6a30e016e04f1c277eb4daf3 (diff) | |
download | hinoko-rs-7d369155dc3897236afe101261605941b426a261.tar.gz |
hinoko: regenerate API crate
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
-rw-r--r-- | README.rst | 4 | ||||
-rw-r--r-- | hinoko/Cargo.toml | 4 | ||||
-rw-r--r-- | hinoko/src/auto/enums.rs | 85 | ||||
-rw-r--r-- | hinoko/src/auto/flags.rs | 7 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_ctx.rs | 20 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_ir_multiple.rs | 14 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_ir_single.rs | 13 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_it.rs | 11 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_resource.rs | 24 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_resource_auto.rs | 18 | ||||
-rw-r--r-- | hinoko/src/auto/fw_iso_resource_once.rs | 11 | ||||
-rw-r--r-- | hinoko/src/auto/mod.rs | 3 | ||||
-rw-r--r-- | hinoko/src/auto/versions.txt | 4 | ||||
-rw-r--r-- | hinoko/src/fw_iso_ctx.rs | 2 | ||||
-rw-r--r-- | hinoko/src/fw_iso_ir_multiple.rs | 2 | ||||
-rw-r--r-- | hinoko/src/fw_iso_it.rs | 2 | ||||
-rw-r--r-- | hinoko/src/lib.rs | 5 | ||||
-rw-r--r-- | hinoko/src/subclass.rs | 5 | ||||
-rw-r--r-- | hinoko/src/subclass/fw_iso_ctx.rs | 2 | ||||
-rw-r--r-- | hinoko/src/subclass/fw_iso_resource.rs | 2 |
20 files changed, 46 insertions, 192 deletions
@@ -49,8 +49,8 @@ Dependencies * ``libc`` >= 0.2 * ``bitflags`` >= 1.0 - * ``glib`` >= 0.l8 - * ``hinawa`` >= 0.10 + * ``glib`` >= 0.l9 + * ``hinawa`` >= 0.11 * FFI crate (``hinoko-sys``) Examples diff --git a/hinoko/Cargo.toml b/hinoko/Cargo.toml index d1d581f..fd1281b 100644 --- a/hinoko/Cargo.toml +++ b/hinoko/Cargo.toml @@ -22,8 +22,8 @@ name = "hinoko" [dependencies] libc = "0.2" bitflags = "1.0" -glib = "0.18" -hinawa = "0.10" +glib = "0.19" +hinawa = "0.11" ffi = {package = "hinoko-sys", version = "0.5.0"} [dev-dependencies] diff --git a/hinoko/src/auto/enums.rs b/hinoko/src/auto/enums.rs index ff04120..defe287 100644 --- a/hinoko/src/auto/enums.rs +++ b/hinoko/src/auto/enums.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{prelude::*, translate::*}; -use std::fmt; /// A set of error code for operations in [`FwIsoCtx`][crate::FwIsoCtx]. #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Clone, Copy)] @@ -36,25 +35,6 @@ pub enum FwIsoCtxError { __Unknown(i32), } -impl fmt::Display for FwIsoCtxError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FwIsoCtxError::{}", - match *self { - Self::Failed => "Failed", - Self::Allocated => "Allocated", - Self::NotAllocated => "NotAllocated", - Self::Mapped => "Mapped", - Self::NotMapped => "NotMapped", - Self::ChunkUnregistered => "ChunkUnregistered", - Self::NoIsocChannel => "NoIsocChannel", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FwIsoCtxError { type GlibType = ffi::HinokoFwIsoCtxError; @@ -184,21 +164,6 @@ pub enum FwIsoCtxMode { __Unknown(i32), } -impl fmt::Display for FwIsoCtxMode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FwIsoCtxMode::{}", - match *self { - Self::It => "It", - Self::IrSingle => "IrSingle", - Self::IrMultiple => "IrMultiple", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FwIsoCtxMode { type GlibType = ffi::HinokoFwIsoCtxMode; @@ -299,21 +264,6 @@ pub enum FwIsoResourceAutoError { __Unknown(i32), } -impl fmt::Display for FwIsoResourceAutoError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FwIsoResourceAutoError::{}", - match *self { - Self::Failed => "Failed", - Self::Allocated => "Allocated", - Self::NotAllocated => "NotAllocated", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FwIsoResourceAutoError { type GlibType = ffi::HinokoFwIsoResourceAutoError; @@ -441,23 +391,6 @@ pub enum FwIsoResourceError { __Unknown(i32), } -impl fmt::Display for FwIsoResourceError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FwIsoResourceError::{}", - match *self { - Self::Failed => "Failed", - Self::Opened => "Opened", - Self::NotOpened => "NotOpened", - Self::Timeout => "Timeout", - Self::Event => "Event", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FwIsoResourceError { type GlibType = ffi::HinokoFwIsoResourceError; @@ -592,24 +525,6 @@ pub enum FwScode { __Unknown(i32), } -impl fmt::Display for FwScode { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!( - f, - "FwScode::{}", - match *self { - Self::S100 => "S100", - Self::S200 => "S200", - Self::S400 => "S400", - Self::S800 => "S800", - Self::S1600 => "S1600", - Self::S3200 => "S3200", - _ => "Unknown", - } - ) - } -} - #[doc(hidden)] impl IntoGlib for FwScode { type GlibType = ffi::HinokoFwScode; diff --git a/hinoko/src/auto/flags.rs b/hinoko/src/auto/flags.rs index 0545dcf..92c312a 100644 --- a/hinoko/src/auto/flags.rs +++ b/hinoko/src/auto/flags.rs @@ -4,7 +4,6 @@ // DO NOT EDIT use glib::{bitflags::bitflags, prelude::*, translate::*}; -use std::fmt; bitflags! { /// A set of tag field of isochronous packet on IEEE 1394 bus. @@ -26,12 +25,6 @@ bitflags! { } } -impl fmt::Display for FwIsoCtxMatchFlag { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - <Self as fmt::Debug>::fmt(self, f) - } -} - #[doc(hidden)] impl IntoGlib for FwIsoCtxMatchFlag { type GlibType = ffi::HinokoFwIsoCtxMatchFlag; diff --git a/hinoko/src/auto/fw_iso_ctx.rs b/hinoko/src/auto/fw_iso_ctx.rs index ddc7c01..c45b28e 100644 --- a/hinoko/src/auto/fw_iso_ctx.rs +++ b/hinoko/src/auto/fw_iso_ctx.rs @@ -8,7 +8,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { /// A set of basic interfaces to operate isochronous context on 1394 OHCI hardware. @@ -76,8 +76,8 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_ctx_create_source")] fn create_source(&self) -> Result<glib::Source, glib::Error> { unsafe { - let mut source = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut source = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ctx_create_source( self.as_ref().to_glib_none().0, &mut source, @@ -102,7 +102,7 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_ctx_flush_completions")] fn flush_completions(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ctx_flush_completions( self.as_ref().to_glib_none().0, &mut error, @@ -181,7 +181,7 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"stopped\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( stopped_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -211,7 +211,7 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::bytes-per-chunk\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bytes_per_chunk_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -237,7 +237,7 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::chunks-per-buffer\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_chunks_per_buffer_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -247,9 +247,3 @@ pub trait FwIsoCtxExt: IsA<FwIsoCtx> + sealed::Sealed + 'static { } impl<O: IsA<FwIsoCtx>> FwIsoCtxExt for O {} - -impl fmt::Display for FwIsoCtx { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoCtx") - } -} diff --git a/hinoko/src/auto/fw_iso_ir_multiple.rs b/hinoko/src/auto/fw_iso_ir_multiple.rs index 476e732..2d30baa 100644 --- a/hinoko/src/auto/fw_iso_ir_multiple.rs +++ b/hinoko/src/auto/fw_iso_ir_multiple.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { /// An object to receive isochronous packet for several channels. @@ -117,7 +117,7 @@ pub trait FwIsoIrMultipleExt: IsA<FwIsoIrMultiple> + sealed::Sealed + 'static { fn allocate(&self, path: &str, channels: &[u8]) -> Result<(), glib::Error> { let channels_length = channels.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ir_multiple_allocate( self.as_ref().to_glib_none().0, path.to_glib_none().0, @@ -143,7 +143,7 @@ pub trait FwIsoIrMultipleExt: IsA<FwIsoIrMultiple> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_ir_multiple_map_buffer")] fn map_buffer(&self, bytes_per_chunk: u32, chunks_per_buffer: u32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ir_multiple_map_buffer( self.as_ref().to_glib_none().0, bytes_per_chunk, @@ -191,7 +191,7 @@ pub trait FwIsoIrMultipleExt: IsA<FwIsoIrMultiple> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"interrupted\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( interrupted_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -201,9 +201,3 @@ pub trait FwIsoIrMultipleExt: IsA<FwIsoIrMultiple> + sealed::Sealed + 'static { } impl<O: IsA<FwIsoIrMultiple>> FwIsoIrMultipleExt for O {} - -impl fmt::Display for FwIsoIrMultiple { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoIrMultiple") - } -} diff --git a/hinoko/src/auto/fw_iso_ir_single.rs b/hinoko/src/auto/fw_iso_ir_single.rs index 495ec64..a32ae11 100644 --- a/hinoko/src/auto/fw_iso_ir_single.rs +++ b/hinoko/src/auto/fw_iso_ir_single.rs @@ -5,7 +5,6 @@ use crate::FwIsoCtx; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { /// An object to receive isochronous packet for single channel. @@ -104,7 +103,7 @@ pub trait FwIsoIrSingleExt: IsA<FwIsoIrSingle> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_ir_single_allocate")] fn allocate(&self, path: &str, channel: u32, header_size: u32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ir_single_allocate( self.as_ref().to_glib_none().0, path.to_glib_none().0, @@ -137,7 +136,7 @@ pub trait FwIsoIrSingleExt: IsA<FwIsoIrSingle> + sealed::Sealed + 'static { payloads_per_buffer: u32, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ir_single_map_buffer( self.as_ref().to_glib_none().0, maximum_bytes_per_payload, @@ -165,7 +164,7 @@ pub trait FwIsoIrSingleExt: IsA<FwIsoIrSingle> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_ir_single_register_packet")] fn register_packet(&self, schedule_interrupt: bool) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_ir_single_register_packet( self.as_ref().to_glib_none().0, schedule_interrupt.into_glib(), @@ -182,9 +181,3 @@ pub trait FwIsoIrSingleExt: IsA<FwIsoIrSingle> + sealed::Sealed + 'static { } impl<O: IsA<FwIsoIrSingle>> FwIsoIrSingleExt for O {} - -impl fmt::Display for FwIsoIrSingle { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoIrSingle") - } -} diff --git a/hinoko/src/auto/fw_iso_it.rs b/hinoko/src/auto/fw_iso_it.rs index a59f6cb..c86da0e 100644 --- a/hinoko/src/auto/fw_iso_it.rs +++ b/hinoko/src/auto/fw_iso_it.rs @@ -5,7 +5,6 @@ use crate::{FwIsoCtx, FwScode}; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { /// An object to transmit isochronous packet for single channel. @@ -103,7 +102,7 @@ pub trait FwIsoItExt: IsA<FwIsoIt> + sealed::Sealed + 'static { header_size: u32, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_it_allocate( self.as_ref().to_glib_none().0, path.to_glib_none().0, @@ -137,7 +136,7 @@ pub trait FwIsoItExt: IsA<FwIsoIt> + sealed::Sealed + 'static { payloads_per_buffer: u32, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_it_map_buffer( self.as_ref().to_glib_none().0, maximum_bytes_per_payload, @@ -155,9 +154,3 @@ pub trait FwIsoItExt: IsA<FwIsoIt> + sealed::Sealed + 'static { } impl<O: IsA<FwIsoIt>> FwIsoItExt for O {} - -impl fmt::Display for FwIsoIt { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoIt") - } -} diff --git a/hinoko/src/auto/fw_iso_resource.rs b/hinoko/src/auto/fw_iso_resource.rs index 4d33ffb..62f2778 100644 --- a/hinoko/src/auto/fw_iso_resource.rs +++ b/hinoko/src/auto/fw_iso_resource.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { /// A set of basic interfaces to listen to events about isochronous resource. @@ -96,7 +96,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { fn allocate(&self, channel_candidates: &[u8], bandwidth: u32) -> Result<(), glib::Error> { let channel_candidates_count = channel_candidates.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_allocate( self.as_ref().to_glib_none().0, channel_candidates.to_glib_none().0, @@ -135,7 +135,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { ) -> Result<(), glib::Error> { let channel_candidates_count = channel_candidates.len() as _; unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_allocate_wait( self.as_ref().to_glib_none().0, channel_candidates.to_glib_none().0, @@ -165,8 +165,8 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_resource_create_source")] fn create_source(&self) -> Result<glib::Source, glib::Error> { unsafe { - let mut source = ptr::null_mut(); - let mut error = ptr::null_mut(); + let mut source = std::ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_create_source( self.as_ref().to_glib_none().0, &mut source, @@ -195,7 +195,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { #[doc(alias = "hinoko_fw_iso_resource_open")] fn open(&self, path: &str, open_flag: i32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_open( self.as_ref().to_glib_none().0, path.to_glib_none().0, @@ -253,7 +253,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"allocated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( allocated_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -303,7 +303,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"deallocated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( deallocated_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -333,7 +333,7 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { connect_raw( self.as_ptr() as *mut _, b"notify::generation\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_generation_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -343,9 +343,3 @@ pub trait FwIsoResourceExt: IsA<FwIsoResource> + sealed::Sealed + 'static { } impl<O: IsA<FwIsoResource>> FwIsoResourceExt for O {} - -impl fmt::Display for FwIsoResource { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoResource") - } -} diff --git a/hinoko/src/auto/fw_iso_resource_auto.rs b/hinoko/src/auto/fw_iso_resource_auto.rs index e8a227b..6ca8d5e 100644 --- a/hinoko/src/auto/fw_iso_resource_auto.rs +++ b/hinoko/src/auto/fw_iso_resource_auto.rs @@ -9,7 +9,7 @@ use glib::{ signal::{connect_raw, SignalHandlerId}, translate::*, }; -use std::{boxed::Box as Box_, fmt, mem::transmute, ptr}; +use std::boxed::Box as Box_; glib::wrapper! { /// An object to maintain allocated isochronous resource. @@ -95,7 +95,7 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate")] fn deallocate(&self) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate( self.as_ref().to_glib_none().0, &mut error, @@ -120,7 +120,7 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati #[doc(alias = "hinoko_fw_iso_resource_auto_deallocate_wait")] fn deallocate_wait(&self, timeout_ms: u32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_auto_deallocate_wait( self.as_ref().to_glib_none().0, timeout_ms, @@ -169,7 +169,7 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::bandwidth\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_bandwidth_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -195,7 +195,7 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::channel\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_channel_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -221,7 +221,7 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati connect_raw( self.as_ptr() as *mut _, b"notify::is-allocated\0".as_ptr() as *const _, - Some(transmute::<_, unsafe extern "C" fn()>( + Some(std::mem::transmute::<_, unsafe extern "C" fn()>( notify_is_allocated_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), @@ -231,9 +231,3 @@ pub trait FwIsoResourceAutoExt: IsA<FwIsoResourceAuto> + sealed::Sealed + 'stati } impl<O: IsA<FwIsoResourceAuto>> FwIsoResourceAutoExt for O {} - -impl fmt::Display for FwIsoResourceAuto { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoResourceAuto") - } -} diff --git a/hinoko/src/auto/fw_iso_resource_once.rs b/hinoko/src/auto/fw_iso_resource_once.rs index 5d2095d..b30c52f 100644 --- a/hinoko/src/auto/fw_iso_resource_once.rs +++ b/hinoko/src/auto/fw_iso_resource_once.rs @@ -5,7 +5,6 @@ use crate::FwIsoResource; use glib::{prelude::*, translate::*}; -use std::{fmt, ptr}; glib::wrapper! { /// An object to initiate requests and listen events of isochronous resource allocation/deallocation @@ -71,7 +70,7 @@ pub trait FwIsoResourceOnceExt: IsA<FwIsoResourceOnce> + sealed::Sealed + 'stati #[doc(alias = "hinoko_fw_iso_resource_once_deallocate")] fn deallocate(&self, channel: u32, bandwidth: u32) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate( self.as_ref().to_glib_none().0, channel, @@ -107,7 +106,7 @@ pub trait FwIsoResourceOnceExt: IsA<FwIsoResourceOnce> + sealed::Sealed + 'stati timeout_ms: u32, ) -> Result<(), glib::Error> { unsafe { - let mut error = ptr::null_mut(); + let mut error = std::ptr::null_mut(); let is_ok = ffi::hinoko_fw_iso_resource_once_deallocate_wait( self.as_ref().to_glib_none().0, channel, @@ -126,9 +125,3 @@ pub trait FwIsoResourceOnceExt: IsA<FwIsoResourceOnce> + sealed::Sealed + 'stati } impl<O: IsA<FwIsoResourceOnce>> FwIsoResourceOnceExt for O {} - -impl fmt::Display for FwIsoResourceOnce { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.write_str("FwIsoResourceOnce") - } -} diff --git a/hinoko/src/auto/mod.rs b/hinoko/src/auto/mod.rs index 451a639..91c0785 100644 --- a/hinoko/src/auto/mod.rs +++ b/hinoko/src/auto/mod.rs @@ -34,8 +34,7 @@ pub use self::enums::FwScode; mod flags; pub use self::flags::FwIsoCtxMatchFlag; -#[doc(hidden)] -pub mod traits { +pub(crate) mod traits { pub use super::fw_iso_ctx::FwIsoCtxExt; pub use super::fw_iso_ir_multiple::FwIsoIrMultipleExt; pub use super::fw_iso_ir_single::FwIsoIrSingleExt; diff --git a/hinoko/src/auto/versions.txt b/hinoko/src/auto/versions.txt index 369e893..bec788b 100644 --- a/hinoko/src/auto/versions.txt +++ b/hinoko/src/auto/versions.txt @@ -1,3 +1,3 @@ -Generated by gir (https://github.com/gtk-rs/gir @ 23d7c100187c) +Generated by gir (https://github.com/gtk-rs/gir @ 0e476ab5c1de) from -from gir-files (https://github.com/gtk-rs/gir-files @ 6415239ef435) +from gir-files (https://github.com/gtk-rs/gir-files @ cfc0305f903b) diff --git a/hinoko/src/fw_iso_ctx.rs b/hinoko/src/fw_iso_ctx.rs index abbb06c..d217263 100644 --- a/hinoko/src/fw_iso_ctx.rs +++ b/hinoko/src/fw_iso_ctx.rs @@ -13,7 +13,7 @@ pub trait FwIsoCtxExtManual { /// The numeric ID of clock source for the reference timestamp. One CLOCK_REALTIME(0), /// CLOCK_MONOTONIC(1), and CLOCK_MONOTONIC_RAW(4) is available in UAPI of Linux kernel. /// ## `cycle_time` - /// A [`hinawa::CycleTime`][hinawa::CycleTime] to store data of cycle time. + /// A [`hinawa::CycleTime`][crate::hinawa::CycleTime] to store data of cycle time. /// /// # Returns /// diff --git a/hinoko/src/fw_iso_ir_multiple.rs b/hinoko/src/fw_iso_ir_multiple.rs index dabf02f..90e5ba9 100644 --- a/hinoko/src/fw_iso_ir_multiple.rs +++ b/hinoko/src/fw_iso_ir_multiple.rs @@ -27,7 +27,7 @@ pub trait FwIsoIrMultipleExtManual { /// ## `chunks_per_irq` /// The number of chunks per interval of interrupt. When 0 is given, application /// should call [`FwIsoCtxExt::flush_completions()`][crate::prelude::FwIsoCtxExt::flush_completions()] voluntarily to generate - /// `signal::FwIsoIrMultiple::interrupted` event. + /// [`interrupted`][struct@crate::FwIsoIrMultiple#interrupted] event. #[doc(alias = "hinoko_fw_iso_ir_multiple_start")] fn start( &self, diff --git a/hinoko/src/fw_iso_it.rs b/hinoko/src/fw_iso_it.rs index 1d27bb7..ea6af36 100644 --- a/hinoko/src/fw_iso_it.rs +++ b/hinoko/src/fw_iso_it.rs @@ -10,7 +10,7 @@ pub trait FwIsoItExtManual { /// Register packet data with header and payload for IT context. The content of given header and /// payload is appended into data field of isochronous packet to be sent. The caller can schedule /// hardware interrupt to generate interrupt event. In detail, please refer to documentation about - /// `signal::FwIsoIt::interrupted`. + /// [`interrupted`][struct@crate::FwIsoIt#interrupted]. /// ## `tags` /// The value of tag field for isochronous packet to register. /// ## `sync_code` diff --git a/hinoko/src/lib.rs b/hinoko/src/lib.rs index 884c432..4276623 100644 --- a/hinoko/src/lib.rs +++ b/hinoko/src/lib.rs @@ -8,7 +8,6 @@ mod fw_iso_ir_multiple; mod fw_iso_ir_single; mod fw_iso_it; -// For convenience to provide structures and functions. pub use crate::auto::*; /// For convenience to provide auto-generated/manual traits, and their blanket implementations. @@ -21,13 +20,11 @@ pub mod prelude { /// For subclass implementations derived from provided class. pub mod subclass; -// To access to hinoko-sys crate for FFI. pub use ffi; -// For links in documentation. pub(crate) use glib; -use glib::{signal::*, translate::*, Cast, Error, IsA, SignalHandlerId, StaticType, Value}; +use glib::{object::*, signal::*, translate::*, Error, Value, types::StaticType}; use libc::c_uint; diff --git a/hinoko/src/subclass.rs b/hinoko/src/subclass.rs index 7f5a329..e94c916 100644 --- a/hinoko/src/subclass.rs +++ b/hinoko/src/subclass.rs @@ -1,18 +1,13 @@ // SPDX-License-Identifier: MIT -// For subclass of [`FwIsoCit`][crate::FwIsoCit] . mod fw_iso_ctx; -// For subclass of [`FwIsoResource`][crate::FwIsoResource] . mod fw_iso_resource; -// For subclass of [`FwIsoIrMultiple`][crate::FwIsoIrMultiple] . mod fw_iso_ir_multiple; -// For subclass of [`FwIsoIrSingle`][crate::FwIsoIrSingle] . mod fw_iso_ir_single; -// For subclass of [`FwIsoIt`][crate::FwIsoIt] . mod fw_iso_it; /// For convenience to provide traits and their blanket implementations to write subclass. diff --git a/hinoko/src/subclass/fw_iso_ctx.rs b/hinoko/src/subclass/fw_iso_ctx.rs index e09a203..ee4ab32 100644 --- a/hinoko/src/subclass/fw_iso_ctx.rs +++ b/hinoko/src/subclass/fw_iso_ctx.rs @@ -283,7 +283,7 @@ unsafe extern "C" fn fw_iso_ctx_stopped<T: FwIsoCtxImpl>( #[cfg(test)] mod test { use crate::{prelude::*, subclass::prelude::*, *}; - use glib::{subclass::prelude::*, Error, ObjectExt, Properties, Source}; + use glib::{subclass::prelude::*, Error, Properties, Source}; const BYTES_PER_CHUNK: u32 = 512; const CHUNKS_PER_BUFFER: u32 = 16; diff --git a/hinoko/src/subclass/fw_iso_resource.rs b/hinoko/src/subclass/fw_iso_resource.rs index f82da32..1ecbd5d 100644 --- a/hinoko/src/subclass/fw_iso_resource.rs +++ b/hinoko/src/subclass/fw_iso_resource.rs @@ -300,7 +300,7 @@ unsafe extern "C" fn fw_iso_resource_deallocated<T: FwIsoResourceImpl>( #[cfg(test)] mod test { use crate::{prelude::*, subclass::prelude::*, *}; - use glib::{subclass::prelude::*, Error, ObjectExt, Properties, Source}; + use glib::{subclass::prelude::*, Error, Properties, Source}; const GENERATION: u32 = 1111; |