示例#1
0
GHandle gwinCreateConsole(GConsoleObject *gc, coord_t x, coord_t y, coord_t width, coord_t height, font_t font) {
	if (!(gc = (GConsoleObject *)_gwinInit((GWindowObject *)gc, x, y, width, height, sizeof(GConsoleObject))))
		return 0;
	gc->gwin.type = GW_CONSOLE;
	gwinSetFont(&gc->gwin, font);
	gc->stream.vmt = &GWindowConsoleVMT;
	gc->cx = 0;
	gc->cy = 0;
	return (GHandle)gc;
}
示例#2
0
void gfxInit(void) {
	static bool_t	initDone = FALSE;

	/* Ensure we only initialise once */
	if (initDone)
		return;
	initDone = TRUE;

	/* These must be initialised in the order of their dependancies */
	_gosInit();
	#if GFX_USE_GMISC
		_gmiscInit();
	#endif
	#if GFX_USE_GEVENT
		_geventInit();
	#endif
	#if GFX_USE_GTIMER
		_gtimerInit();
	#endif
	#if GFX_USE_GDISP
		_gdispInit();
		gdispClear(Black);
	#endif
	#if GFX_USE_GWIN
		_gwinInit();
	#endif
	#if GFX_USE_GINPUT
		_ginputInit();
	#endif
	#if GFX_USE_TDISP
		_tdispInit();
		tdispHome();
		tdispClear();
	#endif
	#if GFX_USE_GADC
		_gadcInit();
	#endif
	#if GFX_USE_GAUDIN
		_gaudinInit();
	#endif
	#if GFX_USE_GAUDOUT
		_gaudoutInit();
	#endif
}