#[repr(C)]pub struct AddonApi {Show 45 fields
pub swap_chain: IDXGISwapChain,
pub imgui_context: *mut ImGuiContext,
pub imgui_malloc: Option<ImguiMalloc>,
pub imgui_free: Option<ImguiFree>,
pub register_render: RawGuiAddRender,
pub deregister_render: RawGuiRemRender,
pub get_game_dir: RawGetGameDir,
pub get_addon_dir: RawGetAddonDir,
pub get_common_dir: RawGetCommonDir,
pub hook_create: RawHookCreate,
pub hook_remove: RawHookRemove,
pub hook_enable: RawHookEnable,
pub hook_disable: RawHookDisable,
pub log: RawLog,
pub alert_notify: RawAlertNotify,
pub event_raise: RawEventRaise,
pub event_raise_notification: RawEventRaiseNotification,
pub event_raise_targeted: RawEventRaiseTargeted,
pub event_raise_notification_targeted: RawEventRaiseNotificationTargeted,
pub event_subscribe: RawEventSubscribe,
pub event_unsubscribe: RawEventSubscribe,
pub register_wnd_proc: RawWndProcAddRem,
pub deregister_wnd_proc: RawWndProcAddRem,
pub send_wnd_proc_to_game_only: RawWndProcSendToGame,
pub keybind_register_with_string: RawKeybindRegisterWithStringOld,
pub keybind_register_with_struct: RawKeybindRegisterWithStructOld,
pub keybind_deregister: RawKeybindDeregister,
pub get_resource: RawDataGetResource,
pub share_resource: RawDataShareResource,
pub get_texture: RawTextureGet,
pub get_texture_or_create_from_file: RawTextureGetOrCreateFromFile,
pub get_texture_or_create_from_resource: RawTextureGetOrCreateFromResource,
pub get_texture_or_create_from_url: RawTextureGetOrCreateFromUrl,
pub get_texture_or_create_from_memory: RawTextureGetOrCreateFromMemory,
pub load_texture_from_file: RawTextureLoadFromFile,
pub load_texture_from_resource: RawTextureLoadFromResource,
pub load_texture_from_url: RawTextureLoadFromUrl,
pub load_texture_from_memory: RawTextureLoadFromMemory,
pub add_shortcut: RawQuickAccessAddShortcut,
pub remove_shortcut: RawQuickAccessGeneric,
pub notify_shortcut: RawQuickAccessGeneric,
pub add_simple_shortcut: RawQuickAccessAddContextMenu,
pub remove_simple_shortcut: RawQuickAccessGeneric,
pub translate: RawLocalizationTranslate,
pub translate_to: RawLocalizationTranslateTo,
}Expand description
Nexus addon API (version 3).
Fields§
§swap_chain: IDXGISwapChainDirectX swap chain.
imgui_context: *mut ImGuiContextImGui context.
imgui_malloc: Option<ImguiMalloc>ImGui malloc function.
imgui_free: Option<ImguiFree>ImGui free function.
register_render: RawGuiAddRenderRegisters a new render callback.
deregister_render: RawGuiRemRenderRemoves a registered render callback.
get_game_dir: RawGetGameDirReturns the path to the game directory.
For example "C:\Program Files\Guild Wars 2\".
get_addon_dir: RawGetAddonDirReturns a path to "\addons\{name}".
Passing null or "" returns "\addons" without trailing slash.
get_common_dir: RawGetCommonDirReturns the path to the common addon folder.
Alias for get_addon_dir("common").
hook_create: RawHookCreateMinHook create.
hook_remove: RawHookRemoveMinHook remove.
hook_enable: RawHookEnableMinHook enable.
hook_disable: RawHookDisableMinHook disable.
log: RawLogLogs a message to the log window and log file.
Supports custom coloring for addon window messages, for example <c=#FF0000>this text is red</c>.
alert_notify: RawAlertNotifySends a text alert to the user visible for a short amount of time.
event_raise: RawEventRaiseRaises an event to all subscribing addons.
event_raise_notification: RawEventRaiseNotificationRaises an event without payload to all subscribing addons.
Alias for event_raise("EV_FOO", null).
event_raise_targeted: RawEventRaiseTargetedRaises an event for a specific subscribing addon.
event_raise_notification_targeted: RawEventRaiseNotificationTargetedRaises an event without payload for a specific subscribing addon.
Alias for event_raise_targeted("EV_FOO", null).
event_subscribe: RawEventSubscribeRegisters a new event callback.
event_unsubscribe: RawEventSubscribeRemoves a registered event callback.
register_wnd_proc: RawWndProcAddRemRegisters a new WNDPROC callback.
deregister_wnd_proc: RawWndProcAddRemRemoves a registered WNDPROC callback.
send_wnd_proc_to_game_only: RawWndProcSendToGameSends a WNDPROC directly to the game, bypassing other hooks.
keybind_register_with_string: RawKeybindRegisterWithStringOldRegisters a new keybind handler for a given named keybind.
Keybind is a string like "ALT+SHIFT+T.
keybind_register_with_struct: RawKeybindRegisterWithStructOldRegisters a new keybind handler for a given named keybind.
Keybind is a Keybind struct.
keybind_deregister: RawKeybindDeregisterRemoves a registered keybind.
get_resource: RawDataGetResourceReturns a pointer to the requested resource of null if it does not exist.
Allocates a shared resource of the given size and returns a pointer to it for writing.
get_texture: RawTextureGetReturns a pointer to the Texture or null if it does not exist.
get_texture_or_create_from_file: RawTextureGetOrCreateFromFileReturns a pointer to the Texture or creates it from the file if it does not exist.
get_texture_or_create_from_resource: RawTextureGetOrCreateFromResourceReturns a pointer to the Texture or creates it from the resource if it does not exist.
get_texture_or_create_from_url: RawTextureGetOrCreateFromUrlReturns a pointer to the Texture or creates it from the URL if it does not exist.
get_texture_or_create_from_memory: RawTextureGetOrCreateFromMemoryReturns a pointer to the Texture or creates it from the memory if it does not exist.
load_texture_from_file: RawTextureLoadFromFileCreates a texture from the file and passes it to the callback when finished.
load_texture_from_resource: RawTextureLoadFromResourceCreates a texture from the resource and passes it to the callback when finished.
load_texture_from_url: RawTextureLoadFromUrlCreates a texture from the URL and passes it to the callback when finished.
load_texture_from_memory: RawTextureLoadFromMemoryCreates a texture from the memory and passes it to the callback when finished.
add_shortcut: RawQuickAccessAddShortcutAdds a new shortcut icon to the quick access with the given texture identifiers. When clicked the given keybind identifier will be called.
remove_shortcut: RawQuickAccessGenericRemoves a shortcut with the given identifier from quick access.
notify_shortcut: RawQuickAccessGenericSends a notification icon to the given shortcut.
add_simple_shortcut: RawQuickAccessAddContextMenuAdds a new ImGui callback fired when right-clicking the Nexus icon.
remove_simple_shortcut: RawQuickAccessGenericRemoves a registered simple shortcut callback.
translate: RawLocalizationTranslateTranslates the identifier into the current active language. Returns the same identifier if unavailable.
translate_to: RawLocalizationTranslateToTranslates the identifier into the given language. Returns the same identifier if unavailable.