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 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312
// 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::GString; use glib::StaticType; use glib::Value; use glib_sys; use gobject_sys; use gst; use std::boxed::Box as Box_; #[cfg(any(feature = "v1_18", feature = "dox"))] use std::mem; use std::mem::transmute; #[cfg(any(feature = "v1_18", feature = "dox"))] use std::ptr; #[cfg(any(feature = "v1_18", feature = "dox"))] use Edge; #[cfg(any(feature = "v1_18", feature = "dox"))] use EditMode; use Extractable; #[cfg(any(feature = "v1_18", feature = "dox"))] use Layer; use Timeline; use TrackType; glib_wrapper! { /// A `TimelineElement` will have some temporal extent in its /// corresponding `TimelineElement:timeline`, controlled by its /// `TimelineElement:start` and `TimelineElement:duration`. This /// determines when its content will be displayed, or its effect applied, /// in the timeline. Several objects may overlap within a given /// `Timeline`, in which case their `TimelineElement:priority` is used /// to determine their ordering in the timeline. Priority is mostly handled /// internally by `Layer`-s and `Clip`-s. /// /// A timeline element can have a `TimelineElement:parent`, /// such as a `Clip`, which is responsible for controlling its timing. /// /// ## Editing /// /// Elements can be moved around in their `TimelineElement:timeline` by /// setting their `TimelineElement:start` and /// `TimelineElement:duration` using `TimelineElementExt::set_start` /// and `TimelineElementExt::set_duration`. Additionally, which parts of /// the underlying content are played in the timeline can be adjusted by /// setting the `TimelineElement:in-point` using /// `TimelineElementExt::set_inpoint`. The library also provides /// `TimelineElementExt::edit`, with various `EditMode`-s, which can /// adjust these properties in a convenient way, as well as introduce /// similar changes in neighbouring or later elements in the timeline. /// /// However, a timeline may refuse a change in these properties if they /// would place the timeline in an unsupported configuration. See /// `Timeline` for its overlap rules. /// /// Additionally, an edit may be refused if it would place one of the /// timing properties out of bounds (such as a negative time value for /// `TimelineElement:start`, or having insufficient internal /// content to last for the desired `TimelineElement:duration`). /// /// ## Time Coordinates /// /// There are three main sets of time coordinates to consider when using /// timeline elements: /// /// + Timeline coordinates: these are the time coordinates used in the /// output of the timeline in its `Track`-s. Each track share the same /// coordinates, so there is only one set of coordinates for the /// timeline. These extend indefinitely from 0. The times used for /// editing (including setting `TimelineElement:start` and /// `TimelineElement:duration`) use these coordinates, since these /// define when an element is present and for how long the element lasts /// for in the timeline. /// + Internal source coordinates: these are the time coordinates used /// internally at the element's output. This is only really defined for /// `TrackElement`-s, where it refers to time coordinates used at the /// final source pad of the wrapped `gst::Element`-s. However, these /// coordinates may also be used in a `Clip` in reference to its /// children. In particular, these are the coordinates used for /// `TimelineElement:in-point` and `TimelineElement:max-duration`. /// + Internal sink coordinates: these are the time coordinates used /// internally at the element's input. A `Source` has no input, so /// these would be undefined. Otherwise, for most `TrackElement`-s /// these will be the same set of coordinates as the internal source /// coordinates because the element does not change the timing /// internally. Only `BaseEffect` can support elements where these /// are different. See `BaseEffect` for more information. /// /// You can determine the timeline time for a given internal source time /// in a `Track` in a `Clip` using /// `ClipExt::get_timeline_time_from_internal_time`, and vice versa using /// `ClipExt::get_internal_time_from_timeline_time`, for the purposes of /// editing and setting timings properties. /// /// ## Children Properties /// /// If a timeline element owns another `gst::Object` and wishes to expose /// some of its properties, it can do so by registering the property as one /// of the timeline element's children properties using /// `TimelineElementExt::add_child_property`. The registered property of /// the child can then be read and set using the /// `TimelineElementExt::get_child_property` and /// `TimelineElementExt::set_child_property` methods, respectively. Some /// sub-classed objects will be created with pre-registered children /// properties; for example, to expose part of an underlying `gst::Element` /// that is used internally. The registered properties can be listed with /// `TimelineElementExt::list_children_properties`. /// /// # Implements /// /// [`TimelineElementExt`](trait.TimelineElementExt.html), [`glib::object::ObjectExt`](../glib/object/trait.ObjectExt.html), [`ExtractableExt`](trait.ExtractableExt.html), [`TimelineElementExtManual`](prelude/trait.TimelineElementExtManual.html) pub struct TimelineElement(Object<ges_sys::GESTimelineElement, ges_sys::GESTimelineElementClass, TimelineElementClass>) @implements Extractable; match fn { get_type => || ges_sys::ges_timeline_element_get_type(), } } pub const NONE_TIMELINE_ELEMENT: Option<&TimelineElement> = None; /// Trait containing all `TimelineElement` methods. /// /// # Implementors /// /// [`Container`](struct.Container.html), [`TimelineElement`](struct.TimelineElement.html), [`TrackElement`](struct.TrackElement.html) pub trait TimelineElementExt: 'static { //fn add_child_property<P: IsA<glib::Object>>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool; /// Create a copy of `self`. All the properties of `self` are copied into /// a new element, with the exception of `TimelineElement:parent`, /// `TimelineElement:timeline` and `TimelineElement:name`. Other data, /// such the list of a `Container`'s children, is **not** copied. /// /// If `deep` is `true`, then the new element is prepared so that it can be /// used in `TimelineElementExt::paste` or `TimelineExt::paste_element`. /// In the case of copying a `Container`, this ensures that the children /// of `self` will also be pasted. The new element should not be used for /// anything else and can only be used **once** in a pasting operation. In /// particular, the new element itself is not an actual 'deep' copy of /// `self`, but should be thought of as an intermediate object used for a /// single paste operation. /// ## `deep` /// Whether the copy is needed for pasting /// /// # Returns /// /// The newly create element, /// copied from `self`. fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError>; /// See `TimelineElementExt::edit_full`, which also gives an error. /// /// Note that the `layers` argument is currently ignored, so you should /// just pass `None`. /// /// Feature: `v1_18` /// /// ## `layers` /// A whitelist of layers /// where the edit can be performed, `None` allows all layers in the /// timeline. /// ## `new_layer_priority` /// The priority/index of the layer `self` should be /// moved to. -1 means no move /// ## `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) in the timeline coordinates /// /// # Returns /// /// `true` if the edit of `self` completed, `false` on failure. #[cfg(any(feature = "v1_18", feature = "dox"))] fn edit( &self, layers: &[Layer], new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> bool; /// Edits the element within its timeline by adjusting its /// `TimelineElement:start`, `TimelineElement:duration` or /// `TimelineElement:in-point`, and potentially doing the same for /// other elements in the timeline. See `EditMode` for details about each /// edit mode. An edit may fail if it would place one of these properties /// out of bounds, or if it would place the timeline in an unsupported /// configuration. /// /// Note that if you act on a `TrackElement`, this will edit its parent /// `Clip` instead. Moreover, for any `TimelineElement`, if you select /// `Edge::None` for `EditMode::Normal` or `EditMode::Ripple`, this /// will edit the toplevel instead, but still in such a way as to make the /// `TimelineElement:start` of `self` reach the edit `position`. /// /// Note that if the element's timeline has a /// `Timeline:snapping-distance` set, then the edit position may be /// snapped to the edge of some element under the edited element. /// /// `new_layer_priority` can be used to switch `self`, and other elements /// moved by the edit, to a new layer. New layers may be be created if the /// the corresponding layer priority/index does not yet exist for the /// timeline. /// /// Feature: `v1_18` /// /// ## `new_layer_priority` /// The priority/index of the layer `self` should be /// moved to. -1 means no move /// ## `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) in the timeline coordinates /// /// # Returns /// /// `true` if the edit of `self` completed, `false` on failure. #[cfg(any(feature = "v1_18", feature = "dox"))] fn edit_full( &self, new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::Error>; //fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); //fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool; //fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value); //fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); /// Gets the `TimelineElement:duration` for the element. /// /// # Returns /// /// The duration of `self` (in nanoseconds). fn get_duration(&self) -> gst::ClockTime; /// Gets the `TimelineElement:in-point` for the element. /// /// # Returns /// /// The in-point of `self` (in nanoseconds). fn get_inpoint(&self) -> gst::ClockTime; /// Gets the priority of the layer the element is in. A `Group` may span /// several layers, so this would return the highest priority (numerically, /// the smallest) amongst them. /// /// Feature: `v1_16` /// /// /// # Returns /// /// The priority of the layer `self` is in, or /// `GES_TIMELINE_ELEMENT_NO_LAYER_PRIORITY` if `self` does not exist in a /// layer. #[cfg(any(feature = "v1_16", feature = "dox"))] fn get_layer_priority(&self) -> u32; /// Gets the `TimelineElement:max-duration` for the element. /// /// # Returns /// /// The max-duration of `self` (in nanoseconds). fn get_max_duration(&self) -> gst::ClockTime; /// Gets the `TimelineElement:name` for the element. /// /// # Returns /// /// The name of `self`. fn get_name(&self) -> Option<GString>; /// Get the "natural" framerate of `self`. This is to say, for example /// for a `VideoUriSource` the framerate of the source. /// /// Note that a `AudioSource` may also have a natural framerate if it derives /// from the same `SourceClip` asset as a `VideoSource`, and its value will /// be that of the video source. For example, if the uri of a `UriClip` points /// to a file that contains both a video and audio stream, then the corresponding /// `AudioUriSource` will share the natural framerate of the corresponding /// `VideoUriSource`. /// /// Feature: `v1_18` /// /// ## `framerate_n` /// The framerate numerator /// ## `framerate_d` /// The framerate denominator /// /// # Returns /// /// Whether `self` has a natural framerate or not, `framerate_n` /// and `framerate_d` will be set to, respectively, 0 and -1 if it is /// not the case. #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_natural_framerate(&self) -> Option<(i32, i32)>; /// Gets the `TimelineElement:parent` for the element. /// /// # Returns /// /// The parent of `self`, or `None` if /// `self` has no parent. fn get_parent(&self) -> Option<TimelineElement>; /// Gets the `TimelineElement:priority` for the element. /// /// # Returns /// /// The priority of `self`. fn get_priority(&self) -> u32; /// Gets the `TimelineElement:start` for the element. /// /// # Returns /// /// The start of `self` (in nanoseconds). fn get_start(&self) -> gst::ClockTime; /// Gets the `TimelineElement:timeline` for the element. /// /// # Returns /// /// The timeline of `self`, or `None` /// if `self` has no timeline. fn get_timeline(&self) -> Option<Timeline>; /// Gets the toplevel `TimelineElement:parent` of the element. /// /// # Returns /// /// The toplevel parent of `self`. fn get_toplevel_parent(&self) -> Option<TimelineElement>; /// Gets the track types that the element can interact with, i.e. the type /// of `Track` it can exist in, or will create `TrackElement`-s for. /// /// # Returns /// /// The track types that `self` supports. fn get_track_types(&self) -> TrackType; //fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec>; //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object>; /// Paste an element inside the same timeline and layer as `self`. `self` /// **must** be the return of `TimelineElementExt::copy` with `deep=TRUE`, /// and it should not be changed before pasting. /// `self` is not placed in the timeline, instead a new element is created, /// alike to the originally copied element. Note that the originally /// copied element must stay within the same timeline and layer, at both /// the point of copying and pasting. /// /// Pasting may fail if it would place the timeline in an unsupported /// configuration. /// /// After calling this function `element` should not be used. In particular, /// `element` can **not** be pasted again. Instead, you can copy the /// returned element and paste that copy (although, this is only possible /// if the paste was successful). /// /// See also `TimelineExt::paste_element`. /// ## `paste_position` /// The position in the timeline `element` should be pasted /// to, i.e. the `TimelineElement:start` value for the pasted element. /// /// # Returns /// /// The newly created element, or /// `None` if pasting fails. fn paste(&self, paste_position: gst::ClockTime) -> Result<TimelineElement, glib::BoolError>; //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool; /// Edits the start time of an element within its timeline in ripple mode. /// See `TimelineElementExt::edit` with `EditMode::Ripple` and /// `Edge::None`. /// ## `start` /// The new start time of `self` in ripple mode /// /// # Returns /// /// `true` if the ripple edit of `self` completed, `false` on /// failure. fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; /// Edits the end time of an element within its timeline in ripple mode. /// See `TimelineElementExt::edit` with `EditMode::Ripple` and /// `Edge::End`. /// ## `end` /// The new end time of `self` in ripple mode /// /// # Returns /// /// `true` if the ripple edit of `self` completed, `false` on /// failure. fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError>; /// Edits the end time of an element within its timeline in roll mode. /// See `TimelineElementExt::edit` with `EditMode::Roll` and /// `Edge::End`. /// ## `end` /// The new end time of `self` in roll mode /// /// # Returns /// /// `true` if the roll edit of `self` completed, `false` on failure. fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError>; /// Edits the start time of an element within its timeline in roll mode. /// See `TimelineElementExt::edit` with `EditMode::Roll` and /// `Edge::Start`. /// ## `start` /// The new start time of `self` in roll mode /// /// # Returns /// /// `true` if the roll edit of `self` completed, `false` on failure. fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool; //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value); //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error>; //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); /// Sets `TimelineElement:duration` for the element. /// /// Whilst the element is part of a `Timeline`, this is the same as /// editing the element with `TimelineElementExt::edit` under /// `EditMode::Trim` with `Edge::End`. In particular, the /// `TimelineElement:duration` of the element may be snapped to a /// different timeline time difference from the one given. In addition, /// setting may fail if it would place the timeline in an unsupported /// configuration, or the element does not have enough internal content to /// last the desired duration. /// ## `duration` /// The desired duration in its timeline /// /// # Returns /// /// `true` if `duration` could be set for `self`. fn set_duration(&self, duration: gst::ClockTime) -> bool; /// Sets `TimelineElement:in-point` for the element. If the new in-point /// is above the current `TimelineElement:max-duration` of the element, /// this method will fail. /// ## `inpoint` /// The in-point, in internal time coordinates /// /// # Returns /// /// `true` if `inpoint` could be set for `self`. fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool; /// Sets `TimelineElement:max-duration` for the element. If the new /// maximum duration is below the current `TimelineElement:in-point` of /// the element, this method will fail. /// ## `maxduration` /// The maximum duration, in internal time coordinates /// /// # Returns /// /// `true` if `maxduration` could be set for `self`. fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool; /// Sets the `TimelineElement:name` for the element. If `None` is given /// for `name`, then the library will instead generate a new name based on /// the type name of the element, such as the name "uriclip3" for a /// `UriClip`, and will set that name instead. /// /// If `self` already has a `TimelineElement:timeline`, you should not /// call this function with `name` set to `None`. /// /// You should ensure that, within each `Timeline`, every element has a /// unique name. If you call this function with `name` as `None`, then /// the library should ensure that the set generated name is unique from /// previously **generated** names. However, if you choose a `name` that /// interferes with the naming conventions of the library, the library will /// attempt to ensure that the generated names will not conflict with the /// chosen name, which may lead to a different name being set instead, but /// the uniqueness between generated and user-chosen names is not /// guaranteed. /// ## `name` /// The name `self` should take /// /// # Returns /// /// `true` if `name` or a generated name for `self` could be set. fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>; /// Sets the `TimelineElement:parent` for the element. /// /// This is used internally and you should normally not call this. A /// `Container` will set the `TimelineElement:parent` of its children /// in `GESContainerExt::add` and `GESContainerExt::remove`. /// /// Note, if `parent` is not `None`, `self` must not already have a parent /// set. Therefore, if you wish to switch parents, you will need to call /// this function twice: first to set the parent to `None`, and then to the /// new parent. /// /// If `parent` is not `None`, you must ensure it already has a /// (non-floating) reference to `self` before calling this. /// /// # Returns /// /// `true` if `parent` could be set for `self`. fn set_parent<P: IsA<TimelineElement>>(&self, parent: &P) -> Result<(), glib::error::BoolError>; /// Sets the priority of the element within the containing layer. /// /// # Deprecated since 1.10 /// /// All priority management is done by GES itself now. /// To set `Effect` priorities `ClipExt::set_top_effect_index` should /// be used. /// ## `priority` /// The priority /// /// # Returns /// /// `true` if `priority` could be set for `self`. #[cfg_attr(feature = "v1_10", deprecated)] fn set_priority(&self, priority: u32) -> bool; /// Sets `TimelineElement:start` for the element. If the element has a /// parent, this will also move its siblings with the same shift. /// /// Whilst the element is part of a `Timeline`, this is the same as /// editing the element with `TimelineElementExt::edit` under /// `EditMode::Normal` with `Edge::None`. In particular, the /// `TimelineElement:start` of the element may be snapped to a different /// timeline time from the one given. In addition, setting may fail if it /// would place the timeline in an unsupported configuration. /// ## `start` /// The desired start position of the element in its timeline /// /// # Returns /// /// `true` if `start` could be set for `self`. fn set_start(&self, start: gst::ClockTime) -> bool; /// Sets the `TimelineElement:timeline` of the element. /// /// This is used internally and you should normally not call this. A /// `Clip` will have its `TimelineElement:timeline` set through its /// `Layer`. A `Track` will similarly take care of setting the /// `TimelineElement:timeline` of its `TrackElement`-s. A `Group` /// will adopt the same `TimelineElement:timeline` as its children. /// /// If `timeline` is `None`, this will stop its current /// `TimelineElement:timeline` from tracking it, otherwise `timeline` will /// start tracking `self`. Note, in the latter case, `self` must not already /// have a timeline set. Therefore, if you wish to switch timelines, you /// will need to call this function twice: first to set the timeline to /// `None`, and then to the new timeline. /// /// # Returns /// /// `true` if `timeline` could be set for `self`. fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError>; /// Edits the start time of an element within its timeline in trim mode. /// See `TimelineElementExt::edit` with `EditMode::Trim` and /// `Edge::Start`. /// ## `start` /// The new start time of `self` in trim mode /// /// # Returns /// /// `true` if the trim edit of `self` completed, `false` on failure. fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; /// The initial offset to use internally when outputting content (in /// nanoseconds, but in the time coordinates of the internal content). /// /// For example, for a `VideoUriSource` that references some media /// file, the "internal content" is the media file data, and the /// in-point would correspond to some timestamp in the media file. /// When playing the timeline, and when the element is first reached at /// timeline-time `TimelineElement:start`, it will begin outputting the /// data from the timestamp in-point **onwards**, until it reaches the /// end of its `TimelineElement:duration` in the timeline. /// /// For elements that have no internal content, this should be kept /// as 0. fn get_property_in_point(&self) -> u64; /// The initial offset to use internally when outputting content (in /// nanoseconds, but in the time coordinates of the internal content). /// /// For example, for a `VideoUriSource` that references some media /// file, the "internal content" is the media file data, and the /// in-point would correspond to some timestamp in the media file. /// When playing the timeline, and when the element is first reached at /// timeline-time `TimelineElement:start`, it will begin outputting the /// data from the timestamp in-point **onwards**, until it reaches the /// end of its `TimelineElement:duration` in the timeline. /// /// For elements that have no internal content, this should be kept /// as 0. fn set_property_in_point(&self, in_point: u64); /// Whether the element should be serialized. fn get_property_serialize(&self) -> bool; /// Whether the element should be serialized. fn set_property_serialize(&self, serialize: bool); //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[cfg_attr(feature = "v1_10", deprecated)] fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; } impl<O: IsA<TimelineElement>> TimelineElementExt for O { //fn add_child_property<P: IsA<glib::Object>>(&self, pspec: /*Ignored*/&glib::ParamSpec, child: &P) -> bool { // unsafe { TODO: call ges_sys:ges_timeline_element_add_child_property() } //} fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError> { unsafe { Option::<_>::from_glib_none(ges_sys::ges_timeline_element_copy( self.as_ref().to_glib_none().0, deep.to_glib(), )) .ok_or_else(|| glib_bool_error!("Failed to copy timeline element")) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn edit( &self, layers: &[Layer], new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_edit( self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn edit_full( &self, new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::Error> { unsafe { let mut error = ptr::null_mut(); let _ = ges_sys::ges_timeline_element_edit_full( self.as_ref().to_glib_none().0, new_layer_priority, mode.to_glib(), edge.to_glib(), position, &mut error, ); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //fn get_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_properties() } //} //fn get_child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool { // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property() } //} //fn get_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) { // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_by_pspec() } //} //fn get_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ges_sys:ges_timeline_element_get_child_property_valist() } //} fn get_duration(&self) -> gst::ClockTime { unsafe { from_glib(ges_sys::ges_timeline_element_get_duration( self.as_ref().to_glib_none().0, )) } } fn get_inpoint(&self) -> gst::ClockTime { unsafe { from_glib(ges_sys::ges_timeline_element_get_inpoint( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_16", feature = "dox"))] fn get_layer_priority(&self) -> u32 { unsafe { ges_sys::ges_timeline_element_get_layer_priority(self.as_ref().to_glib_none().0) } } fn get_max_duration(&self) -> gst::ClockTime { unsafe { from_glib(ges_sys::ges_timeline_element_get_max_duration( self.as_ref().to_glib_none().0, )) } } fn get_name(&self) -> Option<GString> { unsafe { from_glib_full(ges_sys::ges_timeline_element_get_name( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] fn get_natural_framerate(&self) -> Option<(i32, i32)> { unsafe { let mut framerate_n = mem::MaybeUninit::uninit(); let mut framerate_d = mem::MaybeUninit::uninit(); let ret = from_glib(ges_sys::ges_timeline_element_get_natural_framerate( self.as_ref().to_glib_none().0, framerate_n.as_mut_ptr(), framerate_d.as_mut_ptr(), )); let framerate_n = framerate_n.assume_init(); let framerate_d = framerate_d.assume_init(); if ret { Some((framerate_n, framerate_d)) } else { None } } } fn get_parent(&self) -> Option<TimelineElement> { unsafe { from_glib_full(ges_sys::ges_timeline_element_get_parent( self.as_ref().to_glib_none().0, )) } } fn get_priority(&self) -> u32 { unsafe { ges_sys::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) } } fn get_start(&self) -> gst::ClockTime { unsafe { from_glib(ges_sys::ges_timeline_element_get_start( self.as_ref().to_glib_none().0, )) } } fn get_timeline(&self) -> Option<Timeline> { unsafe { from_glib_full(ges_sys::ges_timeline_element_get_timeline( self.as_ref().to_glib_none().0, )) } } fn get_toplevel_parent(&self) -> Option<TimelineElement> { unsafe { from_glib_full(ges_sys::ges_timeline_element_get_toplevel_parent( self.as_ref().to_glib_none().0, )) } } fn get_track_types(&self) -> TrackType { unsafe { from_glib(ges_sys::ges_timeline_element_get_track_types( self.as_ref().to_glib_none().0, )) } } //fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec> { // unsafe { TODO: call ges_sys:ges_timeline_element_list_children_properties() } //} //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object> { // unsafe { TODO: call ges_sys:ges_timeline_element_lookup_child() } //} fn paste(&self, paste_position: gst::ClockTime) -> Result<TimelineElement, glib::BoolError> { unsafe { Option::<_>::from_glib_full(ges_sys::ges_timeline_element_paste( self.as_ref().to_glib_none().0, paste_position.to_glib(), )) .ok_or_else(|| glib_bool_error!("Failed to paste timeline element")) } } //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool { // unsafe { TODO: call ges_sys:ges_timeline_element_remove_child_property() } //} fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_ripple( self.as_ref().to_glib_none().0, start.to_glib() ), "Failed to ripple" ) } } fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_ripple_end( self.as_ref().to_glib_none().0, end.to_glib() ), "Failed to ripple" ) } } fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_roll_end( self.as_ref().to_glib_none().0, end.to_glib() ), "Failed to roll" ) } } fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_roll_start( self.as_ref().to_glib_none().0, start.to_glib() ), "Failed to roll" ) } } //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_properties() } //} //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property() } //} //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_by_pspec() } //} //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error> { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_full() } //} //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ges_sys:ges_timeline_element_set_child_property_valist() } //} fn set_duration(&self, duration: gst::ClockTime) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_set_duration( self.as_ref().to_glib_none().0, duration.to_glib(), )) } } fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_set_inpoint( self.as_ref().to_glib_none().0, inpoint.to_glib(), )) } } fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_set_max_duration( self.as_ref().to_glib_none().0, maxduration.to_glib(), )) } } fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_set_name( self.as_ref().to_glib_none().0, name.to_glib_none().0 ), "Failed to set name" ) } } fn set_parent<P: IsA<TimelineElement>>( &self, parent: &P, ) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_set_parent( self.as_ref().to_glib_none().0, parent.as_ref().to_glib_none().0 ), "`TimelineElement` already had a parent or its parent was the same as specified" ) } } fn set_priority(&self, priority: u32) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_set_priority( self.as_ref().to_glib_none().0, priority, )) } } fn set_start(&self, start: gst::ClockTime) -> bool { unsafe { from_glib(ges_sys::ges_timeline_element_set_start( self.as_ref().to_glib_none().0, start.to_glib(), )) } } fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_set_timeline( self.as_ref().to_glib_none().0, timeline.as_ref().to_glib_none().0 ), "`Failed to set timeline" ) } } fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib_result_from_gboolean!( ges_sys::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.to_glib()), "Failed to trim" ) } } fn get_property_in_point(&self) -> u64 { unsafe { let mut value = Value::from_type(<u64 as StaticType>::static_type()); gobject_sys::g_object_get_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `in-point` getter") .unwrap() } } fn set_property_in_point(&self, in_point: u64) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"in-point\0".as_ptr() as *const _, Value::from(&in_point).to_glib_none().0, ); } } fn get_property_serialize(&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"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `serialize` getter") .unwrap() } } fn set_property_serialize(&self, serialize: bool) { unsafe { gobject_sys::g_object_set_property( self.to_glib_none().0 as *mut gobject_sys::GObject, b"serialize\0".as_ptr() as *const _, Value::from(&serialize).to_glib_none().0, ); } } //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} //#[cfg(any(feature = "v1_18", feature = "dox"))] //fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} //fn connect_deep_notify<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} fn connect_property_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::duration\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_duration_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_in_point_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::in-point\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_in_point_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_max_duration_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId { unsafe extern "C" fn notify_max_duration_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::max-duration\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_max_duration_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_name_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::name\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_name_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_parent_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::parent\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_parent_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::priority\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_priority_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_serialize_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::serialize\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_serialize_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::start\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_start_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } fn connect_property_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>( this: *mut ges_sys::GESTimelineElement, _param_spec: glib_sys::gpointer, f: glib_sys::gpointer, ) where P: IsA<TimelineElement>, { let f: &F = &*(f as *const F); f(&TimelineElement::from_glib_borrow(this).unsafe_cast_ref()) } unsafe { let f: Box_<F> = Box_::new(f); connect_raw( self.as_ptr() as *mut _, b"notify::timeline\0".as_ptr() as *const _, Some(transmute::<_, unsafe extern "C" fn()>( notify_timeline_trampoline::<Self, F> as *const (), )), Box_::into_raw(f), ) } } }