Update SERVERINFO, PFNCLIENT, PFNCLIENTWORKER to Windows 7 version, add OEMBITMAPINFO, DPISERVERINFO, PERUSERSERVERINFO

Add -fms-extensions compilerflag to user32, win32k, csrss, win32csr.

svn path=/trunk/; revision=41652
This commit is contained in:
Timo Kreuzer 2009-06-27 23:33:57 +00:00
parent 8af77479df
commit 36526f9157
12 changed files with 166 additions and 84 deletions

View file

@ -102,7 +102,7 @@ GetSystemMetrics(int nIndex)
GetConnected();
// FIXME("Global Sever Data -> %x\n",g_psi);
if (nIndex < 0 || nIndex >= SM_CMETRICS) return 0;
return g_psi->SystemMetrics[nIndex];
return g_psi->aiSysMet[nIndex];
}

View file

@ -11,7 +11,7 @@
<library>win32ksys</library>
<library>pseh</library>
<library>ntdll</library>
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
<directory name="include">
<pch>user32.h</pch>

View file

@ -63,7 +63,7 @@ GetSysColor(int nIndex)
{
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
{
return g_psi->SysColors[nIndex];
return g_psi->argbSystem[nIndex];
}
SetLastError(ERROR_INVALID_PARAMETER);
@ -93,7 +93,7 @@ GetSysColorBrush(int nIndex)
{
if(nIndex >= 0 && nIndex < NUM_SYSCOLORS)
{
return g_psi->SysColorBrushes[nIndex];
return g_psi->ahbrSystem[nIndex];
}
SetLastError(ERROR_INVALID_PARAMETER);

View file

@ -206,43 +206,51 @@ typedef struct _WINDOW
typedef struct _PFNCLIENT
{
PROC pfnScrollBarC;
PROC pfnDefWndC;
PROC pfnMenuC;
PROC pfnDesktopC;
PROC pfnDefWnd1C;
PROC pfnDefWnd2C;
PROC pfnDefWnd3C;
PROC pfnButtomC;
PROC pfnComboBoxC;
PROC pfnComboListBoxC;
PROC pfnDefDlgC;
PROC pfnEditC;
PROC pfnListBoxC;
PROC pfnMDIClientC;
PROC pfnStaticC;
PROC pfnImeC;
PROC pfnHkINLPCWPSTRUCT;
PROC pfnHkINLPCWPRETSTRUCT;
PROC pfnDispatchHookC;
PROC pfnDispatchDefC;
WNDPROC pfnScrollBarWndProc;
WNDPROC pfnTitleWndProc;
WNDPROC pfnMenuWndProc;
WNDPROC pfnDesktopWndProc;
WNDPROC pfnDefWindowProc;
WNDPROC pfnMessageWindowProc;
WNDPROC pfnSwitchWindowProc;
WNDPROC pfnButtonWndProc;
WNDPROC pfnComboBoxWndProc;
WNDPROC pfnComboListBoxProc;
WNDPROC pfnDialogWndProc;
WNDPROC pfnEditWndProc;
WNDPROC pfnListBoxWndProc;
WNDPROC pfnMDIClientWndProc;
WNDPROC pfnStaticWndProc;
WNDPROC pfnImeWndProc;
WNDPROC pfnGhostWndProc;
WNDPROC pfnHkINLPCWPSTRUCT;
WNDPROC pfnHkINLPCWPRETSTRUCT;
WNDPROC pfnDispatchHook;
WNDPROC pfnDispatchDefWindowProc;
WNDPROC pfnDispatchMessage;
WNDPROC pfnMDIActivateDlgProc;
} PFNCLIENT, *PPFNCLIENT;
typedef struct _PFNCLIENTWORKER
{
PROC pfnButtonCW;
PROC pfnComboBoxCW;
PROC pfnComboListBoxCW;
PROC pfnDefDlgCW;
PROC pfnEditCW;
PROC pfnListBoxCW;
PROC pfnMDIClientCW;
PROC pfnStaticCW;
PROC pfnImeCW;
WNDPROC pfnButtonWndProc;
WNDPROC pfnComboBoxWndProc;
WNDPROC pfnComboListBoxProc;
WNDPROC pfnDialogWndProc;
WNDPROC pfnEditWndProc;
WNDPROC pfnListBoxWndProc;
WNDPROC pfnMDIClientWndProc;
WNDPROC pfnStaticWndProc;
WNDPROC pfnImeWndProc;
WNDPROC pfnGhostWndProc;
WNDPROC pfnCtfHookProc;
} PFNCLIENTWORKER, *PPFNCLIENTWORKER;
struct _WND;
typedef LONG_PTR (NTAPI *PFN_FNID)(struct _WND*, UINT, WPARAM, LPARAM, ULONG_PTR);
// FNID's for NtUserSetWindowFNID, NtUserMessageCall
#define FNID_FIRST 0x029A
#define FNID_SCROLLBAR 0x029A
#define FNID_ICONTITLE 0x029B
#define FNID_MENU 0x029C
@ -269,8 +277,10 @@ typedef struct _PFNCLIENTWORKER
#define FNID_UNKNOWN 0x02B6
#define FNID_SENDNOTIFYMESSAGE 0x02B7
#define FNID_SENDMESSAGECALLBACK 0x02B8
#define FNID_LAST 0x02B9
#define FNID_NUM FNID_LAST - FNID_FIRST + 1
#define FNID_DDEML 0x2000 // Registers DDEML
#define FNID_DESTROY 0x4000 // This is sent when WM_NCDESTROY or in the support routine.
// Seen during WM_CREATE on error exit too.
@ -302,37 +312,106 @@ typedef struct _PFNCLIENTWORKER
#define ICLS_NOTUSED 23
#define ICLS_END 31
#define COLOR_LAST COLOR_MENUBAR
#define MAX_MB_STRINGS 11
#define SRVINFO_METRICS 0x0020
typedef struct _SERVERINFO
typedef struct tagOEMBITMAPINFO
{
DWORD SRVINFO_Flags;
DWORD SystemMetrics[SM_CMETRICS]; // System Metrics
COLORREF SysColors[COLOR_MENUBAR+1]; // GetSysColor
HBRUSH SysColorBrushes[COLOR_MENUBAR+1]; // GetSysColorBrush
HPEN SysColorPens[COLOR_MENUBAR+1]; // ReactOS exclusive
HBRUSH hbrGray;
POINTL ptCursor;
//
DWORD cxSysFontChar;
DWORD cySysFontChar;
DWORD cxMsgFontChar;
DWORD cyMsgFontChar;
TEXTMETRICW tmSysFont;
//
RECTL rcScreen;
WORD BitCount;
WORD dmLogPixels;
BYTE BitsPixel;
BYTE Planes;
WORD reserved;
DWORD PUSIFlags; // PERUSERSERVERINFO Flags.
ULONG uCaretWidth;
LANGID UILangID;
UINT LastRITWasKeyboard : 1;
UINT bKeyboardPref : 1;
DWORD TimeTick;
DWORD SrvEventActivity;
INT x;
INT y;
INT cx;
INT cy;
} OEMBITMAPINFO, *POEMBITMAPINFO;
typedef struct tagMBSTRING
{
WCHAR szName[15];
UINT uID;
UINT uStr;
} MBSTRING, *PMBSTRING;
typedef struct tagDPISERVERINFO
{
INT gclBorder; /* 000 */
HFONT hCaptionFont; /* 004 */
HFONT hMsgFont; /* 008 */
INT cxMsgFontChar; /* 00C */
INT cyMsgFontChar; /* 010 */
UINT wMaxBtnSize; /* 014 */
} DPISERVERINFO, *PDPISERVERINFO;
typedef struct _PERUSERSERVERINFO
{
INT aiSysMet[SM_CMETRICS];
ULONG argbSystemUnmatched[COLOR_LAST+1];
COLORREF argbSystem[COLOR_LAST+1];
HBRUSH ahbrSystem[COLOR_LAST+1];
HBRUSH hbrGray;
POINT ptCursor;
POINT ptCursorReal;
DWORD dwLastRITEventTickCount;
INT nEvents;
UINT dtScroll;
UINT dtLBSearch;
UINT dtCaretBlink;
UINT ucWheelScrollLines;
UINT ucWheelScrollChars;
INT wMaxLeftOverlapChars;
INT wMaxRightOverlapChars;
INT cxSysFontChar;
INT cySysFontChar;
TEXTMETRICW tmSysFont;
DPISERVERINFO dpiSystem;
HICON hIconSmWindows;
HICON hIcoWindows;
DWORD dwKeyCache;
DWORD dwAsyncKeyCache;
ULONG cCaptures;
OEMBITMAPINFO oembmi[93];
RECT rcScreenReal;
USHORT BitCount;
USHORT dmLogPixels;
BYTE Planes;
BYTE BitsPixel;
ULONG PUSIFlags;
UINT uCaretWidth;
USHORT UILangID;
DWORD dwLastSystemRITEventTickCountUpdate;
ULONG adwDBGTAGFlags[35];
DWORD dwTagCount;
DWORD dwRIPFlags;
} PERUSERSERVERINFO, *PPERUSERSERVERINFO;
typedef struct tagSERVERINFO
{
DWORD dwSRVIFlags;
ULONG_PTR cHandleEntries;
PFN_FNID mpFnidPfn[FNID_NUM];
// WNDPROC aStoCidPfn[7];
// USHORT mpFnid_serverCBWndProc[31];
PFNCLIENT apfnClientA;
PFNCLIENT apfnClientW;
PFNCLIENTWORKER apfnClientWorker;
ULONG cbHandleTable;
ATOM atomSysClass[ICLS_NOTUSED+1];
DWORD dwDefaultHeapBase;
DWORD dwDefaultHeapSize;
UINT uiShellMsg;
MBSTRING MBStrings[MAX_MB_STRINGS];
ATOM atomIconSmProp;
ATOM atomIconProp;
ATOM atomContextHelpIdProp;
ATOM atomFrostedWindowProp;
CHAR acOemToAnsi[256];
CHAR acAnsiToOem[256];
DWORD dwInstalledEventHooks;
PERUSERSERVERINFO;
///////////////////////////////
/* Reactos specific fields */
DWORD SrvEventActivity;
HPEN SysColorPens[COLOR_MENUBAR+1];
} SERVERINFO, *PSERVERINFO;
#define CTI_INSENDMESSAGE 0x0002
@ -407,7 +486,7 @@ typedef struct _CLIENTINFO
MSG msgDbcsCB;
ULONG Win32ClientInfo3[28];
/* It's just a pointer reference not to be used w the structure in user space. */
PPROCESSINFO ppi;
PPROCESSINFO ppi;
} CLIENTINFO, *PCLIENTINFO;
/* Make sure it fits exactly into the TEB */
@ -444,7 +523,7 @@ typedef struct _BROADCASTPARM
DWORD recipients;
HDESK hDesk;
HWND hWnd;
LUID luid;
LUID luid;
} BROADCASTPARM, *PBROADCASTPARM;
PW32THREADINFO GetW32ThreadInfo(VOID);
@ -1774,7 +1853,7 @@ NtUserInitialize(
NTSTATUS
NTAPI
NtUserInitializeClientPfnArrays(
PPFNCLIENT pfnClientA,
PPFNCLIENT pfnClientA,
PPFNCLIENT pfnClientW,
PPFNCLIENTWORKER pfnClientWorker,
HINSTANCE hmodUser);

View file

@ -6,6 +6,7 @@
<include base="csrss">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<library>nt</library>
<library>ntdll</library>
<library>smdll</library>

View file

@ -7,6 +7,7 @@
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
<include base="console">.</include>
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<library>ntdll</library>
<library>kernel32</library>
<library>user32</library>

View file

@ -45,7 +45,7 @@ InitMetrics(VOID)
CurInfo = NULL;
}
piSysMet = (INT*)gpsi->SystemMetrics;
piSysMet = gpsi->aiSysMet;
/* Screen sizes */
piSysMet[SM_CXSCREEN] = Width;
@ -172,7 +172,7 @@ InitMetrics(VOID)
piSysMet[90] = 0;
#endif
gpsi->SRVINFO_Flags |= SRVINFO_METRICS;
gpsi->dwSRVIFlags |= SRVINFO_METRICS;
Setup = TRUE;
if (NT_SUCCESS(Status))
@ -193,7 +193,7 @@ UserGetSystemMetrics(ULONG Index)
/* Get metrics from array */
if (Index < SM_CMETRICS)
{
return gpsi->SystemMetrics[Index];
return gpsi->aiSysMet[Index];
}
/* Handle special values */

