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

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

?? wmenu.c

?? 詳細介紹了一篇關于pci開發的接口芯片
?? C
?? 第 1 頁 / 共 3 頁
字號:
                best=temp;
    }

    /* see if menu selection is non-selectable */
    if(best->fmask&M_NOSEL) best=right_item(best);

    /* return best record */
    return(best);
}

/*---------------------------------------------------------------------------*/

/* this is a recursive function that frees a menu and all of its submenus */

static void free_menu(struct _menu_t *wmenu)
{
    struct _item_t *witem;

    /* free all items in menu, including sub-menus */
    while(wmenu->item!=NULL) {
        if(wmenu->item->child!=NULL) free_menu(wmenu->item->child);
        witem=wmenu->item->prev;
        free(wmenu->item);
        wmenu->item=witem;
        if(wmenu->item!=NULL) wmenu->item->next=NULL;
    }

    /* free the menu itself */
    free(wmenu);
}
 
/*---------------------------------------------------------------------------*/

/* this function will hide the mouse cursor */
/* if mouse cursor mode is on               */

static void hide_mouse_cursor(void)
{
    if(_mouse&MS_CURS) mshidecur();
}

/*---------------------------------------------------------------------------*/

/* this function moves the selection bar to another menu item,  */
/* automatically taking care of necessary pre/post move actions */

static struct _item_t *goto_item(struct _item_t *citem,int which)
{
    struct _item_t *item;

    if(which==ITM_FR)       item=first_item();
    else if(which==ITM_LS)  item=last_item();
    else                    item=(*funcs[which])(citem);
    if(item!=citem) {
        pre_move(citem);
        post_move(citem=item);
    }
    return(citem);
}

/*---------------------------------------------------------------------------*/

/* this function will find the bottom-rightmost menu selection */

static struct _item_t *last_item(void)
{
    struct _item_t *best,*temp;
    int bcol;

    /* initialize best record to highest record in linked list */
    best=_winfo.cmenu->item;
    bcol=best->wcol;

    /* search backwards through linked list, testing each item */
    for(temp=best->prev;temp!=NULL;temp=temp->prev) {
        if( (temp->wrow>best->wrow) ||
            ( (temp->wrow==best->wrow) &&
                (temp->wcol>bcol) ) ) {
                    best=temp;
                    bcol=best->wcol;
        }
    }

    /* see if menu selection is non-selectable */
    if(best->fmask&M_NOSEL) best=left_item(best);

    /* return best record */
    return(best);
}

/*---------------------------------------------------------------------------*/

/* this function will find the menu selection to the left of current */

static struct _item_t *left_item(struct _item_t *curr)
{
    struct _item_t *best,*temp;
    int wwidth,bpos,tpos,cpos;

    /* calculate window width and current position */
    wwidth=_winfo.cmenu->ecol - _winfo.cmenu->scol + 1;
    cpos=(curr->wrow * wwidth) + curr->wcol;

    /* initialize best record to NULL, and best position to -1 */
    best=NULL;
    bpos=-1;

    /* search backwards through linked list, testing each item */
    for(temp=_winfo.cmenu->item;temp!=NULL;temp=temp->prev) {

        /* calculate position of test each item */
        tpos=(temp->wrow*wwidth) + temp->wcol;

        /* compare position of test item with best item, current item */
        if(tpos>bpos && tpos<cpos) {
            best=temp;
            bpos=tpos;
        }
    }

    /* if there wasn't a item to the left, then wrap around */
    if(best==NULL)
        best=last_item();
    else
        /* see if menu selection is non-selectable */
        if(best->fmask&M_NOSEL)
            best=left_item(best);

    /* return best record */
    return(best);
}

/*---------------------------------------------------------------------------*/

/* this function determines if the mouse cursor is on a menu item */

static struct _item_t *mouse_on_item(struct _menu_t *menu,int mcrow,int mccol)
{
    int srow,scol,border,start,end;
    struct _item_t *item,*found;

    found  = NULL;
    srow   = menu->srow;
    scol   = menu->scol;
    border = menu->btype==5?0:1;
    for(item=menu->item;item!=NULL;item=item->prev) {
        if(mcrow==(srow+border+item->wrow)) {
            start = scol+border+item->wcol;
            end   = start+calc_bar_width(menu,item)-1;
            if(mccol>=start&&mccol<=end) {
                found=item;
                break;
            }
        }
    }
    return(found);
}

