Gjsify LogoGjsify Logo

Hierarchy

Index

Constructors

Properties

Methods

Constructors

Properties

categories: object[]

string array of categories

description: string

the description

developerName: string

the developer name

gTypeInstance: TypeInstance
icons: AppStream.Icon[]

hash map of icon urls and sizes

id: string

the unique identifier

keywords: string[]

string array of keywords

the #AsComponentKind of this component

name: string

the name

parentInstance: GObject.Object
pkgnames: string[]

string array of packages name

projectGroup: string

the project group

projectLicense: string

the project license

screenshots: AppStream.Screenshot[]

An array of #AsScreenshot instances

summary: string

the summary

urls: HashTable<string | number | symbol, string | number | boolean>

the urls associated with this component

name: string

Methods

  • addCategory(category: string): void
  • Add a category.

    Parameters

    • category: string

      the categories name to add.

    Returns void

  • addExtends(cptId: string): void
  • Add a reference to the extended component

    Parameters

    • cptId: string

      The id of a component which is extended by this component

    Returns void

  • addLanguage(locale: string, percentage: number): void
  • Adds a language to the component.

    Parameters

    • locale: string

      the locale, or %NULL. e.g. "en_GB"

    • percentage: number

      the percentage completion of the translation, 0 for locales with unknown amount of translation

    Returns void

  • Adds a provided item to the component with the given kind, creating a new AsProvided for this kind internally if necessary.

    Parameters

    • kind: ProvidedKind

      the kind of the provided item (e.g. %AS_PROVIDED_KIND_MEDIATYPE)

    • item: string

      the item to add.

    Returns void

  • Adds a #AsRelation to set a recommends or requires relation of component cpt on the item mentioned in the #AsRelation.

    Parameters

    Returns void

  • addTag(ns: string, tag: string): boolean
  • Add a tag to this component.

    Parameters

    • ns: string

      The namespace the tag belongs to

    • tag: string

      The tag name

    Returns boolean

  • Creates a binding between source_property on source and target_property on target.

    Whenever the source_property is changed the target_property is updated using the same value. For instance:

      g_object_bind_property (action, "active", widget, "sensitive", 0);
    

    Will result in the "sensitive" property of the widget #GObject instance to be updated with the same value of the "active" property of the action #GObject instance.

    If flags contains %G_BINDING_BIDIRECTIONAL then the binding will be mutual: if target_property on target changes then the source_property on source will be updated as well.

    The binding will automatically be removed when either the source or the target instances are finalized. To remove the binding without affecting the source and the target you can just call g_object_unref() on the returned #GBinding instance.

    Removing the binding by calling g_object_unref() on it must only be done if the binding, source and target are only used from a single thread and it is clear that both source and target outlive the binding. Especially it is not safe to rely on this if the binding, source or target can be finalized from different threads. Keep another reference to the binding and use g_binding_unbind() instead to be on the safe side.

    A #GObject can have multiple bindings.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    Returns Binding

  • Creates a binding between source_property on source and target_property on target, allowing you to set the transformation functions to be used by the binding.

    This function is the language bindings friendly version of g_object_bind_property_full(), using #GClosures instead of function pointers.

    Parameters

    • sourceProperty: string

      the property on source to bind

    • target: GObject.Object

      the target #GObject

    • targetProperty: string

      the property on target to bind

    • flags: BindingFlags

      flags to pass to #GBinding

    • transformTo: TClosure<any, any>

      a #GClosure wrapping the transformation function from the source to the target, or %NULL to use the default

    • transformFrom: TClosure<any, any>

      a #GClosure wrapping the transformation function from the target to the source, or %NULL to use the default

    Returns Binding

  • clearLanguages(): void
  • clearTags(): void
  • connect(sigName: "notify::categories", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::description", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::developer-name", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::icons", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::id", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::keywords", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::kind", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::name", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::pkgnames", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::project-group", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::project-license", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::screenshots", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::summary", callback: ((...args: any[]) => void)): number
  • connect(sigName: "notify::urls", callback: ((...args: any[]) => void)): number
  • connect(sigName: string, callback: ((...args: any[]) => void)): number
  • Parameters

    • sigName: "notify::categories"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::description"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::developer-name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::icons"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::keywords"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::kind"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::pkgnames"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::project-group"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::project-license"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::screenshots"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::summary"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: "notify::urls"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns number

  • emit(sigName: "notify::categories", ...args: any[]): void
  • emit(sigName: "notify::description", ...args: any[]): void
  • emit(sigName: "notify::developer-name", ...args: any[]): void
  • emit(sigName: "notify::icons", ...args: any[]): void
  • emit(sigName: "notify::id", ...args: any[]): void
  • emit(sigName: "notify::keywords", ...args: any[]): void
  • emit(sigName: "notify::kind", ...args: any[]): void
  • emit(sigName: "notify::name", ...args: any[]): void
  • emit(sigName: "notify::pkgnames", ...args: any[]): void
  • emit(sigName: "notify::project-group", ...args: any[]): void
  • emit(sigName: "notify::project-license", ...args: any[]): void
  • emit(sigName: "notify::screenshots", ...args: any[]): void
  • emit(sigName: "notify::summary", ...args: any[]): void
  • emit(sigName: "notify::urls", ...args: any[]): void
  • emit(sigName: string, ...args: any[]): void
  • forceFloating(): void
  • This function is intended for #GObject implementations to re-enforce a [floating][floating-ref] object reference. Doing this is seldom required: all #GInitiallyUnowneds are created with a floating reference which usually just needs to be sunken by calling g_object_ref_sink().

    Returns void

  • freezeNotify(): void
  • Increases the freeze count on object. If the freeze count is non-zero, the emission of "notify" signals on object is stopped. The signals are queued until the freeze count is decreased to zero. Duplicate notifications are squashed so that at most one #GObject::notify signal is emitted for each property modified while the object is frozen.

    This is necessary for accessors that modify multiple properties to prevent premature notification while the object is still being modified.

    Returns void

  • getActiveLocale(): string
  • Get the current active locale for this component, which is used to get localized messages.

    Returns string

  • Returns a list of #AsComponent objects which are addons extending this component in functionality.

    This is the reverse of %as_component_get_extends()

    Returns AppStream.Component[]

  • getBranch(): string
  • Get the branding associated with this component, or %NULL in case this component has no special branding.

    Returns Branding

  • getCategories(): string[]
  • getCompulsoryForDesktops(): string[]
  • Get the #AsContext associated with this component. This function may return %NULL if no context is set (which will be the case if the component was not loaded from a file or cache but constructed in memory).

    Returns AppStream.Context

  • getCustom(): HashTable<string | number | symbol, string | number | boolean>
  • getCustomValue(key: string): string
  • Retrieve value for a custom data entry with the given key.

    Parameters

    • key: string

      Field name.

    Returns string

  • getData(key?: string): object
  • Gets a named field from the objects table of associations (see g_object_set_data()).

    Parameters

    • Optional key: string

      name of the key for that association

    Returns object

  • getDataId(): string
  • Get a unique identifier for this metadata set. This unique ID is only valid for the current session, as opposed to the AppStream ID which uniquely identifies a software component.

    The format of the unique id usually is: %{scope}/%{origin}/%{distribution_system}/%{appstream_id}

    For example: system/os/package/org.example.FooBar

    Returns string

  • getDateEol(): string
  • getDescription(): string
  • getDesktopId(): string
  • getDeveloperName(): string
  • getExtends(): string[]
  • Returns a string list of IDs of components which are extended by this addon.

    See %as_component_get_extends() for the reverse.

    Returns string[]

  • Gets an icon matching the size constraints. The icons are not filtered by type, and the first icon which matches the size is returned. If you want more control over which icons you use for displaying, use the %as_component_get_icons() function to get a list of all icons.

    Note that this function is not HiDPI aware! It will never return an icon with a scaling factor > 1.

    Parameters

    • width: number

      The icon width in pixels.

    • height: number

      the icon height in pixels.

    Returns AppStream.Icon

  • getId(): string
  • Get the unique AppStream identifier for this component. This ID is unique for the described component, but does not uniquely identify the metadata set.

    For a unique ID for this metadata set in the current session, use %as_component_get_data_id()

    Returns string

  • getKeywords(): string[]
  • getKeywordsTable(): HashTable<string | number | symbol, string | number | boolean>
  • Retrieve the internal hash table mapping languages to keword arrays.

    Returns HashTable<string | number | symbol, string | number | boolean>

  • getLanguage(locale: string): number
  • Gets the translation coverage in percent for a specific locale

    Parameters

    • locale: string

      the locale, or %NULL. e.g. "en_GB"

    Returns number

  • getLanguages(): string[]
  • getMetadataLicense(): string
  • getName(): string
  • getNameTable(): HashTable<string | number | symbol, string | number | boolean>
  • Get the internal locale to component name mapping table.

    Returns HashTable<string | number | symbol, string | number | boolean>

  • getNameVariantSuffix(): string
  • Get variant suffix for the component name (only to be displayed if two components have the same name).

    Returns string

  • getOrigin(): string
  • getPkgname(): string
  • Get the first package name of the list of packages that need to be installed for this component to be present on the system. Since most components consist of only one package, this is safe to use for about 90% of all cases.

    However, to support a component fully, please use %as_component_get_pkgnames() for getting all packages that need to be installed, and use this method only to e.g. get the main package to perform a quick "is it installed?" check.

    Returns string

  • getPkgnames(): string[]
  • Get a list of package names which this component consists of. This usually is just one package name.

    Returns string[]

  • getPriority(): number
  • Returns the priority of this component. This method is used internally.

    Returns number

  • getProjectGroup(): string
  • getProjectLicense(): string
  • getProperty(propertyName?: string, value?: any): void
  • Gets a property of an object.

    The value can be:

    • an empty #GValue initialized by %G_VALUE_INIT, which will be automatically initialized with the expected type of the property (since GLib 2.60)
    • a #GValue initialized with the expected type of the property
    • a #GValue initialized with a type to which the expected type of the property can be transformed

    In general, a copy is made of the property contents and the caller is responsible for freeing the memory by calling g_value_unset().

    Note that g_object_get_property() is really intended for language bindings, g_object_get() is much more convenient for C programming.

    Parameters

    • Optional propertyName: string

      the name of the property to get

    • Optional value: any

      return location for the property value

    Returns void

  • Get an #AsProvided object for the given interface type, containing information about the public interfaces (mimetypes, firmware, DBus services, ...) this component provides.

    Parameters

    • kind: ProvidedKind

      kind of the provided item, e.g. %AS_PROVIDED_KIND_MIMETYPE

    Returns Provided

  • getQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • getSearchTokens(): string[]
  • getSortScore(): number
  • Returns the sorting priority of this component.

    This will only return a valid value if this component was the result of or involved in a search operation which returned sorted results. In most cases you will not need to access this value explicitly, as all results of search operations in AppStream are already sorted from best match to worst.

    The returned value is an arbitrary integer value, valid only for the search terms involved in the search operation that yielded this component as a result.

    Returns number

  • getSourcePkgname(): string
  • getSummary(): string
  • getSummaryTable(): HashTable<string | number | symbol, string | number | boolean>
  • Get the internal locale to component summary mapping table.

    Returns HashTable<string | number | symbol, string | number | boolean>

  • getTimestampEol(): number
  • Gets the UNIX timestamp for the date when this component is out of support (end-of-life) and will receive no more updates, not even security fixes.

    Returns number

  • Get a #GPtrArray of #AsTranslation objects describing the translation systems and translation-ids (e.g. Gettext domains) used by this software component.

    Only set for metainfo files.

    Returns AppStream.Translation[]

  • getv(names: string[], values: any[]): void
  • Gets n_properties properties for an object. Obtained properties will be set to values. All properties must be valid. Warnings will be emitted and undefined behaviour may result if invalid properties are passed in.

    Parameters

    • names: string[]

      the names of each property to get

    • values: any[]

      the values of each property to get

    Returns void

  • hasBundle(): boolean
  • hasCategory(category: string): boolean
  • Check if component is in the specified category.

    Parameters

    • category: string

      the specified category to check

    Returns boolean

  • hasTag(ns: string, tag: string): boolean
  • Test if the component is tagged with the selected tag.

    Parameters

    • ns: string

      The namespace the tag belongs to

    • tag: string

      The tag name

    Returns boolean

  • insertCustomValue(key: string, value: string): boolean
  • Add a key and value pair to the custom data table.

    Parameters

    • key: string

      Key name.

    • value: string

      A string value.

    Returns boolean

  • isCompulsoryForDesktop(desktop: string): boolean
  • Check if this component is compulsory for the given desktop.

    Parameters

    • desktop: string

      the desktop-id to test for

    Returns boolean

  • isFloating(): boolean
  • isIgnored(): boolean
  • isValid(): boolean
  • Check if the essential properties of this Component are populated with useful data.

    Returns boolean

  • Load metadata for this component from an XML string. You normally do not want to use this method directly and instead use the more convenient API of #AsMetadata to create and update components.

    If this function returns %TRUE, a valid component is returned unless the selected format was %AS_FORMAT_KIND_DESKTOP_ENTRY, in which case a component ID will have to be set explicitly by the caller in order to make the component valid.

    Parameters

    Returns boolean

  • Load metadata for this component from an XML string. You normally do not want to use this method directly and instead use the more convenient API of #AsMetadata to create and update components.

    Parameters

    • context: AppStream.Context

      an #AsContext instance.

    • data: string

      The XML data to load.

    Returns boolean

  • notify(propertyName: string): void
  • Emits a "notify" signal for the property property_name on object.

    When possible, eg. when signaling a property change from within the class that registered the property, you should use g_object_notify_by_pspec() instead.

    Note that emission of the notify signal may be blocked with g_object_freeze_notify(). In this case, the signal emissions are queued and will be emitted (in reverse order) when g_object_thaw_notify() is called.

    Parameters

    • propertyName: string

      the name of a property installed on the class of object.

    Returns void

  • Emits a "notify" signal for the property specified by pspec on object.

    This function omits the property name lookup, hence it is faster than g_object_notify().

    One way to avoid using g_object_notify() from within the class that registered the properties, and using g_object_notify_by_pspec() instead, is to store the GParamSpec used with g_object_class_install_property() inside a static array, e.g.:

      enum
    {
    PROP_0,
    PROP_FOO,
    PROP_LAST
    };

    static GParamSpec *properties[PROP_LAST];

    static void
    my_object_class_init (MyObjectClass *klass)
    {
    properties[PROP_FOO] = g_param_spec_int ("foo", "Foo", "The foo",
    0, 100,
    50,
    G_PARAM_READWRITE);
    g_object_class_install_property (gobject_class,
    PROP_FOO,
    properties[PROP_FOO]);
    }

    and then notify a change on the "foo" property with:

      g_object_notify_by_pspec (self, properties[PROP_FOO]);
    

    Parameters

    • pspec: ParamSpec

      the #GParamSpec of a property installed on the class of object.

    Returns void

  • off(sigName: "notify::categories", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::description", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::developer-name", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::icons", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::id", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::keywords", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::kind", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::name", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::pkgnames", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::project-group", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::project-license", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::screenshots", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::summary", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: "notify::urls", callback: ((...args: any[]) => void)): EventEmitter
  • off(sigName: string, callback: ((...args: any[]) => void)): EventEmitter
  • Parameters

    • sigName: "notify::categories"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::description"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::developer-name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::icons"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keywords"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::kind"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::pkgnames"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-group"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-license"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::screenshots"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::summary"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: "notify::urls"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns EventEmitter

  • on(sigName: "notify::categories", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::description", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::developer-name", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::icons", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::keywords", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::kind", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::name", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::pkgnames", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::project-group", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::project-license", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::screenshots", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::summary", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: "notify::urls", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • on(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    • sigName: "notify::categories"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::description"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::developer-name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::icons"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keywords"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::kind"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::pkgnames"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-group"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-license"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::screenshots"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::summary"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::urls"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • once(sigName: "notify::categories", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::description", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::developer-name", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::icons", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::id", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::keywords", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::kind", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::name", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::pkgnames", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::project-group", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::project-license", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::screenshots", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::summary", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: "notify::urls", callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • once(sigName: string, callback: ((...args: any[]) => void), after?: boolean): EventEmitter
  • Parameters

    • sigName: "notify::categories"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::description"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::developer-name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::icons"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::id"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::keywords"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::kind"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::name"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::pkgnames"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-group"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::project-license"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::screenshots"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::summary"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: "notify::urls"
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Parameters

    • sigName: string
    • callback: ((...args: any[]) => void)
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • Optional after: boolean

    Returns EventEmitter

  • Increases the reference count of object.

    Since GLib 2.56, if GLIB_VERSION_MAX_ALLOWED is 2.56 or greater, the type of object will be propagated to the return type (using the GCC typeof() extension), so any casting the caller needs to do on the return type must be explicit.

    Returns GObject.Object

  • Increase the reference count of object, and possibly remove the [floating][floating-ref] reference, if object has a floating reference.

    In other words, if the object is floating, then this call "assumes ownership" of the floating reference, converting it to a normal reference by clearing the floating flag while leaving the reference count unchanged. If the object is not floating, then this call adds a new normal reference increasing the reference count by one.

    Since GLib 2.56, the type of object will be propagated to the return type under the same conditions as for g_object_ref().

    Returns GObject.Object

  • removeTag(ns: string, tag: string): boolean
  • Remove a tag from this component

    Parameters

    • ns: string

      The namespace the tag belongs to

    • tag: string

      The tag name

    Returns boolean

  • runDispose(): void
  • Releases all references to other objects. This can be used to break reference cycles.

    This function should only be called from object system implementations.

    Returns void

  • searchMatches(term: string): number
  • Searches component data for a specific keyword.

    Parameters

    • term: string

      the search term.

    Returns number

  • searchMatchesAll(terms: string): number
  • Searches component data for all the specific keywords.

    Parameters

    • terms: string

      the search terms.

    Returns number

  • setActiveLocale(locale: string): void
  • Set the current active locale for this component, which is used to get localized messages. If the #AsComponent was fetched from a localized database, usually only one locale is available.

    Parameters

    • locale: string

      the locale, or %NULL. e.g. "en_GB"

    Returns void

  • setBranch(branch: string): void
  • Set the branch that the component instance was sourced from.

    Parameters

    • branch: string

      the branch, e.g. "master" or "3-16".

    Returns void

  • setCompulsoryForDesktop(desktop: string): void
  • Mark this component to be compulsory for the specified desktop environment.

    Parameters

    • desktop: string

      The name of the desktop.

    Returns void

  • setData(key: string, data?: object): void
  • Each object carries around a table of associations from strings to pointers. This function lets you set an association.

    If the object already had an association with that name, the old association will be destroyed.

    Internally, the key is converted to a #GQuark using g_quark_from_string(). This means a copy of key is kept permanently (even after object has been finalized) — so it is recommended to only use a small, bounded set of values for key in your program, to avoid the #GQuark storage growing unbounded.

    Parameters

    • key: string

      name of the key

    • Optional data: object

      data to associate with that key

    Returns void

  • setDataId(value: string): void
  • Set the session-specific unique metadata identifier for this component. If two components have a different data_id but the same ID, they will be treated as independent sets of metadata describing the same component type.

    Parameters

    • value: string

      the unique session-specific identifier.

    Returns void

  • setDateEol(date: string): void
  • Sets an end-of-life date for this component.

    Parameters

    • date: string

      the EOL date in ISO8601 format.

    Returns void

  • setDescription(value: string, locale: string): void
  • Set long description for this component.

    Parameters

    • value: string

      The long description

    • locale: string

      The locale the used for this value, or %NULL to use the current active one.

    Returns void

  • setDeveloperName(value: string, locale: string): void
  • Set the the component's developer or development team name.

    Parameters

    • value: string

      the developer or developer team name

    • locale: string

      the locale, or %NULL. e.g. "en_GB"

    Returns void

  • setId(value: string): void
  • Set the AppStream identifier for this component.

    Parameters

    • value: string

      the unique identifier.

    Returns void

  • setKeywords(value: string[], locale: string): void
  • Set keywords for this component.

    Parameters

    • value: string[]

      String-array of keywords

    • locale: string

      Locale of the values, or %NULL to use current locale.

    Returns void

  • setMetadataLicense(value: string): void
  • Set the license this metadata is licensed under.

    Parameters

    • value: string

      the metadata license.

    Returns void

  • setName(value: string, locale: string): void
  • Set a human-readable name for this component.

    Parameters

    • value: string

      The name

    • locale: string

      The locale the used for this value, or %NULL to use the current active one.

    Returns void

  • setNameVariantSuffix(value: string, locale: string): void
  • Set a variant suffix for the component name (only to be displayed if components have the same name).

    Parameters

    • value: string

      the developer or developer team name

    • locale: string

      the locale, or %NULL. e.g. "en_GB"

    Returns void

  • setOrigin(origin: string): void
  • setPkgname(pkgname: string): void
  • Set the package name that provides this component.

    Parameters

    • pkgname: string

      the package name

    Returns void

  • setPkgnames(packages: string[]): void
  • Set a list of package names this component consists of. (This should usually be just one package name)

    Parameters

    • packages: string[]

    Returns void

  • setPriority(priority: number): void
  • Sets the priority of this component. This method is used internally.

    Parameters

    • priority: number

      the given priority

    Returns void

  • setProjectGroup(value: string): void
  • Set the component's project group.

    Parameters

    • value: string

      the project group.

    Returns void

  • setProjectLicense(value: string): void
  • Set the project license.

    Parameters

    • value: string

      the project license.

    Returns void

  • setProperty(propertyName: string, value?: any): void
  • Sets a property on an object.

    Parameters

    • propertyName: string

      the name of the property to set

    • Optional value: any

      the value

    Returns void

  • setSortScore(score: number): void
  • Sets the sorting score of this component.

    Parameters

    • score: number

      the given sorting score

    Returns void

  • setSourcePkgname(spkgname: string): void
  • setSummary(value: string, locale: string): void
  • Set a short description for this component.

    Parameters

    • value: string

      The summary

    • locale: string

      The locale the used for this value, or %NULL to use the current active one.

    Returns void

  • stealData(key?: string): object
  • Remove a specified datum from the object's data associations, without invoking the association's destroy handler.

    Parameters

    • Optional key: string

      name of the key

    Returns object

  • stealQdata(quark: number): object
  • This function gets back user data pointers stored via g_object_set_qdata() and removes the data from object without invoking its destroy() function (if any was set). Usually, calling this function is only required to update user data pointers with a destroy notifier, for example:

    void
    object_add_to_user_list (GObject *object,
    const gchar *new_string)
    {
    // the quark, naming the object data
    GQuark quark_string_list = g_quark_from_static_string ("my-string-list");
    // retrieve the old string list
    GList *list = g_object_steal_qdata (object, quark_string_list);

    // prepend new string
    list = g_list_prepend (list, g_strdup (new_string));
    // this changed 'list', so we need to set it again
    g_object_set_qdata_full (object, quark_string_list, list, free_string_list);
    }
    static void
    free_string_list (gpointer data)
    {
    GList *node, *list = data;

    for (node = list; node; node = node->next)
    g_free (node->data);
    g_list_free (list);
    }

    Using g_object_get_qdata() in the above example, instead of g_object_steal_qdata() would have left the destroy function set, and thus the partial string list would have been freed upon g_object_set_qdata_full().

    Parameters

    • quark: number

      A #GQuark, naming the user data pointer

    Returns object

  • thawNotify(): void
  • Reverts the effect of a previous call to g_object_freeze_notify(). The freeze count is decreased on object and when it reaches zero, queued "notify" signals are emitted.

    Duplicate notifications for each property are squashed so that at most one #GObject::notify signal is emitted for each property, in the reverse order in which they have been queued.

    It is an error to call this function when the freeze count is zero.

    Returns void

  • toString(): string
  • Returns a string identifying this component. (useful for debugging)

    Returns string

  • Serialize this component into an XML string. You normally do not want to use this method directly and instead use the more convenient API of #AsMetadata to serialize components.

    Parameters

    Returns string

  • unref(): void
  • Decreases the reference count of object. When its reference count drops to 0, the object is finalized (i.e. its memory is freed).

    If the pointer to the #GObject may be reused in future (for example, if it is an instance variable of another object), it is recommended to clear the pointer to %NULL rather than retain a dangling pointer to a potentially invalid #GObject instance. Use g_clear_object() for this.

    Returns void

  • watchClosure(closure: TClosure<any, any>): void
  • This function essentially limits the life time of the closure to the life time of the object. That is, when the object is finalized, the closure is invalidated by calling g_closure_invalidate() on it, in order to prevent invocations of the closure with a finalized (nonexisting) object. Also, g_object_ref() and g_object_unref() are added as marshal guards to the closure, to ensure that an extra reference count is held on object during invocation of the closure. Usually, this function will be called on closures that use this object as closure data.

    Parameters

    • closure: TClosure<any, any>

      #GClosure to watch

    Returns void

  • compatControl(what: number, data: object): number
  • Find the #GParamSpec with the given name for an interface. Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    • propertyName: string

      name of a property to look up.

    Returns ParamSpec

  • Add a property to an interface; this is only useful for interfaces that are added to GObject-derived types. Adding a property to an interface forces all objects classes with that interface to have a compatible property. The compatible property could be a newly created #GParamSpec, but normally g_object_class_override_property() will be used so that the object class only needs to provide an implementation and inherits the property description, default value, bounds, and so forth from the interface property.

    This function is meant to be called from the interface's default vtable initialization function (the class_init member of #GTypeInfo.) It must not be called after after class_init has been called for any object types implementing this interface.

    If pspec is a floating reference, it will be consumed.

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface.

    • pspec: ParamSpec

      the #GParamSpec for the new property

    Returns void

  • Lists the properties of an interface.Generally, the interface vtable passed in as g_iface will be the default vtable from g_type_default_interface_ref(), or, if you know the interface has already been loaded, g_type_default_interface_peek().

    Parameters

    • gIface: TypeInterface

      any interface vtable for the interface, or the default vtable for the interface

    Returns ParamSpec[]

  • Creates a new instance of a #GObject subtype and sets its properties.

    Construction parameters (see %G_PARAM_CONSTRUCT, %G_PARAM_CONSTRUCT_ONLY) which are not explicitly specified are set to their default values.

    Parameters

    • objectType: GType<unknown>

      the type id of the #GObject subtype to instantiate

    • parameters: GObject.Parameter[]

      an array of #GParameter

    Returns GObject.Object

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method