1 /* $Id: prototypes.h,v 1.3 1993/07/04 04:04:21 root Exp root $
4 * Copyright Robert J. Amstadt, 1993
6 #ifndef _WINE_PROTOTYPES_H
7 #define _WINE_PROTOTYPES_H
22 extern void PrintFileHeader(struct ne_header_s
*ne_header
);
23 extern void PrintSegmentTable(struct ne_segment_table_entry_s
*seg_table
,
25 extern void PrintRelocationTable(char *exe_ptr
,
26 struct ne_segment_table_entry_s
*seg_entry_p
,
31 struct segment_descriptor
*
32 make_sd(unsigned base
, unsigned limit
, int contents
, int read_exec_only
, int seg32
, int inpgs
);
33 int get_ldt(void *buffer
);
34 int set_ldt_entry(int entry
, unsigned long base
, unsigned int limit
,
35 int seg_32bit_flag
, int contents
, int read_only_flag
,
36 int limit_in_pages_flag
);
38 /* loader/resource.c */
40 extern int OpenResourceFile(HANDLE instance
);
41 extern HBITMAP
ConvertCoreBitmap( HDC hdc
, BITMAPCOREHEADER
* image
);
42 extern HBITMAP
ConvertInfoBitmap( HDC hdc
, BITMAPINFO
* image
);
43 extern int FindResourceByNumber(struct resource_nameinfo_s
*result_p
,
44 int type_id
, int resource_id
);
45 extern int FindResourceByName(struct resource_nameinfo_s
*result_p
,
46 int type_id
, char *resource_name
);
47 extern HICON
LoadIcon(HANDLE instance
, LPSTR icon_name
);
48 extern HANDLE
RSC_LoadResource(int instance
, char *rsc_name
, int type
,
50 extern int LoadString(HANDLE instance
, WORD resource_id
, LPSTR buffer
, int buflen
);
51 extern HANDLE
RSC_LoadMenu(HANDLE instance
, LPSTR menu_name
);
52 extern HBITMAP
LoadBitmap(HANDLE instance
, LPSTR bmp_name
);
54 /* loader/selector.c */
56 extern int FindUnusedSelectors(int n_selectors
);
57 extern int IPCCopySelector(int i_old
, unsigned long new, int swap_type
);
58 extern WORD
AllocSelector(WORD old_selector
);
59 extern unsigned int PrestoChangoSelector(unsigned src_selector
, unsigned dst_selector
);
60 extern WORD
AllocDStoCSAlias(WORD ds_selector
);
61 extern WORD
FreeSelector(WORD sel
);
62 extern SEGDESC
*CreateNewSegments(int code_flag
, int read_only
, int length
,
64 extern SEGDESC
*GetNextSegment(unsigned int flags
, unsigned int limit
);
65 extern unsigned int GetEntryDLLName(char *dll_name
, char *function
, int *sel
,
67 extern unsigned int GetEntryDLLOrdinal(char *dll_name
, int ordinal
, int *sel
,
69 extern unsigned int GetEntryPointFromOrdinal(struct w_files
* wpnt
,
71 extern SEGDESC
*CreateSelectors(struct w_files
* wpnt
);
75 extern int init_wine_signals(void);
79 extern void myerror(const char *s
);
80 extern void load_mz_header (int, struct mz_header_s
*);
81 extern void load_ne_header (int, struct ne_header_s
*);
83 extern char *GetFilenameFromInstance(unsigned short instance
);
84 extern struct w_files
*GetFileInfo(unsigned short instance
);
85 extern HINSTANCE
LoadImage(char *modulename
, int filetype
);
86 extern int _WinMain(int argc
, char **argv
);
87 extern void InitializeLoadedDLLs();
88 extern int FixupSegment(struct w_files
* wpnt
, int segment_num
);
90 extern struct mz_header_s *CurrentMZHeader;
91 extern struct ne_header_s *CurrentNEHeader;
92 extern int CurrentNEFile;
97 extern int CallBack16(void *func
, int n_args
, ...);
98 extern void *CALLBACK_MakeProcInstance(void *func
, int instance
);
99 extern void CallLineDDAProc(FARPROC func
, short xPos
, short yPos
, long lParam
);
100 extern void winestat(void);
102 /* if1632/callback.c */
104 extern int DLLRelay(unsigned int func_num
, unsigned int seg_off
);
105 extern struct dll_table_entry_s
*FindDLLTable(char *dll_name
);
106 extern int FindOrdinalFromName(struct dll_table_entry_s
*dll_table
, char *func_name
);
107 extern int ReturnArg(int arg
);
109 /* miscemu/int1a.c */
111 extern do_int1A(struct sigcontext_struct
*context
);
113 /* miscemu/int21.c */
115 extern do_int21(struct sigcontext_struct
*context
);
117 /* miscemu/kernel.c */
119 extern int KERNEL_LockSegment(int segment
);
120 extern int KERNEL_UnlockSegment(int segment
);
121 extern KERNEL_InitTask();
122 extern int KERNEL_WaitEvent(int task
);
126 void Comm_Init(void);
127 void Comm_DeInit(void);
131 extern void DOS_InitFS(void);
132 extern WORD
DOS_GetEquipment(void);
133 extern int DOS_ValidDrive(int drive
);
134 extern int DOS_GetDefaultDrive(void);
135 extern void DOS_SetDefaultDrive(int drive
);
136 extern void ToUnix(char *s
);
137 extern void ToDos(char *s
);
138 extern void ChopOffSlash(char *string
);
139 extern int DOS_DisableDrive(int drive
);
140 extern int DOS_EnableDrive(int drive
);
141 extern char *GetUnixFileName(char *dosfilename
);
142 extern char *DOS_GetCurrentDir(int drive
);
143 extern int DOS_ChangeDir(int drive
, char *dirname
);
144 extern int DOS_MakeDir(int drive
, char *dirname
);
145 extern int DOS_GetSerialNumber(int drive
, unsigned long *serialnumber
);
146 extern int DOS_SetSerialNumber(int drive
, unsigned long serialnumber
);
147 extern char *DOS_GetVolumeLabel(int drive
);
148 extern int DOS_SetVolumeLabel(int drive
, char *label
);
149 extern int DOS_GetFreeSpace(int drive
, long *size
, long *available
);
150 extern char *FindFile(char *buffer
, int buflen
, char *rootname
, char **extensions
, char *path
);
151 extern char *WineIniFileName(void);
152 extern char *WinIniFileName(void);
153 extern struct dosdirent
*DOS_opendir(char *dosdirname
);
154 extern struct dosdirent
*DOS_readdir(struct dosdirent
*de
);
155 extern void DOS_closedir(struct dosdirent
*de
);
159 extern void sync_profiles(void);
163 extern void SpyInit(void);
165 /* controls/button.c */
167 extern LONG
ButtonWndProc(HWND hWnd
, WORD uMsg
, WORD wParam
, LONG lParam
);
169 /* controls/combo.c */
171 extern LONG
ComboBoxWndProc(HWND hwnd
, WORD message
, WORD wParam
, LONG lParam
);
173 /* controls/desktop.c */
175 extern LONG
DesktopWndProc (HWND hwnd
, WORD message
, WORD wParam
, LONG lParam
);
176 extern BOOL
DESKTOP_SetPattern(char *pattern
);
178 /* controls/listbox.c */
180 extern LONG
ListBoxWndProc(HWND hwnd
, WORD message
, WORD wParam
, LONG lParam
);
182 /* controls/menu.c */
184 extern LONG
PopupMenuWndProc(HWND hwnd
, WORD message
, WORD wParam
, LONG lParam
);
186 /* controls/scrollbar.c */
188 extern LONG
ScrollBarWndProc(HWND hWnd
, WORD message
, WORD wParam
, LONG lParam
);
190 /* controls/static.c */
192 extern LONG
StaticWndProc(HWND hwnd
, WORD message
, WORD wParam
, LONG lParam
);
194 /* controls/widget.c */
196 extern BOOL
WIDGETS_Init(void);
200 extern void HEAP_Init(MDESC
**free_list
, void *start
, int length
);
201 extern void *HEAP_Alloc(MDESC
**free_list
, int flags
, int bytes
);
202 extern void *HEAP_ReAlloc(MDESC
**free_list
, void *old_block
, int new_size
, unsigned int flags
);
203 extern int HEAP_Free(MDESC
**free_list
, void *block
);
204 extern LHEAP
*HEAP_LocalFindHeap(unsigned short owner
);
205 extern void HEAP_LocalInit(unsigned short owner
, void *start
, int length
);
206 extern void *WIN16_LocalAlloc(int flags
, int bytes
);
207 extern int WIN16_LocalCompact(int min_free
);
208 extern unsigned int WIN16_LocalFlags(unsigned int handle
);
209 extern unsigned int WIN16_LocalFree(unsigned int handle
);
210 extern unsigned int WIN16_LocalInit(unsigned int segment
, unsigned int start
, unsigned int end
);
211 extern void *WIN16_LocalLock(unsigned int handle
);
212 extern void *WIN16_LocalReAlloc(unsigned int handle
, int flags
, int bytes
);
213 extern unsigned int WIN16_LocalSize(unsigned int handle
);
214 extern unsigned int WIN16_LocalUnlock(unsigned int handle
);
216 /* objects/bitmaps.c */
218 extern BOOL
BITMAP_Init(void);
220 /* objects/color.c */
222 extern BOOL
COLOR_Init(void);
226 extern int DIB_BitmapInfoSize(BITMAPINFO
*info
, WORD coloruse
);
228 /* objects/gdiobj.c */
230 extern BOOL
GDI_Init(void);
232 /* objects/palette.c */
234 extern BOOL
PALETTE_Init(void);
236 /* objects/region.c */
238 extern BOOL
REGION_Init(void);
240 /* windows/graphic.c */
242 extern void DrawReliefRect(HDC hdc
, RECT rect
, int thickness
, BOOL pressed
);
246 extern void DCE_Init(void);
248 /* windows/dialog.c */
250 extern BOOL
DIALOG_Init(void);
252 /* windows/syscolor.c */
254 extern void SYSCOLOR_Init(void);
256 /* windows/sysmetrics.c */
258 extern void SYSMETRICS_Init(void);
261 #endif /* _WINE_PROTOTYPES_H */