/*---------------------------------------------------------------------------*/

/* this function is called after a menu bar move */

static void post_move(struct _item_t *citem)
{
    _winfo.cmenu->citem=citem;
    _winfo.help=citem->help;
    disp_item(citem,1);
    call_before(citem);
}

/*---------------------------------------------------------------------------*/

static void pre_exit(WINDOW w,int close)
{
    struct _menu_t *wmenu;

    hide_mouse_cursor();

    /* if not using current window for menu, then close it */
    if(close) close_window(w);

    /* if at highest menu then free the whole menu structure */
    if(_winfo.cmenu==_winfo.menu) {
        wmenu=_winfo.menu->prev;
        if(_winfo.cmenu!=NULL) free_menu(_winfo.cmenu);
        _winfo.menu=wmenu;
        if(_winfo.menu!=NULL) _winfo.menu->next=NULL;
        _winfo.cmenu=_winfo.menu;
    }
}

/*---------------------------------------------------------------------------*/

/* this function prepares for a menu bar move */

static void pre_move(struct _item_t *citem)
{
    disp_item(citem,0);
    call_after(citem);
}

/*---------------------------------------------------------------------------*/

/* this function reads the mouse for input */

static int read_mouse(struct _item_t *citem)
{
    register struct _item_t *item;
    int bcount,bstat,mrow,mcol;

    /* if free-floating mouse cursor support is on */
    if(_mouse&MS_CURS) {

        /* clear mouse button queue */
        msbclear();

        /* loop until a key is pressed */
        while(!kbhit()&&_kbinfo.kbuf==NULL) {

            /* call the keyboard loop function */
            if(_kbinfo.kbloop!=NULL) (*_kbinfo.kbloop)();

            /* if left button was pressed, and mouse cursor is on  */
            /* a selectable menu item, then move selection bar to  */
            /* that item, and select it.  If mouse cursor is on    */
            /* a main menu item of a pull-down menu system, then   */
            /* stuff that item's selection character into the CXL  */
            /* keyboard buffer and return Esc to close the current */
            /* pull-down menu.                                     */
            msbreles(0,&bstat,&bcount,&mrow,&mcol);
            if(bcount) {
                if((item=mouse_on_item(_winfo.cmenu,mrow,mcol))==NULL) {
                    if(_winfo.cmenu->menutype&M_PD) {
                        if(((item=mouse_on_item(_winfo.cmenu->parent,mrow,
                           mcol))!=NULL)&&(!(item->fmask&M_NOSEL))) {
                            kbput(item->schar);
                            return(0x011b);     /* Esc */
                        }
                    }
                }
                else {
                    if(!(item->fmask&M_NOSEL)) {
                        if(citem!=item) {
                            pre_move(citem);
                            post_move(_winfo.cmenu->citem=citem=item);
                        }
                        return(0x1c0d);         /* Enter */
                    }
                }
            }

            /* if right button was pressed, simulate pressing the Esc key */
            msbreles(1,&bstat,&bcount,&mrow,&mcol);
            if(bcount) return(0x011b);          /* Esc */
        }
    }

    /* return zero - it means a key was pressed */
    return(0);
}

/*---------------------------------------------------------------------------*/

/* this function will find the menu selection to the right of current */

static struct _item_t *right_item(struct _item_t *curr)
{
    struct _item_t *best,*temp;
    int wwidth,bpos,tpos,cpos;

    /* calculate window width and current position */
    wwidth=_winfo.cmenu->ecol - _winfo.cmenu->scol + 1;
    cpos=(curr->wrow * wwidth) + curr->wcol;

    /* initialize best record to NULL, and best position to 32767 */
    best=NULL;
    bpos=32767;

    /* search backwards through linked list, testing items */
    for(temp=_winfo.cmenu->item;temp!=NULL;temp=temp->prev) {

        /* calculate position of test item */
        tpos=(temp->wrow*wwidth) + temp->wcol;

        /* compare position of test item with best item, current item */
        if(tpos<bpos && tpos>cpos) {
            best=temp;
            bpos=tpos;
        }
    }

    /* if there wasn't a item to the right, then wrap around */
    if(best==NULL)
        best=first_item();
    else
        /* see if menu selection is non-selectable */
        if(best->fmask&M_NOSEL)
            best=right_item(best);

