Rockbox.InsertPosition (rockbox_ex_ffi v0.6.1)

Copy Markdown View Source

Insert-position codes for Rockbox.Player.insert/4 and Rockbox.Player.import_m3u/4.

These mirror the C ABI enum:

AtomValueMeaning
:prepend0Before everything
:insert1Block right after the current track
:insert_next2Immediately after the current track
:insert_last3At the end of the queue
:insert_shuffled4At a random position
:insert_last_shuffled5Shuffled into the tail
:replace6Replace the whole queue
:index7At the explicit index argument

to_int/1 accepts either the atom or the raw integer, so callers can pass whichever they prefer.

Summary

Functions

Numeric code for an insert position (atom or already an integer).

Types

t()

@type t() ::
  :prepend
  | :insert
  | :insert_next
  | :insert_last
  | :insert_shuffled
  | :insert_last_shuffled
  | :replace
  | :index

Functions

to_int(pos)

@spec to_int(t() | 0..7) :: 0..7

Numeric code for an insert position (atom or already an integer).