Skip to content

Commit

Permalink
More changes for docsrs
Browse files Browse the repository at this point in the history
  • Loading branch information
pentamassiv committed Aug 5, 2023
1 parent 8316091 commit db07e02
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions gtk4/src/signal_list_item_factory.rs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
use crate::{prelude::*, ListItem};

use crate::SignalListItemFactory;

#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
use glib::{
signal::{connect_raw, SignalHandlerId},
translate::*,
};
#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
use std::{boxed::Box as Box_, mem::transmute};

impl SignalListItemFactory {
#[doc(alias = "bind")]
#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
pub fn connect_bind<F: Fn(&Self, &ListItem) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn bind_trampoline<F: Fn(&SignalListItemFactory, &ListItem) + 'static>(
this: *mut ffi::GtkSignalListItemFactory,
Expand All @@ -39,7 +39,7 @@ impl SignalListItemFactory {
}

#[doc(alias = "setup")]
#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
pub fn connect_setup<F: Fn(&Self, &ListItem) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn setup_trampoline<
F: Fn(&SignalListItemFactory, &ListItem) + 'static,
Expand All @@ -65,7 +65,7 @@ impl SignalListItemFactory {
}

#[doc(alias = "teardown")]
#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
pub fn connect_teardown<F: Fn(&Self, &ListItem) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn teardown_trampoline<
F: Fn(&SignalListItemFactory, &ListItem) + 'static,
Expand All @@ -91,7 +91,7 @@ impl SignalListItemFactory {
}

#[doc(alias = "unbind")]
#[cfg(not(any(feature = "v4_8", docsrs)))]
#[cfg(not(feature = "v4_8"))]
pub fn connect_unbind<F: Fn(&Self, &ListItem) + 'static>(&self, f: F) -> SignalHandlerId {
unsafe extern "C" fn unbind_trampoline<
F: Fn(&SignalListItemFactory, &ListItem) + 'static,
Expand Down

0 comments on commit db07e02

Please sign in to comment.