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

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

?? uglinit.c

?? S1D13506windml下的驅動程序,支持vxworks5.4 支持tornado2.0 windml2.0
?? C
字號:
/* uglInit.c - UGL initialization file */

/* Copyright 2000 Wind River Systems, Inc. All Rights Reserved */

/*
modification history
--------------------
01h,04dec00,jlb  Added fatal error if cannot map graphics device
01g,10nov00,jlb  Remove event queue size (SPR 35346)
01f,24oct00,rfm  Reset default memory pool before freeing pMem
01e,23oct00,jlb  Provide error message when illegal graphics configuration
01d,13oct00,rfm  Added version variables and uglFreeMemoryPool
01c,15sep00,rfm  Fixed SPR #34196
01b,25jul00,rbp  Added Agfa Font definition.
01a,28jan00,jlb  written
*/

/*

DESCRIPTION

This file provides the initialization and deinitialization sequences for 
WindML.  This file initializes WindML based upon the configuration established 
within the <uglInit.h> file when WindML is built using the command line 
method. When WindML is built using the configuration tool, the configuration 
is obtained from files generated by the configuration tool.   

*/
#include <ugl/ugl.h>
#include <ugl/ugltypes.h>
#include <ugl/uglmode.h>
#include <ugl/ugllog.h>
#include <ugl/uglinput.h>
#include <ugl/uglfont.h>

/* If building from project facility obtain the project config file and
 * use the cinfiguration that was previously generated using the UGL
 * configuration tool.
 */
#ifdef PRJ_BUILD
#include <prjParams.h>
//#define CONFIG_TOOL
#endif /* PRJ_BUILD */

/* Get the configuration */
#include "uglInit.h"

/* Current version of WindML */

const unsigned int uglVersionMajor = 2;
const unsigned int uglVersionMinor = 0;

#include "udbmffnt.c"

/* Set up the font configuration */
#ifndef CONFIG_TOOL
#ifdef INCLUDE_BMF_FONTS
#include "uglBmfCfg.c"
#endif

#ifdef INCLUDE_AGFA_FONTS
#include "uglAgfaCfg.c"
#endif
#endif /* CONFIG_TOOL */


/* Define local variables */
UGL_LOCAL UGL_ORD initCount = 0;

#if defined (UGL_GRAPHICS_CREATE)
UGL_LOCAL UGL_DEVICE_ID graphicsDevID = UGL_NULL;
#else
#error "The configuration is not a legal configuration"
#error "Verify that the configuration provided in uglInit.h"
#error "is a legal configuration for the selected graphics "
#error "device,  check the *.txt file within the directory"
#error "h/ugl/driver/graphics/<device> for the legal modes."
#endif

#if defined (INCLUDE_UGL_INPUT)
UGL_LOCAL UGL_EVENT_SERVICE_ID eventServiceID = UGL_NULL;
#endif
#if defined(UGL_KEYBOARD_INIT)
UGL_LOCAL UGL_INPUT_DEVICE_ID keyboardDevID = UGL_NULL;
#endif
#if defined(UGL_POINTER_INIT)
UGL_LOCAL UGL_INPUT_DEVICE_ID pointerDevID = UGL_NULL;
#endif
#if defined (UGL_FONT_DRIVER_CREATE)
UGL_LOCAL UGL_FONT_DRIVER_ID fontDevID = UGL_NULL;
#endif


/* Establish WindML memory manager routines */
UGL_MEM_POOL_ID (* uglMemPoolCreate)
    (void * poolAddress, UGL_SIZE poolSize) = UGL_MEM_POOL_CREATE_RTN;

UGL_STATUS (* uglMemPoolDestroy)
    (UGL_MEM_POOL_ID poolId) = UGL_MEM_POOL_DESTROY_RTN;

void * (* uglMemAlloc)
    (UGL_MEM_POOL_ID poolId, UGL_SIZE size) = UGL_MEM_ALLOC_RTN;

void * (* uglMemCalloc) 
    (UGL_MEM_POOL_ID poolId, UGL_ORD numItems, UGL_SIZE itemSize) = UGL_MEM_CALLOC_RTN;

void * (* uglMemRealloc)
    (UGL_MEM_POOL_ID poolId, void * pMem, UGL_SIZE size) = UGL_MEM_REALLOC_RTN;

UGL_STATUS (* uglMemFree) (void * pMem) = UGL_MEM_FREE_RTN;

