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

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

?? cursor-sa.c

?? 有了操作系統、TCP/IP協議棧、文件系統
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: cursor-sa.c,v 1.13 2004/04/16 08:39:36 weiym Exp $**** cursor-sa.c: Cursor support module for MiniGUI-Lite StandAlone version.**** Copyright (C) 2003 Feynman Software.**** Current maintainer: Wei Yongming.**** Create date: 2003/08/15*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program 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 General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <stdio.h>#include <stddef.h>#include <stdlib.h>#include <malloc.h>#include <string.h>#include <errno.h>#include "common.h"#include "minigui.h"#include "gdi.h"#include "window.h"#include "cliprect.h"#include "internals.h"#include "ctrlclass.h"#include "inline.h"#include "memops.h"#include "gal.h"#include "dc.h"#include "cursor.h"#include "ial.h"#include "ourhdr.h"#include "readbmp.h"#include "misc.h"#include "sysres.h"static int curx, cury;static int oldx = -1, oldy;static RECT cliprc = {0, 0, 0, 0};#ifdef _CURSOR_SUPPORTstatic PCURSOR SysCursor [MAX_SYSCURSORINDEX + 1];static HCURSOR def_cursor;static BYTE* savedbits = NULL;static BYTE* cursorbits = NULL;static int csrimgsize;static int csrimgpitch; static int oldboxleft = -100, oldboxtop = -100;static int nShowCount = 0;static PCURSOR pCurCsr = NULL;// Cursor creating and destroying.HCURSOR GUIAPI LoadCursorFromFile(const char* filename){    FILE* fp;    WORD wTemp;    int  w, h, xhot, yhot, colornum;    DWORD size, offset;    DWORD imagesize, imagew, imageh;    BYTE* image;    HCURSOR csr = 0;        if( !(fp = fopen(filename, "rb")) ) return 0;    fseek(fp, sizeof(WORD), SEEK_SET);    // the cbType of struct CURSORDIR.    wTemp = MGUI_ReadLE16FP (fp);    if(wTemp != 2) goto error;    // skip the cdCount of struct CURSORDIR, we always use the first cursor.    fseek(fp, sizeof(WORD), SEEK_CUR);        // cursor info, read the members of struct CURSORDIRENTRY.    w = fgetc (fp);  // the width of first cursor.    h = fgetc (fp);  // the height of first cursor.    if(w != CURSORWIDTH || h != CURSORHEIGHT) goto error;    fseek(fp, sizeof(BYTE)*2, SEEK_CUR); // skip the bColorCount and bReserved.    wTemp = MGUI_ReadLE16FP (fp);    xhot = wTemp;    wTemp = MGUI_ReadLE16FP (fp);    yhot = wTemp;    size = MGUI_ReadLE32FP (fp);    offset = MGUI_ReadLE32FP (fp);    // read the cursor image info.    fseek(fp, offset, SEEK_SET);    fseek(fp, sizeof(DWORD), SEEK_CUR); // skip the biSize member.    imagew = MGUI_ReadLE32FP (fp);    imageh = MGUI_ReadLE32FP (fp);    // check the biPlanes member;    wTemp = MGUI_ReadLE16FP (fp);    if(wTemp != 1) goto error;    // check the biBitCount member;    wTemp = MGUI_ReadLE16FP (fp);    if(wTemp > 4) goto error;    colornum = (int)wTemp;    fseek(fp, sizeof(DWORD), SEEK_CUR); // skip the biCompression members.    imagesize = MGUI_ReadLE32FP (fp);    // skip the rest members and the color table.    fseek(fp, sizeof(DWORD)*4 + sizeof(BYTE)*(4<<colornum), SEEK_CUR);        // allocate memory for image.    if ((image = (BYTE*)ALLOCATE_LOCAL (imagesize)) == NULL)        goto error;    // read image    fread (image, imagesize, 1, fp);        csr = CreateCursor(xhot, yhot, w, h,                         image + (imagesize - MONOSIZE), image, colornum);    DEALLOCATE_LOCAL (image);error:    fclose (fp);    return csr;}HCURSOR GUIAPI LoadCursorFromMem (const void* area){    const Uint8* p = (Uint8*)area;    WORD wTemp;    int  w, h, xhot, yhot, colornum;    DWORD size, offset;    DWORD imagesize, imagew, imageh;        p += sizeof (WORD);    wTemp = MGUI_ReadLE16Mem (&p);    if(wTemp != 2) goto error;    // skip the cdCount of struct CURSORDIR, we always use the first cursor.    p += sizeof (WORD);        // cursor info, read the members of struct CURSORDIRENTRY.    w = *p++;  // the width of first cursor.    h = *p++;  // the height of first cursor.    if (w != CURSORWIDTH || h != CURSORHEIGHT)        goto error;    // skip the bColorCount and bReserved.    p += sizeof(BYTE)*2;    xhot = MGUI_ReadLE16Mem (&p);    yhot = MGUI_ReadLE16Mem (&p);    size = MGUI_ReadLE32Mem (&p);    offset = MGUI_ReadLE32Mem (&p);    // read the cursor image info.    p = (Uint8*)area + offset;    // skip the biSize member.    p += sizeof (DWORD);        imagew = MGUI_ReadLE32Mem (&p);    imageh = MGUI_ReadLE32Mem (&p);    // check the biPlanes member;    wTemp = MGUI_ReadLE16Mem (&p);    if (wTemp != 1) goto error;    // check the biBitCount member;    wTemp = MGUI_ReadLE16Mem (&p);    if (wTemp > 4) goto error;    colornum = wTemp;    // skip the biCompression members.    p += sizeof (DWORD);        imagesize = MGUI_ReadLE32Mem (&p);    // skip the rest members and the color table.    p += sizeof(DWORD)*4 + sizeof(BYTE)*(4<<colornum);        return CreateCursor (xhot, yhot, w, h,                         p + (imagesize - MONOSIZE), p, colornum);error:    return 0;}#ifdef _USE_NEWGALstatic BITMAP csr_bmp = {BMP_TYPE_NORMAL, 0, 0, 0, 0, CURSORWIDTH, CURSORHEIGHT};#endif// Only called from InitCursor and client code.HCURSOR GUIAPI CreateCursor(int xhotspot, int yhotspot, int w, int h,                     const BYTE* pANDBits, const BYTE* pXORBits, int colornum){    PCURSOR pcsr;        if( w != CURSORWIDTH || h != CURSORHEIGHT ) return 0;    // allocate memory.    if( !(pcsr = (PCURSOR)malloc(sizeof(CURSOR))) ) return 0;    if( !(pcsr->AndBits = malloc(csrimgsize)) ) {        free(pcsr);        return 0;    }    if( !(pcsr->XorBits = malloc(csrimgsize)) ) {        free(pcsr->AndBits);        free(pcsr);        return 0;    }    pcsr->xhotspot = xhotspot;    pcsr->yhotspot = yhotspot;    pcsr->width = w;    pcsr->height = h;#ifdef _USE_NEWGAL    if (colornum == 1) {        ExpandMonoBitmap (HDC_SCREEN, pcsr->AndBits, csrimgpitch, pANDBits, MONOPITCH,                        w, h, MYBMP_FLOW_UP, 0, 0xFFFFFFFF);        ExpandMonoBitmap (HDC_SCREEN, pcsr->XorBits, csrimgpitch, pXORBits, MONOPITCH,                        w, h, MYBMP_FLOW_UP, 0, 0xFFFFFFFF);    }    else if (colornum == 4) {        ExpandMonoBitmap (HDC_SCREEN, pcsr->AndBits, csrimgpitch, pANDBits, MONOPITCH,                        w, h, MYBMP_FLOW_UP, 0, 0xFFFFFFFF);        Expand16CBitmap (HDC_SCREEN, pcsr->XorBits, csrimgpitch, pXORBits, MONOPITCH*4,                        w, h, MYBMP_FLOW_UP, NULL);    }#else    if(colornum == 1) {        ExpandMonoBitmap (HDC_SCREEN, w, h, pANDBits, MONOPITCH, MYBMP_FLOW_UP,                         pcsr->AndBits, csrimgpitch, 0, 0xFFFFFFFF);        ExpandMonoBitmap (HDC_SCREEN, w, h, pXORBits, MONOPITCH, MYBMP_FLOW_UP,                         pcsr->XorBits, csrimgpitch, 0, 0xFFFFFFFF);    }    else if(colornum == 4) {        ExpandMonoBitmap (HDC_SCREEN, w, h, pANDBits, MONOPITCH, MYBMP_FLOW_UP,                         pcsr->AndBits, csrimgpitch, 0, 0xFFFFFFFF);        Expand16CBitmap (HDC_SCREEN, w, h, pXORBits, MONOPITCH*4, MYBMP_FLOW_UP,                        pcsr->XorBits, csrimgpitch, NULL);    }#endif    return (HCURSOR)pcsr;}// Only called from client code.BOOL GUIAPI DestroyCursor(HCURSOR hcsr){    int i;    PCURSOR pcsr = (PCURSOR)hcsr;    if (pcsr == NULL)        return TRUE;    for(i = 0; i <= MAX_SYSCURSORINDEX; i++)    {        if(pcsr == SysCursor[i])            return FALSE;    }    free(pcsr->AndBits);    free(pcsr->XorBits);    free(pcsr);    return TRUE;}// Only called from client code, and accessed items are not changable ones.HCURSOR GUIAPI GetSystemCursor(int csrid){    if(csrid > MAX_SYSCURSORINDEX || csrid < 0)        return 0;     return (HCURSOR)(SysCursor[csrid]);}HCURSOR GUIAPI GetDefaultCursor (void){    return def_cursor;}BOOL InitCursor(void){    char szValue[MAX_NAME + 1];    int number;    int i;#ifdef _USE_NEWGAL    csrimgsize = GAL_GetBoxSize (__gal_screen, CURSORWIDTH, CURSORHEIGHT, &csrimgpitch);    csr_bmp.bmBitsPerPixel = __gal_screen->format->BitsPerPixel;    csr_bmp.bmBytesPerPixel = __gal_screen->format->BytesPerPixel;    csr_bmp.bmPitch = csrimgpitch;#else    csrimgpitch = CURSORWIDTH * BYTESPERPHYPIXEL;    csrimgsize = csrimgpitch * CURSORHEIGHT;#endif    if( !(savedbits = malloc(csrimgsize)) )        return FALSE;    if( !(cursorbits = malloc(csrimgsize)) ) {        free(savedbits);        savedbits = NULL;        return FALSE;    }    if( GetMgEtcValue (CURSORSECTION, "cursornumber", szValue, 10) < 0 )        goto error;    number = atoi(szValue);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美裸体一区二区三区| 欧美xxxxxxxxx| 精品少妇一区二区三区在线视频| 国产喂奶挤奶一区二区三区| 亚洲欧美一区二区三区极速播放| 久久99最新地址| 欧美在线999| 中文字幕第一页久久| 免费欧美在线视频| 91色九色蝌蚪| 国产精品乱码人人做人人爱| 免费欧美在线视频| 欧美丝袜丝nylons| 自拍偷拍国产亚洲| 国产成人在线看| 欧美变态tickle挠乳网站| 亚洲香肠在线观看| 一本色道久久加勒比精品| 国产欧美视频一区二区三区| 日韩高清不卡一区二区| 在线视频欧美精品| 自拍偷拍亚洲综合| www.日韩精品| 中文成人综合网| 国产伦理精品不卡| 亚洲精品在线电影| 国内精品免费在线观看| 日韩欧美二区三区| 蜜臀av一区二区在线免费观看| 欧美日韩国产高清一区| 亚洲国产你懂的| 在线精品视频免费播放| 亚洲精品第1页| 日本道免费精品一区二区三区| 亚洲欧美在线观看| bt欧美亚洲午夜电影天堂| 国产精品久久久久久久久果冻传媒| 国产成人av影院| 国产天堂亚洲国产碰碰| 国产福利一区二区三区在线视频| 精品国产乱码久久久久久闺蜜| 精品一区二区三区的国产在线播放| 日韩一卡二卡三卡| 久久激情综合网| 久久尤物电影视频在线观看| 国产一区二区精品久久91| 久久综合网色—综合色88| 国产一区二区影院| 欧美国产视频在线| 97精品电影院| 性做久久久久久免费观看欧美| 26uuu精品一区二区| 成人综合激情网| 亚洲激情在线激情| 91精品国产丝袜白色高跟鞋| 久久国产精品72免费观看| 久久精品视频一区二区| 99久久99久久久精品齐齐| 亚洲黄色小视频| 欧美一区二区三区四区高清| 国产一区二区在线看| 亚洲欧美综合色| 91精品在线观看入口| 国产一区在线不卡| 亚洲欧美另类图片小说| 欧美一区二区三区不卡| 国产精品一二三四五| 亚洲精品国产a久久久久久| 日韩午夜精品电影| 91丨porny丨户外露出| 日本不卡视频在线| 中文字幕欧美激情一区| 欧美日韩一卡二卡| 国产精品一区二区男女羞羞无遮挡| 亚洲欧洲精品天堂一级 | 亚洲欧美怡红院| 欧美体内she精高潮| 精品一区二区三区在线播放| √…a在线天堂一区| 7777精品久久久大香线蕉| 丁香婷婷综合网| 免费成人深夜小野草| 国产精品不卡一区| 日韩视频免费观看高清完整版在线观看 | 欧美刺激午夜性久久久久久久| 成人激情小说乱人伦| 日韩精品一级中文字幕精品视频免费观看| 久久久www成人免费毛片麻豆| 欧美日韩一卡二卡三卡 | 久久99精品久久久久久国产越南 | 久久精品这里都是精品| 欧美视频一区二区三区在线观看| 精品一区二区三区不卡| 亚洲一区二区美女| 中文字幕一区二区三中文字幕| 欧美一区二区黄| 91精彩视频在线| 成人午夜在线播放| 久久99久久久久久久久久久| 国产精品1024| 久久成人羞羞网站| 日日摸夜夜添夜夜添精品视频 | 国产亚洲欧美在线| 精品动漫一区二区三区在线观看| 欧美伦理影视网| 欧美性生交片4| 91国产福利在线| 日本精品视频一区二区| 91在线观看污| 91玉足脚交白嫩脚丫在线播放| gogogo免费视频观看亚洲一| 成人app下载| 91丨porny丨在线| 一本到三区不卡视频| 91视频观看免费| 日本精品视频一区二区| 色视频欧美一区二区三区| 色综合久久综合网| 91成人在线免费观看| 在线免费观看成人短视频| 欧美午夜一区二区| 懂色av噜噜一区二区三区av| 五月天激情综合| 欧美国产日韩亚洲一区| 国产精品亲子伦对白| 日本一区二区三区电影| 国产午夜精品在线观看| 中文字幕乱码亚洲精品一区| 欧美精品一区二区三区视频 | 欧美精品xxxxbbbb| 色狠狠桃花综合| 一本色道综合亚洲| 91福利国产成人精品照片| 欧洲一区二区三区在线| 在线观看免费亚洲| 91精品国产乱| 欧美成人精品1314www| 欧美一区二区三区小说| 日韩一区二区免费视频| 欧美mv日韩mv| 国产视频视频一区| 夜夜嗨av一区二区三区网页| 亚洲国产毛片aaaaa无费看| 丝袜脚交一区二区| 免费欧美日韩国产三级电影| 美女视频一区在线观看| 国产一区二区三区免费看| 国产激情一区二区三区桃花岛亚洲| 国产一区二区三区av电影| 免费一区二区视频| 国产一区二区三区日韩| av激情成人网| 91福利小视频| 国产视频一区二区在线观看| 国产精品国产三级国产a| 自拍av一区二区三区| 亚洲高清不卡在线| 国产一区二区三区四区五区入口 | 国产风韵犹存在线视精品| 国产91富婆露脸刺激对白| 久久狠狠亚洲综合| 色欧美88888久久久久久影院| 7777精品久久久大香线蕉| 久久久久综合网| 亚洲青青青在线视频| 久久aⅴ国产欧美74aaa| 99国产精品国产精品久久| 欧美日韩在线免费视频| 精品区一区二区| 国产欧美日韩综合精品一区二区| 日韩精品一级二级| 国产aⅴ综合色| 欧美日韩亚洲综合一区| 亚洲精品在线三区| 免费在线观看一区| 北岛玲一区二区三区四区| 91精品国产高清一区二区三区| 国产视频911| 亚洲最大的成人av| 99国产精品久久久| 精品不卡在线视频| 亚洲一级二级三级在线免费观看| 国产一区二区三区电影在线观看 | 国产精品国产三级国产a| 一区二区三区免费在线观看| 国产一区二区三区四| 欧美最猛性xxxxx直播| 国产欧美一区二区三区在线老狼| 国产精品福利一区二区| 国产一区二区三区在线观看精品 | 91精品国产全国免费观看| 国产精品久久久久久久久晋中 | 欧美综合久久久| 国产日韩欧美精品一区| 久久精品国产成人一区二区三区| 欧美日韩在线三级| 亚洲欧美视频在线观看视频| 99国产精品一区| 国产精品久久久一本精品 | 亚洲免费观看高清完整版在线|