0.26.1 regenerate bindings
MODIFY
Cargo.toml
Cargo.toml
@@ -6,7 +6,7 @@ repository = "https://github.com/twistedfall/opencv-rust"
readme = "README.md"
keywords = [ "opencv", "vision" ]
license = "MIT"
-version = "0.26.0"
+version = "0.26.1"
edition = "2018"
authors = ["Mathieu Poumeyrol <kali@zoy.org>", "Pro <twisted.fall@gmail.com>"]
build = "build.rs"

MODIFY
src/opencv/hub/sys.rs
src/opencv/hub/sys.rs
@@ -3687,6 +3687,7 @@ mod viz_sys {
pub fn cv_viz_Viz3d_Viz3d_String(window_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_Viz3d_Viz3d(unnamed_arg: *mut c_void) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeWidget_String(instance: *mut c_void, id: *const c_char) -> cv_return_value_void;
+ pub fn cv_viz_Viz3d_getWidget_const_String(instance: *const c_void, id: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeAllWidgets(instance: *mut c_void) -> cv_return_value_void;
pub fn cv_viz_Viz3d_showImage__InputArray_Size(instance: *mut c_void, image: *mut c_void, window_size: core::Size) -> cv_return_value_void;
pub fn cv_viz_Viz3d_setCamera_Camera(instance: *mut c_void, camera: *mut c_void) -> cv_return_value_void;
@@ -3792,6 +3793,9 @@ mod viz_sys {
pub fn cv_viz_Widget_setRenderingProperty_int_double(instance: *mut c_void, property: i32, value: f64) -> cv_return_value_void;
pub fn cv_viz_Widget_getRenderingProperty_const_int(instance: *const c_void, property: i32) -> cv_return_value_double;
pub fn cv_Widget_delete(ptr : *mut c_void);
+ pub fn cv_viz_Widget_Widget() -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_Widget_Widget(other: *mut c_void) -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_fromPlyFile_String(file_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Widget2D_setColor_Color(instance: *mut c_void, color: *mut c_void) -> cv_return_value_void;
pub fn cv_Widget2D_delete(ptr : *mut c_void);
pub fn cv_viz_Widget2D_Widget2D() -> cv_return_value_void_X;

MODIFY
src/opencv/hub/viz.rs
src/opencv/hub/viz.rs
@@ -639,6 +639,18 @@ impl Viz3d {
unsafe { sys::cv_viz_Viz3d_removeWidget_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result()
}
+ /// Retrieves a widget from the window.
+ ///
+ /// A widget is implicitly shared; that is, if the returned widget is modified, the changes
+ /// will be immediately visible in the window.
+ ///
+ /// ## Parameters
+ /// * id: The id of the widget that will be returned.
+ pub fn get_widget(&self, id: &str) -> Result<crate::viz::Widget> {
+ string_arg!(id);
+ unsafe { sys::cv_viz_Viz3d_getWidget_const_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
/// Removes all widgets from the window.
pub fn remove_all_widgets(&mut self) -> Result<()> {
unsafe { sys::cv_viz_Viz3d_removeAllWidgets(self.as_raw_Viz3d()) }.into_result()
@@ -2433,6 +2445,26 @@ impl crate::viz::WidgetTrait for Widget {
#[inline(always)] fn as_raw_Widget(&self) -> *mut c_void { self.ptr }
}
+impl Widget {
+ pub fn default() -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget() }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ pub fn copy(other: &dyn crate::viz::WidgetTrait) -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget_Widget(other.as_raw_Widget()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ /// Creates a widget from ply file.
+ ///
+ /// ## Parameters
+ /// * file_name: Ply file name.
+ pub fn from_ply_file(file_name: &str) -> Result<crate::viz::Widget> {
+ string_arg!(file_name);
+ unsafe { sys::cv_viz_Widget_fromPlyFile_String(file_name.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+}
+
// Generating impl for trait crate::viz::Widget2D
/// Base class of all 2D widgets.
pub trait Widget2DTrait: crate::viz::WidgetTrait {

MODIFY
src/opencv_34/hub/sys.rs
src/opencv_34/hub/sys.rs
@@ -3687,6 +3687,7 @@ mod viz_sys {
pub fn cv_viz_Viz3d_Viz3d_String(window_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_Viz3d_Viz3d(unnamed_arg: *mut c_void) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeWidget_String(instance: *mut c_void, id: *const c_char) -> cv_return_value_void;
+ pub fn cv_viz_Viz3d_getWidget_const_String(instance: *const c_void, id: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeAllWidgets(instance: *mut c_void) -> cv_return_value_void;
pub fn cv_viz_Viz3d_showImage__InputArray_Size(instance: *mut c_void, image: *mut c_void, window_size: core::Size) -> cv_return_value_void;
pub fn cv_viz_Viz3d_setCamera_Camera(instance: *mut c_void, camera: *mut c_void) -> cv_return_value_void;
@@ -3792,6 +3793,9 @@ mod viz_sys {
pub fn cv_viz_Widget_setRenderingProperty_int_double(instance: *mut c_void, property: i32, value: f64) -> cv_return_value_void;
pub fn cv_viz_Widget_getRenderingProperty_const_int(instance: *const c_void, property: i32) -> cv_return_value_double;
pub fn cv_Widget_delete(ptr : *mut c_void);
+ pub fn cv_viz_Widget_Widget() -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_Widget_Widget(other: *mut c_void) -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_fromPlyFile_String(file_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Widget2D_setColor_Color(instance: *mut c_void, color: *mut c_void) -> cv_return_value_void;
pub fn cv_Widget2D_delete(ptr : *mut c_void);
pub fn cv_viz_Widget2D_Widget2D() -> cv_return_value_void_X;

MODIFY
src/opencv_34/hub/viz.rs
src/opencv_34/hub/viz.rs
@@ -639,6 +639,18 @@ impl Viz3d {
unsafe { sys::cv_viz_Viz3d_removeWidget_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result()
}
+ /// Retrieves a widget from the window.
+ ///
+ /// A widget is implicitly shared; that is, if the returned widget is modified, the changes
+ /// will be immediately visible in the window.
+ ///
+ /// ## Parameters
+ /// * id: The id of the widget that will be returned.
+ pub fn get_widget(&self, id: &str) -> Result<crate::viz::Widget> {
+ string_arg!(id);
+ unsafe { sys::cv_viz_Viz3d_getWidget_const_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
/// Removes all widgets from the window.
pub fn remove_all_widgets(&mut self) -> Result<()> {
unsafe { sys::cv_viz_Viz3d_removeAllWidgets(self.as_raw_Viz3d()) }.into_result()
@@ -2433,6 +2445,26 @@ impl crate::viz::WidgetTrait for Widget {
#[inline(always)] fn as_raw_Widget(&self) -> *mut c_void { self.ptr }
}
+impl Widget {
+ pub fn default() -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget() }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ pub fn copy(other: &dyn crate::viz::WidgetTrait) -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget_Widget(other.as_raw_Widget()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ /// Creates a widget from ply file.
+ ///
+ /// ## Parameters
+ /// * file_name: Ply file name.
+ pub fn from_ply_file(file_name: &str) -> Result<crate::viz::Widget> {
+ string_arg!(file_name);
+ unsafe { sys::cv_viz_Widget_fromPlyFile_String(file_name.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+}
+
// Generating impl for trait crate::viz::Widget2D
/// Base class of all 2D widgets.
pub trait Widget2DTrait: crate::viz::WidgetTrait {

MODIFY
src/opencv_41/hub/sys.rs
src/opencv_41/hub/sys.rs
@@ -3795,6 +3795,7 @@ mod viz_sys {
pub fn cv_viz_Viz3d_Viz3d_String(window_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_Viz3d_Viz3d(unnamed_arg: *mut c_void) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeWidget_String(instance: *mut c_void, id: *const c_char) -> cv_return_value_void;
+ pub fn cv_viz_Viz3d_getWidget_const_String(instance: *const c_void, id: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Viz3d_removeAllWidgets(instance: *mut c_void) -> cv_return_value_void;
pub fn cv_viz_Viz3d_showImage__InputArray_Size(instance: *mut c_void, image: *mut c_void, window_size: core::Size) -> cv_return_value_void;
pub fn cv_viz_Viz3d_setCamera_Camera(instance: *mut c_void, camera: *mut c_void) -> cv_return_value_void;
@@ -3900,6 +3901,9 @@ mod viz_sys {
pub fn cv_viz_Widget_setRenderingProperty_int_double(instance: *mut c_void, property: i32, value: f64) -> cv_return_value_void;
pub fn cv_viz_Widget_getRenderingProperty_const_int(instance: *const c_void, property: i32) -> cv_return_value_double;
pub fn cv_Widget_delete(ptr : *mut c_void);
+ pub fn cv_viz_Widget_Widget() -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_Widget_Widget(other: *mut c_void) -> cv_return_value_void_X;
+ pub fn cv_viz_Widget_fromPlyFile_String(file_name: *const c_char) -> cv_return_value_void_X;
pub fn cv_viz_Widget2D_setColor_Color(instance: *mut c_void, color: *mut c_void) -> cv_return_value_void;
pub fn cv_Widget2D_delete(ptr : *mut c_void);
pub fn cv_viz_Widget2D_Widget2D() -> cv_return_value_void_X;

MODIFY
src/opencv_41/hub/viz.rs
src/opencv_41/hub/viz.rs
@@ -639,6 +639,18 @@ impl Viz3d {
unsafe { sys::cv_viz_Viz3d_removeWidget_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result()
}
+ /// Retrieves a widget from the window.
+ ///
+ /// A widget is implicitly shared; that is, if the returned widget is modified, the changes
+ /// will be immediately visible in the window.
+ ///
+ /// ## Parameters
+ /// * id: The id of the widget that will be returned.
+ pub fn get_widget(&self, id: &str) -> Result<crate::viz::Widget> {
+ string_arg!(id);
+ unsafe { sys::cv_viz_Viz3d_getWidget_const_String(self.as_raw_Viz3d(), id.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
/// Removes all widgets from the window.
pub fn remove_all_widgets(&mut self) -> Result<()> {
unsafe { sys::cv_viz_Viz3d_removeAllWidgets(self.as_raw_Viz3d()) }.into_result()
@@ -2433,6 +2445,26 @@ impl crate::viz::WidgetTrait for Widget {
#[inline(always)] fn as_raw_Widget(&self) -> *mut c_void { self.ptr }
}
+impl Widget {
+ pub fn default() -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget() }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ pub fn copy(other: &dyn crate::viz::WidgetTrait) -> Result<crate::viz::Widget> {
+ unsafe { sys::cv_viz_Widget_Widget_Widget(other.as_raw_Widget()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+ /// Creates a widget from ply file.
+ ///
+ /// ## Parameters
+ /// * file_name: Ply file name.
+ pub fn from_ply_file(file_name: &str) -> Result<crate::viz::Widget> {
+ string_arg!(file_name);
+ unsafe { sys::cv_viz_Widget_fromPlyFile_String(file_name.as_ptr()) }.into_result().map(|ptr| crate::viz::Widget { ptr })
+ }
+
+}
+
// Generating impl for trait crate::viz::Widget2D
/// Base class of all 2D widgets.
pub trait Widget2DTrait: crate::viz::WidgetTrait {

0.26.1 regenerate bindings