mirror of
https://github.com/reactos/reactos.git
synced 2025-05-18 00:31:27 +00:00
- 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 svn path=/trunk/; revision=41679
This commit is contained in:
parent
314b21119c
commit
5dd7ba40f8
5 changed files with 16 additions and 165 deletions
|
@ -408,10 +408,6 @@ typedef struct tagSERVERINFO
|
|||
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 @@ typedef struct tagKMDDELPARAM
|
|||
#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
|
||||
|
|
|
@ -154,18 +154,9 @@ IntGdiCombineTransform(LPXFORM XFormResult,
|
|||
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);
|
||||
|
||||
|
|
|
@ -62,28 +62,28 @@ IntSetSrvEventMask( UINT EventMin, UINT EventMax)
|
|||
(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 @@ IntRemoveEvent(PEVENTHOOK pEH)
|
|||
{
|
||||
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 @@ NtUserNotifyWinEvent(
|
|||
{
|
||||
UserLeave();
|
||||
return;
|
||||
}
|
||||
|
||||
if (gpsi->SrvEventActivity & GetMaskFromEvent(Event))
|
||||
}
|
||||
|
||||
if (gpsi->dwInstalledEventHooks & GetMaskFromEvent(Event))
|
||||
{
|
||||
UserRefObjectCo(Window, &Ref);
|
||||
IntNotifyWinEvent( Event, Window, idObject, idChild);
|
||||
|
|
|
@ -229,7 +229,7 @@ NtUserCallOneParam(
|
|||
case ONEPARAM_ROUTINE_SWAPMOUSEBUTTON:
|
||||
{
|
||||
DWORD Result;
|
||||
|
||||
|
||||
Result = gspv.bMouseBtnSwap;
|
||||
gspv.bMouseBtnSwap = Param ? TRUE : FALSE;
|
||||
gpsi->aiSysMet[SM_SWAPBUTTON] = gspv.bMouseBtnSwap;
|
||||
|
@ -419,7 +419,7 @@ NtUserCallOneParam(
|
|||
}
|
||||
_SEH2_END;
|
||||
RETURN(Ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
DPRINT1("Calling invalid routine number 0x%x in NtUserCallOneParam(), Param=0x%x\n",
|
||||
Routine, Param);
|
||||
|
@ -608,55 +608,6 @@ NtUserCallTwoParam(
|
|||
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:
|
||||
{
|
||||
DWORD Ret = 0;
|
||||
|
@ -760,7 +711,7 @@ NtUserCallHwndLock(
|
|||
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 @@ NtUserCallHwndLock(
|
|||
case HWNDLOCK_ROUTINE_REDRAWFRAMEANDHOOK:
|
||||
co_WinPosSetWindowPos( Window,
|
||||
HWND_DESKTOP,
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
SWP_NOSIZE|
|
||||
SWP_NOMOVE|
|
||||
SWP_NOZORDER|
|
||||
|
|
|
@ -230,7 +230,6 @@ IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors)
|
|||
{
|
||||
gpsi->argbSystem[*Elements] = *Colors;
|
||||
IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
|
||||
IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
|
||||
}
|
||||
Elements++;
|
||||
Colors++;
|
||||
|
@ -238,77 +237,12 @@ IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors)
|
|||
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 @@ VOID FASTCALL
|
|||
CreateSysColorObjects(VOID)
|
||||
{
|
||||
UINT i;
|
||||
LOGPEN Pen;
|
||||
|
||||
for (i = 0; i < NUM_SYSCOLORS; i++)
|
||||
{
|
||||
|
@ -338,23 +271,6 @@ CreateSysColorObjects(VOID)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 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 */
|
||||
|
|
Loading…
Reference in a new issue