// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git) // DO NOT EDIT use crate::MetaContainer; use glib::{ prelude::*, signal::{connect_raw, SignalHandlerId}, translate::*, }; use std::{boxed::Box as Box_, mem::transmute}; glib::wrapper! { #[doc(alias = "GESMarker")] pub struct Marker(Object) @implements MetaContainer; match fn { type_ => || ffi::ges_marker_get_type(), } } impl Marker { #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] pub fn position(&self) -> u64 { ObjectExt::property(self, "position") } #[cfg(feature = "v1_18")] #[cfg_attr(docsrs, doc(cfg(feature = "v1_18")))] #[doc(alias = "position")] pub fn connect_position_notify(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_position_trampoline( this: *mut ffi::GESMarker, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) { let f: &F = &*(f as *const F); f(&from_glib_borrow(this)) } unsafe { let f: Box_ = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::position\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_position_trampoline:: as *const (), )), Box_::into_raw(f), ) } } }