/* * Main function. * * Copyright 1994 Alexandre Julliard */ #include "config.h" #ifndef X_DISPLAY_MISSING #include "x11drv.h" #else /* !defined(X_DISPLAY_MISSING) */ #include "ttydrv.h" #endif /* !defined(X_DISPLAY_MISSING) */ #include #include #include #include #include #ifdef MALLOC_DEBUGGING # include #endif #include "winbase.h" #include "winsock.h" #include "heap.h" #include "message.h" #include "msdos.h" #include "color.h" #include "options.h" #include "desktop.h" #include "builtin32.h" #include "debug.h" #include "debugdefs.h" #include "xmalloc.h" #include "module.h" #include "version.h" #include "winnls.h" #include "console.h" #include "monitor.h" #include "keyboard.h" #include "gdi.h" #include "user.h" #include "wine/winuser16.h" /**********************************************************************/ USER_DRIVER *USER_Driver = NULL; /* when adding new languages look at ole/ole2nls.c * for proper iso name and Windows code (add 0x0400 * to the code listed there) */ const WINE_LANGUAGE_DEF Languages[] = { {"En",0x0409}, /* LANG_En */ {"Es",0x040A}, /* LANG_Es */ {"De",0x0407}, /* LANG_De */ {"No",0x0414}, /* LANG_No */ {"Fr",0x040C}, /* LANG_Fr */ {"Fi",0x040B}, /* LANG_Fi */ {"Da",0x0406}, /* LANG_Da */ {"Cs",0x0405}, /* LANG_Cs */ {"Eo",0x048f}, /* LANG_Eo */ {"It",0x0410}, /* LANG_It */ {"Ko",0x0412}, /* LANG_Ko */ {"Hu",0x040e}, /* LANG_Hu */ {"Pl",0x0415}, /* LANG_Pl */ {"Pt",0x0416}, /* LANG_Pt */ {"Sv",0x041d}, /* LANG_Sv */ {"Ca",0x0403}, /* LANG_Ca */ {"Nl",0x0413}, /* LANG_Nl */ {"Ru",0x0419}, /* LANG_Ru */ {NULL,0} }; WORD WINE_LanguageId = 0x409; /* english as default */ struct options Options = { /* default options */ 0, /* argc */ NULL, /* argv */ NULL, /* desktopGeometry */ NULL, /* programName */ NULL, /* argv0 */ NULL, /* dllFlags */ FALSE, /* usePrivateMap */ FALSE, /* useFixedMap */ FALSE, /* synchronous */ FALSE, /* backing store */ SW_SHOWNORMAL, /* cmdShow */ FALSE, FALSE, /* failReadOnly */ MODE_ENHANCED, /* Enhanced mode */ #ifdef DEFAULT_LANG DEFAULT_LANG, /* Default language */ #else LANG_En, #endif FALSE, /* Managed windows */ FALSE, /* Perfect graphics */ FALSE, /* No DGA */ NULL, /* Alternate config file name */ 0 /* screenDepth */ }; static char szUsage[] = "%s\n" "Usage: %s [options] \"program_name [arguments]\"\n" "\n" "Options:\n" " -backingstore Turn on backing store\n" " -config name Specify config file to use\n" " -console driver Select which driver(s) to use for the console\n" " -debug Enter debugger before starting application\n" " -debugmsg name Turn debugging-messages on or off\n" " -depth n Change the depth to use for multiple-depth screens\n" " -desktop geom Use a desktop window of the given geometry\n" " -display name Use the specified display\n" " -dll name Enable or disable built-in DLLs\n" " -failreadonly Read only files may not be opened in write mode\n" " -fixedmap Use a \"standard\" color map\n" " -help Show this help message\n" " -iconic Start as an icon\n" " -language xx Set the language (one of Ca,Cs,Da,De,En,Eo,Es,Fi,Fr,Hu,It,\n" " Ko,Nl,No,Pl,Pt,Sv,Ru)\n" " -managed Allow the window manager to manage created windows\n" " -mode mode Start Wine in a particular mode (standard or enhanced)\n" " -name name Set the application name\n" " -nodga Disable XFree86 DGA extensions\n" " -perfect Favor correctness over speed for graphical operations\n" " -privatemap Use a private color map\n" " -synchronous Turn on synchronous display mode\n" " -version Display the Wine version\n" " -winver Version to imitate (one of win31,win95,nt351,nt40)\n" " -dosver DOS version to imitate (x.xx, e.g. 6.22). Only valid with -winver win31\n" ; /*********************************************************************** * MAIN_Usage */ void MAIN_Usage( char *name ) { MSG( szUsage, WINE_RELEASE_INFO, name ); exit(1); } /*********************************************************************** * MAIN_GetProgramName * * Get the program name. The name is specified by (in order of precedence): * - the option '-name'. * - the environment variable 'WINE_NAME'. * - the last component of argv[0]. */ static char *MAIN_GetProgramName( int argc, char *argv[] ) { int i; char *p; for (i = 1; i < argc-1; i++) if (!strcmp( argv[i], "-name" )) return argv[i+1]; if ((p = getenv( "WINE_NAME" )) != NULL) return p; if ((p = strrchr( argv[0], '/' )) != NULL) return p+1; return argv[0]; } /*********************************************************************** * MAIN_ParseDebugOptions * * Turns specific debug messages on or off, according to "options". * * RETURNS * TRUE if parsing was successful */ BOOL MAIN_ParseDebugOptions(char *options) { /* defined in relay32/relay386.c */ extern char **debug_relay_includelist; extern char **debug_relay_excludelist; /* defined in relay32/snoop.c */ extern char **debug_snoop_includelist; extern char **debug_snoop_excludelist; int i; int l, cls, dotracerelay = TRACE_ON(relay); l = strlen(options); if (l<3) return FALSE; if (options[l-1]=='\n') options[l-1]='\0'; do { if ((*options!='+')&&(*options!='-')){ int j; for(j=0; j 0x56 */ /*x57*/ /*LANG_ENTRY_BEGIN( "??", KONKANI ) LANG_ENTRY_END( KONKANI ) */ /* 0x58 -> ... */ LANG_ENTRY_BEGIN( "eo", ESPERANTO ) /* not official */ LANG_ENTRY_END( ESPERANTO ) ret = LANG_ENGLISH; end_MAIN_GetLanguageID: if (Charset) free(charset); free(dialect); return ret; } /*********************************************************************** * MAIN_ParseLanguageOption * * Parse -language option. */ void MAIN_ParseLanguageOption( char *arg ) { const WINE_LANGUAGE_DEF *p = Languages; /* for compatibility whith non-iso names previously used */ if (!strcmp("Sw",arg)) { strcpy(arg,"Sv"); FIXME(system,"use 'Sv' instead of 'Sw'\n");} if (!strcmp("Cz",arg)) { strcpy(arg,"Cs"); FIXME(system,"use 'Cs' instead of 'Cz'\n");} if (!strcmp("Po",arg)) { strcpy(arg,"Pt"); FIXME(system,"use 'Pt' instead of 'Po'\n");} Options.language = LANG_Xx; /* First (dummy) language */ for (;p->name;p++) { if (!lstrcmpiA( p->name, arg )) { WINE_LanguageId = p->langid; return; } Options.language++; } MSG( "Invalid language specified '%s'. Supported languages are: ", arg ); for (p = Languages; p->name; p++) MSG( "%s ", p->name ); MSG( "\n" ); exit(1); } /*********************************************************************** * MAIN_ParseModeOption * * Parse -mode option. */ void MAIN_ParseModeOption( char *arg ) { if (!lstrcmpiA("enhanced", arg)) Options.mode = MODE_ENHANCED; else if (!lstrcmpiA("standard", arg)) Options.mode = MODE_STANDARD; else { MSG( "Invalid mode '%s' specified.\n", arg); MSG( "Valid modes are: 'standard', 'enhanced' (default).\n"); exit(1); } } /*********************************************************************** * MAIN_ParseOptions * * Parse command line options and open display. */ static void MAIN_ParseOptions( int *argc, char *argv[] ) { int i; char *pcDot; Options.argc = argc; Options.argv = argv; Options.programName = MAIN_GetProgramName( *argc, argv ); Options.argv0 = argv[0]; /* initialise Options.language to 0 to tell "no language choosen yet" */ Options.language = 0; /* make sure there is no "." in Options.programName to confuse the X resource database lookups */ if ((pcDot = strchr(Options.programName, '.'))) *pcDot = '\0'; for (i = 1; i < *argc; i++) { if (!strcmp( argv[i], "-v" ) || !strcmp( argv[i], "-version" )) { MSG( "%s\n", WINE_RELEASE_INFO ); exit(0); } if (!strcmp( argv[i], "-h" ) || !strcmp( argv[i], "-help" )) { MAIN_Usage(argv[0]); exit(0); } } } /*********************************************************************** * called_at_exit */ static void called_at_exit(void) { if (GDI_Driver) GDI_Driver->pFinalize(); if (USER_Driver) USER_Driver->pFinalize(); WINSOCK_Shutdown(); CONSOLE_Close(); } /*********************************************************************** * MAIN_WineInit * * Wine initialisation and command-line parsing */ BOOL MAIN_WineInit( int *argc, char *argv[] ) { struct timeval tv; #ifdef MALLOC_DEBUGGING char *trace; mcheck(NULL); if (!(trace = getenv("MALLOC_TRACE"))) { MSG( "MALLOC_TRACE not set. No trace generated\n" ); } else { MSG( "malloc trace goes to %s\n", trace ); mtrace(); } #endif setbuf(stdout,NULL); setbuf(stderr,NULL); setlocale(LC_CTYPE,""); gettimeofday( &tv, NULL); MSG_WineStartTicks = (tv.tv_sec * 1000) + (tv.tv_usec / 1000); MAIN_ParseOptions(argc, argv); #ifndef X_DISPLAY_MISSING USER_Driver = &X11DRV_USER_Driver; #else /* !defined(X_DISPLAY_MISSING) */ USER_Driver = &TTYDRV_USER_Driver; #endif /* !defined(X_DISPLAY_MISSING) */ USER_Driver->pInitialize(); MONITOR_Initialize(&MONITOR_PrimaryMonitor); if (Options.dllFlags) BUILTIN32_ParseDLLOptions( Options.dllFlags ); /* if (__winelib && errors ) print_error_message_like_misc_main(); */ atexit(called_at_exit); return TRUE; } /*********************************************************************** * MessageBeep16 (USER.104) */ void WINAPI MessageBeep16( UINT16 i ) { MessageBeep( i ); } /*********************************************************************** * MessageBeep32 (USER32.390) */ BOOL WINAPI MessageBeep( UINT i ) { KEYBOARD_Beep(); return TRUE; } /*********************************************************************** * Beep (KERNEL32.11) */ BOOL WINAPI Beep( DWORD dwFreq, DWORD dwDur ) { /* dwFreq and dwDur are ignored by Win95 */ KEYBOARD_Beep(); return TRUE; } /*********************************************************************** * GetTimerResolution (USER.14) */ LONG WINAPI GetTimerResolution16(void) { return (1000); } /*********************************************************************** * SystemParametersInfo32A (USER32.540) */ BOOL WINAPI SystemParametersInfoA( UINT uAction, UINT uParam, LPVOID lpvParam, UINT fuWinIni ) { int timeout; switch (uAction) { case SPI_GETBEEP: *(BOOL *) lpvParam = KEYBOARD_GetBeepActive(); break; case SPI_SETBEEP: KEYBOARD_SetBeepActive(uParam); break; case SPI_GETBORDER: *(INT *)lpvParam = GetSystemMetrics( SM_CXFRAME ); break; case SPI_GETDRAGFULLWINDOWS: *(BOOL *) lpvParam = FALSE; break; case SPI_SETDRAGFULLWINDOWS: break; case SPI_GETFASTTASKSWITCH: if ( GetProfileIntA( "windows", "CoolSwitch", 1 ) == 1 ) *(BOOL *) lpvParam = TRUE; else *(BOOL *) lpvParam = FALSE; break; case SPI_GETGRIDGRANULARITY: *(INT*)lpvParam=GetProfileIntA("desktop","GridGranularity",1); break; case SPI_GETICONTITLEWRAP: *(BOOL*)lpvParam=GetProfileIntA("desktop","IconTitleWrap",TRUE); break; case SPI_GETKEYBOARDDELAY: *(INT*)lpvParam=GetProfileIntA("keyboard","KeyboardDelay",1); break; case SPI_GETKEYBOARDSPEED: *(DWORD*)lpvParam=GetProfileIntA("keyboard","KeyboardSpeed",30); break; case SPI_GETMENUDROPALIGNMENT: *(BOOL*)lpvParam=GetSystemMetrics(SM_MENUDROPALIGNMENT); /* XXX check this */ break; case SPI_GETSCREENSAVEACTIVE: if(MONITOR_GetScreenSaveActive(&MONITOR_PrimaryMonitor) || GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1) *(BOOL*)lpvParam = TRUE; else *(BOOL*)lpvParam = FALSE; break; case SPI_GETSCREENSAVETIMEOUT: timeout = MONITOR_GetScreenSaveTimeout(&MONITOR_PrimaryMonitor); if(!timeout) timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 ); *(INT *) lpvParam = timeout * 1000; break; case SPI_ICONHORIZONTALSPACING: /* FIXME Get/SetProfileInt */ if (lpvParam == NULL) /*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ; else *(INT*)lpvParam=GetSystemMetrics(SM_CXICONSPACING); break; case SPI_ICONVERTICALSPACING: /* FIXME Get/SetProfileInt */ if (lpvParam == NULL) /*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ; else *(INT*)lpvParam=GetSystemMetrics(SM_CYICONSPACING); break; case SPI_GETICONTITLELOGFONT: { LPLOGFONTA lpLogFont = (LPLOGFONTA)lpvParam; /* from now on we always have an alias for MS Sans Serif */ GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", lpLogFont->lfFaceName, LF_FACESIZE ); lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8); lpLogFont->lfWidth = 0; lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; lpLogFont->lfWeight = FW_NORMAL; lpLogFont->lfItalic = FALSE; lpLogFont->lfStrikeOut = FALSE; lpLogFont->lfUnderline = FALSE; lpLogFont->lfCharSet = ANSI_CHARSET; lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; break; } case SPI_GETWORKAREA: SetRect( (RECT *)lpvParam, 0, 0, GetSystemMetrics( SM_CXSCREEN ), GetSystemMetrics( SM_CYSCREEN ) ); break; case SPI_GETNONCLIENTMETRICS: #define lpnm ((LPNONCLIENTMETRICSA)lpvParam) if( lpnm->cbSize == sizeof(NONCLIENTMETRICSA) ) { /* FIXME: initialize geometry entries */ SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0); lpnm->lfCaptionFont.lfWeight = FW_BOLD; SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0); SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMenuFont),0); SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfStatusFont),0); SystemParametersInfoA(SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMessageFont),0); } #undef lpnm break; case SPI_GETANIMATION: { LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam; /* Tell it "disabled" */ lpAnimInfo->cbSize = sizeof(ANIMATIONINFO); uParam = sizeof(ANIMATIONINFO); lpAnimInfo->iMinAnimate = 0; /* Minimise and restore animation is disabled (nonzero == enabled) */ break; } case SPI_SETANIMATION: { LPANIMATIONINFO lpAnimInfo = (LPANIMATIONINFO)lpvParam; /* Do nothing */ WARN(system, "SPI_SETANIMATION ignored.\n"); lpAnimInfo->cbSize = sizeof(ANIMATIONINFO); uParam = sizeof(ANIMATIONINFO); break; } case SPI_GETHIGHCONTRAST: { LPHIGHCONTRASTA lpHighContrastA = (LPHIGHCONTRASTA)lpvParam; FIXME(system,"SPI_GETHIGHCONTRAST not fully implemented\n"); if ( lpHighContrastA->cbSize == sizeof( HIGHCONTRASTA ) ) { /* Indicate that there is no high contrast available */ lpHighContrastA->dwFlags = 0; lpHighContrastA->lpszDefaultScheme = NULL; } else { return FALSE; } break; } default: return SystemParametersInfo16(uAction,uParam,lpvParam,fuWinIni); } return TRUE; } /*********************************************************************** * SystemParametersInfo16 (USER.483) */ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam, LPVOID lpvParam, UINT16 fuWinIni ) { int timeout; char buffer[256]; switch (uAction) { case SPI_GETBEEP: *(BOOL *) lpvParam = KEYBOARD_GetBeepActive(); break; case SPI_GETBORDER: *(INT16 *)lpvParam = GetSystemMetrics16( SM_CXFRAME ); break; case SPI_GETFASTTASKSWITCH: if ( GetProfileIntA( "windows", "CoolSwitch", 1 ) == 1 ) *(BOOL16 *) lpvParam = TRUE; else *(BOOL16 *) lpvParam = FALSE; break; case SPI_GETGRIDGRANULARITY: *(INT16 *) lpvParam = GetProfileIntA( "desktop", "GridGranularity", 1 ); break; case SPI_GETICONTITLEWRAP: *(BOOL16 *) lpvParam = GetProfileIntA( "desktop", "IconTitleWrap", TRUE ); break; case SPI_GETKEYBOARDDELAY: *(INT16 *) lpvParam = GetProfileIntA( "keyboard", "KeyboardDelay", 1 ); break; case SPI_GETKEYBOARDSPEED: *(WORD *) lpvParam = GetProfileIntA( "keyboard", "KeyboardSpeed", 30 ); break; case SPI_GETMENUDROPALIGNMENT: *(BOOL16 *) lpvParam = GetSystemMetrics16( SM_MENUDROPALIGNMENT ); /* XXX check this */ break; case SPI_GETSCREENSAVEACTIVE: if(MONITOR_GetScreenSaveActive(&MONITOR_PrimaryMonitor) || GetProfileIntA( "windows", "ScreenSaveActive", 1 ) == 1) *(BOOL16 *) lpvParam = TRUE; else *(BOOL16 *) lpvParam = FALSE; break; case SPI_GETSCREENSAVETIMEOUT: timeout = MONITOR_GetScreenSaveTimeout(&MONITOR_PrimaryMonitor); if(!timeout) timeout = GetProfileIntA( "windows", "ScreenSaveTimeout", 300 ); *(INT16 *) lpvParam = timeout; break; case SPI_ICONHORIZONTALSPACING: /* FIXME Get/SetProfileInt */ if (lpvParam == NULL) /*SetSystemMetrics( SM_CXICONSPACING, uParam )*/ ; else *(INT16 *)lpvParam = GetSystemMetrics16( SM_CXICONSPACING ); break; case SPI_ICONVERTICALSPACING: /* FIXME Get/SetProfileInt */ if (lpvParam == NULL) /*SetSystemMetrics( SM_CYICONSPACING, uParam )*/ ; else *(INT16 *)lpvParam = GetSystemMetrics16(SM_CYICONSPACING); break; case SPI_SETBEEP: KEYBOARD_SetBeepActive(uParam); break; case SPI_SETSCREENSAVEACTIVE: MONITOR_SetScreenSaveActive(&MONITOR_PrimaryMonitor, uParam); break; case SPI_SETSCREENSAVETIMEOUT: MONITOR_SetScreenSaveTimeout(&MONITOR_PrimaryMonitor, uParam); break; case SPI_SETDESKWALLPAPER: return (SetDeskWallPaper((LPSTR) lpvParam)); break; case SPI_SETDESKPATTERN: if ((INT16)uParam == -1) { GetProfileStringA("Desktop", "Pattern", "170 85 170 85 170 85 170 85", buffer, sizeof(buffer) ); return (DESKTOP_SetPattern((LPSTR) buffer)); } else return (DESKTOP_SetPattern((LPSTR) lpvParam)); break; case SPI_GETICONTITLELOGFONT: { LPLOGFONT16 lpLogFont = (LPLOGFONT16)lpvParam; GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", lpLogFont->lfFaceName, LF_FACESIZE ); lpLogFont->lfHeight = -GetProfileIntA("Desktop","IconTitleSize", 8); lpLogFont->lfWidth = 0; lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; lpLogFont->lfWeight = FW_NORMAL; lpLogFont->lfItalic = FALSE; lpLogFont->lfStrikeOut = FALSE; lpLogFont->lfUnderline = FALSE; lpLogFont->lfCharSet = ANSI_CHARSET; lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; break; } case SPI_GETNONCLIENTMETRICS: #define lpnm ((LPNONCLIENTMETRICS16)lpvParam) if( lpnm->cbSize == sizeof(NONCLIENTMETRICS16) ) { /* FIXME: initialize geometry entries */ SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfCaptionFont),0); lpnm->lfCaptionFont.lfWeight = FW_BOLD; SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfSmCaptionFont),0); SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMenuFont),0); SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfStatusFont),0); SystemParametersInfo16( SPI_GETICONTITLELOGFONT, 0, (LPVOID)&(lpnm->lfMessageFont),0); } else /* winfile 95 sets sbSize to 340 */ SystemParametersInfoA( uAction, uParam, lpvParam, fuWinIni ); #undef lpnm break; case SPI_LANGDRIVER: case SPI_SETBORDER: case SPI_SETDOUBLECLKHEIGHT: case SPI_SETDOUBLECLICKTIME: case SPI_SETDOUBLECLKWIDTH: case SPI_SETFASTTASKSWITCH: case SPI_SETKEYBOARDDELAY: case SPI_SETKEYBOARDSPEED: WARN(system, "Option %d ignored.\n", uAction); break; case SPI_GETWORKAREA: SetRect16( (RECT16 *)lpvParam, 0, 0, GetSystemMetrics16( SM_CXSCREEN ), GetSystemMetrics16( SM_CYSCREEN ) ); break; default: WARN(system, "Unknown option %d.\n", uAction); break; } return 1; } /*********************************************************************** * SystemParametersInfo32W (USER32.541) */ BOOL WINAPI SystemParametersInfoW( UINT uAction, UINT uParam, LPVOID lpvParam, UINT fuWinIni ) { char buffer[256]; switch (uAction) { case SPI_SETDESKWALLPAPER: if (lpvParam) { lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer)); return SetDeskWallPaper(buffer); } return SetDeskWallPaper(NULL); case SPI_SETDESKPATTERN: if ((INT) uParam == -1) { GetProfileStringA("Desktop", "Pattern", "170 85 170 85 170 85 170 85", buffer, sizeof(buffer) ); return (DESKTOP_SetPattern((LPSTR) buffer)); } if (lpvParam) { lstrcpynWtoA(buffer,(LPWSTR)lpvParam,sizeof(buffer)); return DESKTOP_SetPattern(buffer); } return DESKTOP_SetPattern(NULL); case SPI_GETICONTITLELOGFONT: { LPLOGFONTW lpLogFont = (LPLOGFONTW)lpvParam; GetProfileStringA("Desktop", "IconTitleFaceName", "MS Sans Serif", buffer, sizeof(buffer) ); lstrcpynAtoW(lpLogFont->lfFaceName, buffer ,LF_FACESIZE); lpLogFont->lfHeight = 10; lpLogFont->lfWidth = 0; lpLogFont->lfEscapement = lpLogFont->lfOrientation = 0; lpLogFont->lfWeight = FW_NORMAL; lpLogFont->lfItalic = lpLogFont->lfStrikeOut = lpLogFont->lfUnderline = FALSE; lpLogFont->lfCharSet = ANSI_CHARSET; lpLogFont->lfOutPrecision = OUT_DEFAULT_PRECIS; lpLogFont->lfClipPrecision = CLIP_DEFAULT_PRECIS; lpLogFont->lfPitchAndFamily = DEFAULT_PITCH | FF_SWISS; } break; case SPI_GETNONCLIENTMETRICS: { /* FIXME: implement correctly */ LPNONCLIENTMETRICSW lpnm=(LPNONCLIENTMETRICSW)lpvParam; SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfCaptionFont),0); lpnm->lfCaptionFont.lfWeight = FW_BOLD; SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfSmCaptionFont),0); SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMenuFont),0); SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfStatusFont),0); SystemParametersInfoW(SPI_GETICONTITLELOGFONT,0,(LPVOID)&(lpnm->lfMessageFont),0); break; } case SPI_GETHIGHCONTRAST: { LPHIGHCONTRASTW lpHighContrastW = (LPHIGHCONTRASTW)lpvParam; FIXME(system,"SPI_GETHIGHCONTRAST not fully implemented\n"); if ( lpHighContrastW->cbSize == sizeof( HIGHCONTRASTW ) ) { /* Indicate that there is no high contrast available */ lpHighContrastW->dwFlags = 0; lpHighContrastW->lpszDefaultScheme = NULL; } else { return FALSE; } break; } default: return SystemParametersInfoA(uAction,uParam,lpvParam,fuWinIni); } return TRUE; } /*********************************************************************** * FileCDR (KERNEL.130) */ FARPROC16 WINAPI FileCDR16(FARPROC16 x) { FIXME(file,"(0x%8x): stub\n", (int) x); return (FARPROC16)TRUE; }