View file

@ -232,7 +232,7 @@ NtUserCallOneParam(
Result = gspv.bMouseBtnSwap;
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
gpsi->SystemMetrics[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
RETURN(Result);
}

View file

@ -857,8 +857,8 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
/* Verify the new values */
if (rcWorkArea.left < 0 ||
rcWorkArea.top < 0 ||
rcWorkArea.right > gpsi->SystemMetrics[SM_CXSCREEN] ||
rcWorkArea.bottom > gpsi->SystemMetrics[SM_CYSCREEN] ||
rcWorkArea.right > gpsi->aiSysMet[SM_CXSCREEN] ||
rcWorkArea.bottom > gpsi->aiSysMet[SM_CYSCREEN] ||
rcWorkArea.right <= rcWorkArea.left ||
rcWorkArea.bottom <= rcWorkArea.top)
return 0;

View file

@ -322,7 +322,7 @@ co_IntInitializeDesktopGraphics(VOID)
gpsi->BitCount = gpsi->Planes * gpsi->BitsPixel;
gpsi->dmLogPixels = NtGdiGetDeviceCaps(ScreenDeviceContext, LOGPIXELSY);
// Font is realized and this dc was previously set to internal DC_ATTR.
gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw, &gpsi->cySysFontChar);
gpsi->cxSysFontChar = IntGetCharDimensions(hSystemBM, &tmw, (DWORD*)&gpsi->cySysFontChar);
gpsi->tmSysFont = tmw;
return TRUE;

