1/* 2 * tkWinConfig.c -- 3 * 4 * This module implements the Windows system defaults for 5 * the configuration package. 6 * 7 * Copyright (c) 1997 by Sun Microsystems, Inc. 8 * 9 * See the file "license.terms" for information on usage and redistribution 10 * of this file, and for a DISCLAIMER OF ALL WARRANTIES. 11 * 12 * RCS: @(#) $Id: tkWinConfig.c,v 1.3 2002/08/05 04:30:41 dgp Exp $ 13 */ 14 15#include "tk.h" 16#include "tkInt.h" 17#include "tkWinInt.h" 18 19 20/* 21 *---------------------------------------------------------------------- 22 * 23 * TkpGetSystemDefault -- 24 * 25 * Given a dbName and className for a configuration option, 26 * return a string representation of the option. 27 * 28 * Results: 29 * Returns a Tk_Uid that is the string identifier that identifies 30 * this option. Returns NULL if there are no system defaults 31 * that match this pair. 32 * 33 * Side effects: 34 * None, once the package is initialized. 35 * 36 *---------------------------------------------------------------------- 37 */ 38 39Tcl_Obj * 40TkpGetSystemDefault( 41 Tk_Window tkwin, /* A window to use. */ 42 CONST char *dbName, /* The option database name. */ 43 CONST char *className) /* The name of the option class. */ 44{ 45 Tcl_Obj *valueObjPtr; 46 Tk_Uid classUid; 47 48 if (tkwin == NULL) { 49 return NULL; 50 } 51 52 valueObjPtr = NULL; 53 classUid = Tk_Class(tkwin); 54 55 if (strcmp(classUid, "Menu") == 0) { 56 valueObjPtr = TkWinGetMenuSystemDefault(tkwin, dbName, className); 57 } 58 59 return valueObjPtr; 60} 61