dxx-rebirth/common/include/fwd-event.h
Kp 12b57e84e6 Switch most in-tree http:// links to https://
For each link given as http://, verify that the site is accessible over
https:// and, if so, switch to it.  These domains were converted:

* llvm.org
* clang.llvm.org
* en.cppreference.com
* www.dxx-rebirth.com
* www.libsdl.org
* www.scons.org
2018-09-02 00:57:29 +00:00

54 lines
1.3 KiB
C++

/*
* This file is part of the DXX-Rebirth project <https://www.dxx-rebirth.com/>.
* It is copyright by its individual contributors, as recorded in the
* project's Git history. See COPYING.txt at the top level for license
* terms and a link to the Git history.
*/
#pragma once
#include <cstdint>
#include "dxxsconf.h"
namespace dcx {
struct d_event;
struct d_create_event;
struct d_change_event;
struct d_select_event;
enum event_type : unsigned;
enum class window_event_result : uint8_t;
int event_init();
// Sends input events to event handlers
window_event_result event_poll();
void event_flush();
// Set and call the default event handler
window_event_result call_default_handler(const d_event &event);
// Send an event to the front window as first priority, then to the windows behind if it's not modal (editor), then the default handler
window_event_result event_send(const d_event &event);
// Sends input, idle and draw events to event handlers
window_event_result event_process();
void event_enable_focus();
void event_disable_focus();
static inline void event_toggle_focus(int activate_focus)
{
if (activate_focus)
event_enable_focus();
else
event_disable_focus();
}
#if DXX_USE_EDITOR
// See how long we were idle for
void event_reset_idle_seconds();
#endif
}