Content:MirLua/NamedEvents/Definitions: Difference between revisions

From Miranda NG
Jump to navigation Jump to search
No edit summary
(DestroyHookableEvent is going to be removed from plugin)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<includeonly>{{#arraydefine: MirLuaNamedEvents
<includeonly>{{#arraydefine: MirLuaNamedEvents
| CreateHookableEvent;; HookEvent;; UnhookEvent;; NotifyEventHooks;; DestroyHookableEvent
| CreateHookableEvent;; HookEvent;; UnhookEvent;; NotifyEventHooks
| ;;
| ;;
}}
}}
{{#hashdefine:
{{#hashdefine:


CreateHookableEvent | example={{Content:MirLua/Example|code=Examle 1}};; | ;; | =
CreateHookableEvent | example={{Content:MirLua/Example|code=local hEvent = m.CreateHookableEvent('MyEvent')}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


HookEvent | example={{Content:MirLua/Example|code=Examle 2}};; | ;; | =
HookEvent | example={{Content:MirLua/Example|code=local hHook = m.HookEvent('MyEvent', function(w, l)
  print('MyEvent is raised!')
end)
}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


UnhookEvent | example={{Content:MirLua/Example|code=Examle 3}};; | ;; | =
UnhookEvent | example={{Content:MirLua/Example|code=m.UnhookEvent(hHook)}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


NotifyEventHooks | example={{Content:MirLua/Example|code=Examle 4}};; | ;; | =
NotifyEventHooks | example={{Content:MirLua/Example|code=m.NotifyEventHooks(hEvent)}};; | ;; | =
   
   
}}{{#hashdefine:
}}{{#hashdefine:


DestroyHookableEvent | example={{Content:MirLua/Example|code=Examle 5}};; | ;; | =
DestroyHookableEvent | example={{Content:MirLua/Example|code=m.DestroyHookableEvent(hEvent)}};; | ;; | =


}}</includeonly><noinclude>
}}</includeonly><noinclude>
[[Category:Content pages]]
[[Category:Content pages]]
</noinclude>
</noinclude>

Latest revision as of 19:00, 10 December 2015