1 /* RetroArch - A frontend for libretro. 2 * Copyright (C) 2010-2014 - Hans-Kristian Arntzen 3 * Copyright (C) 2011-2017 - Daniel De Matteis 4 * 5 * RetroArch is free software: you can redistribute it and/or modify it under the terms 6 * of the GNU General Public License as published by the Free Software Found- 7 * ation, either version 3 of the License, or (at your option) any later version. 8 * 9 * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 10 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 11 * PURPOSE. See the GNU General Public License for more details. 12 * 13 * You should have received a copy of the GNU General Public License along with RetroArch. 14 * If not, see <http://www.gnu.org/licenses/>. 15 */ 16 17 #ifndef __RARCH_DRIVER__H 18 #define __RARCH_DRIVER__H 19 20 #include <stdint.h> 21 #include <stdlib.h> 22 #include <sys/types.h> 23 24 #include <boolean.h> 25 #include <retro_common_api.h> 26 27 RETRO_BEGIN_DECLS 28 29 enum 30 { 31 DRIVER_AUDIO = 0, 32 DRIVER_VIDEO, 33 DRIVER_INPUT, 34 DRIVER_CAMERA, 35 DRIVER_LOCATION, 36 DRIVER_MENU, 37 DRIVERS_VIDEO_INPUT, 38 DRIVER_BLUETOOTH, 39 DRIVER_WIFI, 40 DRIVER_LED, 41 DRIVER_MIDI 42 }; 43 44 enum 45 { 46 DRIVER_AUDIO_MASK = 1 << DRIVER_AUDIO, 47 DRIVER_VIDEO_MASK = 1 << DRIVER_VIDEO, 48 DRIVER_INPUT_MASK = 1 << DRIVER_INPUT, 49 DRIVER_CAMERA_MASK = 1 << DRIVER_CAMERA, 50 DRIVER_LOCATION_MASK = 1 << DRIVER_LOCATION, 51 DRIVER_MENU_MASK = 1 << DRIVER_MENU, 52 DRIVERS_VIDEO_INPUT_MASK = 1 << DRIVERS_VIDEO_INPUT, 53 DRIVER_BLUETOOTH_MASK = 1 << DRIVER_BLUETOOTH, 54 DRIVER_WIFI_MASK = 1 << DRIVER_WIFI, 55 DRIVER_LED_MASK = 1 << DRIVER_LED, 56 DRIVER_MIDI_MASK = 1 << DRIVER_MIDI 57 }; 58 59 enum driver_ctl_state 60 { 61 RARCH_DRIVER_CTL_NONE = 0, 62 63 /* Sets monitor refresh rate to new value by calling 64 * video_monitor_set_refresh_rate(). Subsequently 65 * calls audio_monitor_set_refresh_rate(). */ 66 RARCH_DRIVER_CTL_SET_REFRESH_RATE, 67 68 RARCH_DRIVER_CTL_FIND_FIRST, 69 70 RARCH_DRIVER_CTL_FIND_LAST, 71 72 RARCH_DRIVER_CTL_FIND_PREV, 73 74 RARCH_DRIVER_CTL_FIND_NEXT 75 }; 76 77 typedef struct driver_ctx_info 78 { 79 const char *label; 80 char *s; 81 ssize_t len; 82 } driver_ctx_info_t; 83 84 bool driver_ctl(enum driver_ctl_state state, void *data); 85 86 /* Sets audio and video drivers to nonblock state. 87 * 88 * If nonblock state is false, sets blocking state for both 89 * audio and video drivers instead. */ 90 void driver_set_nonblock_state(void); 91 92 RETRO_END_DECLS 93 94 #endif 95