Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AppInfoMonitorChangedCallback

[185:7] extends: object

Generated low-level callback wrapper for GIR callback changed.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • AppInfoMonitorChangedCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.

class: AppInfoMonitorMeta

[255:14] static extends: object

Generated metadata helpers for AppInfoMonitor class surfaces.

Methods

  • signals ()

    Returns signal metadata for AppInfoMonitor.

    • @r A list.

class: AppInfoMonitor

[44:7] extends: object

GAppInfoMonitor monitors application information for changes. GAppInfoMonitor is a very simple object used for monitoring the app info database for changes (newly installed or removed applications). Call [func@Gio.AppInfoMonitor.get] to get a GAppInfoMonitor and connect to the [signal@Gio.AppInfoMonitor::changed] signal. The signal will be emitted once when the app info database changes, and will not be emitted again until after the next call to [func@Gio.AppInfo.get_all] or another g_app_info_*() function. This is because monitoring the app info database for changes is expensive. The following functions will re-arm the [signal@Gio.AppInfoMonitor::changed] signal so it can be emitted again: - [func@Gio.AppInfo.get_all] - [func@Gio.AppInfo.get_all_for_type] - [func@Gio.AppInfo.get_default_for_type] - [func@Gio.AppInfo.get_fallback_for_type] - [func@Gio.AppInfo.get_recommended_for_type] - g_desktop_app_info_get_implementations()

g_desktop_app_info_new_from_keyfile()

g_desktop_app_info_search() The latter functions are available if using GDesktopAppInfo from gio-unix-2.0.pc (GIR namespace GioUnix-2.0). In the usual case, applications should try to make note of the change (doing things like invalidating caches) but not act on it. In particular, applications should avoid making calls to GAppInfo APIs in response to the change signal, deferring these until the time that the updated data is actually required. The exception to this case is when application information is actually being displayed on the screen (for example, during a search or when the list of all applications is shown). The reason for this is that changes to the list of installed applications often come in groups (like during system updates) and rescanning the list on every change is pointless and expensive.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • AppInfoMonitor (Handle = null)

    Creates a new AppInfoMonitor by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asObject ()

    Wraps this handle as Object.

    • @r A Object object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnChanged (callback Fn, UserData = null)

    Signal emitted when the app info database changes, when applications are installed or removed.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (AppInfoMonitor Self).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.