2017-05-30 03:38:38 +02:00
|
|
|
/*
|
|
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
|
|
|
|
*
|
|
|
|
|
* This file is part of the 86Box distribution.
|
|
|
|
|
*
|
2017-10-19 04:27:04 -04:00
|
|
|
* Platform support defintions for Win32.
|
2017-05-30 03:38:38 +02:00
|
|
|
*
|
2018-10-23 21:14:41 +02:00
|
|
|
* Version: @(#)win.h 1.0.24 2018/10/23
|
2017-10-07 00:46:54 -04:00
|
|
|
*
|
|
|
|
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
2017-05-30 03:38:38 +02:00
|
|
|
* Miran Grca, <mgrca8@gmail.com>
|
2017-10-08 19:14:46 -04:00
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
|
|
|
|
*
|
2018-01-21 21:39:52 +01:00
|
|
|
* Copyright 2008-2018 Sarah Walker.
|
|
|
|
|
* Copyright 2016-2018 Miran Grca.
|
|
|
|
|
* Copyright 2017,2018 Fred N. van Kempen.
|
2017-05-30 03:38:38 +02:00
|
|
|
*/
|
2017-10-19 04:27:04 -04:00
|
|
|
#ifndef PLAT_WIN_H
|
|
|
|
|
# define PLAT_WIN_H
|
2017-05-27 03:53:32 +02:00
|
|
|
|
2017-10-19 04:27:04 -04:00
|
|
|
# define UNICODE
|
2017-05-22 00:21:22 -04:00
|
|
|
# define BITMAP WINDOWS_BITMAP
|
2017-10-07 00:46:54 -04:00
|
|
|
# if 0
|
|
|
|
|
# ifdef _WIN32_WINNT
|
|
|
|
|
# undef _WIN32_WINNT
|
|
|
|
|
# define _WIN32_WINNT 0x0501
|
|
|
|
|
# endif
|
|
|
|
|
# endif
|
2017-05-22 00:21:22 -04:00
|
|
|
# include <windows.h>
|
2017-05-29 21:57:31 -04:00
|
|
|
# include "resource.h"
|
2017-05-22 00:21:22 -04:00
|
|
|
# undef BITMAP
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
|
2017-10-07 00:46:54 -04:00
|
|
|
/* Class names and such. */
|
|
|
|
|
#define CLASS_NAME L"86BoxMainWnd"
|
|
|
|
|
#define MENU_NAME L"MainMenu"
|
|
|
|
|
#define ACCEL_NAME L"MainAccel"
|
|
|
|
|
#define SUB_CLASS_NAME L"86BoxSubWnd"
|
|
|
|
|
#define SB_CLASS_NAME L"86BoxStatusBar"
|
|
|
|
|
#define SB_MENU_NAME L"StatusBarMenu"
|
2018-07-15 01:41:53 +02:00
|
|
|
#define FS_CLASS_NAME L"86BoxFullScreen"
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-10-07 00:46:54 -04:00
|
|
|
/* Application-specific window messages. */
|
|
|
|
|
#define WM_RESETD3D WM_USER
|
|
|
|
|
#define WM_LEAVEFULLSCREEN WM_USER+1
|
|
|
|
|
#define WM_SAVESETTINGS 0x8888
|
2018-01-19 15:39:13 +01:00
|
|
|
#define WM_SHOWSETTINGS 0x8889
|
|
|
|
|
#define WM_PAUSE 0x8890
|
|
|
|
|
#define WM_SENDHWND 0x8891
|
2018-10-10 22:33:24 +02:00
|
|
|
#define WM_HARDRESET 0x8892
|
|
|
|
|
#define WM_SHUTDOWN 0x8893
|
2018-10-12 16:27:47 +02:00
|
|
|
#define WM_CTRLALTDEL 0x8894
|
2018-10-23 19:45:05 +02:00
|
|
|
/* Pause/resume status: WPARAM = 1 for paused, 0 for resumed. */
|
2018-10-23 19:41:17 +02:00
|
|
|
#define WM_SENDSTATUS 0x8895
|
2018-10-23 19:45:05 +02:00
|
|
|
/* Settings status: WPARAM = 1 for open, 0 for closed. */
|
2018-10-23 19:41:17 +02:00
|
|
|
#define WM_SENDSSTATUS 0x8896
|
2017-05-27 03:53:32 +02:00
|
|
|
|
2018-07-15 01:41:53 +02:00
|
|
|
#ifdef USE_VNC
|
2019-02-06 03:34:39 +01:00
|
|
|
#ifdef USE_D2D
|
2018-07-19 04:39:27 +02:00
|
|
|
#define RENDERERS_NUM 5
|
2018-07-15 01:41:53 +02:00
|
|
|
#else
|
2018-07-19 04:39:27 +02:00
|
|
|
#define RENDERERS_NUM 4
|
2018-07-15 01:41:53 +02:00
|
|
|
#endif
|
2019-02-06 03:34:39 +01:00
|
|
|
#else
|
|
|
|
|
#ifdef USE_D2D
|
|
|
|
|
#define RENDERERS_NUM 4
|
|
|
|
|
#else
|
|
|
|
|
#define RENDERERS_NUM 3
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
2018-07-15 01:41:53 +02:00
|
|
|
|
2017-05-27 03:53:32 +02:00
|
|
|
|
2017-10-10 03:07:29 -04:00
|
|
|
extern HINSTANCE hinstance;
|
2017-10-19 04:27:04 -04:00
|
|
|
extern HWND hwndMain,
|
|
|
|
|
hwndRender;
|
|
|
|
|
extern HANDLE ghMutex;
|
|
|
|
|
extern LCID lang_id;
|
2018-07-15 01:41:53 +02:00
|
|
|
extern HICON hIcon[256];
|
2017-10-10 03:07:29 -04:00
|
|
|
|
2018-04-26 13:33:29 +02:00
|
|
|
// extern int status_is_open;
|
2017-10-19 04:27:04 -04:00
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
extern char openfilestring[260];
|
|
|
|
|
extern WCHAR wopenfilestring[260];
|
|
|
|
|
|
2018-01-21 21:39:52 +01:00
|
|
|
extern uint8_t filterindex;
|
|
|
|
|
|
2017-05-18 14:03:43 -04:00
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
2017-05-22 00:21:22 -04:00
|
|
|
extern "C" {
|
2017-05-18 14:03:43 -04:00
|
|
|
#endif
|
|
|
|
|
|
2017-11-13 02:06:00 -05:00
|
|
|
#ifdef USE_CRASHDUMP
|
|
|
|
|
extern void InitCrashDump(void);
|
|
|
|
|
#endif
|
|
|
|
|
|
2017-10-08 19:14:46 -04:00
|
|
|
extern HICON LoadIconEx(PCTSTR pszIconName);
|
|
|
|
|
|
2017-10-19 04:27:04 -04:00
|
|
|
/* Emulator start/stop support functions. */
|
|
|
|
|
extern void do_start(void);
|
|
|
|
|
extern void do_stop(void);
|
|
|
|
|
|
|
|
|
|
/* Internal platform support functions. */
|
|
|
|
|
extern void set_language(int id);
|
|
|
|
|
extern int get_vidpause(void);
|
2017-12-15 00:42:10 -05:00
|
|
|
extern void show_cursor(int);
|
2017-10-08 19:14:46 -04:00
|
|
|
|
2017-10-24 22:10:21 -04:00
|
|
|
extern void keyboard_getkeymap(void);
|
|
|
|
|
extern void keyboard_handle(LPARAM lParam, int infocus);
|
|
|
|
|
|
2017-12-04 11:59:26 -05:00
|
|
|
extern void win_mouse_init(void);
|
|
|
|
|
extern void win_mouse_close(void);
|
|
|
|
|
|
2018-04-25 23:51:13 +02:00
|
|
|
extern LPARAM win_get_string(int id);
|
|
|
|
|
|
2017-12-13 22:39:41 +01:00
|
|
|
extern intptr_t fdd_type_to_icon(int type);
|
2017-10-24 22:10:21 -04:00
|
|
|
|
2017-10-07 00:46:54 -04:00
|
|
|
#ifdef EMU_DEVICE_H
|
2018-03-19 01:02:04 +01:00
|
|
|
extern uint8_t deviceconfig_open(HWND hwnd, const device_t *device);
|
2018-10-23 21:14:41 +02:00
|
|
|
extern uint8_t deviceconfig_inst_open(HWND hwnd, const device_t *device, int inst);
|
2017-10-07 00:46:54 -04:00
|
|
|
#endif
|
2018-01-21 21:39:52 +01:00
|
|
|
extern uint8_t joystickconfig_open(HWND hwnd, int joy_nr, int type);
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
extern int getfile(HWND hwnd, char *f, char *fn);
|
|
|
|
|
extern int getsfile(HWND hwnd, char *f, char *fn);
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
extern void win_settings_open(HWND hwnd);
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
extern void hard_disk_add_open(HWND hwnd, int is_existing);
|
2017-05-27 03:53:32 +02:00
|
|
|
extern int hard_disk_was_added(void);
|
|
|
|
|
|
2017-07-16 17:28:30 +02:00
|
|
|
|
2017-11-19 03:15:29 -05:00
|
|
|
/* Platform UI support functions. */
|
2017-11-23 17:42:00 -05:00
|
|
|
extern int ui_init(int nCmdShow);
|
2018-07-15 01:41:53 +02:00
|
|
|
extern void plat_set_input(HWND h);
|
2017-11-19 03:15:29 -05:00
|
|
|
|
|
|
|
|
|
2017-10-08 19:14:46 -04:00
|
|
|
/* Functions in win_about.c: */
|
2017-10-07 04:34:04 -04:00
|
|
|
extern void AboutDialogCreate(HWND hwnd);
|
|
|
|
|
|
2017-10-08 19:14:46 -04:00
|
|
|
|
2018-01-17 18:43:36 +01:00
|
|
|
/* Functions in win_snd_gain.c: */
|
|
|
|
|
extern void SoundGainDialogCreate(HWND hwnd);
|
|
|
|
|
|
|
|
|
|
|
2018-01-19 15:39:13 +01:00
|
|
|
/* Functions in win_new_floppy.c: */
|
|
|
|
|
extern void NewFloppyDialogCreate(HWND hwnd, int id, int part);
|
|
|
|
|
|
|
|
|
|
|
2017-10-08 19:14:46 -04:00
|
|
|
/* Functions in win_stbar.c: */
|
2017-10-07 04:34:04 -04:00
|
|
|
extern HWND hwndSBAR;
|
2017-12-13 22:39:41 +01:00
|
|
|
extern void StatusBarCreate(HWND hwndParent, uintptr_t idStatus, HINSTANCE hInst);
|
2017-10-07 00:46:54 -04:00
|
|
|
|
2017-10-08 19:14:46 -04:00
|
|
|
|
|
|
|
|
/* Functions in win_dialog.c: */
|
|
|
|
|
extern int file_dlg_w(HWND hwnd, WCHAR *f, WCHAR *fn, int save);
|
|
|
|
|
extern int file_dlg(HWND hwnd, WCHAR *f, char *fn, int save);
|
|
|
|
|
extern int file_dlg_mb(HWND hwnd, char *f, char *fn, int save);
|
|
|
|
|
extern int file_dlg_w_st(HWND hwnd, int i, WCHAR *fn, int save);
|
|
|
|
|
extern int file_dlg_st(HWND hwnd, int i, char *fn, int save);
|
|
|
|
|
|
|
|
|
|
extern wchar_t *BrowseFolder(wchar_t *saved_path, wchar_t *title);
|
|
|
|
|
|
|
|
|
|
|
2017-05-22 00:21:22 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|
2017-05-18 14:03:43 -04:00
|
|
|
|
2017-05-19 04:35:59 +02:00
|
|
|
|
2017-10-19 04:27:04 -04:00
|
|
|
#endif /*PLAT_WIN_H*/
|