int uglMemPoolSize = UGL_MEM_POOL_SIZE;
UGL_MEM_POOL_ID uglMemPoolId;
char *pMem = UGL_NULL;


#undef INCLUDE_UGL_INPUT

/**************************************************************************
*
* uglInitialize - initialize the UGL components
*
* This routine provides the basic initialization of UGL.  This routine
* will initialize UGL based upon the configuration defined within the
* <uglInit.h> file. 
*
* The first step is to create the graphics device, set the proper display
* mode and register the graphics device.  Following the initialization of
* the graphics device, the event service and the input devices are created.
* An event queue is created of the specified size and then the event 
* service is registered.  If a keyboard device must be created, the device
* is created and then it is initailized and registered.  In a similar manner
* the pointer device is cretaed, initialized and registered.
*
* The configured font engine is created and registered.
*
* The configured audio device is finnally created.
*
* RETURNS: UGL_STATUS_OK when UGL was sucessfully initialized; 
*           otherwise UGL_STATUS_ERROR
*
* ERRNO: N/A
*
* SEE ALSO: uglModeSet(), uglDriverRegister() 
*
*/

UGL_STATUS uglInitialize
    (
    void
    )
    {
    UGL_MODE mode;

#if defined (INCLUDE_UGL_INPUT)
    UGL_RECT input;
#endif /* INCLUDE_UGL_INPUT */

    /* Check for reentrancy */
    if (initCount++ > 0)
        return (UGL_STATUS_OK);

    /* If private pool specified, then create the pool and set as default */
#if defined (INCLUDE_UGL_MEM_POOL)
    if (pMem == UGL_NULL)
	{
	/* Allocate the memory pool */
	pMem = UGL_MALLOC (uglMemPoolSize);
	if (pMem == UGL_NULL)
	    return (UGL_STATUS_ERROR);

	/* Create memory partition */
	if ((uglMemPoolId = (* uglMemPoolCreate) (pMem, uglMemPoolSize)) == 
	    UGL_NULL)
	    return (UGL_STATUS_ERROR);

	/* Set the partion as the default */
	uglMemDefaultPoolSet (uglMemPoolId);
	}
#endif /* INCLUDE_UGL_MEM_POOL */

    /* Create the graphics device and set the modes */
#if defined (UGL_GRAPHICS_CREATE)

    /* Create EPSON graphics device and set the modes */
    graphicsDevID = (UGL_UGI_DRIVER *) uglEpson16BitDevCreate (0,0,0); 


    if (graphicsDevID == UGL_NULL)
        uglLog (UGL_ERROR_NO_GRAPHICS,
                "Graphics device <%s> did not initialize\n", (int)UGL_GRAPHICS_NAME,
                0,0,0,0);

    /* Set the mode */
    mode.width = graphicsDevID->pMode->width;
    mode.height = graphicsDevID->pMode->height;
    mode.refreshRate = graphicsDevID->pMode->refreshRate;
    mode.monitorType = graphicsDevID->pMode->monitorType;
    mode.colorDepth = graphicsDevID->pMode->colorDepth;
    mode.flags = graphicsDevID->pMode->flags;

    if (uglModeSet (graphicsDevID, &mode) == UGL_STATUS_ERROR)
        uglLog (UGL_ERROR_BAD_MODE,
                "Output mode not supported - width = %d, height = %d\n",
                mode.width, mode.height, 0, 0, 0);

    /* Place display device in device registry */
    uglDriverRegister (UGL_DISPLAY_TYPE, 0, (UGL_UINT32)graphicsDevID);
#endif  /* UGL_GRAPHICS_CREATE */


    /* Create the input queue */
#if defined (INCLUDE_UGL_INPUT)
    input.left = input.top = 0;
    input.right = mode.width - 1;
    input.bottom = mode.height - 1;

    eventServiceID = uglEventServiceCreate (&input, UGL_NULL);
    if (eventServiceID != UGL_NULL)
        uglDriverRegister (UGL_EVENT_SERVICE_TYPE, 0, (UGL_UINT32)eventServiceID);
    else
        uglLog (UGL_ERROR_NO_EVENT_SERVICE,"", 0, 0, 0, 0, 0);

    /* Create the keyboard device */

#if defined(SYS_KEYBOARD_CREATE)
    SYS_KEYBOARD_CREATE(SYS_KEYBOARD_NAME);
#endif /* SYS_KEYBOARD_CREATE */

    /* Initialize the keyboard device */
#if defined(UGL_KEYBOARD_INIT)
    keyboardDevID = UGL_KEYBOARD_INIT (SYS_KEYBOARD_NAME, eventServiceID);
    if (keyboardDevID != UGL_NULL) 
        uglDriverRegister (UGL_KEYBOARD_TYPE, 0, (UGL_UINT32)keyboardDevID);
    else
        uglLog (UGL_ERROR_NO_KBD, SYS_KEYBOARD_NAME, 0, 0, 0, 0, 0);
#endif /* UGL_KEYBOARD_INIT */


    /* Create the pointer device */
#if defined(SYS_POINTER_CREATE)
    SYS_POINTER_CREATE(SYS_POINTER_NAME);
#endif /* SYS_POINTER_CREATE */


    /* Initialize the pointer device */
#if defined(UGL_POINTER_INIT)
    pointerDevID = UGL_POINTER_INIT (SYS_POINTER_NAME, eventServiceID);
    if (pointerDevID != UGL_NULL)
        uglDriverRegister (UGL_POINTER_TYPE, 0, (UGL_UINT32)pointerDevID);
    else
        uglLog (UGL_ERROR_NO_KBD, SYS_POINTER_NAME, 0, 0, 0, 0, 0);
#endif /* UGL_POINTER_INIT */
#endif /* INCLUDE_UGL_INPUT */


    /* Create the font engine */
#if defined (UGL_FONT_DRIVER_CREATE)
    fontDevID = UGL_FONT_DRIVER_CREATE (graphicsDevID);
    if (fontDevID != UGL_NULL)
        {
        uglDriverRegister (UGL_FONT_ENGINE_TYPE, 0, (UGL_UINT32)fontDevID);

#if defined (INCLUDE_BMF_FONTS)
        cacheConfig.glyphCacheSize = BMF_FONT_GLYPH_CACHE_SIZE;
        cacheConfig.glyphCachePoolId = BMF_FONT_GLYPH_CACHE_MEM_POOL;
        uglFontDriverInfo(fontDevID, UGL_BMF_GLYPH_CACHE_CONFIG, 
                        (void *)&cacheConfig);
#endif /* INCLUDE_BMF_FONTS */

        }
    else
        uglLog (UGL_ERROR_NO_FONT_DRIVER, UGL_FONT_DRIVER_NAME, 0, 0, 0, 0, 0);
#endif /* UGL_FONT_DRIVER_CREATE */

#if defined (SOUND_DEV_CREATE)
    /* Initialize the audio support */
    SOUND_DEV_CREATE (SOUND_DEV_NAME, SOUND_CHANNEL, SND_DEVICE_INSTANCE, 
                      SND_DEVICE_INT_LEVEL, SND_DEVICE_INT_VECTOR,
                      SND_DEVICE_DMA8, SND_DEVICE_DMA16);
#endif /* SOUND_DEV_CREATE */

    /* Return the status */
    return (UGL_STATUS_OK);
}


