Struct retro_message_ext

Source
#[repr(C)]
pub struct retro_message_ext { pub msg: *const c_char, pub duration: c_uint, pub priority: c_uint, pub level: retro_log_level, pub target: retro_message_target, pub type_: retro_message_type, pub progress: i8, }

Fields§

§msg: *const c_char

Message string to be displayed/logged

§duration: c_uint

Duration (in ms) of message when targeting the OSD

§priority: c_uint

Message priority when targeting the OSD

When multiple concurrent messages are sent to the frontend and the frontend does not have the capacity to display them all, messages with the highest priority value should be shown There is no upper limit to a message priority value (within the bounds of the unsigned data type) In the reference frontend (RetroArch), the same priority values are used for frontend-generated notifications, which are typically assigned values between 0 and 3 depending upon importance

§level: retro_log_level

Message logging level (info, warn, error, etc.)

§target: retro_message_target

Message destination: OSD, logging interface or both

§type_: retro_message_type

Message ‘type’ when targeting the OSD

RETRO_MESSAGE_TYPE_NOTIFICATION: Specifies that a message should be handled in identical fashion to a standard frontend-generated notification RETRO_MESSAGE_TYPE_NOTIFICATION_ALT: Specifies that message is a notification that requires user attention or action, but that it should be displayed in a manner that differs from standard frontend-generated notifications. This would typically correspond to messages that should be displayed immediately (independently from any internal frontend message queue), and/or which should be visually distinguishable from frontend-generated notifications. For example, a core may wish to inform the user of information related to a disk-change event. It is expected that the frontend itself may provide a notification in this case; if the core sends a message of type RETRO_MESSAGE_TYPE_NOTIFICATION, an uncomfortable ‘double-notification’ may occur. A message of RETRO_MESSAGE_TYPE_NOTIFICATION_ALT should therefore be presented such that visual conflict with regular notifications does not occur RETRO_MESSAGE_TYPE_STATUS: Indicates that message is not a standard notification. This typically corresponds to ‘status’ indicators, such as a core’s internal FPS, which are intended to be displayed either permanently while a core is running, or in a manner that does not suggest user attention or action is required. ‘Status’ type messages should therefore be displayed in a different on-screen location and in a manner easily distinguishable from both standard frontend-generated notifications and messages of type RETRO_MESSAGE_TYPE_NOTIFICATION_ALT RETRO_MESSAGE_TYPE_PROGRESS: Indicates that message reports the progress of an internal core task. For example, in cases where a core itself handles the loading of content from a file, this may correspond to the percentage of the file that has been read. Alternatively, an audio/video playback core may use a message of type RETRO_MESSAGE_TYPE_PROGRESS to display the current playback position as a percentage of the runtime. ‘Progress’ type messages should therefore be displayed as a literal progress bar, where:

  • ‘retro_message_ext.msg’ is the progress bar title/label
  • ‘retro_message_ext.progress’ determines the length of the progress bar NOTE: Message type is a hint, and may be ignored by the frontend. If a frontend lacks support for displaying messages via alternate means than standard frontend-generated notifications, it will treat all messages as having the type RETRO_MESSAGE_TYPE_NOTIFICATION
§progress: i8

Task progress when targeting the OSD and message is of type RETRO_MESSAGE_TYPE_PROGRESS

-1: Unmetered/indeterminate 0-100: Current progress percentage NOTE: Since message type is a hint, a frontend may ignore progress values. Where relevant, a core should therefore include progress percentage within the message string, such that the message intent remains clear when displayed as a standard frontend-generated notification

Trait Implementations§

Source§

impl Clone for retro_message_ext

Source§

fn clone(&self) -> retro_message_ext

Returns a duplicate of the value. Read more
1.0.0 · Source§

const fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for retro_message_ext

Source§

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

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

impl Copy for retro_message_ext

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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.