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

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

?? event.svga

?? 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一区二区三区免费野_久草精品视频
久久免费视频色| 日韩欧美高清dvd碟片| 国产精品高潮久久久久无| 国产高清亚洲一区| 97精品国产露脸对白| 日韩精品中文字幕一区二区三区| 亚洲欧洲99久久| 激情综合色综合久久| 欧美怡红院视频| 中文字幕亚洲在| 国产另类ts人妖一区二区| 欧美日韩在线三区| 国产精品传媒在线| 国产成人免费网站| 日韩欧美你懂的| 亚洲www啪成人一区二区麻豆| 成人av动漫在线| 国产日韩欧美a| 精品无码三级在线观看视频| 3d成人h动漫网站入口| 亚洲另类中文字| 91日韩在线专区| 亚洲欧美综合在线精品| 不卡一卡二卡三乱码免费网站| 久久综合九色综合97婷婷女人| 首页国产丝袜综合| 欧美日本韩国一区二区三区视频| 亚洲免费观看高清完整版在线观看 | 久久久久久一二三区| 美国毛片一区二区三区| 91精品国产综合久久精品| 亚洲高清一区二区三区| 色婷婷综合久久久久中文| 日韩理论在线观看| 成人av在线播放网站| 欧美国产日韩一二三区| 国产成人午夜片在线观看高清观看| 久久亚洲精品小早川怜子| 国产在线精品国自产拍免费| 国产亚洲va综合人人澡精品| 国产乱子伦视频一区二区三区| 精品成人一区二区三区四区| 国产在线乱码一区二区三区| 久久久久久久一区| av在线综合网| 亚洲妇女屁股眼交7| 7777精品久久久大香线蕉| 日日骚欧美日韩| 久久―日本道色综合久久| 99久久亚洲一区二区三区青草| 亚洲美女精品一区| 欧美精品一二三四| 久久成人羞羞网站| 中文字幕一区二区三区视频| 欧美性受极品xxxx喷水| 蜜臀av性久久久久蜜臀aⅴ四虎| 欧美r级电影在线观看| 国产99精品在线观看| 亚洲美女视频在线| 日韩一区二区三区三四区视频在线观看| 日本特黄久久久高潮| 欧美国产一区二区| 在线精品亚洲一区二区不卡| 日韩国产高清影视| 国产精品青草综合久久久久99| 欧美丝袜自拍制服另类| 久久精品久久久精品美女| 国产精品嫩草影院com| 欧美天堂亚洲电影院在线播放| 男女男精品网站| 亚洲欧美一区二区不卡| 日韩欧美在线网站| jlzzjlzz国产精品久久| 青青草成人在线观看| 国产精品少妇自拍| 这里只有精品视频在线观看| 成人性生交大合| 日韩av中文在线观看| 国产精品久久福利| 欧美一区二区三区成人| 99久久99精品久久久久久 | 欧美亚洲日本一区| 国产精品中文字幕欧美| 视频一区视频二区在线观看| 欧美激情在线一区二区三区| 日韩免费看的电影| 91国在线观看| 99久久精品免费看国产 | 成人激情午夜影院| 奇米精品一区二区三区四区| 亚洲三级电影全部在线观看高清| 精品国产乱码久久久久久图片 | 亚洲图片欧美色图| 国产精品久久久久久福利一牛影视 | 国产精品国产三级国产专播品爱网| 8x福利精品第一导航| 色婷婷久久一区二区三区麻豆| 国内不卡的二区三区中文字幕| 午夜一区二区三区在线观看| 亚洲欧美影音先锋| 国产精品蜜臀av| 久久久精品黄色| 精品国产欧美一区二区| 欧美日本一区二区| 欧美日韩一卡二卡| 91久久一区二区| 色呦呦国产精品| 91视频你懂的| 色天天综合色天天久久| 97精品国产97久久久久久久久久久久| 国产91精品一区二区| 国产一区二区精品久久| 激情综合色播五月| 狠狠色伊人亚洲综合成人| 免费在线观看日韩欧美| 日本亚洲天堂网| 日韩精彩视频在线观看| 亚洲一区二区综合| 亚洲一二三四在线观看| 一区二区三区日韩精品视频| 一区二区三区日韩在线观看| 一区二区三区四区国产精品| 亚洲美女精品一区| 亚洲gay无套男同| 日本特黄久久久高潮| 免费在线一区观看| 精品一区二区三区免费| 国产美女精品一区二区三区| 成人禁用看黄a在线| 99久久免费国产| 欧美亚洲图片小说| 日韩一区二区精品| 久久久影视传媒| 国产精品美女久久久久久| 自拍偷自拍亚洲精品播放| 亚洲综合激情小说| 青椒成人免费视频| 寂寞少妇一区二区三区| 国产精品中文字幕欧美| 色域天天综合网| 欧美一区二区二区| 久久这里只有精品6| 亚洲视频一区二区免费在线观看 | 麻豆视频观看网址久久| 黑人精品欧美一区二区蜜桃| a级精品国产片在线观看| 色综合久久久久综合体桃花网| 欧美日韩视频在线第一区| 精品日韩成人av| 国产精品色婷婷| 亚洲第一激情av| 韩国视频一区二区| 91丨porny丨蝌蚪视频| 91精品国产一区二区| 国产欧美日韩久久| 午夜精品久久久久久久久久| 国产精品123| 欧美亚洲国产一区在线观看网站 | 久久福利视频一区二区| av爱爱亚洲一区| 91精品国产乱码| 一区精品在线播放| 日韩va亚洲va欧美va久久| 成人激情综合网站| 日韩午夜av电影| 亚洲免费观看高清| 国产激情一区二区三区四区| 欧美午夜精品一区二区蜜桃| 久久亚洲捆绑美女| 日日夜夜精品视频天天综合网| www.亚洲精品| 久久久亚洲高清| 免费观看30秒视频久久| 色女孩综合影院| 精品动漫一区二区三区在线观看 | 亚洲男人的天堂av| 极品销魂美女一区二区三区| 在线免费观看成人短视频| 精品国产一区久久| 天天综合天天综合色| 一本一道久久a久久精品 | 51精品视频一区二区三区| 亚洲视频在线观看一区| 成人免费毛片aaaaa**| 精品久久国产97色综合| 日本午夜精品视频在线观看 | 99久久国产综合精品色伊| 精品国产乱码91久久久久久网站| 亚洲成av人片观看| 一本大道久久a久久精品综合| 国产丝袜美腿一区二区三区| 韩国av一区二区| 精品人伦一区二区色婷婷| 日本欧美一区二区在线观看| 欧美在线色视频| 一区二区三区加勒比av| 成人亚洲精品久久久久软件| 久久亚洲二区三区| 国内精品写真在线观看| 精品奇米国产一区二区三区|