Added a test for MUIA_Listview_SelectChange.
[AROS.git] / arch / all-mingw32 / filesys / emul_handler / emul_host.h
blobb728587f8fd56e333423777e5d4a549e5753e941
1 #ifndef RESOURCES_EMUL_HOST_H
2 #define RESOURCES_EMUL_HOST_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
8 Desc: Internal header-file for emulation-handler.
9 Lang: english
12 #pragma pack(4)
14 /* This structure describes our virtual hardware registers */
15 struct AsyncReaderControl
17 unsigned int cmd; /* Command */
18 void *fh; /* File handle to operate on */
19 void *addr; /* Buffer address */
20 unsigned int len; /* Requested data length */
21 unsigned int actual; /* Actual data length */
22 unsigned int error; /* Error code */
23 void *CmdEvent; /* Event to trigger in order to tell us to go */
24 unsigned char IrqNum; /* IRQ number on AROS side */
25 unsigned int sig; /* AROS signal to use, used by IRQ handler */
26 void *task; /* AROS task to signal, used by IRQ handler */
29 #pragma pack()
31 #define ASYNC_CMD_SHUTDOWN 0
32 #define ASYNC_CMD_READ 1
34 #ifdef __x86_64__
35 #define __aros __attribute((sysv_abi))
36 #else
37 #define __aros
38 #endif
40 #ifdef __AROS__
42 #include "emul_winapi.h"
44 struct EmulInterface
46 struct AsyncReaderControl *(*EmulInitNative)(void);
47 unsigned long (*EmulGetHome)(char *name, char *home);
50 /* The following functions are availible on not all Windows versions, so they are optional for us.
51 If they are present, we will use them. If not, produce error or fail back to emulation (for example,
52 softlinks can be implemented using shell shortcuts) */
54 struct KernelInterface
56 void * __stdcall (*CreateFile)(char *lpFileName, ULONG dwDesiredAccess, ULONG dwShareMode, void *lpSecurityAttributes,
57 ULONG dwCreationDisposition, ULONG dwFlagsAndAttributes, void *hTemplateFile);
58 ULONG __stdcall (*CloseHandle)(void *hObject);
59 ULONG __stdcall (*ReadFile)(void *hFile, void *lpBuffer, ULONG nNumberOfBytesToRead, ULONG *lpNumberOfBytesRead, void *lpOverlapped);
60 ULONG __stdcall (*WriteFile)(void *hFile, void *lpBuffer, ULONG nNumberOfBytesToWrite, ULONG *lpNumberOfBytesWritten, void *lpOverlapped);
61 ULONG __stdcall (*SetFilePointer)(void *hFile, LONG lDistanceToMove, LONG *lpDistanceToMoveHigh, ULONG dwMoveMethod);
62 ULONG __stdcall (*SetEndOfFile)(void *hFile);
63 ULONG __stdcall (*GetFileType)(void *hFile);
64 void * __stdcall (*GetStdHandle)(ULONG nStdHandle);
65 ULONG __stdcall (*MoveFile)(char *lpExistingFileName, char *lpNewFileName);
66 ULONG __stdcall (*GetCurrentDirectory)(ULONG nBufferLength, char *lpBuffer);
67 void * __stdcall (*FindFirstFile)(char *lpFileName, LPWIN32_FIND_DATA lpFindFileData);
68 ULONG __stdcall (*FindNextFile)(void *hFindFile, LPWIN32_FIND_DATA lpFindFileData);
69 ULONG __stdcall (*FindClose)(void *hFindFile);
70 ULONG __stdcall (*CreateDirectory)(char *lpPathName, void *lpSecurityAttributes);
71 ULONG __stdcall (*SetFileAttributes)(char *lpFileName, ULONG dwFileAttributes);
72 ULONG __stdcall (*GetLastError)(void);
73 ULONG __stdcall (*CreateHardLink)(char *lpFileName, char *lpExistingFileName, void *lpSecurityAttributes);
74 ULONG __stdcall (*CreateSymbolicLink)(char *lpSymlinkFileName, char *lpTargetFileName, ULONG dwFlags);
75 ULONG __stdcall (*SetEvent)(void *hEvent);
76 ULONG __stdcall (*SetFileTime)(void *hFile, UQUAD *lpCreationTime, UQUAD *lpLastAccessTime, UQUAD *lpLastWriteTime);
77 ULONG __stdcall (*GetFileAttributes)(char *lpFileName);
78 ULONG __stdcall (*GetFileAttributesEx)(char *lpFileName, ULONG fInfoLevelId, void *lpFileInformation);
79 ULONG __stdcall (*_DeleteFile)(char *lpFileName);
80 ULONG __stdcall (*RemoveDirectory)(char *lpPathName);
81 ULONG __stdcall (*GetDiskFreeSpace)(char *lpRootPathName, ULONG *lpSectorsPerCluster, ULONG *lpBytesPerSector, ULONG *lpNumberOfFreeClusters, ULONG *lpTotalNumberOfClusters);
84 struct PlatformHandle
86 char *pathname; /* Pathname with pattern for directory searching */
87 ULONG dirpos; /* Current directory search position */
90 struct Emul_PlatformData
92 void *EmulHandle;
93 void *KernelHandle;
94 void *ConsoleInt;
95 struct AsyncReaderControl *ConsoleReader;
96 struct EmulInterface *EmulIFace;
97 struct KernelInterface *KernelIFace;
100 #endif
101 #endif