Bus::add_signal_watch_full() should take a Priority, not u32 for the priority

This commit is contained in:
Sebastian Dröge 2017-12-18 09:38:40 +02:00
parent 49627b8de7
commit 9a7ede1dcc
3 changed files with 11 additions and 6 deletions

View file

@ -118,6 +118,11 @@ trait = false
# Needs manual bindings and GSource support in glib-rs
ignore = true
[[object.function]]
name = "add_signal_watch_full"
# Priority
ignore = true
[[object.function]]
name = "timed_pop_filtered"
# Uses enum as flags

View file

@ -37,12 +37,6 @@ impl Bus {
}
}
pub fn add_signal_watch_full(&self, priority: i32) {
unsafe {
ffi::gst_bus_add_signal_watch_full(self.to_glib_none().0, priority);
}
}
//pub fn add_watch<P: Into<Option</*Unimplemented*/Fundamental: Pointer>>>(&self, func: /*Unknown conversion*//*Unimplemented*/BusFunc, user_data: P) -> u32 {
// unsafe { TODO: call ffi::gst_bus_add_watch() }
//}

View file

@ -70,6 +70,12 @@ fn into_raw_sync<F: Fn(&Bus, &Message) -> BusSyncReply + Send + Sync + 'static>(
}
impl Bus {
pub fn add_signal_watch_full(&self, priority: Priority) {
unsafe {
ffi::gst_bus_add_signal_watch_full(self.to_glib_none().0, priority.to_glib());
}
}
pub fn create_watch<'a, N: Into<Option<&'a str>>, F>(
&self,
name: N,