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

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

?? tkwindialog.c

?? linux系統下的音頻通信
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* * tkWinDialog.c -- * *	Contains the Windows implementation of the common dialog boxes. * * Copyright (c) 1996-1997 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: @(#) tkWinDialog.c 1.10 97/10/21 11:29:18 * */ #include "tkWinInt.h"#include "tkFileFilter.h"#include <commdlg.h>    /* includes common dialog functionality */#include <dlgs.h>       /* includes common dialog template defines */#include <cderr.h>      /* includes the common dialog error codes */#if ((TK_MAJOR_VERSION == 4) && (TK_MINOR_VERSION <= 2))/* * The following function is implemented on tk4.3 and after only  */#define Tk_GetHWND TkWinGetHWND#endif#define SAVE_FILE 0#define OPEN_FILE 1/*---------------------------------------------------------------------- * MsgTypeInfo -- * *	This structure stores the type of available message box in an *	easy-to-process format. Used by th Tk_MessageBox() function *---------------------------------------------------------------------- */typedef struct MsgTypeInfo {    char * name;    int type;    int numButtons;    char * btnNames[3];} MsgTypeInfo;#define NUM_TYPES 6static MsgTypeInfo msgTypeInfo[NUM_TYPES] = {    {"abortretryignore", MB_ABORTRETRYIGNORE, 3, {"abort", "retry", "ignore"}},    {"ok", 		 MB_OK, 	      1, {"ok"                      }},    {"okcancel",	 MB_OKCANCEL,	      2, {"ok",    "cancel"         }},    {"retrycancel",	 MB_RETRYCANCEL,      2, {"retry", "cancel"         }},    {"yesno",		 MB_YESNO,	      2, {"yes",   "no"             }},    {"yesnocancel",	 MB_YESNOCANCEL,      3, {"yes",   "no",    "cancel"}}};/* * The following structure is used in the GetOpenFileName() and * GetSaveFileName() calls. */typedef struct _OpenFileData {    Tcl_Interp * interp;    TCHAR szFile[MAX_PATH+1];} OpenFileData;/* * The following structure is used in the ChooseColor() call. */typedef struct _ChooseColorData {    Tcl_Interp * interp;    char * title;			/* Title of the color dialog */} ChooseColorData;static int 		GetFileName _ANSI_ARGS_((ClientData clientData,    			    Tcl_Interp *interp, int argc, char **argv,    			    int isOpen));static UINT CALLBACK	ColorDlgHookProc _ANSI_ARGS_((HWND hDlg, UINT uMsg,			    WPARAM wParam, LPARAM lParam));static int 		MakeFilter _ANSI_ARGS_((Tcl_Interp *interp,    			    OPENFILENAME *ofnPtr, char * string));static int		ParseFileDlgArgs _ANSI_ARGS_((Tcl_Interp * interp,    			    OPENFILENAME *ofnPtr, int argc, char ** argv,			    int isOpen));static int 		ProcessCDError _ANSI_ARGS_((Tcl_Interp * interp,			    DWORD dwErrorCode, HWND hWnd));/* *---------------------------------------------------------------------- * * EvalArgv -- * *	Invokes the Tcl procedure with the arguments. argv[0] is set by *	the caller of this function. It may be different than cmdName. *	The TCL command will see argv[0], not cmdName, as its name if it *	invokes [lindex [info level 0] 0] * * Results: *	TCL_ERROR if the command does not exist and cannot be autoloaded. *	Otherwise, return the result of the evaluation of the command. * * Side effects: *	The command may be autoloaded. * *---------------------------------------------------------------------- */static int EvalArgv(interp, cmdName, argc, argv)    Tcl_Interp *interp;		/* Current interpreter. */    char * cmdName;		/* Name of the TCL command to call */    int argc;			/* Number of arguments. */    char **argv;		/* Argument strings. */{    Tcl_CmdInfo cmdInfo;    if (!Tcl_GetCommandInfo(interp, cmdName, &cmdInfo)) {	char * cmdArgv[2];	/*	 * This comand is not in the interpreter yet -- looks like we	 * have to auto-load it	 */	if (!Tcl_GetCommandInfo(interp, "auto_load", &cmdInfo)) {	    Tcl_ResetResult(interp);	    Tcl_AppendResult(interp, "cannot execute command \"auto_load\"",		NULL);	    return TCL_ERROR;	}	cmdArgv[0] = "auto_load";	cmdArgv[1] = cmdName;	if ((*cmdInfo.proc)(cmdInfo.clientData, interp, 2, cmdArgv)!= TCL_OK){ 	    return TCL_ERROR;	}	if (!Tcl_GetCommandInfo(interp, cmdName, &cmdInfo)) {	    Tcl_ResetResult(interp);	    Tcl_AppendResult(interp, "cannot auto-load command \"",		cmdName, "\"",NULL);	    return TCL_ERROR;	}    }    return (*cmdInfo.proc)(cmdInfo.clientData, interp, argc, argv);}/* *---------------------------------------------------------------------- * * Tk_ChooseColorCmd -- * *	This procedure implements the color dialog box for the Windows *	platform. See the user documentation for details on what it *	does. * * Results: *	See user documentation. * * Side effects: *	A dialog window is created the first time this procedure is called. *	This window is not destroyed and will be reused the next time the *	application invokes the "tk_chooseColor" command. * *---------------------------------------------------------------------- */intTk_ChooseColorCmd(clientData, interp, argc, argv)    ClientData clientData;	/* Main window associated with interpreter. */    Tcl_Interp *interp;		/* Current interpreter. */    int argc;			/* Number of arguments. */    char **argv;		/* Argument strings. */{    Tk_Window parent = Tk_MainWindow(interp);    ChooseColorData custData;    int oldMode;    CHOOSECOLOR chooseColor;    char * colorStr = NULL;    int i;    int winCode, tclCode;    XColor * colorPtr = NULL;    static inited = 0;    static long dwCustColors[16];    static long oldColor;		/* the color selected last time */    custData.title     = NULL;    if (!inited) {	/*	 * dwCustColors stores the custom color which the user can	 * modify. We store these colors in a fixed array so that the next	 * time the color dialog pops up, the same set of custom colors	 * remain in the dialog.	 */	for (i=0; i<16; i++) {	    dwCustColors[i] = (RGB(255-i*10, i, i*10)) ;	}	oldColor = RGB(0xa0,0xa0,0xa0);	inited = 1;    }    /*     * 1. Parse the arguments     */    chooseColor.lStructSize  = sizeof(CHOOSECOLOR) ;    chooseColor.hwndOwner    = 0;			/* filled in below */    chooseColor.hInstance    = 0;    chooseColor.rgbResult    = oldColor;    chooseColor.lpCustColors = (LPDWORD) dwCustColors ;    chooseColor.Flags        = CC_RGBINIT | CC_FULLOPEN | CC_ENABLEHOOK;    chooseColor.lCustData    = (LPARAM)&custData;    chooseColor.lpfnHook     = ColorDlgHookProc;    chooseColor.lpTemplateName = NULL;    for (i=1; i<argc; i+=2) {        int v = i+1;	int len = strlen(argv[i]);	if (strncmp(argv[i], "-initialcolor", len)==0) {	    if (v==argc) {goto arg_missing;}	    colorStr = argv[v];	}	else if (strncmp(argv[i], "-parent", len)==0) {	    if (v==argc) {goto arg_missing;}	    parent=Tk_NameToWindow(interp, argv[v], Tk_MainWindow(interp));	    if (parent == NULL) {		return TCL_ERROR;	    }	}	else if (strncmp(argv[i], "-title", len)==0) {	    if (v==argc) {goto arg_missing;}	    custData.title = argv[v];	}	else {    	    Tcl_AppendResult(interp, "unknown option \"", 		argv[i], "\", must be -initialcolor, -parent or -title",		NULL);		return TCL_ERROR;	}    }    if (Tk_WindowId(parent) == None) {	Tk_MakeWindowExist(parent);    }    chooseColor.hwndOwner = Tk_GetHWND(Tk_WindowId(parent));    if (colorStr != NULL) {	colorPtr = Tk_GetColor(interp, Tk_MainWindow(interp), colorStr);	if (!colorPtr) {	    return TCL_ERROR;	}	chooseColor.rgbResult = RGB((colorPtr->red/0x100), 	    (colorPtr->green/0x100), (colorPtr->blue/0x100));    }	    /*     * 2. Popup the dialog     */    oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);    winCode = ChooseColor(&chooseColor);    (void) Tcl_SetServiceMode(oldMode);    /*     * Clear the interp result since anything may have happened during the     * modal loop.     */    Tcl_ResetResult(interp);    /*     * 3. Process the result of the dialog     */    if (winCode) {	/*	 * User has selected a color	 */	char result[100];	sprintf(result, "#%02x%02x%02x",	    GetRValue(chooseColor.rgbResult), 	    GetGValue(chooseColor.rgbResult), 	    GetBValue(chooseColor.rgbResult));        Tcl_AppendResult(interp, result, NULL);	tclCode = TCL_OK;	oldColor = chooseColor.rgbResult;    } else {	/*	 * User probably pressed Cancel, or an error occurred	 */	tclCode = ProcessCDError(interp, CommDlgExtendedError(), 	     chooseColor.hwndOwner);    }    if (colorPtr) {	Tk_FreeColor(colorPtr);    }    return tclCode;  arg_missing:    Tcl_AppendResult(interp, "value for \"", argv[argc-1], "\" missing",	NULL);    return TCL_ERROR;}/* *---------------------------------------------------------------------- * * ColorDlgHookProc -- * *	Gets called during the execution of the color dialog. It processes *	the "interesting" messages that Windows send to the dialog. * * Results: *	TRUE if the message has been processed, FALSE otherwise. * * Side effects: *	Changes the title of the dialog window when it is popped up. * *---------------------------------------------------------------------- */static UINTCALLBACK ColorDlgHookProc(hDlg, uMsg, wParam, lParam)    HWND hDlg;			/* Handle to the color dialog */    UINT uMsg;			/* Type of message */    WPARAM wParam;		/* word param, interpretation depends on uMsg*/    LPARAM lParam;		/* long param, interpretation depends on uMsg*/{    CHOOSECOLOR * ccPtr;    ChooseColorData * pCustData;    switch (uMsg) {      case WM_INITDIALOG:	/* Save the pointer to CHOOSECOLOR so that we can use it later */	SetWindowLong(hDlg, DWL_USER, lParam);	/* Set the title string of the dialog */	ccPtr = (CHOOSECOLOR*)lParam;	pCustData = (ChooseColorData*)(ccPtr->lCustData);	if (pCustData->title && *(pCustData->title)) { 	    SetWindowText(hDlg, (LPCSTR)pCustData->title);	}	return TRUE;    }    return FALSE;}/* *---------------------------------------------------------------------- * * Tk_GetOpenFileCmd -- * *	This procedure implements the "open file" dialog box for the *	Windows platform. See the user documentation for details on what *	it does. * * Results: *	See user documentation. * * Side effects: *	A dialog window is created the first this procedure is called. *	This window is not destroyed and will be reused the next time *	the application invokes the "tk_getOpenFile" or *	"tk_getSaveFile" command. * *---------------------------------------------------------------------- */intTk_GetOpenFileCmd(clientData, interp, argc, argv)    ClientData clientData;	/* Main window associated with interpreter. */    Tcl_Interp *interp;		/* Current interpreter. */    int argc;			/* Number of arguments. */    char **argv;		/* Argument strings. */{    return GetFileName(clientData, interp, argc, argv, OPEN_FILE);}/* *---------------------------------------------------------------------- * * Tk_GetSaveFileCmd -- * *	Same as Tk_GetOpenFileCmd but opens a "save file" dialog box *	instead * * Results: *	Same as Tk_GetOpenFileCmd. * * Side effects: *	Same as Tk_GetOpenFileCmd. * *---------------------------------------------------------------------- */intTk_GetSaveFileCmd(clientData, interp, argc, argv)    ClientData clientData;	/* Main window associated with interpreter. */    Tcl_Interp *interp;		/* Current interpreter. */    int argc;			/* Number of arguments. */    char **argv;		/* Argument strings. */{    return GetFileName(clientData, interp, argc, argv, SAVE_FILE);}/* *---------------------------------------------------------------------- * * GetFileName -- * *	Calls GetOpenFileName() or GetSaveFileName(). * * Results: *	See user documentation. * * Side effects: *	See user documentation. * *---------------------------------------------------------------------- */static int GetFileName(clientData, interp, argc, argv, isOpen)    ClientData clientData;	/* Main window associated with interpreter. */    Tcl_Interp *interp;		/* Current interpreter. */    int argc;			/* Number of arguments. */    char **argv;		/* Argument strings. */    int isOpen;			/* true if we should call GetOpenFileName(),				 * false if we should call GetSaveFileName() */{    OPENFILENAME openFileName, *ofnPtr;    int tclCode, winCode, oldMode;    OpenFileData *custData;    char buffer[MAX_PATH+1];        ofnPtr = &openFileName;    /*     * 1. Parse the arguments.     */    if (ParseFileDlgArgs(interp, ofnPtr, argc, argv, isOpen) != TCL_OK) {	return TCL_ERROR;    }    custData = (OpenFileData*) ofnPtr->lCustData;    /*     * 2. Call the common dialog function.     */    oldMode = Tcl_SetServiceMode(TCL_SERVICE_ALL);    GetCurrentDirectory(MAX_PATH+1, buffer);    if (isOpen) {	winCode = GetOpenFileName(ofnPtr);    } else {	winCode = GetSaveFileName(ofnPtr);    }    SetCurrentDirectory(buffer);    (void) Tcl_SetServiceMode(oldMode);    /*     * Clear the interp result since anything may have happened during the     * modal loop.     */    Tcl_ResetResult(interp);    if (ofnPtr->lpstrInitialDir != NULL) {	ckfree((char*) ofnPtr->lpstrInitialDir);    }    /*     * 3. Process the results.     */    if (winCode) {	char *p;	Tcl_ResetResult(interp);	for (p = custData->szFile; p && *p; p++) {	    /*	     * Change the pathname to the Tcl "normalized" pathname, where	     * back slashes are used instead of forward slashes	     */	    if (*p == '\\') {		*p = '/';	    }	}	Tcl_AppendResult(interp, custData->szFile, NULL);	tclCode = TCL_OK;    } else {	tclCode = ProcessCDError(interp, CommDlgExtendedError(),		ofnPtr->hwndOwner);    }    if (custData) {	ckfree((char*)custData);    }    if (ofnPtr->lpstrFilter) {	ckfree((char*)ofnPtr->lpstrFilter);    }    return tclCode;}/* *---------------------------------------------------------------------- * * ParseFileDlgArgs -- * *	Parses the arguments passed to tk_getOpenFile and tk_getSaveFile. * * Results: *	A standard TCL return value. * * Side effects: *	The OPENFILENAME structure is initialized and modified according

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品污网站| 国产欧美一区二区精品婷婷| 91美女蜜桃在线| 国产成人日日夜夜| 国产一区二区主播在线| 国内成+人亚洲+欧美+综合在线 | 高清国产一区二区三区| 久久97超碰国产精品超碰| 免费的国产精品| 美女任你摸久久| 国产99精品国产| 一本色道**综合亚洲精品蜜桃冫 | 日本亚洲天堂网| 九九**精品视频免费播放| 国产精品一区二区在线看| 成人免费视频免费观看| 在线日韩一区二区| 91精品国产一区二区| 欧美成人猛片aaaaaaa| 久久精品亚洲一区二区三区浴池| 国产精品女主播av| 午夜日韩在线观看| 国产在线精品一区二区| 99久久国产免费看| 欧美一区二区三区四区在线观看| 欧美精品一区二区三| 国产精品成人一区二区艾草| 亚洲国产日韩a在线播放| 国产一区二区在线看| 日本高清不卡aⅴ免费网站| 精品国产免费人成在线观看| 国产精品成人免费精品自在线观看| 亚洲一二三四久久| 国产丶欧美丶日本不卡视频| 欧美在线一区二区| 国产欧美1区2区3区| 亚洲h精品动漫在线观看| 国产成人综合亚洲91猫咪| 欧美色涩在线第一页| 2017欧美狠狠色| 亚洲第一av色| av动漫一区二区| 久久亚洲精精品中文字幕早川悠里| 亚洲欧美国产77777| 国产一区二区女| 欧美一级日韩一级| 性久久久久久久久久久久| 成人在线一区二区三区| 欧美电视剧免费观看| 亚洲国产精品自拍| 91丨porny丨国产入口| 精品第一国产综合精品aⅴ| 亚洲自拍另类综合| 91在线观看地址| 国产精品美女久久久久久| 精久久久久久久久久久| 欧美一级黄色录像| 日韩精品一二三区| 欧美日韩精品专区| 樱桃国产成人精品视频| 99国产精品久久久| 亚洲天堂a在线| av激情成人网| 中文字幕亚洲欧美在线不卡| 国产aⅴ综合色| 亚洲国产激情av| 成人美女视频在线看| 欧美国产日韩精品免费观看| 国产麻豆精品视频| 国产女人18水真多18精品一级做| 激情文学综合网| 国产午夜一区二区三区| 国产成人免费高清| 国产精品乱码妇女bbbb| 99久久精品国产精品久久| 亚洲人成网站色在线观看| 欧美在线观看一区| 亚洲国产aⅴ天堂久久| 欧美性色综合网| 日本午夜精品视频在线观看| 日韩女优毛片在线| 国产 欧美在线| 国产精品国产三级国产普通话蜜臀 | 成人免费在线视频观看| 99re热这里只有精品视频| 亚洲嫩草精品久久| 欧美三级中文字幕| 久久成人免费电影| 中文av一区特黄| 欧美天天综合网| 久久国产精品一区二区| 国产色产综合产在线视频| 成人国产亚洲欧美成人综合网| 亚洲精品美国一| 91精品国产福利| 国产精品18久久久久久vr| 中文av一区特黄| 欧美精品xxxxbbbb| 国产69精品久久99不卡| 亚洲精品日日夜夜| 欧美精品一区二区三| 色哟哟一区二区三区| 美日韩黄色大片| 日韩毛片高清在线播放| 欧美伦理影视网| 国产v综合v亚洲欧| 亚洲成人你懂的| 国产午夜精品美女毛片视频| 欧美性极品少妇| 狠狠色丁香九九婷婷综合五月| 亚洲男人都懂的| 久久久久久亚洲综合影院红桃| 在线中文字幕不卡| 风间由美一区二区av101 | 另类调教123区| 一区视频在线播放| 精品捆绑美女sm三区| 色综合久久中文综合久久97| 精品一区二区三区av| 亚洲综合免费观看高清完整版 | 日韩精品专区在线影院观看| 91一区一区三区| 国产·精品毛片| 国产一区在线观看视频| 亚洲国产精品影院| 亚洲视频免费在线| 中文字幕av资源一区| 日韩欧美三级在线| 欧美性大战久久| 94色蜜桃网一区二区三区| 国产激情视频一区二区三区欧美 | 国产免费久久精品| 欧美va在线播放| 911精品国产一区二区在线| 91色porny| 成人一区二区在线观看| 国内成+人亚洲+欧美+综合在线| 亚洲成人第一页| 亚洲一区中文在线| 亚洲天堂网中文字| 亚洲视频 欧洲视频| 国产亚洲成av人在线观看导航| 欧美欧美午夜aⅴ在线观看| 一本一道久久a久久精品 | 91精品国产欧美一区二区18| 色哟哟日韩精品| 在线观看欧美精品| 欧美性一二三区| 欧美综合天天夜夜久久| 欧美性猛交xxxxxxxx| 日本二三区不卡| 在线观看日产精品| 制服.丝袜.亚洲.中文.综合| 欧美绝品在线观看成人午夜影视| 在线观看网站黄不卡| 欧美无乱码久久久免费午夜一区 | 欧洲av在线精品| 91电影在线观看| 欧美美女黄视频| 久久亚洲一级片| 亚洲天堂福利av| 亚洲国产精品影院| 久久国产精品99久久久久久老狼| 蜜臀久久久久久久| 国产精品一二一区| 成人涩涩免费视频| 色噜噜狠狠色综合欧洲selulu| 欧美四级电影在线观看| 91精品久久久久久久91蜜桃| 日韩欧美国产一区二区在线播放| 久久精品一区二区| 一区二区三区欧美在线观看| 日韩激情视频在线观看| 精品一区二区三区免费| 不卡的av网站| 欧美一区二区三区婷婷月色| 久久久蜜桃精品| 亚洲一线二线三线视频| 免费av成人在线| 91色porny| 日韩免费一区二区| 亚洲男女毛片无遮挡| 日本亚洲天堂网| 91麻豆文化传媒在线观看| 欧美放荡的少妇| 国产精品久久久久久久蜜臀| 亚洲综合区在线| 国产成人一区二区精品非洲| 日本韩国欧美国产| 国产午夜精品在线观看| 亚洲动漫第一页| 99麻豆久久久国产精品免费| 欧美日韩国产影片| 国产日韩精品视频一区| 亚洲成人av资源| 91尤物视频在线观看| 有码一区二区三区| 高清不卡在线观看| 日韩无一区二区| 亚洲成人久久影院|