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 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742
// This file was generated by gir (https://github.com/gtk-rs/gir) // from gir-files (https://github.com/gtk-rs/gir-files) // DO NOT EDIT use ges_sys; use glib; use glib::object::Cast; use glib::object::IsA; use glib::signal::connect_raw; use glib::signal::SignalHandlerId; use glib::translate::*; use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; use gst; use std::boxed::Box as Box_; use std::mem::transmute; use Edge; use EditMode; use Extractable; use Layer; use TimelineElement; use Track; use TrackType; glib_wrapper! { /// A `TrackElement` is a `TimelineElement` that specifically belongs /// to a single `Track` of its `TimelineElement:timeline`. Its /// `TimelineElement:start` and `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 `TrackElementExt::get_nleobject`, and its /// `TimelineElement:start`, `TimelineElement:duration`, /// `TimelineElement:in-point`, `TimelineElement:priority` and /// `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 /// `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 `Effect`-s. /// /// ## Control Bindings for Children Properties /// /// You can set up control bindings for a track element child property /// using `TrackElementExt::set_control_source`. A /// `GstTimedValueControlSource` should specify the timed values using the /// internal source coordinates (see `TimelineElement`). By default, /// these will be updated to lie between the `TimelineElement:in-point` /// and out-point of the element. This can be switched off by setting /// `TrackElement:auto-clamp-control-sources` to `false`. /// /// # Implements /// /// [`TrackElementExt`](trait.TrackElementExt.html), [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) pub struct TrackElement(Object<ges_sys::GESTrackElement, ges_sys::GESTrackElementClass, TrackElementClass>) @extends TimelineElement, @implements Extractable; match fn { get_type => || ges_sys::ges_track_element_get_type(), } } pub const NONE_TRACK_ELEMENT: Option<&TrackElement> = None; /// Trait containing all `TrackElement` methods. /// /// # Implementors /// /// [`TrackElement`](struct.TrackElement.html) pub trait TrackElementExt: 'static { /// Adds all the properties of a `gst::Element` that match the criteria as /// children properties of the track element. If the name of `element`'s /// `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 /// `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 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 `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 /// `TrackElementExt::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. /// /// Feature: `v1_18` /// /// ## `property_name` /// The name of the child property to clamp the control /// source of #[cfg(any(feature = "v1_18", feature = "dox"))] fn clamp_control_source(&self, property_name: &str); /// Edits the element within its track. /// /// # Deprecated since 1.18 /// /// use `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)] fn edit( &self, layers: &[Layer], mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::error::BoolError>; //fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 }; /// Gets `TrackElement:auto-clamp-control-sources`. /// /// Feature: `v1_18` /// /// /// # Returns /// /// Whether the control sources for the child properties of /// `self` are automatically clamped. #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_auto_clamp_control_sources(&self) -> bool; //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding>; /// Get the `gst::Element` that the track element's underlying nleobject /// controls. /// /// # Returns /// /// The `gst::Element` being controlled by the /// nleobject that `self` wraps. fn get_element(&self) -> Option<gst::Element>; /// Get the GNonLin object this object is controlling. /// /// # Deprecated /// /// use `TrackElementExt::get_nleobject` instead. /// /// # Returns /// /// The GNonLin object this object is controlling. fn get_gnlobject(&self) -> Option<gst::Element>; /// Get the nleobject that this element wraps. /// /// # Returns /// /// The nleobject that `self` wraps. fn get_nleobject(&self) -> Option<gst::Element>; /// Get the `TrackElement:track` for the element. /// /// # Returns /// /// The track that `self` belongs to, /// or `None` if it does not belong to a track. fn get_track(&self) -> Option<Track>; /// Gets the `TrackElement:track-type` for the element. /// /// # Returns /// /// The track-type of `self`. fn get_track_type(&self) -> TrackType; /// Gets `TrackElement:has-internal-source` for the element. /// /// Feature: `v1_18` /// /// /// # Returns /// /// `true` if `self` can have its 'internal time' properties set. #[cfg(any(feature = "v1_18", feature = "dox"))] fn has_internal_source(&self) -> bool; /// Gets `TrackElement:active` for the element. /// /// # Returns /// /// `true` if `self` is active in its track. 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` `ClipClass` method for /// some `Clip`. /// /// Note that such a track element can only be added to a clip that shares /// the same `Asset` as the clip that created it. For example, you are /// allowed to move core children between clips that resulted from /// `GESContainerExt::ungroup`, but you could not move the core child from a /// `UriClip` to a `TitleClip` or another `UriClip` with a different /// `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. /// /// Feature: `v1_18` /// /// /// # Returns /// /// `true` if `element` is a core track element. #[cfg(any(feature = "v1_18", feature = "dox"))] fn is_core(&self) -> bool; //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<gst::Element>; /// Removes the `gst::ControlBinding` that was created for the specified child /// property of the track element using /// `TrackElementExt::set_control_source`. The given `property_name` must /// be the same name of the child property that was passed to /// `TrackElementExt::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. fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError>; /// Sets `TrackElement:active` for the element. /// ## `active` /// Whether `self` should be active in its track /// /// # Returns /// /// `true` if the property was *toggled*. fn set_active(&self, active: bool) -> bool; /// Sets `TrackElement:auto-clamp-control-sources`. If set to `true`, this /// will immediately clamp all the control sources. /// /// Feature: `v1_18` /// /// ## `auto_clamp` /// Whether to automatically clamp the control sources for the /// child properties of `self` #[cfg(any(feature = "v1_18", feature = "dox"))] fn set_auto_clamp_control_sources(&self, auto_clamp: bool); //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool; /// Sets `TrackElement:has-internal-source` for the element. If this is /// set to `false`, this method will also set the /// `TimelineElement:in-point` of the element to 0 and its /// `TimelineElement:max-duration` to `GST_CLOCK_TIME_NONE`. /// /// Feature: `v1_18` /// /// ## `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"))] fn set_has_internal_source(&self, has_internal_source: bool) -> bool; /// Sets the `TrackElement:track-type` for the element. /// ## `type_` /// The new track-type for `self` fn set_track_type(&self, type_: TrackType); /// Whether the effect of the element should be applied in its /// `TrackElement:track`. If set to `false`, it will not be used in /// the output of the track. fn get_property_active(&self) -> bool; /// This property is used to determine whether the 'internal time' /// properties of the element have any meaning. In particular, unless /// this is set to `true`, the `TimelineElement:in-point` and /// `TimelineElement:max-duration` can not be set to any value other /// than the default 0 and `GST_CLOCK_TIME_NONE`, respectively. /// /// If an element has some *internal* *timed* source `gst::Element` that it /// reads stream data from as part of its function in a `Track`, then /// you'll likely want to set this to `true` to allow the /// `TimelineElement:in-point` and `TimelineElement:max-duration` to /// be set. /// /// The default value is determined by the `TrackElementClass` /// `default_has_internal_source` class property. For most /// `SourceClass`-es, this will be `true`, with the exception of those /// that have a potentially *static* source, such as `ImageSourceClass` /// and `TitleSourceClass`. Otherwise, this will usually be `false`. /// /// For most `Operation`-s you will likely want to leave this set to /// `false`. The exception may be for an operation that reads some stream /// data from some private internal source as part of manipulating the /// input data from the usual linked upstream `TrackElement`. /// /// For example, you may want to set this to `true` for a /// `TrackType::Video` operation that wraps a `textoverlay` that reads /// from a subtitle file and places its text on top of the received video /// data. The `TimelineElement:in-point` of the element would be used /// to shift the initial seek time on the `textoverlay` away from 0, and /// the `TimelineElement:max-duration` could be set to reflect the /// time at which the subtitle file runs out of data. /// /// Note that GES can not support track elements that have both internal /// content and manipulate the timing of their data streams (time /// effects). /// /// Feature: `v1_18` /// #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_property_has_internal_source(&self) -> bool; //fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //fn connect_control_binding_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_auto_clamp_control_sources_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; #[cfg(any(feature = "v1_18", feature = "dox"))] fn connect_property_has_internal_source_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId; fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_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 { ges_sys::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"))] fn clamp_control_source(&self, property_name: &str) { unsafe { ges_sys::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!( ges_sys::ges_track_element_edit( self.as_ref().to_glib_none().0, layers.to_glib_none().0, mode.to_glib(), edge.to_glib(), position ), "Failed to edit" ) } } //fn get_all_control_bindings(&self) -> /*Unknown conversion*//*Unimplemented*/HashTable TypeId { ns_id: 0, id: 28 }/TypeId { ns_id: 6, id: 83 } { // unsafe { TODO: call ges_sys:ges_track_element_get_all_control_bindings() } //} #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_auto_clamp_control_sources(&self) -> bool { unsafe { from_glib(ges_sys::ges_track_element_get_auto_clamp_control_sources( self.as_ref().to_glib_none().0, )) } } //fn get_control_binding(&self, property_name: &str) -> /*Ignored*/Option<gst::ControlBinding> { // unsafe { TODO: call ges_sys:ges_track_element_get_control_binding() } //} fn get_element(&self) -> Option<gst::Element> { unsafe { from_glib_none(ges_sys::ges_track_element_get_element( self.as_ref().to_glib_none().0, )) } } fn get_gnlobject(&self) -> Option<gst::Element> { unsafe { from_glib_none(ges_sys::ges_track_element_get_gnlobject( self.as_ref().to_glib_none().0, )) } } fn get_nleobject(&self) -> Option<gst::Element> { unsafe { from_glib_none(ges_sys::ges_track_element_get_nleobject( self.as_ref().to_glib_none().0, )) } } fn get_track(&self) -> Option<Track> { unsafe { from_glib_none(ges_sys::ges_track_element_get_track( self.as_ref().to_glib_none().0, )) } } fn get_track_type(&self) -> TrackType { unsafe { from_glib(ges_sys::ges_track_element_get_track_type( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn has_internal_source(&self) -> bool { unsafe { from_glib(ges_sys::ges_track_element_has_internal_source( self.as_ref().to_glib_none().0, )) } } fn is_active(&self) -> bool { unsafe { from_glib(ges_sys::ges_track_element_is_active( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn is_core(&self) -> bool { unsafe { from_glib(ges_sys::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 ges_sys:ges_track_element_lookup_child() } //} fn remove_control_binding(&self, property_name: &str) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::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(ges_sys::ges_track_element_set_active( self.as_ref().to_glib_none().0, active.to_glib(), )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn set_auto_clamp_control_sources(&self, auto_clamp: bool) { unsafe { ges_sys::ges_track_element_set_auto_clamp_control_sources( self.as_ref().to_glib_none().0, auto_clamp.to_glib(), ); } } //fn set_control_source(&self, source: /*Ignored*/&gst::ControlSource, property_name: &str, binding_type: &str) -> bool { // unsafe { TODO: call ges_sys:ges_track_element_set_control_source() } //} #[cfg(any(feature = "v1_18", feature = "dox"))] fn set_has_internal_source(&self, has_internal_source: bool) -> bool { unsafe { from_glib(ges_sys::ges_track_element_set_has_internal_source( self.as_ref().to_glib_none().0, has_internal_source.to_glib(), )) } } fn set_track_type(&self, type_: TrackType) { unsafe { ges_sys::ges_track_element_set_track_type( self.as_ref().to_glib_none().0, type_.to_glib(), ); } } fn get_property_active(&self) -> bool { unsafe { let mut value = Value::from_type(<bool as StaticType>::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"active\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `active` getter") .unwrap() } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_property_has_internal_source(&self) -> bool { unsafe { let mut value = Value::from_type(<bool as StaticType>::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"has-internal-source\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `has-internal-source` getter") .unwrap() } } //fn connect_control_binding_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored control_binding: Gst.ControlBinding //} //fn connect_control_binding_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored control_binding: Gst.ControlBinding //} fn connect_property_active_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_active_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::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"))] fn connect_property_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 ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::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"))] fn connect_property_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 ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::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), ) } } fn connect_property_track_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_track_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::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), ) } } fn connect_property_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 ges_sys::GESTrackElement, _param_spec: glib_sys::gpointer, f: glib_sys::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), ) } } }