Dazzle.Ring¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
data |
r/w |
||
len |
r/w |
||
pos |
r/w |
Methods¶
class |
|
|
|
|
|
|
|
|
Details¶
- class Dazzle.Ring¶
- classmethod sized_new(element_size, reserved_size, element_destroy)¶
- Parameters:
element_size (
int
) – The size per element.reserved_size (
int
) – The number of elements to allocate.element_destroy (
GLib.DestroyNotify
) – Notification called when removing an element.
- Returns:
A new
Dazzle.Ring
.- Return type:
Creates a new instance of
Dazzle.Ring
with the given number of elements.
- append_vals(data, len)¶
- Parameters:
- Returns:
the index of the first item.
- Return type:
Appends len values located at data.
- foreach(func, *user_data)¶
- Parameters:
Calls func for every item in the
Dazzle.Ring
starting from the most recently inserted element to the least recently inserted.
- ref()¶
- Returns:
The self pointer.
- Return type:
Atomically increments the reference count of self by one.
- unref()¶
Atomically decrements the reference count of self by one. When the reference count reaches zero, the structure is freed.