View file

@ -28,7 +28,7 @@
#include <debug.h>
static COLORREF SysColors[] =
static const COLORREF SysColors[] =
{
RGB(212, 208, 200), /* COLOR_SCROLLBAR */
RGB(58, 110, 165), /* COLOR_BACKGROUND */
@ -221,8 +221,8 @@ IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors)
{
if((UINT)(*Elements) < NUM_SYSCOLORS)
{
gpsi->SysColors[*Elements] = *Colors;
IntGdiSetSolidBrushColor(gpsi->SysColorBrushes[*Elements], *Colors);
gpsi->argbSystem[*Elements] = *Colors;
IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
}
Elements++;
@ -246,7 +246,7 @@ IntGetSysColorBrushes(HBRUSH *pahBrushes, UINT nBrushes)
for(i = 0; i < nBrushes; i++)
{
pahBrushes[i] = gpsi->SysColorBrushes[i];
pahBrushes[i] = gpsi->ahbrSystem[i];
}
return nBrushes > 0;
@ -255,7 +255,7 @@ IntGetSysColorBrushes(HBRUSH *pahBrushes, UINT nBrushes)
HGDIOBJ FASTCALL
IntGetSysColorBrush(INT Object)
{
return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL : gpsi->SysColorBrushes[Object];
return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL : gpsi->ahbrSystem[Object];
}
BOOL FASTCALL
@ -293,7 +293,7 @@ IntGetSysColors(COLORREF *Colors, UINT nColors)
return FALSE;
}
col = &gpsi->SysColors[0];
col = &gpsi->argbSystem[0];
for(i = 0; i < nColors; i++)
{
*(Colors++) = *(col++);
@ -305,7 +305,7 @@ IntGetSysColors(COLORREF *Colors, UINT nColors)
DWORD FASTCALL
IntGetSysColor(INT nIndex)
{
return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->SysColors[nIndex];
return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->argbSystem[nIndex];
}
VOID FASTCALL
@ -316,18 +316,18 @@ CreateSysColorObjects(VOID)
for(i = 0; i < NUM_SYSCOLORS; i++)
{
gpsi->SysColors[i] = SysColors[i];
gpsi->argbSystem[i] = SysColors[i];
}
/* Create the syscolor brushes */
for(i = 0; i < NUM_SYSCOLORS; i++)
{
if(gpsi->SysColorBrushes[i] == NULL)
if(gpsi->ahbrSystem[i] == NULL)
{
gpsi->SysColorBrushes[i] = IntGdiCreateSolidBrush(SysColors[i]);
if(gpsi->SysColorBrushes[i] != NULL)
gpsi->ahbrSystem[i] = IntGdiCreateSolidBrush(SysColors[i]);
if(gpsi->ahbrSystem[i] != NULL)
{
GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->SysColorBrushes[i]);
GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->ahbrSystem[i]);
}
}
}

View file

@ -9,6 +9,7 @@
<include base="freetype">include</include>
<include base="ReactOS">include/reactos/subsys</include>
<include base="ReactOS">include/reactos/drivers</include>
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
<define name="LANGPACK" />
<define name="_WIN32K_" />
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269