⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 windemo.c

📁 2410/vxworks/tornado下的基本实验包括 serial,ramdrv,interrupt,multi-FTP,TCP,UDP-Under the basic experimental
💻 C
字号:
/* winDemo.c - WindML Windowing Demo *//* Copyright 2002-2003 Wind River Systems, Inc. All Rights Reserved *//*modification history--------------------01h,16apr03,jlb  Updated comments and documentation01g,02apr03,jlb  Corrected Diab compiler warning - missing include01f,06mar03,jlb  Changed menu item add function call to window manager		 independent function - winMgrTaskBarMenuAdd (SPR86610)01e,19nov02,rbp  Modified code associated with native drivers.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.*//*DESCRIPTIONThis example program initializes the window manager, adding items to thetask bar to initiate example windowing programs.  The program is started by executing the application's entry point, winDemo.*//* includes */              #include <ugl/uglWin.h>#include <ugl/winManage.h>/* declaration of available programs */extern void winBall (void);extern void winHello (void);/* Data structure defining the programs to initiate from the task bar */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 }    };/**************************************************************************** winDemo - initialize the windowing demonstration program** This routine initializes the window manager and then populates the* task bar with menu slections for each of the example programs.** RETURNS: ** ERRNO: N/A** SEE ALSO: winHello(), winBall()  **/void winDemo (void)    {    int i;    /* Initialize the window manager */    winInit ();    /* Add the tasks items to the task bar */    for (i = 0; apps[i].appName != UGL_NULL; i++)        winMgrTaskBarMenuAdd (apps[i].appName, apps[i].pFunc, apps[i].pParam);    }       #if defined(WINDML_NATIVE) && defined(__unix__)/**************************************************************************** main - start of demo program for unix native simulator** Start the example program.  ** RETURNS: ** ERRNO: N/A** SEE ALSO:  ** NOMANUAL**/int main     (    int argc,    char *argv []    )    {    /* Initialize the application by calling winDemo() */    winDemo();    /* Keep processing until the graphics display is gone */    while (uglRegistryFind(UGL_DISPLAY_TYPE, 0, 0, 0))         {        uglOSTaskDelay(500);	}    return (0);    }#elif defined(WINDML_NATIVE) && defined(_WIN32)/**************************************************************************** WinMain - start of demo program for windows native simulator** Start the example program.  ** RETURNS: ** ERRNO: N/A** SEE ALSO:  ** NOMANUAL**/int WINAPI WinMain    (    HINSTANCE hInstance,     HINSTANCE hPrevInstance,    LPSTR lpCmdLine,     int nShowCmd    )    {    /* Initialize the windows specific parameters */    uglWin32Parameters(hInstance, hPrevInstance, lpCmdLine, nShowCmd);    /* Initialize the application by calling winDemo() */    winDemo();    /* Keep processing until the graphics display is gone */    while (uglRegistryFind(UGL_DISPLAY_TYPE, 0, 0, 0))         {        uglOSTaskDelay(500);	}    return (0);    }#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -