1 /* 2 * UAE - The Un*x Amiga Emulator 3 * 4 * Interface to the Tcl/Tk GUI 5 * 6 * Copyright 1996 Bernd Schmidt 7 */ 8 9 #ifndef UAE_GUI_H 10 #define UAE_GUI_H 11 12 #include "uae/types.h" 13 14 extern int gui_init (void); 15 extern int gui_update (void); 16 extern void gui_exit (void); 17 extern void gui_led (int, int, int); 18 extern void gui_handle_events (void); 19 extern void gui_filename (int, const TCHAR *); 20 extern void gui_fps (int fps, int idle, int color); 21 extern void gui_changesettings (void); 22 extern void gui_lock (void); 23 extern void gui_unlock (void); 24 extern void gui_flicker_led (int, int, int); 25 extern void gui_disk_image_change (int, const TCHAR *, bool writeprotected); 26 extern unsigned int gui_ledstate; 27 extern void gui_display (int shortcut); 28 29 extern void gui_gameport_button_change (int port, int button, int onoff); 30 extern void gui_gameport_axis_change (int port, int axis, int state, int max); 31 32 extern bool no_gui, quit_to_gui; 33 34 #define LED_CD_ACTIVE 1 35 #define LED_CD_ACTIVE2 2 36 #define LED_CD_AUDIO 4 37 38 #define LED_POWER 0 39 #define LED_DF0 1 40 #define LED_DF1 2 41 #define LED_DF2 3 42 #define LED_DF3 4 43 #define LED_HD 5 44 #define LED_CD 6 45 #define LED_FPS 7 46 #define LED_CPU 8 47 #define LED_SND 9 48 #define LED_MD 10 49 #define LED_MAX 11 50 51 struct gui_info 52 { 53 bool drive_motor[4]; /* motor on off */ 54 uae_u8 drive_track[4]; /* rw-head track */ 55 bool drive_writing[4]; /* drive is writing */ 56 bool drive_disabled[4]; /* drive is disabled */ 57 bool powerled; /* state of power led */ 58 uae_u8 powerled_brightness; /* 0 to 255 */ 59 uae_s8 drive_side; /* floppy side */ 60 uae_s8 hd; /* harddrive */ 61 uae_s8 cd; /* CD */ 62 uae_s8 md; /* CD32 or CDTV internal storage */ 63 int cpu_halted; 64 int fps, idle; 65 int fps_color; 66 int sndbuf, sndbuf_status; 67 TCHAR df[4][256]; /* inserted image */ 68 uae_u32 crc32[4]; /* crc32 of image */ 69 }; 70 #define NUM_LEDS (LED_MAX) 71 #define VISIBLE_LEDS (LED_MAX - 1) 72 73 extern struct gui_info gui_data; 74 75 /* Functions to be called when prefs are changed by non-gui code. */ 76 extern void gui_update_gfx (void); 77 78 void notify_user (int msg); 79 void notify_user_parms (int msg, const TCHAR *parms, ...); 80 int translate_message (int msg, TCHAR *out); 81 82 typedef enum { 83 NUMSG_NEEDEXT2, // 0 84 NUMSG_NOROM, 85 NUMSG_NOROMKEY, 86 NUMSG_KSROMCRCERROR, 87 NUMSG_KSROMREADERROR, 88 NUMSG_NOEXTROM, // 5 89 NUMSG_MODRIP_NOTFOUND, 90 NUMSG_MODRIP_FINISHED, 91 NUMSG_MODRIP_SAVE, 92 NUMSG_KS68EC020, 93 NUMSG_KS68020, // 10 94 NUMSG_KS68030, 95 NUMSG_ROMNEED, 96 NUMSG_EXPROMNEED, 97 NUMSG_NOZLIB, 98 NUMSG_STATEHD, // 15 99 NUMSG_NOCAPS, 100 NUMSG_OLDCAPS, 101 NUMSG_KICKREP, 102 NUMSG_KICKREPNO, 103 NUMSG_KS68030PLUS, // 20 104 NUMSG_NO_PPC, 105 NUMSG_UAEBOOTROM_PPC, 106 NUMSG_LAST 107 } notify_user_msg; 108 109 #endif /* UAE_GUI_H */ 110