/*** Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved. File: Hooks.hpp Date: 2021-6-9 Author: Reece ***/ #pragma once #include "IConsoleSubscriber.hpp" #include "ITextLineSubscriber.hpp" namespace Aurora::Console::Hooks { AUKN_SYM void AddSubscription(const AuSPtr &subscriber); AUKN_SYM void RemoveSubscription(const AuSPtr &subscriber); using LineHook_cb = AuFunction; /// @deprecated wont ever remove /// Most c++ styleguides would have you chuck an IConsoleSubscriber in your app somewhere AUKN_SYM void AddFunctionalHook(LineHook_cb hook); /** * Hijacks the UTF-8 input line processor coming from the consoles. * Call with an empty interface pointer to reenable command processing * * Requires AsyncApp or RuntimePump() calls */ AUKN_SYM void SetCallbackAndDisableCmdProcessing(const AuSPtr &subscriber); }