gstreamer_gl_wayland/auto/gl_display_wayland.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;
7use glib::translate::*;
8
9glib::wrapper! {
10 /// the contents of a [`GLDisplayWayland`][crate::GLDisplayWayland] are private and should only be accessed
11 /// through the provided API
12 ///
13 /// # Implements
14 ///
15 /// [`trait@gst_gl::prelude::GLDisplayExt`], [`trait@gst::prelude::ObjectExt`], [`trait@glib::ObjectExt`]
16 #[doc(alias = "GstGLDisplayWayland")]
17 pub struct GLDisplayWayland(Object<ffi::GstGLDisplayWayland, ffi::GstGLDisplayWaylandClass>) @extends gst_gl::GLDisplay, gst::Object;
18
19 match fn {
20 type_ => || ffi::gst_gl_display_wayland_get_type(),
21 }
22}
23
24impl GLDisplayWayland {
25 pub const NONE: Option<&'static GLDisplayWayland> = None;
26
27 /// Create a new [`GLDisplayWayland`][crate::GLDisplayWayland] from the wayland display name. See `wl_display_connect`()
28 /// for details on what is a valid name.
29 /// ## `name`
30 /// a display name
31 ///
32 /// # Returns
33 ///
34 /// a new [`GLDisplayWayland`][crate::GLDisplayWayland] or [`None`]
35 #[doc(alias = "gst_gl_display_wayland_new")]
36 pub fn new(name: Option<&str>) -> Result<GLDisplayWayland, glib::BoolError> {
37 assert_initialized_main_thread!();
38 unsafe {
39 Option::<_>::from_glib_full(ffi::gst_gl_display_wayland_new(name.to_glib_none().0))
40 .ok_or_else(|| glib::bool_error!("Failed to create Wayland display"))
41 }
42 }
43
44 //#[doc(alias = "gst_gl_display_wayland_new_with_display")]
45 //#[doc(alias = "new_with_display")]
46 //pub fn with_display(display: /*Unimplemented*/Option<Basic: Pointer>) -> GLDisplayWayland {
47 // unsafe { TODO: call ffi:gst_gl_display_wayland_new_with_display() }
48 //}
49}
50
51unsafe impl Send for GLDisplayWayland {}
52unsafe impl Sync for GLDisplayWayland {}