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

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

?? event.svga

?? 針對yassylcd的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一区二区三区免费野_久草精品视频
亚洲成人综合网站| 97久久精品人人爽人人爽蜜臀| 久久av老司机精品网站导航| 成人免费精品视频| 欧美久久一区二区| 18成人在线观看| 韩日av一区二区| 欧美另类videos死尸| 亚洲婷婷国产精品电影人久久| 精一区二区三区| 欧美精品在线一区二区| 国产精品久久久久aaaa| 国产乱子轮精品视频| 欧美日韩国产bt| 中文字幕一区免费在线观看| 精品一区二区在线看| 欧美裸体一区二区三区| 91网站最新地址| 色综合天天综合狠狠| 久久午夜羞羞影院免费观看| 欧美日韩亚洲不卡| 精品精品国产高清a毛片牛牛| 亚洲在线视频一区| 色女孩综合影院| 综合亚洲深深色噜噜狠狠网站| 大白屁股一区二区视频| 久久久精品中文字幕麻豆发布| 麻豆91精品91久久久的内涵| 337p亚洲精品色噜噜噜| 亚洲gay无套男同| 欧美日韩dvd在线观看| 亚洲成人免费在线观看| 欧美精品一级二级三级| 蜜桃视频在线一区| 91精品国产综合久久久久久久| 丝袜美腿亚洲综合| 精品日韩av一区二区| 国产一区二区看久久| 精品国产sm最大网站| 国产在线精品一区在线观看麻豆| 日韩视频在线永久播放| 国产一区二区不卡| 国产精品三级av| 色哦色哦哦色天天综合| 图片区小说区区亚洲影院| 7777精品伊人久久久大香线蕉| 日韩精品欧美精品| 久久久噜噜噜久久中文字幕色伊伊| 国产成人在线色| 亚洲精品国久久99热| 欧美在线观看视频一区二区 | 午夜亚洲国产au精品一区二区| 一本久久a久久免费精品不卡| 亚洲狠狠爱一区二区三区| 911精品产国品一二三产区| 久久精品国产一区二区三区免费看 | 国产一区二区免费在线| 亚洲欧美自拍偷拍| 6080亚洲精品一区二区| 国产成人精品免费| 一区二区三区在线影院| 欧美精品高清视频| 成人一级黄色片| 亚洲成人激情综合网| 日韩欧美国产不卡| 99精品桃花视频在线观看| 亚洲成人av一区二区| 久久精品人人做人人爽97| 在线观看亚洲精品| 国产精品一区免费在线观看| 一区二区三区四区视频精品免费 | 国产伦精品一区二区三区视频青涩 | 国产精品久久久一区麻豆最新章节| 欧美午夜精品一区二区三区| 久草精品在线观看| 一区二区三区中文字幕在线观看| 精品国产在天天线2019| 在线观看日韩国产| 国产91在线观看丝袜| 男女性色大片免费观看一区二区 | 婷婷久久综合九色综合绿巨人| 国产免费成人在线视频| 日韩一卡二卡三卡四卡| 在线精品视频免费播放| 成人午夜精品在线| 精品一区二区成人精品| 日韩高清在线观看| 亚洲福利一二三区| 国产精品九色蝌蚪自拍| 久久久久国产免费免费| 日韩视频国产视频| 在线电影院国产精品| 色哟哟日韩精品| 99国产麻豆精品| 成人福利视频在线| 国产美女视频一区| 国产尤物一区二区| 麻豆久久一区二区| 免费成人结看片| 天堂一区二区在线免费观看| 亚洲一区二区三区四区在线免费观看 | 一区二区三区四区在线| 国产精品美女久久久久aⅴ| 久久久www成人免费无遮挡大片 | 久久精品久久久精品美女| 石原莉奈在线亚洲二区| 午夜精品久久久久久久 | 国产精品久久久久久久久晋中 | 亚洲国产精品v| 欧美经典一区二区| 欧美国产乱子伦| 亚洲国产高清在线| 国产精品伦一区| 最近中文字幕一区二区三区| 中文字幕一区二区三区不卡在线| 国产精品高潮呻吟久久| 亚洲免费观看在线视频| 一区二区三区久久| 午夜激情一区二区三区| 日本女优在线视频一区二区| 婷婷国产在线综合| 美洲天堂一区二卡三卡四卡视频| 久久精品国产在热久久| 国产精品一区二区无线| av一区二区不卡| 色久综合一二码| 欧美日本一区二区在线观看| 91精品国产免费| 久久精品亚洲国产奇米99| 日本一区二区三区电影| 亚洲精品国产视频| 日韩一区欧美二区| 韩国视频一区二区| zzijzzij亚洲日本少妇熟睡| 色综合久久中文字幕| 欧美日韩国产影片| 久久综合九色综合欧美98| 中文字幕av一区二区三区| 亚洲男人天堂一区| 男女男精品视频| 成人网在线播放| 欧美色区777第一页| 精品久久一区二区| 国产精品色一区二区三区| 亚洲一区二区精品视频| 经典三级一区二区| 91色九色蝌蚪| 日韩精品中文字幕一区| 一色屋精品亚洲香蕉网站| 日韩中文字幕亚洲一区二区va在线| 国内国产精品久久| 欧美色图免费看| 国产亚洲一区二区三区| 亚洲制服欧美中文字幕中文字幕| 亚洲电影激情视频网站| 国产精品1区2区3区在线观看| 成人av在线一区二区| 欧美日韩www| 国产精品久久久久久久久免费樱桃| 午夜欧美电影在线观看| 不卡的电影网站| 精品999在线播放| 一区二区在线看| 麻豆成人综合网| 一本久久综合亚洲鲁鲁五月天| 久久九九影视网| 日韩av一区二区在线影视| 91啪在线观看| 国产午夜精品一区二区三区四区| 午夜精品福利在线| 99久久精品免费看国产免费软件| 欧美一区二区在线观看| 亚洲在线一区二区三区| 91亚洲精华国产精华精华液| 精品国产污网站| 免费观看在线色综合| 欧美在线视频不卡| 国产精品国产馆在线真实露脸 | 欧美在线不卡视频| 国产精品全国免费观看高清| 久久精品国产**网站演员| 欧美精品第1页| 亚洲18色成人| 欧美日韩一区精品| 亚洲自拍都市欧美小说| 91丨porny丨国产入口| 国产精品第13页| 成人app软件下载大全免费| 国产午夜精品一区二区三区视频| 久久精品国产99| 精品国产一区二区三区不卡| 久久电影网电视剧免费观看| 日韩一区二区三区免费观看| 日本人妖一区二区| 日韩一区二区三区视频| 六月丁香综合在线视频| 日韩三级免费观看| 精品中文字幕一区二区小辣椒| 精品久久国产老人久久综合| 久久99热99|