Author: tkreuzer
Date: Mon Jun 29 07:36:31 2009
New Revision: 41679
URL:
http://svn.reactos.org/svn/reactos?rev=41679&view=rev
Log:
- Remove ntuser syscolor functions from win32k (NtUserCallTwoParam)
- Remove syscolor pen support from win32k
- use gpsi->dwInstalledEventHooks instead of gpsi->SrvEventActivity
- remove reactos specific fields from SERVERINFO
Modified:
trunk/reactos/include/reactos/win32k/ntuser.h
trunk/reactos/subsystems/win32/win32k/include/intgdi.h
trunk/reactos/subsystems/win32/win32k/ntuser/event.c
trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
Modified: trunk/reactos/include/reactos/win32k/ntuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
==============================================================================
--- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Mon Jun 29 07:36:31 2009
@@ -408,10 +408,6 @@
CHAR acAnsiToOem[256];
DWORD dwInstalledEventHooks;
PERUSERSERVERINFO;
-///////////////////////////////
- /* Reactos specific fields */
- DWORD SrvEventActivity;
- HPEN SysColorPens[COLOR_MENUBAR+1];
} SERVERINFO, *PSERVERINFO;
#define CTI_INSENDMESSAGE 0x0002
@@ -2863,9 +2859,6 @@
#define TWOPARAM_ROUTINE_SETCARETPOS 0xfffd0060
#define TWOPARAM_ROUTINE_GETWINDOWINFO 0xfffd0061
#define TWOPARAM_ROUTINE_REGISTERLOGONPROC 0xfffd0062
-#define TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES 0xfffd0063
-#define TWOPARAM_ROUTINE_GETSYSCOLORPENS 0xfffd0064
-#define TWOPARAM_ROUTINE_GETSYSCOLORS 0xfffd0065
#define TWOPARAM_ROUTINE_ROS_ISACTIVEICON 0x1001
#define TWOPARAM_ROUTINE_ROS_NCDESTROY 0x1002
#define TWOPARAM_ROUTINE_ROS_REGSYSCLASSES 0x1003
Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] Mon Jun 29
07:36:31 2009
@@ -154,17 +154,8 @@
BOOL FASTCALL
IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors);
-BOOL FASTCALL
-IntGetSysColorBrushes(HBRUSH *Brushes, UINT nBrushes);
-
HGDIOBJ FASTCALL
IntGetSysColorBrush(INT Object);
-
-BOOL FASTCALL
-IntGetSysColorPens(HPEN *Pens, UINT nPens);
-
-BOOL FASTCALL
-IntGetSysColors(COLORREF *Colors, UINT nColors);
DWORD FASTCALL
IntGetSysColor(INT nIndex);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/event.c [iso-8859-1] Mon Jun 29 07:36:31
2009
@@ -62,28 +62,28 @@
(event >= EVENT_CONSOLE_CARET && event <=
EVENT_CONSOLE_END_APPLICATION) ||
(event >= EVENT_OBJECT_CREATE && event <=
EVENT_OBJECT_ACCELERATORCHANGE))
{
- gpsi->SrvEventActivity |= GetMaskFromEvent(event);
+ gpsi->dwInstalledEventHooks |= GetMaskFromEvent(event);
}
if (event > EVENT_SYSTEM_MINIMIZEEND && event < EVENT_CONSOLE_CARET)
{
event = EVENT_CONSOLE_CARET-1;
- gpsi->SrvEventActivity |= GetMaskFromEvent(event);
+ gpsi->dwInstalledEventHooks |= GetMaskFromEvent(event);
}
if (event > EVENT_CONSOLE_END_APPLICATION && event <
EVENT_OBJECT_CREATE )
{
event = EVENT_OBJECT_CREATE-1;
- gpsi->SrvEventActivity |= GetMaskFromEvent(event);
+ gpsi->dwInstalledEventHooks |= GetMaskFromEvent(event);
}
if (event > EVENT_OBJECT_ACCELERATORCHANGE && event < EVENT_MAX)
{
event = EVENT_MAX-1;
- gpsi->SrvEventActivity |= GetMaskFromEvent(event);
+ gpsi->dwInstalledEventHooks |= GetMaskFromEvent(event);
break;
- }
- }
- if (!gpsi->SrvEventActivity)
- gpsi->SrvEventActivity |= SRV_EVENT_RUNNING; // Set something.
- DPRINT("SetSrvEventMask 2 : %x\n", gpsi->SrvEventActivity);
+ }
+ }
+ if (!gpsi->dwInstalledEventHooks)
+ gpsi->dwInstalledEventHooks |= SRV_EVENT_RUNNING; // Set something.
+ DPRINT("SetSrvEventMask 2 : %x\n", gpsi->dwInstalledEventHooks);
}
static
@@ -128,7 +128,7 @@
{
RemoveEntryList(&pEH->Chain);
GlobalEvents->Counts--;
- if (!GlobalEvents->Counts) gpsi->SrvEventActivity = 0;
+ if (!GlobalEvents->Counts) gpsi->dwInstalledEventHooks = 0;
UserDeleteObject(pEH->Self, otEvent);
return TRUE;
}
@@ -229,9 +229,9 @@
{
UserLeave();
return;
- }
-
- if (gpsi->SrvEventActivity & GetMaskFromEvent(Event))
+ }
+
+ if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(Event))
{
UserRefObjectCo(Window, &Ref);
IntNotifyWinEvent( Event, Window, idObject, idChild);
Modified: trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/ntuser/simplecall.c [iso-8859-1] Mon Jun 29
07:36:31 2009
@@ -229,7 +229,7 @@
case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
{
DWORD Result;
-
+
Result = gspv.bMouseBtnSwap;
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
@@ -419,7 +419,7 @@
}
_SEH2_END;
RETURN(Ret);
- }
+ }
}
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(),
Param=0x%x\n",
Routine, Param);
@@ -607,55 +607,6 @@
case TWOPARAM_ROUTINE_REGISTERLOGONPROC:
RETURN( (DWORD)co_IntRegisterLogonProcess((HANDLE)Param1, (BOOL)Param2));
-
- case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
- case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
- case TWOPARAM_ROUTINE_GETSYSCOLORS:
- {
- DWORD Ret = 0;
- union
- {
- PVOID Pointer;
- HBRUSH *Brushes;
- HPEN *Pens;
- COLORREF *Colors;
- } Buffer;
-
- /* FIXME - we should make use of SEH here... */
-
- Buffer.Pointer = ExAllocatePool(PagedPool, Param2 * sizeof(HANDLE));
- if(Buffer.Pointer != NULL)
- {
- switch(Routine)
- {
- case TWOPARAM_ROUTINE_GETSYSCOLORBRUSHES:
- Ret = (DWORD)IntGetSysColorBrushes(Buffer.Brushes, (UINT)Param2);
- break;
- case TWOPARAM_ROUTINE_GETSYSCOLORPENS:
- Ret = (DWORD)IntGetSysColorPens(Buffer.Pens, (UINT)Param2);
- break;
- case TWOPARAM_ROUTINE_GETSYSCOLORS:
- Ret = (DWORD)IntGetSysColors(Buffer.Colors, (UINT)Param2);
- break;
- default:
- Ret = 0;
- break;
- }
-
- if(Ret > 0)
- {
- Status = MmCopyToCaller((PVOID)Param1, Buffer.Pointer, Param2 *
sizeof(HANDLE));
- if(!NT_SUCCESS(Status))
- {
- SetLastNtError(Status);
- Ret = 0;
- }
- }
-
- ExFreePool(Buffer.Pointer);
- }
- RETURN( Ret);
- }
case TWOPARAM_ROUTINE_ROS_REGSYSCLASSES:
{
@@ -760,7 +711,7 @@
case HWNDLOCK_ROUTINE_REDRAWFRAME:
co_WinPosSetWindowPos( Window,
HWND_DESKTOP,
- 0,0,0,0,
+ 0,0,0,0,
SWP_NOSIZE|
SWP_NOMOVE|
SWP_NOZORDER|
@@ -772,7 +723,7 @@
case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK:
co_WinPosSetWindowPos( Window,
HWND_DESKTOP,
- 0,0,0,0,
+ 0,0,0,0,
SWP_NOSIZE|
SWP_NOMOVE|
SWP_NOZORDER|
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Mon Jun 29
07:36:31 2009
@@ -230,7 +230,6 @@
{
gpsi->argbSystem[*Elements] = *Colors;
IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
- IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
}
Elements++;
Colors++;
@@ -238,77 +237,12 @@
return nColors > 0;
}
-BOOL FASTCALL
-IntGetSysColorBrushes(HBRUSH *pahBrushes, UINT nBrushes)
-{
- UINT i;
-
- ASSERT(pahBrushes);
-
- if (nBrushes > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- for (i = 0; i < nBrushes; i++)
- {
- pahBrushes[i] = gpsi->ahbrSystem[i];
- }
-
- return nBrushes > 0;
-}
-
HGDIOBJ FASTCALL
IntGetSysColorBrush(INT Object)
{
return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL :
gpsi->ahbrSystem[Object];
}
-BOOL FASTCALL
-IntGetSysColorPens(HPEN *Pens, UINT nPens)
-{
- UINT i;
-
- ASSERT(Pens);
-
- if (nPens > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- for (i = 0; i < nPens; i++)
- {
- *(Pens++) = gpsi->SysColorPens[i];
- }
-
- return nPens > 0;
-}
-
-BOOL FASTCALL
-IntGetSysColors(COLORREF *Colors, UINT nColors)
-{
- UINT i;
- COLORREF *col;
-
- ASSERT(Colors);
-
- if (nColors > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- col = &gpsi->argbSystem[0];
- for (i = 0; i < nColors; i++)
- {
- *(Colors++) = *(col++);
- }
-
- return nColors > 0;
-}
-
DWORD FASTCALL
IntGetSysColor(INT nIndex)
{
@@ -319,7 +253,6 @@
CreateSysColorObjects(VOID)
{
UINT i;
- LOGPEN Pen;
for (i = 0; i < NUM_SYSCOLORS; i++)
{
@@ -338,23 +271,6 @@
}
}
}
-
- /* Create the syscolor pens */
- Pen.lopnStyle = PS_SOLID;
- Pen.lopnWidth.x = 0;
- Pen.lopnWidth.y = 0;
- for (i = 0; i < NUM_SYSCOLORS; i++)
- {
- if (gpsi->SysColorPens[i] == NULL)
- {
- Pen.lopnColor = SysColors[i];
- gpsi->SysColorPens[i] = IntCreateStockPen(Pen.lopnStyle, Pen.lopnWidth.x,
BS_SOLID, Pen.lopnColor);
- if (gpsi->SysColorPens[i] != NULL)
- {
- GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->SysColorPens[i]);
- }
- }
- }
}
/* EOF */