    /* return best record */
    return(best);
}

/*---------------------------------------------------------------------------*/

/* this function will display the mouse */
/* cursor if mouse cursor mode is on    */

static void show_mouse_cursor(void)
{
    if(_mouse) {
        if(_mouse&MS_CURS) {
            msshowcur();
            mscursor(0,0xffff,((LGREY|_LGREY)<<8));
        }
    }
}

/*---------------------------------------------------------------------------*/

/* this function finds the previous menu selection upwards */

static struct _item_t *up_item(struct _item_t *curr)
{
    struct _item_t *best,*temp;
    int brow,bcol,tcol,crow,trow,ccol,tdist,bdist;

    /* initialize best record to NULL */
    best = NULL;
    brow = -1;
    bcol = 32767;

    /* calculate window column at center of current item */
    crow=(int)curr->wrow;
    ccol=calc_center_item(curr);

    /* search backwards through linked list, testing items */
    for(temp=_winfo.cmenu->item;temp!=NULL;temp=temp->prev) {

        /* calculate window column at center of test item */
        trow=(int)temp->wrow;
        tcol=calc_center_item(temp);

        if(trow<crow) {
            tdist=abs(ccol-tcol);
            bdist=abs(ccol-bcol);
            if((trow>brow)||((trow==brow&&tdist<bdist))) {
                best=temp;
                brow=trow;
                bcol=tcol;
            }
        }
    }

    /* if there wasn't a item to the left, then wrap around */
    if(best==NULL) {
        if((temp=malloc(sizeof(struct _item_t)))==NULL) {
            best=curr;
        }
        else {
            *temp=*curr;
            temp->wrow=255;
            best=up_item(temp);
            free(temp);
        }
    }
    else
        /* see if menu selection is non-selectable */
        if(best->fmask&M_NOSEL)
            best=up_item(best);

