gtk: fix Editable::(get|set)_delegate_property signatures
@@ -15,25 +15,30 @@ impl Editable {
#[doc(alias = "gtk_editable_delegate_get_property")]
pub fn delegate_get_property<P: IsA<Editable> + IsA<glib::Object>>(
object: &P,
- prop_id: u32,
- value: &mut glib::Value,
+ prop_id: usize,
pspec: &glib::ParamSpec,
- ) -> bool {
+ ) -> Option<glib::Value> {
assert_initialized_main_thread!();
unsafe {
- from_glib(ffi::gtk_editable_delegate_get_property(
+ let mut value = glib::Value::uninitialized();
+
+ if from_glib(ffi::gtk_editable_delegate_get_property(
object.upcast_ref::<glib::Object>().to_glib_none().0,
- prop_id,
+ prop_id as u32,
value.to_glib_none_mut().0,
pspec.to_glib_none().0,
- ))
+ )) {
+ Some(value)
+ } else {
+ None
+ }
}
}
#[doc(alias = "gtk_editable_delegate_set_property")]
pub fn delegate_set_property<P: IsA<Editable> + IsA<glib::Object>>(
object: &P,
- prop_id: u32,
+ prop_id: usize,
value: &glib::Value,
pspec: &glib::ParamSpec,
) -> bool {
@@ -41,7 +46,7 @@ impl Editable {
unsafe {
from_glib(ffi::gtk_editable_delegate_set_property(
object.upcast_ref::<glib::Object>().to_glib_none().0,
- prop_id,
+ prop_id as u32,
value.to_glib_none().0,
pspec.to_glib_none().0,
))
