亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一级精品大片| 国产精品一级片| 欧美日韩在线电影| 亚洲国产欧美一区二区三区丁香婷| 91影视在线播放| 尤物视频一区二区| 欧美一区二区三区影视| 国产在线一区观看| 国产精品欧美一区二区三区| 不卡视频在线看| 一区二区三区精品视频| 欧美欧美欧美欧美首页| 久久精品国产99| 国产精品午夜在线| 在线观看精品一区| 麻豆91在线播放免费| 国产喷白浆一区二区三区| 91在线观看地址| 蜜臀av一区二区在线免费观看| 久久噜噜亚洲综合| 色呦呦网站一区| 免费观看在线色综合| 国产精品毛片高清在线完整版| 欧美综合欧美视频| 久久成人羞羞网站| 亚洲欧美日韩一区二区 | 性做久久久久久免费观看| 欧美一级精品在线| 99这里只有精品| 免费成人av在线播放| 国产精品色哟哟| 69精品人人人人| 粉嫩aⅴ一区二区三区四区| 亚洲国产精品久久人人爱| 精品国产91洋老外米糕| 一本一道综合狠狠老| 麻豆精品国产传媒mv男同| 亚洲精品中文在线| 久久久久久一级片| 欧美二区乱c少妇| caoporm超碰国产精品| 久久国产精品72免费观看| 中文字幕欧美一| 久久综合久久综合久久| 在线看日韩精品电影| 国产一区欧美一区| 日韩精品乱码av一区二区| 亚洲欧美在线aaa| 国产亚洲综合av| 欧美一区二区三区四区在线观看 | 99国产欧美另类久久久精品| 日韩国产在线观看| 亚洲欧美电影一区二区| 精品久久久久久综合日本欧美| 色婷婷精品大视频在线蜜桃视频| 国产精品一卡二卡| 麻豆中文一区二区| 午夜久久电影网| 亚洲精品一二三| 椎名由奈av一区二区三区| 久久亚洲二区三区| 欧美成人性战久久| 欧美高清一级片在线| 欧美日韩免费一区二区三区 | 国产精品自拍网站| 美女视频黄a大片欧美| 亚洲成人av在线电影| 自拍偷拍亚洲激情| 1000精品久久久久久久久| 欧美国产禁国产网站cc| 久久免费偷拍视频| 久久精品一二三| 久久久国产精品不卡| 久久精品视频一区二区三区| 日韩免费观看高清完整版| 欧美一区二区三区四区视频| 制服视频三区第一页精品| 欧美久久久一区| 91 com成人网| 欧美一区二区三区免费在线看| 欧美男生操女生| 欧美日韩电影在线| 欧美妇女性影城| 日韩亚洲欧美成人一区| 日韩精品在线一区| 久久久久九九视频| 国产精品欧美一级免费| 亚洲日本韩国一区| 亚洲成人免费在线| 日韩福利视频导航| 麻豆91精品视频| 国产91高潮流白浆在线麻豆| 成人h动漫精品一区二区 | 欧美特级限制片免费在线观看| 欧美视频一区在线| 欧美一二三区在线观看| 26uuu亚洲综合色| 亚洲欧美综合网| 亚洲国产欧美另类丝袜| 久久99九九99精品| 成人av网址在线| 在线观看www91| www国产成人免费观看视频 深夜成人网| 久久精品视频免费| 亚洲蜜臀av乱码久久精品| 人人精品人人爱| aaa亚洲精品一二三区| 欧美性高清videossexo| 欧美精品一区二区在线播放| 亚洲图片欧美激情| 日韩av中文字幕一区二区| 国产精品一区一区三区| 日本精品一区二区三区高清 | 久久久久久久综合日本| 最新国产の精品合集bt伙计| 亚洲18色成人| caoporen国产精品视频| 欧美四级电影网| 欧美激情一区二区三区蜜桃视频 | www久久精品| 亚洲最新视频在线观看| 久久99蜜桃精品| av电影在线观看一区| 日韩免费高清电影| 亚洲欧美另类在线| 精彩视频一区二区| 欧美放荡的少妇| 一区二区国产视频| 国产精品一区二区x88av| 欧美三电影在线| 国产精品美女久久久久aⅴ | 国产一区免费电影| 欧美日韩国产另类不卡| 亚洲少妇30p| 国产精品一品视频| 欧美va亚洲va在线观看蝴蝶网| 亚洲人123区| 国产成人精品亚洲午夜麻豆| 欧美一级黄色片| 亚洲bt欧美bt精品| 色婷婷一区二区| 国产精品久久久久久久久久免费看 | 日韩成人一区二区三区在线观看| 99精品国产99久久久久久白柏| 日韩女优av电影| 一区二区三区精品在线| av综合在线播放| 久久综合资源网| 亚洲图片有声小说| eeuss鲁片一区二区三区| 亚洲国产精品t66y| 久草中文综合在线| 欧美日韩高清在线| 自拍偷拍欧美精品| 91美女精品福利| 日本一区二区三区在线不卡| 青青草91视频| 欧美日韩一卡二卡三卡| 亚洲一区在线视频观看| av资源网一区| 国产农村妇女精品| 激情综合色丁香一区二区| 在线看国产一区二区| 欧美激情综合在线| 一区二区三区在线观看国产| 国产高清不卡二三区| 91捆绑美女网站| 亚洲精品乱码久久久久久久久 | 国产精品主播直播| 欧美一区二区观看视频| 亚洲国产人成综合网站| 91福利在线观看| 婷婷中文字幕综合| 欧美日本国产一区| 亚洲成人7777| 欧美色大人视频| 亚洲国产婷婷综合在线精品| 91美女视频网站| 国产精品夫妻自拍| 不卡视频在线看| 一区二区三区四区中文字幕| 99久久99久久精品国产片果冻| 国产精品久久久久国产精品日日| 国产精品自产自拍| 国产精品日日摸夜夜摸av| 国产最新精品免费| 国产精品美日韩| 99久久久久久| 亚洲与欧洲av电影| 欧美电影免费观看高清完整版| 欧美aaaaa成人免费观看视频| 日韩午夜精品电影| 国产精品综合一区二区| 欧美国产精品一区二区三区| 成人18精品视频| 午夜日韩在线电影| 欧美mv和日韩mv的网站| 国产一区二区伦理片| 精品少妇一区二区| 99riav一区二区三区|