1 /* 2 * Copyright (C) 2017-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 #include "MouseTypes.h" 12 13 #include <stdint.h> 14 15 class TiXmlElement; 16 17 class CMouseTranslator 18 { 19 public: 20 /*! 21 * \brief Translate a keymap element to a key ID 22 */ 23 static uint32_t TranslateCommand(const TiXmlElement* pButton); 24 25 /*! 26 * \brief Translate a mouse event ID to a mouse button index 27 * 28 * \param eventId The event ID from MouseStat.h 29 * \param[out] buttonId The button ID from MouseTypes.h, or unmodified if unsuccessful 30 * 31 * \return True if successful, false otherwise 32 */ 33 static bool TranslateEventID(unsigned int eventId, KODI::MOUSE::BUTTON_ID& buttonId); 34 }; 35