gstreamer_vulkan_wayland/auto/vulkan_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 [`VulkanDisplayWayland`][crate::VulkanDisplayWayland] are private and should only be accessed
11 /// through the provided API
12 ///
13 /// # Implements
14 ///
15 /// [`trait@gst::prelude::ObjectExt`], [`trait@glib::ObjectExt`]
16 #[doc(alias = "GstVulkanDisplayWayland")]
17 pub struct VulkanDisplayWayland(Object<ffi::GstVulkanDisplayWayland, ffi::GstVulkanDisplayWaylandClass>) @extends gst::Object;
18
19 match fn {
20 type_ => || ffi::gst_vulkan_display_wayland_get_type(),
21 }
22}
23
24impl VulkanDisplayWayland {
25 pub const NONE: Option<&'static VulkanDisplayWayland> = None;
26
27 /// Create a new [`VulkanDisplayWayland`][crate::VulkanDisplayWayland] 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 [`VulkanDisplayWayland`][crate::VulkanDisplayWayland] or [`None`]
35 #[doc(alias = "gst_vulkan_display_wayland_new")]
36 pub fn new(name: Option<&str>) -> Result<VulkanDisplayWayland, glib::BoolError> {
37 assert_initialized_main_thread!();
38 unsafe {
39 Option::<_>::from_glib_full(ffi::gst_vulkan_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_vulkan_display_wayland_new_with_display")]
45 //#[doc(alias = "new_with_display")]
46 //pub fn with_display(display: /*Unimplemented*/Option<Basic: Pointer>) -> VulkanDisplayWayland {
47 // unsafe { TODO: call ffi:gst_vulkan_display_wayland_new_with_display() }
48 //}
49}
50
51unsafe impl Send for VulkanDisplayWayland {}
52unsafe impl Sync for VulkanDisplayWayland {}