Struct renga_api_rs::Application

source ·
pub struct Application { /* private fields */ }
Expand description

Represents entire Renga application.

Currently, you can obtain instance of this struct only by using Application::new or Application::new_hidden methods. Accessing running instances of Renga is still in development.

See Official documentation

Implementations§

source§

impl Application

source

pub fn new() -> Result<Self>

Creates new instance of Renga application1.

See Application::new_hidden

./RengaProfessional.exe /regserver

If your Renga distribution comes from official installer, you can skip this step - Renga will be automatically registered.


  1. Renga must be registered in Windows registry for this method to work. You can do it by launching powershell as administrator in Renga folder and running the following command: 

source

pub fn new_hidden() -> Result<Self>

Creates new headless instance of Renga application.

The ability to launch Renga without a GUI is advantageous for testing purposes. Actually, this crate using this feature for self-testing!

See Application::new

source

pub fn try_quit(&mut self) -> Result<()>

Tries to close Renga application.

See Application::quit

source

pub fn quit(&mut self)

Closes Renga application.

This method will not fail. If any error occurs, it will be logged.

See Application::try_quit

source

pub fn version(&self) -> Result<Version>

Returns semantic version of Renga application.

source

pub fn enabled(&self) -> Result<bool>

Returns true, if user input is enabled in this instance.

See Application::set_enabled

source

pub fn visible(&self) -> Result<bool>

Returns true, if user interface is visible in this instance.

See Application::set_visible

source

pub fn set_enabled(&mut self, value: bool) -> Result<&mut Self>

Sets user input to be enabled or disabled in this instance.

See Application::enabled

source

pub fn set_visible(&mut self, value: bool) -> Result<&mut Self>

Sets user interface to be visible or hidden in this instance.

See Application::visible

source

pub fn project(&mut self) -> Result<Option<Project>>

Returns currently active project.

Can be None if there is no active project opened.

You can create new project by calling Application::new_project or open existing project by calling Application::open_project.

source

pub fn new_project(&mut self) -> Result<Project>

Creates new project.

Can return error in the following cases:

See Application::open_project

source

pub fn open_project(&mut self, path: &Path) -> Result<Project>

Opens existing project from given path.

Can return error in the following cases:

See Application::new_project

source

pub fn native_window_handle(&self) -> Result<HWND>

Returns native handle of the main window.

Trait Implementations§

source§

impl Debug for Application

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Drop for Application

Drop implementation for Application.

  • Closes project if it exists, discarding any changes.
  • Closes Renga application.

This function never fails or panics. If any error occurs, it will be logged.

source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src
where Scheme: ApproxScheme,

source§

type Err = NoError

The error type produced by a failed conversion.
source§

fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>

Convert the given value into an approximately equivalent representation.
source§

impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src
where Dst: ApproxFrom<Src, Scheme>, Scheme: ApproxScheme,

source§

type Err = <Dst as ApproxFrom<Src, Scheme>>::Err

The error type produced by a failed conversion.
source§

fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>

Convert the subject into an approximately equivalent representation.
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, Dst> ConvAsUtil<Dst> for T

source§

fn approx(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject with the default scheme.
source§

fn approx_by<Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject with a specific scheme.
source§

impl<T> ConvUtil for T

source§

fn approx_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst>,

Approximate the subject to a given type with the default scheme.
source§

fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
where Self: Sized + ApproxInto<Dst, Scheme>, Scheme: ApproxScheme,

Approximate the subject to a given type with a specific scheme.
source§

fn into_as<Dst>(self) -> Dst
where Self: Sized + Into<Dst>,

Convert the subject to a given type.
source§

fn try_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + TryInto<Dst>,

Attempt to convert the subject to a given type.
source§

fn value_as<Dst>(self) -> Result<Dst, Self::Err>
where Self: Sized + ValueInto<Dst>,

Attempt a value conversion of the subject to a given type.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<Src> TryFrom<Src> for Src

source§

type Err = NoError

The error type produced by a failed conversion.
source§

fn try_from(src: Src) -> Result<Src, <Src as TryFrom<Src>>::Err>

Convert the given value into the subject type.
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<Src, Dst> TryInto<Dst> for Src
where Dst: TryFrom<Src>,

source§

type Err = <Dst as TryFrom<Src>>::Err

The error type produced by a failed conversion.
source§

fn try_into(self) -> Result<Dst, <Src as TryInto<Dst>>::Err>

Convert the subject into the destination type.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<Src> ValueFrom<Src> for Src

source§

type Err = NoError

The error type produced by a failed conversion.
source§

fn value_from(src: Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>

Convert the given value into an exactly equivalent representation.
source§

impl<Src, Dst> ValueInto<Dst> for Src
where Dst: ValueFrom<Src>,

source§

type Err = <Dst as ValueFrom<Src>>::Err

The error type produced by a failed conversion.
source§

fn value_into(self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>

Convert the subject into an exactly equivalent representation.