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

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

?? qvfb.c

?? 該源碼是miniGUI的全部代碼
?? C
字號:
/*    MiniGUI - A compact GUI support system for real-time embedded Linux.    Copyright (C) 2001 Wei Yongming    This library is free software; you can redistribute it and/or    modify it under the terms of the GNU Library General Public    License as published by the Free Software Foundation; either    version 2 of the License, or (at your option) any later version.    This library is distributed in the hope that it will be useful,    but WITHOUT ANY WARRANTY; without even the implied warranty of    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    Library General Public License for more details.    You should have received a copy of the GNU Library General Public    License along with this library; if not, write to the Free    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA    Wei Yongming    ymwei@minigui.org*//* Qt virtual FrameBuffer based video driver implementation.*/#include <stdlib.h>#include <stdio.h>#include <string.h>#include <fcntl.h>#include <unistd.h>#include <sys/ioctl.h>#include <sys/mman.h>#include <sys/types.h>#include <sys/ipc.h>#include <sys/shm.h>#include "common.h"#include "minigui.h"#include "newgal.h"#include "sysvideo.h"#include "qvfb.h"/* Initialization/Query functions */static int QVFB_VideoInit(_THIS, GAL_PixelFormat *vformat);static GAL_Rect **QVFB_ListModes(_THIS, GAL_PixelFormat *format, Uint32 flags);static GAL_Surface *QVFB_SetVideoMode(_THIS, GAL_Surface *current, int width, int height, int bpp, Uint32 flags);static int QVFB_SetColors(_THIS, int firstcolor, int ncolors, GAL_Color *colors);static void QVFB_VideoQuit(_THIS);/* Hardware surface functions */static int QVFB_AllocHWSurface(_THIS, GAL_Surface *surface);static void QVFB_FreeHWSurface(_THIS, GAL_Surface *surface);/* QVFB driver bootstrap functions */static int QVFB_Available (void){    char file [50];    int display;    key_t key;    int shmid;#ifdef _INCORE_RES    display = 0;#else    if (GetIntValueFromEtcFile (ETCFILEPATH, "qvfb", "display", &display) < 0)        return 0;#endif    sprintf (file, QT_VFB_MOUSE_PIPE, display);    key = ftok (file, 'b');    shmid = shmget (key, 0, 0);    return shmid != -1;}static void QVFB_DeleteDevice (GAL_VideoDevice *device){    free (device->hidden);    free (device);}static void QVFB_UpdateRects (_THIS, int numrects, GAL_Rect *rects){    int i;    RECT bound = this->hidden->hdr->update;    if (bound.right == -1) bound.right = 0;    if (bound.bottom == -1) bound.bottom = 0;    for (i = 0; i < numrects; i++) {        RECT rc;        SetRect (&rc, rects[i].x, rects[i].y,                         rects[i].x + rects[i].w, rects[i].y + rects[i].h);        GetBoundRect (&bound, &bound, &rc);    }    this->hidden->hdr->update = bound;    this->hidden->hdr->dirty = TRUE;}static GAL_VideoDevice *QVFB_CreateDevice (int devindex){    GAL_VideoDevice *this;    /* Initialize all variables that we clean on shutdown */    this = (GAL_VideoDevice *)malloc(sizeof(GAL_VideoDevice));    if (this) {        memset (this, 0, (sizeof *this));        this->hidden = (struct GAL_PrivateVideoData *) malloc ((sizeof *this->hidden));    }    if ((this == NULL) || (this->hidden == NULL)) {        GAL_OutOfMemory ();        if (this) free (this);        return (0);    }    memset (this->hidden, 0, (sizeof *this->hidden));    /* Set the function pointers */    this->VideoInit = QVFB_VideoInit;    this->ListModes = QVFB_ListModes;    this->SetVideoMode = QVFB_SetVideoMode;    this->SetColors = QVFB_SetColors;    this->VideoQuit = QVFB_VideoQuit;    this->AllocHWSurface = QVFB_AllocHWSurface;    this->FreeHWSurface = QVFB_FreeHWSurface;    this->UpdateRects = QVFB_UpdateRects;    this->CheckHWBlit = NULL;    this->FillHWRect = NULL;    this->SetHWColorKey = NULL;    this->SetHWAlpha = NULL;    this->free = QVFB_DeleteDevice;    return this;}VideoBootStrap QVFB_bootstrap = {    "qvfb", "Qt Virtual FrameBuffer",    QVFB_Available, QVFB_CreateDevice};static int QVFB_VideoInit (_THIS, GAL_PixelFormat *vformat){    char file [50];    int display;    key_t key;    int shmid;    struct GAL_PrivateVideoData* data = this->hidden;#ifdef _INCORE_RES    display = 0;#else    if (GetIntValueFromEtcFile (ETCFILEPATH, "qvfb", "display", &display) < 0)        return -1;#endif    sprintf (file, QT_VFB_MOUSE_PIPE, display);    key = ftok (file, 'b');    shmid = shmget (key, 0, 0);    if (shmid != -1)        data->shmrgn = (unsigned char *)shmat (shmid, 0, 0);    if ((int)data->shmrgn == -1 || data->shmrgn == NULL) {        GAL_SetError ("Unable to attach to virtual FrameBuffer server.\n");        return -1;    }    data->hdr = (struct QVFbHeader *) data->shmrgn;    vformat->BitsPerPixel = data->hdr->depth;    switch (vformat->BitsPerPixel) {        case 8:            vformat->BytesPerPixel = 1;            data->hdr->numcols = 256;            break;        case 12:            vformat->BitsPerPixel = 16;            vformat->BytesPerPixel = 2;            vformat->Rmask = 0x00000F00;            vformat->Gmask = 0x000000F0;            vformat->Bmask = 0x0000000F;            break;        case 16:            vformat->BytesPerPixel = 2;            vformat->Rmask = 0x0000F800;            vformat->Gmask = 0x000007E0;            vformat->Bmask = 0x0000001F;            break;        case 32:            vformat->BytesPerPixel = 4;            vformat->Rmask = 0x00FF0000;            vformat->Gmask = 0x0000FF00;            vformat->Bmask = 0x000000FF;            break;        default:            GAL_SetError ("Not supported depth: %d.\n", vformat->BitsPerPixel);            return -1;    }    return 0;}GAL_Rect **QVFB_ListModes (_THIS, GAL_PixelFormat *format, Uint32 flags){    return (GAL_Rect **) -1;}GAL_Surface *QVFB_SetVideoMode (_THIS, GAL_Surface *current,                                int width, int height, int bpp, Uint32 flags){    /* Set up the mode framebuffer */    current->flags = GAL_HWSURFACE | GAL_FULLSCREEN;    current->w = this->hidden->hdr->width;    current->h = this->hidden->hdr->height;    current->pitch = this->hidden->hdr->linestep;    current->pixels = this->hidden->shmrgn + this->hidden->hdr->dataoffset;    /* We're done */    return current;}/* We don't actually allow hardware surfaces other than the main one */static int QVFB_AllocHWSurface(_THIS, GAL_Surface *surface){    return -1;}static void QVFB_FreeHWSurface(_THIS, GAL_Surface *surface){    surface->pixels = NULL;}static int QVFB_SetColors(_THIS, int firstcolor, int ncolors, GAL_Color *colors){    int i, pixel = firstcolor;    for (i = 0; i < ncolors; i++) {        this->hidden->hdr->clut [pixel]                 = (0xff << 24) | ((colors[i].r & 0xff) << 16) | ((colors[i].g & 0xff) << 8) | (colors[i].b & 0xff);        pixel ++;    }    return 0;}static void QVFB_VideoQuit (_THIS){    shmdt (this->hidden->shmrgn);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲高清| 日韩一二三四区| 亚洲特级片在线| 波多野结衣91| 樱桃国产成人精品视频| 欧洲精品一区二区| 美女在线观看视频一区二区| 日韩欧美黄色影院| 国产成人午夜电影网| 亚洲视频免费在线| 欧美在线免费视屏| 免费国产亚洲视频| 欧美经典三级视频一区二区三区| 波多野结衣中文一区| 一个色综合网站| 日韩欧美精品三级| 成人aaaa免费全部观看| 亚洲国产aⅴ成人精品无吗| 日韩欧美一级片| 99久久精品国产毛片| 日韩国产一二三区| 欧美激情中文字幕| 欧美精品在线观看播放| 国产精品一区二区久激情瑜伽| 中文字幕综合网| 欧美日韩国产免费| 国产成人av电影在线观看| 亚洲一区二区偷拍精品| 久久品道一品道久久精品| 一本大道久久a久久综合| 裸体歌舞表演一区二区| 中文字幕一区二区日韩精品绯色| 在线播放中文字幕一区| 成人性生交大片免费看中文| 天堂va蜜桃一区二区三区| 国产精品视频免费看| 91精品国产综合久久久久久久久久 | 国产高清在线精品| 亚洲一区二区三区四区五区中文| 亚洲精品一区二区三区影院| 一本到高清视频免费精品| 国产在线播精品第三| 亚洲成人自拍偷拍| 国产欧美视频在线观看| 欧美男男青年gay1069videost | 日韩一区二区在线免费观看| 99re6这里只有精品视频在线观看| 日本亚洲电影天堂| 亚洲日本在线视频观看| 国产丝袜欧美中文另类| 91麻豆精品国产91| 色综合久久天天| 成人黄色在线看| 国产一区二区0| 日韩不卡一区二区三区| 亚洲乱码国产乱码精品精98午夜| 国产日产欧美精品一区二区三区| 日韩视频一区二区三区在线播放 | 中文字幕免费不卡在线| 精品国产免费人成在线观看| 91精品中文字幕一区二区三区| 91在线精品一区二区| 成人精品一区二区三区四区| 国精产品一区一区三区mba视频 | 亚洲图片欧美色图| 亚洲日本青草视频在线怡红院 | 日韩美女啊v在线免费观看| 国产午夜一区二区三区| 久久综合五月天婷婷伊人| 91精品国产福利| 4438x成人网最大色成网站| 在线亚洲人成电影网站色www| av在线这里只有精品| 白白色 亚洲乱淫| 成人黄色av网站在线| 日韩一级高清毛片| 欧美精品一二三| 欧美精品久久一区| 日韩亚洲欧美在线| 日韩一区二区三| 欧美精品一二三四| 日韩欧美电影在线| 精品久久久久一区| 2023国产精品视频| 国产午夜精品久久久久久免费视| 国产女同互慰高潮91漫画| 国产欧美一区二区三区鸳鸯浴| 国产丝袜欧美中文另类| 中文字幕一区二区三区av| 亚洲日本在线a| 午夜国产精品一区| 理论片日本一区| 国产成人福利片| 99精品视频一区二区| 欧美在线|欧美| 日韩视频中午一区| 国产欧美一区二区三区在线看蜜臀| 国产精品色婷婷久久58| 亚洲精品视频一区二区| 亚洲国产日韩一级| 美女爽到高潮91| 成人免费三级在线| 欧美日韩一本到| 欧美sm极限捆绑bd| 1024成人网色www| 午夜激情久久久| 国产一区二区精品久久| 色综合久久88色综合天天| 欧美高清视频一二三区| 久久影音资源网| 亚洲一区二区欧美日韩| 久久se精品一区精品二区| 99久久er热在这里只有精品66| 欧美三级视频在线观看| 国产亚洲自拍一区| 亚洲综合色区另类av| 久久国内精品视频| 色久综合一二码| 久久久久久一级片| 亚洲国产中文字幕| 国产a区久久久| 91麻豆精品国产综合久久久久久| 国产精品色一区二区三区| 五月婷婷久久综合| 成人一道本在线| 日韩欧美国产精品| 亚洲国产视频一区| 成人h精品动漫一区二区三区| 欧美男生操女生| 亚洲欧洲av色图| 国产在线麻豆精品观看| 精品视频全国免费看| 天堂va蜜桃一区二区三区漫画版| 国产成人啪免费观看软件| 678五月天丁香亚洲综合网| 最新热久久免费视频| 久久精品国产秦先生| 欧美写真视频网站| 国产精品美女久久久久久久| 精品一区二区三区免费播放| 欧美亚洲一区二区在线| 中文幕一区二区三区久久蜜桃| 乱中年女人伦av一区二区| 欧美丝袜自拍制服另类| 亚洲视频一区二区在线观看| 国产成人精品免费在线| 精品国产在天天线2019| 视频在线观看一区二区三区| 91福利国产成人精品照片| 欧美国产1区2区| 国产老妇另类xxxxx| 日韩欧美一区电影| 喷白浆一区二区| 制服丝袜亚洲网站| 亚洲精品国产高清久久伦理二区| 成人小视频在线观看| 国产日韩一级二级三级| 国产美女av一区二区三区| 欧美精品一区二区三区在线播放| 丝袜亚洲另类欧美| 欧美日韩夫妻久久| 天天操天天综合网| 欧美老年两性高潮| 日韩avvvv在线播放| 欧美精品在线视频| 视频一区二区三区中文字幕| 91.成人天堂一区| 亚洲一区欧美一区| 欧美日韩国产一二三| 日韩精品国产精品| 欧美电影免费观看高清完整版在线观看| 五月婷婷另类国产| 日韩欧美的一区| 国产一区二区三区高清播放| 久久久精品国产免费观看同学| 国产一区二区三区久久久| 久久奇米777| 成人av在线观| 一区二区三区在线不卡| 欧美性猛片xxxx免费看久爱| 丝袜a∨在线一区二区三区不卡| 欧美精品久久一区| 精品一二三四区| 中文字幕不卡一区| 91麻豆国产福利精品| 一区二区视频免费在线观看| 欧美日韩在线播放三区四区| 日韩avvvv在线播放| 久久日韩粉嫩一区二区三区| 99久久免费视频.com| 亚洲国产精品久久人人爱| 欧美一二三区在线| 丁香六月综合激情| 亚洲自拍与偷拍| 精品久久久久久最新网址| 成人自拍视频在线观看| 亚洲成av人在线观看| 久久婷婷久久一区二区三区| 99久久综合国产精品| 日韩av中文在线观看|