本文整理汇总了C++中GUIDEMO_Delay函数的典型用法代码示例。如果您正苦于以下问题:C++ GUIDEMO_Delay函数的具体用法?C++ GUIDEMO_Delay怎么用?C++ GUIDEMO_Delay使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GUIDEMO_Delay函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _Show
static void _Show(const char* s0, const char* s1) {
GUIDEMO_SetColor(GUI_WHITE);
#if (LCD_YSIZE < 160)
GUI_SetFont(&GUI_Font8_ASCII);
#else
GUI_SetFont(&GUI_Font13B_ASCII);
#endif
GUI_DispString("\n");
#if (LCD_YSIZE < 128)
GUIDEMO_Delay(200);
GUI_GotoXY(0, LCD_YSIZE / 2 - 6);
GUI_ClearRect(0, 24, LCD_XSIZE - 1, LCD_YSIZE - 1);
GUIDEMO_Delay(200);
#endif
GUI_DispString(s0);
GUIDEMO_Delay(500);
#if GUIDEMO_LARGE
GUI_GotoX(110);
GUIDEMO_SetColor(GUI_GREEN);
#else
GUI_GotoX(100);
GUIDEMO_SetColor(GUI_BLUE);
#endif
#if (LCD_XSIZE < 320)
GUI_DispString("\n");
#if (LCD_XSIZE < 200)
GUI_GotoX(10);
#else
GUI_GotoX(LCD_XSIZE / 6);
#endif
#endif
GUI_DispString(s1);
GUIDEMO_Delay(1500);
}
示例2: GUIDEMO_Intro
void GUIDEMO_Intro(void) {
int xCenter = LCD_GET_XSIZE() / 2;
int y;
char acText[50] = "Version of uC/GUI: ";
strcat(acText, GUI_GetVersionString());
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_YELLOW);
GUI_Clear();
GUI_SetFont(&GUI_Font13B_1);
GUI_DispStringHCenterAt("uC/GUI", xCenter, y= 10);
GUI_SetFont(&GUI_Font10_ASCII);
GUI_SetColor(GUI_WHITE);
GUI_DispStringHCenterAt("Universal graphic software"
"\nfor embedded applications"
, xCenter, y += 20);
GUI_SetFont(&GUI_Font10S_ASCII);
GUI_DispStringHCenterAt("Compiled " __DATE__ " "__TIME__, xCenter, y += 25);
GUI_DispStringHCenterAt(acText, xCenter, y += 16);
GUIDEMO_Delay(5000);
GUI_Clear();
GUI_DrawBitmap(&bmMicriumLogo, (LCD_GET_XSIZE() - bmMicriumLogo.XSize) / 2, 6);
GUI_SetFont(&GUI_Font13B_1);
GUI_DispStringHCenterAt("www.micrium.com", LCD_GET_XSIZE() / 2, LCD_GET_YSIZE() - 50);
GUIDEMO_Delay(5000);
}
示例3: _DemoHideShowChild
/*******************************************************************
*
* _DemoHideShowChild
Demonstrates the use of WM_HideWindow and WM_ShowWindow
*/
static void _DemoHideShowChild(void) {
_ChangeInfoText("WM_HideWindow(Child)");
// GUIDEMO_Delay(SPEED);
WM_HideWindow(_hChild);
GUIDEMO_Delay(SPEED);
_ChangeInfoText("WM_ShowWindow(Child)");
GUIDEMO_Delay(SPEED);
WM_ShowWindow(_hChild);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例4: _DemoCreateWindow
/*******************************************************************
*
* _DemoCreateWindow
Demonstrates the use of WM_CreateWindow
*/
static void _DemoCreateWindow(void) {
/* Set callback for background window */
_cbBkWindowOld = WM_SetCallback(WM_HBKWIN, _cbBkWindow);
/* Create windows */
_ChangeInfoText("WM_CreateWindow()");
// GUIDEMO_Delay(SPEED);
_hWindow1 = WM_CreateWindow( 50, 70, 165, 100, WM_CF_SHOW | WM_CF_MEMDEV, _cbWindow1, 0);
GUIDEMO_Delay(SPEED/3);
_hWindow2 = WM_CreateWindow(105, 125, 165, 100, WM_CF_SHOW | WM_CF_MEMDEV, _cbWindow2, 0);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例5: GUIDEMO_DemoFrameWin
/*********************************************************************
*
* GUIDEMO_DemoFrameWin
*/
void GUIDEMO_DemoFrameWin(void) {
FRAMEWIN_Handle hFrame;
LISTBOX_Handle hListBox;
int xSize = LCD_GetXSize();
int ySize = LCD_GetYSize();
int i, x, y, w, h;
const GUI_FONT* pFont = &GUI_FontComic18B_1;
GUI_COLOR DesktopColorOld;
#if GUIDEMO_LARGE
GUIDEMO_ShowIntro("Frame Window & Listbox", NULL);
#else
GUIDEMO_ShowIntro("Frame Window\n & Listbox", NULL);
#endif
DesktopColorOld = GUIDEMO_SetBkColor(GUI_RED);
DesktopColorOld = WM_SetDesktopColor(DesktopColorOld); /* Automatically update desktop window */
x = BORDER;
#if GUIDEMO_LARGE
y = 75;
#else
y = BORDER;
#endif
w = xSize - x - BORDER;
h = ySize - y - BORDER;
if (w > 140) {
w = 140;
}
if (h > 120) {
h = 120;
}
hFrame = FRAMEWIN_Create("Select language", NULL, WM_CF_SHOW, x, y, w, h);
FRAMEWIN_SetActive(hFrame, 1);
FRAMEWIN_SetMoveable(hFrame, 1);
FRAMEWIN_AddMaxButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 0);
FRAMEWIN_AddMinButton(hFrame, FRAMEWIN_BUTTON_RIGHT, 1);
FRAMEWIN_SetFont(hFrame, &GUI_Font13_ASCII);
hListBox = LISTBOX_CreateAsChild(_asLang, WM_GetClientWindow(hFrame), 0, 0, 0, 0, WM_CF_SHOW | WM_SF_ANCHOR_LEFT | WM_SF_ANCHOR_TOP | WM_SF_ANCHOR_RIGHT | WM_SF_ANCHOR_BOTTOM);
WM_SetFocus(hListBox);
LISTBOX_SetFont(hListBox, pFont);
GUIDEMO_Wait();
for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) {
LISTBOX_IncSel(hListBox);
GUIDEMO_Delay(250);
}
for (i = 0; (i < 10) && !GUIDEMO_CheckCancel(); i++) {
LISTBOX_DecSel(hListBox);
GUIDEMO_Delay(250);
}
GUIDEMO_Delay(500);
LISTBOX_Delete(hListBox);
FRAMEWIN_Delete(hFrame);
WM_SetDesktopColor(DesktopColorOld);
}
示例6: _DemoDeleteWindow
/*******************************************************************
*
* _DemoDeleteWindow
Demonstrates the use of WM_DeleteWindow
*/
static void _DemoDeleteWindow(void) {
_ChangeInfoText("WM_DeleteWindow()");
// GUIDEMO_Delay(SPEED);
WM_DeleteWindow(_hWindow2);
GUIDEMO_Delay(SPEED/3);
WM_DeleteWindow(_hWindow1);
GUIDEMO_Delay(SPEED);
_ChangeInfoText("");
GUIDEMO_Delay(SPEED);
/* Restore background callback and window colors */
WM_SetCallback(WM_HBKWIN, _cbBkWindowOld);
_WindowColor1 = GUI_GREEN;
_WindowColor2 = GUI_RED;
}
示例7: _DemoHideShowParent
/*******************************************************************
*
* _DemoHideShowParent
Demonstrates the use of WM_HideWindow and WM_ShowWindow
*/
static void _DemoHideShowParent(void) {
_ChangeInfoText("WM_HideWindow(Parent)");
// GUIDEMO_Delay(SPEED);
WM_HideWindow(_hWindow2);
GUIDEMO_Delay(SPEED/3);
WM_HideWindow(_hWindow1);
GUIDEMO_Delay(SPEED);
_ChangeInfoText("WM_ShowWindow(Parent)");
GUIDEMO_Delay(SPEED);
WM_ShowWindow(_hWindow1);
GUIDEMO_Delay(SPEED/3);
WM_ShowWindow(_hWindow2);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例8: _DemoBringToBottom
/*******************************************************************
*
* _DemoBringToBottom
Demonstrates the use of WM_BringToBottom
*/
static void _DemoBringToBottom(void) {
_ChangeInfoText("WM_BringToBottom()");
// GUIDEMO_Delay(SPEED);
WM_BringToBottom(_hWindow1);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例9: _DemoResizeWindow
/*******************************************************************
*
* _DemoResizeWindow
Demonstrates the use of WM_ResizeWindow
*/
static void _DemoResizeWindow(void) {
int i, tm,tDiff;
_ChangeInfoText("WM_ResizeWindow()");
// GUIDEMO_Delay(SPEED);
_LiftUp(30);
for (i = 0; i < 40; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, 1, 1);
WM_ResizeWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 80; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, -1, -1);
WM_ResizeWindow(_hWindow2, 1, 1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 40; i++) {
tm = GUI_GetTime();
WM_ResizeWindow(_hWindow1, 1, 1);
WM_ResizeWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
_LiftDown(30);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例10: GUIDEMO_HardwareInfo
void GUIDEMO_HardwareInfo(void) {
#if (LCD_CONTROLLER == 1375) | (LCD_CONTROLLER == 13705) | (LCD_CONTROLLER == 1386) | (LCD_CONTROLLER == 13806)
GUIDEMO_ShowIntro("Hardware info", "" );
GUI_Clear();
#if GUIDEMO_LARGE
GUI_SetFont(&GUI_FontComic24B_ASCII);
#else
GUI_SetFont(&GUI_FontComic18B_ASCII);
#endif
GUIDEMO_SetColor(GUI_WHITE);
#if (LCD_CONTROLLER == 1375) | (LCD_CONTROLLER == 13705)
#if GUIDEMO_LARGE
GUI_DispStringAt("EPSON 13705\n", 10, 65 );
#else
GUI_DispStringHCenterAt("EPSON 13705\n", LCD_XSIZE >> 1, LCD_YSIZE / 14);
#endif
_Show("On chip VRAM", "80 kb");
_Show("Max. colors", "4096 (4 bit per color)");
_Show("Display types", "Mono / color / TFT");
_Show("LUT", "256 index colors");
#elif (LCD_CONTROLLER == 1386) | (LCD_CONTROLLER == 13806)
#if GUIDEMO_LARGE
GUI_DispStringAt("EPSON 13806\n", 10, 65 );
#else
GUI_DispStringHCenterAt("EPSON 13806\n", LCD_XSIZE >> 1, LCD_YSIZE / 14);
#endif
_Show("On chip VRAM", "1200 kb");
_Show("Max. colors", "65536 (up to 16 bpp)");
_Show("Display types", "Mono / color / TFT (analog / digital)");
_Show("LUT", "256 index colors");
#endif
GUIDEMO_Delay(1500);
#endif
}
示例11: GUIDEMO_ShowIntro
void GUIDEMO_ShowIntro(const char * s, const char * sExp) {
GUI_CONTEXT ContextOld;
GUI_SaveContext(&ContextOld);
_sInfo = s;
_sExplain = sExp;
GUI_SetDefault();
GUIDEMO_HideInfoWin();
GUI_SetBkColor(GUI_BLUE);
GUI_SetColor(GUI_WHITE);
GUI_Clear();
//GUI_SetFont(&GUI_FontComic18B_ASCII);
GUI_SetFont(&GUI_FontHZ12);
GUI_DispStringHCenterAt(s, LCD_GET_XSIZE() / 2, LCD_GET_YSIZE() / 3 - 10);
if (_sExplain) {
GUI_SetFont(&GUI_Font8_ASCII);
GUI_DispStringHCenterAt(_sExplain, LCD_GET_XSIZE() / 2, LCD_GET_YSIZE() / 2 - 10);
}
GUIDEMO_Delay(_sExplain ? 2000 : 4000);
#if GUI_WINSUPPORT
_UpdateInfoWin();
_UpdateCmdWin();
#endif
GUI_RestoreContext(&ContextOld);
#if GUI_WINSUPPORT
WM_ExecIdle();
#endif
GUIDEMO_NotifyStartNext();
GUI_SetBkColor(GUI_RED);
GUI_Clear();
}
示例12: _DemoInvalidateWindow
/*******************************************************************
*
* _DemoInvalidateWindow
Demonstrates the use of WM_InvalidateWindow
*/
static void _DemoInvalidateWindow(void) {
_ChangeInfoText("WM_InvalidateWindow()");
_WindowColor1 = GUI_BLUE;
// GUIDEMO_Delay(SPEED);
WM_InvalidateWindow(_hWindow1);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例13: _DemoSetCallback
/*******************************************************************
*
* _DemoSetCallback
Demonstrates the use of WM_SetCallback
*/
static void _DemoSetCallback(void) {
_ChangeInfoText("WM_SetCallback()");
// GUIDEMO_Delay(SPEED);
WM_SetCallback(_hWindow1, _cbDemoCallback1);
WM_InvalidateWindow(_hWindow1);
GUIDEMO_Delay(SPEED/2);
WM_SetCallback(_hWindow2, _cbDemoCallback2);
WM_InvalidateWindow(_hWindow2);
GUIDEMO_Delay(SPEED*3);
WM_SetCallback(_hWindow1, _cbWindow1);
WM_InvalidateWindow(_hWindow1);
GUIDEMO_Delay(SPEED/2);
WM_SetCallback(_hWindow2, _cbWindow2);
WM_InvalidateWindow(_hWindow2);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例14: _DemoRedrawing
/*******************************************************************
*
* _DemoRedrawing
Demonstrates how useful can be a callback
*/
static void _DemoRedrawing(void) {
int i, tm, tDiff;
_ChangeInfoText("Demonstrating redrawing");
// GUIDEMO_Delay(SPEED);
_LiftUp(40);
GUIDEMO_Delay(SPEED/3);
_ChangeInfoText("Using a callback for redrawing");
GUIDEMO_Delay(SPEED/3);
for (i = 0; i < 55; i++) {
tm = GUI_GetTime();
WM_MoveWindow(_hWindow1, 1, 1);
WM_MoveWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 55; i++) {
tm = GUI_GetTime();
WM_MoveWindow(_hWindow1, -1, -1);
WM_MoveWindow(_hWindow2, 1, 1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
GUIDEMO_Delay(SPEED/4);
_LiftDown(30);
GUIDEMO_Delay(SPEED/2);
_ChangeInfoText("Without redrawing");
GUIDEMO_Delay(SPEED);
_LiftUp(30);
GUIDEMO_Delay(SPEED/4);
WM_SetCallback(WM_HBKWIN, _cbBkWindowOld);
for (i = 0; i < 55; i++) {
tm = GUI_GetTime();
WM_MoveWindow(_hWindow1, 1, 1);
WM_MoveWindow(_hWindow2, -1, -1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
for (i = 0; i < 55; i++) {
tm = GUI_GetTime();
WM_MoveWindow(_hWindow1, -1, -1);
WM_MoveWindow(_hWindow2, 1, 1);
tDiff = 15 - (GUI_GetTime() - tm);
GUI_Delay(tDiff);
}
GUIDEMO_Delay(SPEED/3);
WM_SetCallback(WM_HBKWIN, _cbBkWindow);
_LiftDown(40);
GUIDEMO_Delay(SPEED);
GUIDEMO_NotifyStartNext();
}
示例15: _DemoVScreen
/*********************************************************************
*
* _DemoVScreen
*/
static void _DemoVScreen(void) {
GUI_RECT Rect;
unsigned j;
int xSize;
int ySize;
int n;
int aDelay[] = { 20, 5 };
xSize = LCD_GetXSize();
ySize = LCD_GetYSize();
GUI_SetFont(&GUI_FontComic24B_ASCII);
GUI_SetTextMode(GUI_TM_TRANS);
Rect.x0 = 0;
Rect.y0 = 0;
Rect.x1 = xSize - 1;
Rect.y1 = ySize - 1;
GUI_SetColor(GUI_WHITE);
GUI_DispStringInRect("Default screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
GUI_Delay(250);
Rect.y0 += ySize;
Rect.y1 += ySize;
GUI_DrawGradientV(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 0xFFFFFF, 0x000000);
Rect.y1 -= ySize / 3;
GUI_SetColor(GUI_DARKGREEN);
GUI_DispStringInRect("Here is the virtual screen", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER);
n = ySize / 5;
for (j = 0; j < GUI_COUNTOF(aDelay); j++) {
if (_Loop(0, 5, n, aDelay[j]) == 1) {
return;
}
GUI_SetOrg(0, ySize);
GUI_Delay(250);
if (_Loop(ySize, -5, n, aDelay[j]) == 1) {
return;
}
GUI_SetOrg(0, 0);
GUI_Delay(250);
if (GUIDEMO_CheckCancel()) {
return;
}
}
for (j = 0; j < 5; j++) {
GUI_SetOrg(0, ySize);
GUI_Delay(200);
GUI_SetOrg(0, 0);
GUI_Delay(200);
if (GUIDEMO_CheckCancel()) {
return;
}
}
GUIDEMO_Delay(1000);
}