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
MENU_Init();
21 extern BOOL
WIN_CreateDesktopWindow();
24 /***********************************************************************
27 static BOOL
USER_HeapInit()
29 struct segment_descriptor_s
* s
;
30 s
= GetNextSegment( 0, 0x10000 );
31 if (s
== NULL
) return FALSE
;
32 HEAP_Init( &USER_Heap
, s
->base_addr
, USER_HEAP_SIZE
);
37 /**********************************************************************
40 * Load necessary resources?
43 USER_InitApp(int hInstance
)
50 /* Create USER heap */
51 if (!USER_HeapInit()) return 0;
54 /* Global atom table initialisation */
55 if (!ATOM_Init()) return 0;
57 /* GDI initialisation */
58 if (!GDI_Init()) return 0;
60 /* Initialize system colors and metrics*/
67 /* Initialize built-in window classes */
68 if (!WIDGETS_Init()) return 0;
70 /* Initialize dialog manager */
71 if (!DIALOG_Init()) return 0;
73 /* Initialize menus */
74 if (!MENU_Init()) return 0;
76 /* Create system message queue */
77 queueSize
= GetProfileInt( "windows", "TypeAhead", 120 );
78 if (!MSG_CreateSysMsgQueue( queueSize
)) return 0;
80 /* Create task message queue */
81 queueSize
= GetProfileInt( "windows", "DefaultQueueSize", 8 );
82 if (!SetMessageQueue( queueSize
)) return 0;
84 /* Create desktop window */
85 if (!WIN_CreateDesktopWindow()) return 0;
89 InitializeLoadedDLLs(NULL
);