Mercurial > wow > hotcorners
comparison Libs/CallbackHandler-1.0/CallbackHandler-1.0.lua @ 11:371e14cd2feb
- major fixes with icons not showing correctly.
author | Tercio |
---|---|
date | Thu, 08 Dec 2016 13:01:40 -0200 |
parents | c31ee4251181 |
children | 3596dadf9a90 |
comparison
equal
deleted
inserted
replaced
10:6572ed4edaae | 11:371e14cd2feb |
---|---|
1 --[[ $Id: CallbackHandler-1.0.lua 965 2010-08-09 00:47:52Z mikk $ ]] | 1 --[[ $Id: CallbackHandler-1.0.lua 1131 2015-06-04 07:29:24Z nevcairiel $ ]] |
2 local MAJOR, MINOR = "CallbackHandler-1.0", 6 | 2 local MAJOR, MINOR = "CallbackHandler-1.0", 6 |
3 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) | 3 local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR) |
4 | 4 |
5 if not CallbackHandler then return end -- No upgrade needed | 5 if not CallbackHandler then return end -- No upgrade needed |
6 | 6 |
63 -- target - target object to embed public APIs in | 63 -- target - target object to embed public APIs in |
64 -- RegisterName - name of the callback registration API, default "RegisterCallback" | 64 -- RegisterName - name of the callback registration API, default "RegisterCallback" |
65 -- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" | 65 -- UnregisterName - name of the callback unregistration API, default "UnregisterCallback" |
66 -- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. | 66 -- UnregisterAllName - name of the API to unregister all callbacks, default "UnregisterAllCallbacks". false == don't publish this API. |
67 | 67 |
68 function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName, OnUsed, OnUnused) | 68 function CallbackHandler:New(target, RegisterName, UnregisterName, UnregisterAllName) |
69 -- TODO: Remove this after beta has gone out | |
70 assert(not OnUsed and not OnUnused, "ACE-80: OnUsed/OnUnused are deprecated. Callbacks are now done to registry.OnUsed and registry.OnUnused") | |
71 | 69 |
72 RegisterName = RegisterName or "RegisterCallback" | 70 RegisterName = RegisterName or "RegisterCallback" |
73 UnregisterName = UnregisterName or "UnregisterCallback" | 71 UnregisterName = UnregisterName or "UnregisterCallback" |
74 if UnregisterAllName==nil then -- false is used to indicate "don't want this method" | 72 if UnregisterAllName==nil then -- false is used to indicate "don't want this method" |
75 UnregisterAllName = "UnregisterAllCallbacks" | 73 UnregisterAllName = "UnregisterAllCallbacks" |