    /* return best record */
    return(best);
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人精品3d动漫h| 久久亚洲综合色| 国产伦精品一区二区三区视频青涩| 日本一区二区三区在线不卡| 欧美综合在线视频| 国产一二精品视频| 亚洲成a人片在线观看中文| 精品久久人人做人人爽| 欧美在线你懂的| 成人av免费网站| 国内精品国产三级国产a久久 | 一区二区不卡在线视频 午夜欧美不卡在| 欧美精品在线一区二区| av中文字幕亚洲| 国产精品一区专区| 日韩电影在线一区二区| 亚洲夂夂婷婷色拍ww47| 中文字幕av资源一区| 精品国产乱码久久久久久久久| 欧洲生活片亚洲生活在线观看| 成人黄色大片在线观看| 国产麻豆成人精品| 久久99国产精品麻豆| 日韩制服丝袜先锋影音| 亚洲伊人伊色伊影伊综合网| 国产精品毛片久久久久久久| 久久综合色婷婷| 欧美本精品男人aⅴ天堂| 欧美群妇大交群中文字幕| 在线欧美一区二区| 色94色欧美sute亚洲线路一久| 91精品国产综合久久久蜜臀图片| 日本高清不卡视频| 一本大道久久a久久综合| 99精品桃花视频在线观看| 国产老女人精品毛片久久| 国产做a爰片久久毛片| 国模无码大尺度一区二区三区| 精彩视频一区二区三区| 九色porny丨国产精品| 九九精品视频在线看| 久久er精品视频| 国产在线看一区| 国产一区二区三区黄视频| 国产一区二区伦理| 国产成人亚洲综合色影视| 国产91综合网| 91色乱码一区二区三区| 色噜噜狠狠成人网p站| 一本大道久久a久久精品综合| 91国内精品野花午夜精品| 色乱码一区二区三区88| 欧美在线999| 555夜色666亚洲国产免| 欧美疯狂性受xxxxx喷水图片| 欧美一区二区三区日韩视频| 欧美精品久久天天躁| 精品剧情在线观看| 中文一区在线播放| 亚洲激情av在线| 视频一区二区三区入口| 九九热在线视频观看这里只有精品| 国产麻豆日韩欧美久久| av在线综合网| 欧美精品第一页| 欧美精品一区二区三区蜜臀| 国产精品三级视频| 亚洲最色的网站| 美女性感视频久久| 成人精品小蝌蚪| 欧美在线制服丝袜| 日韩精品一区二区三区中文不卡 | 成人av在线观| 高清成人在线观看| 在线观看视频一区| 26uuu成人网一区二区三区| 国产精品国产三级国产有无不卡 | 91激情在线视频| 91精品国产色综合久久ai换脸 | 亚洲在线观看免费| 久久国产日韩欧美精品| 不卡一区二区中文字幕| 欧美日本在线一区| 国产日韩精品一区二区三区| 亚洲综合免费观看高清在线观看| 日韩国产在线观看一区| 国产成人av在线影院| 欧美性猛片xxxx免费看久爱| 精品国一区二区三区| 亚洲激情一二三区| 国产精品亚洲第一区在线暖暖韩国 | 成人免费av网站| 精品国产91亚洲一区二区三区婷婷| 亚洲国产精品黑人久久久| 五月天网站亚洲| www.日本不卡| 337p日本欧洲亚洲大胆精品| 亚洲综合激情小说| 大白屁股一区二区视频| 91精品国产综合久久精品麻豆 | 日韩1区2区3区| 99在线精品视频| 精品国产免费人成电影在线观看四季| 一区二区三区日韩欧美| 顶级嫩模精品视频在线看| 日韩午夜精品电影| 亚洲精品美腿丝袜| 国产成人在线视频网址| 欧美一区二区播放| 亚洲夂夂婷婷色拍ww47| 成人午夜视频网站| 久久久久久**毛片大全| 美女mm1313爽爽久久久蜜臀| 欧美婷婷六月丁香综合色| 亚洲四区在线观看| 成人免费高清在线| 国产视频一区二区三区在线观看| 美日韩黄色大片| 欧美人与z0zoxxxx视频| 一区二区三区成人在线视频| 成人午夜电影小说| 久久久久亚洲综合| 久久se这里有精品| 日韩精品中午字幕| 日韩高清一级片| 欧美酷刑日本凌虐凌虐| 一区二区在线观看视频在线观看| 成人av免费观看| 国产精品久线观看视频| 成人综合在线观看| 国产欧美日韩卡一| 国产 欧美在线| 国产精品视频免费看| 成人一区二区三区| 亚洲国产高清不卡| www.色综合.com| 亚洲色图另类专区| 色嗨嗨av一区二区三区| 亚洲综合自拍偷拍| 精品视频免费在线| 婷婷综合五月天| 日韩欧美中文字幕公布| 伦理电影国产精品| 久久综合久久综合久久综合| 国产综合一区二区| 中文字幕精品综合| 白白色亚洲国产精品| 亚洲精品美国一| 欧美精品日日鲁夜夜添| 日本欧美加勒比视频| 精品区一区二区| 国产精品资源网| 国产精品色呦呦| 色欧美片视频在线观看在线视频| 亚洲在线观看免费| 日韩欧美在线观看一区二区三区| 久久精品国产精品亚洲红杏| 久久品道一品道久久精品| 成人国产精品免费观看视频| 亚洲日本va午夜在线电影| 精品视频一区二区不卡| 麻豆91在线看| 中文字幕乱码日本亚洲一区二区| 色综合天天综合给合国产| 亚洲国产另类精品专区| 日韩精品一区二区三区三区免费| 国精品**一区二区三区在线蜜桃| 国产精品久线在线观看| 欧美日韩国产经典色站一区二区三区 | 色婷婷av一区二区| 婷婷丁香久久五月婷婷| 国产亚洲一区二区三区四区| 色综合久久九月婷婷色综合| 日韩精品91亚洲二区在线观看| 久久综合久久综合亚洲| 91国产视频在线观看| 久久机这里只有精品| 中文文精品字幕一区二区| 在线免费精品视频| 激情欧美一区二区| 一区二区三区四区视频精品免费| 欧美一区二区在线免费播放| 国产91丝袜在线18| 午夜精品成人在线| 亚洲国产精品精华液ab| 91精品久久久久久蜜臀| 成年人国产精品| 日韩avvvv在线播放| 亚洲欧美在线视频观看| 久久精品一区二区三区av | 天堂午夜影视日韩欧美一区二区| 欧美一区二区啪啪| 92国产精品观看| 国产一区二区在线免费观看| 一区二区三区在线观看网站| 日韩免费看的电影| 在线看不卡av| 成人sese在线| 国产乱妇无码大片在线观看| 亚洲18影院在线观看|