Package dev.atsushieno.panama.libremidi
Class libremidi_midi_configuration
java.lang.Object
dev.atsushieno.panama.libremidi.libremidi_midi_configuration
struct libremidi_midi_configuration {
enum {
MIDI1 = (1 << 1),
MIDI1_RAW = (1 << 2),
MIDI2 = (1 << 3),
MIDI2_RAW = (1 << 4)
} version;
union in_or_out_port {
libremidi_midi_in_port *in_port;
libremidi_midi_out_port *out_port;
} in_or_out_port;
union on_midi_1_or_2_callback {
libremidi_midi1_callback on_midi1_message;
libremidi_midi1_callback on_midi1_raw_data;
libremidi_midi2_callback on_midi2_message;
libremidi_midi2_callback on_midi2_raw_data;
} on_midi_1_or_2_callback;
struct get_timestamp {
void *context;
libremidi_timestamp (*callback)(void *, libremidi_timestamp);
} get_timestamp;
struct libremidi_midi_configuration_on_error {
void *context;
void (*callback)(void *, const char *, size_t, const void *);
} on_error;
struct libremidi_midi_configuration_on_warning {
void *context;
void (*callback)(void *, const char *, size_t, const void *);
} on_warning;
const char *port_name;
bool virtual_port;
bool ignore_sysex;
bool ignore_timing;
bool ignore_sensing;
enum libremidi_timestamp_mode timestamps;
}
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
struct get_timestamp { void *context; libremidi_timestamp (*callback)(void *, libremidi_timestamp); }
static class
union in_or_out_port { libremidi_midi_in_port *in_port; libremidi_midi_out_port *out_port; }
static class
struct libremidi_midi_configuration_on_error { void *context; void (*callback)(void *, const char *, size_t, const void *); }
static class
struct libremidi_midi_configuration_on_warning { void *context; void (*callback)(void *, const char *, size_t, const void *); }
static class
union on_midi_1_or_2_callback { libremidi_midi1_callback on_midi1_message; libremidi_midi1_callback on_midi1_raw_data; libremidi_midi2_callback on_midi2_message; libremidi_midi2_callback on_midi2_raw_data; }
-
Method Summary
Modifier and TypeMethodDescriptionstatic MemorySegment
allocate
(SegmentAllocator allocator) Allocate a segment of sizelayout().byteSize()
usingallocator
static MemorySegment
allocateArray
(long elementCount, SegmentAllocator allocator) Allocate an array of sizeelementCount
usingallocator
.static MemorySegment
asSlice
(MemorySegment array, long index) Obtains a slice ofarrayParam
which selects the array element atindex
.static MemorySegment
get_timestamp
(MemorySegment struct) Getter for field:struct get_timestamp get_timestamp
static void
get_timestamp
(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct get_timestamp get_timestamp
static final GroupLayout
Layout for field:struct get_timestamp get_timestamp
static final long
Offset for field:struct get_timestamp get_timestamp
static boolean
ignore_sensing
(MemorySegment struct) Getter for field:bool ignore_sensing
static void
ignore_sensing
(MemorySegment struct, boolean fieldValue) Setter for field:bool ignore_sensing
static final ValueLayout.OfBoolean
Layout for field:bool ignore_sensing
static final long
Offset for field:bool ignore_sensing
static boolean
ignore_sysex
(MemorySegment struct) Getter for field:bool ignore_sysex
static void
ignore_sysex
(MemorySegment struct, boolean fieldValue) Setter for field:bool ignore_sysex
static final ValueLayout.OfBoolean
Layout for field:bool ignore_sysex
static final long
Offset for field:bool ignore_sysex
static boolean
ignore_timing
(MemorySegment struct) Getter for field:bool ignore_timing
static void
ignore_timing
(MemorySegment struct, boolean fieldValue) Setter for field:bool ignore_timing
static final ValueLayout.OfBoolean
Layout for field:bool ignore_timing
static final long
Offset for field:bool ignore_timing
static MemorySegment
in_or_out_port
(MemorySegment struct) Getter for field:union in_or_out_port in_or_out_port
static void
in_or_out_port
(MemorySegment struct, MemorySegment fieldValue) Setter for field:union in_or_out_port in_or_out_port
static final GroupLayout
Layout for field:union in_or_out_port in_or_out_port
static final long
Offset for field:union in_or_out_port in_or_out_port
static final GroupLayout
layout()
The layout of this structstatic MemorySegment
on_error
(MemorySegment struct) Getter for field:struct libremidi_midi_configuration_on_error on_error
static void
on_error
(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct libremidi_midi_configuration_on_error on_error
static final GroupLayout
Layout for field:struct libremidi_midi_configuration_on_error on_error
static final long
Offset for field:struct libremidi_midi_configuration_on_error on_error
static MemorySegment
on_midi_1_or_2_callback
(MemorySegment struct) Getter for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
static void
on_midi_1_or_2_callback
(MemorySegment struct, MemorySegment fieldValue) Setter for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
static final GroupLayout
Layout for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
static final long
Offset for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
static MemorySegment
on_warning
(MemorySegment struct) Getter for field:struct libremidi_midi_configuration_on_warning on_warning
static void
on_warning
(MemorySegment struct, MemorySegment fieldValue) Setter for field:struct libremidi_midi_configuration_on_warning on_warning
static final GroupLayout
Layout for field:struct libremidi_midi_configuration_on_warning on_warning
static final long
Offset for field:struct libremidi_midi_configuration_on_warning on_warning
static MemorySegment
port_name
(MemorySegment struct) Getter for field:const char *port_name
static void
port_name
(MemorySegment struct, MemorySegment fieldValue) Setter for field:const char *port_name
static final AddressLayout
Layout for field:const char *port_name
static final long
Offset for field:const char *port_name
static MemorySegment
reinterpret
(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any).static MemorySegment
reinterpret
(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any).static long
sizeof()
The size (in bytes) of this structstatic int
timestamps
(MemorySegment struct) Getter for field:enum libremidi_timestamp_mode timestamps
static void
timestamps
(MemorySegment struct, int fieldValue) Setter for field:enum libremidi_timestamp_mode timestamps
static final ValueLayout.OfInt
Layout for field:enum libremidi_timestamp_mode timestamps
static final long
Offset for field:enum libremidi_timestamp_mode timestamps
static int
version
(MemorySegment struct) Getter for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
static void
version
(MemorySegment struct, int fieldValue) Setter for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
static final ValueLayout.OfInt
Layout for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
static final long
Offset for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
static boolean
virtual_port
(MemorySegment struct) Getter for field:bool virtual_port
static void
virtual_port
(MemorySegment struct, boolean fieldValue) Setter for field:bool virtual_port
static final ValueLayout.OfBoolean
Layout for field:bool virtual_port
static final long
Offset for field:bool virtual_port
-
Method Details
-
layout
The layout of this struct -
version$layout
Layout for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
-
version$offset
public static final long version$offset()Offset for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
-
version
Getter for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
-
version
Setter for field:enum { MIDI1 = (1 << 1), MIDI1_RAW = (1 << 2), MIDI2 = (1 << 3), MIDI2_RAW = (1 << 4) } version
-
in_or_out_port$layout
Layout for field:union in_or_out_port in_or_out_port
-
in_or_out_port$offset
public static final long in_or_out_port$offset()Offset for field:union in_or_out_port in_or_out_port
-
in_or_out_port
Getter for field:union in_or_out_port in_or_out_port
-
in_or_out_port
Setter for field:union in_or_out_port in_or_out_port
-
on_midi_1_or_2_callback$layout
Layout for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
-
on_midi_1_or_2_callback$offset
public static final long on_midi_1_or_2_callback$offset()Offset for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
-
on_midi_1_or_2_callback
Getter for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
-
on_midi_1_or_2_callback
Setter for field:union on_midi_1_or_2_callback on_midi_1_or_2_callback
-
get_timestamp$layout
Layout for field:struct get_timestamp get_timestamp
-
get_timestamp$offset
public static final long get_timestamp$offset()Offset for field:struct get_timestamp get_timestamp
-
get_timestamp
Getter for field:struct get_timestamp get_timestamp
-
get_timestamp
Setter for field:struct get_timestamp get_timestamp
-
on_error$layout
Layout for field:struct libremidi_midi_configuration_on_error on_error
-
on_error$offset
public static final long on_error$offset()Offset for field:struct libremidi_midi_configuration_on_error on_error
-
on_error
Getter for field:struct libremidi_midi_configuration_on_error on_error
-
on_error
Setter for field:struct libremidi_midi_configuration_on_error on_error
-
on_warning$layout
Layout for field:struct libremidi_midi_configuration_on_warning on_warning
-
on_warning$offset
public static final long on_warning$offset()Offset for field:struct libremidi_midi_configuration_on_warning on_warning
-
on_warning
Getter for field:struct libremidi_midi_configuration_on_warning on_warning
-
on_warning
Setter for field:struct libremidi_midi_configuration_on_warning on_warning
-
port_name$layout
Layout for field:const char *port_name
-
port_name$offset
public static final long port_name$offset()Offset for field:const char *port_name
-
port_name
Getter for field:const char *port_name
-
port_name
Setter for field:const char *port_name
-
virtual_port$layout
Layout for field:bool virtual_port
-
virtual_port$offset
public static final long virtual_port$offset()Offset for field:bool virtual_port
-
virtual_port
Getter for field:bool virtual_port
-
virtual_port
Setter for field:bool virtual_port
-
ignore_sysex$layout
Layout for field:bool ignore_sysex
-
ignore_sysex$offset
public static final long ignore_sysex$offset()Offset for field:bool ignore_sysex
-
ignore_sysex
Getter for field:bool ignore_sysex
-
ignore_sysex
Setter for field:bool ignore_sysex
-
ignore_timing$layout
Layout for field:bool ignore_timing
-
ignore_timing$offset
public static final long ignore_timing$offset()Offset for field:bool ignore_timing
-
ignore_timing
Getter for field:bool ignore_timing
-
ignore_timing
Setter for field:bool ignore_timing
-
ignore_sensing$layout
Layout for field:bool ignore_sensing
-
ignore_sensing$offset
public static final long ignore_sensing$offset()Offset for field:bool ignore_sensing
-
ignore_sensing
Getter for field:bool ignore_sensing
-
ignore_sensing
Setter for field:bool ignore_sensing
-
timestamps$layout
Layout for field:enum libremidi_timestamp_mode timestamps
-
timestamps$offset
public static final long timestamps$offset()Offset for field:enum libremidi_timestamp_mode timestamps
-
timestamps
Getter for field:enum libremidi_timestamp_mode timestamps
-
timestamps
Setter for field:enum libremidi_timestamp_mode timestamps
-
asSlice
Obtains a slice ofarrayParam
which selects the array element atindex
. The returned segment has addressarrayParam.address() + index * layout().byteSize()
-
sizeof
public static long sizeof()The size (in bytes) of this struct -
allocate
Allocate a segment of sizelayout().byteSize()
usingallocator
-
allocateArray
Allocate an array of sizeelementCount
usingallocator
. The returned segment has sizeelementCount * layout().byteSize()
. -
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any). The returned segment has sizelayout().byteSize()
-
reinterpret
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer<MemorySegment> cleanup) Reinterpretsaddr
using targetarena
andcleanupAction
(if any). The returned segment has sizeelementCount * layout().byteSize()
-