/***************************************************************************************** * * * OpenSpace * * * * Copyright (c) 2014-2020 * * * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * * software and associated documentation files (the "Software"), to deal in the Software * * without restriction, including without limitation the rights to use, copy, modify, * * merge, publish, distribute, sublicense, and/or sell copies of the Software, and to * * permit persons to whom the Software is furnished to do so, subject to the following * * conditions: * * * * The above copyright notice and this permission notice shall be included in all copies * * or substantial portions of the Software. * * * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * * PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF * * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE * * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ #ifndef __OPENSPACE_CORE___GLOBALSCALLBACKS___H__ #define __OPENSPACE_CORE___GLOBALSCALLBACKS___H__ #include #include #include #include #include namespace openspace::global { namespace detail { std::vector>& gInitialize(); std::vector>& gDeinitialize(); std::vector>& gInitializeGL(); std::vector>& gDeinitializeGL(); std::vector>& gPreSync(); std::vector>& gPostSyncPreDraw(); std::vector>& gRender(); std::vector>& gDraw2D(); std::vector>& gPostDraw(); std::vector>& gKeyboard(); std::vector>& gCharacter(); std::vector>& gMouseButton(); std::vector>& gMousePosition(); std::vector>& gMouseScrollWheel(); std::vector>& gTouchDetected(); std::vector>& gTouchUpdated(); std::vector>& gTouchExit(); } // namespace detail namespace callback { static std::vector>& initialize = detail::gInitialize(); static std::vector>& deinitialize = detail::gDeinitialize(); static std::vector>& initializeGL = detail::gInitializeGL(); static std::vector>& deinitializeGL = detail::gDeinitializeGL(); static std::vector>& preSync = detail::gPreSync(); static std::vector>& postSyncPreDraw = detail::gPostSyncPreDraw(); static std::vector>& render = detail::gRender(); static std::vector>& draw2D = detail::gDraw2D(); static std::vector>& postDraw = detail::gPostDraw(); static std::vector>& keyboard = detail::gKeyboard(); static std::vector>& character = detail::gCharacter(); static std::vector>& mouseButton = detail::gMouseButton(); static std::vector>& mousePosition = detail::gMousePosition(); static std::vector>& mouseScrollWheel = detail::gMouseScrollWheel(); static std::vector>& touchDetected = detail::gTouchDetected(); static std::vector>& touchUpdated = detail::gTouchUpdated(); static std::vector>& touchExit = detail::gTouchExit(); /** * If the framerate becomes slow, Chromium Embedded Framework (used in Web Browser Module) * needs to perform its message loop work more frequently than once per frame. If this * method is not called frequently enough, the GUI will become much less responsive. * A future more long-term may decouple the browser's message work loop from the main * render loop altogehter using a separate thread. * Currently, this method is called from within the RenderEngine, * between calls to individual renderables. */ extern void (*webBrowserPerformanceHotfix)(); } // namespace callback } // namespace openspace::global #endif // __OPENSPACE_CORE___GLOBALSCALLBACKS___H__