Example #1
0
/*********************************************************************
*
*       GUI_MEASDEV_Delete
*/
void GUI_MEASDEV_Delete(GUI_MEASDEV_Handle hMemDev) {
  /* Make sure memory device is not used */
  if ((GUI_Context.hDevData = hMemDev) != 0) {
	  GUI_SelectLCD();
  }
  GUI_ALLOC_Free(hMemDev);
}
Example #2
0
/*********************************************************************
*
*       GUI_SelectLayer
*/
unsigned int GUI_SelectLayer(unsigned int Index) {
  unsigned int OldIndex;
  GUI_LOCK();
  OldIndex = GUI_Context.SelLayer;
  if (Index < GUI_NUM_LAYERS) {
    GUI_Context.SelLayer = Index;
    GUI_SelectLCD();
  }
  GUI_UNLOCK();
  return OldIndex;
}
Example #3
0
/*********************************************************************
*
*       GUI_MEASDEV_Select
*/
void GUI_MEASDEV_Select(GUI_MEASDEV_Handle hMem) {
  if (hMem == 0) {
    GUI_SelectLCD();
  } else {
    #if GUI_WINSUPPORT
      WM_Deactivate();
    #endif
    GUI_Context.hDevData     = hMem;
    GUI_Context.pDeviceAPI   = &_APIList;
    GUI_Context.pClipRect_HL = NULL;
    LCD_SetClipRectMax();
  }
}
Example #4
0
static void _InitContext(GUI_CONTEXT* pContext) {
  #if GUI_SUPPORT_MEMDEV
    GUI_SelectLCD();
  #else
    LCD_SetClipRectMax();
  #endif
  pContext->pLCD_HL      = &LCD_HL_APIList;
  pContext->pAFont       = GUI_DEFAULT_FONT;
  pContext->pClipRect_HL = &GUI_Context.ClipRect;
  pContext->PenSize      = 1;
  /* Variables in WM module */
  #if GUI_WINSUPPORT
    pContext->hAWin    = WM_GetDesktopWindow();
  #endif
  /* Variables in GUI_AA module */
  pContext->AA_Factor = 3;
  LCD_SetBkColor(GUI_DEFAULT_BKCOLOR);
  LCD_SetColor(GUI_DEFAULT_COLOR);
}