/**************************************************************************
*
* uglDeinitialize - shuts down UGL components
*
*
* This routine shuts down the configured UGL components.  An <initCounter>
* that was incremented for each call to the uglInitialize() function is
* decremented.  When this counter reaches 0, then the components are
* shutdown.
*
* RETURNS: UGL_STATUS_OK when UGL was sucessfully Deinitialized; 
*           otherwise UGL_STATUS_ERROR
*
* ERRNO: N/A
*
* SEE ALSO: uglInitialize() 
*
*/

UGL_STATUS uglDeinitialize (void)
    {

    /* Check for reentrancy */
    if (--initCount > 0)
        return (UGL_STATUS_OK);

    /* Destroy the font engine */
#if defined (UGL_FONT_DRIVER_CREATE)
    if (fontDevID != UGL_NULL)
        {
        uglFontDriverDestroy (fontDevID);
        uglDriverUnRegister (UGL_FONT_ENGINE_TYPE, 0);
        }
#endif /* UGL_FONT_DRIVER_CREATE */

    /* Destroy the input services */

#if defined (INCLUDE_UGL_INPUT)
    if (eventServiceID != UGL_NULL)
        {
        /* Idle the event service */
        uglEventServiceIdle (eventServiceID);

        /* Destroy the pointer device */
#if defined (UGL_POINTER_INIT)
        if (pointerDevID != UGL_NULL)
            {
            uglInputDeviceDestroy (pointerDevID);
            uglDriverUnRegister (UGL_POINTER_TYPE, 0);
            }
#endif /* UGL_POINTER_INIT */

        /* Destroy the keyboard device */
#if defined (UGL_KEYBOARD_INIT)
        if (keyboardDevID != UGL_NULL)
            {
            uglInputDeviceDestroy (keyboardDevID);
            uglDriverUnRegister (UGL_KEYBOARD_TYPE, 0);
            }
#endif /* UGL_KEYBOARD_INIT */

        /* Destroy the event service */
        uglEventServiceDestroy (eventServiceID);
        uglDriverUnRegister (UGL_EVENT_SERVICE_TYPE, 0);
        }
#endif /* INCLUDE_UGL_INPUT */

    /* Destroy the graphics device */
#if defined (UGL_GRAPHICS_CREATE)
    if (graphicsDevID != UGL_NULL)
        {
        uglGraphicsDevDestroy (graphicsDevID);
        uglDriverUnRegister (UGL_DISPLAY_TYPE, 0);
        }
#endif /* UGL_GRAPHICS_CREATE */

#if defined (INCLUDE_UGL_MEM_POOL)
    if (uglOSMemPoolDestroy(uglMemPoolId) == UGL_STATUS_OK)
	{
	uglMemDefaultPoolSet (UGL_NULL);
	UGL_FREE(pMem);
	pMem = UGL_NULL;
	}
#endif /* INCLUDE_UGL_MEM_POOL */

    /* Return the status */
    return (UGL_STATUS_OK);
    }

