亚洲欧美第一页_禁久久精品乱码_粉嫩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

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产毛片一区二区| 欧美国产一区二区| 日韩专区在线视频| 69久久99精品久久久久婷婷| 五月激情综合婷婷| 91精品国产品国语在线不卡| 韩国女主播一区| 亚洲欧洲在线观看av| 色综合久久六月婷婷中文字幕| 亚洲激情av在线| 欧美猛男超大videosgay| 日韩成人伦理电影在线观看| 精品国产乱码久久久久久闺蜜 | 一本一道综合狠狠老| 亚洲一区在线观看视频| 精品视频全国免费看| 久久国产精品99久久久久久老狼| 国产午夜亚洲精品羞羞网站| www.亚洲人| 亚洲午夜精品在线| 精品国产在天天线2019| 国产精品123区| 一区二区三区在线播放| 欧美一区二区三区不卡| 国产成人亚洲综合色影视| 一区二区三区在线免费| 日韩欧美一区电影| av电影一区二区| 欧美aaa在线| 国产精品每日更新| 欧美高清视频在线高清观看mv色露露十八| 美日韩一区二区三区| ...中文天堂在线一区| 4438x亚洲最大成人网| 国产成人综合自拍| 日本视频在线一区| 亚洲色图.com| 精品国免费一区二区三区| 91在线看国产| 国产一区二区三区最好精华液| 亚洲美女少妇撒尿| 久久先锋影音av鲁色资源| 91福利国产精品| 成人永久aaa| 久久99九九99精品| 亚瑟在线精品视频| 亚洲精选免费视频| 欧美国产日韩精品免费观看| 欧美一区二区三区日韩| 91国产福利在线| 菠萝蜜视频在线观看一区| 精品一区在线看| 日本网站在线观看一区二区三区| 伊人色综合久久天天| 国产精品你懂的在线| 亚洲精品一区在线观看| 欧美丰满一区二区免费视频| 91亚洲精华国产精华精华液| 国产一区二区三区在线观看免费视频| 亚洲h精品动漫在线观看| 18成人在线视频| 久久久不卡网国产精品二区| 欧美三日本三级三级在线播放| 成人网在线播放| 久久精品国产精品青草| 亚洲一区二区三区自拍| 国产视频一区二区在线| 欧美一级片免费看| 欧美日韩一区二区电影| 99re亚洲国产精品| 国产精品69毛片高清亚洲| 免费观看在线综合| 国产精品乱码人人做人人爱| 国产欧美日韩另类视频免费观看| 欧美一区二区人人喊爽| 欧美性色黄大片| 色天使久久综合网天天| kk眼镜猥琐国模调教系列一区二区 | 在线欧美日韩国产| 成人综合激情网| 国产一区二区三区四区五区入口| 青青青伊人色综合久久| 亚洲人快播电影网| 一区二区在线观看视频在线观看| 国产精品三级视频| 国产三级三级三级精品8ⅰ区| 日韩午夜中文字幕| 91精品国产综合久久久久| 欧美亚洲禁片免费| 欧美熟乱第一页| 色综合久久久久| 欧美一区二区三区啪啪| 制服.丝袜.亚洲.中文.综合 | 成人性生交大片免费看中文| 国产成人综合网站| 国产麻豆精品theporn| 精品一区二区三区久久| 九九九精品视频| 亚洲成人免费在线| 午夜欧美在线一二页| 亚洲福利视频导航| 日韩精品视频网站| 免费观看在线综合色| 精品一区二区三区在线播放| 蜜桃视频一区二区| 国产一区二区三区高清播放| 国产乱码精品一区二区三区忘忧草| 日韩黄色免费电影| 精品一区二区三区久久久| 国产成人精品综合在线观看| 成人h动漫精品一区二区| 99re热这里只有精品视频| 91精品福利在线| 7777精品伊人久久久大香线蕉完整版| 91精品国产综合久久久久久| 精品久久久网站| 亚洲精品中文字幕在线观看| 偷拍亚洲欧洲综合| 捆绑调教一区二区三区| 国产成a人无v码亚洲福利| 95精品视频在线| 欧美日本一区二区三区四区 | 久久影院午夜片一区| 国产精品免费av| 午夜欧美视频在线观看| 久久精品国产澳门| 91丨九色丨蝌蚪富婆spa| 欧美色国产精品| 久久久久久亚洲综合影院红桃| 国产色91在线| 亚洲大片精品永久免费| 韩国精品久久久| 日本久久电影网| 精品国产乱码久久久久久闺蜜| 国产精品麻豆久久久| 亚洲国产婷婷综合在线精品| 久久不见久久见免费视频7| 欧美伊人久久久久久午夜久久久久| 日韩欧美国产高清| 亚洲女爱视频在线| 黑人巨大精品欧美一区| 91蜜桃视频在线| 日韩免费在线观看| 亚洲精品国产一区二区精华液| 国产成人精品免费在线| 91精品国产综合久久蜜臀| 国产精品不卡一区二区三区| 日本91福利区| 91高清在线观看| 日本一区二区免费在线| 亚洲精品大片www| 91一区二区在线观看| 欧美精品一区二区精品网| 一区二区在线观看免费视频播放| 裸体在线国模精品偷拍| 在线观看欧美黄色| 亚洲国产精品高清| 青青国产91久久久久久| 暴力调教一区二区三区| 国产日韩精品一区二区三区| 三级一区在线视频先锋| 91麻豆自制传媒国产之光| 久久这里只有精品首页| 日本不卡视频一二三区| 欧美综合一区二区三区| 日韩免费视频线观看| 精品一区二区影视| 日韩亚洲欧美综合| 天使萌一区二区三区免费观看| 91蜜桃在线观看| 91麻豆精品91久久久久久清纯| 午夜欧美电影在线观看| 欧美日韩一区二区欧美激情 | 日韩高清在线一区| 一本一道久久a久久精品| 国产精品美日韩| 极品少妇一区二区| 久久久不卡网国产精品一区| 久久精品理论片| 欧美电影精品一区二区| 奇米精品一区二区三区四区| 欧美日韩国产123区| 依依成人精品视频| 欧美精品久久99久久在免费线| 亚洲成av人片一区二区梦乃 | 欧美激情一区二区三区四区| 国产成人综合自拍| 久久精品视频一区二区三区| 精品亚洲成a人| 精品国产凹凸成av人网站| 精品中文字幕一区二区小辣椒| 91精品国产91久久久久久一区二区| 午夜久久久影院| 91精品欧美福利在线观看| 一区二区三区高清不卡| thepron国产精品| 性做久久久久久久久| 日韩一区二区三区四区| 久久精品国产77777蜜臀| 2020国产成人综合网|