1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
use crate::Actionable;
use glib::translate::*;
use glib::{IsA, ToVariant};
pub trait ActionableExtManual: 'static {
#[doc(alias = "gtk_actionable_set_action_target")]
#[doc(alias = "gtk_actionable_set_action_target_value")]
fn set_action_target(&self, target: Option<&impl ToVariant>);
}
impl<O: IsA<Actionable>> ActionableExtManual for O {
fn set_action_target(&self, target: Option<&impl ToVariant>) {
unsafe {
ffi::gtk_actionable_set_action_target_value(
self.as_ref().to_glib_none().0,
target.map(|v| v.to_variant()).to_glib_none().0,
);
}
}
}