looklook 0.6.0

Descriptive signal synthesiser.
// Copyright 2026 Gabriel Bjørnager Jensen.
//
// This file is part of LOOKLOOK.
//
// LOOKLOOK is free software: you can redistribute
// it and/or modify it under the terms of the GNU
// Affero General Public License as published by
// the Free Software Foundation, either version 3
// of the License, or (at your option) any later
// version.
//
// LOOKLOOK is distributed in the hope that it will
// be useful, but WITHOUT ANY WARRANTY; without
// even the implied warranty of MERCHANTABILITY or
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Affero General Public License for more details.
//
// You should have received a copy of the GNU Af-
// fero General Public License along with LOOKLOOK.
// If not, see <https://www.gnu.org/licenses/>.

//! Foreign function interfaces for the emulator.

use oct::{
	FromOctets,
	Immutable,
	IntoOctets,
	Zeroable,
	zeroed,
};

/// The `ll_mode` structure.
///
/// # Synopsis
///
/// ```c
/// // #include <looklook.h>
///
/// struct ll_mode {
///     unsigned int channel_count;
///     unsigned int width;
///     unsigned int height;
///     unsigned int frame_count;
/// };
/// ```
#[repr(C)]
#[derive(
	Copy,
	Debug,
	FromOctets,
	Immutable,
	Zeroable,
)]
#[derive_const(Clone)]
pub struct ll_mode {
	/// The render channel count.
	pub channel_count: u32,

	/// The render width.
	pub width: u32,

	/// The render height.
	pub height: u32,

	/// The render frame count.
	pub frame_count: u32,
}

const impl Default for ll_mode {
	#[inline(always)]
	fn default() -> Self {
		const { zeroed() }
	}
}

// SAFETY: `ll_mode` is a homogeneous C structure
// with only `IntoOctets` fields.
unsafe impl IntoOctets for ll_mode
where
	u32: IntoOctets,
{}