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 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360
// 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 #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::Edge; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::EditMode; use crate::Extractable; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use crate::Layer; use crate::Timeline; use crate::TrackType; 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::ToValue; use std::boxed::Box as Box_; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::mem; use std::mem::transmute; #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] use std::ptr; glib::wrapper! { /// A [`crate::TimelineElement`] will have some temporal extent in its /// corresponding [`crate::TimelineElement:timeline`], controlled by its /// [`crate::TimelineElement:start`] and [`crate::TimelineElement:duration`]. This /// determines when its content will be displayed, or its effect applied, /// in the timeline. Several objects may overlap within a given /// [`crate::Timeline`], in which case their [`crate::TimelineElement:priority`] is used /// to determine their ordering in the timeline. Priority is mostly handled /// internally by [`crate::Layer`]-s and [`crate::Clip`]-s. /// /// A timeline element can have a [`crate::TimelineElement:parent`], /// such as a [`crate::Clip`], which is responsible for controlling its timing. /// /// ## Editing /// /// Elements can be moved around in their [`crate::TimelineElement:timeline`] by /// setting their [`crate::TimelineElement:start`] and /// [`crate::TimelineElement:duration`] using [`crate::prelude::TimelineElementExt::set_start()`] /// and [`crate::prelude::TimelineElementExt::set_duration()`]. Additionally, which parts of /// the underlying content are played in the timeline can be adjusted by /// setting the [`crate::TimelineElement:in-point`] using /// [`crate::prelude::TimelineElementExt::set_inpoint()`]. The library also provides /// [`crate::prelude::TimelineElementExt::edit()`], with various [`crate::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 /// [`crate::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 /// [`crate::TimelineElement:start`], or having insufficient internal /// content to last for the desired [`crate::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 [`crate::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 [`crate::TimelineElement:start`] and /// [`crate::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 /// [`crate::TrackElement`]-s, where it refers to time coordinates used at the /// final source pad of the wrapped [`crate::gst::Element`]-s. However, these /// coordinates may also be used in a [`crate::Clip`] in reference to its /// children. In particular, these are the coordinates used for /// [`crate::TimelineElement:in-point`] and [`crate::TimelineElement:max-duration`]. /// + Internal sink coordinates: these are the time coordinates used /// internally at the element's input. A [`crate::Source`] has no input, so /// these would be undefined. Otherwise, for most [`crate::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 [`crate::BaseEffect`] can support elements where these /// are different. See [`crate::BaseEffect`] for more information. /// /// You can determine the timeline time for a given internal source time /// in a [`crate::Track`] in a [`crate::Clip`] using /// [`crate::prelude::ClipExt::get_timeline_time_from_internal_time()`], and vice versa using /// [`crate::prelude::ClipExt::get_internal_time_from_timeline_time()`], for the purposes of /// editing and setting timings properties. /// /// ## Children Properties /// /// If a timeline element owns another [`crate::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 /// [`crate::prelude::TimelineElementExt::add_child_property()`]. The registered property of /// the child can then be read and set using the /// [`crate::prelude::TimelineElementExt::get_child_property()`] and /// [`crate::prelude::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 [`crate::gst::Element`] /// that is used internally. The registered properties can be listed with /// [`crate::prelude::TimelineElementExt::list_children_properties()`]. /// /// This is an Abstract Base Class, you cannot instantiate it. /// /// # Implements /// /// [`trait@crate::prelude::TimelineElementExt`], [`trait@glib::object::ObjectExt`], [`trait@crate::prelude::ExtractableExt`], [`trait@crate::prelude::TimelineElementExtManual`] pub struct TimelineElement(Object<ffi::GESTimelineElement, ffi::GESTimelineElementClass>) @implements Extractable; match fn { type_ => || ffi::ges_timeline_element_get_type(), } } pub const NONE_TIMELINE_ELEMENT: Option<&TimelineElement> = None; /// Trait containing all `TimelineElement` methods. /// /// # Implementors /// /// [`struct@crate::Container`], [`struct@crate::TimelineElement`], [`struct@crate::TrackElement`] pub trait TimelineElementExt: 'static { //#[doc(alias = "ges_timeline_element_add_child_property")] //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 [`crate::TimelineElement:parent`], /// [`crate::TimelineElement:timeline`] and [`crate::TimelineElement:name`]. Other data, /// such the list of a [`crate::Container`]'s children, is **not** copied. /// /// If `deep` is [`true`], then the new element is prepared so that it can be /// used in [`Self::paste()`] or [`crate::prelude::TimelineExt::paste_element()`]. /// In the case of copying a [`crate::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`. #[doc(alias = "ges_timeline_element_copy")] fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError>; /// See [`Self::edit_full()`], which also gives an error. /// /// Note that the `layers` argument is currently ignored, so you should /// just pass [`None`]. /// ## `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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_timeline_element_edit")] 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 /// [`crate::TimelineElement:start`], [`crate::TimelineElement:duration`] or /// [`crate::TimelineElement:in-point`], and potentially doing the same for /// other elements in the timeline. See [`crate::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 [`crate::TrackElement`], this will edit its parent /// [`crate::Clip`] instead. Moreover, for any [`crate::TimelineElement`], if you select /// [`crate::Edge::None`] for [`crate::EditMode::Normal`] or [`crate::EditMode::Ripple`], this /// will edit the toplevel instead, but still in such a way as to make the /// [`crate::TimelineElement:start`] of `self` reach the edit `position`. /// /// Note that if the element's timeline has a /// [`crate::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. /// ## `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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_timeline_element_edit_full")] fn edit_full( &self, new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> Result<(), glib::Error>; //#[doc(alias = "ges_timeline_element_get_child_properties")] //#[doc(alias = "get_child_properties")] //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); //#[doc(alias = "ges_timeline_element_get_child_property")] //#[doc(alias = "get_child_property")] //fn child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool; //#[doc(alias = "ges_timeline_element_get_child_property_by_pspec")] //#[doc(alias = "get_child_property_by_pspec")] //fn child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value); //#[doc(alias = "ges_timeline_element_get_child_property_valist")] //#[doc(alias = "get_child_property_valist")] //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); /// Gets the [`crate::TimelineElement:duration`] for the element. /// /// # Returns /// /// The duration of `self` (in nanoseconds). #[doc(alias = "ges_timeline_element_get_duration")] #[doc(alias = "get_duration")] fn duration(&self) -> gst::ClockTime; /// Gets the [`crate::TimelineElement:in-point`] for the element. /// /// # Returns /// /// The in-point of `self` (in nanoseconds). #[doc(alias = "ges_timeline_element_get_inpoint")] #[doc(alias = "get_inpoint")] fn inpoint(&self) -> gst::ClockTime; /// Gets the priority of the layer the element is in. A [`crate::Group`] may span /// several layers, so this would return the highest priority (numerically, /// the smallest) amongst them. /// /// # 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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] #[doc(alias = "ges_timeline_element_get_layer_priority")] #[doc(alias = "get_layer_priority")] fn layer_priority(&self) -> u32; /// Gets the [`crate::TimelineElement:max-duration`] for the element. /// /// # Returns /// /// The max-duration of `self` (in nanoseconds). #[doc(alias = "ges_timeline_element_get_max_duration")] #[doc(alias = "get_max_duration")] fn max_duration(&self) -> gst::ClockTime; /// Gets the [`crate::TimelineElement:name`] for the element. /// /// # Returns /// /// The name of `self`. #[doc(alias = "ges_timeline_element_get_name")] #[doc(alias = "get_name")] fn name(&self) -> Option<glib::GString>; /// Get the "natural" framerate of `self`. This is to say, for example /// for a [`crate::VideoUriSource`] the framerate of the source. /// /// Note that a [`crate::AudioSource`] may also have a natural framerate if it derives /// from the same [`crate::SourceClip`] asset as a [`crate::VideoSource`], and its value will /// be that of the video source. For example, if the uri of a [`crate::UriClip`] points /// to a file that contains both a video and audio stream, then the corresponding /// [`crate::AudioUriSource`] will share the natural framerate of the corresponding /// [`crate::VideoUriSource`]. /// ## `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"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] #[doc(alias = "ges_timeline_element_get_natural_framerate")] #[doc(alias = "get_natural_framerate")] fn natural_framerate(&self) -> Option<(i32, i32)>; /// Gets the [`crate::TimelineElement:parent`] for the element. /// /// # Returns /// /// The parent of `self`, or [`None`] if /// `self` has no parent. #[doc(alias = "ges_timeline_element_get_parent")] #[doc(alias = "get_parent")] fn parent(&self) -> Option<TimelineElement>; /// Gets the [`crate::TimelineElement:priority`] for the element. /// /// # Returns /// /// The priority of `self`. #[doc(alias = "ges_timeline_element_get_priority")] #[doc(alias = "get_priority")] fn priority(&self) -> u32; /// Gets the [`crate::TimelineElement:start`] for the element. /// /// # Returns /// /// The start of `self` (in nanoseconds). #[doc(alias = "ges_timeline_element_get_start")] #[doc(alias = "get_start")] fn start(&self) -> gst::ClockTime; /// Gets the [`crate::TimelineElement:timeline`] for the element. /// /// # Returns /// /// The timeline of `self`, or [`None`] /// if `self` has no timeline. #[doc(alias = "ges_timeline_element_get_timeline")] #[doc(alias = "get_timeline")] fn timeline(&self) -> Option<Timeline>; /// Gets the toplevel [`crate::TimelineElement:parent`] of the element. /// /// # Returns /// /// The toplevel parent of `self`. #[doc(alias = "ges_timeline_element_get_toplevel_parent")] #[doc(alias = "get_toplevel_parent")] fn toplevel_parent(&self) -> Option<TimelineElement>; /// Gets the track types that the element can interact with, i.e. the type /// of [`crate::Track`] it can exist in, or will create [`crate::TrackElement`]-s for. /// /// # Returns /// /// The track types that `self` supports. #[doc(alias = "ges_timeline_element_get_track_types")] #[doc(alias = "get_track_types")] fn track_types(&self) -> TrackType; //#[doc(alias = "ges_timeline_element_list_children_properties")] //fn list_children_properties(&self) -> /*Ignored*/Vec<glib::ParamSpec>; //#[doc(alias = "ges_timeline_element_lookup_child")] //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 [`Self::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 [`crate::prelude::TimelineExt::paste_element()`]. /// ## `paste_position` /// The position in the timeline `element` should be pasted /// to, i.e. the [`crate::TimelineElement:start`] value for the pasted element. /// /// # Returns /// /// The newly created element, or /// [`None`] if pasting fails. #[doc(alias = "ges_timeline_element_paste")] fn paste(&self, paste_position: gst::ClockTime) -> Result<TimelineElement, glib::BoolError>; //#[doc(alias = "ges_timeline_element_remove_child_property")] //fn remove_child_property(&self, pspec: /*Ignored*/&glib::ParamSpec) -> bool; /// Edits the start time of an element within its timeline in ripple mode. /// See [`Self::edit()`] with [`crate::EditMode::Ripple`] and /// [`crate::Edge::None`]. /// ## `start` /// The new start time of `self` in ripple mode /// /// # Returns /// /// [`true`] if the ripple edit of `self` completed, [`false`] on /// failure. #[doc(alias = "ges_timeline_element_ripple")] fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; /// Edits the end time of an element within its timeline in ripple mode. /// See [`Self::edit()`] with [`crate::EditMode::Ripple`] and /// [`crate::Edge::End`]. /// ## `end` /// The new end time of `self` in ripple mode /// /// # Returns /// /// [`true`] if the ripple edit of `self` completed, [`false`] on /// failure. #[doc(alias = "ges_timeline_element_ripple_end")] 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 [`Self::edit()`] with [`crate::EditMode::Roll`] and /// [`crate::Edge::End`]. /// ## `end` /// The new end time of `self` in roll mode /// /// # Returns /// /// [`true`] if the roll edit of `self` completed, [`false`] on failure. #[doc(alias = "ges_timeline_element_roll_end")] 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 [`Self::edit()`] with [`crate::EditMode::Roll`] and /// [`crate::Edge::Start`]. /// ## `start` /// The new start time of `self` in roll mode /// /// # Returns /// /// [`true`] if the roll edit of `self` completed, [`false`] on failure. #[doc(alias = "ges_timeline_element_roll_start")] fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; //#[doc(alias = "ges_timeline_element_set_child_properties")] //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs); //#[doc(alias = "ges_timeline_element_set_child_property")] //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool; //#[doc(alias = "ges_timeline_element_set_child_property_by_pspec")] //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value); //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //#[doc(alias = "ges_timeline_element_set_child_property_full")] //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error>; //#[doc(alias = "ges_timeline_element_set_child_property_valist")] //fn set_child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported); /// Sets [`crate::TimelineElement:duration`] for the element. /// /// Whilst the element is part of a [`crate::Timeline`], this is the same as /// editing the element with [`Self::edit()`] under /// [`crate::EditMode::Trim`] with [`crate::Edge::End`]. In particular, the /// [`crate::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`. #[doc(alias = "ges_timeline_element_set_duration")] fn set_duration(&self, duration: gst::ClockTime) -> bool; /// Sets [`crate::TimelineElement:in-point`] for the element. If the new in-point /// is above the current [`crate::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`. #[doc(alias = "ges_timeline_element_set_inpoint")] fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool; /// Sets [`crate::TimelineElement:max-duration`] for the element. If the new /// maximum duration is below the current [`crate::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`. #[doc(alias = "ges_timeline_element_set_max_duration")] fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool; /// Sets the [`crate::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 /// [`crate::UriClip`], and will set that name instead. /// /// If `self` already has a [`crate::TimelineElement:timeline`], you should not /// call this function with `name` set to [`None`]. /// /// You should ensure that, within each [`crate::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. #[doc(alias = "ges_timeline_element_set_name")] fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError>; /// Sets the [`crate::TimelineElement:parent`] for the element. /// /// This is used internally and you should normally not call this. A /// [`crate::Container`] will set the [`crate::TimelineElement:parent`] of its children /// in [`crate::prelude::GESContainerExt::add()`] and [`crate::prelude::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`. #[doc(alias = "ges_timeline_element_set_parent")] 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 [`crate::Effect`] priorities [`crate::prelude::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 = "Since 1.10")] #[doc(alias = "ges_timeline_element_set_priority")] fn set_priority(&self, priority: u32) -> bool; /// Sets [`crate::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 [`crate::Timeline`], this is the same as /// editing the element with [`Self::edit()`] under /// [`crate::EditMode::Normal`] with [`crate::Edge::None`]. In particular, the /// [`crate::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`. #[doc(alias = "ges_timeline_element_set_start")] fn set_start(&self, start: gst::ClockTime) -> bool; /// Sets the [`crate::TimelineElement:timeline`] of the element. /// /// This is used internally and you should normally not call this. A /// [`crate::Clip`] will have its [`crate::TimelineElement:timeline`] set through its /// [`crate::Layer`]. A [`crate::Track`] will similarly take care of setting the /// [`crate::TimelineElement:timeline`] of its [`crate::TrackElement`]-s. A [`crate::Group`] /// will adopt the same [`crate::TimelineElement:timeline`] as its children. /// /// If `timeline` is [`None`], this will stop its current /// [`crate::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`. #[doc(alias = "ges_timeline_element_set_timeline")] 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 [`Self::edit()`] with [`crate::EditMode::Trim`] and /// [`crate::Edge::Start`]. /// ## `start` /// The new start time of `self` in trim mode /// /// # Returns /// /// [`true`] if the trim edit of `self` completed, [`false`] on failure. #[doc(alias = "ges_timeline_element_trim")] fn trim(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError>; #[doc(alias = "in-point")] fn in_point(&self) -> u64; #[doc(alias = "in-point")] fn set_in_point(&self, in_point: u64); fn is_serialize(&self) -> bool; fn set_serialize(&self, serialize: bool); //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //#[doc(alias = "child-property-added")] //fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //#[doc(alias = "child-property-removed")] //fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId; //#[doc(alias = "deep-notify")] //fn connect_deep_notify<Unsupported or ignored types>(&self, detail: Option<&str>, f: F) -> SignalHandlerId; #[doc(alias = "duration")] fn connect_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "in-point")] fn connect_in_point_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "max-duration")] fn connect_max_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "name")] fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "parent")] fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[cfg_attr(feature = "v1_10", deprecated = "Since 1.10")] #[doc(alias = "priority")] fn connect_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "serialize")] fn connect_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "start")] fn connect_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; #[doc(alias = "timeline")] fn connect_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 ffi:ges_timeline_element_add_child_property() } //} fn copy(&self, deep: bool) -> Result<TimelineElement, glib::BoolError> { unsafe { Option::<_>::from_glib_none(ffi::ges_timeline_element_copy( self.as_ref().to_glib_none().0, deep.into_glib(), )) .ok_or_else(|| glib::bool_error!("Failed to copy timeline element")) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn edit( &self, layers: &[Layer], new_layer_priority: i64, mode: EditMode, edge: Edge, position: u64, ) -> bool { unsafe { from_glib(ffi::ges_timeline_element_edit( self.as_ref().to_glib_none().0, layers.to_glib_none().0, new_layer_priority, mode.into_glib(), edge.into_glib(), position, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] 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 _ = ffi::ges_timeline_element_edit_full( self.as_ref().to_glib_none().0, new_layer_priority, mode.into_glib(), edge.into_glib(), position, &mut error, ); if error.is_null() { Ok(()) } else { Err(from_glib_full(error)) } } } //fn child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ffi:ges_timeline_element_get_child_properties() } //} //fn child_property(&self, property_name: &str, value: /*Ignored*/glib::Value) -> bool { // unsafe { TODO: call ffi:ges_timeline_element_get_child_property() } //} //fn child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/glib::Value) { // unsafe { TODO: call ffi:ges_timeline_element_get_child_property_by_pspec() } //} //fn child_property_valist(&self, first_property_name: &str, var_args: /*Unknown conversion*//*Unimplemented*/Unsupported) { // unsafe { TODO: call ffi:ges_timeline_element_get_child_property_valist() } //} fn duration(&self) -> gst::ClockTime { unsafe { from_glib(ffi::ges_timeline_element_get_duration( self.as_ref().to_glib_none().0, )) } } fn inpoint(&self) -> gst::ClockTime { unsafe { from_glib(ffi::ges_timeline_element_get_inpoint( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_16", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_16")))] fn layer_priority(&self) -> u32 { unsafe { ffi::ges_timeline_element_get_layer_priority(self.as_ref().to_glib_none().0) } } fn max_duration(&self) -> gst::ClockTime { unsafe { from_glib(ffi::ges_timeline_element_get_max_duration( self.as_ref().to_glib_none().0, )) } } fn name(&self) -> Option<glib::GString> { unsafe { from_glib_full(ffi::ges_timeline_element_get_name( self.as_ref().to_glib_none().0, )) } } #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] fn 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(ffi::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 parent(&self) -> Option<TimelineElement> { unsafe { from_glib_full(ffi::ges_timeline_element_get_parent( self.as_ref().to_glib_none().0, )) } } fn priority(&self) -> u32 { unsafe { ffi::ges_timeline_element_get_priority(self.as_ref().to_glib_none().0) } } fn start(&self) -> gst::ClockTime { unsafe { from_glib(ffi::ges_timeline_element_get_start( self.as_ref().to_glib_none().0, )) } } fn timeline(&self) -> Option<Timeline> { unsafe { from_glib_full(ffi::ges_timeline_element_get_timeline( self.as_ref().to_glib_none().0, )) } } fn toplevel_parent(&self) -> Option<TimelineElement> { unsafe { from_glib_full(ffi::ges_timeline_element_get_toplevel_parent( self.as_ref().to_glib_none().0, )) } } fn track_types(&self) -> TrackType { unsafe { from_glib(ffi::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 ffi:ges_timeline_element_list_children_properties() } //} //fn lookup_child(&self, prop_name: &str, pspec: /*Ignored*/glib::ParamSpec) -> Option<glib::Object> { // unsafe { TODO: call ffi:ges_timeline_element_lookup_child() } //} fn paste(&self, paste_position: gst::ClockTime) -> Result<TimelineElement, glib::BoolError> { unsafe { Option::<_>::from_glib_full(ffi::ges_timeline_element_paste( self.as_ref().to_glib_none().0, paste_position.into_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 ffi:ges_timeline_element_remove_child_property() } //} fn ripple(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_timeline_element_ripple(self.as_ref().to_glib_none().0, start.into_glib()), "Failed to ripple" ) } } fn ripple_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_timeline_element_ripple_end( self.as_ref().to_glib_none().0, end.into_glib() ), "Failed to ripple" ) } } fn roll_end(&self, end: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_timeline_element_roll_end(self.as_ref().to_glib_none().0, end.into_glib()), "Failed to roll" ) } } fn roll_start(&self, start: gst::ClockTime) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::ges_timeline_element_roll_start( self.as_ref().to_glib_none().0, start.into_glib() ), "Failed to roll" ) } } //fn set_child_properties(&self, first_property_name: &str, : /*Unknown conversion*//*Unimplemented*/Fundamental: VarArgs) { // unsafe { TODO: call ffi:ges_timeline_element_set_child_properties() } //} //fn set_child_property(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> bool { // unsafe { TODO: call ffi:ges_timeline_element_set_child_property() } //} //fn set_child_property_by_pspec(&self, pspec: /*Ignored*/&glib::ParamSpec, value: /*Ignored*/&glib::Value) { // unsafe { TODO: call ffi:ges_timeline_element_set_child_property_by_pspec() } //} //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //fn set_child_property_full(&self, property_name: &str, value: /*Ignored*/&glib::Value) -> Result<(), glib::Error> { // unsafe { TODO: call ffi: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 ffi:ges_timeline_element_set_child_property_valist() } //} fn set_duration(&self, duration: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_duration( self.as_ref().to_glib_none().0, duration.into_glib(), )) } } fn set_inpoint(&self, inpoint: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_inpoint( self.as_ref().to_glib_none().0, inpoint.into_glib(), )) } } fn set_max_duration(&self, maxduration: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_max_duration( self.as_ref().to_glib_none().0, maxduration.into_glib(), )) } } fn set_name(&self, name: Option<&str>) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::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!( ffi::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(ffi::ges_timeline_element_set_priority( self.as_ref().to_glib_none().0, priority, )) } } fn set_start(&self, start: gst::ClockTime) -> bool { unsafe { from_glib(ffi::ges_timeline_element_set_start( self.as_ref().to_glib_none().0, start.into_glib(), )) } } fn set_timeline<P: IsA<Timeline>>(&self, timeline: &P) -> Result<(), glib::error::BoolError> { unsafe { glib::result_from_gboolean!( ffi::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!( ffi::ges_timeline_element_trim(self.as_ref().to_glib_none().0, start.into_glib()), "Failed to trim" ) } } fn in_point(&self) -> u64 { unsafe { let mut value = glib::Value::from_type(<u64 as StaticType>::static_type()); glib::gobject_ffi::g_object_get_property( self.to_glib_none().0 as *mut glib::gobject_ffi::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") } } fn set_in_point(&self, in_point: u64) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"in-point\0".as_ptr() as *const _, in_point.to_value().to_glib_none().0, ); } } fn is_serialize(&self) -> bool { unsafe { let mut value = glib::Value::from_type(<bool as StaticType>::static_type()); glib::gobject_ffi::g_object_get_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, value.to_glib_none_mut().0, ); value .get() .expect("Return Value for property `serialize` getter") } } fn set_serialize(&self, serialize: bool) { unsafe { glib::gobject_ffi::g_object_set_property( self.to_glib_none().0 as *mut glib::gobject_ffi::GObject, b"serialize\0".as_ptr() as *const _, serialize.to_value().to_glib_none().0, ); } } //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //#[doc(alias = "child-property-added")] //fn connect_child_property_added<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} //#[cfg(any(feature = "v1_18", feature = "dox"))] //#[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] //#[doc(alias = "child-property-removed")] //fn connect_child_property_removed<Unsupported or ignored types>(&self, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} //#[doc(alias = "deep-notify")] //fn connect_deep_notify<Unsupported or ignored types>(&self, detail: Option<&str>, f: F) -> SignalHandlerId { // Ignored prop: GObject.ParamSpec //} #[doc(alias = "duration")] fn connect_duration_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_duration_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "in-point")] fn connect_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 ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "max-duration")] fn connect_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 ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "name")] fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_name_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "parent")] fn connect_parent_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_parent_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "priority")] fn connect_priority_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_priority_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "serialize")] fn connect_serialize_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_serialize_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "start")] fn connect_start_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_start_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } #[doc(alias = "timeline")] fn connect_timeline_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { unsafe extern "C" fn notify_timeline_trampoline<P, F: Fn(&P) + 'static>( this: *mut ffi::GESTimelineElement, _param_spec: glib::ffi::gpointer, f: glib::ffi::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), ) } } }