First commit, step 4 completed

This commit is contained in:
bepis
2026-10-15 14:27:00 +11:00
commit 9a30efa170
5378 changed files with 1136719 additions and 0 deletions
@@ -0,0 +1,192 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceAddon-3.0
-- ----------------------------------------------------------------------------
---@class AceAddon-3.0
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0)
local lib = {}
---@param name string
---@param silent? boolean
---@return AceAddon
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-15)
function lib:GetAddon(name, silent) end
---@return function iter
---@return table invariant
---@return number init
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-16)
function lib:IterateAddonStatus() end
---@return function iter
---@return table invariant
---@return number init
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-17)
function lib:IterateAddons() end
---@param object table
---@param name string
---@param ...? string List of libraries to embed into the addon
---@return table|AceAddon
---@overload fun(self, name: string, ...: string): table|AceAddon
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-18)
function lib:NewAddon(object, name, ...) end
-- ----------------------------------------------------------------------------
-- AceAddon
-- ----------------------------------------------------------------------------
---@class AceAddon
---@field defaultModuleLibraries table
---@field defaultModuleState boolean
---@field enabledState boolean
---@field modules { [string]: AceModule }
---@field name string
---@field orderedModules AceModule[]
local addon = {}
-- Disables the Addon, if possible.
---@return boolean success
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-2)
function addon:Disable() end
-- Disables the Module, if possible.
---@param name string
---@return boolean success
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-3)
function addon:DisableModule(name) end
-- Enables the Addon, if possible.
---@return boolean success
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-4)
function addon:Enable() end
-- Enables the Module, if possible.
---@param name string
---@return boolean success
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-5)
function addon:EnableModule(name) end
-- Return the specified module from an Addon object.
---@param name string Unique name of the Module
---@param silent? boolean If true, the module is optional. Silently return nil if its not found.
---@return AceModule module
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-6)
function addon:GetModule(name, silent) end
-- Returns the real name of the Addon or Module, without any prefix.
---@return string name
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-7)
function addon:GetName() end
-- Query the enabledState of an Addon.
---@return boolean enabled
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-8)
function addon:IsEnabled() end
-- Returns whether or not the object is a Module.
---@return boolean isModule
function addon:IsModule() end
-- Return an iterator of all modules associated to the addon.
---@return function iter
---@return table invariant
---@return number init
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-9)
function addon:IterateModules() end
-- Create a new module for the addon.
--
-- The new module can have its own embeded libraries and/or use a module prototype to be mixed into the module.
--
-- A module has the same functionality as a real addon, it can have modules of its own, and has the same API as an addon object.
---@param name string
---@param ... string List of libraries to embed into the addon
---@return AceModule
---@overload fun(self, name: string, prototype: table, ...: string)
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-10)
function addon:NewModule(name, ...) end
-- dont define .OnInitialize, .OnEnable, .OnDisable since this would trigger `duplicate-set-field` diagnostic
-- those methods technically only exist when defined by the user
-- Callback function called when your addon is manually being disabled.
-- function addon:OnDisable() end
-- Callback function called during the PLAYER_LOGIN event, when most of the data provided by the game is already present.
-- function addon:OnEnable() end
-- Callback function called directly after the addon is fully loaded.
-- function addon:OnInitialize() end
-- Set the default libraries to be mixed into all modules created by this object.
--
-- Note that you can only change the default module libraries before any module is created.
---@param ... string List of libraries to embed into the addon
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-11)
function addon:SetDefaultModuleLibraries(...) end
-- Set the default prototype to use for new modules on creation.
--
-- Note that you can only change the default prototype before any module is created.
---@param prototype table
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-12)
function addon:SetDefaultModulePrototype(prototype) end
-- Set the default state in which new modules are being created.
--
-- Note that you can only change the default state before any module is created.
---@param state boolean
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-13)
function addon:SetDefaultModuleState(state) end
-- Set the state of an addon or module This should only be called before any enabling actually happend, e.g. in/before OnInitialize.
---@param state boolean
--
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-addon-3-0#title-14)
function addon:SetEnabledState(state) end
-- ----------------------------------------------------------------------------
-- AceModule
-- ----------------------------------------------------------------------------
---@class AceModule : AceAddon
---@field moduleName string
local module = {}
@@ -0,0 +1,31 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceBucket-3.0
-- ----------------------------------------------------------------------------
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-bucket-3-0)
---@class AceBucket-3.0
local AceBucket = {}
---@param event FrameEvent|FrameEvent[] The event to listen for, or a table of events.
---@param interval number The Bucket interval (burst interval)
---@param callback? function|string The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
--- ---
---@return string bucketHandle -- The handle of the bucket (for unregistering)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-bucket-3-0#title-2)
function AceBucket:RegisterBucketEvent(event, interval, callback) end
---@param message string|string[] The message to listen for, or a table of messages.
---@param interval number The Bucket interval (burst interval)
---@param callback? function|string The callback function, either as a function reference, or a string pointing to a method of the addon object.
--- ---
---@return string bucketHandle -- The handle of the bucket (for unregistering)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-bucket-3-0#title-3)
function AceBucket:RegisterBucketMessage(message, interval, callback) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-bucket-3-0#title-4)
function AceBucket:UnregisterAllBuckets() end
---@param handle string The handle of the bucket as returned by RegisterBucket
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-bucket-3-0#title-5)
function AceBucket:UnregisterBucket(handle) end
@@ -0,0 +1,54 @@
---@meta _
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-comm-3-0)
---@class AceComm-3.0
local AceComm = {}
---@param prefix string A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent), max 16 characters
---@param method? function|string OPTIONAL: Callback to call on message reception: Function reference, or method name (string) to call on self. Defaults to "OnCommReceived"
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-comm-3-0#title-1)
function AceComm:RegisterComm(prefix, method) end
---@param eventname string
function AceComm:UnregisterComm(eventname) end
---@param ... table
function AceComm:UnregisterAllComm(...) end
---@param prefix string A printable character (\032-\255) classification of the message (typically AddonName or AddonNameEvent)
---@param text string Data to send, nils (\000) not allowed. Any length.
---@param distribution string Addon channel, e.g. "RAID", "GUILD", etc; see SendAddonMessage API
---@param target string? Destination for some distributions; see SendAddonMessage API
---@param prio "BULK"|"NORMAL"|"ALERT"? OPTIONAL: ChatThrottleLib priority, "BULK", "NORMAL" or "ALERT". Defaults to "NORMAL".
---@param callbackFn function? OPTIONAL: callback function to be called as each chunk is sent. receives 3 args: the user supplied arg (see next), the number of bytes sent so far, and the number of bytes total to send.
---@param callbackArg ...? OPTIONAL: first arg to the callback function. nil will be passed if not specified.
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-comm-3-0#title-1)
function AceComm:SendCommMessage(prefix, text, distribution, target, prio, callbackFn, callbackArg) end
---@param target table
function AceComm:Embed(target) end
---@param target table
function AceComm:OnEmbedDisable(target) end
---@protected
---@param prefix string
---@param message string
---@param distribution string
---@param sender string
function AceComm:OnReceiveMultipartFirst(prefix, message, distribution, sender) end
---@protected
---@param prefix string
---@param message string
---@param distribution string
---@param sender string
function AceComm:OnReceiveMultipartNext(prefix, message, distribution, sender) end
---@protected
---@param prefix string
---@param message string
---@param distribution string
---@param sender string
function AceComm:OnReceiveMultipartLast(prefix, message, distribution, sender) end
@@ -0,0 +1,75 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceConfig-3.0
-- ----------------------------------------------------------------------------
---@class AceConfig-3.0
local AceConfig = {}
---@paramsig appName, options [, slashcmd]
---@param appName string The application name for the config table.
---@param options table|function|AceConfig.OptionsTable The option table (or a function to generate one on demand). [Options table documentation](http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/)
---@param slashcmd? string|table A slash command to register for the option table, or a table of slash commands.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-3-0#title-1)
function AceConfig:RegisterOptionsTable(appName, options, slashcmd)
end
-- ----------------------------------------------------------------------------
-- AceConfig.OptionsTable
-- ----------------------------------------------------------------------------
---@alias AceConfig.OptionsTable.ChildGroup
---|"select"
---|"tab"
---|"tree"
---@alias AceConfig.OptionsTable.DescStyle
---|"inline"
---|"tooltip"
---@alias AceConfig.OptionsTable.Type
---|"color"
---|"description"
---|"execute"
---|"group"
---|"header"
---|"input"
---|"keybinding"
---|"multiselect"
---|"range"
---|"select"
---|"toggle"
---@alias AceConfig.OptionsTable.Width
---|"double"
---|"full"
---|"half"
---|"normal"
---|number
---@class AceConfig.OptionsTable
---@field args? table<string, AceConfig.OptionsTable> a table containing a list of options
---@field childGroups? AceConfig.OptionsTable.ChildGroup decides how children groups of this group are displayed
---@field cmdHidden? boolean hide this from commandline
---@field confirm? string|function|boolean prompt for confirmation before changing a value if true display "name - desc", or contents of .confirmText if supplied.
---@field confirmText? string text to display in the confirmation dialog
---@field desc? string|function description for the option (or nil for a self-describing name)
---@field descStyle? AceConfig.OptionsTable.DescStyle "inline" if you want the description to show below the option in a GUI (rather than as a tooltip). Currently only supported by AceGUI "Toggle".
---@field dialogHidden? boolean hide this from dialog UIs
---@field disabled? string|function|boolean disabled but visible
---@field dropdownHidden? boolean hide this from dropdown UIs
---@field func? function function to execute
---@field get? string|function getter function
---@field guiHidden? boolean hide this from graphical UIs (dialog, dropdown)
---@field handler? table object on which getter/setter functions are called if they are declared as strings rather than function references
---@field hidden? string|function|boolean hidden (but usable if you can get to it, i.e. via commandline)
---@field icon? string|function path to icon texture
---@field iconCoords? table|string|function arguments to pass to SetTexCoord, e.g. {0.1,0.9,0.1,0.9}.
---@field name string|function Display name for the option
---@field order? number|string|function relative position of item (default = 100, 0=first, -1=last)
---@field set? string|function setter function
---@field type AceConfig.OptionsTable.Type Type of the option
---@field validate? string|function|false validate the input/value before setting it. return a string (error message) to indicate error.
---@field width? AceConfig.OptionsTable.Width If a number multiplier of the default width, ie. 0.5 equals "half", 2.0 equals "double"
---[Documentation](http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/)
local OptionsTable = {}
@@ -0,0 +1,31 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceConfigCmd-3.0
-- ----------------------------------------------------------------------------
---@class AceConfigCmd-3.0
local lib = {}
--- Utility function to create a slash command handler.
---
--- Also registers tab completion with AceTab
---@param slashcmd string The slash command WITHOUT leading slash (only used for error output)
---@param appName string The application name as given to `:RegisterOptionsTable()`
function lib:CreateChatCommand(slashcmd, appName) end
--- Utility function that returns the options table that belongs to a slashcommand.
---
--- Designed to be used for the AceTab interface.
---@param slashcmd string The slash command WITHOUT leading slash (only used for error output)
---@return table|nil optionsTable The options table associated with the slash command (or nil if the slash command was not registered)
function lib:GetChatCommandOptions(slashcmd) end
--- Handle the chat command.
---
--- This is usually called from a chat command handler to parse the command input as operations on an aceoptions table.
---
--- AceConfigCmd uses this function internally when a slash command is registered with `:CreateChatCommand`
---@param slashcmd string The slash command WITHOUT leading slash (only used for error output)
---@param appName string The application name as given to `:RegisterOptionsTable()`
---@param input string The commandline input (as given by the WoW handler, i.e. without the command itself)
function lib:HandleCommand(slashcmd, appName, input) end
@@ -0,0 +1,57 @@
---@meta _
---@class AceConfigDialog-3.0
---@field OpenFrames table<string, table>
---@field Status table<string, table>
---@field tooltip GameTooltip
local AceConfigDialog = {}
---@class AceConfigDialog-3.0.frame : Frame
---@field apps table
---@field closing table
---@field closeAllOverride table
AceConfigDialog.frame = {}
---@paramsig appName, name, parent, ...
--- Add an option table into the Blizzard Interface Options panel
---@param appName string The application name as given to `:RegisterOptionsTable()`
---@param name? string A descriptive name to display in the options tree. Defaults to appName
---@param parent? string The parent to use in the interface options tree
---@param ...? string The path in the options table to feed into the interface options panel
---@return any # The reference to the frame registered into the Interface Options.
---@return any # The registered category ID
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-1)
function AceConfigDialog:AddToBlizOptions(appName, name, parent, ...) end
---@paramsig appName
--- Close a specific options window
---@param appName string The application name as given to `:RegisterOptionsTable()`
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-2)
function AceConfigDialog:Close(appName) end
--- Close all open options windows
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-3)
function AceConfigDialog:CloseAll() end
---@paramsig appName, container, ...
---Open an option winddow at the specified path, if any
---@param appName string The application name as given to `:RegisterOptionsTable()`
---@param container? table
---@param ...? string The path to open after creating the options window (see `:SelectGroup` for details)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-4)
function AceConfigDialog:Open(appName, container, ...) end
---@paramsig appName, ...
--- Selects the specified path in the options window.
--- The path specified has to match the keys of the groups in the table.
---@param appName string The application name as given to `:RegisterOptionsTable()`
---@param ... string The path to the key that should be selected
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-5)
function AceConfigDialog:SelectGroup(appName, ...) end
---@paramsig appName, width, height
--- Sets the default size of the options window for a specific application.
---@param appName any The application name as given to `:RegisterOptionsTable()`
---@param width number The default width
---@param height number The default height
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-config-dialog-3-0#title-6)
function AceConfigDialog:SetDefaultSize(appName, width, height) end
@@ -0,0 +1,57 @@
---@meta _
-- ----------------------------------------------------------------------------
-- Type Aliases
-- ----------------------------------------------------------------------------
--- The AceConfig UI Type
---@alias AceConfigRegistry.UIType
---|"cmd"
---|"dialog"
---|"dropdown"
---@alias AceConfigRegistry.OptionsGenerator fun(uiType: AceConfigRegistry.UIType, uiName: string, appName: string): table
---@alias AceConfigRegistry.OptionsGetter fun(uiType: AceConfigRegistry.UIType, uiName: string, errlvl?: number): table
-- ----------------------------------------------------------------------------
-- AceConfigRegistry-3.0
-- ----------------------------------------------------------------------------
---@class AceConfigRegistry-3.0
local lib = {}
--- Query the registry for a specific options table.
---
--- If only appName is given, a function is returned which you can call with (uiType,uiName) to get the table.
---
--- If uiType&uiName are given, the table is returned.
---@param appName string The application name as given to `:RegisterOptionsTable()`
---@param uiType? AceConfigRegistry.UIType The type of UI to get the table for
---@param uiName? string The name of the library/addon querying for the table, e.g. "MyLib-1.0"
---@return AceConfigRegistry.OptionsGetter|table|nil
function lib:GetOptionsTable(appName, uiType, uiName) end
--- Returns an iterator of ["appName"]=funcref pairs
---@generic T: table, K: string, V: AceConfigRegistry.OptionsGetter
---@return fun(table: table<K, V>, index?: K):K, V
---@return T
function lib:IterateOptionsTables() end
--- Fires a "ConfigTableChange" callback for those listening in on it, allowing config GUIs to refresh.
---
--- You should call this function if your options table changed from any outside event, like a game event or a timer.
---@param appName string The application name as given to `:RegisterOptionsTable()`
function lib:NotifyChange(appName) end
--- Register an options table with the config registry.
---@param appName string The application name
---@param options AceConfigRegistry.OptionsGenerator|table The options table, OR a function reference that generates it on demand.
---@param skipValidation? boolean Skip options table validation (primarily useful for extremely huge options, with a noticeable slowdown)
function lib:RegisterOptionsTable(appName, options, skipValidation) end
--- Validates basic structure and integrity of an options table
---
--- Does NOT verify that get/set etc actually exist, since they can be defined at any depth
---@param options table The table to be validated
---@param name string The name of the table to be validated (shown in any error message)
---@param errlvl? number Error level offset, default 0 (=errors point to the function calling :ValidateOptionsTable)
function lib:ValidateOptionsTable(options, name, errlvl) end
@@ -0,0 +1,58 @@
---@meta _
---@class AceConsole-3.0
---@field embeds table ---table containing objects AceConsole is embedded in.
---@field commands table ---table containing commands registered
---@field weakcommands table ---table containing self, command => func references for weak commands that don't persist through enable/disable
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0)
local AceConsole = {}
---@param chatframe Frame Custom ChatFrame to print to (or any frame with an .AddMessage function)
---@param ... any List of any values to be printed
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-3)
---@diagnostic disable-next-line: duplicate-set-field
function AceConsole:Print(chatframe, ...) end
---@param ... any List of any values to be printed
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-3)
---@diagnostic disable-next-line: duplicate-set-field
function AceConsole:Print(...) end
---@param chatframe? Frame Custom ChatFrame to print to (or any frame with an .AddMessage function)
---@param format string same syntax as standard Lua format()
---@param ...? any Arguments to the format string
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-4)
---@diagnostic disable-next-line: duplicate-set-field
function AceConsole:Printf(chatframe, format, ...) end
---@param format string same syntax as standard Lua format()
---@param ...? any Arguments to the format string
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-4)
---@diagnostic disable-next-line: duplicate-set-field
function AceConsole:Printf(format, ...) end
---@param command string Chat command to be registered WITHOUT leading "/"
---@param func function|string Function to call when the slash command is being used (funcref or methodname)
---@param persist? boolean if false, the command will be soft disabled/enabled when aceconsole is used as a mixin (default: true)
---@return boolean -- true if successful
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-5)
function AceConsole:RegisterChatCommand(command, func, persist) end
---@param command string Chat command to be unregistered WITHOUT leading "/"
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-6)
function AceConsole:UnregisterChatCommand(command) end
---@return fun(table: table<string, string>, index?: string): string, string -- Iterator (pairs) over all commands
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-2)
function AceConsole:IterateChatCommands() end
---@param str string The raw argument string
---@param numargs? number How many arguments to get (default 1)
---@param startpos? number Where in the string to start scanning (default 1)
---@return ...
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-console-3-0#title-1)
function AceConsole:GetArgs(str, numargs, startpos) end
@@ -0,0 +1,148 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceDB-3.0
-- ----------------------------------------------------------------------------
---@class AceDB-3.0
local AceDB = {}
-- Creates a new database object that can be used to handle database settings and profiles.
-- By default, an empty DB is created, using a character specific profile.
--
-- You can override the default profile used by passing any profile name as the third argument, or by passing true as the third argument to use a globally shared profile called "Default".
--
-- Note that there is no token replacement in the default profile name, passing a defaultProfile as "char" will use a profile named "char", and not a character-specific profile.
---@param tbl string|table The name of variable, or table to use for the database
---@param defaults? AceDB.Schema A table of database defaults
---@param defaultProfile? string|true The name of the default profile. If not set, a character specific profile will be used as the default. You can also pass true to use a shared global profile called "Default".
---@return AceDBObject-3.0 DB
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-2)
function AceDB:New(tbl, defaults, defaultProfile) end
-- ----------------------------------------------------------------------------
-- AceDBObject-3.0
-- ----------------------------------------------------------------------------
---@class AceDBObject-3.0: AceDB.Schema
---@field keys table
---@field sv table
---@field defaults AceDB.Schema Cache of defaults
---@field parent table
local DBObjectLib = {}
-- Copies a named profile into the current profile, overwriting any conflicting settings.
---@param name string The name of the profile to be copied into the current profile
---@param silent? boolean If true, do not raise an error when the profile does not exist
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-3)
function DBObjectLib:CopyProfile(name, silent) end
-- Deletes a named profile.
--
-- This profile must not be the active profile.
---@param name string The name of the profile to be deleted
---@param silent? boolean If true, do not raise an error when the profile does not exist
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-4)
function DBObjectLib:DeleteProfile(name, silent) end
-- Returns the current profile name used by the database
---@return string profileName
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-5)
function DBObjectLib:GetCurrentProfile() end
-- Returns an already existing namespace from the database object.
---@param name string The name of the existing namespace
---@param silent? boolean if true, the addon is optional, silently return nil if its not found
---@return table|nil namespace the namespace object if found
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-6)
function DBObjectLib:GetNamespace(name, silent) end
-- Returns a table with the names of the existing profiles in the database.
--
-- You can optionally supply a table to re-use for this purpose.
---@param tbl? table A table to store the profile names in
---@return table profiles Contains the names of the existing profiles in the database.
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-7)
function DBObjectLib:GetProfiles(tbl) end
---@param target table The object registering to listen for the callback.
---@param eventName AceDB.EventName The name of the event triggering the callback
---@param method string|function The method to call when the event is fired.
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-db-3-0-tutorial#title-5)
function DBObjectLib.RegisterCallback(target, eventName, method) end
--Sets the defaults table for the given database object by clearing any that are currently set, and then setting the new defaults.
---@param defaults AceDB.Schema A table of defaults for this database
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-8)
function DBObjectLib:RegisterDefaults(defaults) end
-- Creates a new database namespace, directly tied to the database.
--
-- This is a full scale database in it's own rights other than the fact that it cannot control its profile individually
---@param name string The name of the new namespace
---@param defaults? AceDB.Schema A table of values to use as defaults
---@return AceDBObject-3.0 namespace The created database namespace
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-9)
function DBObjectLib:RegisterNamespace(name, defaults) end
-- Resets the entire database, using the string defaultProfile as the new default profile.
---@param defaultProfile? string The profile name to use as the default
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-10)
function DBObjectLib:ResetDB(defaultProfile) end
-- Resets the current profile to the default values (if specified).
---@param noChildren? boolean if set to true, the reset will not be populated to the child namespaces of this DB object
---@param noCallbacks? boolean if set to true, won't fire the OnProfileReset callback
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-11)
function DBObjectLib:ResetProfile(noChildren, noCallbacks) end
-- Changes the profile of the database and all of it's namespaces to the supplied named profile
--
-- Callback parameters: "OnProfileChanged", database, newProfileKey
---@param name string The name of the profile to set as the current profile
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-db-3-0#title-12)
function DBObjectLib:SetProfile(name) end
---@param target table The object unregistering to listen for callbacks.
function DBObjectLib.UnregisterAllCallbacks(target) end
---@param target table The object unregistering to listen for the callback.
---@param eventName AceDB.EventName The event to unregister.
function DBObjectLib.UnregisterCallback(target, eventName) end
-- ----------------------------------------------------------------------------
-- Types
-- ----------------------------------------------------------------------------
---@alias AceDB.EventName
---|"OnDatabaseReset"
---|"OnDatabaseShutdown"
---|"OnNewProfile"
---|"OnProfileChanged"
---|"OnProfileCopied"
---|"OnProfileDeleted"
---|"OnProfileReset"
---|"OnProfileShutdown"
---@class AceDB.Schema
---@field char? table Character-specific data. Every character has its own database.
---@field realm? table Realm-specific data. All of the players characters on the same realm share this database.
---@field class? table Class-specific data. All of the players characters of the same class share this database.
---@field race? table Race-specific data. All of the players characters of the same race share this database.
---@field faction? table Faction-specific data. All of the players characters of the same faction share this database.
---@field factionrealm? table Faction and realm specific data. All of the players characters on the same realm and of the same faction share this database.
---@field factionrealmregion? table Faction, realm and region specific data. All of the players characters on the same realm, of the same faction and in the same region share this database.
---@field locale? table Locale specific data, based on the locale of the players game client.
---@field global? table Global Data. All characters on the same account share this database.
---@field profile? table Profile-specific data. All characters using the same profile share this database. The user can control which profile should be used.
---@field profiles? table Contains all profiles
@@ -0,0 +1,23 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceDBOptions-3.0
-- ----------------------------------------------------------------------------
---@class AceDBOptions-3.0
local AceDBOptions = {}
--[[
Get/Create a option table that you can use in your addon to control the profiles of AceDB-3.0.
Usage:
Assuming `options` is your top-level options table and `self.db` is your database:
`options.args.profiles = LibStub("AceDBOptions-3.0"):GetOptionsTable(self.db)`
]]
---@paramsig db, noDefaultProfiles
---@param db AceDBObject-3.0 The database object to create the options table for.
---@param noDefaultProfiles? boolean
---@return AceConfig.OptionsTable optionsTable The options table to be used in AceConfig-3.0
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-dboptions-3-0#title-1)
function AceDBOptions:GetOptionsTable(db, noDefaultProfiles) end
@@ -0,0 +1,55 @@
---@meta _
--------------------------------------------------------------------------------
---- AceEvent-3.0
--------------------------------------------------------------------------------
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0)
---@class AceEvent-3.0
local AceEvent = {}
---@param event FrameEvent The event to register for
---@param callback? function|string The callback function to call when the event is triggered (funcref or method, defaults to a method with the event name)
---@param arg? any An optional argument to pass to the callback function
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0#title-1)
function AceEvent:RegisterEvent(event, callback, arg) end
---@param event FrameEvent The event to unregister
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0#title-4)
function AceEvent:UnregisterEvent(event) end
---@param message string The message to register for
---@param callback? function|string The callback function to call when the message is triggered (funcref or method, defaults to a method with the event name)
---@param arg? any An optional argument to pass to the callback function
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0#title-2)
function AceEvent:RegisterMessage(message, callback, arg) end
---@param message string The message to unregister
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0#title-5)
function AceEvent:UnregisterMessage(message) end
---@name AceEvent:SendMessage
---@param message string The message to send
---@param ... any Any arguments to the message
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0#title-3)
function AceEvent:SendMessage(message, ...) end
---@generic T
---@param target T target object to embed AceEvent in
---@return T|AceEvent-3.0 augmentedTarget
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0)
function AceEvent:Embed(target) end
---@param target AceEvent-3.0
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-event-3-0)
function AceEvent:OnEmbedDisable(target) end
function AceEvent:UnregisterAllEvents() end
function AceEvent:UnregisterAllMessages() end
@@ -0,0 +1,229 @@
---@meta _
---@alias AceGUILayoutType
---|"Flow"
---|"List"
---|"Fill"
---|"Table"
---@alias AceGUIWidgetType
---|"BlizOptionsGroup"
---|"Button"
---|"CheckBox"
---|"ColorPicker"
---|"Dropdown"
---|"EditBox"
---|"Heading"
---|"Icon"
---|"InteractiveLabel"
---|"Keybinding"
---|"Label"
---|"MultiLineEditBox"
---|"Slider"
---@alias AceGUIContainerType
---|"DropdownGroup"
---|"Frame"
---|"InlineGroup"
---|"ScrollFrame"
---|"SimpleGroup"
---|"TabGroup"
---|"TreeGroup"
---|"Window"
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0)
---@class AceGUI-3.0
---@field tooltip GameTooltip
local AceGUI = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-2)
function AceGUI:ClearFocus() end
---@param type AceGUIWidgetType|AceGUIContainerType
---@return AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-3)
function AceGUI:Create(type) end
---@param Name AceGUILayoutType
---@return function
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-4)
function AceGUI:GetLayout(Name) end
---@param type string
---@return number
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-5)
function AceGUI:GetNextWidgetNum(type) end
---@param type string
---@return number
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-6)
function AceGUI:GetWidgetCount(type) end
---@param type string
---@return number
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-7)
function AceGUI:GetWidgetVersion(type) end
---@param widget AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-8)
function AceGUI:RegisterAsContainer(widget) end
---@param widget AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-9)
function AceGUI:RegisterAsWidget(widget) end
---@param Name string
---@param LayoutFunc function
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-10)
function AceGUI:RegisterLayout(Name, LayoutFunc) end
---@param Name string
---@param Constructor function
---@param Version number
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-11)
function AceGUI:RegisterWidgetType(Name, Constructor, Version) end
---@param widget AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-12)
function AceGUI:Release(widget) end
---@param widget AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-gui-3-0#title-13)
function AceGUI:SetFocus(widget) end
---@meta _
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets)
---@class AceGUIWidget
---@field public type string
---@field protected frame Frame
---@field protected userdata table
---@field protected events table<string,function>
---@field protected width? string|number
---@field protected height? string|number
local AceGUIWidget = {}
---@param name string
---@param func function
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-1)
function AceGUIWidget:SetCallback(name, func) end
---@param width number
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-2)
function AceGUIWidget:SetWidth(width) end
---@param width number
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-3)
function AceGUIWidget:SetRelativeWidth(width) end
---@param height number
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-4)
function AceGUIWidget:SetHeight(height) end
---@return boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-5)
function AceGUIWidget:IsVisible() end
---@return boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-6)
function AceGUIWidget:IsShown() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-7)
function AceGUIWidget:Release() end
---@param point FramePoint
---@param relativeTo Region|string
---@param relativePoint string
---@param ofsx? number
---@param ofsy? number
---@overload fun(self, point: FramePoint, relativeTo: Region|string, ofsx?: number, ofsy?: number)
---@overload fun(self, point: FramePoint, ofsx?: number, ofsy?: number)
---[Documentation](https://warcraft.wiki.gg/wiki/API_Region_SetPoint)
function AceGUIWidget:SetPoint(point, relativeTo, relativePoint, ofsx, ofsy) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-9)
function AceGUIWidget:ClearAllPoints() end
---@return number
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-10)
function AceGUIWidget:GetNumPoints() end
---@param index number
---@return string point
---@return Region relativeTo
---@return string relativePoint
---@return number xOfs
---@return number yOfs
---[Documentation](https://warcraft.wiki.gg/wiki/API_Region_GetPoint)
function AceGUIWidget:GetPoint(index) end
---@return table
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-12)
function AceGUIWidget:GetUserDataTable() end
---@param key any
---@param value any
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-13)
function AceGUIWidget:SetUserData(key, value) end
---@param key any
---@return any
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-14)
function AceGUIWidget:GetUserData(key) end
---@param isFull boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-15)
function AceGUIWidget:SetFullHeight(isFull) end
---@return boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-16)
function AceGUIWidget:IsFullHeight() end
---@param isFull boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-17)
function AceGUIWidget:SetFullWidth(isFull) end
---@return boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-1-18)
function AceGUIWidget:IsFullWidth() end
---@param parent Region|string|nil
function AceGUIWidget:SetParent(parent) end
---@param name string
function AceGUIWidget:Fire(name, ...) end
---@return boolean
function AceGUIWidget:IsReleasing() end
---@meta _
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets)
---@class AceGUIContainer : AceGUIWidget
---@field protected children AceGUIWidget[]
---@field protected content Frame
local AceGUIContainer = {}
---@param widget AceGUIWidget
---@param beforeWidget? AceGUIWidget
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-1)
function AceGUIContainer:AddChild(widget, beforeWidget) end
---@param layout AceGUILayoutType
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-2)
function AceGUIContainer:SetLayout(layout) end
---@param flag boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-3)
function AceGUIContainer:SetAutoAdjustHeight(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-4)
function AceGUIContainer:ReleaseChildren() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-5)
function AceGUIContainer:DoLayout() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-6)
function AceGUIContainer:PauseLayout() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-3-7)
function AceGUIContainer:ResumeLayout() end
function AceGUIContainer:PerformLayout() end
@@ -0,0 +1,31 @@
---@meta _
---@class AceGUIBlizOptionsGroup : AceGUIContainer
---@field protected label FontString
local AceGUIBlizOptionsGroup = {}
---@param text string
function AceGUIBlizOptionsGroup:SetTitle(text) end
---@param name string
---@param parent unknown
function AceGUIBlizOptionsGroup:SetName(name, parent) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param key unknown
function AceGUIBlizOptionsGroup:SetGroup(key) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param width number
function AceGUIBlizOptionsGroup:SetDropdownWidth(width) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param statusTable table
function AceGUIBlizOptionsGroup:SetStatusTable(statusTable) end
---@protected
---@param width integer
function AceGUIBlizOptionsGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUIBlizOptionsGroup:OnHeightSet(height) end
@@ -0,0 +1,48 @@
---@meta _
---@class AceGUIDropdownGroup : AceGUIContainer
---@field protected localstatus table
---@field protected status? table
---@field protected titletext FontString
---@field protected dropdown AceGUIDropdown
---@field protected border Frame|BackdropTemplate
local AceGUIDropdownGroup = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param text string
function AceGUIDropdownGroup:SetTitle(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param groupList table<unknown, string>
---@param order? unknown[]
function AceGUIDropdownGroup:SetGroupList(groupList, order) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param key unknown
function AceGUIDropdownGroup:SetGroup(key) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param width number
function AceGUIDropdownGroup:SetDropdownWidth(width) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-1-1)
---@param statusTable table
function AceGUIDropdownGroup:SetStatusTable(statusTable) end
---@protected
---@param width integer
function AceGUIDropdownGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUIDropdownGroup:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUIDropdownGroup:LayoutFinished(width, height) end
---@class AceGUIDropdownGroupStatus
---@field selected? unknown
---@field left? number
---@field width? number
---@field height? number
@@ -0,0 +1,48 @@
---@meta _
---@class AceGUIFrame : AceGUIContainer
---@field protected localstatus AceGUIFrameStatus
---@field protected status? AceGUIFrameStatus
---@field protected titletext FontString
---@field protected statustext FontString
---@field protected titlebg Texture
---@field protected sizer_se Frame
---@field protected sizer_s Frame
---@field protected sizer_e Frame
---@field protected frame Frame|BackdropTemplate
local AceGUIFrame = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-2-1)
---@param text string
function AceGUIFrame:SetTitle(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-2-1)
---@param text string
function AceGUIFrame:SetStatusText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-2-1)
---@param statusTable table
function AceGUIFrame:SetStatusTable(statusTable) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-2-1)
function AceGUIFrame:ApplyStatus() end
function AceGUIFrame:Show() end
function AceGUIFrame:Hide() end
---@param state boolean
function AceGUIFrame:EnableResize(state) end
---@protected
---@param width integer
function AceGUIFrame:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUIFrame:OnHeightSet(height) end
---@class AceGUIFrameStatus
---@field top? number
---@field left? number
---@field width? number
---@field height? number
@@ -0,0 +1,21 @@
---@meta _
---@class AceGUIInlineGroup : AceGUIContainer
---@field protected titletext FontString
local AceGUIInlineGroup = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-3-1)
---@param text string
function AceGUIInlineGroup:SetTitle(text) end
---@protected
---@param width integer
function AceGUIInlineGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUIInlineGroup:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUIInlineGroup:LayoutFinished(width, height) end
@@ -0,0 +1,38 @@
---@meta _
---@class AceGUIScrollFrame : AceGUIContainer
---@field protected localstatus AceGUIScrollFrameStatus
---@field protected status? AceGUIScrollFrameStatus
---@field protected scrollframe ScrollFrame
---@field protected scrollbar Slider
local AceGUIScrollFrame = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-4-1)
---@param value number
function AceGUIScrollFrame:SetScroll(value) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-4-1)
---@param statusTable table
function AceGUIScrollFrame:SetStatusTable(statusTable) end
---@param value number
function AceGUIScrollFrame:MoveScroll(value) end
---@protected
function AceGUIScrollFrame:FixScroll() end
---@protected
---@param width integer
function AceGUIScrollFrame:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUIScrollFrame:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUIScrollFrame:LayoutFinished(width, height) end
---@class AceGUIScrollFrameStatus
---@field scrollvalue number
---@field offset integer?
@@ -0,0 +1,16 @@
---@meta _
---@class AceGUISimpleGroup : AceGUIContainer
local AceGUISimpleGroup = {}
---@protected
---@param width integer
function AceGUISimpleGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUISimpleGroup:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUISimpleGroup:LayoutFinished(width, height) end
@@ -0,0 +1,57 @@
---@meta _
---@class AceGUITabGroup : AceGUIContainer
---@field protected num integer
---@field protected localstatus AceGUITabGroupStatus
---@field protected status? AceGUITabGroupStatus
---@field protected alignoffset number
---@field protected titletext FontString
---@field protected border Frame|BackdropTemplate
---@field protected borderoffset number
---@field protected tabs Button[]
---@field protected tablist AceGUITabGroupTab[]
local AceGUITabGroup = {}
---@class AceGUITabGroupTab
---@field value unknown
---@field text string
---@field disabled? boolean
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-6-1)
---@param text string
function AceGUITabGroup:SetTitle(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-6-1)
---@param tabsTable AceGUITabGroupTab[]
function AceGUITabGroup:SetTabs(tabsTable) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-6-1)
---@param key string
function AceGUITabGroup:SelectTab(key) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-6-1)
---@param statusTable table
function AceGUITabGroup:SetStatusTable(statusTable) end
---@protected
function AceGUITabGroup:BuildTabs() end
---@protected
---@param id integer
---@return Button
function AceGUITabGroup:CreateTab(id) end
---@protected
---@param width integer
function AceGUITabGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUITabGroup:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUITabGroup:LayoutFinished(width, height) end
---@class AceGUITabGroupStatus
---@field selected? string
@@ -0,0 +1,101 @@
---@meta _
---@class AceGUITreeGroup : AceGUIContainer
---@field protected lines AceGUITreeGroupLine[]
---@field protected buttons Button[]
---@field protected localstatus AceGUITreeGroupStatus
---@field protected status? AceGUITreeGroupStatus
---@field protected filter boolean
---@field protected treeframe Frame|BackdropTemplate
---@field protected dragger Frame|BackdropTemplate
---@field protected scrollbar Slider
---@field protected border Frame|BackdropTemplate
---@field protected enabletooltips boolean
local AceGUITreeGroup = {}
---@protected
---@return Button
function AceGUITreeGroup:CreateButton() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-7-1)
---@param tree table
---@param filter? boolean
function AceGUITreeGroup:SetTree(tree, filter) end
---@param value string
function AceGUITreeGroup:SetSelected(value) end
---@param uniquevalue string
---@param ... string
function AceGUITreeGroup:Select(uniquevalue, ...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-7-1)
---@param ... string
function AceGUITreeGroup:SelectByPath(...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-7-1)
---@param uniquevalue string
function AceGUITreeGroup:SelectByValue(uniquevalue) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-7-1)
---@param flag boolean
function AceGUITreeGroup:EnableButtonTooltips(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-4-7-1)
---@param statusTable table
function AceGUITreeGroup:SetStatusTable(statusTable) end
---@param show boolean
function AceGUITreeGroup:ShowScroll(show) end
---@param treewidth integer
---@param resizable boolean
function AceGUITreeGroup:SetTreeWidth(treewidth, resizable) end
---@return integer
function AceGUITreeGroup:GetTreeWidth() end
---@protected
---@param tree table
---@param level? integer
---@param parent? AceGUITreeGroupLine
function AceGUITreeGroup:BuildLevel(tree, level, parent) end
---@protected
---@param scrollToSelection? boolean
---@param fromOnUpdate? boolean
function AceGUITreeGroup:RefreshTree(scrollToSelection, fromOnUpdate) end
---@protected
---@param width integer
function AceGUITreeGroup:OnWidthSet(width) end
---@protected
---@param height integer
function AceGUITreeGroup:OnHeightSet(height) end
---@protected
---@param width integer
---@param height integer
function AceGUITreeGroup:LayoutFinished(width, height) end
---@class AceGUITreeGroupStatus
---@field groups table
---@field scrollvalue number
---@field scrollToSelection? boolean
---@field fullwidth? boolean
---@field treewidth? integer
---@field treesizable? boolean
---@field selected? string
---@class AceGUITreeGroupLine
---@field value any
---@field text string
---@field icon? string|integer
---@field iconCoords? number[]
---@field disabled? boolean
---@field tree table
---@field level integer
---@field parent? AceGUITreeGroupLine
---@field visible? boolean
---@field uniquevalue string
---@field hasChildren? boolean
@@ -0,0 +1,31 @@
---@meta _
---@class AceGUIWindow : AceGUIContainer
---@field protected status? table
---@field protected localstatus table
---@field protected closebutton Button
---@field protected titletext FontString
---@field protected title Button
---@field protected sizer_se Frame
---@field protected line1 Texture
---@field protected line2 Texture
---@field protected sizer_s Frame
---@field protected sizer_e Frame
local AceGUIWindow = {}
function AceGUIWindow:Hide() end
function AceGUIWindow:Show() end
function AceGUIWindow:ApplyStatus() end
---@param title string
function AceGUIWindow:SetTitle(title) end
---@param status table
function AceGUIWindow:SetStatusTable(status) end
---@param text string
function AceGUIWindow:SetStatusText(text) end
---@param state boolean
function AceGUIWindow:EnableResize(state) end
@@ -0,0 +1,16 @@
---@meta _
---@class AceGUIButton : AceGUIWidget
---@field protected text FontString
local AceGUIButton = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-1-1)
---@param text string
function AceGUIButton:SetText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-1-1)
---@param autoWidth boolean
function AceGUIButton:SetAutoWidth(autoWidth) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-1-1)
---@param flag boolean
function AceGUIButton:SetDisabled(flag) end
@@ -0,0 +1,44 @@
---@meta _
---@class AceGUICheckBox : AceGUIWidget
---@field protected checkbg Texture
---@field protected check Texture
---@field protected text FontString
---@field protected highlight Texture
---@field protected image Texture
local AceGUICheckBox = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param flag boolean|nil
function AceGUICheckBox:SetValue(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@return boolean|nil
function AceGUICheckBox:GetValue() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param checkType "radio"|"checkbox"
function AceGUICheckBox:SetType(checkType) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
function AceGUICheckBox:ToggleChecked() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param text string
function AceGUICheckBox:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param state boolean
function AceGUICheckBox:SetTriState(state) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param flag boolean
function AceGUICheckBox:SetDisabled(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param description string
function AceGUICheckBox:SetDescription(description) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-2-1)
---@param path string|number
---@param ...? unknown
function AceGUICheckBox:SetImage(path, ...) end
@@ -0,0 +1,24 @@
---@meta _
---@class AceGUIColorPicker : AceGUIWidget
---@field protected colorSwatch Texture
---@field protected text FontString
local AceGUIColorPicker = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-3-1)
---@param r number
---@param g number
---@param b number
---@param a number
function AceGUIColorPicker:SetColor(r, g, b, a) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-3-1)
---@param text string
function AceGUIColorPicker:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-3-1)
---@param flag boolean
function AceGUIColorPicker:SetHasAlpha(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-3-1)
---@param flag boolean
function AceGUIColorPicker:SetDisabled(flag) end
@@ -0,0 +1,61 @@
---@meta _
---@class AceGUIDropdown : AceGUIWidget
---@field protected dropdown Frame
---@field protected count number
---@field protected button Button
---@field protected button_cover Button
---@field protected text FontString
---@field protected label FontString
local AceGUIDropdown = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param key unknown
function AceGUIDropdown:SetValue(key) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param list table<unknown, string>
---@param order? unknown[]
function AceGUIDropdown:SetList(list, order) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param text string
function AceGUIDropdown:SetText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param text string
function AceGUIDropdown:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param key unknown
---@param value string
function AceGUIDropdown:AddItem(key, value) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param flag boolean
function AceGUIDropdown:SetMultiselect(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@return boolean
function AceGUIDropdown:GetMultiselect() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param key unknown
---@param value string
function AceGUIDropdown:SetItemValue(key, value) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param key unknown
---@param flag boolean
function AceGUIDropdown:SetItemDisabled(key, flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-4-1)
---@param flag boolean
function AceGUIDropdown:SetDisabled(flag) end
function AceGUIDropdown:ClearFocus() end
---@return unknown
function AceGUIDropdown:GetValue() end
---@param width number
function AceGUIDropdown:SetPulloutWidth(width) end
@@ -0,0 +1,40 @@
---@meta _
---@class AceGUIEditBox : AceGUIWidget
---@field protected alignoffset number
---@field protected editbox EditBox
---@field protected label FontString
---@field protected button Button
local AceGUIEditBox = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param text string
function AceGUIEditBox:SetText(text) end
--- ---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@return string
function AceGUIEditBox:GetText() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param text string
function AceGUIEditBox:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param flag boolean
function AceGUIEditBox:SetDisabled(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param flag boolean
function AceGUIEditBox:DisableButton(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param num number
function AceGUIEditBox:SetMaxLetters(num) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
function AceGUIEditBox:SetFocus() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-5-1)
---@param from? number
---@param to? number
function AceGUIEditBox:HighlightText(from, to) end
function AceGUIEditBox:ClearFocus() end
@@ -0,0 +1,10 @@
---@meta _
---@class AceGUIHeading : AceGUIWidget
---@field protected label FontString
---@field protected left Texture
---@field protected right Texture
local AceGUIHeading = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-6-1)
---@param text string
function AceGUIHeading:SetText(text) end
@@ -0,0 +1,22 @@
---@meta _
---@class AceGUIIcon : AceGUIWidget
---@field protected label FontString
---@field protected image Texture
local AceGUIIcon = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-7-1)
---@param image string|number
---@param ...? unknown
function AceGUIIcon:SetImage(image, ...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-7-1)
---@param width number
---@param height number
function AceGUIIcon:SetImageSize(width, height) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-7-1)
---@param text string
function AceGUIIcon:SetLabel(text) end
---@param disabled boolean
function AceGUIIcon:SetDisabled(disabled) end
@@ -0,0 +1,51 @@
---@meta _
---@class AceGUIInteractiveLabel : AceGUIWidget
---@field protected highlight Texture
local AceGUIInteractiveLabel = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param text string
function AceGUIInteractiveLabel:SetText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param r number
---@param g number
---@param b number
function AceGUIInteractiveLabel:SetColor(r, g, b) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param font FontFile
---@param height number
---@param flags string?
function AceGUIInteractiveLabel:SetFont(font, height, flags) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param font? FontObject
function AceGUIInteractiveLabel:SetFontObject(font) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param image string|number
---@param ...? unknown
function AceGUIInteractiveLabel:SetImage(image, ...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param width number
---@param height number
function AceGUIInteractiveLabel:SetImageSize(width, height) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param ... number Set the image of the highlight.
function AceGUIInteractiveLabel:SetHighlight(...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-8-1)
---@param ... number? Pass 4 or 8 SetTexCoords parameters
function AceGUIInteractiveLabel:SetHighlightTexCoord(...) end
---@param disabled boolean
function AceGUIInteractiveLabel:SetDisabled(disabled) end
---@param justifyH JustifyHorizontal
function AceGUIInteractiveLabel:SetJustifyH(justifyH) end
---@param justifyV JustifyVertical
function AceGUIInteractiveLabel:SetJustifyV(justifyV) end
@@ -0,0 +1,23 @@
---@meta _
---@class AceGUIKeybinding : AceGUIWidget
---@field protected button Button
---@field protected label FontString
---@field protected msgframe Frame|BackdropTemplate
---@field protected alignoffset number
local AceGUIKeybinding = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-9-1)
---@param key string
function AceGUIKeybinding:SetKey(key) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-9-1)
---@return string
function AceGUIKeybinding:GetKey() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-9-1)
---@param text string
function AceGUIKeybinding:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-9-1)
---@param flag boolean
function AceGUIKeybinding:SetDisabled(flag) end
@@ -0,0 +1,41 @@
---@meta _
---@class AceGUILabel : AceGUIWidget
---@field protected label FontString
---@field protected image Texture
local AceGUILabel = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param text string
function AceGUILabel:SetText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param r number
---@param g number
---@param b number
function AceGUILabel:SetColor(r, g, b) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param font FontFile
---@param height number
---@param flags string?
function AceGUILabel:SetFont(font, height, flags) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param font? FontObject
function AceGUILabel:SetFontObject(font) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param image string|number
---@param ... number? Pass 4 or 8 SetTexCoords parameters
function AceGUILabel:SetImage(image, ...) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-10-1)
---@param width number
---@param height number
function AceGUILabel:SetImageSize(width, height) end
---@param justifyH JustifyHorizontal
function AceGUILabel:SetJustifyH(justifyH) end
---@param justifyV JustifyVertical
function AceGUILabel:SetJustifyV(justifyV) end
@@ -0,0 +1,55 @@
---@meta _
---@class AceGUIMultiLineEditBox : AceGUIWidget
---@field protected button Button
---@field protected editBox EditBox
---@field protected label FontString
---@field protected labelHeight number
---@field protected numlines number
---@field protected scrollBar Frame
---@field protected scrollBG Frame|BackdropTemplate
---@field protected scrollFrame ScrollFrame
local AceGUIMultiLineEditBox = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param text string
function AceGUIMultiLineEditBox:SetText(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@return string
function AceGUIMultiLineEditBox:GetText() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param text string
function AceGUIMultiLineEditBox:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param num number
function AceGUIMultiLineEditBox:SetNumLines(num) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param flag boolean
function AceGUIMultiLineEditBox:SetDisabled(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param num number
function AceGUIMultiLineEditBox:SetMaxLetters(num) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param flag boolean
function AceGUIMultiLineEditBox:DisableButton(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
function AceGUIMultiLineEditBox:SetFocus() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-11-1)
---@param from? number
---@param to? number
function AceGUIMultiLineEditBox:HighlightText(from, to) end
function AceGUIMultiLineEditBox:ClearFocus() end
---@return number
function AceGUIMultiLineEditBox:GetCursorPosition() end
---@param position number
function AceGUIMultiLineEditBox:SetCursorPosition(position) end
@@ -0,0 +1,35 @@
---@meta _
---@class AceGUISlider : AceGUIWidget
---@field protected label FontString
---@field protected slider Slider|BackdropTemplate
---@field protected lowtext FontString
---@field protected hightext FontString
---@field protected editbox EditBox|BackdropTemplate
---@field protected alignoffset number
local AceGUISlider = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@param value number
function AceGUISlider:SetValue(value) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@return number
function AceGUISlider:GetValue() end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@param min? number
---@param max? number
---@param step? number
function AceGUISlider:SetSliderValues(min, max, step) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@param flag boolean
function AceGUISlider:SetIsPercent(flag) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@param text string
function AceGUISlider:SetLabel(text) end
---[Documentation](https://www.wowace.com/projects/ace3/pages/ace-gui-3-0-widgets#title-2-12-1)
---@param flag boolean
function AceGUISlider:SetDisabled(flag) end
@@ -0,0 +1,152 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceHook-3.0
-- ----------------------------------------------------------------------------
---@class AceHook-3.0
---@field hooks { [table]: { [string]: function } } | { [string]: function }
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0)
local AceHook = {}
-- ----------------------------------------------------------------------------
-- AceHook-3.0 Methods
-- ----------------------------------------------------------------------------
-- Hook a function or a method on an object.
--
-- The hook created will be a "safe hook", that means that your handler will be called before the hooked function ("Pre-Hook"), and you don't have to call the original function yourself, however you cannot stop the execution of the function, or modify any of the arguments/return values.
--
-- This type of hook is typically used if you need to know if some function got called, and don't want to modify it.
---@param object table The object to hook a method from
---@param method string The name of the object method to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---@param hookSecure? boolean If true, AceHook will allow hooking of secure functions.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-1)
function AceHook:Hook(object, method, handler, hookSecure) end
-- Hook a function or a method on an object.
--
-- The hook created will be a "safe hook", that means that your handler will be called before the hooked function ("Pre-Hook"), and you don't have to call the original function yourself, however you cannot stop the execution of the function, or modify any of the arguments/return values.
--
-- This type of hook is typically used if you need to know if some function got called, and don't want to modify it.
---@param method string The name of the function to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---@param hookSecure? boolean If true, AceHook will allow hooking of secure functions.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-1)
function AceHook:Hook(method, handler, hookSecure) end
-- Hook a script handler on a frame.
--
-- The hook created will be a "safe hook", that means that your handler will be called before the hooked script ("Pre-Hook"), and you don't have to call the original function yourself, however you cannot stop the execution of the function, or modify any of the arguments/return values.
--
-- This is the frame script equivalent of the :Hook safe-hook. It would typically be used to be notified when a certain event happens to a frame.
---@param frame Frame The Frame to hook the script on
---@param script ScriptFrame The script to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-2)
function AceHook:HookScript(frame, script, handler) end
-- Check if the specific function, method or script is already hooked.
---@param obj table The object or frame to unhook from
---@param method string The name of the method, function or script to unhook from.
---@return boolean isHooked
---@return function|nil hookedFunction
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-3)
function AceHook:IsHooked(obj, method) end
-- Check if the specific function, method or script is already hooked.
---@param method string The name of the method, function or script to unhook from.
---@return boolean isHooked
---@return function|nil hookedFunction
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-3)
function AceHook:IsHooked(method) end
-- RawHook a function or a method on an object.
--
-- The hook created will be a "raw hook", that means that your handler will completly replace the original function, and your handler has to call the original function (or not, depending on your intentions).
--
-- The original function will be stored in `self.hooks[object][method]` or `self.hooks[functionName]` respectively.
--
-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments or want to control execution of the original function.
---@param object table The object to hook a method from
---@param method string The name of the object method to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---@param hookSecure? boolean If true, AceHook will allow hooking of secure functions.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-4)
function AceHook:RawHook(object, method, handler, hookSecure) end
-- RawHook a function or a method on an object.
--
-- The hook created will be a "raw hook", that means that your handler will completly replace the original function, and your handler has to call the original function (or not, depending on your intentions).
--
-- The original function will be stored in `self.hooks[object][method]` or `self.hooks[functionName]` respectively.
--
-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments or want to control execution of the original function.
---@param method string The name of the function to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---@param hookSecure? boolean If true, AceHook will allow hooking of secure functions.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-4)
function AceHook:RawHook(method, handler, hookSecure) end
-- RawHook a script handler on a frame.
--
-- The hook created will be a "raw hook", that means that your handler will completly replace the original script, and your handler has to call the original script (or not, depending on your intentions).
--
-- The original script will be stored in `self.hooks[frame][script]`.
--
-- This type of hook can be used for all purposes, and is usually the most common case when you need to modify arguments or want to control execution of the original script.
---@param frame Frame The Frame to hook the script on
---@param script ScriptFrame The script to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-5)
function AceHook:RawHookScript(frame, script, handler) end
-- SecureHook a function or a method on an object.
--
-- This function is a wrapper around the `hooksecurefunc` function in the WoW API. Using AceHook extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't required anymore, or the addon is being disabled.
--
-- Secure Hooks should be used if the secure-status of the function is vital to its function, and taint would block execution. Secure Hooks are always called after the original function was called ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
---@param object table The object to hook a method from
---@param method string The name of the object method to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-6)
function AceHook:SecureHook(object, method, handler) end
-- SecureHook a function or a method on an object.
--
-- This function is a wrapper around the `hooksecurefunc` function in the WoW API. Using AceHook extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't required anymore, or the addon is being disabled.
--
-- Secure Hooks should be used if the secure-status of the function is vital to its function, and taint would block execution. Secure Hooks are always called after the original function was called ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
---@param method string The name of the function to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked function)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-6)
function AceHook:SecureHook(method, handler) end
-- SecureHook a script handler on a frame.
--
-- This function is a wrapper around the `frame:HookScript` function in the WoW API. Using AceHook extends the functionality of secure hooks, and adds the ability to unhook once the hook isn't required anymore, or the addon is being disabled.
--
-- Secure Hooks should be used if the secure-status of the function is vital to its function, and taint would block execution. Secure Hooks are always called after the original function was called ("Post Hook"), and you cannot modify the arguments, return values or control the execution.
---@param frame Frame The Frame to hook the script on
---@param script ScriptFrame The script to hook
---@param handler? function|string The handler for the hook, a funcref or a method name. (Defaults to the name of the hooked script)
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-7)
function AceHook:SecureHookScript(frame, script, handler) end
-- Unhook from the specified function, method or script.
---@param obj table The object or frame to unhook from
---@param method string The name of the method, function or script to unhook from.
---@return boolean success Whether or not the operation was successful
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-8)
function AceHook:Unhook(obj, method) end
-- Unhook from the specified function, method or script.
---@param method string The name of the method, function or script to unhook from.
---@return boolean success Whether or not the operation was successful
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-8)
function AceHook:Unhook(method) end
-- Unhook all existing hooks for this addon.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-hook-3-0#title-9)
function AceHook:UnhookAll() end
@@ -0,0 +1,32 @@
---@meta _
---@class AceLocale-3.0
local AceLocale = {}
---@param application string Unique name of addon / module
---@param silent? boolean If true, the locale is optional, silently return nil if it's not found (defaults to false, optional)
---@return table<string, string> locale The locale table for the current language.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-locale-3-0#title-1)
function AceLocale:GetLocale(application, silent) end
---@paramsig application, locale[, isDefault[, silent]]
---@param application string Unique name of addon / module
---@param locale AceLocale.LocaleCode Name of the locale to register, e.g. "enUS", "deDE", etc.
---@param isDefault? boolean If this is the default locale being registered. Your addon is written in this language, generally enUS, set this to true (defaults to false)
---@param silent? boolean If true, the locale will not issue warnings for missing keys. Must be `true` on the first locale registered. If set to "raw", nils will be returned for unknown keys (no metatable used).
---@return table<string, boolean|string>? locale Locale Table to add localizations to, or nil if the current locale is not required.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-locale-3-0#title-2)
function AceLocale:NewLocale(application, locale, isDefault, silent) end
---@alias AceLocale.LocaleCode
---|"deDE": German (Germany)
---|"enGB": English (Great Britain)
---|"enUS": English (America)
---|"esES": Spanish (Spain)
---|"esMX": Spanish (Mexico)
---|"frFR": French (France)
---|"itIT": Italian (Italy)
---|"koKR": Korean (Korea)
---|"ptBR": Portuguese (Brazil)
---|"ruRU": Russian (Russia)
---|"zhCN": Simplified Chinese (China)
---|"zhTW": Traditional Chinese (Taiwan)
@@ -0,0 +1,16 @@
---@meta _
---@class AceSerializer-3.0
local AceSerializer = {}
---@param str string The serialized data (from :Serialize)
---@return boolean -- true followed by a list of values, OR false followed by an error message
---@return ... -- List of values or error message
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-serializer-3-0#title-1)
function AceSerializer:Deserialize(str)end
---@param ... any List of values to serialize
---@return string -- The data in its serialized form (string)
--- ---
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-serializer-3-0#title-2)
function AceSerializer:Serialize(...) end
@@ -0,0 +1,35 @@
---@meta _
-- ----------------------------------------------------------------------------
-- AceTab-3.0
-- ----------------------------------------------------------------------------
---@class AceTab-3.0
local AceTab = {}
-- stylua: ignore start
-- Registers a tab completion set with AceTab
---@param descriptor string Unique identifier for this tab completion set
---@param prematches string|table|nil String match(es) AFTER which this tab completion will apply.<br>AceTab will ignore tabs NOT preceded by the string(s).<br>If no value is passed, will check all tabs pressed in the specified editframe(s) UNLESS a more-specific tab complete applies.
---@param wordlist function|table Function that will be passed a table into which it will insert strings corresponding to all possible completions, or an equivalent table.<br>The text in the editbox, the position of the start of the word to be completed, and the uncompleted partial word are passed as second, third, and fourth arguments, to facilitate pre-filtering or conditional formatting, if desired.
---@param usagefunc function|boolean|nil Usage statement function. Defaults to the wordlist, one per line. A boolean true squelches usage output.
---@param listenframes string|EditBox|nil EditFrames to monitor. Defaults to ChatFrameEditBox.
---@param postfunc function|nil Post-processing function. If supplied, matches will be passed through this function after they've been identified as a match.
---@param pmoverwrite boolean|number|nil Offset the beginning of the completion string in the editbox when making a completion.<br>Passing a boolean true indicates that we want to overwrite the entire prematch string, and passing a number will overwrite that many characters prior to the cursor.<br>This is useful when you want to use the prematch as an indicator character, but ultimately do not want it as part of the text, itself.
function AceTab:RegisterTabCompletion(descriptor, prematches, wordlist, usagefunc, listenframes, postfunc, pmoverwrite) end
-- stylua: ignore end
-- Returns whether or not a tab completion set is registered.
---@param descriptor string Unique identifier for this tab completion set
---@return boolean
function AceTab:IsTabCompletionRegistered(descriptor) end
-- Unregisters a tab completion set from AceTab
---@param descriptor string Unique identifier for this tab completion set
function AceTab:UnregisterTabCompletion(descriptor) end
-- AceTab internal OnTabPressed script hook
---@param editBox EditBox The editbox to operate on
function AceTab:OnTabPressed(editBox) end
@@ -0,0 +1,37 @@
---@meta _
---@class AceTimerObj
---@field object table The object that the timer is registered on (self)
---@field func function Callback function
---@field looping boolean If true, the timer will loop
---@field argsCount number number of arguments to pass to the callback function
---@field delay number delay in seconds
---@field ends number GetTime() + delay,
---@class AceTimer-3.0
local AceTimer = {}
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-timer-3-0#title-1)
function AceTimer:CancelAllTimers() end
---@param id AceTimerObj The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-timer-3-0#title-2)
function AceTimer:CancelTimer(id) end
---@param func function|string Callback function for the timer pulse (funcref or method name).
---@param delay number Delay for the timer, in seconds.
---@param ... any An optional, unlimited amount of arguments to pass to the callback function.
---@return AceTimerObj
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-timer-3-0#title-3)
function AceTimer:ScheduleRepeatingTimer(func, delay, ...) end
---@param func function|string callback Callback function for the timer pulse (funcref or method name).
---@param delay number Delay for the timer, in seconds.
---@param ... any An optional, unlimited amount of arguments to pass to the callback function.
---@return AceTimerObj
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-timer-3-0#title-4)
function AceTimer:ScheduleTimer(func, delay, ...) end
---@param id AceTimerObj The id of the timer, as returned by `:ScheduleTimer` or `:ScheduleRepeatingTimer`
---@return number -- The time left on the timer.
---[Documentation](https://www.wowace.com/projects/ace3/pages/api/ace-timer-3-0#title-5)
function AceTimer:TimeLeft(id) end
@@ -0,0 +1,27 @@
---@meta _
-- ----------------------------------------------------------------------------
-- CallbackHandler-1.0
-- ----------------------------------------------------------------------------
---@class CallbackHandler-1.0
local CallbackHandler = {}
---@param target table target object to embed public APIs in
---@param RegisterName? string name of the callback registration API, default "RegisterCallback"
---@param UnregisterName? string name of the callback unregistration API, default "UnregisterCallback"
---@param UnregisterAllName? string name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API.
---@return CallbackHandlerRegistry
function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName) end
-- ----------------------------------------------------------------------------
-- CallbackHandlerRegistry
-- ----------------------------------------------------------------------------
---@class CallbackHandlerRegistry
---@field OnUnused? fun(registry: CallbackHandlerRegistry, target: table, eventName: string) If defined, called when an event stops.
---@field OnUsed? fun(registry: CallbackHandlerRegistry, target: table, eventName: string) If defined, called when an event starts.
local CallbackHandlerRegistry = {}
---fires the given event/message into the registry
---@param eventname string
---@param ... unknown passed to the functions listening to the event.
function CallbackHandlerRegistry:Fire(eventname, ...) end
@@ -0,0 +1,50 @@
---@meta _
---@class ChatThrottleLib
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib)
ChatThrottleLib = {}
---@alias ChatThrottleLib.prio "BULK"|"NORMAL"|"ALERT"
---@param prio ChatThrottleLib.prio
---@param prefix string
---@param text string
---@param chattype string
---@param languageID? number
---@param destination? string
---@param queueName? string
---@param callbackFn? function
---@param callbackArg? any
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib#ChatThrottleLib:SendChatMessage)
function ChatThrottleLib:SendChatMessage(prio, prefix, text, chattype, languageID, destination, queueName, callbackFn, callbackArg) end
---@param prio ChatThrottleLib.prio
---@param prefix string
---@param text string
---@param chattype string
---@param target? string
---@param queueName? string
---@param callbackFn? function
---@param callbackArg? any
---[Documentation](https://warcraft.wiki.gg/wiki/ChatThrottleLib#ChatThrottleLib:SendAddonMessage)
function ChatThrottleLib:SendAddonMessage(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg) end
---@param prio ChatThrottleLib.prio
---@param prefix string
---@param text string
---@param chattype string
---@param target? string
---@param queueName? string
---@param callbackFn? function
---@param callbackArg? any
function ChatThrottleLib:SendAddonMessageLogged(prio, prefix, text, chattype, target, queueName, callbackFn, callbackArg) end
---@param prio ChatThrottleLib.prio
---@param prefix string
---@param text string
---@param chattype string must be WHISPER
---@param gameAccountID number
---@param queueName? string
---@param callbackFn? function
---@param callbackArg? any
function ChatThrottleLib:BNSendGameData(prio, prefix, text, chattype, gameAccountID, queueName, callbackFn, callbackArg) end
@@ -0,0 +1,164 @@
---@meta _
-- ----------------------------------------------------------------------------
-- HereBeDragons-2.0
-- ----------------------------------------------------------------------------
---@class HereBeDragons-2.0
---[Documentation](https://www.wowace.com/projects/herebedragons/pages/api/here-be-dragons-2-0)
local lib = {}
-- ----------------------------------------------------------------------------
-- Map Info
-- ----------------------------------------------------------------------------
--- Get a table with all known UI Map IDs
---@return number[] uiMapIDs An array-style table with all known/valid map IDs
function lib:GetAllMapIDs() end
--- Get the localized name of the map
---@param uiMapID number The ID of the map to query
---@return string mapName The localized name of the map
function lib:GetLocalizedMap(uiMapID) end
--- Get the physical size of a zone, in yards
---@param uiMapID number The ID of the map to query
---@return number width Zone Width in Yards
---@return number height Zone Height in Yards
function lib:GetZoneSize(uiMapID) end
-- ----------------------------------------------------------------------------
-- Coordinate Transformation
-- ----------------------------------------------------------------------------
--- Get the Azeroth World Map Coordinates to the specified World Coordinates, within the specified continent instance.
---@param x number X coordinates in the World Coordinate system
---@param y number Y coordinates in the World Coordinate system
---@param instance number InstanceID of the continent these coordinates belong to
---@param allowOutOfBounds? boolean If true, do not clip the coordinates into the 0-1 range if the point is outside of the current map.
---@return number x X coordinate in the Zone Coordinate system
---@return number y Y coordinate in the Zone Coordinate system
function lib:GetAzerothWorldMapCoordinatesFromWorld(x, y, instance, allowOutOfBounds) end
--- Get the World Coordinates to the specified Azeroth world map coordinates
---@param x number X coordinates in the zone coordinate system (0-1)
---@param y number Y coordinates in the zone coordinate system (0-1)
---@param instance number InstanceID of the continent these coordinates belong to
---@return number x X coordinate in the World Coordinate system
---@return number y Y coordinate in the World Coordinate system
function lib:GetWorldCoordinatesFromAzerothWorldMap(x, y, instance) end
--- Get the World Coordinates to the specified Zone Coordinates
---@param x number X coordinates in the Zone Coordinate system (0-1)
---@param y number Y coordinates in the Zone Coordinate system (0-1)
---@param zone number UIMapID of the zone
---@return number x X coordinate in the World Coordinate system
---@return number y Y coordinate in the World Coordinate system
function lib:GetWorldCoordinatesFromZone(x, y, zone) end
--- Calculate the distance between two points in the same World Coordinate system (ie. the same instance)
---@param instanceID number Instance ID of the World Coordinate system (currently unused)
---@param oX number X coordinate of the origin point
---@param oY number Y coordinate of the origin point
---@param dX number X coordinate of the destination point
---@param dY number Y coordinate of the destination point
---@return number distance Distance in yards
---@return number deltaX Delta of the X coordinate in yards
---@return number deltaY Delta of the Y coordinate in yards
function lib:GetWorldDistance(instanceID, oX, oY, dX, dY) end
--- Calculate a vector between the two points in the World Coordinate system
---@param instanceID number Instance ID of the World Coordinate system (currently unused)
---@param oX number X coordinate of the origin point
---@param oY number Y coordinate of the origin point
---@param dX number X coordinate of the destination point
---@param dY number Y coordinate of the destination point
---@return number angle The angle between the two points, in radians
---@return number distance Distance in yards
function lib:GetWorldVector(instanceID, oX, oY, dX, dY) end
--- Get the Zone Coordinates to the specified World Coordinates, within the specified zone.
---
--- Note: It is the callers responsibility to ensure the x/y coordinates are in the same instance/continent as the zone.
---@param x number X coordinates in the World Coordinate system
---@param y number Y coordinates in the World Coordinate system
---@param zone number UIMapID of the zone of the destination Zone Coordinate system
---@param allowOutOfBounds? boolean If true, do not clip the coordinates into the 0-1 range if the point is outside of the current map.
---@return number x X coordinate in the Zone Coordinate system
---@return number y Y coordinate in the Zone Coordinate system
function lib:GetZoneCoordinatesFromWorld(x, y, zone, allowOutOfBounds) end
--- Calculate the distance between two points in different zones.
---
--- Note: Both zones need to be on the same continent for this function to return valid values.
---@param oZone number UIMapID of the origin zone
---@param oX number X coordinate of the origin point
---@param oY number Y coordinate of the origin point
---@param dZone number UIMapID of the destination zone
---@param dX number X coordinate of the destination point
---@param dY number Y coordinate of the destination point
---@return number distance Distance in yards
---@return number deltaX Delta of the X coordinate in yards
---@return number deltaY Delta of the Y coordinate in yards
function lib:GetZoneDistance(oZone, oX, oY, dZone, dX, dY) end
--- Translate the coordinates between two Zone Coordinate systems
---@param x number X coordinate in the origin zone
---@param y number Y coordinate in the origin zone
---@param oZone number UIMapID of the origin zone
---@param dZone number UIMapID of the destination zone
---@param allowOutOfBounds? boolean If true, do not clip the coordinates into the 0-1 range if the point is outside of the destination map.
---@return number x X coordinate in the destination Zone Coordinate system
---@return number y Y coordinate in the destination Zone Coordinate system
function lib:TranslateZoneCoordinates(x, y, oZone, dZone, allowOutOfBounds) end
-- ----------------------------------------------------------------------------
-- Unit Position
-- ----------------------------------------------------------------------------
--- Retrieve the world position of the player.
---
--- Same as calling HBD:GetUnitWorldPosition("player")
---@return number x X coordinate of the player's position
---@return number y Y coordinate of the player's position
---@return number instance Instance ID of the World Coordinate system the player is in
function lib:GetPlayerWorldPosition() end
--- Retrieve the zone information the player is currently in.
---
--- This function does not rely on the world map to retrieve the player's current position.
---@return number currentPlayerUIMapID The UIMapID of the zone
---@return Enum.UIMapType currentPlayerUIMapType The UIMapType of the current map
function lib:GetPlayerZone() end
--- Retrieve the zone information the player is currently in.
---
--- This function does not rely on the world map to retrieve the player's current position.
---@return number x X Zone Coordinate of the player
---@return number y Y Zone Coordinate of the player
---@return number currentPlayerUIMapID The UIMapID of the zone
---@return Enum.UIMapType currentPlayerUIMapType The UIMapType of the current map
function lib:GetPlayerZonePosition() end
--- Get the world position of any unit eligible for UnitPosition
---@param unitID UnitToken Supports player, party, raid only
---@return number x X coordinate of the unit's position
---@return number y Y coordinate of the unit's position
---@return number instance Instance ID of the World Coordinate system the unit is in
function lib:GetUnitWorldPosition(unitID) end
-- ----------------------------------------------------------------------------
-- Callbacks
-- ----------------------------------------------------------------------------
---@alias HereBeDragons.EventName
---|"PlayerZoneChanged"
---@param target table The object registering to listen for the callback.
---@param eventName HereBeDragons.EventName The event to register.
---@param method string|function The method to call when the event is fired.
function lib.RegisterCallback(target, eventName, method) end
---@param target table The object unregistering to listen for the callback.
---@param eventName HereBeDragons.EventName The event to unregister.
function lib.UnregisterCallback(target, eventName) end
@@ -0,0 +1,99 @@
-- ----------------------------------------------------------------------------
-- HereBeDragons-Pins-2.0
-- ----------------------------------------------------------------------------
---@meta _
---@class HereBeDragons-Pins-2.0
local lib = {}
-- ----------------------------------------------------------------------------
-- Minimap
-- ----------------------------------------------------------------------------
--- Add a icon to the minimap, specified by World Coordinates
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
---@param instanceID number The instance ID of the World Coordinate system
---@param x number X World Coordinate
---@param y number Y World Coordinate
---@param floatOnEdge? boolean Flag if the icon should float on the edge of the map when it goes beyond the visible area, or be hidden.
function lib:AddMinimapIconWorld(ref, icon, instanceID, x, y, floatOnEdge) end
--- Add an icon to the minimap, specified by the uiMapID and local Zone Coordinates
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
---@param uiMapID number UI Map ID of the map to place the icon on
---@param x number X position in local Zone Coordinates
---@param y number Y position in local Zone Coordinates
---@param showInParentZone? boolean Flag if the icon should be shown in the parent zone (if any) of the specified zone. If false, it'll only be shown in the specified zone.
---@param floatOnEdge? boolean Flag if the icon should float on the edge of the map when it goes beyond the visible area, or be hidden.
function lib:AddMinimapIconMap(ref, icon, uiMapID, x, y, showInParentZone, floatOnEdge) end
--- Check wether an icon is floating on the edge of the map
---@param icon Frame The icon frame
---@return boolean|nil
function lib:IsMinimapIconOnEdge(icon) end
--- Remove the specified Minimap Icon
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
function lib:RemoveMinimapIcon(ref, icon) end
--- Remove all minimap icons registered to the reference "ref"
---@param ref string|table Reference to track the icons under, typically a reference to your addon
function lib:RemoveAllMinimapIcons(ref) end
--- Set an alternative Minimap to draw icons on.
---@param minimapObject? Minimap The new minimap object, or nil to restore the default
function lib:SetMinimapObject(minimapObject) end
-- ----------------------------------------------------------------------------
-- World Map Constants
-- ----------------------------------------------------------------------------
HBD_PINS_WORLDMAP_SHOW_PARENT = 1 --- Show pin on the specified map and zone parent maps
HBD_PINS_WORLDMAP_SHOW_CONTINENT = 2 --- Show pin on parent and the continent map
HBD_PINS_WORLDMAP_SHOW_WORLD = 3 --- Show pin on parent, continent and the world map
---@alias HereBeDragons-Pins-2.0.WorldMapShowFlag
---|1 # HBD_PINS_WORLDMAP_SHOW_PARENT
---|2 # HBD_PINS_WORLDMAP_SHOW_CONTINENT
---|3 # HBD_PINS_WORLDMAP_SHOW_WORLD
-- ----------------------------------------------------------------------------
-- World Map
-- ----------------------------------------------------------------------------
--- Add an Icon to the World Map using World Coordinates
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
---@param instanceID number The instance ID of the World Coordinate system
---@param x number X World Coordinate
---@param y number Y World Coordinate
---@param showFlag? HereBeDragons-Pins-2.0.WorldMapShowFlag Flag where to show the pin. If no flag is specified, the pin is only shown on the specified map.
---@param frameLevelType? string Optional Frame Level type registered with the WorldMapFrame, defaults to PIN_FRAME_LEVEL_AREA_POI
function lib:AddWorldMapIconWorld(ref, icon, instanceID, x, y, showFlag, frameLevelType) end
--- Add a Icon to the World Map using uiMapID and local zone coordinates
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
---@param uiMapID number UI Map ID of the map to place the icon on
---@param x number X position in local Zone Coordinates
---@param y number Y position in local Zone Coordinates
---@param showFlag? HereBeDragons-Pins-2.0.WorldMapShowFlag Flag where to show the pin. If no flag is specified, the pin is only shown on the specified map.
---@param frameLevelType? string Optional Frame Level type registered with the WorldMapFrame, defaults to PIN_FRAME_LEVEL_AREA_POI
function lib:AddWorldMapIconMap(ref, icon, uiMapID, x, y, showFlag, frameLevelType) end
--- Remove the specified World Map Icon
---@param ref string|table Reference to track the icons under, typically a reference to your addon
---@param icon Frame The icon frame
function lib:RemoveWorldMapIcon(ref, icon) end
--- Remove all World Map icons registered to the reference "ref"
---@param ref string|table Reference to track the icons under, typically a reference to your addon
function lib:RemoveAllWorldMapIcons(ref) end
--- Compute the vector to an icon, see HereBeDragons-2.0 GetWorldVector for usage.
---@param icon Frame The icon frame
---@return number angle The angle, in radians
---@return number distance Distance in yards
function lib:GetVectorToIcon(icon) end
@@ -0,0 +1,111 @@
---@meta _
---@class LibDBIcon-1.0
---@field loggedIn boolean
---@field callbackRegistered boolean
---@field objects table<string, LibDBIcon.button>
---@field radius integer
---@field isDraggingButton boolean
---@field tooltip Frame : GameTooltipTemplate
---@field notCreated table
---@field callbacks CallbackHandlerRegistry
local lib = {}
---@alias LibDBIcon.CallbackKey "icon"|"iconCoords"|"iconR"|"iconG"|"iconB"
---@param event any
---@param name string
---@param key LibDBIcon.CallbackKey
---@param value string|number
function lib:IconCallback(event, name, key, value)
end
---@param name string
---@param object LibDataBroker.DataObject
---@param db? LibDBIcon.button.DB
function lib:Register(name, object, db)
end
---@param name string
function lib:Lock(name)
end
---@param name string
function lib:Unlock(name)
end
---@param name string
function lib:Hide(name)
end
---@param name string
function lib:Show(name)
end
---@param name string
---@return boolean
function lib:IsRegistered(name)
end
---@param name string
---@param db LibDBIcon.button.DB
function lib:Refresh(name, db)
end
---@param name string
---@return LibDBIcon.button
function lib:GetMinimapButton(name)
end
---@return table<integer, LibDBIcon.button>
function lib:GetButtonList()
end
---Use to set the radius of the minimap
---@param radius integer
function lib:SetButtonRadius(radius)
end
---@param button string|LibDBIcon.button
---@param position integer
function lib:SetButtonToPosition(button, position)
end
---@param buttonName string
---@return boolean
function lib:IsButtonInCompartment(buttonName)
end
---@param buttonName string
---@param customIcon? string|number
function lib:AddButtonToCompartment(buttonName, customIcon)
end
---@param buttonName string
function lib:RemoveButtonFromCompartment(buttonName)
end
---@class LibDBIcon.button.DB
---@field hide boolean
---@field lock boolean
---@field minimapPos integer
local DB = {}
---@class LibDBIcon.dataObject
---@field OnClick function
---@field icon string|number
---@field iconR integer
---@field iconG integer
---@field iconB integer
local dataObject = {}
---@class LibDBIcon.button.icon : Texture
local icon = {}
icon.UpdateCoord = function() end
---@class LibDBIcon.button : Button
local button = {}
button.dataObject = dataObject
button.db = DB
button.icon = icon
button.isMouseDown = false
button.fadeOut = {} ---@type AnimationGroup
@@ -0,0 +1,91 @@
---@meta _
--------------------------------------------------------------------------------
---- LibDataBroker-1.1
--------------------------------------------------------------------------------
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API)
---@class LibDataBroker-1.1
local lib = {}
---@param name string
---@param dataObject? LibDataBroker.DataObject
---@return LibDataBroker.DataObject
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API#ldbnewdataobjectname-dataobject--dataobject)
function lib:NewDataObject(name, dataObject) end
---@param dataObjectName string
---@return LibDataBroker.DataObject
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API#ldbgetdataobjectbynamedataobjectname--dataobject)
function lib:GetDataObjectByName(dataObjectName) end
---@param dataObject LibDataBroker.DataObject
---@return string
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API#ldbgetnamebydataobjectdataobject--name)
function lib:GetNameByDataObject(dataObject) end
---@return table
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API#ldbdataobjectiterator)
function lib:DataObjectIterator() end
---@param addon table|string
---@param eventName string
---@param method? string|function
---@param arg? any
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/API#ldbregistercallbackmytable-or-myaddonid-eventname-method-arg)
function lib:RegisterCallback(addon, eventName, method, arg) end
--------------------------------------------------------------------------------
-- LibDataBroker.DataDisplay
--------------------------------------------------------------------------------
-- Data display addons provide a LDB “feed” for an always-up addon to display. These addons can be thought of like RSS feeds, where the display addon is similar to an RSS reader.
--
--- ---
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/data-specifications#data-display)
---@class LibDataBroker.DataDisplay: LibDataBroker.DataObjectCommonFields
---@field type "data source" Indicates that this data object is a data source.
---@field text string The text to be shown.
---@field value string? Raw value from the text, for example text "75.0 FPS" would have value "75.0"
---@field suffix string? The “unit” appended to the end of text. For example text "75.0 FPS" would have the suffix "FPS"
---@field label string? A title for your feed, often shown to the left of the text, user might choose to hide this. If missing, the dataobject’s name may be used instead.
---@field icon string? Full path to a texture, often shown to the left of the label or text.
---@field OnClick fun(displayFrame: Frame, buttonName: string)? An OnClick script handler to be directly attached to the display frame.
---@field OnEnter fun(displayFrame: Frame)? An OnEnter script handler to be directly attached to the display frame. Usually used to display a tooltip. This handler should check the position of the frame it is passed and anchor the tooltip to that frame accordingly.
---@field OnLeave fun(displayFrame: Frame)? An OnLeave script handler to be directly attached to the display frame. Usually used to hide the toolip.
---@field tooltip Frame? A frame to be displayed when the display frame is entered. The display addon is responsible for anchoring, showing and hiding this frame as needed. The tooltip frame’s OnShow can be used to refresh the frame. Note that this frame doesn’t have to be a GameTooltip.
--------------------------------------------------------------------------------
-- LibDataBroker.QuickLauncher
--------------------------------------------------------------------------------
-- A quicklauncher is a LDB object that does not provide any data, but instead provides an OnClick handler to allow fast access to config panels, toggle settings, or perform other actions.
--
-- Quicklaunchers should never expect a secure frame to be used, therefore actions like spellcasting are not possible.
--
--- ---
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/data-specifications#data-display)
---@class LibDataBroker.QuickLauncher: LibDataBroker.DataObjectCommonFields
---@field type "launcher" Indicates that this data object is a launcher and does not provide any data to be rendered in an always-up frame.
---@field icon string Full path to a texture for display.
---@field OnClick fun(displayFrame: Frame, buttonName: string) An OnClick script handler to be directly attached to the display frame.
---@field tocname string? The name of the addon providing the launcher, if it’s name does not match the DataObject’s name. Used by displays to get TOC metadata about the addon.
---@field label string? A label to use for the launcher, overriding the DataObject name.
--------------------------------------------------------------------------------
-- LibDataBroker.DataObject
--------------------------------------------------------------------------------
-- Represents either a DataDisplay or a Quicklauncher.
--
---
---[Documentation](https://github.com/tekkub/libdatabroker-1-1/wiki/data-specifications)
---@alias LibDataBroker.DataObject LibDataBroker.DataDisplay|LibDataBroker.QuickLauncher
--------------------------------------------------------------------------------
-- LibDataBroker.DataObjectCommonFields
--------------------------------------------------------------------------------
-- Fields common to both the LibDataBroker.DataDisplay and LibDataBroker.QuickLauncher types.
---@class LibDataBroker.DataObjectCommonFields
---@field iconR number? The red component value to be used when coloring the icon.
---@field iconG number? The green component value to be used when coloring the icon.
---@field iconB number? The blue component value to be used when coloring the icon.
---@field iconCoords table? A table containing the arguments to be supplied to SetTexCoord() on the icon texture. Combined with icon, iconR, iconG and iconB this attribute provides a way for addons to use icons that require TexCoords (such as re-using the icons from the default user interface without the button background). This is currently used by TomTom to display a spinning arrow that points towards your current waypoint.
---@field OnTooltipShow fun(tooltip: GameTooltip)? A function to call when the display wants to show a tooltip. The display will manage positioning, clearing and showing the tooltip, all this handler needs to do is populate the tooltip using :AddLine or similar. The display should pass the tooltip to this callback, in case it isn’t using GameTooltip. The display shouldn’t pass a non-GameTooltip frame unless it mimics the API of GameTooltip.
@@ -0,0 +1,192 @@
---@meta _
---@class LibDeflate
local lib = {}
---@alias LibDeflate.Dictionary { adler32: integer, hash_tables: table, string_table: table, strlen: integer }
---Calculate the Adler-32 checksum of the string.
---
---See RFC1950 Page 9 https://tools.ietf.org/html/rfc1950 for the definition of Adler-32 checksum.
---@param str string the input string to calcuate its Adler-32 checksum.
---@return integer checksum The Adler-32 checksum, which is greater or equal to 0, and less than 2^32 (4294967296).
function lib:Adler32(str)
end
---Create a preset dictionary.
---
---This function is not fast, and the memory consumption of the produced dictionary is about 50 times of the input string. Therefore, it is suggestted to run
---this function only once in your program.
---
---It is very important to know that if you do use a preset dictionary, compressors and decompressors MUST USE THE SAME dictionary. That is, dictionary must be
---created using the same string. If you update your program with a new dictionary, people with the old version won't be able to transmit data with people with
---the new version. Therefore, changing the dictionary must be done very carefully.
---
---The parameters `strlen` and `adler32` add a layer of verification to ensure the parameter `str` is not modified unintentionally during the program
---development.
---
--- ```
---local dict_str = "1234567890"
---
----- print(dict_str:len(), LibDeflate:Adler32(dict_str))
----- Hardcode the print result below to verify it to avoid accidental modification of 'str' during the program development.
----- string length: 10, Adler-32: 187433486,
----- Don't calculate string length and its Adler-32 at run-time.
---
---local dict = LibDeflate:CreateDictionary(dict_str, 10, 187433486)
--- ```
---
---@param str string The string used as the preset dictionary.<br/>You should put stuffs that frequently appears in the dictionary string and preferablely put more appeared stuff toward the end of the string.<br/>Empty string and string longer than `32768` bytes are not allowed.
---@param strlen integer The length of `str`. Please pass in this parameter as a hardcoded constant, in order to verify the content of `str`. The value of this parameter should be known before your program runs.
---@param adler32 integer The Adler-32 checksum of `str`. Please pass in this parameter as a hardcoded constant, in order to verify the content of `str`. The value of this parameter should be known before your program runs.
---@return LibDeflate.Dictionary dictionary The dictionary used for preset dictionary compression and decompression.
function lib:CreateDictionary(str, strlen, adler32)
end
---Compress using the raw deflate format.
---@param str string The data to be compressed.
---@param configs? table The configuration table to control the compression. If nil, use the default configuration.
---@return string data The compressed data.
---@return integer padding The number of bits padded at the end of output. `0 <= bits < 8`<br/>This means the most significant "bits" of the last byte of the returned compressed data are padding bits and they don't affect decompression. You don't need to use this value unless you want to do some postprocessing to the compressed data.
function lib:CompressDeflate(str, configs)
end
---Compress using the raw deflate format with a preset dictionary.
---@param str string The data to be compressed.
---@param dictionary LibDeflate.Dictionary The preset dictionary produced by `LibDeflate:CreateDictionary`
---@param configs? table The configuration table to control the compression. If nil, use the default configuration.
---@return string data The compressed data.
---@return integer padding The number of bits padded at the end of output. `0 <= bits < 8`<br/>This means the most significant "bits" of the last byte of the returned compressed data are padding bits and they don't affect decompression. You don't need to use this value unless you want to do some postprocessing to the compressed data.
function lib:CompressDeflateWithDict(str, dictionary, configs)
end
---Compress using the zlib format.
---@param str string The data to be compressed.
---@param configs? table The configuration table to control the compression. If nil, use the default configuration.
---@return string data The compressed data.
---@return integer padding The number of bits padded at the end of output. Should always be 0. Zlib formatted compressed data never has padding bits at the end.
function lib:CompressZlib(str, configs)
end
---Compress using the zlib format with a preset dictionary.
---@param str string The data to be compressed.
---@param dictionary LibDeflate.Dictionary The preset dictionary produced by `LibDeflate:CreateDictionary`
---@param configs? table The configuration table to control the compression. If nil, use the default configuration.
---@return string data The compressed data.
---@return integer padding The number of bits padded at the end of output. Should always be 0. Zlib formatted compressed data never has padding bits at the end.
function lib:CompressZlib(str, dictionary, configs)
end
---Decompress a raw deflate compressed data.
---@param str string The data to be decompressed.
---@return string? data If the decompression succeeds, return the decompressed data. If the decompression fails, return nil. You should check if this return value is non-nil to know if the decompression succeeds.
---@return integer? numUnprocessedBytes If the decompression succeeds, return the number of unprocessed bytes in the input compressed data. This return value is a positive integer if the input data is a valid compressed data appended by an arbitary non-empty string. This return value is 0 if the input data does not contain any extra bytes.<br/>If the decompression fails (The first return value of this function is nil), this return value is undefined.
function lib:DecompressDeflate(str)
end
---Decompress a raw deflate compressed data with a preset dictionary.
---@param str string The data to be decompressed.
---@param dictionary LibDeflate.Dictionary The preset dictionary used by `LibDeflate:CompressDeflateWithDict` when the compressed data is produced. Decompression and compression must use the same dictionary. Otherwise wrong decompressed data could be produced without generating any error.
---@return string? data If the decompression succeeds, return the decompressed data. If the decompression fails, return nil. You should check if this return value is non-nil to know if the decompression succeeds.
---@return integer? numUnprocessedBytes If the decompression succeeds, return the number of unprocessed bytes in the input compressed data. This return value is a positive integer if the input data is a valid compressed data appended by an arbitary non-empty string. This return value is 0 if the input data does not contain any extra bytes.<br/>If the decompression fails (The first return value of this function is nil), this return value is undefined.
function lib:DecompressDeflateWithDict(str, dictionary)
end
---Decompress a zlib compressed data.
---@param str string The data to be decompressed.
---@return string? data If the decompression succeeds, return the decompressed data. If the decompression fails, return nil. You should check if this return value is non-nil to know if the decompression succeeds.
---@return integer? numUnprocessedBytes If the decompression succeeds, return the number of unprocessed bytes in the input compressed data. This return value is a positive integer if the input data is a valid compressed data appended by an arbitary non-empty string. This return value is 0 if the input data does not contain any extra bytes.<br/>If the decompression fails (The first return value of this function is nil), this return value is undefined.
function lib:DecompressZlib(str)
end
---Decompress a raw deflate compressed data with a preset dictionary.
---@param str string The data to be decompressed.
---@param dictionary LibDeflate.Dictionary The preset dictionary used by `LibDeflate:CompressZlibWithDict` when the compressed data is produced. Decompression and compression must use the same dictionary. Otherwise wrong decompressed data could be produced without generating any error.
---@return string? data If the decompression succeeds, return the decompressed data. If the decompression fails, return nil. You should check if this return value is non-nil to know if the decompression succeeds.
---@return integer? numUnprocessedBytes If the decompression succeeds, return the number of unprocessed bytes in the input compressed data. This return value is a positive integer if the input data is a valid compressed data appended by an arbitary non-empty string. This return value is 0 if the input data does not contain any extra bytes.<br/>If the decompression fails (The first return value of this function is nil), this return value is undefined.
function lib:DecompressZlibWithDict(str, dictionary)
end
---Create a custom codec with encoder and decoder.
---
---This codec is used to convert an input string to make it not contain some specific bytes. This created codec and the parameters of this function do NOT take
---localization into account. One byte (0-255) in the string is exactly one character (0-255). Credits to LibCompress.
---
---```
----- Create an encoder/decoder that maps all "\000" to "\003", and escape "\001" (and "\002" and "\003") properly
---local codec = LibDeflate:CreateCodec("\000\001", "\002", "\003")
---
---local encoded = codec:Encode(SOME_STRING)
----- "encoded" does not contain "\000" or "\001"
---local decoded = codec:Decode(encoded)
----- assert(decoded == SOME_STRING)
---```
---@param reserved_chars string The created encoder will ensure encoded data does not contain any single character in reserved_chars. This parameter should be non-empty.
---@param escape_chars string The escape character(s) used in the created codec. The codec converts any character included in `reserved_chars` / `escape_chars` / `map_chars` to (one escape char + one character not in `reserved_chars` / `escape_chars` / `map_chars`). You usually only need to provide a length-1 string for this parameter. Length-2 string is only needed when `reserved_chars` + `escape_chars` + `map_chars` is longer than 127. This parameter should be non-empty.
---@param map_chars string The created encoder will map every `reserved_chars:sub(i, i) (1 <= i <= #map_chars)` to `map_chars:sub(i, i)`. This parameter CAN be empty string.
---@return LibDeflate.Codec? codec If the codec cannot be created, return nil. If the codec can be created according to the given parameters, return the codec, which is a encode/decode table.
---@return string? error If the codec is successfully created, return nil. If not, return a string that describes the reason why the codec cannot be created.
function lib:CreateCodec(reserved_chars, escape_chars, map_chars)
end
---Encode the string to make it ready to be transmitted in World of Warcraft addon channel.
---
---The encoded string is guaranteed to contain no NULL ("\000") character.
---@param str string The string to be encoded.
---@return string encoded The encoded string.
function lib:EncodeForWoWAddonChannel(str)
end
---Decode the string produced by `LibDeflate:EncodeForWoWAddonChannel`
---@param str string The string to be decoded.
---@return string? decoded The decoded string if succeeds. nil if fails.
function lib:DecodeForWoWAddonChannel(str)
end
---Encode the string to make it ready to be transmitted in World of Warcraft chat channel.
---
---See also https://warcraft.wiki.gg/wiki/Valid_chat_message_characters
---@param str string The string to be encoded.
---@return string encoded The encoded string.
function lib:EncodeForWoWChatChannel(str)
end
---Decode the string produced by `LibDeflate:EncodeForWoWChatChannel`.
---@param str string The string to be decoded.
---@return string? decoded The decoded string if succeeds. nil if fails.
function lib:DecodeForWoWChatChannel(str)
end
---Encode the string to make it printable.
---
---Credis to WeakAuras2, this function is equivalant to the implementation it is using right now.
---
---The encoded string will be 25% larger than the origin string. However, every single byte of the encoded string will be one of 64 printable ASCII characters
---which are can be easier copied, pasted and displayed. (26 lowercase letters, 26 uppercase letters, 10 numbers digits, left parenthese, or right parenthese)
---@param str string The string to be encoded.
---@return string encoded The encoded string.
function lib:EncodeForPrint(str)
end
---Decode the printable string produced by `LibDeflate:EncodeForPrint`.
---
---`str` will have its prefixed and trailing control characters or space removed before it is decoded, so it is easier to use if "str" comes form user copy and
---paste with some prefixed or trailing spaces. Then decode fails if the string contains any characters cant be produced by `LibDeflate:EncodeForPrint`. That
---means, decode fails if the string contains a characters NOT one of 26 lowercase letters, 26 uppercase letters, 10 numbers digits, left parenthese, or right
---parenthese.
---@param str string The string to be decoded.
---@return string? decoded The decoded string if succeeds. nil if fails.
function lib:DecodeForPrint(str)
end
---@class LibDeflate.Codec
local codec = {}
---@param str string
---@return string encoded The encoded string
function codec:Encode(str)
end
---@param str string
---@return string? decoded The decoded string if succeeds. nil if fails.
function codec:Decode(str)
end
@@ -0,0 +1,154 @@
-- ----------------------------------------------------------------------------
-- LibDialog-1.0
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog-1.0
local lib = {}
--- Determines whether or not a specific dialog is currently active.
---@param reference string|LibDialog.Delegate The delegate criteria for the dialog being targeted. Can be either a string, in which case the delegate must be registered, or a delegate definition table.
---@param data? unknown Additional data to be used as further criteria to determine if the target dialog is active - this would be the same data used to spawn the dialog.
---@return LibDialog.Dialog|nil
function lib:ActiveDialog(reference, data)
end
--- Dismisses a specific dialog.
---@param reference string|LibDialog.Delegate The delegate criteria for the dialog being targeted. Can be either a string, in which case the delegate must be registered, or a delegate definition table.
function lib:Dismiss(reference, data)
end
--- Registers a new dialog delegate.
---@param delegateName string The name the delegate table will be registered under.
---@param delegate LibDialog.Delegate The delegate properties definition.
function lib:Register(delegateName, delegate)
end
--- Spawns a dialog from a delegate reference.
---@param reference string|LibDialog.Delegate The delegate to be used for the spawned dialog. Can be either a string, in which case the delegate must be registered, or a delegate definition table.
---@param data? unknown Additional data to be passed on to the resultant dialog.
---@return LibDialog.Dialog|nil
function lib:Spawn(reference, data)
end
-- ----------------------------------------------------------------------------
-- LibDialog.Dialog
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog.Dialog
local dialog = {}
--- Resets the dialog to default settings.
function dialog:Reset()
end
--- Resizes the dialog according to its buttons and other widgets.
function dialog:Resize()
end
-- ----------------------------------------------------------------------------
-- LibDialog.Delegate
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog.Delegate
---@field buttons LibDialog.Delegate.Button[] List of Buttons to define in the Dialog.
---@field cancels_on_spawn string[] When the Dialog is spawned, it will cancel all other Dialogs named in the list.
---@field checkboxes LibDialog.Delegate.CheckBox[] List of CheckBoxes to define in the Dialog.
---@field duration number Number of seconds the Dialog will exist before automatically being dismissed.
---@field editboxes LibDialog.Delegate.EditBox[] List of EditBoxes to define in the Dialog.
---@field height number Height for the Dialog (in pixels); if omitted or 0, causes the Dialog's height to be determined automatically based on its contents.
---@field hide_on_escape boolean Causes the Dialog to be dismissed when the Escape key is pressed.
---@field icon string Assigns an icon to the Dialog found at the given file path.
---@field icon_size number Sets the width and height of the Dialog's icon (in pixels). Defaults to 36.
---@field is_exclusive boolean If set to true, the Dialog will dismiss other exclusive Dialogs when spawned.
---@field no_cancel_on_escape boolean When set to true, do not cancel this Dialog when the Escape key is pressed.
---@field no_cancel_on_reuse boolean When set to true, do not cancel pre-existing Dialogs of this designation when a new instance is created.
---@field show_during_cinematic boolean When set to true, do not cancel this Dialog when a Cinematic cut-scene begins.
---@field show_while_dead boolean When set to true, allow the Dialog to be shown while the character is dead.
---@field sound string Plays an audio file at the given path when the Dialog is shown.
---@field static_size number Sets the Dialog's width to the specified size. Ignores contained widgets for resizing purposes.
---@field text string The text displayed on the Dialog, before its widgets.
---@field text_justify_h JustifyHorizontal Sets the Dialog's horizontal text alignment style.
---@field text_justify_v JustifyVertical Sets the Dialog's vertical text alignment style.
---@field width number Width for the Dialog (in pixels); if omitted or 0, causes the Dialog's height to be determined automatically based on its contents.
local delegate = {}
--- Called when the Dialog is canceled.
---@param self Frame Reference to the Dialog for which the script was run.
---@param data unknown|nil The data passed to the Delegate when the Dialog was instantiated via lib:Spawn()
---@param reason? string Reason for cancelation. Not always present. The library will use the following according to circumstance: timeout - Passed when a Dialog's duration has run out. override - Passed when a Dialog is dismissed by either being in the cancelsonspawn list of another Dialog, having its is_exclusive value set to true when another Dialog with its is_exclusive value set is spawned, or when the same Dialog is spawned again and its no_cancel_on_reuse value is empty or false.
function delegate:on_cancel(data, reason)
end
--- Run when the Dialog becomes invisible.
---@param self Frame Reference to the Dialog for which the script was run.
function delegate:on_hide()
end
--- Run when the Dialog becomes visible.
---@param self Frame Reference to the Dialog for which the script was run.
function delegate:on_show()
end
--- Run each time the screen is drawn by the game engine. This handler runs for each frame draw.
---@param self Frame Reference to the Dialog for which the script was run.
---@param elapsed number Number of seconds since the OnUpdate handlers were last run (likely a fraction of a second).
function delegate:on_update(elapsed)
end
-- ----------------------------------------------------------------------------
-- LibDialog.Delegate.Button
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog.Delegate.Button: Button
---@field text string The text displayed on the Button. Required.
local button = {}
--- Run when the Button is clicked.
---@param mouseButton string Name of the mouse button responsible for the click action.
---@param down boolean True for a mouse button down action; false for button up or other actions.
function button:on_click(mouseButton, down)
end
-- ----------------------------------------------------------------------------
-- LibDialog.Delegate.CheckBox
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog.Delegate.CheckBox: CheckButton
---@field label string The CheckBox label. Required.
local checkBox = {}
--- Run when the CheckBox is clicked.
---@param mouseButton string Name of the mouse button responsible for the click action.
---@param down boolean True for a mouse button down action; false for button up or other actions.
function checkBox:on_click(mouseButton, down)
end
-- ----------------------------------------------------------------------------
-- LibDialog.Delegate.EditBox
-- ----------------------------------------------------------------------------
---@meta _
---@class LibDialog.Delegate.EditBox: EditBox
---@field auto_focus boolean Sets whether the EditBox automatically acquires keyboard input focus.
---@field label string The EditBox label.
---@field max_bytes number Sets the maximum number of bytes of text allowed in the EditBox. Attempts to type more than this number into the EditBox will produce no results; programmatically inserting text or setting the EditBox's text will truncate input to the maximum length. Omitting this value, or setting it to 0, results in no limit. Note: Unicode characters may consist of more than one byte each, so the behavior of a byte limit may differ from that of a character limit in practical use.
---@field max_letters number Sets the maximum number of text characters allowed in the EditBox. Attempts to type more than this number into the EditBox will produce no results; programmatically inserting text or setting the EditBox's text will truncate input to the maximum length. Omitting this value, or setting it to 0, results in no limit.
---@field text string Initial text of the EditBox.
---@field width number Width for the EditBox (in pixels); if 0, causes the EditBox's width to be determined automatically according to its anchor points.
local editBox = {}
--- Run when the Enter (or Return) key is pressed while the EditBox has keyboard focus.
function editBox:on_enter_pressed()
end
--- Run when the Escape key is pressed while the EditBox has keyboard focus.
function editBox:on_escape_pressed()
end
--- Run when the EditBox becomes visible.
function editBox:on_show()
end
--- Run when the EditBox's text is changed. This script is run both when text is typed in the EditBox (for each character entered) and when the EditBox's contents are changed via :SetText() (but only if the text is actually changed).
---@param userInput boolean True if the text changed due to user input; false if the text was changed via :SetText()
function editBox:on_text_changed(userInput)
end
@@ -0,0 +1,11 @@
---@meta _
---@class LibDualSpec-1.0
local lib = {}
---@param target table the AceDB-3.0 instance.
---@param name string a user-friendly name of the database (best bet is the addon name).
function lib:EnhanceDatabase(target, name) end
---@param optionTable table The option table returned by AceDBOptions-3.0.
---@param target table The AceDB-3.0 the options operate on.
function lib:EnhanceOptions(optionTable, target) end
@@ -0,0 +1,307 @@
---@meta _
-- ----------------------------------------------------------------------------
-- LibQTip-1.0
-- ----------------------------------------------------------------------------
---@class LibQTip-1.0
---@field LabelProvider LibQTip.CellProvider The default CellProvider used to create tooltip cells.
local lib = {}
--- Create or retrieve the tooltip with the given key.
---
-- If additional arguments are passed, they are passed to :SetColumnLayout for the acquired tooltip.
---@param key string|table - The tooltip key. Any value that can be used as a table key is accepted though you should try to provide unique keys to avoid conflicts.
---Numbers and booleans should be avoided and strings should be carefully chosen to avoid namespace clashes - no "MyTooltip" - you have been warned!
---@param numColumns? number Minimum number of columns
---@param ... JustifyHorizontal Column horizontal justifications ("CENTER", "LEFT" or "RIGHT"). Defaults to "LEFT".
--- Example tooltip with 5 columns justified as left, center, left, left, left:
---
--- local tip = LibStub('LibQTip-1.0'):Acquire('MyFooBarTooltip', 5, "LEFT", "CENTER")
---@return LibQTip.Tooltip
function lib:Acquire(key, numColumns, ...) end
--- Convenience method to create a new cell provider.
---
--- Although one can use anything that matches the CellProvider and Cell interfaces, this method provides an easy way to create new providers.
---@param baseProvider? LibQTip.CellProvider An existing provider to base the new provider on.
---@return LibQTip.CellProvider provider The new CellProvider.
---@return table cellPrototype The prototype of the new cell. It must be extended with the mandatory :InitializeCell() and :SetupCell() methods.
---@return table baseCellPrototype The prototype of baseProvider cells. It may be used to call base cell methods.
function lib:CreateCellProvider(baseProvider) end
--- Check if a given tooltip has been acquired and not released.
---@param key string|table - The tooltip key.
---@return boolean
function lib:IsAcquired(key) end
--- Return an iterator on the acquired tooltips.
---@generic T: LibQTip.Tooltip, K, V
---@return fun(tooltip: LibQTip.Tooltip<K, V>, index?: K):K, V
---@return T
function lib:IterateTooltips() end
--- Return an acquired tooltip to the heap. The tooltip is cleared and hidden.
---@param tooltip LibQTip.Tooltip The tooltip to release. Any invalid values are silently ignored.
function lib:Release(tooltip) end
-- ----------------------------------------------------------------------------
-- LibQTip.ScriptType
-- ----------------------------------------------------------------------------
---@alias LibQTip.ScriptType
---|"OnEnter"
---|"OnLeave"
---|"OnMouseDown"
---|"OnMouseUp"|
---|"OnReceiveDrag"
-- ----------------------------------------------------------------------------
-- LibQTip.Tooltip
-- ----------------------------------------------------------------------------
---@class LibQTip.Tooltip: BackdropTemplate, Frame
local tooltip = {}
--- Add a new column to the right of the tooltip.
---@param justification? JustifyHorizontal The horizontal justification of cells in this column ("CENTER", "LEFT" or "RIGHT"). Defaults to "LEFT".
function tooltip:AddColumn(justification) end
--- Add a new header line at the bottom of the tooltip.
--- Provided values are displayed on the line with the header font. Nil values are ignored. If the number of values is greater than the number of columns, an error is raised.
---@param ... unknown Value to be displayed in each column of the line.
---@return number lineIndex The index of the newly added line.
---@return number columnIndex The index of the next empty cell in the line or nil if it is full.
function tooltip:AddHeader(...) end
--- Add a new line at the bottom of the tooltip.
--- Provided values are displayed on the line with the regular font. Nil values are ignored. If the number of values is greater than the number of columns, an error is raised.
---@param ... unknown Value to be displayed in each column of the line.
---@return number lineIndex The index of the newly added line.
---@return number columnIndex The index of the next empty cell in the line or nil if it is full.
function tooltip:AddLine(...) end
--- Adds a graphical separator line at the bottom of the tooltip.
---@param height? number Height, in pixels, of the separator. Defaults to 1.
---@param r? number Red color value of the separator. Defaults to NORMAL_FONT_COLOR.r
---@param g? number Green color value of the separator. Defaults to NORMAL_FONT_COLOR.g
---@param b? number Blue color value of the separator. Defaults to NORMAL_FONT_COLOR.b
---@param a? number Alpha level of the separator. Defaults to 1.
---@return number lineIndex The index of the newly added line.
---@return number columnIndex The index of the next empty cell in the line or nil if it is full.
function tooltip:AddSeparator(height, r, g, b, a) end
--- Reset the contents of the tootip. The column layout is preserved but all lines are wiped.
function tooltip:Clear() end
--- Returns the total number of columns of the tooltip.
---@return number columnCount The number of columns added using :SetColumnLayout or :AddColumn.
function tooltip:GetColumnCount() end
--- Return the CellProvider used for cell functionality.
---@return LibQTip.CellProvider
function tooltip:GetDefaultProvider() end
--- Return the font used for regular lines.
---@return Font
function tooltip:GetFont() end
--- Return the font used for header lines.
---@return Font
function tooltip:GetHeaderFont() end
--- Returns the total number of lines of the tooltip.
---@return number lineCount The number of lines added using :AddLine or :AddHeader.
function tooltip:GetLineCount() end
--- Sets the length of time in which the mouse pointer can be outside of the tooltip, or an alternate frame, before the tooltip is automatically hidden and then released.
---@param delay number Whole or fractional seconds.
---@param alternateFrame? Frame If specified, the tooltip will not be automatically hidden while the mouse pointer is over it.
---@param releaseHandler? fun(frame: Frame, delay: number) Called when the tooltip is released. Generally used to clean up a reference an AddOn has to the tooltip frame, since another AddOn can subsequently acquire it.
function tooltip:SetAutoHideDelay(delay, alternateFrame, releaseHandler) end
-- stylua: ignore start
--- Add or replace a cell at the given line and column indices. The additional arguments override the tooltip defaults.
---@param lineNum number The line index of the cell. Indexes greater than tooltip:GetLineCount() raise an error.
---@param colNum number The column index of the cell. Indexes greater than tooltip:GetColumnCount() raise an error.
---@param value unknown The value to display in the cell.
---@param font? FontObject|Font The rendering font. Defaults to regular font.
---@param justification? JustifyHorizontal Cell-specific justification to use ("CENTER", "LEFT" or "RIGHT"). Defaults to column justification.
---@param colSpan? number The number of columns the cell will span. Defaults to 1.
---@param provider? LibQTip.CellProvider CellProvider to use instead of the default one. Defaults to LibQTip.LabelProvider.
---@param leftPadding? number Pixel padding on the left side of the cell's value. Defaults to 0.
---@param rightPadding? number Pixel padding on the right side of the cell's value. Defaults to 0.
---@param maxWidth? number The maximum width (in pixels) of the cell. If the cell's value is textual and exceeds this width, it will wrap to a new line. Must not be less than the value of minWidth.
---@param minWidth? number The minimum width (in pixels) of the cell. Must not exceed the value of maxWidth.
---@param ...? unknown Additional arguments to pass to the cell:SetupCell method.
---@return number lineIndex The index of the cell's line.
---@return number columnIndex The index of the next empty cell in the line or nil if it is full.
function tooltip:SetCell(lineNum, colNum, value, font, justification, colSpan, provider, leftPadding, rightPadding, maxWidth, minWidth, ...) end
-- stylua: ignore end
--- Sets the horizontal margin size of all cells within the tooltip. This function can only be used before the tooltip has had lines set.
---@param size number The desired margin size. Must be a positive number or zero.
function tooltip:SetCellMarginH(size) end
--- Sets the vertical margin size of all cells within the tooltip. This function can only be used before the tooltip has had lines set.
---@param size number The desired margin size. Must be a positive number or zero.
function tooltip:SetCellMarginV(size) end
--- Assign a script to a cell at the given line and column indices.
---@param lineNum number Line index of the cell.
---@param colNum number Column index of the cell.
---@param scriptType LibQTip.ScriptType The cell ScriptType.
---@param func fun(frame: Frame, ...) The function called when the script is run. Parameters conform to the given ScriptType.
---@param arg? unknown Data to be passed to the script function.
function tooltip:SetCellScript(lineNum, colNum, scriptType, func, arg) end
--- Sets the color of the specified column of the tooltip.
---@param colNum number Column number to set.
---@param r? number Red color value of the column. Defaults to the tooltip's current red value.
---@param g? number Green color value of the column. Defaults to the tooltip's current green value.
---@param b? number Blue color value of the column. Defaults to the tooltip's current blue value.
---@param a? number Alpha level of the column. Defaults to 1.
function tooltip:SetColumnColor(colNum, r, g, b, a) end
--- Ensure the tooltip has at least the passed number of columns, adding new columns if need be.
---
--- The justification of existing columns is reset to the passed values.
---@param numColumns number Minimum number of columns
---@param ... JustifyHorizontal? Column horizontal justifications ("CENTER", "LEFT" or "RIGHT"). Defaults to "LEFT".
--- Example tooltip with 5 columns justified as left, center, left, left, left:
---
--- tooltip:SetColumnLayout(5, "LEFT", "CENTER")
function tooltip:SetColumnLayout(numColumns, ...) end
--- Assign a script to a column at the given index.
---@param colNum number Index of the column.
---@param scriptType LibQTip.ScriptType The column ScriptType.
---@param func fun(frame: Frame, ...) The function called when the script is run. Parameters conform to the given ScriptType.
---@param arg? unknown Data to be passed to the script function.
function tooltip:SetColumnScript(colNum, scriptType, func, arg) end
--- Sets the color of the text for the specified column of the tooltip.
---@param colNum number Column number to set.
---@param r? number Red color value of the column text. Defaults to the red value of the tooltip's current font.
---@param g? number Green color value of the column text. Defaults to the green value of the tooltip's current font.
---@param b? number Blue color value of the column text. Defaults to the blue value of the tooltip's current font.
---@param a? number Alpha level of the column's text. Defaults to 1.
function tooltip:SetColumnTextColor(colNum, r, g, b, a) end
--- Define the cellprovider to be used for all cell functionality.
---@param provider LibQTip.CellProvider The new default cellprovider.
function tooltip:SetDefaultProvider(provider) end
--- Define the font used when adding new lines.
---@param font FontObject|Font The new default font.
function tooltip:SetFont(font) end
--- Define the font used when adding new header lines.
---@param font FontObject|Font The new default font.
function tooltip:SetHeaderFont(font) end
--- Works identically to the default UI's texture:SetTexCoord() API, for the tooltip's highlight texture.
---@param ULx number
---@param ULy number
---@param LLx number
---@param LLy number
---@param URx number
---@param URy number
---@param LRx number
---@param LRy number
---@overload fun(minX: number, maxX: number, minY: number, maxY: number)
function tooltip:SetHighlightTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy) end
--- Sets the texture of the highlight when mousing over a line or cell that has a script assigned to it.
---
--- Works identically to the default UI's texture:SetTexture() API.
---@param file string|number
---@param horizWrap? WrapMode
---@param vertWrap? WrapMode
---@param filterMode? FilterMode
function tooltip:SetHighlightTexture(file, horizWrap, vertWrap, filterMode) end
--- Sets the color of the specified line of the tooltip.
---@param lineNum number Line number to set.
---@param r? number Red color value of the line. Defaults to the tooltip's current red value.
---@param g? number Green color value of the line. Defaults to the tooltip's current green value.
---@param b? number Blue color value of the line. Defaults to the tooltip's current blue value.
---@param a? number Alpha level of the line. Defaults to 1.
function tooltip:SetLineColor(lineNum, r, g, b, a) end
--- Assign a script to a line at the given index.
---@param lineNum number Index of the line.
---@param scriptType LibQTip.ScriptType The column ScriptType.
---@param func fun(frame: Frame, ...) The function called when the script is run. Parameters conform to the given ScriptType.
---@param arg? unknown Data to be passed to the script function.
function tooltip:SetLineScript(lineNum, scriptType, func, arg) end
--- Sets the color of the text for the specified line of the tooltip.
---@param lineNum number Line number to set.
---@param r? number Red color value of the line text. Defaults to the red value of the tooltip's current font.
---@param g? number Green color value of the line text. Defaults to the green value of the tooltip's current font.
---@param b? number Blue color value of the line text. Defaults to the blue value of the tooltip's current font.
---@param a? number Alpha level of the line's text. Defaults to 1.
function tooltip:SetLineTextColor(lineNum, r, g, b, a) end
--- Set the step size for the scroll bar
---@param step number The new step size.
function tooltip:SetScrollStep(step) end
--- Smartly anchor the tooltip to the given frame and ensure that it is always on screen.
---@param frame Frame The frame that will serve as the tooltip anchor.
function tooltip:SmartAnchorTo(frame) end
--- Resizes the tooltip to fit the screen and show a scrollbar if needed.
---@param maxheight? number Maximum tooltip height in pixels.
function tooltip:UpdateScrolling(maxheight) end
-- ----------------------------------------------------------------------------
-- LibQTip.Cell
-- ----------------------------------------------------------------------------
---@class LibQTip.Cell: Frame
local cell = {}
--- Returns the cell's position within the containing tooltip.
---@return number lineIndex The line index of cell.
---@return number columnIndex The column index of cell.
function cell:GetPosition() end
--- This method is called on newly created Cells, typically to perform one-time initialization.
function cell:InitializeCell() end
--- Setup the cell with the given arguments.
---@param tooltip LibQTip.Tooltip The tooltip the cell belongs to.
---@param value unknown The value to display in the cell.
---@param justification JustifyHorizontal Cell-specific justification to use ("CENTER", "LEFT" or "RIGHT").
---@param font? FontObject|Font The rendering font. Defaults to regular or header font, depending on the cell's designation.
---@param leftPadding? number Pixel padding on the left side of the cell's value. Defaults to 0.
---@param rightPadding? number Pixel padding on the right side of the cell's value. Defaults to 0.
---@param maxWidth? number The maximum width (in pixels) of the cell. If the cell's value is textual and exceeds this width, it will wrap to a new line. Must not be less than the value of minWidth.
---@param minWidth? number The minimum width (in pixels) of the cell. Must not exceed the value of maxWidth.
function cell:SetupCell(tooltip, value, justification, font, leftPadding, rightPadding, maxWidth, minWidth) end
-- ----------------------------------------------------------------------------
-- LibQTip.CellProvider
-- ----------------------------------------------------------------------------
---@class LibQTip.CellProvider
local cellProvider = {}
--- Acquire a new cell to be displayed in the tooltip. LibQTip manages parent, framelevel, anchors, visibility and size of the cell.
---@param tooltip LibQTip.Tooltip The tooltip the cell is being acquired for.
---@return LibQTip.Cell cell The acquired cell.
function cellProvider:AcquireCell(tooltip) end
--- Return the prototype and metatable used to create new cells.
---@return table cellPrototype The prototype on which cell are based.
---@return table cellMetatable The metatable used to create new cell.
function cellProvider:GetCellPrototype() end
--- Return an iterator on currently acquired cells.
---@generic T: LibQTip.Cell, K, V
---@return fun(tooltip: LibQTip.Cell<K, V>, index?: K):K, V
---@return T
function cellProvider:IterateCells() end
--- Release a cell that LibQTip is no longer using. The cell has already been hidden, unanchored and orphaned by LibQTip.
---@param cell LibQTip.Cell The cell to release.
function cellProvider:ReleaseCell(cell) end
@@ -0,0 +1,74 @@
---@meta _
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation)
---@class LibSharedMedia-3.0
local LibSharedMedia = {}
LibSharedMedia.LOCALE_BIT_koKR = 1
LibSharedMedia.LOCALE_BIT_ruRU = 2
LibSharedMedia.LOCALE_BIT_zhCN = 4
LibSharedMedia.LOCALE_BIT_zhTW = 8
LibSharedMedia.LOCALE_BIT_western = 128
LibSharedMedia.MediaType = {
BACKGROUND = "background",
BORDER = "border",
FONT = "font",
STATUSBAR = "statusbar",
SOUND = "sound",
}
---@alias LibSharedMediaTypes
---| "background" # Backgrounds
---| "border" # Borders
---| "font" # Fonts
---| "sound" # Sounds
---| "statusbar" # Statusbars
---@param mediatype LibSharedMediaTypes
---@param key string
---@param data string|number the data to associate with the handle; a filename or FileID
---@param langmask? number
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:Register(mediatype, key, data, langmask) end
---@param mediatype LibSharedMediaTypes
---@param key string
---@param noDefault? boolean
---@return string?
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:Fetch(mediatype, key, noDefault) end
---@param mediatype LibSharedMediaTypes
---@param key? string
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:IsValid(mediatype, key) end
---@param mediatype LibSharedMediaTypes
---@return table<string, string>
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:HashTable(mediatype) end
---@param mediatype LibSharedMediaTypes
---@return string[]
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:List(mediatype) end
---@param mediatype LibSharedMediaTypes
---@return string?
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:GetGlobal(mediatype) end
---@param mediatype LibSharedMediaTypes
---@param key? string
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:SetGlobal(mediatype, key) end
---@param mediatype LibSharedMediaTypes
---@return string?
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:GetDefault(mediatype) end
---@param type string
---@param handle string
---[Documentation](https://www.wowace.com/projects/libsharedmedia-3-0/pages/api-documentation/)
function LibSharedMedia:SetDefault(type, handle) end
@@ -0,0 +1,45 @@
---@meta _
-- ----------------------------------------------------------------------------
-- LibSink-2.0
-- ----------------------------------------------------------------------------
---@class LibSink-2.0
local lib = {}
-- Gets or creates an AceConfig-2.0 OptionsTable
---@return table optionsTable
function lib:GetSinkAce2OptionsDataTable() end
-- Gets or creates an AceConfig-3.0 OptionsTable
---@return table optionsTable
function lib:GetSinkAce3OptionsDataTable() end
-- Sends a message to the registered sink.
---@param textOrAddon number|string|table The text to send, or an object to use as the sender. If an object is passed, the remaining arguments are shifted up internally.
---@param r number Red value of the text - should be passed as decimal values ranging from 0.0 to 1.0.
---@param g number Green value of the text - should be passed as decimal values ranging from 0.0 to 1.0.
---@param b number Blue value of the text - should be passed as decimal values ranging from 0.0 to 1.0.
---@param fontName? string The name of the font to use. Does not work for all sink types.
---@param fontSize? number The size of the font. Does not work for all sink types.
---@param outlineIndex? number The index of the outline style to use. Does not work for all sink types.
---@param isSticky? boolean Set messages from this source to appear as sticky.
---@param location? unknown Unused by the library.
---@param iconTexturePath? string The path of the icon texture to use.
function lib:Pour(textOrAddon, r, g, b, fontName, fontSize, outlineIndex, isSticky, location, iconTexturePath) end
-- Registers a sink with the library
---@param shortName string
---@param name string
---@param desc string|nil
---@param func function|string
---@param scrollAreaFunc? function|string
---@param hasSticky? boolean
function lib:RegisterSink(shortName, name, desc, func, scrollAreaFunc, hasSticky) end
-- Sets the storage location for user preferences
---@param storage table The location in the SavedVariables table
function lib:SetSinkStorage(storage) end
-- Sets a sink override for -all- addons, librarywide.
---@param override? string
function lib:SetSinkOverride(override) end
@@ -0,0 +1,29 @@
---@meta _
---[Documentation](https://www.wowace.com/projects/libstub)
LibStub = {}
---@generic T
---@param major `T`
---@param minor number
---@return table|T library
---@return number? oldMinor
function LibStub:NewLibrary(major, minor) end
---@generic T
---@param major `T`
---@param silent? boolean
---@return table|T library
function LibStub:GetLibrary(major, silent) end
---@return function iter
---@return table invariant
function LibStub:IterateLibraries() end
-- not sure how to annotate this
--setmetatable(LibStub, { __call = LibStub.GetLibrary })
---@generic T
---@param major `T`
---@param silent? boolean
---@return table|T library
function LibStub(major, silent) end
@@ -0,0 +1,54 @@
-- ----------------------------------------------------------------------------
-- LibTextDump-1.0
-- ----------------------------------------------------------------------------
---@meta _
---@class LibTextDump-1.0
local lib = {}
---Creates an interface.
---@param frameTitle string Text to be displayed on the title bar of the display frame for the interface.
---@param width number
---@param height number
---@return LibTextDump.Interface
function lib:New(frameTitle, width, height)
end
-- ----------------------------------------------------------------------------
-- LibTextDump.Interface
-- ----------------------------------------------------------------------------
---@meta _
---@class LibTextDump.Interface
local interface = {}
---Adds a line of text to the interface's buffer.
---@param text string Text to be added to a new line.
---@param dateFormat string? Optional format parameter passed to the Lua date function. If present, prefixes text with [dateFormat].
function interface:AddLine(text, dateFormat)
end
---Clears the contents of the interface's buffer.
function interface:Clear()
end
---Shows the display frame for the interface, populated with the contents of the interface's buffer.
---@param separator string? Optional separator for concatenating the buffer's lines together. Defaults to a newline.
function interface:Display(separator)
end
---Inserts a line of text at the specified position in the interface's buffer.
---@param position number Index of insertion.
---@param text string Text to be added to a new line.
---@param dateFormat string? Optional format parameter passed to the Lua date function. If present, prefixes text with [dateFormat].
function interface:InsertLine(position, text, dateFormat)
end
---Returns the number of lines in the interface's buffer.
---@return number
function interface:Lines()
end
---Returns the string representation of the interface's buffer.
---@param separator string? Optional separator for concatenating the buffer's lines together. Defaults to a newline.
---@return string
function interface:String(separator)
end