Schnittstelle AppLaunchContext.OnLaunched

Umschließende Klasse:
AppLaunchContext
Funktionsschnittstelle:
Dies ist eine funktionale Schnittstelle, die somit als Zuweisungsziel für einen Lambdaausdruck oder eine Methodenreferenz verwendet werden kann.

@FunctionalInterface public static interface AppLaunchContext.OnLaunched
  • Methodenübersicht Linksymbol

    Modifizierer und Typ
    Methode
    Beschreibung
    void
    onLaunched(AppInfo info, Variant platform_data)
    The [signal@Gio.AppLaunchContext::launched] signal is emitted when a
    [iface@Gio.AppInfo] is successfully launched.
  • Methodendetails Linksymbol

    • onLaunched Linksymbol

      void onLaunched(@Nonnull AppInfo info, @Nonnull Variant platform_data)
      The [signal@Gio.AppLaunchContext::launched] signal is emitted when a
      [iface@Gio.AppInfo] is successfully launched.

      Because a launch operation may involve spawning multiple instances of the
      target application, you should expect this signal to be emitted multiple
      times, one time for each spawned instance.

      The @platform_data is an GVariant dictionary mapping
      strings to variants (ie `a{sv}`), which contains additional,
      platform-specific data about this launch. On UNIX, at least the
      `pid` and `startup-notification-id` keys will be present.

      Since 2.72 the `pid` may be 0 if the process id wasn’t known (for
      example if the process was launched via D-Bus). The `pid` may not be
      set at all in subsequent releases.

      On Windows, `pid` is guaranteed to be valid only for the duration of the
      [signal@Gio.AppLaunchContext::launched] signal emission; after the signal
      is emitted, GLib will call [func@GLib.spawn_close_pid]. If you need to
      keep the [alias@GLib.Pid] after the signal has been emitted, then you can
      duplicate `pid` using `DuplicateHandle()`.
      Parameter:
      info - the [iface@Gio.AppInfo] that was just launched
      platform_data - additional platform-specific data for this launch