2019-11-13 11:22:21 +08:00
|
|
|
|
// Copyright (c) 2016-2018 Kiwano - Nomango
|
|
|
|
|
|
//
|
|
|
|
|
|
// 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.
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
2019-12-22 11:04:49 +08:00
|
|
|
|
#include <typeinfo>
|
|
|
|
|
|
#include <typeindex>
|
2019-12-23 18:05:08 +08:00
|
|
|
|
#include <kiwano/core/common.h>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
#include <kiwano/math/math.h>
|
2019-11-13 14:33:15 +08:00
|
|
|
|
#include <kiwano/core/keys.h>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
namespace kiwano
|
|
|
|
|
|
{
|
|
|
|
|
|
class Actor;
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
class EventType
|
|
|
|
|
|
: public std::type_index
|
2019-11-13 11:22:21 +08:00
|
|
|
|
{
|
2019-12-21 18:41:16 +08:00
|
|
|
|
class Dummy { };
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
public:
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
EventType() : std::type_index(typeid(EventType::Dummy)) {}
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param info <20>¼<EFBFBD><C2BC><EFBFBD>ʶ<EFBFBD><CAB6>
|
|
|
|
|
|
EventType(const type_info& info) : std::type_index(info) {}
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @param index <20>¼<EFBFBD><C2BC><EFBFBD>ʶ<EFBFBD><CAB6>
|
|
|
|
|
|
EventType(const std::type_index& index) : std::type_index(index) {}
|
|
|
|
|
|
};
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
2019-12-22 11:04:49 +08:00
|
|
|
|
#define KGE_EVENT(EVENT_TYPE) ::kiwano::EventType(typeid(EVENT_TYPE))
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
2019-11-13 14:33:15 +08:00
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* \~chinese
|
|
|
|
|
|
* \defgroup Events <EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
*/
|
2019-11-13 14:33:15 +08:00
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/**
|
|
|
|
|
|
* \addtogroup Events
|
|
|
|
|
|
* @{
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
Event(EventType const& type);
|
2019-12-21 18:41:16 +08:00
|
|
|
|
|
2019-11-13 11:22:21 +08:00
|
|
|
|
virtual ~Event();
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
inline const EventType& GetType() const
|
|
|
|
|
|
{
|
|
|
|
|
|
return type_;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>ж<EFBFBD><D0B6>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
/// @return <20>Ƿ<EFBFBD><C7B7><EFBFBD>ָ<EFBFBD><D6B8><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
template <
|
|
|
|
|
|
typename _Ty,
|
|
|
|
|
|
typename = typename std::enable_if<std::is_base_of<Event, _Ty>::value, int>::type
|
|
|
|
|
|
>
|
2019-12-21 18:41:16 +08:00
|
|
|
|
inline bool IsType() const
|
2019-11-13 11:22:21 +08:00
|
|
|
|
{
|
2019-12-21 18:41:16 +08:00
|
|
|
|
return type_ == KGE_EVENT(_Ty);
|
2019-11-13 11:22:21 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-12-22 11:24:04 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief ת<><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
/// @throw std::bad_cast <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ʱ<EFBFBD>׳<EFBFBD>
|
|
|
|
|
|
template <
|
|
|
|
|
|
typename _Ty,
|
|
|
|
|
|
typename = typename std::enable_if<std::is_base_of<Event, _Ty>::value, int>::type
|
|
|
|
|
|
>
|
|
|
|
|
|
inline const _Ty& Cast() const
|
|
|
|
|
|
{
|
2019-12-25 18:07:57 +08:00
|
|
|
|
return dynamic_cast<const _Ty&>(*this);
|
2019-12-22 11:24:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief ת<><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
|
|
|
|
|
/// @throw std::bad_cast <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ʱ<EFBFBD>׳<EFBFBD>
|
|
|
|
|
|
template <
|
|
|
|
|
|
typename _Ty,
|
|
|
|
|
|
typename = typename std::enable_if<std::is_base_of<Event, _Ty>::value, int>::type
|
|
|
|
|
|
>
|
|
|
|
|
|
inline _Ty& Cast()
|
|
|
|
|
|
{
|
2019-12-25 18:07:57 +08:00
|
|
|
|
return dynamic_cast<_Ty&>(*this);
|
2019-12-22 11:24:04 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȫת<C8AB><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-12-22 11:24:04 +08:00
|
|
|
|
/// @throw std::bad_cast <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ʱ<EFBFBD>׳<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
template <
|
|
|
|
|
|
typename _Ty,
|
|
|
|
|
|
typename = typename std::enable_if<std::is_base_of<Event, _Ty>::value, int>::type
|
|
|
|
|
|
>
|
2019-12-21 18:41:16 +08:00
|
|
|
|
inline const _Ty& SafeCast() const
|
2019-11-13 11:22:21 +08:00
|
|
|
|
{
|
2019-12-22 11:24:04 +08:00
|
|
|
|
if (!IsType<_Ty>())
|
|
|
|
|
|
throw std::bad_cast();
|
|
|
|
|
|
return Cast<_Ty>();
|
2019-11-13 11:22:21 +08:00
|
|
|
|
}
|
2019-12-21 18:41:16 +08:00
|
|
|
|
|
|
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><>ȫת<C8AB><D7AA>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-12-22 11:24:04 +08:00
|
|
|
|
/// @throw std::bad_cast <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>ʱ<EFBFBD>׳<EFBFBD>
|
2019-12-21 18:41:16 +08:00
|
|
|
|
template <
|
|
|
|
|
|
typename _Ty,
|
|
|
|
|
|
typename = typename std::enable_if<std::is_base_of<Event, _Ty>::value, int>::type
|
|
|
|
|
|
>
|
|
|
|
|
|
inline _Ty& SafeCast()
|
|
|
|
|
|
{
|
|
|
|
|
|
return const_cast<_Ty&>(const_cast<const Event*>(this)->SafeCast<_Ty>());
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2019-12-23 18:05:08 +08:00
|
|
|
|
private:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
const EventType type_;
|
2019-11-13 11:22:21 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-22 11:04:49 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20>¼<EFBFBD><C2BC><EFBFBD><EFBFBD>ԣ<EFBFBD><D4A3>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>¼<EFBFBD><C2BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
template <typename _Ty>
|
|
|
|
|
|
class IsEvent : public std::bool_constant<std::is_base_of<Event, _Ty>::value || std::is_same<Event, _Ty>::value> {};
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
Point pos; ///< <20><><EFBFBD><EFBFBD>λ<EFBFBD><CEBB>
|
|
|
|
|
|
bool left_btn_down; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
bool right_btn_down; ///< <20><><EFBFBD><EFBFBD><EFBFBD>Ҽ<EFBFBD><D2BC>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
Actor* target; ///< Ŀ<><C4BF>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
MouseEvent(EventType const& type);
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseMoveEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
MouseMoveEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>갴<EFBFBD><EAB0B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseDownEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
MouseButton::Value button; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
MouseDownEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>갴<EFBFBD><EAB0B4>̧<EFBFBD><CCA7><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseUpEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
MouseButton::Value button; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
MouseUpEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseClickEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
MouseButton::Value button; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
MouseClickEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseHoverEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
MouseHoverEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>Ƴ<EFBFBD><C6B3>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseOutEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
MouseOutEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API MouseWheelEvent
|
|
|
|
|
|
: public MouseEvent
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
float wheel; ///< <20><><EFBFBD><EFBFBD>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
MouseWheelEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>̰<EFBFBD><CCB0><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API KeyDownEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
KeyCode::Value code; ///< <20><>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
KeyDownEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD>̧<EFBFBD><CCA7><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API KeyUpEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
KeyCode::Value code; ///< <20><>ֵ
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
KeyUpEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API KeyCharEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
char value; ///< <20>ַ<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
KeyCharEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD><EFBFBD><EFBFBD>ƶ<EFBFBD><C6B6>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API WindowMovedEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
int x; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> x <20><><EFBFBD><EFBFBD>
|
|
|
|
|
|
int y; ///< <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> y <20><><EFBFBD><EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
WindowMovedEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ڴ<EFBFBD>С<EFBFBD>仯<EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API WindowResizedEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
int width; ///< <20><><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD>
|
|
|
|
|
|
int height; ///< <20><><EFBFBD>ڸ߶<DAB8>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
WindowResizedEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD>仯<EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API WindowFocusChangedEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
bool focus; ///< <20>Ƿ<EFBFBD><C7B7><EFBFBD>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
WindowFocusChangedEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API WindowTitleChangedEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
2019-12-21 18:41:16 +08:00
|
|
|
|
String title; ///< <20><><EFBFBD><EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
|
|
|
|
|
|
WindowTitleChangedEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/// \~chinese
|
|
|
|
|
|
/// @brief <20><><EFBFBD>ڹر<DAB9><D8B1>¼<EFBFBD>
|
2019-11-13 11:22:21 +08:00
|
|
|
|
class KGE_API WindowClosedEvent
|
|
|
|
|
|
: public Event
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
WindowClosedEvent();
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2019-12-21 18:41:16 +08:00
|
|
|
|
/** @} */
|
|
|
|
|
|
|
2019-11-13 11:22:21 +08:00
|
|
|
|
}
|