1 static char RCSId
[] = "$Id: user.c,v 1.2 1993/07/04 04:04:21 root Exp root $";
2 static char Copyright
[] = "Copyright Robert J. Amstadt, 1993";
6 #include "prototypes.h"
11 #define USER_HEAP_SIZE 0x10000
14 MDESC
*USER_Heap
= NULL
;
17 extern BOOL
ATOM_Init();
18 extern BOOL
GDI_Init();
19 extern void SYSMETRICS_Init();
20 extern BOOL
WIN_CreateDesktopWindow();
23 /***********************************************************************
26 static BOOL
USER_HeapInit()
28 struct segment_descriptor_s
* s
;
29 s
= GetNextSegment( 0, 0x10000 );
30 if (s
== NULL
) return FALSE
;
31 HEAP_Init( &USER_Heap
, s
->base_addr
, USER_HEAP_SIZE
);
36 /**********************************************************************
39 * Load necessary resources?
42 USER_InitApp(int hInstance
)
49 /* Create USER heap */
50 if (!USER_HeapInit()) return 0;
53 /* Global atom table initialisation */
54 if (!ATOM_Init()) return 0;
56 /* GDI initialisation */
57 if (!GDI_Init()) return 0;
59 /* Initialize system colors and metrics*/
66 /* Initialize built-in window classes */
67 if (!WIDGETS_Init()) return 0;
69 /* Initialize dialog manager */
70 if (!DIALOG_Init()) return 0;
72 /* Create system message queue */
73 queueSize
= GetProfileInt( "windows", "TypeAhead", 120 );
74 if (!MSG_CreateSysMsgQueue( queueSize
)) return 0;
76 /* Create task message queue */
77 queueSize
= GetProfileInt( "windows", "DefaultQueueSize", 8 );
78 if (!SetMessageQueue( queueSize
)) return 0;
80 /* Create desktop window */
81 if (!WIN_CreateDesktopWindow()) return 0;
85 InitializeLoadedDLLs(NULL
);