qmlfrontend/engine_interface.h
changeset 16045 4933920eba89
parent 15921 5b3beb90e1a6
equal deleted inserted replaced
16044:0e90bdfc2642 16045:4933920eba89
    40 
    40 
    41 using simple_event_t = decltype(hwengine::simple_event);
    41 using simple_event_t = decltype(hwengine::simple_event);
    42 using long_event_t = decltype(hwengine::long_event);
    42 using long_event_t = decltype(hwengine::long_event);
    43 using positioned_event_t = decltype(hwengine::positioned_event);
    43 using positioned_event_t = decltype(hwengine::positioned_event);
    44 
    44 
       
    45 }  // extern "C"
       
    46 
       
    47 Q_NAMESPACE
       
    48 
       
    49 /*
    45 using SimpleEventType = hwengine::SimpleEventType;
    50 using SimpleEventType = hwengine::SimpleEventType;
    46 using LongEventType = hwengine::LongEventType;
    51 using LongEventType = hwengine::LongEventType;
    47 using LongEventState = hwengine::LongEventState;
    52 using LongEventState = hwengine::LongEventState;
    48 using PositionedEventType = hwengine::PositionedEventType;
    53 using PositionedEventType = hwengine::PositionedEventType;
       
    54 */
    49 
    55 
    50 }  // extern "C"
    56 // NOTE: have to copy these to be able to register then in Qt meta object system
       
    57 enum class LongEventState {
       
    58   Set,
       
    59   Unset,
       
    60 };
    51 
    61 
    52 Q_NAMESPACE
    62 enum class LongEventType {
       
    63   ArrowUp,
       
    64   ArrowDown,
       
    65   ArrowLeft,
       
    66   ArrowRight,
       
    67   Precision,
       
    68   Attack,
       
    69 };
       
    70 
       
    71 enum class PositionedEventType {
       
    72   CursorMove,
       
    73   CursorClick,
       
    74 };
       
    75 
       
    76 enum class SimpleEventType {
       
    77   SwitchHedgehog,
       
    78   Timer,
       
    79   LongJump,
       
    80   HighJump,
       
    81   Accept,
       
    82   Deny,
       
    83 };
    53 
    84 
    54 Q_ENUM_NS(SimpleEventType)
    85 Q_ENUM_NS(SimpleEventType)
    55 Q_ENUM_NS(LongEventType)
    86 Q_ENUM_NS(LongEventType)
    56 Q_ENUM_NS(LongEventState)
    87 Q_ENUM_NS(LongEventState)
    57 Q_ENUM_NS(PositionedEventType)
    88 Q_ENUM_NS(PositionedEventType)
    58 
    89 
    59 };  // namespace
    90 };  // namespace Engine
    60 
       
    61 Q_DECLARE_METATYPE(Engine::SimpleEventType)
       
    62 Q_DECLARE_METATYPE(Engine::LongEventType)
       
    63 Q_DECLARE_METATYPE(Engine::LongEventState)
       
    64 Q_DECLARE_METATYPE(Engine::PositionedEventType)
       
    65 
    91 
    66 #endif  // ENGINE_H
    92 #endif  // ENGINE_H