Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 1641e92

Browse files
committed
Add stop_emission
1 parent 38e9262 commit 1641e92

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/signal.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
//! `IMPL` Low level signal support.
66
7-
use libc::c_void;
7+
use libc::{c_void, c_uint};
88

99
use gobject_ffi::{self, GCallback};
10+
use glib_ffi::{GQuark, GType};
1011
use source::CallbackGuard;
1112
use translate::ToGlibPtr;
1213

@@ -19,6 +20,10 @@ pub unsafe fn connect(receiver: *mut gobject_ffi::GObject, signal_name: &str, tr
1920
handle
2021
}
2122

23+
pub unsafe fn stop_emission(instance: *mut gobject_ffi::GObject, signal_id: u32, detail: GQuark) {
24+
gobject_ffi::g_signal_stop_emission(instance, signal_id as c_uint, detail);
25+
}
26+
2227
unsafe extern "C" fn destroy_closure(ptr: *mut c_void, _: *mut gobject_ffi::GClosure) {
2328
let _guard = CallbackGuard::new();
2429
// destroy

0 commit comments

Comments
 (0)