-
Notifications
You must be signed in to change notification settings - Fork 39
/
annotations.lua
662 lines (524 loc) · 17.6 KB
/
annotations.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
---@meta
---@class AnimationGroup
---@field callback fun()
---@class ItemButton: Button
---@field bagID number
---@field NewItemTexture Texture
---@field minDisplayCount number
---@field NormalTexture Texture
---@field PushedTexture Texture
---@field HighlightTexture Texture
---@field BattlepayItemTexture Texture
---@field IconBorder Texture
---@field UpgradeIcon Texture
---@field flashAnim AnimationGroup
---@field newitemglowAnim AnimationGroup
---@field IconOverlay Texture
---@field GetItemContextMatchResult function
---@field ItemContextOverlay Texture
---@field Cooldown Cooldown
---@field UpdateTooltip function
---@field LockTexture Texture
---@field IconQuestTexture Texture
---@field IconTexture Texture
---@field ItemSlotBackground Texture
---@field backdrop Frame
---@field searchOverlay Texture
local itemButton = {}
---@param bagid number
function itemButton:SetBagID(bagid) end
---@param hasItem string|number|boolean
function itemButton:UpdateCooldown(hasItem) end
---@param texture string|number
function itemButton:SetItemButtonTexture(texture) end
---@param hasItem string|number|boolean
function itemButton:SetHasItem(hasItem) end
function itemButton:UpdateExtended() end
function itemButton:UpdateQuestItem(isQuestItem, questID, isActive) end
function itemButton:UpdateNewItem(quality) end
function itemButton:UpdateJunkItem(quality, noValue) end
function itemButton:UpdateItemContextMatching() end
function itemButton:SetReadable(readable) end
function itemButton:CheckUpdateTooltip(tooltipOwner) end
function itemButton:SetMatchesSearch(matchesSearch) end
function itemButton:SetItemButtonQuality(quality) end
function itemButton:HasItem() end
---@return Enum.BagIndex
function itemButton:GetBagID() end
---@class Button
---@field isSkinned boolean
local Button = {}
function Button:RegisterForClicks(...) end
---@return Texture
function itemButton:GetHighlightTexture() end
---@class ContinuableContainer
ContinuableContainer = {}
---@class MasqueGroup
---@field Buttons ItemButton[]
MasqueGroup = {}
function MasqueGroup:AddButton(group, button) end
function MasqueGroup:RemoveButton(group, button) end
function MasqueGroup:ReSkin(boolean) end
function MasqueGroup:RegisterCallback(func, obj) end
---@class Masque
Masque = {}
---@param name string
---@param group string
---@return MasqueGroup
function Masque:Group(name, group) end
---@class LibWindow-1.1
Window = {}
function Window.RegisterConfig(frame, config) end
function Window.SavePosition(frame) end
function Window.RestorePosition(frame) end
---@class ContainerFrameCombinedBags: Frame
ContainerFrameCombinedBags = {}
---@class BankFrame: Frame
BankFrame = {}
---@class BagsBar: Frame
BagsBar = {}
---@class MainMenuBarBackpackButton: Button
MainMenuBarBackpackButton = {}
---@class BagBarExpandToggle: Button
BagBarExpandToggle = {}
---@class ColorPickerFrame: Frame
ColorPickerFrame = {}
function ColorPickerFrame:SetupColorPickerAndShow(opts) end
---@return number, number, number
function ColorPickerFrame:GetColorRGB() end
---@return number
function ColorPickerFrame:GetColorAlpha() end
---@class DropdownButton: Button
local dropdownButton = {}
---@param setupFunction fun(dropdown: DropdownButton, root: table)
function dropdownButton:SetupMenu(setupFunction) end
function dropdownButton:GenerateMenu() end
function dropdownButton:Update() end
---@class BetterBagsDebugListButton: Button
---@field RowNumber FontString
---@field Category FontString
---@field Message FontString
---@class ScrollingFlatPanelTemplate: Frame
---@field ScrollBox WowScrollBox
---@field ScrollBar MinimalScrollBar
---@field ClosePanelButton Button
---@class DLAPI
DLAPI = {}
function DLAPI.RegisterFormat(name, format) end
function DLAPI.SetFormat(name, format) end
function DLAPI.DebugLog(category, message) end
---@param createFunc fun(): any
---@param resetFunc fun(any)
---@return ObjectPool
function CreateObjectPool(createFunc, resetFunc) end
---@class ObjectPool
local ObjectPool = {}
---@return any
function ObjectPool:Acquire() end
function ObjectPool:Release(o) end
function ObjectPool:SetResetDisallowedIfNew(disallow) end
---@class LibUIDropDownMenu-4.0
local LibUIDropDownMenu = {}
---@param name string
---@param parent Frame
---@return frame
function LibUIDropDownMenu:Create_UIDropDownMenu(name, parent) end
function LibUIDropDownMenu:EasyMenu_Initialize(frame, level, menuList, anchor, x, y, displayMode, autoHideDelay) end
function LibUIDropDownMenu:EasyMenu(menuList, frame, anchor, x, y, displayMode, autoHideDelay) end
function LibUIDropDownMenu:HideDropDownMenu(level) end
---@class SearchBox: EditBox
---@field Instructions FontString
local SearchBox = {}
---@class ButtonFrameTemplate: Frame
---@field Bg Texture
---@field PortraitContainer PortraitContainer
---@field CloseButton Button
---@field TitleContainer TitleContainer
---@class BetterBagsBagPortraitTemplate
---@field Bg Texture
---@field PortraitContainer PortraitContainer
---@field CloseButton Button
---@field SearchBox SearchBox
---@field Backdrop BackdropTemplate
---@field NineSlice NineSlicePanelTemplate
---@field TopTileStreaks Texture
---@field TitleContainer TitleContainer
---@field Owner Bag
local BetterBagsBagPortraitTemplate = {}
---@return string
function BetterBagsBagPortraitTemplate:GetName() end
---@class PortraitContainer: Frame
---@field portrait Texture
---@field CircleMask MaskTexture
---@class TitleContainer: Frame
---@field TitleText FontString
---@class BetterBagsBagDefaultPanelTemplate
---@field Bg Texture
---@field CloseButton Button
---@field Backdrop BackdropTemplate
---@field NineSlice NineSlicePanelTemplate
---@field TopTileStreaks Texture
local BetterBagsBagDefaultPanelTemplate = {}
---@class NineSlicePanelTemplate: Frame
local NineSlicePanelTemplate = {}
function NineSlicePanelMixin:GetFrameLayoutTextureKit() end
---@class BackdropTemplate
local BackdropTemplate = {}
function BackdropTemplate:Show() end
function BackdropTemplate:Hide() end
function BetterBagsBagPortraitTemplate:SetPortraitToAsset(texture) end
function BetterBagsBagPortraitTemplate:SetPortraitTextureSizeAndOffset(size, offsetX, offsetY) end
function BetterBagsBagPortraitTemplate:SetTitle(title) end
---@class BetterBagsClassicBagPortrait
---@field Inset Texture
---@field PortraitFrame Texture
---@field CloseButton Button
---@field SearchBox SearchBox
local BetterBagsClassicBagPortrait = {}
---@class FontString
local FontString = {}
function FontString:SetScript(event, func) end
---@class WowScrollBox: Frame
local WowScrollBox = {}
function WowScrollBox:SetInterpolateScroll(interpolate) end
function WowScrollBox:ScrollInDirection(percent, direction) end
function WowScrollBox:FullUpdate(const) end
function WowScrollBox:OnMouseWheel(delta) end
function WowScrollBox:ScrollToEnd() end
---@return Texture
function WowScrollBox:GetUpperShadowTexture() end
---@return Texture
function WowScrollBox:GetLowerShadowTexture() end
function WowScrollBox:SetDataProvider(provider) end
function WowScrollBox:ScrollToOffset(offset) end
function WowScrollBox:RegisterCallback(event, callback) end
---@return number
function WowScrollBox:GetDerivedScrollOffset() end
---@return number
function WowScrollBox:GetDerivedScrollRange() end
---@param percent number
function WowScrollBox:SetScrollPercentage(percent) end
---@class InputScrollFrameTemplate: Frame
---@field EditBox EditBox
---@class DataProviderMixin: CallbackRegistryMixin
local DataProviderMixin = {}
function DataProviderMixin:Enumerate(indexBegin, indexEnd) end
function DataProviderMixin:Insert(...) end
function DataProviderMixin:InsertTable(tbl) end
function DataProviderMixin:InsertAtIndex(elementData, insertIndex) end
---@return number
function DataProviderMixin:GetSize() end
---@param elementData table
---@return number
function DataProviderMixin:FindIndex(elementData) end
function DataProviderMixin:RemoveIndex(index) end
function DataProviderMixin:Flush() end
---@param predicate fun(elementData: table<any, any>): boolean
---@return boolean
function DataProviderMixin:ContainsByPredicate(predicate) end
---@return fun(): number, table
function DataProviderMixin:EnumerateEntireRange() end
---@return table[]
function DataProviderMixin:GetCollection() end
---@param index number
---@return table
function DataProviderMixin:Find(index) end
---@param elementData table
---@param newIndex number
function DataProviderMixin:MoveElementDataToIndex(elementData, newIndex) end
---@return number
function DataProviderMixin:GetSize() end
function DataProviderMixin:Remove(...) end
---@class ScrollBoxDragBehavior
local ScrollBoxDragBehavior = {}
---@param reorderable boolean
function ScrollBoxDragBehavior:SetReorderable(reorderable) end
function ScrollBoxDragBehavior:SetDropPredicate(fn) end
function ScrollBoxDragBehavior:SetDragPredicate(fn) end
function ScrollBoxDragBehavior:SetFinalizeDrop(fn) end
---@class C_Bank
---@field CloseBankFrame fun()
---@field FetchNumPurchasedBankTabs fun(bankType: BankType): number
---@field FetchPurchasedBankTabData fun(bankType: BankType): BankTabData[]
---@field HasMaxBankTabs fun(bankType: BankType): boolean
---@field FetchDepositedMoney fun(bankType: BankType): number
---@field AutoDepositItemsIntoBank fun(bankType: BankType)
C_Bank = {}
-- Backwards compatible function for Classic.
function CloseBankFrame() end
---@enum BagSlotFlags
BagSlotFlags = {
DisableAutoSort = 1,
ClassEquipment = 2,
ClassConsumables = 4,
ClassProfessionGoods = 8,
ClassJunk = 16,
ClassQuestItems = 32,
ExcludeJunkSell = 64,
ClassReagents = 128,
ExpansionCurrent = 256,
ExpansionLegacy = 512,
}
---@class Frame
---@field scrollable boolean
local frameProto = {}
---@class MinimalScrollBar: Frame
local MinimalScrollBar = {}
function MinimalScrollBar:SetInterpolateScroll(interpolate) end
function MinimalScrollBar:SetHideIfUnscrollable(hide) end
---@class EventFrame
local EventFrame = {}
---@param location number
---@return boolean, boolean, boolean, boolean, number, number
function EquipmentManager_UnpackLocation(location) end
-- ItemInfo is the information about an item that is returned by GetItemInfo.
---@class (exact) ExpandedItemInfo
---@field itemID number
---@field itemGUID string
---@field itemName string
---@field itemLink string
---@field itemQuality Enum.ItemQuality
---@field itemLevel number
---@field itemMinLevel number
---@field itemType string
---@field itemSubType string
---@field itemStackCount number
---@field itemEquipLoc string
---@field itemTexture number
---@field sellPrice number
---@field classID Enum.ItemClass
---@field subclassID number
---@field bindType Enum.ItemBind
---@field expacID ExpansionType
---@field setID number
---@field isCraftingReagent boolean
---@field effectiveIlvl number
---@field isPreview boolean
---@field baseIlvl number
---@field itemIcon? number
---@field isBound boolean
---@field isLocked boolean
---@field isNewItem boolean
---@field currentItemCount number
---@field category string
---@field currentItemLevel number
---@field equipmentSets string[]|nil
---@return Frame
function CreateScrollBoxLinearView() end
---@param itemLink string
---@return number, boolean, number
function GetDetailedItemLevelInfo(itemLink) end
_G.LE_EXPANSION_CLASSIC = 0
_G.LE_EXPANSION_BURNING_CRUSADE = 1
_G.LE_EXPANSION_WRATH_OF_THE_LICH_KING = 2
_G.LE_EXPANSION_CATACLYSM = 3
_G.LE_EXPANSION_MISTS_OF_PANDARIA = 4
_G.LE_EXPANSION_WARLORDS_OF_DRAENOR = 5
_G.LE_EXPANSION_LEGION = 6
_G.LE_EXPANSION_BATTLE_FOR_AZEROTH = 7
_G.LE_EXPANSION_SHADOWLANDS = 8
_G.LE_EXPANSION_DRAGONFLIGHT = 9
_G.LE_EXPANSION_WAR_WITHIN = 10
-- Write out all the expansion names.
_G.EXPANSION_NAME0 = "Classic"
_G.EXPANSION_NAME1 = "The Burning Crusade"
_G.EXPANSION_NAME2 = "Wrath of the Lich King"
_G.EXPANSION_NAME3 = "Cataclysm"
_G.EXPANSION_NAME4 = "Mists of Pandaria"
_G.EXPANSION_NAME5 = "Warlords of Draenor"
_G.EXPANSION_NAME6 = "Legion"
_G.EXPANSION_NAME7 = "Battle for Azeroth"
_G.EXPANSION_NAME8 = "Shadowlands"
_G.EXPANSION_NAME9 = "Dragonflight"
_G.EXPANSION_NAME10 = "The War Within"
_G.BANK_BAG_PURCHASE = "Purchasable Bag Slot"
_G.COSTS_LABEL = "Cost:"
_G.UNIT_NAME_FONT = ""
_G.DAMAGE_TEXT_FONT = ""
-- Type fixes for quality constants.
---@type string
_G.ITEM_QUALITY0_DESC = _G.ITEM_QUALITY0_DESC
---@type string
_G.ITEM_QUALITY1_DESC = _G.ITEM_QUALITY1_DESC
---@type string
_G.ITEM_QUALITY2_DESC = _G.ITEM_QUALITY2_DESC
---@type string
_G.ITEM_QUALITY3_DESC = _G.ITEM_QUALITY3_DESC
---@type string
_G.ITEM_QUALITY4_DESC = _G.ITEM_QUALITY4_DESC
---@type string
_G.ITEM_QUALITY5_DESC = _G.ITEM_QUALITY5_DESC
---@type string
_G.ITEM_QUALITY6_DESC = _G.ITEM_QUALITY6_DESC
---@type string
_G.ITEM_QUALITY7_DESC = _G.ITEM_QUALITY7_DESC
---@type string
_G.ITEM_QUALITY8_DESC = _G.ITEM_QUALITY8_DESC
Enum.BagIndex.AccountBankTab_1 = 13
Enum.BagIndex.AccountBankTab_2 = 14
Enum.BagIndex.AccountBankTab_3 = 15
Enum.BagIndex.AccountBankTab_4 = 16
Enum.BagIndex.AccountBankTab_5 = 17
Enum.PlayerInteractionType.AccountBanker = 68
---@enum BankType
Enum.BankType = {
Character = 0,
Guild = 1,
Account = 2,
}
---@class TabSettingsMenu: Frame
TabSettingsMenu = {}
function TabSettingsMenu:Show() end
function TabSettingsMenu:Hide() end
function TabSettingsMenu:SetSelectedTab(index) end
function TabSettingsMenu:Update() end
function TabSettingsMenu:GetBankFrame() end
---@class AccountBankPanel: Frame
---@field TabSettingsMenu TabSettingsMenu
AccountBankPanel = {}
AccountBankPanel.PurchasePrompt = {}
AccountBankPanel.PurchasePrompt.TabCostFrame = {}
---@type Button
AccountBankPanel.PurchasePrompt.TabCostFrame.PurchaseButton = {
BattlepayItemTexture = {},
isSkinned = true,
}
ACCOUNT_BANK_PANEL_TITLE = ""
---@class AceConfig.OptionsTable
---@field values? table<any, any>
---[Documentation](http://www.wowace.com/addons/ace3/pages/ace-config-3-0-options-tables/)
local OptionsTable = {}
---@class AceItemList
---@field type string
---@field frame Frame
---@field section Section
---@field parent AceGUIFrame
---@field label AceGUILabel
local AceItemList = {}
---@param values CustomCategoryFilter
function AceItemList:SetList(values) end
---@class AceGUILabel
---@field frame Frame
---@class MoneyFrameButtonTemplate
---@class DefaultPanelFlatTemplate
---@class UIPanelButtonTemplate
---@class InputBoxTemplate
-- Legacy UpdateCooldown function for Classic.
---@param id number
---@param button Button
function ContainerFrame_UpdateCooldown(id, button) end
---@type Frame
GameMenuFrame = {
scrollable = true,
}
---@type CheckButton
KeyRingButton = {}
---@type Button
CharacterReagentBag0Slot = {
BattlepayItemTexture = {},
isSkinned = true,
}
---@class MainMenuBagButton: Button
---@field SlotHighlightTexture Texture
ItemButtonUtil = {}
---@enum ItemContextMatchResult
ItemButtonUtil.ItemContextMatchResult = {
Match = 1,
Mismatch = 2,
DoesNotApply = 3,
}
----
-- ConsolePort annotations
----
ConsolePort = {}
---@param frame Frame
function ConsolePort:AddInterfaceCursorFrame(frame) end
--- Pawn Globals
-- PawnIsContainerItemAnUpgrade returns whether the item in the given bag and slot is an upgrade.
---@param bag number
---@param slot number
function PawnIsContainerItemAnUpgrade(bag, slot) end
PawnVersion = _G['PawnVersion'] --[[@as number]]
PawnGetItemData = _G['PawnGetItemData'] --[[@as fun(itemLink: string): table]]
PawnIsItemAnUpgrade = _G['PawnIsItemAnUpgrade'] --[[@as fun(itemData: table): boolean]]
PawnShouldItemLinkHaveUpgradeArrow = _G['PawnShouldItemLinkHaveUpgradeArrow'] --[[@as fun(itemLink: string): boolean]]
PawnShouldItemLinkHaveUpgradeArrowUnbudgeted = _G['PawnShouldItemLinkHaveUpgradeArrowUnbudgeted'] --[[@as fun(itemLink: string, level?: boolean): boolean]]
--- SimpleItemLevel API Globals
---@class SimpleItemLevel
SimpleItemLevel = {}
SimpleItemLevel.API = {}
---@param itemLink string
---@return boolean
function SimpleItemLevel.API.ItemIsUpgrade(itemLink) end
--- SortBags
-- Sort bags for classic.
function SortBags() end
--- DevTool
---@class DevTool
_G.DevTool = {}
---@param value any
---@param tag string
function _G.DevTool:AddData(value, tag) end
---@param index number
---@param backpack number
function SetCurrencyBackpack(index, backpack) end
---@param index number
---@return CurrencyInfo
function GetCurrencyListInfo(index) end
---@return number
function GetCurrencyListSize() end
--- WagoAnalytics
---@class WagoAnalytics
local WagoAnalytics = {}
---@param id string
function WagoAnalytics:Register(id) end
---@param label string
---@param enabled boolean
function WagoAnalytics:Switch(label, enabled) end
---@param counter string
---@param amount? number
function WagoAnalytics:IncrementCounter(counter, amount) end
---@param counter string
---@param amount? number
function WagoAnalytics:DecrementCounter(counter, amount) end
---@param counter string
---@param amount number
function WagoAnalytics:SetCounter(counter, amount) end
---@class DecorationFrame: Frame
--- GuildWars2 API
---@class GuildWars2
GW2_ADDON = {}
GW2_ADDON.BackdropTemplates = {}
function GW2_ADDON.CreateFrameHeaderWithBody(frame, titletext, icon, details) end
function GW2_ADDON.SkinBagSearchBox(searchBox) end
function Button:GwSkinButton(x) end
function Button:GwStripTextures() end
---@class GuildWarsHeader: Frame
---@field windowIcon Texture
---@class ElvUI
---@field RegisterCooldown fun(self: ElvUI, tex: Cooldown, b: string)
ElvUI = {
media = {
bordercolor = {}
},
Media = {
Textures = {},
bordercolor = {}
}
}
---@class ElvUISkin
local ElvUISkin = {}
---@param frame Frame
function ElvUISkin:HandleEditBox(frame) end
---@param frame Frame
function ElvUISkin:HandleFrame(frame) end
---@param button ItemButton
---@param outer boolean
function ElvUISkin:HandleItemButton(button, outer) end
---@param IconBorder Texture
function ElvUISkin:HandleIconBorder(IconBorder) end
---@param tab PanelTabButtonTemplate
function ElvUISkin:HandleTab(tab) end
---@param name string
---@return ElvUISkin
function ElvUI:GetModule(name) end