pub struct ShmHeader {Show 19 fields
pub magic: u32,
pub version: u32,
pub flags: u32,
pub ready: AtomicU32,
pub heartbeat: AtomicU32,
pub error_code: u32,
pub shutdown_request: AtomicU32,
pub tasks_issued: AtomicU32,
pub tasks_completed: AtomicU32,
pub block_size: AtomicU32,
pub num_input_channels: AtomicU32,
pub num_output_channels: AtomicU32,
pub midi_in_port_count: AtomicU32,
pub midi_out_port_count: AtomicU32,
pub request_type: AtomicU32,
pub request_status: AtomicU32,
pub scratch_size: AtomicU32,
pub parent_window: AtomicU64,
pub state_dirty: AtomicU32,
/* private fields */
}Expand description
Shared-memory header (256 bytes).
Fields§
§magic: u32§version: u32§flags: u32§ready: AtomicU32§heartbeat: AtomicU32§error_code: u32§shutdown_request: AtomicU32§tasks_issued: AtomicU32§tasks_completed: AtomicU32§block_size: AtomicU32§num_input_channels: AtomicU32§num_output_channels: AtomicU32§midi_in_port_count: AtomicU32Number of MIDI input ports actually used by the plugin (<= MAX_MIDI_PORTS).
midi_out_port_count: AtomicU32Number of MIDI output ports actually used by the plugin (<= MAX_MIDI_PORTS).
request_type: AtomicU32Request type: 0 = none, 1 = save_state, 2 = restore_state, 3 = gui_show, 4 = gui_hide, 5 = set_resource_directory, 6 = enumerate_file_references, 7 = update_file_reference
request_status: AtomicU32Request status: 0 = pending, 1 = success, 2 = error
scratch_size: AtomicU32Valid bytes in scratch area for state operations
parent_window: AtomicU64Parent window ID for GUI embedding (X11 window ID on Unix, HWND on Windows)
state_dirty: AtomicU32Set to 1 by the plugin-host when the plugin calls clap_host_state.mark_dirty()
Implementations§
Source§impl ShmHeader
impl ShmHeader
Sourcepub fn parent_window_usize(&self) -> usize
pub fn parent_window_usize(&self) -> usize
Load parent_window as a usize (handles 32- and 64-bit platforms).
Sourcepub fn set_parent_window(&self, window: usize)
pub fn set_parent_window(&self, window: usize)
Store a usize parent_window (truncates on 32-bit, but HWNDs/XIDs are
always within 64 bits).