WpIterator
Wp.Iterator
Wp.Iterator
Constructors
wp_iterator_new_ptr_array
WpIterator * wp_iterator_new_ptr_array (GPtrArray * items, GType item_type)
Parameters:
items
(
[transfer: full]
)
–
the items to iterate over
item_type
–
the type of each item
a new iterator that iterates over items
Methods
wp_iterator_fold
gboolean wp_iterator_fold (WpIterator * self, WpIteratorFoldFunc func, GValue * ret, gpointer data)
Iterates over all items of the iterator calling a function.
Parameters:
self
–
the iterator
func
(
[scope call]
)
–
the fold function
ret
(
[inout]
)
–
the accumulator data
data
(
[closure]
)
–
the user data
TRUE if all the items were processed, FALSE otherwise.
Wp.Iterator.fold
def Wp.Iterator.fold (self, func, ret, *data):
#python wrapper for 'wp_iterator_fold'
Iterates over all items of the iterator calling a function.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
func
(
Wp.IteratorFoldFunc
)
–
the fold function
ret
(
GObject.Value
)
–
the accumulator data
data
(
variadic
)
–
the user data
Returns a tuple made of:
TRUE if all the items were processed, FALSE otherwise.
ret
(
GObject.Value
)
–
TRUE if all the items were processed, FALSE otherwise.
Wp.Iterator.prototype.fold
function Wp.Iterator.prototype.fold(func: Wp.IteratorFoldFunc, ret: GObject.Value, data: Object): {
// javascript wrapper for 'wp_iterator_fold'
}
Iterates over all items of the iterator calling a function.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
func
(
Wp.IteratorFoldFunc
)
–
the fold function
ret
(
GObject.Value
)
–
the accumulator data
data
(
Object
)
–
the user data
Returns a tuple made of:
TRUE if all the items were processed, FALSE otherwise.
ret
(
GObject.Value
)
–
TRUE if all the items were processed, FALSE otherwise.
wp_iterator_foreach
gboolean wp_iterator_foreach (WpIterator * self, WpIteratorForeachFunc func, gpointer data)
Fold a function over the items of the iterator.
Parameters:
self
–
the iterator
func
(
[scope call]
)
–
the foreach function
data
(
[closure]
)
–
the user data
TRUE if all the items were processed, FALSE otherwise.
Wp.Iterator.foreach
def Wp.Iterator.foreach (self, func, *data):
#python wrapper for 'wp_iterator_foreach'
Fold a function over the items of the iterator.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
func
(
Wp.IteratorForeachFunc
)
–
the foreach function
data
(
variadic
)
–
the user data
TRUE if all the items were processed, FALSE otherwise.
Wp.Iterator.prototype.foreach
function Wp.Iterator.prototype.foreach(func: Wp.IteratorForeachFunc, data: Object): {
// javascript wrapper for 'wp_iterator_foreach'
}
Fold a function over the items of the iterator.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
func
(
Wp.IteratorForeachFunc
)
–
the foreach function
data
(
Object
)
–
the user data
TRUE if all the items were processed, FALSE otherwise.
wp_iterator_next
gboolean wp_iterator_next (WpIterator * self, GValue * item)
Gets the next item of the iterator.
Parameters:
self
–
the iterator
item
(
[out]
)
–
the next item of the iterator
TRUE if next iterator was obtained, FALSE when the iterator has no more items to iterate through.
Wp.Iterator.next
def Wp.Iterator.next (self):
#python wrapper for 'wp_iterator_next'
Gets the next item of the iterator.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
Returns a tuple made of:
TRUE if next iterator was obtained, FALSE when the iterator has no more items to iterate through.
item
(
GObject.Value
)
–
TRUE if next iterator was obtained, FALSE when the iterator has no more items to iterate through.
Wp.Iterator.prototype.next
function Wp.Iterator.prototype.next(): {
// javascript wrapper for 'wp_iterator_next'
}
Gets the next item of the iterator.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
Returns a tuple made of:
TRUE if next iterator was obtained, FALSE when the iterator has no more items to iterate through.
item
(
GObject.Value
)
–
TRUE if next iterator was obtained, FALSE when the iterator has no more items to iterate through.
wp_iterator_ref
WpIterator * wp_iterator_ref (WpIterator * self)
Parameters:
self
–
an iterator object
self with an additional reference count on it
Wp.Iterator.ref
def Wp.Iterator.ref (self):
#python wrapper for 'wp_iterator_ref'
Parameters:
self
(
Wp.Iterator
)
–
an iterator object
self with an additional reference count on it
Wp.Iterator.prototype.ref
function Wp.Iterator.prototype.ref(): {
// javascript wrapper for 'wp_iterator_ref'
}
Parameters:
self
(
Wp.Iterator
)
–
an iterator object
self with an additional reference count on it
wp_iterator_reset
wp_iterator_reset (WpIterator * self)
Resets the iterator so we can iterate again from the beginning.
Parameters:
self
–
the iterator
Wp.Iterator.reset
def Wp.Iterator.reset (self):
#python wrapper for 'wp_iterator_reset'
Resets the iterator so we can iterate again from the beginning.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
Wp.Iterator.prototype.reset
function Wp.Iterator.prototype.reset(): {
// javascript wrapper for 'wp_iterator_reset'
}
Resets the iterator so we can iterate again from the beginning.
Parameters:
self
(
Wp.Iterator
)
–
the iterator
wp_iterator_unref
wp_iterator_unref (WpIterator * self)
Decreases the reference count on self and frees it when the ref count reaches zero.
Parameters:
self
(
[transfer: full]
)
–
an iterator object
Wp.Iterator.unref
def Wp.Iterator.unref (self):
#python wrapper for 'wp_iterator_unref'
Decreases the reference count on self and frees it when the ref count reaches zero.
Parameters:
self
(
Wp.Iterator
)
–
an iterator object
Wp.Iterator.prototype.unref
function Wp.Iterator.prototype.unref(): {
// javascript wrapper for 'wp_iterator_unref'
}
Decreases the reference count on self and frees it when the ref count reaches zero.
Parameters:
self
(
Wp.Iterator
)
–
an iterator object
Constants
Callbacks
WpIteratorFoldFunc
gboolean (*WpIteratorFoldFunc) (const GValue * item, GValue * ret, gpointer data)
A function to be passed to wp_iterator_fold.
Parameters:
item
–
the item to fold
ret
–
the value collecting the result
data
–
data passed to wp_iterator_fold
TRUE if the fold should continue, FALSE if it should stop.
Wp.IteratorFoldFunc
def Wp.IteratorFoldFunc (item, ret, data):
#python wrapper for 'WpIteratorFoldFunc'
A function to be passed to Wp.Iterator.fold.
Parameters:
item
(
GObject.Value
)
–
the item to fold
ret
(
GObject.Value
)
–
the value collecting the result
data
(
object
)
–
data passed to Wp.Iterator.fold
TRUE if the fold should continue, FALSE if it should stop.
Wp.IteratorFoldFunc
function Wp.IteratorFoldFunc(item: GObject.Value, ret: GObject.Value, data: Object): {
// javascript wrapper for 'WpIteratorFoldFunc'
}
A function to be passed to Wp.Iterator.prototype.fold.
Parameters:
item
(
GObject.Value
)
–
the item to fold
ret
(
GObject.Value
)
–
the value collecting the result
data
(
Object
)
–
data passed to Wp.Iterator.prototype.fold
TRUE if the fold should continue, FALSE if it should stop.
WpIteratorForeachFunc
(*WpIteratorForeachFunc) (const GValue * item, gpointer data)
A function that is called by wp_iterator_foreach for every element.
Wp.IteratorForeachFunc
def Wp.IteratorForeachFunc (item, data):
#python wrapper for 'WpIteratorForeachFunc'
A function that is called by Wp.Iterator.foreach for every element.
Parameters:
item
(
GObject.Value
)
–
the item
data
(
object
)
–
the data passed to Wp.Iterator.foreach
Wp.IteratorForeachFunc
function Wp.IteratorForeachFunc(item: GObject.Value, data: Object): {
// javascript wrapper for 'WpIteratorForeachFunc'
}
A function that is called by Wp.Iterator.prototype.foreach for every element.
Parameters:
item
(
GObject.Value
)
–
the item
data
(
Object
)
–
the data passed to Wp.Iterator.prototype.foreach
The results of the search are