1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697
// 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::Edge; use crate::EditMode; use crate::Extractable; use crate::Layer; use crate::TimelineElement; use crate::Track; use crate::TrackType; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use std::boxed::Box as Box_; use std::mem::transmute; glib::wrapper! { /// A [`crate::TrackElement`] is a [`crate::TimelineElement`] that specifically belongs /// to a single [`crate::Track`] of its [`crate::TimelineElement:timeline`]. Its /// [`crate::TimelineElement:start`] and [`crate::TimelineElement:duration`] specify its /// temporal extent in the track. Specifically, a track element wraps some /// nleobject, such as an `nlesource` or `nleoperation`, which can be /// retrieved with [`crate::prelude::TrackElementExt::get_nleobject()`], and its /// [`crate::TimelineElement:start`], [`crate::TimelineElement:duration`], /// [`crate::TimelineElement:in-point`], [`crate::TimelineElement:priority`] and /// [`crate::TrackElement:active`] properties expose the corresponding nleobject /// properties. When a track element is added to a track, its nleobject is /// added to the corresponding `nlecomposition` that the track wraps. /// /// Most users will not have to work directly with track elements since a /// [`crate::Clip`] will automatically create track elements for its timeline's /// tracks and take responsibility for updating them. The only track /// elements that are not automatically created by clips, but a user is /// likely to want to create, are [`crate::Effect`]-s. /// /// ## Control Bindings for Children Properties /// /// You can set up control bindings for a track element child property /// using [`crate::prelude::TrackElementExt::set_control_source()`]. A /// `GstTimedValueControlSource` should specify the timed values using the /// internal source coordinates (see [`crate::TimelineElement`]). By default, /// these will be updated to lie between the [`crate::TimelineElement:in-point`] /// and out-point of the element. This can be switched off by setting /// [`crate::TrackElement:auto-clamp-control-sources`] to [`false`]. /// /// This is an Abstract Base Class, you cannot instantiate it. /// /// # Implements /// /// [`trait@crate::prelude::TrackElementExt`], [`trait@crate::prelude::TimelineElementExt`], [`trait@glib::object::ObjectExt`], [`trait@crate::prelude::ExtractableExt`], [`trait@crate::prelude::TimelineElementExtManual`] pub struct TrackElement(Object<ffi::GESTrackElement, ffi::GESTrackElementClass>) @extends TimelineElement, @implements Extractable; match fn { type_ => || ffi::ges_track_element_get_type(), } } pub const NONE_TRACK_ELEMENT: Option<&TrackElement> = None; /// Trait containing all `TrackElement` methods. /// /// # Implementors /// /// [`struct@crate::TrackElement`] pub trait TrackElementExt: 'static { /// Adds all the properties of a [`crate::gst::Element`] that match the criteria as /// children properties of the track element. If the name of `element`'s /// [`crate::gst::ElementFactory`] is not in `blacklist`, and the factory's /// `GST_ELEMENT_METADATA_KLASS` contains at least one member of /// `wanted_categories` (e.g. `GST_ELEMENT_FACTORY_KLASS_DECODER`), then /// all the properties of `element` that are also in `whitelist` are added as /// child properties of `self` using /// [`crate::prelude::TimelineElementExt::add_child_property()`]. /// /// This is intended to be used by subclasses when constructing. /// ## `element` /// The child object to retrieve properties from /// ## `wanted_categories` /// /// An array of element factory "klass" categories to whitelist, or [`None`] /// to accept all categories /// ## `blacklist` /// A /// blacklist of element factory names, or [`None`] to not blacklist any /// element factory /// ## `whitelist` /// A /// whitelist of element property names, or [`None`] to whitelist all /// writeable properties #[doc(alias = "ges_track_element_add_children_props")] fn add_children_props<P: IsA<gst::Element>>( &self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str], ); /// Clamp the `GstTimedValueControlSource` for the specified child property /// to lie between the [`crate::TimelineElement:in-point`] and out-point of the /// element. The out-point is the `GES_TIMELINE_ELEMENT_END` of the element /// translated from the timeline coordinates to the internal source /// coordinates of the element. /// /// If the property does not have a `GstTimedValueControlSource` set by /// [`Self::set_control_source()`], nothing happens. Otherwise, if /// a timed value for the control source lies before the in-point of the /// element, or after its out-point, then it will be removed. At the /// in-point and out-point times, a new interpolated value will be placed. /// ## `property_name` /// The name of the child property to clamp the control /// source of #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_clamp_control_source")] fn clamp_control_source(&self, property_name: &str); /// Edits the element within its track. /// /// # Deprecated since 1.18 /// /// use [`crate::prelude::TimelineElementExt::edit`] instead. /// ## `layers` /// A whitelist of layers /// where the edit can be performed, [`None`] allows all layers in the /// timeline /// ## `mode` /// The edit mode /// ## `edge` /// The edge of `self` where the edit should occur /// ## `position` /// The edit position: a new location for the edge of `self` /// (in nanoseconds) /// /// # Returns /// /// [`true`] if the edit of `self` completed, [`false`] on failure. #[cfg_attr(feature = "v1_18", deprecated = "Since 1.18")] #[doc(alias = "ges_track_element_edit")] fn edit( &self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::error::BoolError>; //#[doc(alias = "ges_track_element_get_all_control_bindings")] //#[doc(alias = "get_all_control_bindings")] //fn all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 }; /// Gets [`crate::TrackElement:auto-clamp-control-sources`]. /// /// # Returns /// /// Whether the control sources for the child properties of /// `self` are automatically clamped. #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_get_auto_clamp_control_sources")] #[doc(alias = "get_auto_clamp_control_sources")] fn is_auto_clamp_control_sources(&self) -> bool; //#[doc(alias = "ges_track_element_get_control_binding")] //#[doc(alias = "get_control_binding")] //fn control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding>; /// Get the [`crate::gst::Element`] that the track element's underlying nleobject /// controls. /// /// # Returns /// /// The [`crate::gst::Element`] being controlled by the /// nleobject that `self` wraps. #[doc(alias = "ges_track_element_get_element")] #[doc(alias = "get_element")] fn element(&self) -> Option<gst::Element>; /// Get the GNonLin object this object is controlling. /// /// # Deprecated /// /// use [`Self::get_nleobject`] instead. /// /// # Returns /// /// The GNonLin object this object is controlling. #[doc(alias = "ges_track_element_get_gnlobject")] #[doc(alias = "get_gnlobject")] fn gnlobject(&self) -> Option<gst::Element>; /// Get the nleobject that this element wraps. /// /// # Returns /// /// The nleobject that `self` wraps. #[doc(alias = "ges_track_element_get_nleobject")] #[doc(alias = "get_nleobject")] fn nleobject(&self) -> Option<gst::Element>; /// Get the [`crate::TrackElement:track`] for the element. /// /// # Returns /// /// The track that `self` belongs to, /// or [`None`] if it does not belong to a track. #[doc(alias = "ges_track_element_get_track")] #[doc(alias = "get_track")] fn track(&self) -> Option<Track>; /// Gets the [`crate::TrackElement:track-type`] for the element. /// /// # Returns /// /// The track-type of `self`. #[doc(alias = "ges_track_element_get_track_type")] #[doc(alias = "get_track_type")] fn track_type(&self) -> TrackType; /// Gets [`crate::TrackElement:has-internal-source`] for the element. /// /// # Returns /// /// [`true`] if `self` can have its 'internal time' properties set. #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_has_internal_source")] fn has_internal_source(&self) -> bool; /// Gets [`crate::TrackElement:active`] for the element. /// /// # Returns /// /// [`true`] if `self` is active in its track. #[doc(alias = "ges_track_element_is_active")] fn is_active(&self) -> bool; /// Get whether the given track element is a core track element. That is, /// it was created by the `create_track_elements` [`crate::ClipClass`] method for /// some [`crate::Clip`]. /// /// Note that such a track element can only be added to a clip that shares /// the same [`crate::Asset`] as the clip that created it. For example, you are /// allowed to move core children between clips that resulted from /// [`crate::prelude::GESContainerExt::ungroup()`], but you could not move the core child from a /// [`crate::UriClip`] to a [`crate::TitleClip`] or another [`crate::UriClip`] with a different /// [`crate::UriClip:uri`]. /// /// Moreover, if a core track element is added to a clip, it will always be /// added as a core child. Therefore, if this returns [`true`], then `element` /// will be a core child of its parent clip. /// /// # Returns /// /// [`true`] if `element` is a core track element. #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_is_core")] fn is_core(&self) -> bool; //#[doc(alias = "ges_track_element_lookup_child")] //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element>; /// Removes the [`crate::gst::ControlBinding`] that was created for the specified child /// property of the track element using /// [`Self::set_control_source()`]. The given `property_name` must /// be the same name of the child property that was passed to /// [`Self::set_control_source()`]. /// ## `property_name` /// The name of the child property to remove the control /// binding from /// /// # Returns /// /// [`true`] if the control binding was removed from the specified /// child property of `self`, or [`false`] if an error occurred. #[doc(alias = "ges_track_element_remove_control_binding")] fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError>; /// Sets [`crate::TrackElement:active`] for the element. /// ## `active` /// Whether `self` should be active in its track /// /// # Returns /// /// [`true`] if the property was *toggled*. #[doc(alias = "ges_track_element_set_active")] fn set_active(&self, active: bool) -> bool; /// Sets [`crate::TrackElement:auto-clamp-control-sources`]. If set to [`true`], this /// will immediately clamp all the control sources. /// ## `auto_clamp` /// Whether to automatically clamp the control sources for the /// child properties of `self` #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_set_auto_clamp_control_sources")] fn set_auto_clamp_control_sources(&self, auto_clamp: bool); //#[doc(alias = "ges_track_element_set_control_source")] //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool; /// Sets [`crate::TrackElement:has-internal-source`] for the element. If this is /// set to [`false`], this method will also set the /// [`crate::TimelineElement:in-point`] of the element to 0 and its /// [`crate::TimelineElement:max-duration`] to `GST_CLOCK_TIME_NONE`. /// ## `has_internal_source` /// Whether the `self` should be allowed to have its /// 'internal time' properties set. /// /// # Returns /// /// [`false`] if `has_internal_source` is forbidden for `self` and /// [`true`] in any other case. #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_track_element_set_has_internal_source")] fn set_has_internal_source(&self, has_internal_source: bool) -> bool; /// Sets the [`crate::TrackElement:track-type`] for the element. /// ## `type_` /// The new track-type for `self` #[doc(alias = "ges_track_element_set_track_type")] fn set_track_type(&self, type_: TrackType); //#[doc(alias = "control-binding-added")] //fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //#[doc(alias = "control-binding-removed")] //fn connect_control_binding_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; #[doc(alias = "active")] fn connect_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "auto-clamp-control-sources")] fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "has-internal-source")] fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "track")] fn connect_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "track-type")] fn connect_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; } impl<O: IsA<TrackElement>> TrackElementExt for O { fn add_children_props<P: IsA<gst::Element>>( &self, element: &P, wanted_categories: &[&str], blacklist: &[&str], whitelist: &[&str], ) { unsafe { ffi::ges_track_element_add_children_props( self.as_ref().to_glib_none().0, element.as_ref().to_glib_none().0, wanted_categories.to_glib_none().0, blacklist.to_glib_none().0, whitelist.to_glib_none().0, ); } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn clamp_control_source(&self, property_name: &str) { unsafe { ffi::ges_track_element_clamp_control_source( self.as_ref().to_glib_none().0, property_name.to_glib_none().0, ); } } fn edit( &self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_track_element_edit( self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.into_glib(), edge.into_glib(), position ), "Failed to edit" ) } } //fn all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 } { // unsafe { TODO: call ffi:ges_track_element_get_all_control_bindings() } //} #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn is_auto_clamp_control_sources(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_get_auto_clamp_control_sources( self.as_ref().to_glib_none().0, )) } } //fn control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding> { // unsafe { TODO: call ffi:ges_track_element_get_control_binding() } //} fn element(&self) -> Option<gst::Element> { unsafe { from_glib_none(ffi::ges_track_element_get_element( self.as_ref().to_glib_none().0, )) } } fn gnlobject(&self) -> Option<gst::Element> { unsafe { from_glib_none(ffi::ges_track_element_get_gnlobject( self.as_ref().to_glib_none().0, )) } } fn nleobject(&self) -> Option<gst::Element> { unsafe { from_glib_none(ffi::ges_track_element_get_nleobject( self.as_ref().to_glib_none().0, )) } } fn track(&self) -> Option<Track> { unsafe { from_glib_none(ffi::ges_track_element_get_track( self.as_ref().to_glib_none().0, )) } } fn track_type(&self) -> TrackType { unsafe { from_glib(ffi::ges_track_element_get_track_type( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn has_internal_source(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_has_internal_source( self.as_ref().to_glib_none().0, )) } } fn is_active(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_is_active( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn is_core(&self) -> bool { unsafe { from_glib(ffi::ges_track_element_is_core( self.as_ref().to_glib_none().0, )) } } //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element> { // unsafe { TODO: call ffi:ges_track_element_lookup_child() } //} fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_track_element_remove_control_binding( self.as_ref().to_glib_none().0, property_name.to_glib_none().0 ), "Failed to remove control binding" ) } } fn set_active(&self, active: bool) -> bool { unsafe { from_glib(ffi::ges_track_element_set_active( self.as_ref().to_glib_none().0, active.into_glib(), )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn set_auto_clamp_control_sources(&self, auto_clamp: bool) { unsafe { ffi::ges_track_element_set_auto_clamp_control_sources( self.as_ref().to_glib_none().0, auto_clamp.into_glib(), ); } } //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool { // unsafe { TODO: call ffi:ges_track_element_set_control_source() } //} #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn set_has_internal_source(&self, has_internal_source: bool) -> bool { unsafe { from_glib(ffi::ges_track_element_set_has_internal_source( self.as_ref().to_glib_none().0, has_internal_source.into_glib(), )) } } fn set_track_type(&self, type_: TrackType) { unsafe { ffi::ges_track_element_set_track_type( self.as_ref().to_glib_none().0, type_.into_glib(), ); } } //#[doc(alias = "control-binding-added")] //fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored control_binding: Gst.ControlBinding //} //#[doc(alias = "control-binding-removed")] //fn connect_control_binding_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored control_binding: Gst.ControlBinding //} #[doc(alias = "active")] fn connect_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_active_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) where P: IsA<TrackElement>, { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::active\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_active_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "auto-clamp-control-sources")] fn connect_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_auto_clamp_control_sources_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) where P: IsA<TrackElement>, { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::auto-clamp-control-sources\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_auto_clamp_control_sources_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "has-internal-source")] fn connect_has_internal_source_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_has_internal_source_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) where P: IsA<TrackElement>, { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::has-internal-source\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_has_internal_source_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "track")] fn connect_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) where P: IsA<TrackElement>, { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::track\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_track_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } #[doc(alias = "track-type")] fn connect_track_type_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_type_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTrackElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::gpointer, ) where P: IsA<TrackElement>, { let f: &F = &*(f as *const F); f(&TrackElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::track-type\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_track_type_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } }