[WIN32K]: Make IntGdiPaintRgn return the status of the operation, not always TRUE.
svn path=/trunk/; revision=48712
int dy2; // dest y end
int sy1; // src y start
- int dx;
int shift;
BYTE srcmask, dstmask, xormask;
pd = d;
ps = s;
srcmask = 0xff;
- dx = dwx; /* dest x for this pass */
if ( dwx < dl )
{
int diff = dl-dwx;
srcmask &= (1<<(8-diff))-1;
- dx = dl;
}
if ( dwx+7 > dr )
{
RECTL* DestRect, RECTL *SourceRect,
XLATEOBJ *ColorTranslation, ULONG iTransColor)
{
- ULONG RoundedRight, X, Y, SourceX = 0, SourceY = 0, Source, wd, Dest;
+ ULONG RoundedRight, X, Y, SourceX = 0, SourceY = 0, Source, Dest;
ULONG *DestBits;
LONG DstHeight;
RoundedRight = DestRect->right - ((DestRect->right - DestRect->left) & 0x3);
DestBits = (ULONG*)((PBYTE)DestSurf->pvScan0 + DestRect->left +
(DestRect->top * DestSurf->lDelta));
- wd = DestSurf->lDelta - (DestRect->right - DestRect->left);
for(Y = DestRect->top; Y < DestRect->bottom; Y++)
{
POINTL Pt;
ULONG Direction;
BOOL UsesSource;
- BOOL UsesPattern;
POINTL AdjustedBrushOrigin;
UsesSource = ROP4_USES_SOURCE(rop4);
- UsesPattern = ROP4_USES_PATTERN(rop4);
if (R4_NOOP == rop4)
{
/* Copy destination onto itself: nop */
{
LONG y;
ULONG LineWidth;
- SURFACE *psurf;
ASSERT(pso);
ASSERT(pRect);
- psurf = CONTAINING_RECORD(pso, SURFACE, SurfObj);
MouseSafetyOnDrawStart(pso, pRect->left, pRect->top, pRect->right, pRect->bottom);
LineWidth = pRect->right - pRect->left;
DPRINT(" LineWidth: %d, top: %d, bottom: %d\n", LineWidth, pRect->top, pRect->bottom);
IN OUT PCLS *BaseClassLink,
IN OUT PCLS *CloneLink)
{
- PCLS Clone, BaseClass;
+ PCLS Clone;
ASSERT(Class->pclsBase != Class);
ASSERT(Class->pclsBase->pclsClone != NULL);
*CloneLink = Class->pclsNext;
Class->pclsClone = Class->pclsBase->pclsClone;
- BaseClass = Class->pclsBase;
-
/* update the class information to make it a base class */
Class->pclsBase = Class;
Class->pclsNext = (*BaseClassLink)->pclsNext;
IN BOOL Ansi,
HINSTANCE hInstance)
{
- PPROCESSINFO pi;
-
if (!Class) return FALSE;
lpwcx->style = Class->style;
if (Class->fnid)
lpwcx->style &= ~CS_GLOBALCLASS;
- pi = GetW32ProcessInfo();
-
lpwcx->lpfnWndProc = IntGetClassWndProc(Class, Ansi);
lpwcx->cbClsExtra = Class->cbclsExtra;
// because pallette information may change
HDC hdc;
- INT ret;
BITMAP bm;
BITMAPINFO bi;
SURFACE *psurf;
bi.bmiHeader.biYPelsPerMeter = 0;
bi.bmiHeader.biClrUsed = 0;
- ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, NULL, &bi, DIB_RGB_COLORS, 0, 0);
+ NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, NULL, &bi, DIB_RGB_COLORS, 0, 0);
size = bi.bmiHeader.biSizeImage + sizeof(BITMAPINFOHEADER);
hCBData = ExAllocatePoolWithTag(PagedPool, size, USERTAG_CLIPBOARD);
memcpy(hCBData, &bi, sizeof(BITMAPINFOHEADER));
- ret = NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, (LPBYTE)hCBData + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
+ NtGdiGetDIBitsInternal(hdc, hMem, 0, bm.bmHeight, (LPBYTE)hCBData + sizeof(BITMAPINFOHEADER), &bi, DIB_RGB_COLORS, 0, 0);
UserReleaseDC(NULL, hdc, FALSE);
PCURICON_OBJECT OldCursor;
HCURSOR hOldCursor = (HCURSOR)0;
HDC hdcScreen;
- BOOL bResult;
CurInfo = IntGetSysCursorInfo();
CurInfo->CurrentCursorObject = NewCursor;
/* Call GDI to set the new screen cursor */
- bResult = GreSetPointerShape(hdcScreen,
- NewCursor->IconInfo.hbmMask,
- NewCursor->IconInfo.hbmColor,
- NewCursor->IconInfo.xHotspot,
- NewCursor->IconInfo.yHotspot,
- gpsi->ptCursor.x,
- gpsi->ptCursor.y);
+ GreSetPointerShape(hdcScreen,
+ NewCursor->IconInfo.hbmMask,
+ NewCursor->IconInfo.hbmColor,
+ NewCursor->IconInfo.xHotspot,
+ NewCursor->IconInfo.yHotspot,
+ gpsi->ptCursor.x,
+ gpsi->ptCursor.y);
}
{
PEVENTHOOK pEH;
PLIST_ENTRY pLE;
- LRESULT Result;
DPRINT("IntNotifyWinEvent GlobalEvents = 0x%x pWnd 0x%x\n",GlobalEvents, pWnd);
if (!(pEH->idProcess) || !(pEH->idThread) ||
(NtCurrentTeb()->ClientId.UniqueProcess == (PVOID)(DWORD_PTR)pEH->idProcess))
{
- Result = IntCallLowLevelEvent( pEH,
- Event,
- UserHMGetHandle(pWnd),
- idObject,
- idChild);
+ IntCallLowLevelEvent( pEH,
+ Event,
+ UserHMGetHandle(pWnd),
+ idObject,
+ idChild);
}
}// if ^skip own thread && ((Pid && CPid == Pid && ^skip own process) || all process)
else if ( !(pEH->Flags & WINEVENT_SKIPOWNTHREAD) &&
!(pEH->Flags & WINEVENT_SKIPOWNPROCESS)) ||
!pEH->idProcess ) )
{
- Result = co_IntCallEventProc( UserHMGetHandle(pEH),
+ // What in the deuce is this right-aligned formatting?
+ co_IntCallEventProc( UserHMGetHandle(pEH),
Event,
UserHMGetHandle(pWnd),
idObject,
IntKeyboardInput(KEYBDINPUT *ki)
{
PUSER_MESSAGE_QUEUE FocusMessageQueue;
- PTHREADINFO pti;
MSG Msg;
LARGE_INTEGER LargeTickCount;
KBDLLHOOKSTRUCT KbdHookData;
Msg.time = ki->time;
/* All messages have to contain the cursor point. */
- pti = PsGetCurrentThreadWin32Thread();
Msg.pt = gpsi->ptCursor;
KbdHookData.vkCode = vk_hook;
MSG NewMsg = { 0 };
PKBDTABLES keyLayout;
BOOL Result = FALSE;
- DWORD ScanCode = 0;
pti = PsGetCurrentThreadWin32Thread();
keyLayout = pti->KeyboardLayout->KBTables;
return TRUE;
}
- ScanCode = (lpMsg->lParam >> 16) & 0xff;
-
UState = ToUnicodeInner(lpMsg->wParam, HIWORD(lpMsg->lParam) & 0xff,
gQueueKeyStateTable, wp, 2, 0,
keyLayout );
IntBuildMenuItemList(PMENU_OBJECT MenuObject, PVOID Buffer, ULONG nMax)
{
DWORD res = 0;
- UINT sz;
ROSMENUITEMINFO mii;
PVOID Buf;
PMENU_ITEM CurItem = MenuObject->MenuItemList;
StrOut = (PWCHAR)((char *) Buffer + MenuObject->MenuInfo.MenuItemCount
* sizeof(ROSMENUITEMINFO));
nMax -= MenuObject->MenuInfo.MenuItemCount * sizeof(ROSMENUITEMINFO);
- sz = sizeof(ROSMENUITEMINFO);
Buf = Buffer;
mii.cbSize = sizeof(ROSMENUITEMINFO);
mii.fMask = 0;
ULONG_PTR PResult;
PTHREADINFO pti;
PWINDOW_OBJECT Window;
- MSG Message;
if ( !(Window = UserGetWindowObject(hWnd)) ) return FALSE;
}
else
{ // Handle message and callback.
- Message.hwnd = hWnd;
- Message.message = Msg;
- Message.wParam = wParam;
- Message.lParam = lParam;
-
Result = co_IntSendMessageTimeoutSingle( hWnd,
Msg,
wParam,
HANDLE hPowerRequestEvent,
HANDLE hMediaRequestEvent)
{
- NTSTATUS Status;
-
// Set W32PF_Flags |= (W32PF_READSCREENACCESSGRANTED | W32PF_IOWINSTA)
// Create Object Directory,,, Looks like create workstation. "\\Windows\\WindowStations"
// Create Event for Diconnect Desktop.
// Callback to User32 Client Thread Setup
- Status = co_IntClientThreadSetup();
+ co_IntClientThreadSetup();
// }
// Set Global SERVERINFO Error flags.
{
PWND Wnd;
HRGN hRgnWindow;
- UINT RgnType;
Wnd = Window->Wnd;
if (Client)
NtGdiOffsetRgn(hRgnWindow,
-Wnd->rcWindow.left,
-Wnd->rcWindow.top);
- RgnType = NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->hrgnClip, RGN_AND);
+ NtGdiCombineRgn(hRgnWindow, hRgnWindow, Window->hrgnClip, RGN_AND);
NtGdiOffsetRgn(hRgnWindow,
Wnd->rcWindow.left,
Wnd->rcWindow.top);
if (WndCaret == Window ||
((flags & SW_SCROLLCHILDREN) && IntIsChildWindow(Window, WndCaret)))
{
- POINT pt, FromOffset, ToOffset, Offset;
+ POINT pt, FromOffset, ToOffset;
RECTL rcCaret;
pt.x = CaretInfo->Pos.x;
pt.y = CaretInfo->Pos.y;
IntGetClientOrigin(WndCaret, &FromOffset);
IntGetClientOrigin(Window, &ToOffset);
- Offset.x = FromOffset.x - ToOffset.x;
- Offset.y = FromOffset.y - ToOffset.y;
rcCaret.left = pt.x;
rcCaret.top = pt.y;
rcCaret.right = pt.x + CaretInfo->Size.cx;
IntRemoveProp(PWINDOW_OBJECT Window, ATOM Atom)
{
PPROPERTY Prop;
- HANDLE Data;
Prop = IntGetProp(Window, Atom);
if (Prop == NULL)
{
return FALSE;
}
- Data = Prop->Data;
RemoveEntryList(&Prop->PropListEntry);
UserHeapFree(Prop);
Window->Wnd->PropListItems--;
{
PSCROLLBARINFO psbi;
LPSCROLLINFO psi;
- LRESULT Result;
ULONG Size, s;
INT i;
RtlZeroMemory(Window->pSBInfo, Size);
- Result = co_WinPosGetNonClientSize(Window,
- &Window->Wnd->rcWindow,
- &Window->Wnd->rcClient);
+ co_WinPosGetNonClientSize(Window,
+ &Window->Wnd->rcWindow,
+ &Window->Wnd->rcClient);
for(s = SB_HORZ; s <= SB_VERT; s++)
{
{
DWORD Ret = 0;
PWINDOW_OBJECT Window;
- PWND Wnd;
USER_REFERENCE_ENTRY Ref;
DECLARE_RETURN(DWORD);
}
UserRefObjectCo(Window, &Ref);
- Wnd = Window->Wnd;
-
switch (Routine)
{
case TWOPARAM_ROUTINE_VALIDATERGN:
/* default positioning for overlapped windows */
if(!(Cs->style & (WS_POPUP | WS_CHILD)))
{
- RECTL rc, WorkArea;
+ RECTL WorkArea;
PRTL_USER_PROCESS_PARAMETERS ProcessParams;
UserSystemParametersInfo(SPI_GETWORKAREA, 0, &WorkArea, 0);
- rc = WorkArea;
ProcessParams = PsGetCurrentProcess()->Peb->ProcessParameters;
if (IS_DEFAULT(Cs->x))
for (;;)
{
- PWINDOW_OBJECT Parent, Old;
+ PWINDOW_OBJECT Parent;
- Old = WndAncestor;
Parent = IntGetParent(WndAncestor);
if (!Parent)
LPPOINT ptIcon)
{
PWINDOW_OBJECT Window;
- PWND Wnd;
DWORD Ret = 0;
BOOL Hit = FALSE;
WINDOWPLACEMENT wndpl;
Hit = FALSE;
goto Exit;
}
- Wnd = Window->Wnd;
_SEH2_TRY
{
if ((DesktopWindow = UserGetWindowObject(IntGetDesktopWindow())))
{
PTHREADINFO pti;
- USHORT Hit;
pt.x = X;
pt.y = Y;
UserRefObjectCo(DesktopWindow, &Ref);
pti = PsGetCurrentThreadWin32Thread();
- Hit = co_WinPosWindowFromPoint(DesktopWindow, pti->MessageQueue, &pt, &Window);
+ co_WinPosWindowFromPoint(DesktopWindow, pti->MessageQueue, &pt, &Window);
if(Window)
{
BOOL APIENTRY
NtUserSetProcessWindowStation(HWINSTA hWindowStation)
{
- HANDLE hOld;
PWINSTATION_OBJECT NewWinSta;
NTSTATUS Status;
*/
/* FIXME - dereference the old window station, etc... */
- hOld = InterlockedExchangePointer(&PsGetCurrentProcess()->Win32WindowStation, hWindowStation);
+ InterlockedExchangePointer(&PsGetCurrentProcess()->Win32WindowStation, hWindowStation);
DPRINT("PsGetCurrentProcess()->Win32WindowStation 0x%X\n",
PsGetCurrentProcess()->Win32WindowStation);
SURFACE *BitmapDest, *BitmapSrc = NULL;
HPALETTE SourcePalette = 0, DestPalette = 0;
PPALETTE PalDestGDI, PalSourceGDI;
- USHORT PalDestMode, PalSrcMode;
ULONG TransparentColor = 0;
BOOL Ret = FALSE;
EXLATEOBJ exlo;
SetLastWin32Error(ERROR_INVALID_HANDLE);
goto done;
}
- PalSrcMode = PalSourceGDI->Mode;
PALETTE_UnlockPalette(PalSourceGDI);
if(DestPalette != SourcePalette)
SetLastWin32Error(ERROR_INVALID_HANDLE);
goto done;
}
- PalDestMode = PalDestGDI->Mode;
PALETTE_UnlockPalette(PalDestGDI);
}
else
{
- PalDestMode = PalSrcMode;
PalDestGDI = PalSourceGDI;
}
VOID
CopytoUserDcAttr(PDC dc, PDC_ATTR pdcattr)
{
- NTSTATUS Status = STATUS_SUCCESS;
dc->dcattr.mxWorldToDevice = dc->dclevel.mxWorldToDevice;
dc->dcattr.mxDeviceToWorld = dc->dclevel.mxDeviceToWorld;
dc->dcattr.mxWorldToPage = dc->dclevel.mxWorldToPage;
}
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
{
- Status = _SEH2_GetExceptionCode();
ASSERT(FALSE);
}
_SEH2_END;
IN DWORD dwflags,
IN PVOID lParam OPTIONAL)
{
- BOOLEAN Global = FALSE;
BOOLEAN NoReset = FALSE;
BOOLEAN Reset = FALSE;
- BOOLEAN SetPrimary = FALSE;
LONG Ret = DISP_CHANGE_SUCCESSFUL;
NTSTATUS Status ;
{
/* Check global, reset and noreset flags */
if ((dwflags & CDS_GLOBAL) == CDS_GLOBAL)
- Global = TRUE;
+ DPRINT1("CDS_GLOBAL unhandled");
if ((dwflags & CDS_NORESET) == CDS_NORESET)
NoReset = TRUE;
dwflags &= ~(CDS_GLOBAL | CDS_NORESET);
if ((dwflags & CDS_RESET) == CDS_RESET)
Reset = TRUE;
if ((dwflags & CDS_SET_PRIMARY) == CDS_SET_PRIMARY)
- SetPrimary = TRUE;
+ DPRINT1("CDS_SET_PRIMARY unhandled");
dwflags &= ~(CDS_RESET | CDS_SET_PRIMARY);
if (Reset && NoReset)
PSECTION_OBJECT SectionObject;
ULONG ViewSize = 0;
LARGE_INTEGER SectionSize;
+#if 0 // Wine code
FT_Fixed XScale, YScale;
+#endif
UNICODE_STRING FontRegPath = RTL_CONSTANT_STRING(L"\\REGISTRY\\Machine\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Fonts");
/* Open the font file */
FontGDI->face = Face;
/* FIXME: Complete text metrics */
+#if 0 /* This (Wine) code doesn't seem to work correctly for us */
XScale = Face->size->metrics.x_scale;
YScale = Face->size->metrics.y_scale;
-#if 0 /* This (Wine) code doesn't seem to work correctly for us */
FontGDI->TextMetric.tmAscent = (FT_MulFix(Face->ascender, YScale) + 32) >> 6;
FontGDI->TextMetric.tmDescent = (FT_MulFix(Face->descender, YScale) + 32) >> 6;
FontGDI->TextMetric.tmHeight = (FT_MulFix(Face->ascender, YScale) -
case GdiBCSelObj:
{
PGDIBSOBJECT pgO;
- PTEXTOBJ pOrgFnt, pNewFnt = NULL;
- HFONT hOrgFont = NULL;
+ PTEXTOBJ pNewFnt = NULL;
if (!dc) break;
pgO = (PGDIBSOBJECT) pHdr;
/* LFONTOBJ use share and locking. */
pNewFnt = TEXTOBJ_LockText(pgO->hgdiobj);
- pOrgFnt = dc->dclevel.plfnt;
- if (pOrgFnt)
- {
- hOrgFont = pOrgFnt->BaseObject.hHmgr;
- }
- else
- {
- hOrgFont = pdcattr->hlfntNew;
- }
dc->dclevel.plfnt = pNewFnt;
dc->hlfntCur = pgO->hgdiobj;
pdcattr->hlfntNew = pgO->hgdiobj;
int realized = 0;
PDC dc;
HPALETTE systemPalette;
- USHORT sysMode, palMode;
dc = DC_LockDc(hDC);
if (!dc) return 0;
}
// need to pass this to IntEngCreateXlate with palettes unlocked
- sysMode = sysGDI->Mode;
- palMode = palGDI->Mode;
PALETTE_UnlockPalette(sysGDI);
PALETTE_UnlockPalette(palGDI);
FASTCALL
PATH_FillPath( PDC dc, PPATH pPath )
{
- INT mapMode, graphicsMode;
- SIZE ptViewportExt, ptWindowExt;
- POINTL ptViewportOrg, ptWindowOrg;
+ //INT mapMode, graphicsMode;
+ //SIZE ptViewportExt, ptWindowExt;
+ //POINTL ptViewportOrg, ptWindowOrg;
XFORM xform;
HRGN hrgn;
PDC_ATTR pdcattr = dc->pdcattr;
*/
/* Save the information about the old mapping mode */
- mapMode = pdcattr->iMapMode;
- ptViewportExt = pdcattr->szlViewportExt;
- ptViewportOrg = pdcattr->ptlViewportOrg;
- ptWindowExt = pdcattr->szlWindowExt;
- ptWindowOrg = pdcattr->ptlWindowOrg;
+ //mapMode = pdcattr->iMapMode;
+ //ptViewportExt = pdcattr->szlViewportExt;
+ //ptViewportOrg = pdcattr->ptlViewportOrg;
+ //ptWindowExt = pdcattr->szlWindowExt;
+ //ptWindowOrg = pdcattr->ptlWindowOrg;
/* Save world transform
* NB: The Windows documentation on world transforms would lead one to
// pdcattr->ptlWindowOrg.x = 0;
// pdcattr->ptlWindowOrg.y = 0;
- graphicsMode = pdcattr->iGraphicsMode;
+ // graphicsMode = pdcattr->iGraphicsMode;
// pdcattr->iGraphicsMode = GM_ADVANCED;
// IntGdiModifyWorldTransform( dc, &xform, MWT_IDENTITY );
// pdcattr->iGraphicsMode = graphicsMode;
// pdcattr->ptlWindowOrg = ptWindowOrg;
/* Go to GM_ADVANCED temporarily to restore the world transform */
- graphicsMode = pdcattr->iGraphicsMode;
+ //graphicsMode = pdcattr->iGraphicsMode;
// pdcattr->iGraphicsMode = GM_ADVANCED;
// IntGdiModifyWorldTransform( dc, &xform, MWT_MAX+1 );
// pdcattr->iGraphicsMode = graphicsMode;
REGION_FreeRgnByHandle(tmpVisRgn);
// Fill the region
- return TRUE;
+ return bRet;
}
BOOL
}
if (ROPCODE_GENERIC == RopInfo->RopCode)
{
- Output(Out, "BOOLEAN UsesDest, UsesSource, UsesPattern;\n");
+ Output(Out, "BOOLEAN UsesSource, UsesPattern;\n");
Output(Out, "\n");
- Output(Out, "UsesDest = ROP4_USES_DEST(BltInfo->Rop4);\n");
Output(Out, "UsesSource = ROP4_USES_SOURCE(BltInfo->Rop4);\n");
Output(Out, "UsesPattern = ROP4_USES_PATTERN(BltInfo->Rop4);\n");
}