Wp.SpaPodBuilder

Fields

None

Methods

class

new_array ()

class

new_choice (choice_type)

class

new_object (type_name, id_name)

class

new_sequence (unit)

class

new_struct ()

add_boolean (value)

add_bytes (value, len)

add_control (offset, ctl_type)

add_double (value)

add_fd (value)

add_float (value)

add_fraction (num, denom)

add_id (value)

add_int (value)

add_long (value)

add_none ()

add_pod (pod)

add_pointer (type_name, value)

add_property (key)

add_property_id (id)

add_rectangle (width, height)

add_string (value)

end ()

ref ()

unref ()

Details

class Wp.SpaPodBuilder
classmethod new_array()
Returns:

the new spa pod builder

Return type:

Wp.SpaPodBuilder

Creates a spa pod builder of type array.

classmethod new_choice(choice_type)
Parameters:

choice_type (str) – the name of the choice type (“Range”, “Step”, …)

Returns:

the new spa pod builder

Return type:

Wp.SpaPodBuilder

Creates a spa pod builder of type choice.

classmethod new_object(type_name, id_name)
Parameters:
  • type_name (str) – the type name of the object type

  • id_name (str) – the Id name of the object

Returns:

the new spa pod builder

Return type:

Wp.SpaPodBuilder

Creates a spa pod builder of type object.

classmethod new_sequence(unit)
Parameters:

unit (int) –

Returns:

the new spa pod builder

Return type:

Wp.SpaPodBuilder

Creates a spa pod builder of type sequence.

classmethod new_struct()
Returns:

the new spa pod builder

Return type:

Wp.SpaPodBuilder

Creates a spa pod builder of type struct.

add_boolean(value)
Parameters:

value (bool) – the boolean value

Adds a boolean value into the builder.

add_bytes(value, len)
Parameters:
  • value (object or None) – the bytes value

  • len (int) – the length of the bytes value

Adds a bytes value with its length into the builder.

add_control(offset, ctl_type)
Parameters:
  • offset (int) – the offset of the control

  • ctl_type (str) – the type name of the control

Adds a control into the builder.

add_double(value)
Parameters:

value (float) – the double value

Adds a double value into the builder.

add_fd(value)
Parameters:

value (int) – the Fd value

Adds a Fd value into the builder.

add_float(value)
Parameters:

value (float) – the float value

Adds a float value into the builder.

add_fraction(num, denom)
Parameters:
  • num (int) – the numerator value of the fraction

  • denom (int) – the denominator value of the fraction

Adds the numerator and denominator values of a fraction into the builder.

add_id(value)
Parameters:

value (int) – the Id value

Adds a Id value into the builder.

add_int(value)
Parameters:

value (int) – the int value

Adds a int value into the builder.

add_long(value)
Parameters:

value (int) – the long value

Adds a long value into the builder.

add_none()

Adds a none value into the builder.

add_pod(pod)
Parameters:

pod (Wp.SpaPod) – the pod value

Adds a pod value into the builder.

add_pointer(type_name, value)
Parameters:
  • type_name (str) – the type name that the pointer points to

  • value (object or None) – the pointer vaue

Adds a pointer value with its type name into the builder.

add_property(key)
Parameters:

key (str) – the name of the property

Adds a property into the builder.

add_property_id(id)
Parameters:

id (int) – the id of the property

Adds a property into the builder.

add_rectangle(width, height)
Parameters:
  • width (int) – the width value of the rectangle

  • height (int) – the height value of the rectangle

Adds the width and height values of a rectangle into the builder.

add_string(value)
Parameters:

value (str) – the string value

Adds a string value into the builder.

end()
Returns:

the constructed spa pod object

Return type:

Wp.SpaPod

Ends the builder process and returns the constructed spa pod object.

ref()
Returns:

self with an additional reference count on it

Return type:

Wp.SpaPodBuilder

Increases the reference count of a spa pod builder.

unref()

Decreases the reference count on self and frees it when the ref count reaches zero.