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