From 7a8dcc14ebf39c5d29e9c4b278a28e5b94ebe2c8 Mon Sep 17 00:00:00 2001 From: manuel Date: Wed, 14 Dec 2016 02:26:43 +0100 Subject: remove some left overs --- .../include/kodi/kodi_game_callbacks.h | 161 ------- .../include/kodi/kodi_game_dll.h | 287 ------------ .../include/kodi/kodi_game_types.h | 487 --------------------- .../kodi-addon-dev-kit/include/kodi/libKODI_game.h | 238 ---------- xbmc/input/XBMC_vkeys.h | 286 ------------ 5 files changed, 1459 deletions(-) delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h delete mode 100644 xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h delete mode 100644 xbmc/input/XBMC_vkeys.h (limited to 'xbmc') diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h deleted file mode 100644 index 6057f46..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_callbacks.h +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright (C) 2014-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . - * - */ -#ifndef KODI_GAME_CALLBACKS_H_ -#define KODI_GAME_CALLBACKS_H_ - -#include "kodi_game_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct CB_GameLib -{ - // --- Game callbacks -------------------------------------------------------- - - /*! - * \brief Requests the frontend to stop the current game - */ - void (*CloseGame)(void* addonData); - - /*! - * \brief Create a video stream for pixel data - * - * \param format The type of pixel data accepted by this stream - * \param width The frame width - * \param height The frame height - * \param rotation The rotation (counter-clockwise) of the video frames - * - * \return 0 on success or -1 if a video stream is already created - */ - int (*OpenPixelStream)(void* addonData, GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation); - - /*! - * \brief Create a video stream for encoded video data - * - * \param codec The video format accepted by this stream - * - * \return 0 on success or -1 if a video stream is already created - */ - int (*OpenVideoStream)(void* addonData, GAME_VIDEO_CODEC codec); - - /*! - * \brief Create an audio stream for PCM audio data - * - * \param format The type of audio data accepted by this stream - * \param channel_map The channel layout terminated by GAME_CH_NULL - * - * \return 0 on success or -1 if an audio stream is already created - */ - int (*OpenPCMStream)(void* addonData, GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map); - - /*! - * \brief Create an audio stream for encoded audio data - * - * \param codec The audio format accepted by this stream - * \param channel_map The channel layout terminated by GAME_CH_NULL - * - * \return 0 on success or -1 if an audio stream is already created - */ - int(*OpenAudioStream)(void* addonData, GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map); - - /*! - * \brief Add a data packet to an audio or video stream - * - * \param stream The target stream - * \param data The data packet - * \param size The size of the data - */ - void (*AddStreamData)(void* addonData, GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size); - - /*! - * \brief Free the specified stream - * - * \param stream The stream to close - */ - void (*CloseStream)(void* addonData, GAME_STREAM_TYPE stream); - - // -- Hardware rendering callbacks ------------------------------------------- - - /*! - * \brief Enable hardware rendering - * - * \param hw_info A struct of properties for the hardware rendering system - */ - void (*EnableHardwareRendering)(void* addonData, const game_hw_info* hw_info); - - /*! - * \brief Get the framebuffer for rendering - * - * \return The framebuffer - */ - uintptr_t (*HwGetCurrentFramebuffer)(void* addonData); - - /*! - * \brief Get a symbol from the hardware context - * - * \param symbol The symbol's name - * - * \return A function pointer for the specified symbol - */ - game_proc_address_t (*HwGetProcAddress)(void* addonData, const char* symbol); - - /*! - * \brief Called when a frame is being rendered - */ - void (*RenderFrame)(void* addonData); - - // --- Input callbacks ------------------------------------------------------- - - /*! - * \brief Begin reporting events for the specified joystick port - * - * \param port The zero-indexed port number - * - * \return true if the port was opened, false otherwise - */ - bool (*OpenPort)(void* addonData, unsigned int port); - - /*! - * \brief End reporting events for the specified port - * - * \param port The port number passed to OpenPort() - */ - void (*ClosePort)(void* addonData, unsigned int port); - - /*! - * \brief Notify the port of an input event - * - * \param event The input event - * - * Input events can arrive for the following sources: - * - GAME_INPUT_EVENT_MOTOR - * - * \return true if the event was handled, false otherwise - */ - bool (*InputEvent)(void* addonData, const game_input_event* event); - -} CB_GameLib; - -#ifdef __cplusplus -} -#endif - -#endif // KODI_GAME_CALLBACKS_H_ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h deleted file mode 100644 index 247f24b..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_dll.h +++ /dev/null @@ -1,287 +0,0 @@ -/* - * Copyright (C) 2014-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . - * - */ -#ifndef KODI_GAME_DLL_H_ -#define KODI_GAME_DLL_H_ - -#include "kodi_game_types.h" - -#ifdef __cplusplus -extern "C" { -#endif - -// --- Game API operations ----------------------------------------------------- - -/*! - * \brief Return GAME_API_VERSION_STRING - * - * The add-on is backwards compatible with the frontend if this API version is - * is at least the frontend's minimum API version. - * - * \return Must be GAME_API_VERSION_STRING - */ -const char* GetGameAPIVersion(void); - -/*! - * \brief Return GAME_MIN_API_VERSION_STRING - * - * The add-on is forwards compatible with the frontend if this minimum version - * is no more than the frontend's API version. - * - * \return Must be GAME_MIN_API_VERSION_STRING - */ -const char* GetMininumGameAPIVersion(void); - -// --- Game operations --------------------------------------------------------- - -/*! - * \brief Load a game - * - * \param url The URL to load - * - * return the error, or GAME_ERROR_NO_ERROR if the game was loaded - */ -GAME_ERROR LoadGame(const char* url); - -/*! - * \brief Load a game that requires multiple files - * - * \param type The game stype - * \param urls An array of urls - * \param urlCount The number of urls in the array - * - * \return the error, or GAME_ERROR_NO_ERROR if the game was loaded - */ -GAME_ERROR LoadGameSpecial(SPECIAL_GAME_TYPE type, const char** urls, size_t urlCount); - -/*! - * \brief Begin playing without a game file - * - * If the add-on supports standalone mode, it must add the - * tag to the extension point in addon.xml: - * - * false - * - * \return the error, or GAME_ERROR_NO_ERROR if the game add-on was loaded - */ -GAME_ERROR LoadStandalone(void); - -/*! - * \brief Unload the current game - * - * \return the error, or GAME_ERROR_NO_ERROR if the game was unloaded - */ -/*! Unloads a currently loaded game */ -GAME_ERROR UnloadGame(void); - -/*! - * \brief Get information about the loaded game - * - * \param info The info structure to fill - * - * \return the error, or GAME_ERROR_NO_ERROR if info was filled - */ -GAME_ERROR GetGameInfo(game_system_av_info* info); - -/*! - * \brief Get region of the loaded game - * - * \return the region, or GAME_REGION_UNKNOWN if unknown or no game is loaded - */ -GAME_REGION GetRegion(void); - -/*! - * \brief Return true if the client requires the frontend to provide a game loop - * - * The game loop is a thread that calls RunFrame() in a loop at a rate - * determined by the playback speed and the client's FPS. - * - * \return true if the frontend should provide a game loop, false otherwise - */ -bool RequiresGameLoop(void); - -/*! - * \brief Run a single frame for add-ons that use a game loop - * - * \return the error, or GAME_ERROR_NO_ERROR if there was no error - */ -GAME_ERROR RunFrame(void); - -/*! - * \brief Reset the current game - * - * \return the error, or GAME_ERROR_NO_ERROR if the game was reset - */ -GAME_ERROR Reset(void); - -// --- Hardware rendering operations ------------------------------------------- - -/*! - * \brief Invalidates the current HW context and reinitializes GPU resources - * - * Any GL state is lost, and must not be deinitialized explicitly. - * - * \return the error, or GAME_ERROR_NO_ERROR if the HW context was reset - */ -GAME_ERROR HwContextReset(void); - -/*! - * \brief Called before the context is destroyed - * - * Resources can be deinitialized at this step. - * - * \return the error, or GAME_ERROR_NO_ERROR if the HW context was destroyed - */ -GAME_ERROR HwContextDestroy(void); - -// --- Input operations -------------------------------------------------------- - -/*! - * \brief Notify the add-on of a status change on an open port - * - * Ports can be opened using the OpenPort() callback - * - * \param port Non-negative for a joystick port, or GAME_INPUT_PORT value otherwise - * \param collected True if a controller was connected, false if disconnected - * \param controller The connected controller - */ -void UpdatePort(int port, bool connected, const game_controller* controller); - -/*! - * \brief Check if input is accepted for a feature on the controller - * - * If only a subset of the controller profile is used, this can return false - * for unsupported features to not absorb their input. - * - * If the entire controller profile is used, this should always return true. - * - * \param controller_id The ID of the controller profile - * \param feature_name The name of a feature in that profile - * \return true if input is accepted for the feature, false otherwise - */ -bool HasFeature(const char* controller_id, const char* feature_name); - -/*! - * \brief Notify the add-on of an input event - * - * \param event The input event - * - * \return true if the event was handled, false otherwise - */ -bool InputEvent(const game_input_event* event); - -// --- Serialization operations ------------------------------------------------ - -/*! - * \brief Get the number of bytes required to serialize the game - * - * \return the number of bytes, or 0 if serialization is not supported - */ -size_t SerializeSize(void); - -/*! - * \brief Serialize the state of the game - * - * \param data The buffer receiving the serialized game data - * \param size The size of the buffer - * - * \return the error, or GAME_ERROR_NO_ERROR if the game was serialized into the buffer - */ -GAME_ERROR Serialize(uint8_t* data, size_t size); - -/*! - * \brief Deserialize the game from the given state - * - * \param data A buffer containing the game's new state - * \param size The size of the buffer - * - * \return the error, or GAME_ERROR_NO_ERROR if the game deserialized - */ -GAME_ERROR Deserialize(const uint8_t* data, size_t size); - -// --- Cheat operations -------------------------------------------------------- - -/*! - * \brief Reset the cheat system - * - * \return the error, or GAME_ERROR_NO_ERROR if the cheat system was reset - */ -GAME_ERROR CheatReset(void); - -/*! - * \brief Get a region of memory - * - * \param type The type of memory to retrieve - * \param data Set to the region of memory; must remain valid until UnloadGame() is called - * \param size Set to the size of the region of memory - * - * \return the error, or GAME_ERROR_NO_ERROR if data was set to a valid buffer - */ -GAME_ERROR GetMemory(GAME_MEMORY type, const uint8_t** data, size_t* size); - -/*! - * \brief Set a cheat code - * - * \param index - * \param enabled - * \param code - * - * \return the error, or GAME_ERROR_NO_ERROR if the cheat was set - */ -GAME_ERROR SetCheat(unsigned int index, bool enabled, const char* code); - -// --- Add-on helper implementation -------------------------------------------- - -/*! - * \brief Called by Kodi to assign the function pointers of this add-on to pClient - * - * Note that get_addon() is defined here, so it will be available in all - * compiled game clients. - */ -void __declspec(dllexport) get_addon(GameClient* pClient) -{ - pClient->GetGameAPIVersion = GetGameAPIVersion; - pClient->GetMininumGameAPIVersion = GetMininumGameAPIVersion; - pClient->LoadGame = LoadGame; - pClient->LoadGameSpecial = LoadGameSpecial; - pClient->LoadStandalone = LoadStandalone; - pClient->UnloadGame = UnloadGame; - pClient->GetGameInfo = GetGameInfo; - pClient->GetRegion = GetRegion; - pClient->RequiresGameLoop = RequiresGameLoop; - pClient->RunFrame = RunFrame; - pClient->Reset = Reset; - pClient->HwContextReset = HwContextReset; - pClient->HwContextDestroy = HwContextDestroy; - pClient->UpdatePort = UpdatePort; - pClient->HasFeature = HasFeature; - pClient->InputEvent = InputEvent; - pClient->SerializeSize = SerializeSize; - pClient->Serialize = Serialize; - pClient->Deserialize = Deserialize; - pClient->CheatReset = CheatReset; - pClient->GetMemory = GetMemory; - pClient->SetCheat = SetCheat; -} - -#ifdef __cplusplus -} -#endif - -#endif // KODI_GAME_DLL_H_ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h deleted file mode 100644 index fa2762d..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/kodi_game_types.h +++ /dev/null @@ -1,487 +0,0 @@ -/* - * Copyright (C) 2014-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . - * - */ -#ifndef KODI_GAME_TYPES_H_ -#define KODI_GAME_TYPES_H_ - -/* current game API version */ -#define GAME_API_VERSION "1.0.28" - -/* min. game API version */ -#define GAME_MIN_API_VERSION "1.0.28" - -#include -#include - -#ifdef TARGET_WINDOWS - #include -#else - #ifndef __cdecl - #define __cdecl - #endif - #ifndef __declspec - #define __declspec(X) - #endif -#endif - -#undef ATTRIBUTE_PACKED -#undef PRAGMA_PACK_BEGIN -#undef PRAGMA_PACK_END - -#if defined(__GNUC__) - #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) - #define ATTRIBUTE_PACKED __attribute__ ((packed)) - #define PRAGMA_PACK 0 - #endif -#endif - -#if !defined(ATTRIBUTE_PACKED) - #define ATTRIBUTE_PACKED - #define PRAGMA_PACK 1 -#endif - -#ifdef BUILD_KODI_ADDON -#include "XBMC_vkeys.h" -#else -#include "input/XBMC_vkeys.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/*! Game add-on error codes */ -typedef enum GAME_ERROR -{ - GAME_ERROR_NO_ERROR, // no error occurred - GAME_ERROR_UNKNOWN, // an unknown error occurred - GAME_ERROR_NOT_IMPLEMENTED, // the method that the frontend called is not implemented - GAME_ERROR_REJECTED, // the command was rejected by the game client - GAME_ERROR_INVALID_PARAMETERS, // the parameters of the method that was called are invalid for this operation - GAME_ERROR_FAILED, // the command failed - GAME_ERROR_NOT_LOADED, // no game is loaded - GAME_ERROR_RESTRICTED, // game requires restricted resources -} GAME_ERROR; - -typedef enum GAME_STREAM_TYPE -{ - GAME_STREAM_UNKNOWN, - GAME_STREAM_AUDIO, - GAME_STREAM_VIDEO, -} GAME_STREAM_TYPE; - -typedef enum GAME_PIXEL_FORMAT -{ - GAME_PIXEL_FORMAT_UNKNOWN, - GAME_PIXEL_FORMAT_YUV420P, - GAME_PIXEL_FORMAT_0RGB8888, - GAME_PIXEL_FORMAT_RGB565, - GAME_PIXEL_FORMAT_0RGB1555, -} GAME_PIXEL_FORMAT; - -typedef enum GAME_VIDEO_CODEC -{ - GAME_VIDEO_CODEC_UNKNOWN, - GAME_VIDEO_CODEC_H264, - GAME_VIDEO_CODEC_THEORA, -} GAME_VIDEO_CODEC; - -typedef enum GAME_VIDEO_ROTATION // Counter-clockwise -{ - GAME_VIDEO_ROTATION_0, - GAME_VIDEO_ROTATION_90, - GAME_VIDEO_ROTATION_180, - GAME_VIDEO_ROTATION_270, -} GAME_VIDEO_ROTATION; - -typedef enum GAME_PCM_FORMAT -{ - GAME_PCM_FORMAT_UNKNOWN, - GAME_PCM_FORMAT_S16NE, -} GAME_PCM_FORMAT; - -typedef enum GAME_AUDIO_CODEC -{ - GAME_AUDIO_CODEC_UNKNOWN, - GAME_AUDIO_CODEC_OPUS, -} GAME_AUDIO_CODEC; - -typedef enum GAME_AUDIO_CHANNEL -{ - GAME_CH_NULL, // Channel list terminator - GAME_CH_FL, - GAME_CH_FR, - GAME_CH_FC, - GAME_CH_LFE, - GAME_CH_BL, - GAME_CH_BR, - GAME_CH_FLOC, - GAME_CH_FROC, - GAME_CH_BC, - GAME_CH_SL, - GAME_CH_SR, - GAME_CH_TFL, - GAME_CH_TFR, - GAME_CH_TFC, - GAME_CH_TC, - GAME_CH_TBL, - GAME_CH_TBR, - GAME_CH_TBC, - GAME_CH_BLOC, - GAME_CH_BROC, -} GAME_AUDIO_CHANNEL; - -// TODO -typedef enum GAME_HW_FRAME_BUFFER -{ - GAME_HW_FRAME_BUFFER_VALID, // Pass this to game_video_refresh if rendering to hardware - GAME_HW_FRAME_BUFFER_DUPLICATE, // Passing NULL to game_video_refresh is still a frame dupe as normal - GAME_HW_FRAME_BUFFER_RENDER, -} GAME_HW_FRAME_BUFFER; - -typedef enum GAME_HW_CONTEXT_TYPE -{ - GAME_HW_CONTEXT_NONE, - GAME_HW_CONTEXT_OPENGL, // OpenGL 2.x. Latest version available before 3.x+. Driver can choose to use latest compatibility context - GAME_HW_CONTEXT_OPENGLES2, // GLES 2.0 - GAME_HW_CONTEXT_OPENGL_CORE, // Modern desktop core GL context. Use major/minor fields to set GL version - GAME_HW_CONTEXT_OPENGLES3, // GLES 3.0 -} GAME_HW_CONTEXT_TYPE; - -typedef enum GAME_INPUT_PORT -{ - GAME_INPUT_PORT_JOYSTICK_START = 0, // Non-negative values are for joystick ports - GAME_INPUT_PORT_KEYBOARD = -1, - GAME_INPUT_PORT_MOUSE = -2, -} GAME_INPUT_PORT; - -typedef enum GAME_INPUT_EVENT_SOURCE -{ - GAME_INPUT_EVENT_DIGITAL_BUTTON, - GAME_INPUT_EVENT_ANALOG_BUTTON, - GAME_INPUT_EVENT_ANALOG_STICK, - GAME_INPUT_EVENT_ACCELEROMETER, - GAME_INPUT_EVENT_KEY, - GAME_INPUT_EVENT_RELATIVE_POINTER, - GAME_INPUT_EVENT_ABSOLUTE_POINTER, - GAME_INPUT_EVENT_MOTOR, -} GAME_INPUT_EVENT_SOURCE; - -typedef enum GAME_KEY_MOD -{ - GAME_KEY_MOD_NONE = 0x00, - - GAME_KEY_MOD_SHIFT = 0x01, - GAME_KEY_MOD_CTRL = 0x02, - GAME_KEY_MOD_ALT = 0x04, - GAME_KEY_MOD_RALT = 0x08, - GAME_KEY_MOD_META = 0x10, - - GAME_KEY_MOD_NUMLOCK = 0x20, - GAME_KEY_MOD_CAPSLOCK = 0x40, - GAME_KEY_MOD_SCROLLOCK = 0x80, -} GAME_KEY_MOD; - -/*! Returned from game_get_region() */ -typedef enum GAME_REGION -{ - GAME_REGION_UNKNOWN, - GAME_REGION_NTSC, - GAME_REGION_PAL, -} GAME_REGION; - -/*! -* Special game types passed into game_load_game_special(). Only used when -* multiple ROMs are required. -*/ -typedef enum SPECIAL_GAME_TYPE -{ - SPECIAL_GAME_TYPE_BSX, - SPECIAL_GAME_TYPE_BSX_SLOTTED, - SPECIAL_GAME_TYPE_SUFAMI_TURBO, - SPECIAL_GAME_TYPE_SUPER_GAME_BOY, -} SPECIAL_GAME_TYPE; - -typedef enum GAME_MEMORY -{ - /*! - * Passed to game_get_memory_data/size(). If the memory type doesn't apply - * to the implementation NULL/0 can be returned. - */ - GAME_MEMORY_MASK = 0xff, - - /*! - * Regular save ram. This ram is usually found on a game cartridge, backed - * up by a battery. If save game data is too complex for a single memory - * buffer, the SYSTEM_DIRECTORY environment callback can be used. - */ - GAME_MEMORY_SAVE_RAM = 0, - - /*! - * Some games have a built-in clock to keep track of time. This memory is - * usually just a couple of bytes to keep track of time. - */ - GAME_MEMORY_RTC = 1, - - /*! System ram lets a frontend peek into a game systems main RAM */ - GAME_MEMORY_SYSTEM_RAM = 2, - - /*! Video ram lets a frontend peek into a game systems video RAM (VRAM) */ - GAME_MEMORY_VIDEO_RAM = 3, - - /*! Special memory types */ - GAME_MEMORY_SNES_BSX_RAM = ((1 << 8) | GAME_MEMORY_SAVE_RAM), - GAME_MEMORY_SNES_BSX_PRAM = ((2 << 8) | GAME_MEMORY_SAVE_RAM), - GAME_MEMORY_SNES_SUFAMI_TURBO_A_RAM= ((3 << 8) | GAME_MEMORY_SAVE_RAM), - GAME_MEMORY_SNES_SUFAMI_TURBO_B_RAM= ((4 << 8) | GAME_MEMORY_SAVE_RAM), - GAME_MEMORY_SNES_GAME_BOY_RAM = ((5 << 8) | GAME_MEMORY_SAVE_RAM), - GAME_MEMORY_SNES_GAME_BOY_RTC = ((6 << 8) | GAME_MEMORY_RTC), -} GAME_MEMORY; - -/*! ID values for SIMD CPU features */ -typedef enum GAME_SIMD -{ - GAME_SIMD_SSE = (1 << 0), - GAME_SIMD_SSE2 = (1 << 1), - GAME_SIMD_VMX = (1 << 2), - GAME_SIMD_VMX128 = (1 << 3), - GAME_SIMD_AVX = (1 << 4), - GAME_SIMD_NEON = (1 << 5), - GAME_SIMD_SSE3 = (1 << 6), - GAME_SIMD_SSSE3 = (1 << 7), - GAME_SIMD_MMX = (1 << 8), - GAME_SIMD_MMXEXT = (1 << 9), - GAME_SIMD_SSE4 = (1 << 10), - GAME_SIMD_SSE42 = (1 << 11), - GAME_SIMD_AVX2 = (1 << 12), - GAME_SIMD_VFPU = (1 << 13), -} GAME_SIMD; - -typedef enum GAME_ROTATION -{ - GAME_ROTATION_0_CW, - GAME_ROTATION_90_CW, - GAME_ROTATION_180_CW, - GAME_ROTATION_270_CW, -} GAME_ROTATION; - -typedef struct game_controller -{ - const char* controller_id; - unsigned int digital_button_count; - unsigned int analog_button_count; - unsigned int analog_stick_count; - unsigned int accelerometer_count; - unsigned int key_count; - unsigned int rel_pointer_count; - unsigned int abs_pointer_count; - unsigned int motor_count; -} ATTRIBUTE_PACKED game_controller; - -typedef struct game_digital_button_event -{ - bool pressed; -} ATTRIBUTE_PACKED game_digital_button_event; - -typedef struct game_analog_button_event -{ - float magnitude; -} ATTRIBUTE_PACKED game_analog_button_event; - -typedef struct game_analog_stick_event -{ - float x; - float y; -} ATTRIBUTE_PACKED game_analog_stick_event; - -typedef struct game_accelerometer_event -{ - float x; - float y; - float z; -} ATTRIBUTE_PACKED game_accelerometer_event; - -typedef struct game_key_event -{ - bool pressed; - XBMCVKey character; - GAME_KEY_MOD modifiers; -} ATTRIBUTE_PACKED game_key_event; - -typedef struct game_rel_pointer_event -{ - int x; - int y; -} ATTRIBUTE_PACKED game_rel_pointer_event; - -typedef struct game_abs_pointer_event -{ - bool pressed; - float x; - float y; -} ATTRIBUTE_PACKED game_abs_pointer_event; - -typedef struct game_motor_event -{ - float magnitude; -} ATTRIBUTE_PACKED game_motor_event; - -typedef struct game_input_event -{ - GAME_INPUT_EVENT_SOURCE type; - int port; - const char* controller_id; - const char* feature_name; - union - { - struct game_digital_button_event digital_button; - struct game_analog_button_event analog_button; - struct game_analog_stick_event analog_stick; - struct game_accelerometer_event accelerometer; - struct game_key_event key; - struct game_rel_pointer_event rel_pointer; - struct game_abs_pointer_event abs_pointer; - struct game_motor_event motor; - }; -} ATTRIBUTE_PACKED game_input_event; - -struct game_geometry -{ - unsigned base_width; // Nominal video width of game - unsigned base_height; // Nominal video height of game - unsigned max_width; // Maximum possible width of game - unsigned max_height; // Maximum possible height of game - float aspect_ratio; // Nominal aspect ratio of game. If aspect_ratio is <= 0.0, - // an aspect ratio of base_width / base_height is assumed. - // A frontend could override this setting if desired. -}; - -struct game_system_timing -{ - double fps; // FPS of video content. - double sample_rate; // Sampling rate of audio. -}; - -struct game_system_av_info -{ - struct game_geometry geometry; - struct game_system_timing timing; -}; - -typedef void (*game_proc_address_t)(void); - -struct game_hw_info -{ - GAME_HW_CONTEXT_TYPE context_type; // Which API to use. Set by game client - bool depth; // Set if render buffers should have depth component attached - bool stencil; // Set if stencil buffers should be attached - // If depth and stencil are true, a packed 24/8 buffer will be added. Only attaching stencil is invalid and will be ignored - bool bottom_left_origin; // Use conventional bottom-left origin convention. Is false, standard top-left origin semantics are used - unsigned version_major; // Major version number for core GL context - unsigned version_minor; // Minor version number for core GL context - bool cache_context; // If this is true, the frontend will go very far to avoid resetting context in scenarios like toggling fullscreen, etc. - // The reset callback might still be called in extreme situations such as if the context is lost beyond recovery - // For optimal stability, set this to false, and allow context to be reset at any time - bool debug_context; // Creates a debug context -}; - -/*! Properties passed to the ADDON_Create() method of a game client */ -typedef struct game_client_properties -{ - /*! - * The path of the game client being loaded. - */ - const char* game_client_dll_path; - - /*! - * Paths to proxy DLLs used to load the game client. - */ - const char** proxy_dll_paths; - - /*! - * Number of proxy DLL paths provided. - */ - unsigned int proxy_dll_count; - - /*! - * The "system" directories of the frontend. These directories can be used to - * store system-specific ROMs such as BIOSes, configuration data, etc. - */ - const char** resource_directories; - - /*! - * Number of resource directories provided - */ - unsigned int resource_directory_count; - - /*! - * The writable directory of the frontend. This directory can be used to store - * SRAM, memory cards, high scores, etc, if the game client cannot use the - * regular memory interface, GetMemoryData(). - */ - const char* profile_directory; - - /*! - * The value of the property from addon.xml - */ - bool supports_vfs; - - /*! - * The extensions in the property from addon.xml - */ - const char** extensions; - - /*! - * Number of extensions provided - */ - unsigned int extension_count; -} game_client_properties; - -/*! Structure to transfer the methods from kodi_game_dll.h to Kodi */ -typedef struct GameClient -{ - const char* (__cdecl* GetGameAPIVersion)(void); - const char* (__cdecl* GetMininumGameAPIVersion)(void); - GAME_ERROR (__cdecl* LoadGame)(const char*); - GAME_ERROR (__cdecl* LoadGameSpecial)(SPECIAL_GAME_TYPE, const char**, size_t); - GAME_ERROR (__cdecl* LoadStandalone)(void); - GAME_ERROR (__cdecl* UnloadGame)(void); - GAME_ERROR (__cdecl* GetGameInfo)(game_system_av_info*); - GAME_REGION (__cdecl* GetRegion)(void); - bool (__cdecl* RequiresGameLoop)(void); - GAME_ERROR (__cdecl* RunFrame)(void); - GAME_ERROR (__cdecl* Reset)(void); - GAME_ERROR (__cdecl* HwContextReset)(void); - GAME_ERROR (__cdecl* HwContextDestroy)(void); - void (__cdecl* UpdatePort)(int, bool, const game_controller*); - bool (__cdecl* HasFeature)(const char* controller_id, const char* feature_name); - bool (__cdecl* InputEvent)(const game_input_event*); - size_t (__cdecl* SerializeSize)(void); - GAME_ERROR (__cdecl* Serialize)(uint8_t*, size_t); - GAME_ERROR (__cdecl* Deserialize)(const uint8_t*, size_t); - GAME_ERROR (__cdecl* CheatReset)(void); - GAME_ERROR (__cdecl* GetMemory)(GAME_MEMORY, const uint8_t**, size_t*); - GAME_ERROR (__cdecl* SetCheat)(unsigned int, bool, const char*); -} GameClient; - -#ifdef __cplusplus -} -#endif - -#endif // KODI_GAME_TYPES_H_ diff --git a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h b/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h deleted file mode 100644 index b5a46dd..0000000 --- a/xbmc/addons/kodi-addon-dev-kit/include/kodi/libKODI_game.h +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (C) 2014-2016 Team Kodi - * http://kodi.tv - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this Program; see the file COPYING. If not, see - * . - * - */ -#pragma once - -#include "libXBMC_addon.h" -#include "kodi_game_callbacks.h" - -#include -#include - -#if defined(ANDROID) - #include -#endif - -#ifdef _WIN32 - #define GAME_HELPER_DLL "\\library.kodi.game\\libKODI_game" ADDON_HELPER_EXT -#else - #define GAME_HELPER_DLL_NAME "libKODI_game-" ADDON_HELPER_ARCH ADDON_HELPER_EXT - #define GAME_HELPER_DLL "/library.kodi.game/" GAME_HELPER_DLL_NAME -#endif - -#define GAME_REGISTER_SYMBOL(dll, functionPtr) \ - CHelper_libKODI_game::RegisterSymbol(dll, functionPtr, #functionPtr) - -class CHelper_libKODI_game -{ -public: - CHelper_libKODI_game(void) : - GAME_register_me(nullptr), - GAME_unregister_me(nullptr), - GAME_close_game(nullptr), - GAME_open_pixel_stream(nullptr), - GAME_open_video_stream(nullptr), - GAME_open_pcm_stream(nullptr), - GAME_open_audio_stream(nullptr), - GAME_add_stream_data(nullptr), - GAME_close_stream(nullptr), - GAME_enable_hardware_rendering(nullptr), - GAME_hw_get_current_framebuffer(nullptr), - GAME_hw_get_proc_address(nullptr), - GAME_render_frame(nullptr), - GAME_open_port(nullptr), - GAME_close_port(nullptr), - GAME_input_event(nullptr), - m_handle(nullptr), - m_callbacks(nullptr), - m_libKODI_game(nullptr) - { - } - - ~CHelper_libKODI_game(void) - { - if (m_libKODI_game) - { - GAME_unregister_me(m_handle, m_callbacks); - dlclose(m_libKODI_game); - } - } - - template - static bool RegisterSymbol(void* dll, T& functionPtr, const char* strFunctionPtr) - { - return (functionPtr = (T)dlsym(dll, strFunctionPtr)) != NULL; - } - - /*! - * @brief Resolve all callback methods - * @param handle Pointer to the add-on - * @return True when all methods were resolved, false otherwise. - */ - bool RegisterMe(void* handle) - { - m_handle = handle; - - std::string libBasePath; - libBasePath = ((cb_array*)m_handle)->libBasePath; - libBasePath += GAME_HELPER_DLL; - -#if defined(ANDROID) - struct stat st; - if (stat(libBasePath.c_str(),&st) != 0) - { - std::string tempbin = getenv("XBMC_ANDROID_LIBS"); - libBasePath = tempbin + "/" + GAME_HELPER_DLL_NAME; - } -#endif - - m_libKODI_game = dlopen(libBasePath.c_str(), RTLD_LAZY); - if (m_libKODI_game == NULL) - { - fprintf(stderr, "Unable to load %s\n", dlerror()); - return false; - } - - try - { - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_register_me)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_unregister_me)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_close_game)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_open_pixel_stream)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_open_video_stream)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_open_pcm_stream)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_open_audio_stream)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_add_stream_data)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_close_stream)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_enable_hardware_rendering)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_hw_get_current_framebuffer)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_hw_get_proc_address)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_render_frame)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_open_port)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_close_port)) throw false; - if (!GAME_REGISTER_SYMBOL(m_libKODI_game, GAME_input_event)) throw false; - } - catch (const bool& bSuccess) - { - fprintf(stderr, "ERROR: Unable to assign function %s\n", dlerror()); - return bSuccess; - } - - m_callbacks = GAME_register_me(m_handle); - return m_callbacks != NULL; - } - - void CloseGame(void) - { - return GAME_close_game(m_handle, m_callbacks); - } - - bool OpenPixelStream(GAME_PIXEL_FORMAT format, unsigned int width, unsigned int height, GAME_VIDEO_ROTATION rotation) - { - return GAME_open_pixel_stream(m_handle, m_callbacks, format, width, height, rotation) == 0; - } - - bool OpenVideoStream(GAME_VIDEO_CODEC codec) - { - return GAME_open_video_stream(m_handle, m_callbacks, codec) == 0; - } - - bool OpenPCMStream(GAME_PCM_FORMAT format, const GAME_AUDIO_CHANNEL* channel_map) - { - return GAME_open_pcm_stream(m_handle, m_callbacks, format, channel_map) == 0; - } - - bool OpenAudioStream(GAME_AUDIO_CODEC codec, const GAME_AUDIO_CHANNEL* channel_map) - { - return GAME_open_audio_stream(m_handle, m_callbacks, codec, channel_map) == 0; - } - - void AddStreamData(GAME_STREAM_TYPE stream, const uint8_t* data, unsigned int size) - { - GAME_add_stream_data(m_handle, m_callbacks, stream, data, size); - } - - void CloseStream(GAME_STREAM_TYPE stream) - { - GAME_close_stream(m_handle, m_callbacks, stream); - } - - void EnableHardwareRendering(const struct game_hw_info* hw_info) - { - return GAME_enable_hardware_rendering(m_handle, m_callbacks, hw_info); - } - - uintptr_t HwGetCurrentFramebuffer(void) - { - return GAME_hw_get_current_framebuffer(m_handle, m_callbacks); - } - - game_proc_address_t HwGetProcAddress(const char* sym) - { - return GAME_hw_get_proc_address(m_handle, m_callbacks, sym); - } - - void RenderFrame() - { - return GAME_render_frame(m_handle, m_callbacks); - } - - bool OpenPort(unsigned int port) - { - return GAME_open_port(m_handle, m_callbacks, port); - } - - void ClosePort(unsigned int port) - { - return GAME_close_port(m_handle, m_callbacks, port); - } - - bool InputEvent(const game_input_event& event) - { - return GAME_input_event(m_handle, m_callbacks, &event); - } - -protected: - CB_GameLib* (*GAME_register_me)(void* handle); - void (*GAME_unregister_me)(void* handle, CB_GameLib* cb); - void (*GAME_close_game)(void* handle, CB_GameLib* cb); - int (*GAME_open_pixel_stream)(void* handle, CB_GameLib* cb, GAME_PIXEL_FORMAT, unsigned int, unsigned int, GAME_VIDEO_ROTATION); - int (*GAME_open_video_stream)(void* handle, CB_GameLib* cb, GAME_VIDEO_CODEC); - int (*GAME_open_pcm_stream)(void* handle, CB_GameLib* cb, GAME_PCM_FORMAT, const GAME_AUDIO_CHANNEL*); - int (*GAME_open_audio_stream)(void* handle, CB_GameLib* cb, GAME_AUDIO_CODEC, const GAME_AUDIO_CHANNEL*); - int (*GAME_add_stream_data)(void* handle, CB_GameLib* cb, GAME_STREAM_TYPE, const uint8_t*, unsigned int); - int (*GAME_close_stream)(void* handle, CB_GameLib* cb, GAME_STREAM_TYPE); - void (*GAME_enable_hardware_rendering)(void* handle, CB_GameLib* cb, const struct game_hw_info*); - uintptr_t (*GAME_hw_get_current_framebuffer)(void* handle, CB_GameLib* cb); - game_proc_address_t (*GAME_hw_get_proc_address)(void* handle, CB_GameLib* cb, const char*); - void (*GAME_render_frame)(void* handle, CB_GameLib* cb); - bool (*GAME_open_port)(void* handle, CB_GameLib* cb, unsigned int); - void (*GAME_close_port)(void* handle, CB_GameLib* cb, unsigned int); - bool (*GAME_input_event)(void* handle, CB_GameLib* cb, const game_input_event* event); - -private: - void* m_handle; - CB_GameLib* m_callbacks; - void* m_libKODI_game; - - struct cb_array - { - const char* libBasePath; - }; -}; diff --git a/xbmc/input/XBMC_vkeys.h b/xbmc/input/XBMC_vkeys.h deleted file mode 100644 index 4e3787c..0000000 --- a/xbmc/input/XBMC_vkeys.h +++ /dev/null @@ -1,286 +0,0 @@ -/* - SDL - Simple DirectMedia Layer - Copyright (C) 1997-2009 Sam Lantinga - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU General Public License - along with XBMC; see the file COPYING. If not, see - . - - Sam Lantinga - slouken@libsdl.org -*/ - -#ifndef XBMC_vkeys_h -#define XBMC_vkeys_h - -// The XBMC_vkey identifies a key that is mapped to an action or function. -// The keysym.sym generated by SDL_KEYDOWN is mapped to a vkey and the vkey -// is used to lookup an action in the global mapping table. -// The vkey values are the ASCII code of the character where this is possible. -// Non-printing keypresses get a value in the range 0x80 - 0xFF. -// Note that the vkey is a byte value so it cannot be greater than 0xFF. - -typedef enum { - XBMCVK_BACK = 0x08, - XBMCVK_TAB = 0x09, - XBMCVK_RETURN = 0x0D, - XBMCVK_ESCAPE = 0x1B, - - XBMCVK_SPACE = 0x20, - XBMCVK_EXCLAIM = 0x21, - XBMCVK_QUOTEDBL = 0x22, - XBMCVK_HASH = 0x23, - XBMCVK_DOLLAR = 0x24, - XBMCVK_PERCENT = 0x25, - XBMCVK_AMPERSAND = 0x26, - XBMCVK_QUOTE = 0x27, - XBMCVK_LEFTPAREN = 0x28, - XBMCVK_RIGHTPAREN = 0x29, - XBMCVK_ASTERISK = 0x2A, - XBMCVK_PLUS = 0x2B, - XBMCVK_COMMA = 0x2C, - XBMCVK_MINUS = 0x2D, - XBMCVK_PERIOD = 0x2E, - XBMCVK_SLASH = 0x2F, - - XBMCVK_0 = 0x30, - XBMCVK_1 = 0x31, - XBMCVK_2 = 0x32, - XBMCVK_3 = 0x33, - XBMCVK_4 = 0x34, - XBMCVK_5 = 0x35, - XBMCVK_6 = 0x36, - XBMCVK_7 = 0x37, - XBMCVK_8 = 0x38, - XBMCVK_9 = 0x39, - - XBMCVK_COLON = 0x3A, - XBMCVK_SEMICOLON = 0x3B, - XBMCVK_LESS = 0x3C, - XBMCVK_EQUALS = 0x3D, - XBMCVK_GREATER = 0x3E, - XBMCVK_QUESTION = 0x3F, - XBMCVK_AT = 0x40, - - XBMCVK_A = 0x41, - XBMCVK_B = 0x42, - XBMCVK_C = 0x43, - XBMCVK_D = 0x44, - XBMCVK_E = 0x45, - XBMCVK_F = 0x46, - XBMCVK_G = 0x47, - XBMCVK_H = 0x48, - XBMCVK_I = 0x49, - XBMCVK_J = 0x4A, - XBMCVK_K = 0x4B, - XBMCVK_L = 0x4C, - XBMCVK_M = 0x4D, - XBMCVK_N = 0x4E, - XBMCVK_O = 0x4F, - XBMCVK_P = 0x50, - XBMCVK_Q = 0x51, - XBMCVK_R = 0x52, - XBMCVK_S = 0x53, - XBMCVK_T = 0x54, - XBMCVK_U = 0x55, - XBMCVK_V = 0x56, - XBMCVK_W = 0x57, - XBMCVK_X = 0x58, - XBMCVK_Y = 0x59, - XBMCVK_Z = 0x5A, - - XBMCVK_LEFTBRACKET = 0x5B, - XBMCVK_BACKSLASH = 0x5C, - XBMCVK_RIGHTBRACKET = 0x5D, - XBMCVK_CARET = 0x5E, - XBMCVK_UNDERSCORE = 0x5F, - XBMCVK_BACKQUOTE = 0x60, - -// Lowercase letters 0x61 - 0x7a have the same vkey as uppercase, so -// use this block for the numpad keys - XBMCVK_NUMPADDIVIDE = 0x61, - XBMCVK_NUMPADTIMES = 0x62, - XBMCVK_NUMPADMINUS = 0x63, - XBMCVK_NUMPADPLUS = 0x64, - XBMCVK_NUMPADENTER = 0x65, - XBMCVK_NUMPADPERIOD = 0x66, - XBMCVK_NUMPAD0 = 0x70, - XBMCVK_NUMPAD1 = 0x71, - XBMCVK_NUMPAD2 = 0x72, - XBMCVK_NUMPAD3 = 0x73, - XBMCVK_NUMPAD4 = 0x74, - XBMCVK_NUMPAD5 = 0x75, - XBMCVK_NUMPAD6 = 0x76, - XBMCVK_NUMPAD7 = 0x77, - XBMCVK_NUMPAD8 = 0x78, - XBMCVK_NUMPAD9 = 0x79, - - XBMCVK_LEFTBRACE = 0x7B, - XBMCVK_PIPE = 0x7C, - XBMCVK_RIGHTBRACE = 0x7D, - XBMCVK_TILDE = 0x7E, - -// Non-printing characters - - XBMCVK_UP = 0x80, - XBMCVK_DOWN = 0x81, - XBMCVK_LEFT = 0x82, - XBMCVK_RIGHT = 0x83, - XBMCVK_PAGEUP = 0x84, - XBMCVK_PAGEDOWN = 0x85, - XBMCVK_INSERT = 0x86, - XBMCVK_DELETE = 0x87, - XBMCVK_HOME = 0x88, - XBMCVK_END = 0x89, - - XBMCVK_F1 = 0x90, - XBMCVK_F2 = 0x91, - XBMCVK_F3 = 0x92, - XBMCVK_F4 = 0x93, - XBMCVK_F5 = 0x94, - XBMCVK_F6 = 0x95, - XBMCVK_F7 = 0x96, - XBMCVK_F8 = 0x97, - XBMCVK_F9 = 0x98, - XBMCVK_F10 = 0x99, - XBMCVK_F11 = 0x9A, - XBMCVK_F12 = 0x9B, - XBMCVK_F13 = 0x9C, - XBMCVK_F14 = 0x9D, - XBMCVK_F15 = 0x9E, - XBMCVK_F16 = 0x9F, - XBMCVK_F17 = 0xA0, - XBMCVK_F18 = 0xA1, - XBMCVK_F19 = 0xA2, - XBMCVK_F20 = 0xA3, - XBMCVK_F21 = 0xA4, - XBMCVK_F22 = 0xA5, - XBMCVK_F23 = 0xA6, - XBMCVK_F24 = 0xA7, - - XBMCVK_BROWSER_BACK = 0xB0, - XBMCVK_BROWSER_FORWARD = 0xB1, - XBMCVK_BROWSER_REFRESH = 0xB2, - XBMCVK_BROWSER_STOP = 0xB3, - XBMCVK_BROWSER_SEARCH = 0xB4, - XBMCVK_BROWSER_FAVORITES = 0xB5, - XBMCVK_BROWSER_HOME = 0xB6, - XBMCVK_VOLUME_MUTE = 0xB7, - XBMCVK_VOLUME_DOWN = 0xB8, - XBMCVK_VOLUME_UP = 0xB9, - XBMCVK_MEDIA_NEXT_TRACK = 0xBA, - XBMCVK_MEDIA_PREV_TRACK = 0xBB, - XBMCVK_MEDIA_STOP = 0xBC, - XBMCVK_MEDIA_PLAY_PAUSE = 0xBD, - XBMCVK_LAUNCH_MAIL = 0xBE, - XBMCVK_LAUNCH_MEDIA_SELECT = 0xBF, - XBMCVK_LAUNCH_APP1 = 0xC0, - XBMCVK_LAUNCH_APP2 = 0xC1, - XBMCVK_LAUNCH_FILE_BROWSER = 0xC2, - XBMCVK_LAUNCH_MEDIA_CENTER = 0xC3, - XBMCVK_MEDIA_REWIND = 0xC4, - XBMCVK_MEDIA_FASTFORWARD = 0xC5, - XBMCVK_MEDIA_RECORD = 0xC6, - - XBMCVK_LCONTROL = 0xD0, - XBMCVK_RCONTROL = 0xD1, - XBMCVK_LSHIFT = 0xD2, - XBMCVK_RSHIFT = 0xD3, - XBMCVK_LMENU = 0xD4, - XBMCVK_RMENU = 0xD5, - XBMCVK_LWIN = 0xD6, - XBMCVK_RWIN = 0xD7, - XBMCVK_MENU = 0xD8, - XBMCVK_CAPSLOCK = 0xD9, - XBMCVK_NUMLOCK = 0xDA, - - XBMCVK_PRINTSCREEN = 0xDB, - XBMCVK_SCROLLLOCK = 0xDC, - XBMCVK_PAUSE = 0XDD, - XBMCVK_POWER = 0XDE, - XBMCVK_SLEEP = 0XDF, - XBMCVK_GUIDE = 0xE0, - XBMCVK_SETTINGS = 0xE1, - XBMCVK_INFO = 0xE2, - XBMCVK_RED = 0xE3, - XBMCVK_GREEN = 0xE4, - XBMCVK_YELLOW = 0xE5, - XBMCVK_BLUE = 0xE6, - XBMCVK_ZOOM = 0xE7, - XBMCVK_TEXT = 0xE8, - XBMCVK_FAVORITES = 0xE9, - XBMCVK_HOMEPAGE = 0xEA, - XBMCVK_CONFIG = 0xEB, - XBMCVK_EPG = 0xEC, - - XBMCVK_LAST = 0xFF -} XBMCVKey; - -// These should be in winuser.h. Not sure why they have been defined here -#ifndef VK_0 -#define VK_0 '0' -#define VK_1 '1' -#define VK_2 '2' -#define VK_3 '3' -#define VK_4 '4' -#define VK_5 '5' -#define VK_6 '6' -#define VK_7 '7' -#define VK_8 '8' -#define VK_9 '9' -#define VK_A 'A' -#define VK_B 'B' -#define VK_C 'C' -#define VK_D 'D' -#define VK_E 'E' -#define VK_F 'F' -#define VK_G 'G' -#define VK_H 'H' -#define VK_I 'I' -#define VK_J 'J' -#define VK_K 'K' -#define VK_L 'L' -#define VK_M 'M' -#define VK_N 'N' -#define VK_O 'O' -#define VK_P 'P' -#define VK_Q 'Q' -#define VK_R 'R' -#define VK_S 'S' -#define VK_T 'T' -#define VK_U 'U' -#define VK_V 'V' -#define VK_W 'W' -#define VK_X 'X' -#define VK_Y 'Y' -#define VK_Z 'Z' -#endif /* VK_0 */ - -/* These keys haven't been defined, but were experimentally determined */ -#ifndef VK_SEMICOLON -#define VK_SEMICOLON 0xBA -#define VK_EQUALS 0xBB -#define VK_COMMA 0xBC -#define VK_MINUS 0xBD -#define VK_PERIOD 0xBE -#define VK_SLASH 0xBF -#define VK_GRAVE 0xC0 -#define VK_LBRACKET 0xDB -#define VK_BACKSLASH 0xDC -#define VK_RBRACKET 0xDD -#define VK_APOSTROPHE 0xDE -#define VK_BACKTICK 0xDF -#define VK_OEM_102 0xE2 -#endif - -#endif // XBMC_vkeys_h -- cgit v1.2.3