Skip to content

Commit

Permalink
Medium-level API: api_test, api_exists(str)
Browse files Browse the repository at this point in the history
moved api_* functions
  • Loading branch information
Levitanus committed Nov 15, 2022
1 parent f2c4a65 commit 394c24b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions main/medium/src/reaper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1127,6 +1127,22 @@ impl<UsageScope> Reaper<UsageScope> {
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
Expand Down

0 comments on commit 394c24b

Please sign in to comment.