Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 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. |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 24 | * 05-Aug-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de) |
| 25 | * Removed some unused code. |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 26 | * 22-Sep-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de) |
| 27 | * Removed more unused code. |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 28 | * |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 29 | *****************************************************************************/ |
| 30 | |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 31 | #include <string.h> |
Marcus Meissner | 04c3e1d | 1999-02-19 10:37:02 +0000 | [diff] [blame] | 32 | #include "winuser.h" |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 33 | #include "tweak.h" |
| 34 | #include "options.h" |
| 35 | #include "debug.h" |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 36 | |
Patrik Stridvall | b4b9fae | 1999-04-19 14:56:29 +0000 | [diff] [blame] | 37 | DEFAULT_DEBUG_CHANNEL(tweak) |
| 38 | |
Alexandre Julliard | 767e6f6 | 1998-08-09 12:47:43 +0000 | [diff] [blame] | 39 | /* General options */ |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 40 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 41 | WINE_LOOK TWEAK_WineLook = WIN31_LOOK; |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 42 | |
| 43 | |
| 44 | /****************************************************************************** |
| 45 | * |
| 46 | * int TWEAK_Init() |
| 47 | * |
| 48 | * Does the full initialization of the Win95 tweak subsystem. Return value |
| 49 | * indicates success. Called by loader/main.c's MAIN_Init(). |
| 50 | * |
| 51 | * Revision history |
| 52 | * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) |
| 53 | * Original implementation. |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 54 | * 22-Sep-1998 Eric Kohl (ekohl@abo.rhein-zeitung.de) |
| 55 | * Removed unused code and added Win98 option. |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 56 | * |
| 57 | *****************************************************************************/ |
| 58 | |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 59 | int TWEAK_Init (void) |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 60 | { |
Alexandre Julliard | d30dfd2 | 1998-09-27 18:28:36 +0000 | [diff] [blame] | 61 | char szIniString[80]; |
| 62 | |
| 63 | PROFILE_GetWineIniString ("Tweak.Layout", "Win95Look", "TestString", |
| 64 | szIniString, 80); |
| 65 | if (strncmp (szIniString, "TestString", 10)) { |
| 66 | if (PROFILE_GetWineIniBool ("Tweak.Layout", "Win95Look", 0)) { |
| 67 | TWEAK_WineLook = WIN95_LOOK; |
| 68 | TRACE (tweak, "Using Win95 look and feel.\n"); |
| 69 | } |
| 70 | else { |
| 71 | TWEAK_WineLook = WIN31_LOOK; |
| 72 | TRACE (tweak, "Using Win3.1 look and feel.\n"); |
| 73 | } |
| 74 | ERR (tweak, |
| 75 | "Replace \"Win95Look\" by \"WineLook\" in your \"wine.ini\"!\n"); |
| 76 | } |
| 77 | |
| 78 | PROFILE_GetWineIniString ("Tweak.Layout", "WineLook", "Win31", |
| 79 | szIniString, 80); |
| 80 | |
| 81 | if (!strncasecmp (szIniString, "Win31", 5)) { |
| 82 | TWEAK_WineLook = WIN31_LOOK; |
| 83 | TRACE (tweak, "Using Win3.1 look and feel.\n"); |
| 84 | } |
| 85 | else if (!strncasecmp (szIniString, "Win95", 5)) { |
| 86 | TWEAK_WineLook = WIN95_LOOK; |
| 87 | TRACE (tweak, "Using Win95 look and feel.\n"); |
| 88 | } |
| 89 | else if (!strncasecmp (szIniString, "Win98", 5)) { |
| 90 | TWEAK_WineLook = WIN98_LOOK; |
| 91 | TRACE (tweak, "Using Win98 look and feel.\n"); |
| 92 | } |
| 93 | else { |
| 94 | TWEAK_WineLook = WIN31_LOOK; |
| 95 | TRACE (tweak, "Using Win3.1 look and feel.\n"); |
| 96 | } |
| 97 | |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 98 | return 1; |
| 99 | } |
| 100 | |
| 101 | |
| 102 | /****************************************************************************** |
| 103 | * |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 104 | * int TWEAK_CheckConfiguration() |
| 105 | * |
| 106 | * Examines wine.conf for old/bad entries and recommends changes to the user. |
| 107 | * |
| 108 | * Revision history |
| 109 | * 05-Jul-1997 Dave Cuthbert (dacut@ece.cmu.edu) |
| 110 | * Original implementation. |
| 111 | * |
| 112 | *****************************************************************************/ |
| 113 | |
| 114 | int TWEAK_CheckConfiguration() |
| 115 | { |
Alexandre Julliard | d37eb36 | 1997-07-20 16:23:21 +0000 | [diff] [blame] | 116 | return 1; |
| 117 | } |