The message signal of Bus only has to require Send for the closure

This commit is contained in:
Sebastian Dröge 2017-08-04 23:04:42 +03:00
parent be6f03a1af
commit 88f4fe5ea3
33 changed files with 39 additions and 35 deletions

View file

@ -122,6 +122,10 @@ trait = false
# More convenient manual implementation # More convenient manual implementation
ignore = true ignore = true
[[object.signal]]
name = "message"
concurrency = "send"
[[object]] [[object]]
name = "Gst.Caps" name = "Gst.Caps"
status = "manual" status = "manual"

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use AppStreamType; use AppStreamType;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
mod app_sink; mod app_sink;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
#[allow(unused_imports)] #[allow(unused_imports)]

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ChildProxy; use ChildProxy;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ClockTime; use ClockTime;
@ -116,9 +116,9 @@ impl Bus {
} }
} }
pub fn connect_message<F: Fn(&Bus, &Message) + Send + Sync + 'static>(&self, f: F) -> u64 { pub fn connect_message<F: Fn(&Bus, &Message) + Send + 'static>(&self, f: F) -> u64 {
unsafe { unsafe {
let f: Box_<Box_<Fn(&Bus, &Message) + Send + Sync + 'static>> = Box_::new(Box_::new(f)); let f: Box_<Box_<Fn(&Bus, &Message) + Send + 'static>> = Box_::new(Box_::new(f));
connect(self.to_glib_none().0, "message", connect(self.to_glib_none().0, "message",
transmute(message_trampoline as usize), Box_::into_raw(f) as *mut _) transmute(message_trampoline as usize), Box_::into_raw(f) as *mut _)
} }
@ -144,7 +144,7 @@ unsafe impl Sync for Bus {}
unsafe extern "C" fn message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) { unsafe extern "C" fn message_trampoline(this: *mut ffi::GstBus, message: *mut ffi::GstMessage, f: glib_ffi::gpointer) {
callback_guard!(); callback_guard!();
let f: &&(Fn(&Bus, &Message) + Send + Sync + 'static) = transmute(f); let f: &&(Fn(&Bus, &Message) + Send + 'static) = transmute(f);
f(&from_glib_none(this), &from_glib_none(message)) f(&from_glib_none(this), &from_glib_none(message))
} }

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ClockTime; use ClockTime;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Caps; use Caps;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Bus; use Bus;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Bus; use Bus;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use DeviceProvider; use DeviceProvider;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Bus; use Bus;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Caps; use Caps;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Bin; use Bin;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Object; use Object;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
mod bin; mod bin;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Caps; use Caps;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Caps; use Caps;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Bin; use Bin;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Error; use Error;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use ffi; use ffi;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Iterator; use Iterator;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
#[cfg(feature = "v1_10")] #[cfg(feature = "v1_10")]

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Object; use Object;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Element; use Element;

View file

@ -1,4 +1,4 @@
// This file was generated by gir (ede90a4) from gir-files (???) // This file was generated by gir (9f70278) from gir-files (???)
// DO NOT EDIT // DO NOT EDIT
use Error; use Error;