pub struct ApplicationBuilder { /* private fields */ }Expand description
A builder-pattern type to construct Application objects.
Implementations§
Source§impl ApplicationBuilder
impl ApplicationBuilder
Sourcepub fn autosave_interval(self, autosave_interval: u32) -> Self
Available on crate feature v4_22 only.
pub fn autosave_interval(self, autosave_interval: u32) -> Self
v4_22 only.The number of seconds between automatic state saves. Defaults to 15. A value of 0 will opt out of automatic state saving.
The menu model to be used for the application’s menu bar.
Sourcepub fn register_session(self, register_session: bool) -> Self
👎Deprecated: Since 4.22
pub fn register_session(self, register_session: bool) -> Self
Set this property to true to register with the session manager.
This will make GTK track the session state (such as the
screensaver-active property).
This property is ignored. GTK always registers
with the session manager
Sourcepub fn support_save(self, support_save: bool) -> Self
Available on crate feature v4_22 only.
pub fn support_save(self, support_save: bool) -> Self
v4_22 only.Set this property to true if the application supports state saving and restoring.
Sourcepub fn application_id(self, application_id: impl Into<GString>) -> Self
pub fn application_id(self, application_id: impl Into<GString>) -> Self
The unique identifier for the application.
Sourcepub fn flags(self, flags: ApplicationFlags) -> Self
pub fn flags(self, flags: ApplicationFlags) -> Self
Flags specifying the behaviour of the application.
Sourcepub fn inactivity_timeout(self, inactivity_timeout: u32) -> Self
pub fn inactivity_timeout(self, inactivity_timeout: u32) -> Self
Time (in milliseconds) to stay alive after becoming idle.
Sourcepub fn resource_base_path(self, resource_base_path: impl Into<GString>) -> Self
pub fn resource_base_path(self, resource_base_path: impl Into<GString>) -> Self
The base resource path for the application.
Sourcepub fn version(self, version: impl Into<GString>) -> Self
Available on crate feature gio_v2_80 only.
pub fn version(self, version: impl Into<GString>) -> Self
gio_v2_80 only.The human-readable version number of the application.
Sourcepub fn build(self) -> Application
pub fn build(self) -> Application
Build the Application.