gstreamer_editing_services/auto/
command_line_formatter.rs

1// This file was generated by gir (https://github.com/gtk-rs/gir)
2// from gir-files (https://github.com/gtk-rs/gir-files)
3// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
4// DO NOT EDIT
5
6use crate::{ffi, Extractable, Formatter, Timeline};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10    ///
11    ///
12    /// # Implements
13    ///
14    /// [`FormatterExt`][trait@crate::prelude::FormatterExt], [`trait@glib::ObjectExt`], [`ExtractableExt`][trait@crate::prelude::ExtractableExt]
15    #[doc(alias = "GESCommandLineFormatter")]
16    pub struct CommandLineFormatter(Object<ffi::GESCommandLineFormatter, ffi::GESCommandLineFormatterClass>) @extends Formatter, @implements Extractable;
17
18    match fn {
19        type_ => || ffi::ges_command_line_formatter_get_type(),
20    }
21}
22
23impl CommandLineFormatter {
24    pub const NONE: Option<&'static CommandLineFormatter> = None;
25
26    /// Creates a help string based on `commands`.
27    ///
28    /// Result: (transfer full): A help string.
29    /// ## `commands`
30    /// Commands
31    #[doc(alias = "ges_command_line_formatter_get_help")]
32    #[doc(alias = "get_help")]
33    pub fn help(commands: &[&str]) -> glib::GString {
34        assert_initialized_main_thread!();
35        let nargs = commands.len() as _;
36        unsafe {
37            from_glib_full(ffi::ges_command_line_formatter_get_help(
38                nargs,
39                commands.to_glib_none().0,
40            ))
41        }
42    }
43
44    /// ## `timeline`
45    /// A GESTimeline to serialize
46    #[doc(alias = "ges_command_line_formatter_get_timeline_uri")]
47    #[doc(alias = "get_timeline_uri")]
48    pub fn timeline_uri(timeline: &impl IsA<Timeline>) -> glib::GString {
49        skip_assert_initialized!();
50        unsafe {
51            from_glib_full(ffi::ges_command_line_formatter_get_timeline_uri(
52                timeline.as_ref().to_glib_none().0,
53            ))
54        }
55    }
56}