亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产女人aaa级久久久级| 久久国产剧场电影| 亚洲精品高清在线观看| 自拍视频在线观看一区二区| 国产精品每日更新在线播放网址| 国产日产欧美一区二区三区| 国产欧美日韩中文久久| 国产精品久久久久天堂| 综合在线观看色| 一区二区三区不卡在线观看 | 最新不卡av在线| 国产精品白丝在线| 亚洲另类春色校园小说| 亚洲妇女屁股眼交7| 日本一区中文字幕| 精品综合免费视频观看| 国产成a人无v码亚洲福利| 成人动漫一区二区| 日本高清成人免费播放| 欧美日韩国产色站一区二区三区| 欧美日韩国产精选| 精品久久久久一区| 国产精品青草久久| 一区二区三区中文免费| 日韩中文字幕av电影| 韩国精品久久久| 91丝袜国产在线播放| 欧美老人xxxx18| 久久免费国产精品| 亚洲精品欧美综合四区| 蜜臀av一区二区在线免费观看| 国产一区二区剧情av在线| 91在线小视频| 欧美一区二区女人| 国产精品无遮挡| 午夜在线电影亚洲一区| 国内精品久久久久影院薰衣草| av网站一区二区三区| 欧美精品少妇一区二区三区| 26uuu国产电影一区二区| 亚洲蜜臀av乱码久久精品蜜桃| 日韩av一区二区在线影视| 国产精品18久久久久久vr| 日本精品免费观看高清观看| 欧美变态tickle挠乳网站| 亚洲欧美一区二区久久| 久久国产精品露脸对白| 99re成人精品视频| 欧美不卡在线视频| 亚洲激情中文1区| 国模冰冰炮一区二区| 欧美三级中文字幕在线观看| 国产欧美久久久精品影院| 午夜精品福利在线| gogo大胆日本视频一区| 日韩欧美一区电影| 亚洲精品欧美激情| 国产精品91一区二区| 欧美日韩国产综合久久| 中文字幕一区在线观看视频| 麻豆成人在线观看| 欧美色电影在线| 国产精品乱码一区二区三区软件 | 精品亚洲porn| 欧美性大战xxxxx久久久| 国产日韩欧美精品在线| 蜜桃久久av一区| 欧洲在线/亚洲| 中文字幕中文在线不卡住| 久久99精品视频| 欧美猛男超大videosgay| ...xxx性欧美| 国产成人精品一区二区三区四区| 91精品在线观看入口| 亚洲综合在线观看视频| 成人综合婷婷国产精品久久| 欧美成人女星排名| 午夜电影一区二区| 欧洲国产伦久久久久久久| 亚洲欧洲韩国日本视频| 国产成人夜色高潮福利影视| 精品国产乱码久久久久久影片| 亚洲chinese男男1069| 99精品1区2区| 国产精品免费看片| 国产成人免费网站| 精品国产一区二区三区久久影院| 日韩电影一区二区三区| 欧美日韩性生活| 一区二区三区国产精华| 日本电影欧美片| 亚洲综合一二区| 欧美在线一二三| 亚洲国产精品一区二区久久| 91久久精品国产91性色tv| 亚洲九九爱视频| 91福利视频网站| 亚洲一区二区三区在线| 欧美亚洲综合一区| 亚洲图片欧美视频| 欧美日韩一区精品| 亚洲成人www| 91精品在线麻豆| 麻豆国产精品视频| 久久人人超碰精品| 国v精品久久久网| 最新日韩av在线| 色偷偷88欧美精品久久久| 亚洲自拍欧美精品| 欧美精品在线观看播放| 麻豆中文一区二区| 久久久久久久久免费| 国产成人午夜99999| 国产精品伦一区二区三级视频| 97久久超碰精品国产| 亚洲一区免费视频| 欧美日韩中文精品| 六月丁香综合在线视频| 国产性天天综合网| 99r精品视频| 天堂影院一区二区| 2024国产精品视频| 成人黄色777网| 亚洲电影欧美电影有声小说| 日韩欧美一级在线播放| 国产精品1区二区.| 亚洲综合色噜噜狠狠| 欧美一区二区播放| 国产成人夜色高潮福利影视| 亚洲激情图片小说视频| 欧美一区二区在线看| 国产成人av电影| 亚洲毛片av在线| 日韩亚洲国产中文字幕欧美| 高清久久久久久| 亚洲狠狠爱一区二区三区| 精品国产一区a| 99国产一区二区三精品乱码| 偷拍日韩校园综合在线| 国产三级精品三级| 欧美亚洲丝袜传媒另类| 精品一区二区三区不卡 | 成人中文字幕合集| 亚洲一级在线观看| 国产午夜亚洲精品不卡| 欧美网站一区二区| 国产很黄免费观看久久| 亚洲福中文字幕伊人影院| 久久久不卡影院| 欧美人与z0zoxxxx视频| 成人在线视频一区二区| 亚洲成av人片一区二区三区| 日本一区二区在线不卡| 欧美精品成人一区二区三区四区| 国产suv精品一区二区883| 视频在线观看一区二区三区| 国产精品美女久久久久久| 日韩一区二区免费在线观看| 一本久道久久综合中文字幕 | 日韩你懂的在线播放| www.av精品| 久草精品在线观看| 亚洲成a人片综合在线| 国产精品色哟哟| 精品欧美一区二区在线观看| 欧美专区在线观看一区| 成人黄色免费短视频| 国内精品视频一区二区三区八戒| 亚洲国产成人高清精品| 国产精品二三区| 久久精品网站免费观看| 日韩一区二区视频| 欧美亚洲动漫另类| 91同城在线观看| 成人一区二区三区视频在线观看 | 7777精品伊人久久久大香线蕉的 | 欧美在线观看视频在线| 成人av手机在线观看| 激情图片小说一区| 日韩电影在线免费观看| 亚洲一二三四区不卡| 亚洲天堂精品在线观看| 国产欧美日韩久久| 久久久久久一级片| 精品国产乱码久久久久久蜜臀| 欧美电影影音先锋| 欧美日韩视频专区在线播放| 91蜜桃传媒精品久久久一区二区| 风流少妇一区二区| 国产成人精品免费视频网站| 久久精品72免费观看| 奇米影视在线99精品| 丝袜美腿一区二区三区| 亚洲一区二区在线视频| 一区二区三区免费看视频| 亚洲桃色在线一区| 亚洲精品成人a在线观看| 亚洲免费在线视频| 亚洲精品国久久99热| 亚洲综合丁香婷婷六月香|