mirror of
https://github.com/reactos/wine.git
synced 2024-12-13 22:58:37 +00:00
0623a6f3cf
Sun Jan 18 17:05:58 1998 Alexandre Julliard <julliard@lrc.epfl.ch> * [include/stackframe.h] [tools/build.c] Some cleanups in stack frame building. * [misc/port.c] Implemented clone() wrapper for libc5 users. * [scheduler/mutex.c] [scheduler/synchro.c] Implemented abandoned mutexes. * [scheduler/process.c] [scheduler/thread.c] We now create a process and a thread structure as soon as possible during initialization. * [scheduler/thread.c] [scheduler/sysdeps.c] Moved system-specific thread handling to sysdeps.c. Fri Jan 16 10:45:15 1998 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [graphics/ddraw.c][include/ddraw.h] Surface handling enhanced. Some stuff already works ;) * [multimedia/dsound.c][include/dsound.h] Implemented using the Open Sound System. Slowly starts to work (sounds terrible for some programs). * [configure.in][multimedia/audio.c][include/config.h.in] Added check for OpenSoundSystem, fixed -lXxf86dga check. Replaced OS #ifdefs by #ifdef HAVE_OSS in mm/audio.c. * [if1632/relay.c][relay32/relay386.c] Do not print control characters for 'str' or 'wstr' args. * [misc/registry.c] "" seems to equals NULL in keynames. Replace where needed. Seems to help the win95 regedit.exe... * [win32/newfns.c] Implemented QueryPerformance* using gettimeofday(2) (should be done using the pentium timers probably). * [tools/ipcl] Removed useless open_pipe construct. Sun Jan 11 17:10:02 1998 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [objects/region.c] [include/region.h] [graphics/x11drv/clipping.c] Regions are now internal to Wine. The basis of this code is taken from the X11 distribution. GetRegionData() is implemented as is ExtCreateRegion() (without Xforms). CreatePolyPolygonRgn() should behave correctly now. * [objects/metafile.c] [graphics/metafiledrv/graphics.c] [graphics/metafiledrv/init.c] [include/metafile.h] [include/metafiledrv.h] Playback of META_CREATEREGION should now work. Implemented recording of META_CREATEREGION and META_PAINTREGION. * [graphics/x11drv/graphics.c] FillRgn() (and therefore its friends) respect logical co-ords. Wed Jan 7 01:21:45 1998 Steinar Hamre <steinarh@stud.fim.ntnu.no> * [configure.in] [include/acconfig.h] [tools/build.c] Now checking whether to use .string or .ascii. * [configure.in] [include/acconfig.h] [scheduler/critsection.c] Defining union semun if this is not available from header files. * [misc/lstr.c] Moved wine's own header files below <wctype.h> to avoid parse error on Solaris. Sun Jan 4 15:38:07 1998 Andrew Taylor <ataylor@cadvision.com> * [multimedia/mmsystem.c] [multimedia/mmio.c] Implemented mmioSendMessage and rearranged the mmio subsystem in terms of this function. Wed Dec 24 00:51:29 1997 Charles Duffy <cduffy@bigfoot.com> * [windows/clipboard.c] [relay32/user32.spec] GetPriorityClipboardFormat32 now has something other than just a stub. I have no idea if it works (can't test until SetClipboardData is finished) but HEdit likes things a lot more this way.
185 lines
4.2 KiB
C
185 lines
4.2 KiB
C
/*
|
|
* Main initialization code
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <sys/types.h>
|
|
#include <sys/stat.h>
|
|
#include <fcntl.h>
|
|
#include <unistd.h>
|
|
#include <string.h>
|
|
#include <errno.h>
|
|
#include "windows.h"
|
|
#include "module.h"
|
|
#include "selectors.h"
|
|
#include "bitmap.h"
|
|
#include "comm.h"
|
|
#include "win.h"
|
|
#include "menu.h"
|
|
#include "atom.h"
|
|
#include "dialog.h"
|
|
#include "drive.h"
|
|
#include "queue.h"
|
|
#include "sysmetrics.h"
|
|
#include "file.h"
|
|
#include "gdi.h"
|
|
#include "heap.h"
|
|
#include "keyboard.h"
|
|
#include "miscemu.h"
|
|
#include "neexe.h"
|
|
#include "options.h"
|
|
#include "spy.h"
|
|
#include "task.h"
|
|
#include "tweak.h"
|
|
#include "user.h"
|
|
#include "dce.h"
|
|
#include "shell.h"
|
|
#include "winproc.h"
|
|
#include "stddebug.h"
|
|
#include "debug.h"
|
|
|
|
|
|
int __winelib = 1; /* Winelib run-time flag */
|
|
|
|
/***********************************************************************
|
|
* Kernel initialisation routine
|
|
*/
|
|
BOOL32 MAIN_KernelInit(void)
|
|
{
|
|
extern BOOL32 EVENT_Init(void);
|
|
extern BOOL32 PROCESS_Init(void);
|
|
extern BOOL32 VIRTUAL_Init(void);
|
|
|
|
/* Initialize virtual memory management */
|
|
if (!VIRTUAL_Init()) return FALSE;
|
|
|
|
/* Create the system and SEGPTR heaps */
|
|
if (!(SystemHeap = HeapCreate( HEAP_GROWABLE, 0x10000, 0 ))) return FALSE;
|
|
if (!(SegptrHeap = HeapCreate( HEAP_WINE_SEGPTR, 0, 0 ))) return FALSE;
|
|
|
|
/* Create the initial process */
|
|
if (!PROCESS_Init()) return FALSE;
|
|
|
|
/* Initialize signal handling */
|
|
if (!SIGNAL_Init()) return FALSE;
|
|
|
|
/* Load the configuration file */
|
|
if (!PROFILE_LoadWineIni()) return FALSE;
|
|
|
|
/* Initialize DOS memory */
|
|
if (!DOSMEM_Init()) return FALSE;
|
|
|
|
/* Initialise DOS drives */
|
|
if (!DRIVE_Init()) return FALSE;
|
|
|
|
/* Initialise DOS directories */
|
|
if (!DIR_Init()) return FALSE;
|
|
|
|
/* Initialize tasks */
|
|
if (!TASK_Init()) return FALSE;
|
|
|
|
/* Initialize event handling */
|
|
if (!EVENT_Init()) return FALSE;
|
|
|
|
/* Initialize communications */
|
|
COMM_Init();
|
|
|
|
/* Initialize IO-port permissions */
|
|
IO_port_init();
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* USER (and GDI) initialisation routine
|
|
*/
|
|
BOOL32 MAIN_UserInit(void)
|
|
{
|
|
extern BOOL32 WIDGETS_Init(void);
|
|
|
|
int queueSize;
|
|
|
|
/* Create USER and GDI heap */
|
|
if (!USER_HeapSel)
|
|
{
|
|
USER_HeapSel = GlobalAlloc16( GMEM_FIXED, 0x10000 );
|
|
LocalInit( USER_HeapSel, 0, 0xffff );
|
|
}
|
|
if (!GDI_HeapSel)
|
|
{
|
|
GDI_HeapSel = GlobalAlloc16( GMEM_FIXED, GDI_HEAP_SIZE );
|
|
LocalInit( GDI_HeapSel, 0, GDI_HEAP_SIZE-1 );
|
|
}
|
|
|
|
/* Initialize Wine tweaks */
|
|
if (!TWEAK_Init()) return FALSE;
|
|
|
|
/* Initialize OEM Bitmaps */
|
|
if (!OBM_Init()) return FALSE;
|
|
|
|
/* registry initialisation */
|
|
SHELL_LoadRegistry();
|
|
|
|
/* Global atom table initialisation */
|
|
if (!ATOM_Init()) return FALSE;
|
|
|
|
/* GDI initialisation */
|
|
if (!GDI_Init()) return FALSE;
|
|
|
|
/* Initialize system colors and metrics*/
|
|
SYSMETRICS_Init();
|
|
SYSCOLOR_Init();
|
|
|
|
/* Create the DCEs */
|
|
DCE_Init();
|
|
|
|
/* Initialize keyboard */
|
|
if (!KEYBOARD_Init()) return FALSE;
|
|
|
|
/* Initialize window procedures */
|
|
if (!WINPROC_Init()) return FALSE;
|
|
|
|
/* Initialize built-in window classes */
|
|
if (!WIDGETS_Init()) return FALSE;
|
|
|
|
/* Initialize dialog manager */
|
|
if (!DIALOG_Init()) return FALSE;
|
|
|
|
/* Initialize menus */
|
|
if (!MENU_Init()) return FALSE;
|
|
|
|
/* Create desktop window */
|
|
if (!WIN_CreateDesktopWindow()) return FALSE;
|
|
|
|
/* Initialize message spying */
|
|
if (!SPY_Init()) return FALSE;
|
|
|
|
/* Check wine.conf for old/bad entries */
|
|
if (!TWEAK_CheckConfiguration()) return FALSE;
|
|
|
|
/* Create system message queue */
|
|
queueSize = GetProfileInt32A( "windows", "TypeAhead", 120 );
|
|
if (!QUEUE_CreateSysMsgQueue( queueSize )) return FALSE;
|
|
|
|
/* Set double click time */
|
|
SetDoubleClickTime32( GetProfileInt32A("windows","DoubleClickSpeed",452) );
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* Winelib initialisation routine
|
|
*/
|
|
int MAIN_WinelibInit(void)
|
|
{
|
|
/* Initialize the kernel */
|
|
if (!MAIN_KernelInit()) return 0;
|
|
|
|
/* Initialize all the USER stuff */
|
|
if (!MAIN_UserInit()) return 0;
|
|
return 1;
|
|
}
|