2019-11-25 14:17:13 +01:00
|
|
|
//! Configure your application.
|
2023-07-12 19:21:05 -07:00
|
|
|
use crate::core::window;
|
2023-02-23 09:31:48 -08:00
|
|
|
|
2023-09-18 19:07:41 +02:00
|
|
|
use std::borrow::Cow;
|
2020-05-21 00:37:47 +02:00
|
|
|
|
2019-11-25 14:17:13 +01:00
|
|
|
/// The settings of an application.
|
2020-07-01 06:09:39 +02:00
|
|
|
#[derive(Debug, Clone, Default)]
|
2020-03-30 18:00:15 +02:00
|
|
|
pub struct Settings<Flags> {
|
2021-08-11 19:23:05 +07:00
|
|
|
/// The identifier of the application.
|
|
|
|
|
///
|
|
|
|
|
/// If provided, this identifier may be used to identify the application or
|
|
|
|
|
/// communicate with it through the windowing system.
|
|
|
|
|
pub id: Option<String>,
|
|
|
|
|
|
2023-11-29 22:46:47 +01:00
|
|
|
/// The [`window::Settings`].
|
2023-07-12 19:21:05 -07:00
|
|
|
pub window: window::Settings,
|
2019-12-29 12:29:47 +01:00
|
|
|
|
2020-03-30 18:00:15 +02:00
|
|
|
/// The data needed to initialize an [`Application`].
|
|
|
|
|
///
|
2020-11-25 07:11:27 +01:00
|
|
|
/// [`Application`]: crate::Application
|
2020-03-30 18:00:15 +02:00
|
|
|
pub flags: Flags,
|
2020-05-21 00:37:47 +02:00
|
|
|
|
2023-09-18 19:07:41 +02:00
|
|
|
/// The fonts to load on boot.
|
|
|
|
|
pub fonts: Vec<Cow<'static, [u8]>>,
|
2019-11-25 14:17:13 +01:00
|
|
|
}
|