Fixed some Winelib names.
[wine] / misc / tweak.c
1 /******************************************************************************
2  *
3  *   tweak.c
4  *
5  *   Windows 95 style interface tweaks.
6  *   Copyright (c) 1997 Dave Cuthbert.
7  *
8  *   FIXME:  This file is, unfortunately, aptly named:  the method of
9  *   displaying Win95 style windows is a tweak.  Lots of stuff does not yet
10  *   work -- and probably never will unless some of this code is
11  *   incorporated into the mainstream Wine code.
12  *
13  *   DEVELOPERS, PLEASE NOTE:  Before delving into the mainstream code and
14  *   altering it, consider how your changes will affect the Win3.1 interface
15  *   (which has taken a major effort to create!).  After you make any sort of
16  *   non-trivial change, *test* the Wine code running in Win3.1 mode!  The
17  *   object here is to make it so that the person who tests the latest version
18  *   of Wine without adding the tweaks into wine.conf notices nothing out of
19  *   the ordinary.
20  *
21  *   Revision history
22  *        03-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
23  *             Original implementation.
24  *        05-Aug-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de)
25  *             Removed some unused code.
26  *        22-Sep-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de)
27  *             Removed more unused code.
28  *
29  *****************************************************************************/
30
31 #include <string.h>
32 #include "windows.h"
33 #include "tweak.h"
34 #include "options.h"
35 #include "debug.h"
36
37 /* General options */
38
39 WINE_LOOK TWEAK_WineLook = WIN31_LOOK;
40
41
42 /******************************************************************************
43  *
44  *   int  TWEAK_Init()
45  *
46  *   Does the full initialization of the Win95 tweak subsystem.  Return value
47  *   indicates success.  Called by loader/main.c's MAIN_Init().
48  *
49  *   Revision history
50  *        05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
51  *             Original implementation.
52  *        22-Sep-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de)
53  *             Removed unused code and added Win98 option.
54  *
55  *****************************************************************************/
56
57 int TWEAK_Init (void)
58 {
59     char szIniString[80];
60
61     PROFILE_GetWineIniString ("Tweak.Layout", "Win95Look", "TestString",
62                               szIniString, 80);
63     if (strncmp (szIniString, "TestString", 10)) {
64         if (PROFILE_GetWineIniBool ("Tweak.Layout", "Win95Look", 0)) {
65             TWEAK_WineLook = WIN95_LOOK;
66             TRACE (tweak, "Using Win95 look and feel.\n");
67         }
68         else {
69             TWEAK_WineLook = WIN31_LOOK;
70             TRACE (tweak, "Using Win3.1 look and feel.\n");
71         }
72         ERR (tweak,
73              "Replace \"Win95Look\" by \"WineLook\" in your \"wine.ini\"!\n");
74     }
75
76     PROFILE_GetWineIniString ("Tweak.Layout", "WineLook", "Win31",
77                               szIniString, 80);
78
79     if (!strncasecmp (szIniString, "Win31", 5)) {
80         TWEAK_WineLook = WIN31_LOOK;
81         TRACE (tweak, "Using Win3.1 look and feel.\n");
82     }
83     else if (!strncasecmp (szIniString, "Win95", 5)) {
84         TWEAK_WineLook = WIN95_LOOK;
85         TRACE (tweak, "Using Win95 look and feel.\n");
86     }
87     else if (!strncasecmp (szIniString, "Win98", 5)) {
88         TWEAK_WineLook = WIN98_LOOK;
89         TRACE (tweak, "Using Win98 look and feel.\n");
90     }
91     else {
92         TWEAK_WineLook = WIN31_LOOK;
93         TRACE (tweak, "Using Win3.1 look and feel.\n");
94     }
95
96     return 1;
97 }
98
99
100 /******************************************************************************
101  *
102  *   int  TWEAK_CheckConfiguration()
103  *
104  *   Examines wine.conf for old/bad entries and recommends changes to the user.
105  *
106  *   Revision history
107  *        05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu)
108  *             Original implementation.
109  *
110  *****************************************************************************/
111
112 int  TWEAK_CheckConfiguration()
113 {
114     return 1;
115 }