예제 #1
0
/*********************************************************************
*
*       _Main
*/
static void _Main(void) {
  int xSize;
  int ySize;

  WM_SelectWindow(WM_HBKWIN);
  GUI_Clear();
  #if (GUI_SUPPORT_CURSOR | GUI_SUPPORT_TOUCH)
//    GUI_CURSOR_Show();
  #endif
  //
  // Create and configure Control and Information window
  //
  xSize           = LCD_GetXSize();
  ySize           = LCD_GetYSize();
  _hDialogControl = GUI_CreateDialogBox(_aFrameWinControl, GUI_COUNTOF(_aFrameWinControl), &_cbFrameWinControl, WM_HBKWIN, xSize - CONTROL_SIZE_X, ySize - CONTROL_SIZE_Y);
  _hDialogInfo    = GUI_CreateDialogBox(_aFrameWinInfo,    GUI_COUNTOF(_aFrameWinInfo),    &_cbFrameWinInfo,    WM_HBKWIN, (xSize >> 1) - 1,       0);
  WM_HideWindow(_hDialogInfo);
  //
  // Show Intro
  //
  WM_InvalidateWindow(_hDialogControl);
  WM_DisableMemdev(WM_HBKWIN);
  GUI_Exec();
  WM_EnableMemdev(WM_HBKWIN);
  
  GUI_SetBkColor(GUI_RED);
  GUI_Clear();
  GUI_SetBkColor(GUI_GREEN);
  GUI_Clear();
  GUI_SetBkColor(GUI_BLUE);
  GUI_Clear();
  
  GUIDEMO_Intro();
  //
  // Run the demos
  //
  for (_iDemo = 0; _GUIDemoConfig.apFunc[_iDemo]; _iDemo++) {
    _ClearHalt();
    GUIDEMO_UpdateControlText();
    (*_GUIDemoConfig.apFunc[_iDemo])();
    _iDemoMinor = 0;
    _Pressed    = 0;
    
   
  }
  _iDemo = 0;
  //
  // Cleanup
  //
  WM_DeleteWindow(_hDialogControl);
  WM_DeleteWindow(_hDialogInfo);
  #if (GUI_SUPPORT_CURSOR | GUI_SUPPORT_TOUCH)
    GUI_CURSOR_Hide();
  #endif
}
예제 #2
0
/*********************************************************************
*
*       GUIDEMO_NotifyStartNext
*
*   Use this function if the next step of the current sample will be
*   shown immediately
*/
void GUIDEMO_NotifyStartNext(void) {
  _iDemoMinor++;
  _ClearHalt();
  GUIDEMO_UpdateControlText();
}