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 glib::{prelude::*, translate::*};
7
8glib::wrapper! {
9 #[doc(alias = "GstVideoOverlay")]
10 pub struct VideoOverlay(Interface<ffi::GstVideoOverlay, ffi::GstVideoOverlayInterface>);
11
12 match fn {
13 type_ => || ffi::gst_video_overlay_get_type(),
14 }
15}
16
17impl VideoOverlay {
18 pub const NONE: Option<&'static VideoOverlay> = None;
19
20 //#[doc(alias = "gst_video_overlay_install_properties")]
21 //pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) {
22 // unsafe { TODO: call ffi:gst_video_overlay_install_properties() }
23 //}
24}
25
26unsafe impl Send for VideoOverlay {}
27unsafe impl Sync for VideoOverlay {}
28
29mod sealed {
30 pub trait Sealed {}
31 impl<T: super::IsA<super::VideoOverlay>> Sealed for T {}
32}
33
34pub trait VideoOverlayExt: IsA<VideoOverlay> + sealed::Sealed + 'static {
35 #[doc(alias = "gst_video_overlay_expose")]
36 fn expose(&self) {
37 unsafe {
38 ffi::gst_video_overlay_expose(self.as_ref().to_glib_none().0);
39 }
40 }
41
42 //#[doc(alias = "gst_video_overlay_got_window_handle")]
43 //fn got_window_handle(&self, handle: /*Unimplemented*/Basic: UIntPtr) {
44 // unsafe { TODO: call ffi:gst_video_overlay_got_window_handle() }
45 //}
46
47 #[doc(alias = "gst_video_overlay_handle_events")]
48 fn handle_events(&self, handle_events: bool) {
49 unsafe {
50 ffi::gst_video_overlay_handle_events(
51 self.as_ref().to_glib_none().0,
52 handle_events.into_glib(),
53 );
54 }
55 }
56
57 #[doc(alias = "gst_video_overlay_prepare_window_handle")]
58 fn prepare_window_handle(&self) {
59 unsafe {
60 ffi::gst_video_overlay_prepare_window_handle(self.as_ref().to_glib_none().0);
61 }
62 }
63
64 #[doc(alias = "gst_video_overlay_set_render_rectangle")]
65 fn set_render_rectangle(
66 &self,
67 x: i32,
68 y: i32,
69 width: i32,
70 height: i32,
71 ) -> Result<(), glib::error::BoolError> {
72 unsafe {
73 glib::result_from_gboolean!(
74 ffi::gst_video_overlay_set_render_rectangle(
75 self.as_ref().to_glib_none().0,
76 x,
77 y,
78 width,
79 height
80 ),
81 "Failed to set render rectangle"
82 )
83 }
84 }
85}
86
87impl<O: IsA<VideoOverlay>> VideoOverlayExt for O {}
88