Creates a new #AscFont. an #AscCanvas Gets the canvas height. an #AscCanvas instance. Gets the canvas width. an #AscCanvas instance. Render an SVG graphic from the SVG data provided. an #AscCanvas instance. SVG data input stream. Save canvas to PNG file. an #AscCanvas instance. Filename to save to. A drawing error. Generic failure. Drawing operation failed. Issue with font or font selection. The requested action was not supported. An error quark. Function which is called after all metainfo and related data (e.g. desktop-entry files) has been loaded, but *before* any expensive operations such as screenshot downloads or font searches are performed. This function can be useful to filter out unwanted components early in the process and avoid unneeded downloads and other data processing. By the time this function is called, the component's global ID should be finalized and should not change any longer. Please note that this function may be called from any thread, and thread safety needs to be taked care off by the callee. A pointer to generated #AscResult The unit we are currently processing. Additional data. Creates a new #AscCompose. Adds a component ID to the allowlist. If the list is not empty, only components in the list will be added to the metadata output. an #AscCompose instance. The component-id to whitelist Add a key to the allowlist that is used to filter custom tag values. an #AscCompose instance. the custom key to add to the allowed list. Add compose flags. an #AscCompose instance. The compose flags to add. Add an #AscUnit as data source for metadata processing. an #AscCompose instance. The #AscUnit to add Get the results components extracted in the last data processing run. The components an #AscCompose instance. Perform final validation of generated data for the specified result container. an #AscCompose instance. the #AscResult to finalize Perform final validation of generated data. Calling this function is not necessary, unless the final check was explicitly disabled using the %ASC_COMPOSE_FLAG_NO_FINAL_CHECK flag. an #AscCompose instance. Get the CA file used to verify peers with, or %NULL for default. an #AscCompose instance. Get the data result directory. an #AscCompose instance. Get the flags controlling compose behavior. an #AscCompose instance. get the format type we are generating. an #AscCompose instance. Get hints report output directory. an #AscCompose instance. Get the policy for how icons should be distributed to any AppStream clients. an #AscIconPolicy an #AscCompose instance. Get the icon result directory. an #AscCompose instance. Get the unit we use for locale processing The unit used for locale processing, or %NULL for default. an #AscCompose instance. Get the maximum size a screenshot video or image can have. A size < 0 may be returned for no limit, setting a limit of 0 will disable screenshots. an #AscCompose instance. Get the media base URL to be used for the generated data, or %NULL if no media is cached. an #AscCompose instance. Get the media result directory, that can be served on a webserver. an #AscCompose instance. Get the metadata origin field. an #AscCompose instance. Get the directory prefix used for processing. an #AscCompose instance. Get the results of the last processing run. The results an #AscCompose instance. Check if the last run generated any errors (which will cause metadata to be ignored). %TRUE if we had errors. an #AscCompose instance. Remove a key from the allowlist used to filter the `<custom/>` tag entries. an #AscCompose instance. the custom key to drop from the allowed list. Remove compose flags. an #AscCompose instance. The compose flags to remove. Reset the results, units and run-specific settings so the instance can be reused for another metadata generation run. an #AscCompose instance. Process the registered units and generate catalog metadata from found components. The results, or %NULL on error an #AscCompose instance. a #GCancellable. Set a CA file holding one or more certificates to verify peers with for download operations performed by this #AscCompose. an #AscCompose instance. a valid file path Set an custom callback to be run when most of the metadata has been loaded, but no expensive operations (like downloads or icon rendering) have been done yet. This can be used to ignore unwanted components early on. The callback function may be called from any thread, so it needs to ensure thread safety on its own. an #AscCompose instance. the #AscCheckMetainfoLoadResultFn function to be called user data for @func Set an output location where generated metadata should be saved. If this is set to %NULL, no metadata will be saved. an #AscCompose instance. the metadata save location. Set a custom desktop-entry field localization functions to be run for specialized desktop-entry localization schemes such as used in Ubuntu. The callback function may be called from any thread, so it needs to ensure thread safety on its own. an #AscCompose instance. the #AscTranslateDesktopTextFn function to be called user data for @func Set compose flags bitfield that controls the enabled features for this #AscCompose. an #AscCompose instance. The compose flags bitfield. Set the format kind of the catalog metadata that we should generate. an #AscCompose instance. The format, e.g. %AS_FORMAT_KIND_XML Set an output location for HTML reports of issues generated during a compose run. an #AscCompose instance. the hints data directory. Set an icon policy object, overriding the existing one. an #AscCompose instance. an #AscIconPolicy instance Set an output location where plain icons for the processed metadata are stored. an #AscCompose instance. the icon storage location. Set a specific unit that is used for fetching locale information. This may be useful in case a special language pack layout is used, but is generally not necessary to be set explicitly, as locale will be found in the unit where the metadata is by default. an #AscCompose instance. the unit used for locale processing. Set the maximum size a screenshot video or image can have. A size < 0 may be set to allow unlimited sizes, setting a limit of 0 will disable screenshot caching entirely. an #AscCompose instance. maximum size of a screenshot image or video in bytes Set the media base URL for the generated metadata. Can be %NULL if no media should be cached and the original URLs should be kept. an #AscCompose instance. the media base URL. Set an output location to store media (screenshots, icons, ...) that will be served on a webserver via the URL set as media baseurl. an #AscCompose instance. the media storage location. Set the metadata origin field (e.g. "debian" or "flathub") an #AscCompose instance. the origin. Set the directory prefix the to-be-processed units are using. an #AscCompose instance. a directory prefix, e.g. "/usr" A metadata composition error. Generic failure. An error quark. Creates a new #AscDirectoryUnit. Get the root directory path for this unit. an #AscDirectoryUnit instance. Sets the root directory path for this unit. an #AscDirectoryUnit instance. Absolute directory path Creates a new #AscHint. Creates a new #AscHint with the given tag. If the selected tag was not registered+ with the global tag registry, %NULL is returned and an error is set. The tag ID to construct this hint for. Add a replacement variable for the explanation text. an #AscHint instance. Name of the variable to be replaced. Replacement for the variable name. Formats the explanation template to return a human-redable issue hint explanation, with all placeholder variables replaced. Explanation text for this hint, with variables replaced. an #AscHint instance. Gets the explanation template for this hint. an #AscHint instance. Returns a list with the flattened key/value pairs for this hint. Values are located in uneven list entries, following their keys in even list entries. A flattened #GPtrArray with the key/value pairs. an #AscHint instance. Gets the issue severity of this hint. an #AscHint instance. Gets the unique tag for the type of this hint. an #AscHint instance. %TRUE if this hint describes an error. an #AscHint instance. Check if this hint is valid (it requires at least a tag and a severity in order to be considered valid). %TRUE if this hint is valid. an #AscHint instance. Sets the explanation template for this hint. an #AscHint instance. Sets the issue severity of this hint. an #AscHint instance. Sets the unique tag for the type of this hint. an #AscHint instance. Creates a new #AscIconPolicy. Loads the icon policy from a textual representation. an #AscIconPolicy instance. A policy string as returned by %asc_icon_policy_to_string Sets a designated state for an icon of the given size. an #AscIconPolicy instance. the size of the icon to set policy for (e.g. 64 for 64x64px icons) the icon scale factor, e.g. 1 the designated #AscIconState Converts the current icon policy into a textual representation. The icon policy serialized into a string. Free with g_free() an #AscIconPolicy instance. A #AscIconPolicyIter structure represents an iterator that can be used to iterate over the icon sizes / policy entries of an #AscIconPolicy. #AscIconPolicyIter structures are typically allocated on the stack and then initialized with asc_icon_policy_iter_init(). Initializes a policy iterator for the policy entry list and associates it it with @ipolicy. The #AscIconPolicyIter structure is typically allocated on the stack and does not need to be freed explicitly. an uninitialized #AscIconPolicyIter an #AscIconPolicy Returns the current icon policy entry and advances the iterator. Example: |[<!-- language="C" --> AscIconPolicyIter iter; guint icon_size; guint icon_scale; AscIconState istate; asc_icon_policy_iter_init (&iter, ipolicy); while (asc_icon_policy_iter_next (&iter, &icon_size, &icon_scale, &istate)) { // do something with the icon entry data } ]| %FALSE if the last entry has been reached. an initialized #AscIconPolicyIter Destination of the returned icon size Destination of the returned icon scale factor Destination of the returned designated icon state. Designated state for an icon of a given size. Ignore icons of this size. Create cache for the icon, and provide remote link as well. Set if the icon should be stored in an icon tarball and be cached locally. Set if this icon should be stored remotely and fetched on demand. Converts the text representation to an enumerated value. a #AscIconState the string. Converts the enumerated value to an text representation. string version of @istate the #AscIconState. Creates a new #AscImage. Creates a new #AscImage from data in memory. Data to load. Length of the data to load. The size of the constructed pixbuf, or 0 for the native size %TRUE if passed data is gzip-compressed a #AscImageLoadFlags, e.g. %ASC_IMAGE_LOAD_FLAG_NONE Creates a new #AscImage from a file on the filesystem. Name of the file to load. The size of the constructed pixbuf, or 0 for the native size a #AscImageLoadFlags, e.g. %ASC_IMAGE_LOAD_FLAG_NONE Get a set of image format names we can currently read (via GdkPixbuf). A hash set of format names. Gets the image height. an #AscImage instance. Gets the image pixbuf if set. the #GdkPixbuf, or %NULL a #AscImage instance. Gets the image width. an #AscImage instance. Reads an image from a file. %TRUE for success a #AscImage instance. filename to read from The size of the constructed pixbuf, or 0 for the native size The smallest source size allowed, or 0 for none a #AscImageLoadFlags, e.g. %ASC_IMAGE_LOAD_FLAG_NONE Saves the image to a file. %TRUE for success a #AscImage instance. filename to write to target width, or 0 for default target height, or 0 for default some #AscImageSaveFlags values, e.g. %ASC_IMAGE_SAVE_FLAG_PAD_16_9 Resamples a pixbuf to a specific size. A #GdkPixbuf of the specified size a #AscImage instance. target width, or 0 for default target height, or 0 for default some #AscImageSaveFlags values, e.g. %ASC_IMAGE_SAVE_FLAG_PAD_16_9 Scale the image to the given size. an #AscImage instance. The new width. the new height. Scale the image to fir in a square with the given edge length, and keep its aspect ratio. an #AscImage instance. the maximum edge length. Scale the image to the given height, preserving its aspect ratio. an #AscImage instance. the new height. Scale the image to the given width, preserving its aspect ratio. an #AscImage instance. The new width. Sets the image pixbuf. a #AscImage instance. the #GdkPixbuf, or %NULL An image processing error. Generic failure. The graphic type is not supported. An error quark. File format of an image. Unknown image format. PNG format JPEG format GIF format SVG format Compressed SVG format WebP format AVIF format XPM format Returns the image format type based on the given file's filename. a #AscImageFormat or %ASC_IMAGE_FORMAT_UNKNOWN for unknown the filename. Converts the text representation to an enumerated value. a #AscImageFormat or %ASC_IMAGE_FORMAT_UNKNOWN for unknown the string. Converts the enumerated value to an text representation. string version of @format the %AscImageFormat. The flags used for loading images. No special flags set Sharpen the resulting image Allow loading of unsupported image types. Always resize the source image to the perfect size The flags used for saving images. No special flags set Optimize generated PNG for size Pad with alpha to 16:9 aspect Sharpen the image to clarify detail Blur the image to clear detail Creates a new #AscResult. Add component to the results set. %TRUE on success. an #AscResult instance. The #AsComponent to add. Source data used to generate the GCID hash, or %NULL if nonexistent. Add component to the results set, using string data. %TRUE on success. an #AscResult instance. The #AsComponent to add. Source data used to generate the GCID hash, or %NULL if nonexistent. Add an issue hint for a component. %TRUE if the added hint did not cause the component to be invalidated. an #AscResult instance. The affected #AsComponent AppStream Compose Issue hint tag First key to add a value for, or %NULL replacement keys and values for the issue explanation, terminated by %NULL Add an issue hint for a component. %TRUE if the added hint did not cause the component to be invalidated. an #AscResult instance. The component-ID of the affected #AsComponent AppStream Compose Issue hint tag First key to add a value for, or %NULL replacement keys and values for the issue explanation, terminated by %NULL Add an issue hint for a component. %TRUE if the added hint did not cause the component to be invalidated. an #AscResult instance. The component-ID of the affected #AsComponent AppStream Compose Issue hint tag List of key-value pairs for replacement variables. Add an issue hint which does not have any variables to replace in its explanation text for a component. %TRUE if the added hint did not cause the component to be invalidated. an #AscResult instance. The affected #AsComponent AppStream Compose Issue hint tag Add an issue hint for a component. %TRUE if the added hint did not cause the component to be invalidated. an #AscResult instance. The affected #AsComponent AppStream Compose Issue hint tag List of key-value pairs for replacement variables. The amount of components found for this unit. an #AscResult instance. Gets all components this #AsResult instance contains. An array of #AsComponent an #AscResult instance. Get a list of all hints for all components that are registered with this result. An array of #AscHint an #AscResult instance. Retrieve the global component-ID string for the given component-ID, as long as component with the given ID is registered with this #AscResult. Otherwise, %NULL is returned. an #AscResult instance. Component ID to look for. Gets the ID name of the bundle (a package / Flatpak / any entity containing metadata) that these these results are generated for. an #AscResult instance. Gets the bundle kind these results are for. an #AscResult instance. Gets the component by its component-id- An #AsComponent an #AscResult instance. Component ID to look for. Retrieve a list of all global component-IDs that this result knows of. An array of global component IDs. Free with %g_free an #AscResult instance. Gets list of component-IDs which do have issue hints associated with them. An array of component-IDs. Free container with %g_free an #AscResult instance. Gets hints for a component with the given component-id. An array of #AscHint or %NULL an #AscResult instance. Component ID to look for. Test if a hint tag is associated with a given component in this result. %TRUE if a hint with this tag exists for the selected component. an #AscResult instance. the #AsComponent to check the hint tag to check for The amount of hints emitted for this unit. an #AscResult instance. Check if an #AsComponent was set to be ignored in this result (usually due to errors). %TRUE if the component is ignored. an #AscResult instance. the component to check for. Remove a component from the results set. %TRUE if the component was found and removed. an #AscResult instance. The #AsComponent to remove. Remove a component from the results set. %TRUE if the component was found and removed. an #AscResult instance. a component-ID Remove a component from the results set. %TRUE if the component was found and removed. an #AscResult instance. The #AsComponent to remove. %TRUE if global component ID should be unregistered as well. Remove all hints that we have associated with the selected component-ID. an #AscResult instance. The component ID Sets the name of the bundle these results are for. an #AscResult instance. The new ID. Sets the kind of the bundle these results are for. an #AscResult instance. %TRUE if this result means the analyzed unit was ignored entirely. an #AscResult instance. Update the global component ID for the given component. %TRUE if the component existed and was updated. an #AscResult instance. The #AsComponent to edit. The data to include in the global component ID, or %NULL Update the global component ID for the given component. This is a convenience method for %asc_result_update_component_gcid %TRUE if the component existed and was updated. an #AscResult instance. The #AsComponent to edit. The data as string to include in the global component ID, or %NULL Function which is called while parsing a desktop-entry file to allow external translations of string values. This is used in e.g. the Ubuntu distribution. The return value must contain a list of strings with the locale name in even indices, and the text translated to the preceding locale in the following odd indices. A new #GPtrArray containing the translation mapping. A pointer to the desktop-entry data we are reading. The string to translate. Additional data. Creates a new #AscUnit. Close this unit, possibly freeing its resources. Calls to read_data() or get_contents() may not produce results until open() is called again. an #AscUnit instance. Returns %TRUE if the directory exists and files in it are readable. an #AscUnit instance. The directory name to check. Returns %TRUE if the filename exists and is readable using %asc_unit_read_data. an #AscUnit instance. The filename to check. Open this unit, populating its content listing. an #AscUnit instance. Read the contents of the selected file into memory and return them. an #AscUnit instance. The file to read data for. Add a path to the list of relevant directories. A unit may only read data in paths that were previously registered as relevant. an #AscUnit instance. path to be considered relevant Close this unit, possibly freeing its resources. Calls to read_data() or get_contents() may not produce results until open() is called again. an #AscUnit instance. Returns %TRUE if the directory exists and files in it are readable. an #AscUnit instance. The directory name to check. Returns %TRUE if the filename exists and is readable using %asc_unit_read_data. an #AscUnit instance. The filename to check. Gets the ID name of the bundle (a package / Flatpak / any entity containing metadata) that this unit represents. an #AscUnit instance. Gets the ID name of the bundle, normalized to be safe to use in filenames. This may *not* be the same name as set via asc_unit_get_bundle_id() an #AscUnit instance. Gets the bundle kind of this unit. an #AscUnit instance. Get a list of all files contained by this unit. A file listing an #AscUnit instance. Get a list of paths that are relevant for data processing. A list of paths an #AscUnit instance. Get user-defined data. This is a helper function for bindings. an #AscUnit instance. Open this unit, populating its content listing. an #AscUnit instance. Read the contents of the selected file into memory and return them. an #AscUnit instance. The file to read data for. Sets the ID of the bundle represented by this unit. an #AscUnit instance. The new ID. Sets the kind of the bundle this unit represents. an #AscUnit instance. Set list of files this unit contains. an #AscUnit instance. A list of files contained by this unit. Assign user-defined data to this object. This is a helper function for bindings. an #AscUnit instance. the user data an #AscUnit instance. an #AscUnit instance. an #AscUnit instance. The filename to check. an #AscUnit instance. The directory name to check. an #AscUnit instance. The file to read data for. Builds a global component ID from a component-id and a (usually MD5) checksum generated from the component data. The global-id is used as a global, unique identifier for a component. (while the component-ID is local, e.g. for one source). Its primary usecase is to identify a media directory on the filesystem which is associated with this component. an AppStream component ID. a MD5 hashsum as string generated from the component's combined metadata. An error quark. An error quark. Generate a filename from a web-URL that can be used to store the file on disk after download. The URL to extract a filename from. Register a new hint tag. If a previous tag with the given name already existed, the existing tag will not be replaced unless @overrideExisting is set to %TRUE. Please be careful when overriding tags! Tag severities can not be lowered by overriding a tag. %TRUE if the tag was registered and did not exist previously. the tag-ID to add the tag severity as #AsIssueSeverity the tag explanatory message whether an existing tag should be replaced Clear all global state and restore defaults. Get path to the "ffprobe" binary we should use. Retrieve all hint tags that we know. A list of valid hint tags. Free with %g_strfreev Get path to the "optipng" binary we should use. Get temporary directory used by appstream-compose. Get temporary directory used by appstream-compose and try to create it if it does not exist. Get whether images should be optimized using optipng. Retrieve the explanation template of the given hint tag. An explanation template, or %NULL if the tag was not found. Retrieve the severity of the given hint tag. An #AsIssueSeverity or %AS_ISSUE_SEVERITY_UNKNOWN if the tag did not exist or has an unknown severity. Set path to the "ffprobe" binary we should use. Set path to the "optipng" binary we should use. Set temporary directory used by appstream-compose. Set whether images should be optimized using optipng. Converts the text representation to an enumerated value. a #AscIconState the string. Converts the enumerated value to an text representation. string version of @istate the #AscIconState. An error quark. Returns the image format type based on the given file's filename. a #AscImageFormat or %ASC_IMAGE_FORMAT_UNKNOWN for unknown the filename. Converts the text representation to an enumerated value. a #AscImageFormat or %ASC_IMAGE_FORMAT_UNKNOWN for unknown the string. Converts the enumerated value to an text representation. string version of @format the %AscImageFormat. Optimizes a PNG graphic for size with optipng, if its binary is available and this feature is enabled. Filename of the PNG image to optimize.