/********************************************************************* * * GUI_SelectLCD */ void GUI_SelectLCD(void) { GUI_LOCK(); #if GUI_SUPPORT_DEVICES LCD_SelectLCD(); LCD_UpdateColorIndices(); #if GUI_WINSUPPORT WM_Activate(); #endif #endif GUI_UNLOCK(); }
void GUI_SelectLCD(void) { int hDevDataOld = GUI_Context.hDevData; GUI_Context.hDevData = 0; GUI_Context.pDeviceAPI = &LCD_L0_APIList; GUI_Context.pClipRect_HL = &GUI_Context.ClipRect; LCD_SetClipRectMax(); /* If we are switching batck, restore the former clip rect */ if (hDevDataOld) GUI_Context.ClipRect = GUI_Context.ClipRectPrev; #if GUI_WINSUPPORT WM_Activate(); #endif }
/* ***************************************************************** * * * WM_Init * * * ***************************************************************** */ void WM_Init(void) { if (!_IsInited) { WM_HWIN hWin; NextDrawWin = WM__FirstWin = WM_HWIN_NULL; GUI_Context.WM__pUserClipRect = NULL; WM__NumWindows = WM__NumInvalidWindows =0; /* Make sure we have at least one window. This greatly simplifies the drawing routines as they do not have to check if the window is valid. */ hWin = WM_CreateWindow(0, 0, GUI_XMAX, GUI_YMAX, WM_CF_SHOW, cbBackWin, 0); WM_SelectWindow(hWin); WM_Activate(); _IsInited =1; } }