comparison render.h @ 1696:956c1cce05e2 mame_interp

Merge from default
author Michael Pavone <pavone@retrodev.com>
date Thu, 24 Jan 2019 19:15:59 -0800
parents 395f684c5379
children 3a8c4ee68568
comparison
equal deleted inserted replaced
1648:b7ecd0d6a77b 1696:956c1cce05e2
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. 4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text.
5 */ 5 */
6 #ifndef RENDER_H_ 6 #ifndef RENDER_H_
7 #define RENDER_H_ 7 #define RENDER_H_
8 8
9 //TODO: Throw an ifdef in here once there's more than one renderer 9 #ifndef IS_LIB
10 #include <SDL.h> 10 #include <SDL.h>
11 #define RENDERKEY_UP SDLK_UP 11 #define RENDERKEY_UP SDLK_UP
12 #define RENDERKEY_DOWN SDLK_DOWN 12 #define RENDERKEY_DOWN SDLK_DOWN
13 #define RENDERKEY_LEFT SDLK_LEFT 13 #define RENDERKEY_LEFT SDLK_LEFT
14 #define RENDERKEY_RIGHT SDLK_RIGHT 14 #define RENDERKEY_RIGHT SDLK_RIGHT
59 #define RENDER_DPAD_UP SDL_HAT_UP 59 #define RENDER_DPAD_UP SDL_HAT_UP
60 #define RENDER_DPAD_DOWN SDL_HAT_DOWN 60 #define RENDER_DPAD_DOWN SDL_HAT_DOWN
61 #define RENDER_DPAD_LEFT SDL_HAT_LEFT 61 #define RENDER_DPAD_LEFT SDL_HAT_LEFT
62 #define RENDER_DPAD_RIGHT SDL_HAT_RIGHT 62 #define RENDER_DPAD_RIGHT SDL_HAT_RIGHT
63 #define render_relative_mouse SDL_SetRelativeMouseMode 63 #define render_relative_mouse SDL_SetRelativeMouseMode
64 #endif
64 65
65 #define MAX_JOYSTICKS 8 66 #define MAX_JOYSTICKS 8
66 #define MAX_MICE 8 67 #define MAX_MICE 8
67 #define MAX_MOUSE_BUTTONS 8 68 #define MAX_MOUSE_BUTTONS 8
68 69
84 #define RENDER_NOT_MAPPED -2 85 #define RENDER_NOT_MAPPED -2
85 #define RENDER_NOT_PLUGGED_IN -3 86 #define RENDER_NOT_PLUGGED_IN -3
86 87
87 typedef struct audio_source audio_source; 88 typedef struct audio_source audio_source;
88 typedef void (*drop_handler)(const char *filename); 89 typedef void (*drop_handler)(const char *filename);
90 typedef void (*window_close_handler)(uint8_t which);
89 91
90 uint32_t render_map_color(uint8_t r, uint8_t g, uint8_t b); 92 uint32_t render_map_color(uint8_t r, uint8_t g, uint8_t b);
91 void render_save_screenshot(char *path); 93 void render_save_screenshot(char *path);
92 uint8_t render_create_window(char *caption, uint32_t width, uint32_t height); 94 uint8_t render_create_window(char *caption, uint32_t width, uint32_t height, window_close_handler close_handler);
93 void render_destroy_window(uint8_t which); 95 void render_destroy_window(uint8_t which);
94 uint32_t *render_get_framebuffer(uint8_t which, int *pitch); 96 uint32_t *render_get_framebuffer(uint8_t which, int *pitch);
95 void render_framebuffer_updated(uint8_t which, int width); 97 void render_framebuffer_updated(uint8_t which, int width);
96 //returns the framebuffer index associated with the Window that has focus 98 //returns the framebuffer index associated with the Window that has focus
97 uint8_t render_get_active_framebuffer(void); 99 uint8_t render_get_active_framebuffer(void);