2013-07-06 04:37:13 +00:00
|
|
|
/*
|
2013-06-11 07:08:15 +00:00
|
|
|
* Apple // emulator for Linux: Exported menu routines
|
|
|
|
*
|
|
|
|
* Copyright 1994 Alexander Jean-Claude Bottema
|
|
|
|
* Copyright 1995 Stephen Lee
|
|
|
|
* Copyright 1997, 1998 Aaron Culliney
|
|
|
|
* Copyright 1998, 1999, 2000 Michael Deutschmann
|
|
|
|
*
|
|
|
|
* This software package is subject to the GNU General Public License
|
2013-07-06 04:37:13 +00:00
|
|
|
* version 2 or later (your choice) as published by the Free Software
|
2013-06-11 07:08:15 +00:00
|
|
|
* Foundation.
|
|
|
|
*
|
2013-07-06 04:37:13 +00:00
|
|
|
* THERE ARE NO WARRANTIES WHATSOEVER.
|
2013-06-11 07:08:15 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef A2_INTERFACE_H
|
|
|
|
#define A2_INTERFACE_H
|
|
|
|
|
2015-04-12 21:20:17 +00:00
|
|
|
#define INTERFACE_SCREEN_X 80
|
2013-12-28 21:08:35 +00:00
|
|
|
|
2015-04-12 21:20:17 +00:00
|
|
|
typedef enum interface_colorscheme_t {
|
|
|
|
GREEN_ON_BLACK = 0,
|
|
|
|
GREEN_ON_BLUE,
|
|
|
|
RED_ON_BLACK,
|
|
|
|
} interface_colorscheme_t;
|
2014-09-17 03:42:07 +00:00
|
|
|
|
2015-04-12 21:20:17 +00:00
|
|
|
#ifdef INTERFACE_CLASSIC
|
|
|
|
void video_plotchar(int col, int row, interface_colorscheme_t cs, uint8_t c);
|
2014-09-17 03:42:07 +00:00
|
|
|
void c_interface_begin(int current_key);
|
2015-04-12 21:20:17 +00:00
|
|
|
void c_interface_print(int x, int y, const interface_colorscheme_t cs, const char *s);
|
|
|
|
void c_interface_print_submenu_centered(char *submenu, int xlen, int ylen);
|
2013-11-27 20:43:58 +00:00
|
|
|
void c_interface_keyboard_layout();
|
|
|
|
void c_interface_parameters();
|
2013-12-15 22:59:18 +00:00
|
|
|
void c_interface_credits();
|
|
|
|
void c_interface_exit(int ch);
|
2013-11-27 20:43:58 +00:00
|
|
|
void c_interface_translate_screen(char screen[24][INTERFACE_SCREEN_X+1]);
|
|
|
|
void c_interface_select_diskette(int);
|
2013-06-11 07:08:15 +00:00
|
|
|
#endif
|
2015-04-12 21:20:17 +00:00
|
|
|
|
2015-05-29 06:23:21 +00:00
|
|
|
// Plot character at pixel buffer offset
|
|
|
|
void interface_plotChar(uint8_t *fboff, int fb_pix_width, interface_colorscheme_t cs, uint8_t c);
|
2015-04-12 21:20:17 +00:00
|
|
|
|
2015-05-29 06:23:21 +00:00
|
|
|
// Plot message into pixel buffer
|
|
|
|
void interface_plotMessage(uint8_t *fb, interface_colorscheme_t cs, char *message, int message_cols, int message_rows);
|
2015-04-12 21:20:17 +00:00
|
|
|
|
2015-04-12 22:35:16 +00:00
|
|
|
#if INTERFACE_TOUCH
|
|
|
|
typedef enum interface_touch_event_t {
|
|
|
|
TOUCH_CANCEL = 0,
|
|
|
|
TOUCH_DOWN,
|
|
|
|
TOUCH_MOVE,
|
|
|
|
TOUCH_UP,
|
|
|
|
TOUCH_POINTER_DOWN,
|
|
|
|
TOUCH_POINTER_UP,
|
|
|
|
} interface_touch_event_t;
|
|
|
|
|
|
|
|
// handle touch event
|
|
|
|
extern bool (*interface_onTouchEvent)(interface_touch_event_t action, int pointer_count, int pointer_idx, float *x_coords, float *y_coords);
|
2015-04-27 01:40:05 +00:00
|
|
|
|
|
|
|
// is the touch menu module itself available?
|
|
|
|
extern bool (*interface_isTouchMenuAvailable)(void);
|
|
|
|
|
|
|
|
// enable/disable touch menu HUD element
|
|
|
|
extern void (*interface_setTouchMenuEnabled)(bool enabled);
|
2015-07-29 05:22:25 +00:00
|
|
|
|
|
|
|
// set minimum alpha visibility of touch menu HUD element
|
|
|
|
extern void (*interface_setTouchMenuVisibility)(float alpha);
|
2015-04-12 22:35:16 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2015-04-12 21:20:17 +00:00
|
|
|
#endif
|