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

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

?? tkunixscrlbr.c

?? linux系統下的音頻通信
?? C
字號:
/*  * tkUnixScrollbar.c -- * *	This file implements the Unix specific portion of the scrollbar *	widget. * * Copyright (c) 1996 by Sun Microsystems, Inc. * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * SCCS: @(#) tkUnixScrlbr.c 1.8 96/12/10 20:05:07 */#include "tkScrollbar.h"/* * Minimum slider length, in pixels (designed to make sure that the slider * is always easy to grab with the mouse). */#define MIN_SLIDER_LENGTH	5/* * Declaration of Unix specific scrollbar structure. */typedef struct UnixScrollbar {    TkScrollbar info;		/* Generic scrollbar info. */    GC troughGC;		/* For drawing trough. */    GC copyGC;			/* Used for copying from pixmap onto screen. */} UnixScrollbar;/* * The class procedure table for the scrollbar widget. */TkClassProcs tkpScrollbarProcs = {     NULL,			/* createProc. */    NULL,			/* geometryProc. */    NULL			/* modalProc. */};/* *---------------------------------------------------------------------- * * TkpCreateScrollbar -- * *	Allocate a new TkScrollbar structure. * * Results: *	Returns a newly allocated TkScrollbar structure. * * Side effects: *	Registers an event handler for the widget. * *---------------------------------------------------------------------- */TkScrollbar *TkpCreateScrollbar(tkwin)    Tk_Window tkwin;{    UnixScrollbar *scrollPtr = (UnixScrollbar *)ckalloc(sizeof(UnixScrollbar));    scrollPtr->troughGC = None;    scrollPtr->copyGC = None;    Tk_CreateEventHandler(tkwin,	    ExposureMask|StructureNotifyMask|FocusChangeMask,	    TkScrollbarEventProc, (ClientData) scrollPtr);    return (TkScrollbar *) scrollPtr;}/* *-------------------------------------------------------------- * * TkpDisplayScrollbar -- * *	This procedure redraws the contents of a scrollbar window. *	It is invoked as a do-when-idle handler, so it only runs *	when there's nothing else for the application to do. * * Results: *	None. * * Side effects: *	Information appears on the screen. * *-------------------------------------------------------------- */voidTkpDisplayScrollbar(clientData)    ClientData clientData;	/* Information about window. */{    register TkScrollbar *scrollPtr = (TkScrollbar *) clientData;    register Tk_Window tkwin = scrollPtr->tkwin;    XPoint points[7];    Tk_3DBorder border;    int relief, width, elementBorderWidth;    Pixmap pixmap;    if ((scrollPtr->tkwin == NULL) || !Tk_IsMapped(tkwin)) {	goto done;    }    if (scrollPtr->vertical) {	width = Tk_Width(tkwin) - 2*scrollPtr->inset;    } else {	width = Tk_Height(tkwin) - 2*scrollPtr->inset;    }    elementBorderWidth = scrollPtr->elementBorderWidth;    if (elementBorderWidth < 0) {	elementBorderWidth = scrollPtr->borderWidth;    }    /*     * In order to avoid screen flashes, this procedure redraws     * the scrollbar in a pixmap, then copies the pixmap to the     * screen in a single operation.  This means that there's no     * point in time where the on-sreen image has been cleared.     */    pixmap = Tk_GetPixmap(scrollPtr->display, Tk_WindowId(tkwin),	    Tk_Width(tkwin), Tk_Height(tkwin), Tk_Depth(tkwin));    if (scrollPtr->highlightWidth != 0) {	GC gc;	if (scrollPtr->flags & GOT_FOCUS) {	    gc = Tk_GCForColor(scrollPtr->highlightColorPtr, pixmap);	} else {	    gc = Tk_GCForColor(scrollPtr->highlightBgColorPtr, pixmap);	}	Tk_DrawFocusHighlight(tkwin, gc, scrollPtr->highlightWidth, pixmap);    }    Tk_Draw3DRectangle(tkwin, pixmap, scrollPtr->bgBorder,	    scrollPtr->highlightWidth, scrollPtr->highlightWidth,	    Tk_Width(tkwin) - 2*scrollPtr->highlightWidth,	    Tk_Height(tkwin) - 2*scrollPtr->highlightWidth,	    scrollPtr->borderWidth, scrollPtr->relief);    XFillRectangle(scrollPtr->display, pixmap,	    ((UnixScrollbar*)scrollPtr)->troughGC,	    scrollPtr->inset, scrollPtr->inset,	    (unsigned) (Tk_Width(tkwin) - 2*scrollPtr->inset),	    (unsigned) (Tk_Height(tkwin) - 2*scrollPtr->inset));    /*     * Draw the top or left arrow.  The coordinates of the polygon     * points probably seem odd, but they were carefully chosen with     * respect to X's rules for filling polygons.  These point choices     * cause the arrows to just fill the narrow dimension of the     * scrollbar and be properly centered.     */    if (scrollPtr->activeField == TOP_ARROW) {	border = scrollPtr->activeBorder;	relief = scrollPtr->activeField == TOP_ARROW ? scrollPtr->activeRelief		: TK_RELIEF_RAISED;    } else {	border = scrollPtr->bgBorder;	relief = TK_RELIEF_RAISED;    }    if (scrollPtr->vertical) {	points[0].x = scrollPtr->inset - 1;	points[0].y = scrollPtr->arrowLength + scrollPtr->inset - 1;	points[1].x = width + scrollPtr->inset;	points[1].y = points[0].y;	points[2].x = width/2 + scrollPtr->inset;	points[2].y = scrollPtr->inset - 1;	Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3,		elementBorderWidth, relief);    } else {	points[0].x = scrollPtr->arrowLength + scrollPtr->inset - 1;	points[0].y = scrollPtr->inset - 1;	points[1].x = scrollPtr->inset;	points[1].y = width/2 + scrollPtr->inset;	points[2].x = points[0].x;	points[2].y = width + scrollPtr->inset;	Tk_Fill3DPolygon(tkwin, pixmap, border, points, 3,		elementBorderWidth, relief);    }    /*     * Display the bottom or right arrow.     */    if (scrollPtr->activeField == BOTTOM_ARROW) {	border = scrollPtr->activeBorder;	relief = scrollPtr->activeField == BOTTOM_ARROW		? scrollPtr->activeRelief : TK_RELIEF_RAISED;    } else {	border = scrollPtr->bgBorder;	relief = TK_RELIEF_RAISED;    }    if (scrollPtr->vertical) {	points[0].x = scrollPtr->inset;	points[0].y = Tk_Height(tkwin) - scrollPtr->arrowLength		- scrollPtr->inset + 1;	points[1].x = width/2 + scrollPtr->inset;	points[1].y = Tk_Height(tkwin) - scrollPtr->inset;	points[2].x = width + scrollPtr->inset;	points[2].y = points[0].y;	Tk_Fill3DPolygon(tkwin, pixmap, border,		points, 3, elementBorderWidth, relief);    } else {	points[0].x = Tk_Width(tkwin) - scrollPtr->arrowLength		- scrollPtr->inset + 1;	points[0].y = scrollPtr->inset - 1;	points[1].x = points[0].x;	points[1].y = width + scrollPtr->inset;	points[2].x = Tk_Width(tkwin) - scrollPtr->inset;	points[2].y = width/2 + scrollPtr->inset;	Tk_Fill3DPolygon(tkwin, pixmap, border,		points, 3, elementBorderWidth, relief);    }    /*     * Display the slider.     */    if (scrollPtr->activeField == SLIDER) {	border = scrollPtr->activeBorder;	relief = scrollPtr->activeField == SLIDER ? scrollPtr->activeRelief		: TK_RELIEF_RAISED;    } else {	border = scrollPtr->bgBorder;	relief = TK_RELIEF_RAISED;    }    if (scrollPtr->vertical) {	Tk_Fill3DRectangle(tkwin, pixmap, border,		scrollPtr->inset, scrollPtr->sliderFirst,		width, scrollPtr->sliderLast - scrollPtr->sliderFirst,		elementBorderWidth, relief);    } else {	Tk_Fill3DRectangle(tkwin, pixmap, border,		scrollPtr->sliderFirst, scrollPtr->inset,		scrollPtr->sliderLast - scrollPtr->sliderFirst, width,		elementBorderWidth, relief);    }    /*     * Copy the information from the off-screen pixmap onto the screen,     * then delete the pixmap.     */    XCopyArea(scrollPtr->display, pixmap, Tk_WindowId(tkwin),	    ((UnixScrollbar*)scrollPtr)->copyGC, 0, 0,	    (unsigned) Tk_Width(tkwin), (unsigned) Tk_Height(tkwin), 0, 0);    Tk_FreePixmap(scrollPtr->display, pixmap);    done:    scrollPtr->flags &= ~REDRAW_PENDING;}/* *---------------------------------------------------------------------- * * TkpComputeScrollbarGeometry -- * *	After changes in a scrollbar's size or configuration, this *	procedure recomputes various geometry information used in *	displaying the scrollbar. * * Results: *	None. * * Side effects: *	The scrollbar will be displayed differently. * *---------------------------------------------------------------------- */extern voidTkpComputeScrollbarGeometry(scrollPtr)    register TkScrollbar *scrollPtr;	/* Scrollbar whose geometry may					 * have changed. */{    int width, fieldLength;    if (scrollPtr->highlightWidth < 0) {	scrollPtr->highlightWidth = 0;    }    scrollPtr->inset = scrollPtr->highlightWidth + scrollPtr->borderWidth;    width = (scrollPtr->vertical) ? Tk_Width(scrollPtr->tkwin)	    : Tk_Height(scrollPtr->tkwin);    scrollPtr->arrowLength = width - 2*scrollPtr->inset + 1;    fieldLength = (scrollPtr->vertical ? Tk_Height(scrollPtr->tkwin)	    : Tk_Width(scrollPtr->tkwin))	    - 2*(scrollPtr->arrowLength + scrollPtr->inset);    if (fieldLength < 0) {	fieldLength = 0;    }    scrollPtr->sliderFirst = fieldLength*scrollPtr->firstFraction;    scrollPtr->sliderLast = fieldLength*scrollPtr->lastFraction;    /*     * Adjust the slider so that some piece of it is always     * displayed in the scrollbar and so that it has at least     * a minimal width (so it can be grabbed with the mouse).     */    if (scrollPtr->sliderFirst > (fieldLength - 2*scrollPtr->borderWidth)) {	scrollPtr->sliderFirst = fieldLength - 2*scrollPtr->borderWidth;    }    if (scrollPtr->sliderFirst < 0) {	scrollPtr->sliderFirst = 0;    }    if (scrollPtr->sliderLast < (scrollPtr->sliderFirst	    + MIN_SLIDER_LENGTH)) {	scrollPtr->sliderLast = scrollPtr->sliderFirst + MIN_SLIDER_LENGTH;    }    if (scrollPtr->sliderLast > fieldLength) {	scrollPtr->sliderLast = fieldLength;    }    scrollPtr->sliderFirst += scrollPtr->arrowLength + scrollPtr->inset;    scrollPtr->sliderLast += scrollPtr->arrowLength + scrollPtr->inset;    /*     * Register the desired geometry for the window (leave enough space     * for the two arrows plus a minimum-size slider, plus border around     * the whole window, if any).  Then arrange for the window to be     * redisplayed.     */    if (scrollPtr->vertical) {	Tk_GeometryRequest(scrollPtr->tkwin,		scrollPtr->width + 2*scrollPtr->inset,		2*(scrollPtr->arrowLength + scrollPtr->borderWidth		+ scrollPtr->inset));    } else {	Tk_GeometryRequest(scrollPtr->tkwin,		2*(scrollPtr->arrowLength + scrollPtr->borderWidth		+ scrollPtr->inset), scrollPtr->width + 2*scrollPtr->inset);    }    Tk_SetInternalBorder(scrollPtr->tkwin, scrollPtr->inset);}/* *---------------------------------------------------------------------- * * TkpDestroyScrollbar -- * *	Free data structures associated with the scrollbar control. * * Results: *	None. * * Side effects: *	Frees the GCs associated with the scrollbar. * *---------------------------------------------------------------------- */voidTkpDestroyScrollbar(scrollPtr)    TkScrollbar *scrollPtr;{    UnixScrollbar *unixScrollPtr = (UnixScrollbar *)scrollPtr;    if (unixScrollPtr->troughGC != None) {	Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC);    }    if (unixScrollPtr->copyGC != None) {	Tk_FreeGC(scrollPtr->display, unixScrollPtr->copyGC);    }}/* *---------------------------------------------------------------------- * * TkpConfigureScrollbar -- * *	This procedure is called after the generic code has finished *	processing configuration options, in order to configure *	platform specific options. * * Results: *	None. * * Side effects: *	Configuration info may get changed. * *---------------------------------------------------------------------- */voidTkpConfigureScrollbar(scrollPtr)    register TkScrollbar *scrollPtr;	/* Information about widget;  may or					 * may not already have values for					 * some fields. */{    XGCValues gcValues;    GC new;    UnixScrollbar *unixScrollPtr = (UnixScrollbar *) scrollPtr;    Tk_SetBackgroundFromBorder(scrollPtr->tkwin, scrollPtr->bgBorder);    gcValues.foreground = scrollPtr->troughColorPtr->pixel;    new = Tk_GetGC(scrollPtr->tkwin, GCForeground, &gcValues);    if (unixScrollPtr->troughGC != None) {	Tk_FreeGC(scrollPtr->display, unixScrollPtr->troughGC);    }    unixScrollPtr->troughGC = new;    if (unixScrollPtr->copyGC == None) {	gcValues.graphics_exposures = False;	unixScrollPtr->copyGC = Tk_GetGC(scrollPtr->tkwin, GCGraphicsExposures,	    &gcValues);    }}/* *-------------------------------------------------------------- * * TkpScrollbarPosition -- * *	Determine the scrollbar element corresponding to a *	given position. * * Results: *	One of TOP_ARROW, TOP_GAP, etc., indicating which element *	of the scrollbar covers the position given by (x, y).  If *	(x,y) is outside the scrollbar entirely, then OUTSIDE is *	returned. * * Side effects: *	None. * *-------------------------------------------------------------- */intTkpScrollbarPosition(scrollPtr, x, y)    register TkScrollbar *scrollPtr;	/* Scrollbar widget record. */    int x, y;				/* Coordinates within scrollPtr's					 * window. */{    int length, width, tmp;    if (scrollPtr->vertical) {	length = Tk_Height(scrollPtr->tkwin);	width = Tk_Width(scrollPtr->tkwin);    } else {	tmp = x;	x = y;	y = tmp;	length = Tk_Width(scrollPtr->tkwin);	width = Tk_Height(scrollPtr->tkwin);    }    if ((x < scrollPtr->inset) || (x >= (width - scrollPtr->inset))	    || (y < scrollPtr->inset) || (y >= (length - scrollPtr->inset))) {	return OUTSIDE;    }    /*     * All of the calculations in this procedure mirror those in     * TkpDisplayScrollbar.  Be sure to keep the two consistent.     */    if (y < (scrollPtr->inset + scrollPtr->arrowLength)) {	return TOP_ARROW;    }    if (y < scrollPtr->sliderFirst) {	return TOP_GAP;    }    if (y < scrollPtr->sliderLast) {	return SLIDER;    }    if (y >= (length - (scrollPtr->arrowLength + scrollPtr->inset))) {	return BOTTOM_ARROW;    }    return BOTTOM_GAP;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美人妇做爰xxxⅹ性高电影| 91免费视频观看| 亚洲免费观看高清完整版在线观看 | 国产视频一区在线播放| 色婷婷综合久久久久中文一区二区 | 国产精品入口麻豆九色| 欧美亚洲综合网| 国产盗摄女厕一区二区三区| 亚洲成人黄色影院| 国产精品高潮久久久久无| 欧美电影免费观看完整版| 91麻豆国产香蕉久久精品| 麻豆国产一区二区| 婷婷综合五月天| 亚洲精品中文字幕乱码三区| 国产精品视频线看| 欧美成人a在线| 欧美精品一级二级三级| 色婷婷综合久久久久中文一区二区 | 亚洲成人久久影院| 亚洲伦理在线精品| 中文字幕免费一区| 欧美成人欧美edvon| 欧美日韩性生活| 色乱码一区二区三区88| 国产99精品视频| 激情五月播播久久久精品| 日韩电影免费在线观看网站| 亚洲一区二区偷拍精品| 亚洲色图欧洲色图| 亚洲欧洲精品一区二区三区| 国产网红主播福利一区二区| 精品欧美一区二区在线观看| 91精品国产色综合久久不卡电影| 91偷拍与自偷拍精品| www.亚洲精品| 成人精品一区二区三区中文字幕| 国产久卡久卡久卡久卡视频精品| 国内精品自线一区二区三区视频| 日韩高清一区二区| 日韩精品视频网站| 青草av.久久免费一区| 天天操天天色综合| 肉肉av福利一精品导航| 日韩经典一区二区| 久久精品免费看| 九色综合狠狠综合久久| 玖玖九九国产精品| 国产一区二区三区在线观看免费 | 欧美日韩另类国产亚洲欧美一级| 欧美午夜一区二区三区| 欧美日韩mp4| 日韩欧美国产三级| 欧美激情一区在线| 欧美精品三级在线观看| av一区二区久久| 国产精品一区二区在线观看不卡| 全部av―极品视觉盛宴亚洲| 亚洲国产精品久久久久秋霞影院| 久久久国际精品| 国产欧美日韩视频一区二区| 日韩精品一区二区三区三区免费| 91精品婷婷国产综合久久| 欧美久久一二区| 欧美日韩mp4| 欧美一区二区三区性视频| 91麻豆精品91久久久久久清纯| 8v天堂国产在线一区二区| 色婷婷亚洲精品| 99久久久国产精品免费蜜臀| 成人a级免费电影| 欧美在线不卡一区| 欧美成人激情免费网| 9i看片成人免费高清| 国产美女在线观看一区| 国产suv一区二区三区88区| www.亚洲精品| 一区二区三国产精华液| 国产精品电影院| 色婷婷av一区二区三区之一色屋| 在线不卡一区二区| 国产欧美一区二区精品秋霞影院| 一区二区三区四区激情| 美腿丝袜亚洲三区| 91浏览器打开| 欧美精品一区二区三区蜜桃| 亚洲欧美电影一区二区| 久久av资源网| 在线精品亚洲一区二区不卡| 久久中文娱乐网| 亚洲国产精品久久艾草纯爱| 国产一区二区导航在线播放| 欧美日韩一区不卡| 国产欧美一区在线| 日本欧美在线看| 日本精品一级二级| 国产亚洲欧美在线| 日韩中文字幕区一区有砖一区 | 中文字幕不卡三区| 日韩高清不卡一区二区三区| 91年精品国产| 国产丝袜欧美中文另类| 男男gaygay亚洲| 欧美亚洲综合在线| 国产精品国产三级国产普通话三级| 美女看a上一区| 色婷婷激情综合| 国产精品高潮呻吟久久| 国产福利电影一区二区三区| 日韩一区二区在线播放| 亚洲综合男人的天堂| jlzzjlzz亚洲女人18| 国产偷国产偷亚洲高清人白洁 | 国产精品精品国产色婷婷| 美女视频免费一区| 欧美日韩高清不卡| 亚洲免费看黄网站| av在线综合网| 国产精品视频一二三| 国产成人av自拍| www欧美成人18+| 狠狠色狠狠色合久久伊人| 欧美精品vⅰdeose4hd| 亚洲精品成人悠悠色影视| 成人a免费在线看| 国产精品免费视频网站| 国产99精品国产| 国产无一区二区| 国产成人综合在线观看| 久久综合色鬼综合色| 激情文学综合网| 亚洲精品一区二区在线观看| 久久不见久久见中文字幕免费| 91精品国产手机| 免费成人在线观看视频| 欧美videos中文字幕| 久久成人18免费观看| 久久综合九色综合欧美亚洲| 国产一区二区精品在线观看| 久久精品夜夜夜夜久久| 粉嫩绯色av一区二区在线观看| 欧美激情一区二区| 成+人+亚洲+综合天堂| 亚洲欧美一区二区在线观看| 色8久久精品久久久久久蜜| 一区二区理论电影在线观看| 亚洲美女视频一区| 欧美精品一区二区三区高清aⅴ| 国产精品自在在线| 五月婷婷激情综合网| 欧美国产日韩在线观看| 欧美二区三区的天堂| 色综合久久中文综合久久97| 蜜臀av一区二区在线观看 | 久久精品免费观看| 国产精品久久久久毛片软件| 欧美大尺度电影在线| 欧美日韩免费高清一区色橹橹| 成人福利在线看| 国产制服丝袜一区| 日韩成人精品在线观看| 国产精品高清亚洲| 国产精品美女久久久久久久| 久久久综合视频| 日韩精品中文字幕在线不卡尤物| 欧美激情在线一区二区| 久久亚洲一区二区三区四区| 亚洲另类在线视频| 亚洲一区自拍偷拍| 精品久久久久久综合日本欧美| 99vv1com这只有精品| 色综合中文综合网| 久久色成人在线| 亚洲免费在线观看| 666欧美在线视频| 国产在线一区观看| 亚洲人快播电影网| 91精品一区二区三区久久久久久 | 国产99一区视频免费| 亚洲黄网站在线观看| 日韩你懂的在线播放| 99riav一区二区三区| 玖玖九九国产精品| 亚洲视频图片小说| 精品免费国产二区三区| 91在线观看美女| 激情国产一区二区| 亚洲精品成人悠悠色影视| 欧美精品一区二区高清在线观看| 91视频com| 国内精品自线一区二区三区视频| 一二三区精品福利视频| 久久一区二区视频| 欧美日韩美少妇| 99视频精品全部免费在线| 久久精品国产在热久久| 亚洲影院久久精品| 国产精品少妇自拍| 日韩免费一区二区三区在线播放| 欧亚一区二区三区|