2013-07-06 04:37:13 +00:00
|
|
|
/*
|
2015-10-22 05:13:26 +00:00
|
|
|
* Apple // emulator for *ix
|
|
|
|
*
|
|
|
|
* This software package is subject to the GNU General Public License
|
|
|
|
* version 3 or later (your choice) as published by the Free Software
|
|
|
|
* Foundation.
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
* Copyright 1994 Alexander Jean-Claude Bottema
|
|
|
|
* Copyright 1995 Stephen Lee
|
|
|
|
* Copyright 1997, 1998 Aaron Culliney
|
|
|
|
* Copyright 1998, 1999, 2000 Michael Deutschmann
|
2015-10-22 05:13:26 +00:00
|
|
|
* Copyright 2013-2015 Aaron Culliney
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef A2_VIDEO_H
|
|
|
|
#define A2_VIDEO_H
|
|
|
|
|
2015-03-23 01:53:13 +00:00
|
|
|
typedef struct video_backend_s {
|
|
|
|
void (*init)(void *context);
|
|
|
|
void (*main_loop)(void);
|
|
|
|
void (*render)(void);
|
2016-04-17 19:08:11 +00:00
|
|
|
void (*shutdown)(void);
|
2017-07-15 23:25:00 +00:00
|
|
|
video_animation_s *anim;
|
2015-03-23 01:53:13 +00:00
|
|
|
} video_backend_s;
|
2013-06-11 07:08:15 +00:00
|
|
|
|
2015-03-23 01:53:13 +00:00
|
|
|
/*
|
|
|
|
* Color structure
|
|
|
|
*/
|
|
|
|
typedef struct A2Color_s {
|
2014-08-17 22:31:49 +00:00
|
|
|
uint8_t red;
|
|
|
|
uint8_t green;
|
|
|
|
uint8_t blue;
|
2015-03-23 01:53:13 +00:00
|
|
|
} A2Color_s;
|
2014-08-17 22:31:49 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Reference to the internal 8bit-indexed color format
|
|
|
|
*/
|
2016-01-21 05:56:25 +00:00
|
|
|
extern A2Color_s colormap[];
|
2015-09-11 07:00:04 +00:00
|
|
|
|
2017-07-15 23:16:50 +00:00
|
|
|
#if VIDEO_X11
|
2016-03-26 05:34:33 +00:00
|
|
|
// X11 scaling ...
|
|
|
|
typedef enum a2_video_mode_t {
|
|
|
|
VIDEO_FULLSCREEN = 0,
|
|
|
|
VIDEO_1X,
|
|
|
|
VIDEO_2X,
|
|
|
|
NUM_VIDOPTS
|
|
|
|
} a2_video_mode_t;
|
|
|
|
|
|
|
|
extern a2_video_mode_t a2_video_mode;
|
|
|
|
#endif
|
|
|
|
|
2017-07-15 23:25:00 +00:00
|
|
|
enum {
|
|
|
|
VID_PRIO_GRAPHICS_GL = 10,
|
|
|
|
VID_PRIO_GRAPHICS_X = 20,
|
|
|
|
VID_PRIO_TERMINAL = 30,
|
|
|
|
VID_PRIO_NULL = 100,
|
|
|
|
};
|
|
|
|
|
|
|
|
void video_registerBackend(video_backend_s *backend, long prio);
|
|
|
|
|
|
|
|
video_backend_s *video_getCurrentBackend(void);
|
|
|
|
|
2013-06-11 07:08:15 +00:00
|
|
|
#endif /* !A2_VIDEO_H */
|
2015-03-23 01:53:13 +00:00
|
|
|
|