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

Commit

Permalink
Add stop_emission
Browse files Browse the repository at this point in the history
  • Loading branch information
Susurrus committed Jun 11, 2016
1 parent 38e9262 commit 1641e92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

//! `IMPL` Low level signal support.

use libc::c_void;
use libc::{c_void, c_uint};

use gobject_ffi::{self, GCallback};
use glib_ffi::{GQuark, GType};
use source::CallbackGuard;
use translate::ToGlibPtr;

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

pub unsafe fn stop_emission(instance: *mut gobject_ffi::GObject, signal_id: u32, detail: GQuark) {
gobject_ffi::g_signal_stop_emission(instance, signal_id as c_uint, detail);
}

unsafe extern "C" fn destroy_closure(ptr: *mut c_void, _: *mut gobject_ffi::GClosure) {
let _guard = CallbackGuard::new();
// destroy
Expand Down

0 comments on commit 1641e92

Please sign in to comment.