Gtk4Application class

Namespace Runic.Desktop.Gtk4 · Runic.Desktop.Gtk4 0.7.0-preview.5

public static class Gtk4Application

Runs one GTK 4 and WebKitGTK 6 application on the Linux process main thread.

Methods

Run

public static int Run(Func<Task<int>> application)

Runs an application's asynchronous workload while GTK owns the calling main thread.

Remarks

Call this directly from Main, before top-level awaits. The GTK 4 provider does not support re-entering or restarting its native runtime.

Run

public static int Run(Func<Task<int>> application, string applicationId)

Runs GTK with the application's installed reverse-DNS identity.

Remarks

Inside Flatpak this must match the package ID. The overload without an ID uses the Flatpak ID automatically.