]> 4ch.mooo.com Git - 16.git/blob - src/lib/doslib/hw/dos/doswin.h
added a bunch of things~ and midi stuff~
[16.git] / src / lib / doslib / hw / dos / doswin.h
1
2 #include <hw/cpu/cpu.h>
3 #include <stdint.h>
4
5 #if !defined(TARGET_WINDOWS) && !defined(TARGET_OS2)
6 /* NTVDM.EXE DOSNTAST.VDD call support */
7 #include <windows/ntvdm/ntvdmlib.h>
8 #endif
9
10 enum {
11         WINEMU_NONE=0,
12         WINEMU_WINE
13 };
14
15 enum {
16         WINDOWS_NONE=0,
17         WINDOWS_REAL,
18         WINDOWS_STANDARD,
19         WINDOWS_ENHANCED,
20         WINDOWS_NT,
21         WINDOWS_OS2,                    /* Not Windows, OS/2 */
22                                         /* Exact meaning: If we're a DOS/Windows program, then we know we're running under OS/2
23                                            and OS/2 is emulating DOS/Windows. If we're an OS/2 program, then we're in our native
24                                            environment */
25         WINDOWS_MAX
26 };
27
28 extern const char *windows_mode_strs[WINDOWS_MAX];
29 #define windows_mode_str(x)     windows_mode_strs[x]
30
31 extern uint8_t windows_mode;
32 extern uint16_t windows_version;
33 extern uint8_t windows_emulation;
34 extern const char *windows_version_method;
35 extern const char *windows_emulation_comment_str;
36
37 /* TODO: Someday, these will become variables */
38
39 /* whether the Windows emulation allows Win16 to call DPMI */
40 #define windows_emulation_includes_dpmi         0
41
42 int detect_windows();
43 const char *windows_emulation_str(uint8_t e);
44
45 #if defined(TARGET_WINDOWS) && TARGET_MSDOS == 32 && !defined(WIN386)
46 # include <windows.h>
47 # include <stdint.h>
48
49 extern unsigned char            win9x_qt_thunk_probed;
50 extern unsigned char            win9x_qt_thunk_available;
51
52 typedef WORD HGLOBAL16; /* <- NTS: Taken from WINE header definitions */
53
54 extern void                     (__stdcall *QT_Thunk)();
55 extern DWORD                    (__stdcall *LoadLibrary16)(LPSTR lpszLibFileName);
56 extern VOID                     (__stdcall *FreeLibrary16)(DWORD dwInstance);
57 extern HGLOBAL16                (__stdcall *GlobalAlloc16)(UINT flags,DWORD size);
58 extern HGLOBAL16                (__stdcall *GlobalFree16)(HGLOBAL16 handle);
59 extern DWORD                    (__stdcall *GlobalLock16)(HGLOBAL16 handle);
60 extern BOOL                     (__stdcall *GlobalUnlock16)(HGLOBAL16 handle);
61 extern VOID                     (__stdcall *GlobalUnfix16)(HGLOBAL16 handle);
62 extern DWORD                    (__stdcall *GetProcAddress16)(DWORD dwInstance, LPSTR lpszProcName);
63 extern VOID                     (__stdcall *GlobalFix16)(HGLOBAL16 handle);
64
65 extern DWORD                    win9x_kernel_win16;
66 extern DWORD                    win9x_user_win16;
67
68 int Win9xQT_ThunkInit();
69 void Win9xQT_ThunkFree();
70 #endif
71
72 #if defined(TARGET_WINDOWS) && TARGET_MSDOS == 16
73 # include <toolhelp.h>
74 extern HMODULE                  ToolHelpDLL;
75 extern unsigned char            ToolHelpProbed;
76 extern BOOL                     (PASCAL FAR *__TimerCount)(TIMERINFO FAR *t);
77 extern BOOL                     (PASCAL FAR *__InterruptUnRegister)(HTASK htask);
78 extern BOOL                     (PASCAL FAR *__InterruptRegister)(HTASK htask,FARPROC callback);
79
80 int ToolHelpInit();
81 void ToolHelpFree();
82 #endif
83