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

Commit 96e27d2

Browse files
committed
Add override_class_handler.
1 parent 38e9262 commit 96e27d2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/signal.rs

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use libc::c_void;
88

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

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

23+
pub unsafe fn override_class_handler(signal_name: &str, instance_type: GType, handler: GCallback) {
24+
gobject_ffi::g_signal_override_class_handler(signal_name.to_glib_none().0, instance_type, handler);
25+
}
26+
27+
2228
unsafe extern "C" fn destroy_closure(ptr: *mut c_void, _: *mut gobject_ffi::GClosure) {
2329
let _guard = CallbackGuard::new();
2430
// destroy

0 commit comments

Comments
 (0)