Re-exports§
pub use const_str;
pub use rust_libretro_proc as proc;
pub use rust_libretro_sys as sys;
Modules§
- contexts
- This module contains abstractions of the libretro environment callbacks.
- core
- Provides the
Core
andCoreOptions
traits. - core_
wrapper 🔒 - The
CoreWrapper
is an internal data structure. - environment
- Unsafe functions related to the libretro environment callback.
For safe versions have a look at the
contexts
module and the context types you get in your core callbacks. - logger 🔒
log::Log
implementation using the libretro logging interface.- macros 🔒
- types
- Rust versions of libretro data structures.
- util
- Utility functions
Macros§
- c_
char_ ptr - c_str
- env_
version - input_
descriptor - input_
descriptors - retro_
core - This macro must be used to initialize your
Core
.
Functions§
- retro_
add_ ⚠image_ index_ callback - TODO: Documentation
- retro_
api_ ⚠version - Tells the frontend which API version this
Core
implements. - retro_
audio_ ⚠buffer_ status_ callback_ fn - TODO: Documentation
- retro_
audio_ ⚠callback_ fn - Notifies the
Core
when audio data should be written. - retro_
audio_ ⚠set_ state_ callback_ fn - Notifies the
Core
about the state of the frontend’s audio system. - retro_
camera_ ⚠deinitialized_ callback - TODO: Documentation
- retro_
camera_ ⚠frame_ opengl_ texture_ callback - TODO: Documentation
- retro_
camera_ ⚠frame_ raw_ framebuffer_ callback - TODO: Documentation
- retro_
camera_ ⚠initialized_ callback - TODO: Documentation
- retro_
cheat_ ⚠reset - Notifies the
Core
when all cheats should be unapplied. - retro_
cheat_ ⚠set - Called by the frontend whenever a cheat should be applied.
- retro_
core_ ⚠options_ update_ display_ callback_ fn - TODO: Documentation
- retro_
deinit ⚠ - Notifies the
Core
when it is being closed and its resources should be freed. - retro_
frame_ ⚠time_ callback_ fn - TODO: Documentation
- retro_
get_ ⚠eject_ state_ callback - TODO: Documentation
- retro_
get_ ⚠image_ index_ callback - TODO: Documentation
- retro_
get_ ⚠image_ label_ callback - TODO: Documentation
- retro_
get_ ⚠image_ path_ callback - TODO: Documentation
- retro_
get_ ⚠memory_ data - Returns a mutable pointer to queried memory type.
Return
std::ptr::null()
in case this doesn’t apply to yourCore
. - retro_
get_ ⚠memory_ size - Returns the size (in bytes) of the queried memory type.
Return
0
in case this doesn’t apply to yourCore
. - retro_
get_ ⚠num_ images_ callback - TODO: Documentation
- retro_
get_ ⚠proc_ address_ callback - TODO: Documentation
- retro_
get_ ⚠region - Called when the frontend needs region information from the
Core
. - retro_
get_ ⚠system_ av_ info - Provides audio/video timings and geometry info to the frontend.
- retro_
get_ ⚠system_ info - Provides statically known system info to the frontend.
- retro_
hw_ ⚠context_ destroyed_ callback - TODO: Documentation.
- retro_
hw_ ⚠context_ reset_ callback - TODO: Documentation.
- retro_
init ⚠ - Initializes the
Core
. - retro_
keyboard_ ⚠callback_ fn - If enabled by the
Core
, notifies it when a keyboard button has been pressed or released. - retro_
load_ ⚠game - Called by the frontend when a game should be loaded.
- retro_
load_ ⚠game_ special - See
rust_libretro_sys::retro_load_game_special
. - retro_
location_ ⚠lifetime_ status_ deinitialized_ callback - TODO: Documentation
- retro_
location_ ⚠lifetime_ status_ initialized_ callback - TODO: Documentation
- retro_
replace_ ⚠image_ index_ callback - TODO: Documentation
- retro_
reset ⚠ - Notifies the
Core
when the current game should be reset. - retro_
run ⚠ - Runs the game for one frame.
- retro_
serialize ⚠ - Called by the frontend when the
Core
s state should be serialized (“save state”). This function should returnfalse
on error. - retro_
serialize_ ⚠size - Called when the frontend needs to know how large a buffer to allocate for save states.
- retro_
set_ ⚠audio_ sample - Provides the audio sample callback to the
Core
. - retro_
set_ ⚠audio_ sample_ batch - Provides the batched audio sample callback to the
Core
. - retro_
set_ ⚠controller_ port_ device - Sets the device type to be used for player
port
. - retro_
set_ ⚠eject_ state_ callback - TODO: Documentation
- retro_
set_ ⚠environment - Provides the environment callback to the
Core
. - retro_
set_ ⚠image_ index_ callback - TODO: Documentation
- retro_
set_ ⚠initial_ image_ callback - TODO: Documentation
- retro_
set_ ⚠input_ poll - Provides the input polling callback to the
Core
. - retro_
set_ ⚠input_ state - Provides the input state request callback to the
Core
. - retro_
set_ ⚠video_ refresh - Provides the frame drawing callback to the
Core
. - retro_
unload_ ⚠game - Notifies the
Core
when the currently loaded game should be unloaded. Called beforeretro_deinit
. - retro_
unserialize ⚠ - Called by the frontend when a “save state” should be loaded.
This function should return
false
on error.