AppStream.BrandingColorIter

Fields

Name

Type

Access

Description

dummy1

object

r

dummy2

int

r

dummy3

object

r

dummy4

object

r

dummy5

object

r

dummy6

object

r

Methods

init (branding)

next ()

Details

class AppStream.BrandingColorIter

A AppStream.BrandingColorIter structure represents an iterator that can be used to iterate over the accent colors of an AppStream.Branding object. AppStream.BrandingColorIter structures are typically allocated on the stack and then initialized with AppStream.BrandingColorIter.init().

init(branding)
Parameters:

branding (AppStream.Branding) – an AppStream.Branding

Initializes a color iterator for the accent color list and associates it it with branding. The AppStream.BrandingColorIter structure is typically allocated on the stack and does not need to be freed explicitly.

next()
Returns:

False if the last entry has been reached.

kind:

Destination of the returned color kind.

scheme_preference:

Destination of the returned color’s scheme preference.

value:

Destination of the returned color code.

Return type:

(bool, kind: AppStream.ColorKind, scheme_preference: AppStream.ColorSchemeKind, value: str)

Returns the current color entry and advances the iterator. Example:

AsBrandingColorIter iter;
AsColorKind ckind;
AsColorSchemeKind scheme_preference;
const gchar *color_value;

as_branding_color_iter_init (&iter, branding);
while (as_branding_color_iter_next (&iter, &ckind, &scheme_preference, &color_value)) {
    // do something with the color data
}