Struct projectm_rs::projectm_settings_s
source · [−]#[repr(C)]pub struct projectm_settings_s {Show 20 fields
pub mesh_x: c_int,
pub mesh_y: c_int,
pub fps: c_int,
pub texture_size: c_int,
pub window_width: c_int,
pub window_height: c_int,
pub preset_url: *mut c_char,
pub title_font_url: *mut c_char,
pub menu_font_url: *mut c_char,
pub data_dir: *mut c_char,
pub preset_duration: f64,
pub soft_cut_duration: f64,
pub hard_cut_duration: f64,
pub hard_cut_enabled: bool,
pub hard_cut_sensitivity: f32,
pub beat_sensitivity: f32,
pub aspect_correction: bool,
pub easter_egg: f32,
pub shuffle_enabled: bool,
pub soft_cut_ratings_enabled: bool,
}
Expand description
@brief projectM instance settings.
Use this struct to provide settings for projectM, for example if your application handles projectM configuration internally instead of using the default configuration file.
Always allocate the struct using the projectm_alloc_settings() and free it with the projectm_free_settings() function.
To allocate memory for char* members, always use projectm_alloc_string(). If any pointer is not NULL, projectm_free_settings() will automatically call projectm_free_string() on it. If you free it on your own, remember to reset the pointer to NULL after doing so!
Fields
mesh_x: c_int
!< Per-pixel mesh X resolution.
mesh_y: c_int
!< Per-pixel mesh Y resolution.
fps: c_int
!< Target rendering frames per second.
texture_size: c_int
!< Size of the render texture. Must be a power of 2.
window_width: c_int
!< Width of the rendering viewport.
window_height: c_int
!< Height of the rendering viewport.
preset_url: *mut c_char
!< Path to a preset playlist in XML format to be loaded. Use FLAG_DISABLE_PLAYLIST_LOAD to skip loading a playlist.
title_font_url: *mut c_char
!< Path to the “title” font that is used to render the preset name.
!< Path to the “menu” font that is used to render the built-in on-screen menu.
data_dir: *mut c_char
!< Path to data files like default fonts and presets.
preset_duration: f64
!< Display duration for each preset in seconds.
soft_cut_duration: f64
!< Blend-over duration between two presets in seconds.
hard_cut_duration: f64
!< Minimum time in seconds a preset is displayed before a hard cut can happen.
hard_cut_enabled: bool
!< Set to true to enable fast beat-driven preset switches.
hard_cut_sensitivity: f32
!< Beat sensitivity value that must be surpassed for a hard cut.
beat_sensitivity: f32
!< Beat sensitivity. Standard sensitivity is 1.0.
aspect_correction: bool
!< Use aspect ration correction in presets that support it.
easter_egg: f32
!< Used as the “sigma” value for a gaussian RNG to randomize preset duration. Unused on Windows.
shuffle_enabled: bool
!< Enable playlist shuffle, selecting a random preset on each switch instead of the next in list.
soft_cut_ratings_enabled: bool
!< If true, use soft cut ratings on soft cuts and hard cut ratings on hard cuts. If false, the hard cut rating is always used.
Trait Implementations
sourceimpl Clone for projectm_settings_s
impl Clone for projectm_settings_s
sourcefn clone(&self) -> projectm_settings_s
fn clone(&self) -> projectm_settings_s
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for projectm_settings_s
impl Debug for projectm_settings_s
impl Copy for projectm_settings_s
Auto Trait Implementations
impl RefUnwindSafe for projectm_settings_s
impl !Send for projectm_settings_s
impl !Sync for projectm_settings_s
impl Unpin for projectm_settings_s
impl UnwindSafe for projectm_settings_s
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more