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

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

?? event.svga

?? gumstiz u-boot loader in linux
?? 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一区二区三区免费野_久草精品视频
久久久久一区二区三区四区| 欧美另类久久久品| 中文字幕中文字幕一区| 激情五月激情综合网| 中文在线一区二区 | 不卡高清视频专区| 欧美极品xxx| 久久99久久久久久久久久久| 欧美日韩在线直播| 91视频.com| 蜜臀av一区二区在线免费观看| 91丨porny丨中文| 日本成人超碰在线观看| 亚洲日本在线观看| 精品国产三级a在线观看| 欧美专区日韩专区| 99久久精品国产一区| 国产综合色在线视频区| 日韩av一级片| 香蕉久久夜色精品国产使用方法| 欧美不卡123| 欧美日韩精品欧美日韩精品| 麻豆极品一区二区三区| 日韩专区中文字幕一区二区| 亚洲精品久久久蜜桃| 国产精品久久久久久久久动漫| 欧美日韩色综合| 色94色欧美sute亚洲线路一ni | 亚洲欧美激情小说另类| 国产性色一区二区| 91成人在线免费观看| av电影在线不卡| 99在线精品观看| 91性感美女视频| 99久久伊人久久99| av电影天堂一区二区在线| 成人av网站在线| va亚洲va日韩不卡在线观看| av在线这里只有精品| av爱爱亚洲一区| 色综合久久久久网| 色综合久久88色综合天天| 91美女蜜桃在线| 色激情天天射综合网| 欧美性生活影院| 欧美另类久久久品| 日韩精品一区二区三区中文精品| 色天使色偷偷av一区二区| 91麻豆免费观看| 欧洲亚洲国产日韩| 欧美日韩不卡在线| 91蝌蚪porny成人天涯| 色噜噜夜夜夜综合网| 欧美日韩国产高清一区二区三区| 丁香六月久久综合狠狠色| 成人午夜视频福利| 久久精品999| 亚洲线精品一区二区三区| 国产女人18毛片水真多成人如厕| 欧美福利电影网| 精品日韩成人av| 久久人人爽爽爽人久久久| 国产精品视频一二| 一区二区三区欧美在线观看| 国产性做久久久久久| 亚洲色图欧美偷拍| 视频一区视频二区在线观看| 国内精品视频666| 91影院在线免费观看| 欧美日韩一区二区三区视频| 欧美va亚洲va在线观看蝴蝶网| 欧美美女激情18p| 久久久久久久免费视频了| 亚洲欧洲色图综合| 琪琪久久久久日韩精品| 国产成人8x视频一区二区 | 亚洲午夜久久久久久久久电影网| 国产精品乱码一区二三区小蝌蚪| 久久午夜色播影院免费高清| 欧美国产1区2区| 国产亚洲自拍一区| 亚洲欧美另类久久久精品| 亚洲乱码日产精品bd| 日本少妇一区二区| 青草国产精品久久久久久| 成人免费视频一区| voyeur盗摄精品| 91麻豆精品一区二区三区| 欧美一级免费大片| 成人欧美一区二区三区黑人麻豆 | 在线视频你懂得一区二区三区| 97久久精品人人做人人爽50路| 国产xxx精品视频大全| 欧美日精品一区视频| 欧美日韩精品三区| 国产精品女主播av| 亚洲另类在线视频| 国产乱国产乱300精品| 国产高清成人在线| 欧美一区二区三区免费视频| 中文字幕一区二区三区精华液 | 视频在线观看91| 91免费视频大全| 欧美激情一区二区三区在线| 日韩不卡在线观看日韩不卡视频| 丝袜诱惑制服诱惑色一区在线观看| 国产午夜三级一区二区三| 婷婷久久综合九色国产成人 | 日韩色在线观看| 又紧又大又爽精品一区二区| 国产精一区二区三区| 波多野结衣中文字幕一区 | 午夜激情综合网| 久久不见久久见中文字幕免费| 精彩视频一区二区三区| 欧美日韩一区二区欧美激情 | 中文在线资源观看网站视频免费不卡| 中文字幕一区二区日韩精品绯色| 亚洲精品国产精华液| 成+人+亚洲+综合天堂| 欧美色偷偷大香| 亚洲欧美成aⅴ人在线观看| 成人午夜电影小说| 久久久不卡网国产精品一区| 九九九精品视频| 91在线观看污| 国产精品免费aⅴ片在线观看| 亚洲国产婷婷综合在线精品| 99精品视频一区| 国产精品久久久久久妇女6080 | 亚洲成人精品一区二区| 久久国产尿小便嘘嘘| 9191成人精品久久| 中文字幕精品在线不卡| 国产成人aaaa| 一色屋精品亚洲香蕉网站| 成人美女视频在线看| 国产精品久久久久精k8| 97se亚洲国产综合自在线观| 亚洲色图欧洲色图| 欧美午夜电影一区| 亚洲成人免费观看| 欧美一区二区福利在线| 蜜臀久久久久久久| 精品国产伦一区二区三区免费| 亚洲欧美成人一区二区三区| 在线观看www91| 婷婷六月综合亚洲| 精品国一区二区三区| 国产乱码精品一区二区三区忘忧草| 欧美影视一区在线| 香港成人在线视频| 色综合久久久久综合99| 午夜精品久久久久久久久久久| 成人av电影在线| 亚洲一区二区三区四区中文字幕| 国产99久久久国产精品潘金| 中文字幕av一区二区三区免费看| 久久爱www久久做| 91精品免费在线| 国产精品自拍av| 成人欧美一区二区三区黑人麻豆| 国产传媒一区在线| 国产精品久久99| 国产99久久久久| 亚洲一二三四区| 91精品婷婷国产综合久久性色| 亚洲高清三级视频| 日韩精品中文字幕在线不卡尤物| 亚洲国产毛片aaaaa无费看| 成人av免费在线| 日本视频中文字幕一区二区三区| 精品1区2区3区| 美女爽到高潮91| 国产精品免费av| 不卡的av电影| 免费在线观看精品| 中文欧美字幕免费| 在线综合视频播放| 粉嫩aⅴ一区二区三区四区五区 | 国产精品嫩草99a| 欧美精品久久99| www.亚洲免费av| 美国一区二区三区在线播放| 亚洲视频香蕉人妖| 欧美成人video| 在线观看亚洲精品视频| 国产在线视频精品一区| 亚洲第一综合色| 国产精品久久久久aaaa| 日韩免费观看高清完整版在线观看| 狂野欧美性猛交blacked| 综合色中文字幕| 在线观看亚洲a| 成人h动漫精品| 激情久久五月天| 视频一区二区三区中文字幕| 亚洲图片你懂的| 欧美一区二区久久久| 在线一区二区三区四区五区 |