1// Take a look at the license at the top of the repository in the LICENSE file.
23use glib::{prelude::*, translate::*};
4use libc::uintptr_t;
56use crate::{ffi, VideoOverlay};
78pub trait VideoOverlayExtManual: IsA<VideoOverlay> + 'static {
9/// This will call the video overlay's set_window_handle method. You
10 /// should use this method to tell to an overlay to display video output to a
11 /// specific window (e.g. an XWindow on X11). Passing 0 as the `handle` will
12 /// tell the overlay to stop using that window and create an internal one.
13 /// ## `handle`
14 /// a handle referencing the window.
15unsafe fn set_window_handle(&self, handle: uintptr_t) {
16 ffi::gst_video_overlay_set_window_handle(self.as_ref().to_glib_none().0, handle)
17 }
1819unsafe fn got_window_handle(&self, handle: uintptr_t) {
20 ffi::gst_video_overlay_got_window_handle(self.as_ref().to_glib_none().0, handle)
21 }
22}
2324impl<O: IsA<VideoOverlay>> VideoOverlayExtManual for O {}
2526#[doc(alias = "gst_is_video_overlay_prepare_window_handle_message")]
27pub fn is_video_overlay_prepare_window_handle_message(msg: &gst::MessageRef) -> bool {
28skip_assert_initialized!();
29unsafe {
30 from_glib(ffi::gst_is_video_overlay_prepare_window_handle_message(
31 msg.as_mut_ptr(),
32 ))
33 }
34}