mirror of
https://github.com/reactos/wine.git
synced 2024-12-12 22:05:55 +00:00
2197901989
Sun Mar 2 14:57:37 1997 Alexandre Julliard <julliard@lrc.epfl.ch> * [*/*] Completed transition to new Win32 types. * [tools/build.c] Changed CallTo16_regs to take a CONTEXT argument. * [memory/virtual.c] Rewrote Virtual* functions. Implemented CreateFileMapping and OpenFileMapping. Broke MapViewOfFile ;-) * [win32/k32obj.c] Implemented named objects. Sun Mar 2 00:33:21 1997 Mikolaj Zalewski <zmikolaj@free.polbox.pl> * [misc/ole2nls.c] [resources/sysres_Pl.c] Added Polish language support. Sat Mar 1 13:31:25 1997 David Faure <david.faure@ifhamy.insa-lyon.fr> * [windows/keyboard.c] Wrote VkKeyScan and tested with Winword. Works ok except for dead chars. Fri Feb 28 09:34:03 1997 John Harvey <john@division.co.uk> * [graphics/win16drv/font.c] [graphics/win16drv/init.c] [graphics/win16drv/obects.c] Added start of SelectObject call for printer driver. Write should now run with the printer driver enabled. Wed Feb 26 20:03:32 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de> * [debugger/*.c] Re-added a disassembly command (list serves another functionality now). * [loader/pe_resource.c] Added # support. * [misc/ole2nls.c] GetStringType* added. * [objects/color.c] VGA16 fixes. * [windows/class.c] Look for global widget classes too in GetClassInfo32. * [windows/sysmetrics.c] [include/windows.h] Added Win32 sysmetrics. Sat Feb 22 23:56:29 1997 Jukka Iivonen <iivonen@cc.helsinki.fi> * [documentation/languages] The fourth case updated. * [if1632/ntdll.spec] Added some is* and to* functions. Sat Feb 22 23:05:47 1997 Morten Welinder <terra@diku.dk> * [configure.in] Add tests for wait4 and waitpid. * [loader/signal.c] Clean up OS-dependent code. I hope I got it right, :-) * [tools/wineconf] Recognise vfat file systems. Ignore floppy drives specified in /etc/fstab. * [files/*] Fix function names in error messages. Sat Feb 22 06:15:13 1997 Pablo Saratxaga <srtxg@chanae.stben.be> * [windows/keyboard.c] [windows/message.c] Support for more latin alphabet dead keys for iso-8859-{1,2,3,4,9} characters sets. Fri Feb 21 20:37:50 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk> * [controls/edit.c] Fix incorrect arg order in LOCAL_Alloc() call. Fri Feb 21 18:19:17 1997 Andrew Taylor <andrew@riscan.com> * [multimedia/mmsystem.c] [multimedia/mcistring.c] Fixed bug related to device IDs returned by multimedia system. Implemented mciGetDeviceID. Sat Feb 15 00:58:19 1997 Jimen Ching <jching@aloha.com> * [debugger/dbg.y] Do not dereference invalid expressions.
127 lines
4.3 KiB
C
127 lines
4.3 KiB
C
/*
|
|
* System metrics functions
|
|
*
|
|
* Copyright 1994 Alexandre Julliard
|
|
*
|
|
*/
|
|
|
|
#include <stdio.h>
|
|
#include "gdi.h"
|
|
#include "sysmetrics.h"
|
|
|
|
short sysMetrics[SM_CMETRICS+1];
|
|
|
|
/***********************************************************************
|
|
* SYSMETRICS_Init
|
|
*
|
|
* Initialisation of the system metrics array.
|
|
*/
|
|
void SYSMETRICS_Init(void)
|
|
{
|
|
sysMetrics[SM_CXSCREEN] = screenWidth;
|
|
sysMetrics[SM_CYSCREEN] = screenHeight;
|
|
sysMetrics[SM_CXVSCROLL] = SYSMETRICS_CXVSCROLL;
|
|
sysMetrics[SM_CYHSCROLL] = SYSMETRICS_CYHSCROLL;
|
|
sysMetrics[SM_CYCAPTION] = SYSMETRICS_CYCAPTION;
|
|
sysMetrics[SM_CXBORDER] = SYSMETRICS_CXBORDER;
|
|
sysMetrics[SM_CYBORDER] = SYSMETRICS_CYBORDER;
|
|
sysMetrics[SM_CXDLGFRAME] = SYSMETRICS_CXDLGFRAME;
|
|
sysMetrics[SM_CYDLGFRAME] = SYSMETRICS_CYDLGFRAME;
|
|
sysMetrics[SM_CYVTHUMB] = SYSMETRICS_CYVTHUMB;
|
|
sysMetrics[SM_CXHTHUMB] = SYSMETRICS_CXHTHUMB;
|
|
sysMetrics[SM_CXICON] = SYSMETRICS_CXICON;
|
|
sysMetrics[SM_CYICON] = SYSMETRICS_CYICON;
|
|
sysMetrics[SM_CXCURSOR] = SYSMETRICS_CXCURSOR;
|
|
sysMetrics[SM_CYCURSOR] = SYSMETRICS_CYCURSOR;
|
|
sysMetrics[SM_CYMENU] = SYSMETRICS_CYMENU;
|
|
sysMetrics[SM_CXFULLSCREEN] = sysMetrics[SM_CXSCREEN];
|
|
sysMetrics[SM_CYFULLSCREEN] = sysMetrics[SM_CYSCREEN] - sysMetrics[SM_CYCAPTION];
|
|
sysMetrics[SM_CYKANJIWINDOW] = 0;
|
|
sysMetrics[SM_MOUSEPRESENT] = 1;
|
|
sysMetrics[SM_CYVSCROLL] = SYSMETRICS_CYVSCROLL;
|
|
sysMetrics[SM_CXHSCROLL] = SYSMETRICS_CXHSCROLL;
|
|
sysMetrics[SM_DEBUG] = 0;
|
|
sysMetrics[SM_SWAPBUTTON] = 0;
|
|
sysMetrics[SM_RESERVED1] = 0;
|
|
sysMetrics[SM_RESERVED2] = 0;
|
|
sysMetrics[SM_RESERVED3] = 0;
|
|
sysMetrics[SM_RESERVED4] = 0;
|
|
sysMetrics[SM_CXMIN] = SYSMETRICS_CXMIN;
|
|
sysMetrics[SM_CYMIN] = SYSMETRICS_CYMIN;
|
|
sysMetrics[SM_CXSIZE] = SYSMETRICS_CXSIZE;
|
|
sysMetrics[SM_CYSIZE] = SYSMETRICS_CYSIZE;
|
|
sysMetrics[SM_CXFRAME] = GetProfileInt32A( "windows", "BorderWidth", 4 );
|
|
sysMetrics[SM_CYFRAME] = sysMetrics[SM_CXFRAME];
|
|
sysMetrics[SM_CXMINTRACK] = SYSMETRICS_CXMINTRACK;
|
|
sysMetrics[SM_CYMINTRACK] = SYSMETRICS_CYMINTRACK;
|
|
sysMetrics[SM_CXDOUBLECLK] = (GetProfileInt32A( "windows","DoubleClickWidth", 4) + 1) & ~1;
|
|
sysMetrics[SM_CYDOUBLECLK] = (GetProfileInt32A( "windows","DoubleClickHeight", 4) + 1) & ~1;
|
|
sysMetrics[SM_CXICONSPACING] = GetProfileInt32A( "desktop","IconSpacing", 75);
|
|
sysMetrics[SM_CYICONSPACING] = GetProfileInt32A( "desktop","IconVerticalSpacing", 72);
|
|
sysMetrics[SM_MENUDROPALIGNMENT] = GetProfileInt32A( "windows","MenuDropAlignment", 0 );
|
|
sysMetrics[SM_PENWINDOWS] = 0;
|
|
sysMetrics[SM_DBCSENABLED] = 0;
|
|
/* Win32 additions */
|
|
sysMetrics[SM_CMOUSEBUTTONS] = 3; /* FIXME: query X on that one */
|
|
sysMetrics[SM_SECURE] = 0;
|
|
sysMetrics[SM_CXEDGE] = SYSMETRICS_CXBORDER;
|
|
sysMetrics[SM_CYEDGE] = SYSMETRICS_CYBORDER;
|
|
sysMetrics[SM_CXMINSPACING] = SYSMETRICS_CYBORDER;
|
|
|
|
/*
|
|
SM_CXEDGE 45
|
|
SM_CYEDGE 46
|
|
SM_CXMINSPACING 47
|
|
SM_CYMINSPACING 48
|
|
SM_CXSMICON 49
|
|
SM_CYSMICON 50
|
|
SM_CYSMCAPTION 51
|
|
SM_CXSMSIZE 52
|
|
SM_CYSMSIZE 53
|
|
SM_CXMENUSIZE 54
|
|
SM_CYMENUSIZE 55
|
|
SM_ARRANGE 56
|
|
SM_CXMINIMIZED 57
|
|
SM_CYMINIMIZED 58
|
|
SM_CXMAXTRACK 59
|
|
SM_CYMAXTRACK 60
|
|
SM_CXMAXIMIZED 61
|
|
SM_CYMAXIMIZED 62
|
|
*/
|
|
sysMetrics[SM_NETWORK] = 1;
|
|
sysMetrics[SM_CLEANBOOT] = 0; /* 0 - ok, 1 - failsafe, 2 - failsafe & net */
|
|
/*
|
|
SM_CXDRAG 68
|
|
SM_CYDRAG 69
|
|
*/
|
|
sysMetrics[SM_SHOWSOUNDS] = 1;
|
|
/*
|
|
SM_CXMENUCHECK 71
|
|
SM_CYMENUCHECK 72
|
|
*/
|
|
sysMetrics[SM_SLOWMACHINE] = 0; /* FIXME: perhaps decide on type of proc */
|
|
sysMetrics[SM_MIDEASTENABLED] = 0; /* FIXME: 1 if enabled */
|
|
sysMetrics[SM_CMETRICS] = SM_CMETRICS;
|
|
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* GetSystemMetrics16 (USER.179)
|
|
*/
|
|
INT16 GetSystemMetrics16( INT16 index )
|
|
{
|
|
if ((index < 0) || (index > SM_CMETRICS)) return 0;
|
|
else return sysMetrics[index];
|
|
}
|
|
|
|
|
|
/***********************************************************************
|
|
* GetSystemMetrics32 (USER32.291)
|
|
*/
|
|
INT32 GetSystemMetrics32( INT32 index )
|
|
{
|
|
if ((index < 0) || (index > SM_CMETRICS)) return 0;
|
|
else return sysMetrics[index];
|
|
}
|