2018-04-23 17:34:22 +00:00
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
2017-08-11 12:03:16 +00:00
// DO NOT EDIT
use ffi ;
use glib ;
use glib ::object ::IsA ;
use glib ::translate ::* ;
glib_wrapper! {
2017-11-09 11:33:40 +00:00
pub struct VideoOverlay ( Object < ffi ::GstVideoOverlay , ffi ::GstVideoOverlayInterface > ) ;
2017-08-11 12:03:16 +00:00
match fn {
get_type = > | | ffi ::gst_video_overlay_get_type ( ) ,
}
}
2018-03-15 08:24:56 +00:00
impl VideoOverlay {
//pub fn install_properties(oclass: /*Ignored*/&mut glib::ObjectClass, last_prop_id: i32) {
// unsafe { TODO: call ffi::gst_video_overlay_install_properties() }
//}
//pub fn set_property<P: IsA<glib::Object>>(object: &P, last_prop_id: i32, property_id: u32, value: /*Ignored*/&glib::Value) -> bool {
// unsafe { TODO: call ffi::gst_video_overlay_set_property() }
//}
}
2017-08-11 12:03:16 +00:00
unsafe impl Send for VideoOverlay { }
unsafe impl Sync for VideoOverlay { }
2018-12-08 09:05:20 +00:00
pub trait VideoOverlayExt : 'static {
2017-08-11 12:03:16 +00:00
fn expose ( & self ) ;
//fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr);
fn handle_events ( & self , handle_events : bool ) ;
2018-09-13 19:53:13 +00:00
fn prepare_window_handle ( & self ) ;
2017-08-11 12:03:16 +00:00
fn set_render_rectangle ( & self , x : i32 , y : i32 , width : i32 , height : i32 ) -> Result < ( ) , glib ::error ::BoolError > ;
//fn set_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr);
}
impl < O : IsA < VideoOverlay > > VideoOverlayExt for O {
fn expose ( & self ) {
unsafe {
ffi ::gst_video_overlay_expose ( self . to_glib_none ( ) . 0 ) ;
}
}
//fn got_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) {
// unsafe { TODO: call ffi::gst_video_overlay_got_window_handle() }
//}
fn handle_events ( & self , handle_events : bool ) {
unsafe {
ffi ::gst_video_overlay_handle_events ( self . to_glib_none ( ) . 0 , handle_events . to_glib ( ) ) ;
}
}
2018-09-13 19:53:13 +00:00
fn prepare_window_handle ( & self ) {
unsafe {
ffi ::gst_video_overlay_prepare_window_handle ( self . to_glib_none ( ) . 0 ) ;
}
}
2017-08-11 12:03:16 +00:00
fn set_render_rectangle ( & self , x : i32 , y : i32 , width : i32 , height : i32 ) -> Result < ( ) , glib ::error ::BoolError > {
unsafe {
glib ::error ::BoolError ::from_glib ( ffi ::gst_video_overlay_set_render_rectangle ( self . to_glib_none ( ) . 0 , x , y , width , height ) , " Failed to set render rectangle " )
}
}
//fn set_window_handle(&self, handle: /*Unimplemented*/Fundamental: UIntPtr) {
// unsafe { TODO: call ffi::gst_video_overlay_set_window_handle() }
//}
}