pub unsafe fn subscribe(
sub: *mut ExtrasSubscriberInfo,
extras_addon: &RawExtrasAddonInfo,
name: &'static str,
squad_update: Option<RawExtrasSquadUpdateCallback>,
language_changed: Option<RawExtrasLanguageChangedCallback>,
keybind_changed: Option<RawExtrasKeybindChangedCallback>,
squad_chat_message: Option<RawExtrasSquadChatMessageCallback>,
chat_message: Option<RawExtrasChatMessageCallback>,
)Expand description
Subscribes to unofficial extras callbacks after checking for compatibility.
Unsupported callbacks will be skipped.
ยงSafety
Info needs to point to a valid to interpret as subscriber infos with minimum version of ExtrasVersion::MIN_SUB_INFO.
It is passed as pointer to prevent UB by creating a reference to the wrong type.
Name needs to be null-terminated.