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

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

?? tkwinfont.c

?? linux系統下的音頻通信
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*  * tkWinFont.c -- * *	Contains the Windows implementation of the platform-independant *	font package interface. * * Copyright (c) 1995-1997 Sun Microsystems, Inc. * Copyright (c) 1994 Software Research Associates, Inc.  * * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * * SCCS: @(#) tkWinFont.c 1.20 97/05/14 15:45:30 */#include "tkWinInt.h"#include "tkFont.h"/* * The following structure represents Windows' implementation of a font. */typedef struct WinFont {    TkFont font;		/* Stuff used by generic font package.  Must				 * be first in structure. */    HFONT hFont;		/* Windows information about font. */    HWND hwnd;			/* Toplevel window of application that owns				 * this font, used for getting HDC. */} WinFont;/* * The following structure is used as to map between the Tcl strings * that represent the system fonts and the numbers used by Windows. */static TkStateMap systemMap[] = {    {ANSI_FIXED_FONT,	    "ansifixed"},    {ANSI_VAR_FONT,	    "ansi"},    {DEVICE_DEFAULT_FONT,   "device"},    {OEM_FIXED_FONT,	    "oemfixed"},    {SYSTEM_FIXED_FONT,	    "systemfixed"},    {SYSTEM_FONT,	    "system"},    {-1,		    NULL}};#define ABS(x)          (((x) < 0) ? -(x) : (x))static TkFont *		AllocFont _ANSI_ARGS_((TkFont *tkFontPtr,                             Tk_Window tkwin, HFONT hFont));static char *		GetProperty _ANSI_ARGS_((CONST TkFontAttributes *faPtr,			    CONST char *option));static int CALLBACK	WinFontFamilyEnumProc _ANSI_ARGS_((ENUMLOGFONT *elfPtr,			    NEWTEXTMETRIC *ntmPtr, int fontType,			    LPARAM lParam));/* *--------------------------------------------------------------------------- * * TkpGetNativeFont -- * *	Map a platform-specific native font name to a TkFont. * * Results: * 	The return value is a pointer to a TkFont that represents the *	native font.  If a native font by the given name could not be *	found, the return value is NULL.   * *	Every call to this procedure returns a new TkFont structure, *	even if the name has already been seen before.  The caller should *	call TkpDeleteFont() when the font is no longer needed. * *	The caller is responsible for initializing the memory associated *	with the generic TkFont when this function returns and releasing *	the contents of the generic TkFont before calling TkpDeleteFont(). * * Side effects: *	None. * *--------------------------------------------------------------------------- */TkFont *TkpGetNativeFont(tkwin, name)    Tk_Window tkwin;		/* For display where font will be used. */    CONST char *name;		/* Platform-specific font name. */{    int object;    HFONT hFont;        object = TkFindStateNum(NULL, NULL, systemMap, name);    if (object < 0) {	return NULL;    }    hFont = GetStockObject(object);    if (hFont == NULL) {	panic("TkpGetNativeFont: can't allocate stock font");    }    return AllocFont(NULL, tkwin, hFont);}/* *--------------------------------------------------------------------------- * * TkpGetFontFromAttributes --  * *	Given a desired set of attributes for a font, find a font with *	the closest matching attributes. * * Results: * 	The return value is a pointer to a TkFont that represents the *	font with the desired attributes.  If a font with the desired *	attributes could not be constructed, some other font will be *	substituted automatically.  NULL is never returned. * *	Every call to this procedure returns a new TkFont structure, *	even if the specified attributes have already been seen before. *	The caller should call TkpDeleteFont() to free the platform- *	specific data when the font is no longer needed.   * *	The caller is responsible for initializing the memory associated *	with the generic TkFont when this function returns and releasing *	the contents of the generic TkFont before calling TkpDeleteFont(). * * Side effects: *	None. * *--------------------------------------------------------------------------- */TkFont *TkpGetFontFromAttributes(tkFontPtr, tkwin, faPtr)    TkFont *tkFontPtr;		/* If non-NULL, store the information in				 * this existing TkFont structure, rather than				 * allocating a new structure to hold the				 * font; the existing contents of the font				 * will be released.  If NULL, a new TkFont				 * structure is allocated. */    Tk_Window tkwin;		/* For display where font will be used. */    CONST TkFontAttributes *faPtr;  /* Set of attributes to match. */{    LOGFONT lf;    HFONT hFont;    Window window;    HWND hwnd;    HDC hdc;    int result=0;    window = Tk_WindowId(((TkWindow *) tkwin)->mainPtr->winPtr);    hwnd = (window == None) ? NULL : TkWinGetHWND(window);    hdc = GetDC(hwnd);    lf.lfHeight		= -faPtr->pointsize;    if (lf.lfHeight < 0) {	lf.lfHeight = MulDiv(lf.lfHeight, 	        254 * WidthOfScreen(Tk_Screen(tkwin)),		720 * WidthMMOfScreen(Tk_Screen(tkwin)));    }    lf.lfWidth		= 0;    lf.lfEscapement	= 0;    lf.lfOrientation	= 0;    lf.lfWeight		= (faPtr->weight == TK_FW_NORMAL) ? FW_NORMAL : FW_BOLD;    lf.lfItalic		= faPtr->slant;    lf.lfUnderline	= faPtr->underline;    lf.lfStrikeOut	= faPtr->overstrike;	/* try and match font with character set - KH */	result=strlen(faPtr->family);    if (strcmp(faPtr->family+result-3, "Cyr")==0) {        lf.lfCharSet	= RUSSIAN_CHARSET;    } else if (strcmp(faPtr->family+result-2, "CE")==0) {        lf.lfCharSet	= EASTEUROPE_CHARSET;    	} else if (strcmp(faPtr->family+result-6, "Baltic")==0) {        lf.lfCharSet	= BALTIC_CHARSET;    	} else if (strcmp(faPtr->family+result-3, "Tur")==0) {        lf.lfCharSet	= TURKISH_CHARSET;    	} else if (strcmp(faPtr->family+result-5, "Greek")==0) {        lf.lfCharSet	= GREEK_CHARSET;    	} else {        lf.lfCharSet	= DEFAULT_CHARSET;    	}    lf.lfOutPrecision	= OUT_DEFAULT_PRECIS;    lf.lfClipPrecision	= CLIP_DEFAULT_PRECIS;    lf.lfQuality	= DEFAULT_QUALITY;    lf.lfPitchAndFamily = DEFAULT_PITCH | FF_DONTCARE;    if (faPtr->family == NULL) {	lf.lfFaceName[0] = '\0';    } else {	lstrcpyn(lf.lfFaceName, faPtr->family, sizeof(lf.lfFaceName));    }    ReleaseDC(hwnd, hdc);    /*     * Replace the standard X and Mac family names with the names that     * Windows likes.     */    if ((stricmp(lf.lfFaceName, "Times") == 0)	    || (stricmp(lf.lfFaceName, "New York") == 0)) {	strcpy(lf.lfFaceName, "Times New Roman");    } else if ((stricmp(lf.lfFaceName, "Courier") == 0)	    || (stricmp(lf.lfFaceName, "Monaco") == 0)) {	strcpy(lf.lfFaceName, "Courier New");    } else if ((stricmp(lf.lfFaceName, "Helvetica") == 0)	    || (stricmp(lf.lfFaceName, "Geneva") == 0)) {	strcpy(lf.lfFaceName, "Arial");    }    hFont = CreateFontIndirect(&lf);    if (hFont == NULL) {        hFont = GetStockObject(SYSTEM_FONT);	if (hFont == NULL) {	    panic("TkpGetFontFromAttributes: cannot get system font");	}    }    return AllocFont(tkFontPtr, tkwin, hFont);}/* *--------------------------------------------------------------------------- * * TkpDeleteFont -- * *	Called to release a font allocated by TkpGetNativeFont() or *	TkpGetFontFromAttributes().  The caller should have already *	released the fields of the TkFont that are used exclusively by *	the generic TkFont code. * * Results: *	None. * * Side effects: *	TkFont is deallocated. * *--------------------------------------------------------------------------- */voidTkpDeleteFont(tkFontPtr)    TkFont *tkFontPtr;		/* Token of font to be deleted. */{    WinFont *fontPtr;    fontPtr = (WinFont *) tkFontPtr;    DeleteObject(fontPtr->hFont);    ckfree((char *) fontPtr);}/* *--------------------------------------------------------------------------- * * TkpGetFontFamilies, WinFontEnumFamilyProc -- * *	Return information about the font families that are available *	on the display of the given window. * * Results: *	interp->result is modified to hold a list of all the available *	font families. * * Side effects: *	None. * *--------------------------------------------------------------------------- */ voidTkpGetFontFamilies(interp, tkwin)    Tcl_Interp *interp;		/* Interp to hold result. */    Tk_Window tkwin;		/* For display to query. */{        Window window;    HWND hwnd;    HDC hdc;    window = Tk_WindowId(tkwin);    hwnd = (window == (Window) NULL) ? NULL : TkWinGetHWND(window);    hdc = GetDC(hwnd);    EnumFontFamilies(hdc, NULL, (FONTENUMPROC) WinFontFamilyEnumProc,	    (LPARAM) interp);    ReleaseDC(hwnd, hdc);}/* ARGSUSED */static int CALLBACKWinFontFamilyEnumProc(elfPtr, ntmPtr, fontType, lParam)    ENUMLOGFONT *elfPtr;	/* Logical-font data. */    NEWTEXTMETRIC *ntmPtr;	/* Physical-font data (not used). */    int fontType;		/* Type of font (not used). */    LPARAM lParam;		/* Interp to hold result. */{    Tcl_Interp *interp;    interp = (Tcl_Interp *) lParam;    Tcl_AppendElement(interp, elfPtr->elfLogFont.lfFaceName);    return 1;}/* *--------------------------------------------------------------------------- * *  Tk_MeasureChars -- * *	Determine the number of characters from the string that will fit *	in the given horizontal span.  The measurement is done under the *	assumption that Tk_DrawChars() will be used to actually display *	the characters. * * Results: *	The return value is the number of characters from source that *	fit into the span that extends from 0 to maxLength.  *lengthPtr is *	filled with the x-coordinate of the right edge of the last *	character that did fit. * * Side effects: *	None. * *--------------------------------------------------------------------------- */int

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91亚洲精品一区二区乱码| 日韩激情视频在线观看| 久久综合九色综合欧美98| 91精品国产高清一区二区三区蜜臀 | 99vv1com这只有精品| 成人黄色一级视频| av网站免费线看精品| 97se亚洲国产综合自在线不卡| a美女胸又www黄视频久久| 99在线精品免费| 欧美性猛交xxxx黑人交 | 视频一区视频二区在线观看| 亚洲6080在线| 久久99国产精品久久99果冻传媒| 精品无码三级在线观看视频| 东方欧美亚洲色图在线| 色老汉一区二区三区| 欧美一区三区四区| 久久久99精品免费观看不卡| 国产精品对白交换视频 | 国产清纯美女被跳蛋高潮一区二区久久w | 怡红院av一区二区三区| 污片在线观看一区二区| 国模大尺度一区二区三区| 成人午夜电影小说| 在线免费观看日本一区| 欧美一区二区三区在线电影| 国产午夜精品一区二区| 亚洲黄色av一区| 精品写真视频在线观看| 99精品国产一区二区三区不卡| 欧美日韩一区中文字幕| 国产亚洲欧美一级| 亚洲午夜电影在线观看| 国产盗摄视频一区二区三区| 99久久精品国产一区| 欧美一级在线视频| 成人欧美一区二区三区小说| 男女激情视频一区| caoporm超碰国产精品| 欧美一级生活片| 亚洲色图制服诱惑 | 亚洲精品自拍动漫在线| 日本美女一区二区三区视频| 成人亚洲精品久久久久软件| 欧美日本韩国一区| 中文字幕在线一区免费| 美国精品在线观看| 一本一道综合狠狠老| 欧美v日韩v国产v| 午夜电影网亚洲视频| www.日韩大片| 国产亚洲视频系列| 日韩国产欧美三级| 91精彩视频在线观看| 国产欧美日韩激情| 精品无人码麻豆乱码1区2区| 欧美日韩视频在线一区二区| 亚洲人成网站在线| 成人免费电影视频| 久久天堂av综合合色蜜桃网| 日韩av电影天堂| 欧洲另类一二三四区| 亚洲四区在线观看| 91在线国产福利| 国产精品人妖ts系列视频| 黑人巨大精品欧美一区| 在线播放日韩导航| 亚洲地区一二三色| 欧美日韩日日摸| 亚洲自拍另类综合| 欧美制服丝袜第一页| 亚洲激情中文1区| 99热这里都是精品| 亚洲青青青在线视频| 91免费视频大全| 亚洲老司机在线| 欧美日免费三级在线| 亚洲一二三区不卡| 欧美剧情片在线观看| 亚洲成a人v欧美综合天堂| 欧美人与性动xxxx| 免费看欧美女人艹b| 26uuu另类欧美亚洲曰本| 国内精品国产成人| 国产婷婷一区二区| 成人av综合在线| 亚洲一区二区在线视频| 欧美一个色资源| 国产精品夜夜嗨| 国产精品免费看片| 91精品办公室少妇高潮对白| 亚洲一区二区三区美女| 欧美一区二区成人6969| 精品在线视频一区| 欧美激情一二三区| 91片在线免费观看| 日韩精品国产欧美| 久久九九久久九九| 91免费看视频| 久久不见久久见免费视频7| 久久久亚洲高清| 色偷偷88欧美精品久久久| 日韩精品乱码免费| 日本一区二区三区高清不卡| 色呦呦国产精品| 精品一区二区在线播放| 国产精品视频一区二区三区不卡| 色成年激情久久综合| 久久激情五月激情| 一区二区成人在线视频| 日韩一级大片在线| 91蜜桃视频在线| 精品在线观看视频| 亚洲免费资源在线播放| 精品国产免费人成在线观看| 91在线观看下载| 麻豆精品一区二区三区| 亚洲美女电影在线| 国产日韩欧美不卡在线| 欧美理论片在线| 成人国产精品视频| 欧美aaaaaa午夜精品| 中文字幕佐山爱一区二区免费| 精品免费99久久| 欧美日韩国产中文| 94色蜜桃网一区二区三区| 国产一区二区影院| 老汉av免费一区二区三区| 亚洲国产精品影院| 亚洲丝袜精品丝袜在线| 中文字幕欧美国产| 国产免费久久精品| 欧美tk丨vk视频| 欧美一区二区三区四区在线观看| 在线视频你懂得一区| voyeur盗摄精品| 高清在线观看日韩| 国产精品888| 国内久久精品视频| 全国精品久久少妇| 亚洲一区二区三区四区五区黄| 国产精品第13页| 国产欧美日韩中文久久| 日韩视频一区二区三区在线播放| 欧美性猛片aaaaaaa做受| 91丨porny丨国产入口| 成人午夜看片网址| 岛国精品在线观看| 高清shemale亚洲人妖| 国产揄拍国内精品对白| 国内精品视频一区二区三区八戒| 蜜桃av一区二区三区| 久久激五月天综合精品| 韩国成人在线视频| 国产成人欧美日韩在线电影| 成人一级片在线观看| 国产91丝袜在线播放0| 国产成人精品亚洲777人妖| 国产呦精品一区二区三区网站| 蜜臀av性久久久久蜜臀aⅴ| 欧美aⅴ一区二区三区视频| 美国十次综合导航| 国产麻豆日韩欧美久久| 国产美女精品人人做人人爽| 成人小视频免费在线观看| 成+人+亚洲+综合天堂| 日本高清不卡一区| 欧美老肥妇做.爰bbww| 日韩精品中文字幕在线一区| 国产日韩v精品一区二区| 国产精品久久国产精麻豆99网站 | 一本色道a无线码一区v| 色综合久久久久久久久| 欧美日韩国产综合一区二区| 日韩免费电影网站| 中文在线一区二区| 亚洲男女毛片无遮挡| 免费观看在线色综合| 国产成人免费在线| 色www精品视频在线观看| 日韩一区二区精品| 国产精品丝袜一区| 天天色图综合网| 成人免费毛片aaaaa**| 欧美日韩国产美| 国产日韩欧美制服另类| 亚洲成av人片| 成人不卡免费av| 欧美一级日韩一级| 亚洲欧美综合在线精品| 蜜臀av国产精品久久久久| aaa欧美大片| 精品美女在线观看| 亚洲一区二区三区爽爽爽爽爽| 国产自产v一区二区三区c| 欧美中文一区二区三区| 国产精品网站在线观看| 老司机精品视频一区二区三区| 91香蕉视频污在线|