Struct AppInfo

Source
pub struct AppInfo {
    pub thread: thread_id,
    pub team: team_id,
    pub port: port_id,
    pub flags: u32,
    pub path: String,
    pub signature: String,
}
Expand description

Contains the information about a running application

The information is provided by Haiku’s registrar, and can be queried using the methods of the ROSTER object

Fields§

§thread: thread_id

The thread id for the main thread or -1 if the application is not running

§team: team_id

The team id for the running instance or -1 if the application is not running

§port: port_id

The port that is listening to Messages to be processed by the application’s main looper

§flags: u32

Any flags for this running application

You probably want to use the launch_type() function to get them

§path: String

The path of the executable

§signature: String

The mime type that represents the application’s signature

Implementations§

Source§

impl AppInfo

Source

pub fn launch_type(&self) -> LaunchType

Get the LaunchType for this application

Source

pub fn is_background(&self) -> bool

Determine if the application is a background application

Source

pub fn is_argv_only(&self) -> bool

Determine if the application only allows command line arguments for passing data, not messages.

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<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> 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<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<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.