亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? wexdbuf.c

?? vxworks下windml的一些demo程序
?? C
字號:
/* wexdbuf.c - WindML double buffering example program *//* Copyright 2000 Wind River Systems, Inc. All Rights Reserved *//*modification history--------------------01j,22feb02,msr  Backward compatability for input API.01i,05nov01,gav  Fixed misnamed devIds01h,05nov01,gav  Change to new registry01g,05nov01,gav  Change to new registry01f,09oct01,msr  Ported to new UGL_Q_EVENT architecture.01e,30nov00,gav  Made message to fit on small screens.01d,16nov00,msr  Fixed SPR #6205101c,27oct00,rfm  Added stdio usage01b,26oct00,rfm  Modified entry point01a,25oct00,rfm  Fixed restart problem*//***************************************************************  WindML Example - Double Buffering using the WindML Page API ** This example program demonstrates how to perform simple* double buffering.** To start the example:** -> ld < wexdbuf_ugl.o* -> wexdbuf ** Press a key or mouse button to cause the test to toggle * between double buffering on or double buffering off.** To shut down the double buffering test program, type the * following:** -> wexdbufStop***************************************************************//* This is included for VxWorks taskDelay and taskSpawn. */#include <vxWorks.h>#include <sysLib.h>/* This is included for a printf prototype. */#include <stdio.h>/* Include the UGL header file to use UGL functions, etc.  *//* The DIB header has defines specific to the use of DIBs. */#include <ugl/ugl.h>#include <ugl/uglos.h>#include <ugl/uglMsg.h>#include <ugl/uglfont.h>#include <ugl/uglinput.h>/* A forward declaration for this program. */UGL_LOCAL void windMLExampleDBuf ();/* Global variables *//* Control variable to signal when to stop program */UGL_LOCAL volatile UGL_BOOL stopWex;/* Some graphics environment information */UGL_LOCAL int displayHeight, displayWidth;UGL_LOCAL UGL_GC_ID gc;UGL_LOCAL UGL_FONT_ID font;UGL_LOCAL UGL_INPUT_SERVICE_ID inputServiceId;/** The color table is where we define the colors we want* to have available.  The format is an array of* ARGB values paired with their allocated uglColor.  As* of this writing, we don't need to worry about Alpha* ("A") values unless we are using video.*/UGL_LOCAL struct _colorStruct    {    UGL_ARGB rgbColor;    UGL_COLOR uglColor;    }colorTable[] =    {    { UGL_MAKE_ARGB(0xff, 0, 0, 0), 0},    /* The color table uses ARGB's */    { UGL_MAKE_ARGB(0xff, 0, 0, 168), 0},  /* (see uglColorAlloc).        */    { UGL_MAKE_ARGB(0xff, 0, 168, 0), 0},  /* Initialize alpha to 255 for */    { UGL_MAKE_ARGB(0xff, 0, 168, 168), 0},/* now (opaque).               */    { UGL_MAKE_RGB(168, 0, 0), 0},         /* UGL_MAKE_RGB takes care of  */    { UGL_MAKE_RGB(168, 0, 168), 0},       /* the alpha for us.           */    { UGL_MAKE_RGB(168, 84, 0), 0},    { UGL_MAKE_RGB(168, 168, 168), 0},    { UGL_MAKE_RGB(84, 84, 84), 0},    { UGL_MAKE_RGB(84, 84, 255), 0},    { UGL_MAKE_RGB(84, 255, 84), 0},    { UGL_MAKE_RGB(84, 255, 255), 0},    { UGL_MAKE_RGB(255, 84, 84), 0},    { UGL_MAKE_RGB(255, 84, 255), 0},    { UGL_MAKE_RGB(255, 255, 84), 0},    { UGL_MAKE_RGB(255, 255, 255), 0}    };#define BLACK			(0)#define BLUE			(1)#define GREEN			(2)#define CYAN			(3)#define RED		    	(4)#define MAGENTA			(5)#define BROWN			(6)#define LIGHTGRAY		(7)#define DARKGRAY		(8)#define LIGHTBLUE		(9)#define LIGHTGREEN		(10)#define LIGHTCYAN		(11)#define LIGHTRED		(12)#define LIGHTMAGENTA		(13)#define YELLOW			(14)#define WHITE			(15)UGL_LOCAL int getKeyboard(void)    {    UGL_MSG msg;    UGL_STATUS status;    int retVal = 0;    status = uglInputMsgGet (inputServiceId, &msg, UGL_NO_WAIT);    while (status != UGL_STATUS_Q_EMPTY)	{        if ((msg.type == MSG_KEYBOARD &&              (msg.data.keyboard.modifiers & UGL_KBD_KEYDOWN)) ||            (msg.type == MSG_POINTER &&             (msg.data.pointer.buttonChange &              msg.data.pointer.buttonState)))	    retVal = 1;	status = uglInputMsgGet (inputServiceId, &msg, UGL_NO_WAIT);	}    return(retVal);    }/** Start the example program.  This function and the bitmapStop function* can be invoked from the host shell in order to control the program.*/void wexdbuf (void)    {    stopWex = UGL_FALSE;    printf("To stop wexdbuf, type 'wexdbufStop'\n");    uglOSTaskCreate("tWindMLDBuf", (UGL_FPTR)windMLExampleDBuf, 110, 		    0, 10240, 0,0,0,0,0);    }/* Stop the example program */void wexdbufStop (void)    {    stopWex = UGL_TRUE;    }/* The main function */UGL_LOCAL void windMLExampleDBuf (void)    {    UGL_FONT_DRIVER_ID fontDrvId;    UGL_FONT_DEF fontDef;    UGL_PAGE_ID page[2];    UGL_FB_INFO fbInfo;    int textWidth, textHeight;    char * message0 = "Double Buffering ON. Press any key or mouse button to turn off.";    char * message1 = "Double Buffering Off. Press any key or mouse button to turn on.";    char * errorMessage0 = "Double Buffering not supported by this";    char * errorMessage1 = "driver. Press any key or mouse button.";    /*     * This structure is filled in with data about the frame buffer    * by the uglInfo() function.    */        UGL_MODE_INFO modeInfo;    /*    * The device ID is critical to the operation of UGL.  It    * identifies individual "devices" (display adapter, keyboard,    * font engine, etc.) to functions that may be able to work    * with more than one device.    */        UGL_DEVICE_ID devId;    /*    * Initialize UGL.  Must do this before trying to do anything    * else within UGL/WindML.    */    uglInitialize();    /* Obtain the device identifier for the display */    devId = (UGL_DEVICE_ID)uglRegistryFind (UGL_DISPLAY_TYPE,  0, 0,0)->id;    /* Obtain the font driver */    fontDrvId =  (UGL_FONT_DRIVER_ID)uglRegistryFind (UGL_FONT_ENGINE_TYPE,  0, 0,0)->id;    /* Create the font */    uglFontFindString(fontDrvId, "pixelSize=12", &fontDef);    if ((font = uglFontCreate(fontDrvId, &fontDef)) == UGL_NULL)	{	printf("Font not found. Exiting.\n");	return;        	}    /* get the input service  */    inputServiceId = (UGL_INPUT_SERVICE_ID)uglRegistryFind (UGL_INPUT_SERVICE_TYPE,  0, 0,0)->id;    /*    * Obtain the dimensions of the display.  We will use these    * to center some of our objects.    */    uglInfo(devId, UGL_MODE_INFO_REQ, &modeInfo);    displayWidth = modeInfo.width;    displayHeight = modeInfo.height;    /*    * Create a graphics context.  Default values are set during    * the creation.    */    gc = uglGcCreate(devId);    /* Set the font */    uglFontSet(gc, font);    /*    * Initialize colors. UGL maintains a Color Look-Up Table (CLUT)    * for devices that do not represent colors directly.  Essentially    * some hardware is only able to represent a subset of colors at    * any given time.  To manage which colors will be available for    * rendering, UGL uses color allocation.  If the hardware is able    * to represent colors directly, then the uglColorAlloc() function    * still works, but it is then essentially a no-op.    *    * We have set up for 16 colors, so here we will "allocate" them    * within UGL's CLUT (sometimes referred to as a "palette").  Colors    * can also be de-allocated, or freed, with uglColorFree.    *    * Since the ARGB's are intermingled with the UGL_COLORs in    * the colorTable, we must allocate each color individually.    * If the ARGB's had a contiguous array of ARGBs, and likewise for    * the UGL_COLORs, a single uglColorAlloc call could be made.    * (see the windows example).    */    uglColorAlloc (devId, &colorTable[BLACK].rgbColor, UGL_NULL,                    &colorTable[BLACK].uglColor, 1);    uglColorAlloc(devId, &colorTable[BLUE].rgbColor, UGL_NULL,                  &colorTable[BLUE].uglColor, 1);    uglColorAlloc(devId, &colorTable[GREEN].rgbColor, UGL_NULL,                  &colorTable[GREEN].uglColor, 1);    uglColorAlloc(devId, &colorTable[CYAN].rgbColor, UGL_NULL,                  &colorTable[CYAN].uglColor, 1);    uglColorAlloc(devId, &colorTable[RED].rgbColor, UGL_NULL,                  &colorTable[RED].uglColor, 1);    uglColorAlloc(devId, &colorTable[MAGENTA].rgbColor, UGL_NULL,                  &colorTable[MAGENTA].uglColor, 1);    uglColorAlloc(devId, &colorTable[BROWN].rgbColor, UGL_NULL,                  &colorTable[BROWN].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTGRAY].rgbColor, UGL_NULL,                  &colorTable[LIGHTGRAY].uglColor, 1);    uglColorAlloc(devId, &colorTable[DARKGRAY].rgbColor, UGL_NULL,                  &colorTable[DARKGRAY].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTBLUE].rgbColor, UGL_NULL,                  &colorTable[LIGHTBLUE].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTGREEN].rgbColor, UGL_NULL,                  &colorTable[LIGHTGREEN].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTCYAN].rgbColor, UGL_NULL,                  &colorTable[LIGHTCYAN].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTRED].rgbColor, UGL_NULL,                  &colorTable[LIGHTRED].uglColor, 1);    uglColorAlloc(devId, &colorTable[LIGHTMAGENTA].rgbColor, UGL_NULL,                  &colorTable[LIGHTMAGENTA].uglColor, 1);    uglColorAlloc(devId, &colorTable[YELLOW].rgbColor,  UGL_NULL,                  &colorTable[YELLOW].uglColor, 1);    uglColorAlloc(devId, &colorTable[WHITE].rgbColor,  UGL_NULL,                  &colorTable[WHITE].uglColor, 1);    /* First check to see if driver supports double buffering */    uglInfo(devId, UGL_FB_INFO_REQ, &fbInfo);    if (fbInfo.flags & UGL_FB_PAGING_ENABLED)	{	int x, y;	int xinc = 1, yinc = 1;	int pageIndex = 0;	int dblBufOn = UGL_TRUE;	UGL_POINT m0TextCoordinates;	UGL_POINT m1TextCoordinates;	UGL_RECT rect;	rect.left = displayWidth / 4;	rect.top = displayHeight / 4;	rect.right = 3 * rect.left;	rect.bottom = 3 * rect.top;	x = rect.left;	y = rect.top;	uglTextSizeGet(font, &textWidth, &textHeight, -1, message0);	m0TextCoordinates.x = ((displayWidth - textWidth) / 2);	m0TextCoordinates.y = ((displayHeight - textHeight) / 4);	uglTextSizeGet(font, &textWidth, &textHeight, -1, message1);	m1TextCoordinates.x = ((displayWidth - textWidth) / 2);	m1TextCoordinates.y = ((displayHeight - textHeight) / 4);	page[0] = UGL_PAGE_ZERO_ID;	page[1] = uglPageCreate(devId);	uglPageDrawSet(devId, page[1]);	while (stopWex == UGL_FALSE)	    {	    uglBackgroundColorSet(gc, colorTable[GREEN].uglColor);	    uglForegroundColorSet(gc, colorTable[GREEN].uglColor);	    uglRectangle(gc, rect.left, rect.top,  rect.right, rect.bottom);	    uglBackgroundColorSet(gc, colorTable[BLACK].uglColor);	    uglForegroundColorSet(gc, colorTable[BLACK].uglColor);	    uglRectangle(gc, rect.left + 15, rect.top + 15, rect.right - 15, 			 rect.bottom - 15);	    uglBackgroundColorSet(gc, colorTable[BLUE].uglColor);	    uglForegroundColorSet(gc, colorTable[YELLOW].uglColor);	    uglEllipse(gc, x, y, x + 32, y + 32, 0, 0, 0, 0);	    if (x + 32 >= rect.right - 15)		{		xinc = -1;		}	    else if (x <= rect.left + 15)		{		xinc = 1;		}	    if (y + 32 >= rect.bottom - 15)		{		yinc = -1;		}	    else if (y <= rect.top + 15)		{		yinc = 1;		}	    x += xinc;	    y += yinc;	    if (dblBufOn == UGL_TRUE)		{		uglBackgroundColorSet(gc, colorTable[BLACK].uglColor);		uglForegroundColorSet(gc, colorTable[LIGHTGREEN].uglColor);		uglTextDraw(gc, m0TextCoordinates.x, 				m0TextCoordinates.y, -1, message0);		if (pageIndex == 0)		    {		    uglPageVisibleSet(devId, page[1]);		    uglPageDrawSet(devId, page[0]);		    pageIndex = 1;		    }		else		    {		    uglPageVisibleSet(devId, page[0]);		    uglPageDrawSet(devId, page[1]);		    pageIndex = 0;		    }		}	    else		{		uglBackgroundColorSet(gc, colorTable[BLACK].uglColor);		uglForegroundColorSet(gc, colorTable[LIGHTRED].uglColor);		uglTextDraw(gc, m1TextCoordinates.x, 				m1TextCoordinates.y, -1, message1);		uglPageVisibleSet(devId, page[0]);		uglPageDrawSet(devId, page[0]);		}	     if (getKeyboard())		 {		 if (dblBufOn == UGL_TRUE)		     {		     dblBufOn = UGL_FALSE;		     }		 else		     {		     dblBufOn = UGL_TRUE;		     }		 }	    }	uglPageDrawSet(devId, page[0]);	uglPageVisibleSet(devId, page[0]);	uglPageDestroy(devId, page[1]);	}    else	{	uglBackgroundColorSet(gc, colorTable[BLACK].uglColor);	uglForegroundColorSet(gc, colorTable[LIGHTRED].uglColor);	uglTextSizeGet(font, &textWidth, &textHeight, -1, errorMessage0);	uglTextDraw(gc, (displayWidth - textWidth) / 2, 			(displayHeight - textHeight) / 2 - textHeight, -1, errorMessage0);	uglTextSizeGet(font, &textWidth, &textHeight, -1, errorMessage1);	uglTextDraw(gc, (displayWidth - textWidth) / 2, 			(displayHeight - textHeight) / 2, -1, errorMessage1);	while(getKeyboard() != 1);	}    /* Clean Up */    uglFontDestroy(font);    uglGcDestroy (gc);    uglDeinitialize();    return;    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
激情深爱一区二区| 久久99精品国产.久久久久久| 欧美日韩国产大片| 久久精品99久久久| 亚洲美女精品一区| 久久丝袜美腿综合| 欧美日韩国产综合一区二区 | 国产精品激情偷乱一区二区∴| 欧美吻胸吃奶大尺度电影| 激情小说欧美图片| 亚洲二区在线观看| 中文字幕亚洲综合久久菠萝蜜| 欧美一级午夜免费电影| 欧美这里有精品| k8久久久一区二区三区| 麻豆极品一区二区三区| 亚洲国产欧美另类丝袜| 亚洲欧美一区二区三区久本道91 | 日韩你懂的在线观看| 欧亚一区二区三区| 99精品久久久久久| 国产经典欧美精品| 狠狠色伊人亚洲综合成人| 亚洲va欧美va天堂v国产综合| 中文字幕中文字幕一区二区| 亚洲精品一区二区三区香蕉| 91麻豆精品国产91久久久使用方法| 91天堂素人约啪| 丁香激情综合国产| 国产成人综合在线播放| 国内精品第一页| 激情偷乱视频一区二区三区| 日韩在线一二三区| 五月天中文字幕一区二区| 亚洲一区二区3| 懂色av一区二区夜夜嗨| 亚洲大片精品永久免费| 欧美午夜精品一区| 亚洲色图视频网| 欧美日本一区二区三区四区| 欧洲在线/亚洲| 亚洲一区免费在线观看| 国产精品麻豆久久久| 欧美成人欧美edvon| 日韩女优毛片在线| 日韩三级视频在线看| 日韩一区二区三区免费观看| 欧美大尺度电影在线| 日韩欧美中文字幕公布| 欧美成人伊人久久综合网| 欧美一区二区三区四区久久| 日韩欧美不卡在线观看视频| 欧美大片国产精品| 久久久国产一区二区三区四区小说| 精品国产一区二区精华| 国产精品水嫩水嫩| 日韩伦理免费电影| 亚洲国产精品成人久久综合一区| 精品国内二区三区| 91麻豆精品国产91久久久使用方法 | 中文字幕乱码久久午夜不卡 | 理论电影国产精品| 六月丁香综合在线视频| 久久99国产精品久久99果冻传媒| 极品美女销魂一区二区三区| 成人免费av网站| 色999日韩国产欧美一区二区| 欧美在线视频日韩| 日韩一区二区三区四区五区六区| 精品粉嫩超白一线天av| 国产精品污网站| 一区二区久久久久久| 日韩av一区二区在线影视| 国产一本一道久久香蕉| 色综合天天综合网国产成人综合天 | 国产精品不卡视频| 亚洲高清免费一级二级三级| 伦理电影国产精品| eeuss鲁片一区二区三区在线看| 国产激情精品久久久第一区二区| 丝袜诱惑亚洲看片| 午夜成人在线视频| 国产精品亚洲午夜一区二区三区 | 日韩欧美你懂的| 国产精品成人网| 日韩成人免费看| www.日韩精品| 欧美一区二区三区色| 国产精品久久久久毛片软件| 日韩主播视频在线| 99国产精品久久久久久久久久久| 宅男在线国产精品| 亚洲人妖av一区二区| 免费一区二区视频| 91国偷自产一区二区使用方法| 精品欧美黑人一区二区三区| 中文字幕亚洲一区二区av在线| 无码av免费一区二区三区试看| 成人午夜私人影院| 日韩三级视频中文字幕| 亚洲欧美日韩综合aⅴ视频| 国内外精品视频| 欧美日韩成人高清| 亚洲三级小视频| 国产精品69久久久久水密桃| 制服丝袜亚洲播放| 中文字幕在线不卡一区二区三区 | 色婷婷国产精品综合在线观看| 欧美一区二区三区免费视频| 麻豆精品新av中文字幕| 国产在线不卡一区| 欧美一级国产精品| 亚洲mv在线观看| 亚洲国产精品99久久久久久久久| 石原莉奈在线亚洲二区| 91丨porny丨户外露出| 久久久不卡网国产精品二区 | 粉嫩在线一区二区三区视频| 日韩你懂的在线观看| 日韩二区在线观看| 欧美亚洲国产怡红院影院| 日韩美女啊v在线免费观看| 国产盗摄视频一区二区三区| 日韩精品专区在线影院观看| 天天影视色香欲综合网老头| 欧美日韩精品综合在线| 亚洲午夜在线视频| 欧美在线色视频| 亚洲一区二区三区四区在线免费观看| 色综合婷婷久久| 国产精品自拍一区| 日韩一区在线免费观看| 国产精品另类一区| 欧美国产在线观看| 欧美日韩中文国产| www.亚洲精品| 精品播放一区二区| 一区二区三区在线观看国产| 成人av小说网| 国产精品免费看片| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美日韩视频不卡| 亚洲一区中文在线| 91麻豆高清视频| 亚洲人123区| 99久久精品国产精品久久| 国产精品色在线观看| 99综合电影在线视频| 成人欧美一区二区三区小说| 99免费精品在线观看| 亚洲视频香蕉人妖| 欧美三级在线播放| 免费欧美高清视频| 国产午夜亚洲精品羞羞网站| 成人性视频网站| 亚洲最新视频在线观看| 欧美日韩国产影片| 久久国产精品99精品国产| 久久先锋影音av| 亚洲国产日韩综合久久精品| 久久久另类综合| 爽好多水快深点欧美视频| 欧美一级欧美一级在线播放| 久久av资源网| 国产精品青草综合久久久久99| 色综合天天做天天爱| 视频一区欧美日韩| 久久亚洲影视婷婷| 色婷婷综合久久久中文一区二区| 亚洲国产精品久久久久婷婷884| 91精品欧美一区二区三区综合在| 日本成人在线视频网站| 国产日韩精品久久久| 91免费看片在线观看| 蜜桃一区二区三区在线观看| 国产三区在线成人av| 欧美色手机在线观看| 麻豆国产欧美日韩综合精品二区 | 欧美无乱码久久久免费午夜一区| 免费观看成人av| 1024国产精品| 欧美一区二区在线免费观看| www.性欧美| 欧美a级一区二区| 国产精品家庭影院| 欧美成人精品1314www| 色欧美日韩亚洲| 国产一区二区在线看| 亚洲一区二区三区四区的| 国产视频视频一区| 制服丝袜日韩国产| 色综合久久中文字幕| 韩国精品久久久| 午夜久久久久久久久久一区二区| 国产欧美日韩在线看| 91精品国产综合久久国产大片| 成人午夜碰碰视频| 狠狠色狠狠色综合| 日韩精品一二三四| 伊人性伊人情综合网|