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

Commit

Permalink
Add override_class_handler.
Browse files Browse the repository at this point in the history
  • Loading branch information
Susurrus committed Jun 9, 2016
1 parent 38e9262 commit 96e27d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use libc::c_void;

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

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

pub unsafe fn override_class_handler(signal_name: &str, instance_type: GType, handler: GCallback) {
gobject_ffi::g_signal_override_class_handler(signal_name.to_glib_none().0, instance_type, handler);
}


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 96e27d2

Please sign in to comment.