From 3080c378979c85f63a67a715bb3ba699fd0baa32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Tue, 15 Mar 2022 15:25:30 +0200 Subject: [PATCH] video: Ignore new navigation event constructors And add doc aliases for the already existing manual implementations of them. --- gstreamer-video/Gir.toml | 27 +++++++++++++++++++++++++++ gstreamer-video/src/video_event.rs | 7 +++++++ 2 files changed, 34 insertions(+) diff --git a/gstreamer-video/Gir.toml b/gstreamer-video/Gir.toml index d7ddc8e64..5c20154f7 100644 --- a/gstreamer-video/Gir.toml +++ b/gstreamer-video/Gir.toml @@ -144,6 +144,33 @@ status = "generate" name = "event_get_type" manual = true + [[object.function]] + name = "event_new_command" + manual = true + + [[object.function]] + name = "event_new_key_press" + manual = true + + [[object.function]] + name = "event_new_key_release" + manual = true + + [[object.function]] + name = "event_new_mouse_button_press" + manual = true + + [[object.function]] + name = "event_new_mouse_button_release" + manual = true + + [[object.function]] + name = "event_new_mouse_move" + manual = true + + [[object.function]] + name = "event_new_mouse_scroll" + manual = true [[object.function]] name = "message_new_commands_changed" diff --git a/gstreamer-video/src/video_event.rs b/gstreamer-video/src/video_event.rs index 46162413f..f6629fd95 100644 --- a/gstreamer-video/src/video_event.rs +++ b/gstreamer-video/src/video_event.rs @@ -389,6 +389,7 @@ pub enum NavigationEvent { } impl NavigationEvent { + #[doc(alias = "gst_navigation_event_new_key_press")] pub fn new_key_press(key: &str) -> NavigationEvent { assert_initialized_main_thread!(); Self::KeyPress { @@ -396,6 +397,7 @@ impl NavigationEvent { } } + #[doc(alias = "gst_navigation_event_new_key_release")] pub fn new_key_release(key: &str) -> NavigationEvent { assert_initialized_main_thread!(); Self::KeyRelease { @@ -403,16 +405,19 @@ impl NavigationEvent { } } + #[doc(alias = "gst_navigation_event_new_mouse_move")] pub fn new_mouse_move(x: f64, y: f64) -> NavigationEvent { assert_initialized_main_thread!(); Self::MouseMove { x, y } } + #[doc(alias = "gst_navigation_event_new_mouse_button_press")] pub fn new_mouse_button_press(button: i32, x: f64, y: f64) -> NavigationEvent { assert_initialized_main_thread!(); Self::MouseButtonPress { button, x, y } } + #[doc(alias = "gst_navigation_event_new_mouse_button_release")] pub fn new_mouse_button_release(button: i32, x: f64, y: f64) -> NavigationEvent { assert_initialized_main_thread!(); Self::MouseButtonRelease { button, x, y } @@ -420,6 +425,7 @@ impl NavigationEvent { #[cfg(any(feature = "v1_18", feature = "dox"))] #[cfg_attr(feature = "dox", doc(cfg(feature = "v1_18")))] + #[doc(alias = "gst_navigation_event_new_mouse_scroll")] pub fn new_mouse_scroll(x: f64, y: f64, delta_x: f64, delta_y: f64) -> NavigationEvent { assert_initialized_main_thread!(); Self::MouseScroll { @@ -430,6 +436,7 @@ impl NavigationEvent { } } + #[doc(alias = "gst_navigation_event_new_command")] pub fn new_command(command: NavigationCommand) -> NavigationEvent { assert_initialized_main_thread!(); Self::Command { command }