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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? event.svga

?? 針對OpenJtag通用調(diào)試板的Uboot程序
?? SVGA
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************           The SuperVGA Kit - UniVBE Software Development Kit**  ========================================================================**    The contents of this file are subject to the SciTech MGL Public*    License Version 1.0 (the "License"); you may not use this file*    except in compliance with the License. You may obtain a copy of*    the License at http://www.scitechsoft.com/mgl-license.txt**    Software distributed under the License is distributed on an*    "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or*    implied. See the License for the specific language governing*    rights and limitations under the License.**    The Original Code is Copyright (C) 1991-1998 SciTech Software, Inc.**    The Initial Developer of the Original Code is SciTech Software, Inc.*    All Rights Reserved.**  ========================================================================** Language:     ANSI C* Environment:  IBM PC (MS DOS)** Description:  Routines to provide a Linux event queue, which automatically*               handles keyboard and mouse events for the Linux compatability*               libraries. Based on the event handling code in the MGL.*****************************************************************************/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <time.h>#include <ctype.h>#include <termios.h>#include <signal.h>#include <fcntl.h>#include <unistd.h>#include <errno.h>#include <sys/time.h>#include <sys/stat.h>#include <sys/types.h>#include <linux/keyboard.h>#include <linux/kd.h>#include <linux/vt.h>#include <gpm.h>#include "pm.h"#include "vesavbe.h"#include "wdirect.h"/*--------------------------- Global variables ----------------------------*/#define EVENTQSIZE  100             /* Number of events in event queue  */static int      head = -1;          /* Head of event queue              */static int      tail = -1;          /* Tail of event queue              */static int      freeHead = -1;      /* Head of free list                */static int      count = 0;          /* No. of items currently in queue  */static WD_event evtq[EVENTQSIZE];   /* The queue structure itself      */static int      oldMove = -1;       /* Previous movement event          */static int      oldKey = -1;        /* Previous key repeat event        */static int      mx,my;              /* Current mouse position           */static int      xRes,yRes;          /* Screen resolution coordinates    */static void     *stateBuf;          /* Pointer to console state buffer  */static int      conn;               /* GPM file descriptor for mouse handling */static int      tty_fd;             /* File descriptor for /dev/console */extern int      tty_vc;             /* Virtual console ID, from the PM/Pro library */static ibool    key_down[128];      /* State of all keyboard keys       */static struct termios old_conf;     /* Saved terminal configuration     */static int      oldkbmode;          /* and previous keyboard mode       */struct vt_mode  oldvtmode;          /* Old virtual terminal mode        */static int      old_flags;          /* Old flags for fcntl              */static ulong    key_modifiers;      /* Keyboard modifiers               */static int      forbid_vt_release=0;/* Flag to forbid release of VT     */static int      forbid_vt_acquire=0;/* Flag to forbid cature of VT      */static int      oldmode;            /* Old SVGA mode saved for VT switch*/static int      initmode;           /* Initial text mode                */static ibool    installed = false;  /* True if we are installed         */static void     (_ASMAPI *moveCursor)(int x,int y) = NULL;static int      (_ASMAPI *suspendAppCallback)(int flags) = NULL;#if 0/* Keyboard Translation table from scancodes to ASCII */static uchar keyTable[128] ="\0\0331234567890-=\010""\011qwertyuiop[]\015""\0asdfghjkl;'`\0\\""zxcvbnm,./\0*\0 \0""\0\0\0\0\0\0\0\0\0\0\0\0"      /* Function keys */"789-456+1230.\0\0\0\0\0"       /* Keypad keys */"\0\0\0\0\0\0\0\015\0/";static uchar keyTableShifted[128] ="\0\033!@#$%^&*()_+\010""\011QWERTYUIOP{}\015""\0ASDFGHJKL:\"~\0|""ZXCVBNM<>?\0*\0 \0""\0\0\0\0\0\0\0\0\0\0\0\0"      /* Function keys */"789-456+1230.\0\0\0\0\0"       /* Keypad keys */"\0\0\0\0\0\0\0\015\0/";#endif/* Macros to keep track of the CAPS and NUM lock states */#define EVT_CAPSSTATE   0x0100#define EVT_NUMSTATE    0x0200/* Helper macros for dealing with timers */#define TICKS_TO_USEC(t) ((t)*65536.0/1.193180)#define USEC_TO_TICKS(u) ((u)*1.193180/65536.0)/* Number of keycodes to read at a time from the console */#define KBDREADBUFFERSIZE 32/*---------------------------- Implementation -----------------------------*//****************************************************************************REMARKS:Returns the current time stamp in units of 18.2 ticks per second.****************************************************************************/static ulong getTimeStamp(void){    return (ulong)(clock() / (CLOCKS_PER_SEC / 18.2));}/****************************************************************************PARAMETERS:evt - Event to place onto event queueREMARKS:Adds an event to the event queue by tacking it onto the tail of the eventqueue. This routine assumes that at least one spot is available on thefreeList for the event to be inserted.****************************************************************************/static void addEvent(    WD_event *evt){    int         evtID;    /* Get spot to place the event from the free list */    evtID = freeHead;    freeHead = evtq[freeHead].next;    /* Add to the tail of the event queue   */    evt->next = -1;    evt->prev = tail;    if (tail != -1)        evtq[tail].next = evtID;    else        head = evtID;    tail = evtID;    evtq[evtID] = *evt;    count++;}/****************************************************************************PARAMETERS:what        - Event codemessage     - Event messagemodifiers   - keyboard modifiersx           - Mouse X position at time of eventy           - Mouse Y position at time of eventbut_stat    - Mouse button status at time of eventREMARKS:Adds a new mouse event to the event queue. This routine is called fromwithin the mouse interrupt subroutine, so it must be efficient.****************************************************************************/static void addMouseEvent(    uint what,    uint message,    int x,    int y,    uint but_stat){    WD_event    evt;    if (count < EVENTQSIZE) {        evt.what = what;        evt.when = getTimeStamp();        evt.message = message;        evt.modifiers = but_stat | key_modifiers;        evt.where_x = x;        evt.where_y = y;        fprintf(stderr, "(%d,%d), buttons %ld\n", x,y, evt.modifiers);        addEvent(&evt);                 /* Add to tail of event queue   */        }}/****************************************************************************PARAMETERS:scancode    - Raw keyboard scan codemodifiers   - Keyboard modifiers flagsREMARKS:Converts the raw scan code into the appropriate ASCII code using the scancode and the keyboard modifier flags.****************************************************************************/static ulong getKeyMessage(    uint scancode,    ulong modifiers){    ushort  code = scancode << 8;    ushort  ascii;    struct kbentry ke;    ke.kb_index = scancode;    /* Find the basic ASCII code for the scan code */    if (modifiers & EVT_CAPSSTATE) {        if (modifiers & EVT_SHIFTKEY)          ke.kb_table = K_NORMTAB;        //          ascii = tolower(keyTableShifted[scancode]);        else          ke.kb_table = K_SHIFTTAB;        //          ascii = toupper(keyTable[scancode]);        }    else {        if (modifiers & EVT_SHIFTKEY)          ke.kb_table = K_SHIFTTAB;          // ascii = keyTableShifted[scancode];        else          ke.kb_table = K_NORMTAB;          // ascii = keyTable[scancode];        }    if(modifiers & EVT_ALTSTATE)      ke.kb_table |= K_ALTTAB;    if (ioctl(tty_fd, KDGKBENT, (unsigned long)&ke)) {        fprintf(stderr, "KDGKBENT at index %d in table %d: ",            scancode, ke.kb_table);        return 0;    }    ascii = ke.kb_value;    /* Add ASCII code if key is not alt'ed or ctrl'ed */    if (!(modifiers & (EVT_ALTSTATE | EVT_CTRLSTATE)))        code |= ascii;    return code;}/****************************************************************************PARAMETERS:what        - Event codescancode    - Raw scancode of keyboard event to addREMARKS:Adds a new keyboard event to the event queue. We only take KEYUP andKEYDOWN event codes, however if a key is already down we convert the KEYDOWNto a KEYREPEAT.****************************************************************************/static void addKeyEvent(    uint what,    uint scancode){    WD_event    evt;    if (count < EVENTQSIZE) {        evt.what = what;        evt.when = getTimeStamp();        evt.message = getKeyMessage(scancode,key_modifiers) | 0x10000UL;        evt.where_x = evt.where_y = 0;        evt.modifiers = key_modifiers;        if (evt.what == EVT_KEYUP)            key_down[scancode] = false;        else if (evt.what == EVT_KEYDOWN) {            if (key_down[scancode]) {                if (oldKey != -1) {                    evtq[oldKey].message += 0x10000UL;                    }                else {                    evt.what = EVT_KEYREPEAT;                    oldKey = freeHead;                    addEvent(&evt);                    oldMove = -1;                    }                return;                }            key_down[scancode] = true;            }        addEvent(&evt);        oldMove = -1;        }}/****************************************************************************PARAMETERS:sig - Signal being sent to this signal handlerREMARKS:Signal handler for the timer. This routine takes care of periodicallyposting timer events to the event queue.****************************************************************************/void timerHandler(    int sig){    WD_event    evt;    if (sig == SIGALRM) {        if (count < EVENTQSIZE) {            evt.when = getTimeStamp();            evt.what = EVT_TIMERTICK;            evt.message = 0;            evt.where_x = evt.where_y = 0;            evt.modifiers = 0;            addEvent(&evt);            oldMove = -1;            oldKey = -1;            }        signal(SIGALRM, timerHandler);        }}/****************************************************************************REMARKS:Restore the terminal to normal operation on exit****************************************************************************/static void restore_term(void){    RMREGS  regs;    if (installed) {        /* Restore text mode and the state of the console */        regs.x.ax = 0x3;        PM_int86(0x10,&regs,&regs);        PM_restoreConsoleState(stateBuf,tty_fd);        /* Restore console to normal operation */        ioctl(tty_fd, VT_SETMODE, &oldvtmode);        ioctl(tty_fd, KDSKBMODE, oldkbmode);        tcsetattr(tty_fd, TCSAFLUSH, &old_conf);        fcntl(tty_fd,F_SETFL,old_flags &= ~O_NONBLOCK);        PM_closeConsole(tty_fd);        /* Close the mouse driver */        close(conn);        /* Flag that we are not no longer installed */        installed = false;        }}/****************************************************************************REMARKS:Signal handler to capture forced program termination conditions so that

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产高清精品网站| 亚洲色图欧美偷拍| 日韩精品久久理论片| 在线精品国精品国产尤物884a| 国产欧美日韩久久| 成人aa视频在线观看| 国产精品素人一区二区| av网站免费线看精品| 日本不卡在线视频| 色综合天天视频在线观看| 中文字幕的久久| 成人av动漫网站| 亚洲欧美成人一区二区三区| 91麻豆福利精品推荐| 午夜精品视频在线观看| 91精品国产一区二区三区蜜臀| 麻豆91小视频| 国产精品久久久久久久久免费相片| 91免费版pro下载短视频| 亚洲福利视频一区| 精品1区2区在线观看| 成人在线视频一区二区| 亚洲图片一区二区| 久久老女人爱爱| 国产欧美日韩卡一| 在线播放/欧美激情| 国产一区二区三区电影在线观看 | 国产精一区二区三区| 久久婷婷国产综合精品青草| 成人午夜在线免费| 亚洲午夜在线电影| 精品国产乱码久久久久久蜜臀| 不卡的av在线播放| 日本成人在线网站| 欧美国产日韩亚洲一区| 欧美日韩在线亚洲一区蜜芽| 国产福利一区二区三区视频| 亚洲成人资源网| 久久久久久久精| 欧美日韩一区三区四区| 成人性生交大合| 美女国产一区二区| 欧美日本韩国一区| 成人h动漫精品一区二区| 青青草国产精品97视觉盛宴| 中文字幕一区二区三区av| 欧美成人国产一区二区| 亚洲国产一区二区三区青草影视| 精品国产乱子伦一区| av成人免费在线观看| 精品久久五月天| 色婷婷国产精品综合在线观看| 国产一区二区三区观看| 丝袜国产日韩另类美女| 亚洲女同一区二区| 国产亚洲综合在线| 日韩欧美一级二级三级 | 97se亚洲国产综合自在线| 精品在线免费观看| 日韩国产在线观看| 亚洲午夜在线视频| 一区二区日韩电影| 欧美日韩三级一区| 色噜噜夜夜夜综合网| www.欧美.com| 成人av电影在线观看| 狠狠色狠狠色综合系列| 麻豆精品视频在线| 日本视频在线一区| 欧美人牲a欧美精品| 欧美日本精品一区二区三区| 99精品国产视频| 最新久久zyz资源站| 亚洲国产成人午夜在线一区| www久久精品| 日韩欧美激情一区| 欧美一区二区三区视频| 欧美一区二区三区在线电影| 欧美日韩成人激情| 51精品秘密在线观看| 91精品黄色片免费大全| 日韩一区二区在线观看| 91精品国产综合久久久久久久久久 | 国产精品996| 黄色资源网久久资源365| 激情综合色播五月| 狠狠色综合日日| 国产盗摄精品一区二区三区在线 | 亚洲天堂久久久久久久| 99久久精品免费观看| 国产91精品露脸国语对白| 高清国产一区二区三区| av福利精品导航| 色婷婷综合久久久中文字幕| 日本韩国一区二区| 欧美裸体bbwbbwbbw| 欧美一卡在线观看| 国产夜色精品一区二区av| 国产精品国产自产拍在线| 亚洲一区二区三区视频在线 | 国内外精品视频| 成人免费毛片片v| 色素色在线综合| 日韩写真欧美这视频| 国产视频视频一区| 夜夜亚洲天天久久| 精品无码三级在线观看视频| 丁香激情综合五月| 欧美日韩激情一区二区三区| 欧美成人aa大片| 国产精品久久99| 美国毛片一区二区三区| 成人免费毛片片v| 欧美美女激情18p| 国产亚洲欧美日韩在线一区| 亚洲精选视频在线| 色香蕉久久蜜桃| 欧美电影免费观看高清完整版在线观看| 久久综合色8888| 亚洲综合一区在线| 精品无人区卡一卡二卡三乱码免费卡| 91丨porny丨国产| 日韩欧美一区中文| 亚洲欧洲韩国日本视频| 欧美aaaaaa午夜精品| 99re66热这里只有精品3直播| 欧美一区二区在线免费观看| 国产精品视频九色porn| 日韩1区2区日韩1区2区| av电影天堂一区二区在线| 国产成人啪免费观看软件| 欧日韩精品视频| 欧美国产精品中文字幕| 日韩福利电影在线| 97精品国产露脸对白| 成人黄色电影在线 | 精品成人a区在线观看| 亚洲欧洲av在线| 国模冰冰炮一区二区| 欧美日韩精品一区二区天天拍小说 | 国产成人午夜精品影院观看视频 | 精品一区二区成人精品| 91麻豆免费观看| 91蜜桃网址入口| 国产欧美一区二区精品性| 婷婷成人激情在线网| 91啦中文在线观看| 国产欧美视频在线观看| 久久精品久久99精品久久| 欧美三级韩国三级日本三斤| 自拍av一区二区三区| 岛国精品在线播放| 精品久久久久久综合日本欧美 | 久久不见久久见免费视频1| 欧美亚洲一区二区三区四区| 久久久.com| 国产一区在线观看麻豆| 日韩无一区二区| 免费看日韩精品| 制服丝袜亚洲色图| 日韩国产一二三区| 日韩一二三四区| 蜜臀va亚洲va欧美va天堂| 欧美一区二区日韩| 奇米四色…亚洲| 日韩午夜激情av| 国产一区二区三区免费播放| 日韩一区二区三区在线| 毛片不卡一区二区| 欧美sm极限捆绑bd| 国产精品一区二区三区网站| 久久久精品黄色| 成人美女视频在线看| 中文字幕一区二区三区四区不卡 | 国产尤物一区二区在线| 久久久亚洲综合| 国产精品一品二品| 欧美精彩视频一区二区三区| 粉嫩蜜臀av国产精品网站| 国产欧美一区二区精品性色| av在线综合网| 亚洲一区二区三区四区五区黄| 欧美日韩一区二区三区免费看 | 亚洲日本一区二区| 91视频在线看| 亚洲综合999| 日韩一区二区三区观看| 国产一区二三区好的| 国产精品免费观看视频| 91网站视频在线观看| 亚洲精品国产无套在线观 | 欧美精品一区二区三区蜜臀| 国产伦精品一区二区三区在线观看| 一本大道综合伊人精品热热| 亚洲成人免费电影| 精品国产99国产精品| 91丨porny丨户外露出| 日韩国产欧美三级| 国产精品天天摸av网| 三级欧美在线一区|