#[repr(C)]pub struct ExtrasSubscriberInfo {
pub header: ExtrasSubscriberInfoHeader,
pub subscriber_name: *const i8,
pub squad_update_callback: Option<unsafe extern "C-unwind" fn(*const UserInfo, u64)>,
pub language_changed_callback: Option<unsafe extern "C-unwind" fn(Language)>,
pub keybind_changed_callback: Option<unsafe extern "C-unwind" fn(RawKeybindChange)>,
pub squad_chat_message_callback: Option<unsafe extern "C-unwind" fn(*const SquadMessage)>,
pub chat_message_callback: Option<unsafe extern "C-unwind" fn(MessageType, RawMessage)>,
}Expand description
Information about a subscriber to updates from Unofficial Extras.
Fields§
§header: ExtrasSubscriberInfoHeaderHeader shared across different versions.
subscriber_name: *const i8Name of the addon subscribing to the changes.
Must be valid for the lifetime of the subscribing addon.
Set to nullptr if initialization fails.
squad_update_callback: Option<unsafe extern "C-unwind" fn(*const UserInfo, u64)>Called whenever anything in the squad changes.
Only the users that changed are sent.
If a user is removed from the squad, it will be sent with role set to UserRole::None
language_changed_callback: Option<unsafe extern "C-unwind" fn(Language)>Called whenever the language is changed.
Either by Changing it in the UI or by pressing the Right Ctrl (default) key. Will also be called directly after initialization, with the current language, to get the startup language.
keybind_changed_callback: Option<unsafe extern "C-unwind" fn(RawKeybindChange)>Called whenever a keybind is changed.
By changing it in the ingame UI, by pressing the translation shortcut or with the Presets feature of this plugin. It is called for every keybind separately.
After initialization this is called for every current keybind that exists. If you want to get a single keybind, at any time you want, call the exported function.
squad_chat_message_callback: Option<unsafe extern "C-unwind" fn(*const SquadMessage)>Called whenever a chat message is sent in your party/squad.
chat_message_callback: Option<unsafe extern "C-unwind" fn(MessageType, RawMessage)>Called on different chat messages.