AppStreamCompose.IconPolicyIter

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 (ipolicy)

next ()

Details

class AppStreamCompose.IconPolicyIter

A AppStreamCompose.IconPolicyIter structure represents an iterator that can be used to iterate over the icon sizes / policy entries of an AppStreamCompose.IconPolicy. AppStreamCompose.IconPolicyIter structures are typically allocated on the stack and then initialized with AppStreamCompose.IconPolicyIter.init().

init(ipolicy)
Parameters:

ipolicy (AppStreamCompose.IconPolicy) – an AppStreamCompose.IconPolicy

Initializes a policy iterator for the policy entry list and associates it it with ipolicy. The AppStreamCompose.IconPolicyIter 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.

size:

Destination of the returned icon size

scale:

Destination of the returned icon scale factor

state:

Destination of the returned designated icon state.

Return type:

(bool, size: int, scale: int, state: AppStreamCompose.IconState)

Returns the current icon policy entry and advances the iterator. Example:

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
}