1 /* 2 * Copyright (C) 2018 Team Kodi 3 * This file is part of Kodi - https://kodi.tv 4 * 5 * SPDX-License-Identifier: GPL-2.0-or-later 6 * See LICENSES/README.md for more information. 7 */ 8 9 #pragma once 10 11 namespace KODI 12 { 13 namespace INPUT 14 { 15 /*! 16 * \brief Cardinal directions, used for input device motions 17 */ 18 enum class CARDINAL_DIRECTION 19 { 20 NONE = 0x0, 21 UP = 0x1, 22 DOWN = 0x2, 23 RIGHT = 0x4, 24 LEFT = 0x8, 25 }; 26 27 /*! 28 * \brief Cardinal and intercardinal directions, used for input device motions 29 */ 30 enum class INTERCARDINAL_DIRECTION 31 { 32 NONE = static_cast<unsigned int>(CARDINAL_DIRECTION::NONE), 33 UP = static_cast<unsigned int>(CARDINAL_DIRECTION::UP), 34 DOWN = static_cast<unsigned int>(CARDINAL_DIRECTION::DOWN), 35 RIGHT = static_cast<unsigned int>(CARDINAL_DIRECTION::RIGHT), 36 LEFT = static_cast<unsigned int>(CARDINAL_DIRECTION::LEFT), 37 RIGHTUP = RIGHT | UP, 38 RIGHTDOWN = RIGHT | DOWN, 39 LEFTUP = LEFT | UP, 40 LEFTDOWN = LEFT | DOWN, 41 }; 42 43 const unsigned int HOLD_TRESHOLD = 250; 44 45 } // namespace INPUT 46 } // namespace KODI 47