1// Take a look at the license at the top of the repository in the LICENSE file.
2
3use glib::{prelude::*, translate::*};
4use libc::uintptr_t;
5
6use crate::VideoOverlay;
7
8mod sealed {
9 pub trait Sealed {}
10 impl<T: super::IsA<super::VideoOverlay>> Sealed for T {}
11}
12
13pub trait VideoOverlayExtManual: sealed::Sealed + IsA<VideoOverlay> + 'static {
14 unsafe fn set_window_handle(&self, handle: uintptr_t) {
15 ffi::gst_video_overlay_set_window_handle(self.as_ref().to_glib_none().0, handle)
16 }
17
18 unsafe fn got_window_handle(&self, handle: uintptr_t) {
19 ffi::gst_video_overlay_got_window_handle(self.as_ref().to_glib_none().0, handle)
20 }
21}
22
23impl<O: IsA<VideoOverlay>> VideoOverlayExtManual for O {}
24
25#[doc(alias = "gst_is_video_overlay_prepare_window_handle_message")]
26pub fn is_video_overlay_prepare_window_handle_message(msg: &gst::MessageRef) -> bool {
27 skip_assert_initialized!();
28 unsafe {
29 from_glib(val:ffi::gst_is_video_overlay_prepare_window_handle_message(
30 msg:msg.as_mut_ptr(),
31 ))
32 }
33}
34