From 394c24b2fa6bebaadc08947c5d5bcb8a15675f83 Mon Sep 17 00:00:00 2001 From: Timofey Date: Tue, 15 Nov 2022 10:50:08 +0100 Subject: [PATCH] Medium-level API: `api_test`, `api_exists(str)` moved api_* functions --- main/medium/src/reaper.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/main/medium/src/reaper.rs b/main/medium/src/reaper.rs index f4374c23..fe958f2e 100644 --- a/main/medium/src/reaper.rs +++ b/main/medium/src/reaper.rs @@ -1127,6 +1127,22 @@ impl Reaper { self.low.AnyTrackSolo(project.to_raw()) } + /// True if function name exists in the REAPER API + pub fn api_exists(&self, function_name: ReaperStringArg) -> bool + where + UsageScope: MainThreadOnly, + { + unsafe { self.low().APIExists(function_name.as_ptr()) } + } + + /// Displays a message window if the API was successfully called. + pub fn api_test(&self) + where + UsageScope: MainThreadOnly, + { + self.low().APITest() + } + /// Directly simulates a play button hit. /// /// # Panics