/**************************************************************************
*
* NOMANUAL
*
* uglFreeMemoryPool - free memory pool allocated in uglInitialize
*
* This an undocumented routine that will free the memory pool allocated
* in uglInitialize. It will not free the memory pool Id. This routine
* must be called after uglDeinitialize has been called.
*
* RETURNS: UGL_STATUS_OK when the memory pool is successfully freed
*           otherwise UGL_STATUS_ERROR
*
* ERRNO: N/A
*
* SEE ALSO: N/A
* 
*/

UGL_STATUS uglFreeMemoryPool(void)
    {
    UGL_STATUS status;

    if (pMem != UGL_NULL && initCount == 0)
	{
	uglMemDefaultPoolSet (UGL_NULL);
	UGL_FREE(pMem);
	pMem = UGL_NULL;
	status = UGL_STATUS_OK;
	}
    else
	{
	status = UGL_STATUS_ERROR;
	}

    return(status);
    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
thepron国产精品| 麻豆精品一二三| 99在线热播精品免费| 国产精品黄色在线观看| av在线免费不卡| 亚洲精品欧美二区三区中文字幕| av激情综合网| 亚洲成人1区2区| 精品精品国产高清a毛片牛牛| 国产精选一区二区三区| 亚洲同性同志一二三专区| 欧美亚洲精品一区| 久久精品99久久久| 欧美国产乱子伦| 一本久久a久久精品亚洲| 亚洲午夜电影网| 日韩一区二区三区电影在线观看 | 欧美日本乱大交xxxxx| 日本欧美肥老太交大片| 久久九九久久九九| www.亚洲国产| 亚洲不卡在线观看| 国产情人综合久久777777| 色综合视频在线观看| 日韩精品一卡二卡三卡四卡无卡| 日韩欧美一区二区免费| 99久久精品免费精品国产| 午夜亚洲福利老司机| 国产欧美日韩精品在线| 欧美日韩专区在线| 国产91丝袜在线18| 亚洲成av人片在线观看无码| 国产色婷婷亚洲99精品小说| 欧美视频在线一区| 国产99久久久国产精品潘金| 婷婷一区二区三区| 亚洲欧洲精品成人久久奇米网| 在线不卡的av| 972aa.com艺术欧美| 蜜桃视频在线观看一区| 樱花影视一区二区| 国产亚洲一区二区三区在线观看| 欧美写真视频网站| 成人午夜激情在线| 久久www免费人成看片高清| 一区二区三区在线视频观看| 久久久噜噜噜久久人人看| 欧美日韩一区不卡| 97精品久久久午夜一区二区三区| 激情丁香综合五月| 日韩高清不卡在线| 一区二区三区欧美亚洲| 国产精品久久久久久久第一福利| 久久综合九色综合97_久久久| 欧美美女一区二区在线观看| 97se狠狠狠综合亚洲狠狠| 成人天堂资源www在线| 蜜臀91精品一区二区三区| 亚洲在线中文字幕| 亚洲美女屁股眼交3| 中文字幕第一区综合| 久久久99精品免费观看不卡| 欧美一二三区在线| 欧美日韩精品系列| 欧美体内she精高潮| 97久久人人超碰| 99国产欧美久久久精品| av一区二区三区黑人| 波多野结衣91| 99久久婷婷国产综合精品| av激情亚洲男人天堂| av亚洲产国偷v产偷v自拍| 成人福利视频在线看| 成人国产精品免费| 成人91在线观看| 91啪亚洲精品| 色婷婷综合中文久久一本| av网站免费线看精品| 99热精品一区二区| 99re视频精品| 欧美性大战久久久久久久蜜臀| 精品视频在线免费观看| 欧美日韩国产美| 91精品黄色片免费大全| 91精品在线免费| 欧美本精品男人aⅴ天堂| 久久亚区不卡日本| 国产精品免费观看视频| **欧美大码日韩| 一区二区三区四区亚洲| 亚洲伊人色欲综合网| 五月开心婷婷久久| 美国三级日本三级久久99| 韩国成人在线视频| 成人美女在线观看| 91福利在线导航| 538在线一区二区精品国产| 精品国免费一区二区三区| 日本一区二区三区dvd视频在线| 中国色在线观看另类| 亚洲精选视频免费看| 男人的j进女人的j一区| 国产精品一区三区| 91成人在线免费观看| 欧美一级片在线观看| 久久亚洲精精品中文字幕早川悠里| 国产精品你懂的| 午夜成人在线视频| 国产激情一区二区三区| 91国模大尺度私拍在线视频| 日韩三级中文字幕| 国产精品福利一区二区三区| 午夜精品福利在线| 成人永久免费视频| 在线电影国产精品| 欧美国产日韩亚洲一区| 丝袜亚洲精品中文字幕一区| 国产99久久精品| 91精品欧美综合在线观看最新| 国产午夜精品美女毛片视频| 亚洲一区二区三区视频在线播放| 久久 天天综合| 在线观看国产91| 国产清纯美女被跳蛋高潮一区二区久久w| 有码一区二区三区| 国产精品亚洲专一区二区三区| 在线精品国精品国产尤物884a| 日韩午夜电影在线观看| 亚洲天堂精品在线观看| 国产中文字幕精品| 欧美精品免费视频| 亚洲精品国产精华液| 国产成人夜色高潮福利影视| 51久久夜色精品国产麻豆| 亚洲久草在线视频| 成人伦理片在线| 久久精子c满五个校花| 免费成人av资源网| 欧美午夜不卡视频| 亚洲精品国产精华液| 成年人午夜久久久| 久久精品这里都是精品| 久草热8精品视频在线观看| 欧美丝袜丝nylons| 一区二区三区在线影院| 国产69精品久久777的优势| 日韩女优av电影| 日韩精品91亚洲二区在线观看| 色激情天天射综合网| 国产精品免费视频观看| 国产在线视频一区二区三区| 欧美一区二区三区四区久久| 亚洲.国产.中文慕字在线| 色综合网站在线| 亚洲女厕所小便bbb| 91丨国产丨九色丨pron| 国产精品美女久久久久av爽李琼| 国产一区二区在线看| 精品国产91洋老外米糕| 国模冰冰炮一区二区| 欧美精品一区二区三区很污很色的 | 国产美女久久久久| 久久综合视频网| 国产精品1024| 中文字幕+乱码+中文字幕一区| 国产最新精品免费| 国产欧美一区二区三区沐欲| 国产精品一二三四五| 国产日韩亚洲欧美综合| 国产99一区视频免费| 国产精品久久久久影视| 99re6这里只有精品视频在线观看| 国产精品电影一区二区| 99re成人精品视频| 樱花影视一区二区| 7878成人国产在线观看| 美女爽到高潮91| 精品国产91九色蝌蚪| 国产.欧美.日韩| 国产精品久久毛片| 欧洲一区二区av| 日韩1区2区3区| 精品成人一区二区三区| 成人动漫一区二区在线| 一区二区三区鲁丝不卡| 7799精品视频| 国产精品888| 亚洲伊人伊色伊影伊综合网| 91精品国产高清一区二区三区蜜臀 | www国产精品av| 99国产精品久| 丝袜a∨在线一区二区三区不卡| 欧美一区二区黄| 成人h动漫精品一区二区| 亚洲在线中文字幕| 久久久影院官网| 在线国产亚洲欧美| 国模少妇一区二区三区| 亚洲精品综合在线| 日韩精品一区二区三区蜜臀 |