1 #ifndef LIBFILEZILLA_GLUE_WXINVOKER_HEADER
2 #define LIBFILEZILLA_GLUE_WXINVOKER_HEADER
8 #include "../invoker.hpp"
15 template<
typename... Args>
16 std::function<void(Args...)> do_make_invoker(wxEvtHandler& handler, std::function<
void(Args...)> && f)
18 return [&handler, cf = f](Args&&... args)
mutable {
19 auto cb = [cf, targs = std::make_tuple(std::forward<Args>(args)...)] {
22 handler.CallAfter(cb);
30 return do_make_invoker(handler, decltype(get_func_type(&F::operator()))(std::forward<F>(f)));
36 return [&handler](std::function<void()>
const& cb)
mutable {
37 handler.CallAfter(cb);
The namespace used by libfilezilla.
Definition: apply.hpp:17
auto apply(Obj &&obj, F &&f, Tuple &&args) -> decltype(apply_(std::forward< Obj >(obj), std::forward< F >(f), std::forward< Tuple >(args), Seq()))
Apply tuple to pointer to member.
Definition: apply.hpp:48
invoker_factory get_invoker_factory(event_loop &loop)
Creates an invoker factory.
auto make_invoker(event_loop &loop, F &&f)
Wraps the passed function, so that it is always invoked in the context of the loop.
Definition: invoker.hpp:54