gdk_pixbuf::subclass::prelude

Trait ApplicationImpl

Source
pub trait ApplicationImpl: ObjectImpl + ApplicationImplExt {
    // Provided methods
    fn activate(&self) { ... }
    fn after_emit(&self, platform_data: &Variant) { ... }
    fn before_emit(&self, platform_data: &Variant) { ... }
    fn command_line(&self, command_line: &ApplicationCommandLine) -> ExitCode { ... }
    fn local_command_line(
        &self,
        arguments: &mut ArgumentList,
    ) -> Option<ExitCode> { ... }
    fn open(&self, files: &[File], hint: &str) { ... }
    fn quit_mainloop(&self) { ... }
    fn run_mainloop(&self) { ... }
    fn shutdown(&self) { ... }
    fn startup(&self) { ... }
    fn handle_local_options(&self, options: &VariantDict) -> ExitCode { ... }
}

Provided Methods§

Source

fn activate(&self)

Activates the application.

In essence, this results in the #GApplication::activate signal being emitted in the primary instance.

The application must be registered before calling this function.

Source

fn after_emit(&self, platform_data: &Variant)

invoked on the primary instance after ‘activate’, ‘open’, ‘command-line’ or any action invocation, gets the ‘platform data’ from the calling instance

Source

fn before_emit(&self, platform_data: &Variant)

invoked on the primary instance before ‘activate’, ‘open’, ‘command-line’ or any action invocation, gets the ‘platform data’ from the calling instance

Source

fn command_line(&self, command_line: &ApplicationCommandLine) -> ExitCode

invoked on the primary instance when a command-line is not handled locally

Source

fn local_command_line(&self, arguments: &mut ArgumentList) -> Option<ExitCode>

This virtual function is always invoked in the local instance. It gets passed a pointer to a None-terminated copy of @argv and is expected to remove arguments that it handled (shifting up remaining arguments).

The last argument to local_command_line() is a pointer to the @status variable which can used to set the exit status that is returned from g_application_run().

See g_application_run() for more details on #GApplication startup.

§arguments

array of command line arguments

§Returns

true if the commandline has been completely handled

§exit_status

exit status to fill after processing the command line.

Source

fn open(&self, files: &[File], hint: &str)

Opens the given files.

In essence, this results in the #GApplication::open signal being emitted in the primary instance.

@n_files must be greater than zero.

@hint is simply passed through to the ::open signal. It is intended to be used by applications that have multiple modes for opening files (eg: “view” vs “edit”, etc). Unless you have a need for this functionality, you should use “”.

The application must be registered before calling this function and it must have the ApplicationFlags::HANDLES_OPEN flag set.

§files

an array of #GFiles to open

§hint

a hint (or “”), but never None

Source

fn quit_mainloop(&self)

Used to be invoked on the primary instance when the use count of the application drops to zero (and after any inactivity timeout, if requested). Not used anymore since 2.32

Source

fn run_mainloop(&self)

Used to be invoked on the primary instance from g_application_run() if the use-count is non-zero. Since 2.32, GApplication is iterating the main context directly and is not using @run_mainloop anymore

Source

fn shutdown(&self)

invoked only on the registered primary instance immediately after the main loop terminates

Source

fn startup(&self)

invoked on the primary instance immediately after registration

Source

fn handle_local_options(&self, options: &VariantDict) -> ExitCode

invoked locally after the parsing of the commandline options has occurred. Since: 2.40

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§