-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi.lua
More file actions
172 lines (130 loc) · 2.72 KB
/
api.lua
File metadata and controls
172 lines (130 loc) · 2.72 KB
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
ADDON_API = {
File = {},
Unit = {},
Team = {},
Log = {},
Interface = {},
Cursor = {},
Input = {},
Time = {},
Player = {},
Bag = {},
-- This is the 'addons' directory at runtime
baseDir = "",
rootWindow = {},
timers = {}
}
-- ======
-- Logging
-- ======
-- Logs a message to chat in YELLOW
function ADDON_API.Log:Info(message)
end
-- Logs a message to chat in RED
function ADDON_API.Log:Err(message)
end
-- ======
-- File Handling
-- ======
function ADDON_API.File:Write(path, tbl)
end
function ADDON_API.File:Read(path)
end
function ADDON_API.GetSettings(addonId)
end
function ADDON_API.SaveSettings()
end
-- ======
-- Interface
-- ======
function ADDON_API.Interface:CreateWindow(id, title, x, y, tabs)
end
function ADDON_API.Interface:CreateEmptyWindow(id)
end
function ADDON_API.Interface:CreateWidget(type, id, parent)
end
function ADDON_API.Interface:CreateStatusBar(name, parent, type)
end
function ADDON_API.Interface:CreateComboBox(window)
end
function ADDON_API.Interface:ApplyButtonSkin(btn, skin)
end
-- ======
-- Unit
-- ======
function ADDON_API.Unit:GetUnitNameById(id)
end
function ADDON_API.Unit:GetUnitInfoById(id)
end
-- Note: "unit" in the below can be player, target, team1 through team50, playerpet1 or playerpet2
function ADDON_API.Unit:GetUnitScreenPosition(unit)
end
function ADDON_API.Unit:UnitDistance(unit)
end
function ADDON_API.Unit:GetUnitId(unit)
end
function ADDON_API.Unit:UnitBuffCount(unit)
end
function ADDON_API.Unit:UnitBuff(unit, index)
end
-- Returns the x,y,z coords of the provided unit
function ADDON_API.Unit:UnitWorldPosition(unit)
end
function ADDON_API.Unit:UnitDeBuffCount(unit)
end
function ADDON_API.Unit:UnitDeBuff(unit, index)
end
-- ======
-- Team
-- ======
function ADDON_API.Team:InviteToTeam(name, party)
end
function ADDON_API.Team:SetRole(role)
end
-- ======
-- Bag
-- ======
function ADDON_API.Bag:EquipBagItem(bagSlot, isAux)
end
--[[
@function GetBagItemInfo
@desc Get item information at the index, in the bag specified. 1 = Inventory
]]
function ADDON_API.Bag:GetBagItemInfo(bagType, index)
end
-- ======
-- Cursor
-- ======
function ADDON_API.Cursor:ClearCursor()
end
function ADDON_API.Cursor:SetCursorImage(image, x, y)
end
-- ======
-- Time
-- ======
function ADDON_API.Time:GetUiMsec()
end
-- ======
-- Input
-- ======
function ADDON_API.Input:IsShiftKeyDown()
end
-- ======
-- Player
-- ======
--[[
@function ChangeAppellation
@desc Changes the player's title
@param type (number) The ID of the title to set
@returns (nil|true)
]]
function ADDON_API.Player:ChangeAppellation(type)
end
-- ======
-- Events & Timers
-- ======
function ADDON_API.On(event, callback)
end
function ADDON_API:DoIn(msec, callback)
end
return ADDON_API