📄 windemo.c
字号:
/* winDemo.c - WindML Windowing Demo */
/* Copyright 2002 Wind River Systems, Inc. All Rights Reserved */
/*
modification history
--------------------
01d,16oct02,gav Fixed build warnings.
01c,02oct02,rfm Fixed winBall and winHello externs.
01b,29aug02,msr Removed #if 0 code for winPerf and winSpy.
01a,17may02,msr Created.
*/
#include <ugl/uglWin.h>
#include <ugl/winMgr/wwm/wwm.h>
extern void winBall (void);
extern void winHello (void);
typedef struct app_item
{
UGL_CHAR * appName;
void (* pFunc) (void *);
void * pParam;
} APP_ITEM;
UGL_LOCAL APP_ITEM apps [] =
{
{ "winBall", (void (* ) (void *)) winBall, UGL_NULL },
{ "winHello", (void (* ) (void *)) winHello, UGL_NULL },
{ UGL_NULL, UGL_NULL, UGL_NULL }
};
void showwin (void)
{
int i;
winInit ();
for (i = 0; apps [i].appName != UGL_NULL; i++)
wwmTaskBarMenuAdd (apps [i].appName, apps [i].pFunc, apps [i].pParam);
}
#if defined(WINDML_NATIVE) && defined(__unix__)
int main (int argc, char *argv [])
{
int i;
winInit();
for (i = 0; apps [i].appName != UGL_NULL; i++)
wwmTaskBarMenuAdd (apps [i].appName, apps [i].pFunc, apps [i].pParam);
while (1)
{
fd_set readSet;
struct timeval timeValue;
FD_ZERO(&readSet);
timeValue.tv_sec = (1000 / 1000);
timeValue.tv_usec = (1000 % 1000) * 1000;
select(FD_SETSIZE, &readSet, (fd_set *) 0, (fd_set *) 0, &timeValue);
}
return (0);
}
#elif defined(WINDML_NATIVE) && defined(_WIN32)
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
int i;
uglWin32Parameters(hInstance, hPrevInstance, lpCmdLine, nShowCmd);
winInit();
for (i = 0; apps [i].appName != UGL_NULL; i++)
wwmTaskBarMenuAdd (apps [i].appName, apps [i].pFunc, apps [i].pParam);
while (1)
{
Sleep(1000);
}
return (0);
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -