Commit graph

62 commits

Author SHA1 Message Date
James Tabor
3d60e751ce [Win32k]
- Removed NtUserGetScrollInfo and replaced it, move more type names in window object to WND.

svn path=/trunk/; revision=45021
2010-01-10 07:50:57 +00:00
Timo Kreuzer
dfe969ab14 [win32k] / [user32]
Merge from amd64 branch:
34780 some DWORD -> DWORD_PTR (Timo Kreuzer)
34781 fix usage of InterlockedCompareExchangePointer (Timo Kreuzer)
34782 fix usage of InterlockedCompareExchangePointer (Timo Kreuzer)
34908 some 64 bit fixes in win32k (Timo Kreuzer)
34909 some more win32k 64 bit fixes (Timo Kreuzer)
34965 Fix typos. (Samuel Serapión)
41479 Remove usage of RETURN() macro (Timo Kreuzer)
41540 Make parameters for NtUserCallOneParam and NtUserCallTwoParam DWORD_PTR instead of DWORD (Timo Kreuzer)
41546 Add _FLOATOBJ_GetFix for non-x86 (Timo Kreuzer)
41547 Only export FLOATOBJ_* api on x86 (Timo Kreuzer)
44238 Fix some 64 bit isues. (Timo Kreuzer)
43969 undefine i386 in the pspec file (Timo Kreuzer)

svn path=/trunk/; revision=44956
2010-01-05 19:26:32 +00:00
James Tabor
9b791c7be9 [Win32k]
- Setting up for region attribute support.
- Removed old code and use GreDeleteObject for dc and region types.

svn path=/trunk/; revision=44806
2009-12-29 21:07:04 +00:00
James Tabor
f755214f06 [Win32k]
- Continuing the moving into WND structure with minor desktop structure changes.
- Tested: wine user32 tests, AbiWord 2.6.8, FF 3.5, OOo 2.4.3 and Seamonkey 2.0.

svn path=/trunk/; revision=44576
2009-12-14 06:48:40 +00:00
James Tabor
d51b4d5202 [Win32k]
- Michael Martin found a create window and crash exit issue by testing programs from http://www.magma.ca/~wjr/ PEview. Fixed by replacing UserFreeWindowInfo with co_UserDestroyWindow at cleanup exit.
- Added more window death and thread checks.
- Started the morphing into WND structure from window object.
- Tested: wine user32 tests, AbiWord 2.6.8, Seamonkey 2.0, FF 3.5 and OOo 2.4.3.

svn path=/trunk/; revision=44575
2009-12-14 05:02:56 +00:00
James Tabor
bbbab20bda - Header cleanup +1.
svn path=/trunk/; revision=43088
2009-09-19 22:21:12 +00:00
Matthias Kupfer
b728102816 Fix redraw bug by correcting nonclient region calculation. (Window->UpdateRegion has no proper values)
TODO: calculate and/or update  Window->UpdateRegion properly
See issue #4181 for details.

svn path=/trunk/; revision=42836
2009-08-21 22:23:22 +00:00
James Tabor
e3ef0343ba - [Win32k] Rename class and window structures.
svn path=/trunk/; revision=42130
2009-07-22 05:23:08 +00:00
James Tabor
928ed84e9f - [Win32k] Update window structure.
svn path=/trunk/; revision=42108
2009-07-20 23:18:16 +00:00
Dmitry Gorbachev
bc9c521a84 If exception occurs, leave critical section. Bug #4431.
svn path=/trunk/; revision=41779
2009-07-05 14:08:10 +00:00
Dmitry Chapyshev
09f8aa06a9 - Use PWINDOW_OBJECT instead HWND in PostTimerMessages, IntGetPaintMessage, co_MsqTranslateMouseMessage, co_MsqPeekHardwareMessage, co_MsqFindMessage, co_MsqWaitForNewMessages, MsqGetTimerMessage, MsqGetFirstTimerExpiry, co_IntPeekMessage
- Allow hWnd equal -1, 0x0000ffff, 0xffffffff
- Fixes 3 winetests for PeekMessageA/W

svn path=/trunk/; revision=41754
2009-07-03 09:37:44 +00:00
Timo Kreuzer
68ccd5f6e4 Rewrite (NtUser)SystemParametersInfo and related.
- Instead of getting the data from the window station and other strange places, the values are now mostly stored in a global variable. This is possible because NtUserSystemParametersInfo should fail anyway when being called from a non-interactive windowstation (tested on windows XP).
- WM_SETTINGCHANGE is now properly sent not posted to all toplevel Windows also passing the registry string as the lParam value (strings could need some testing).
- SystemMetrics are now set and updated from system parameters.
- Most values are now properly loaded from registry and also saved.
- user32_winetest sysparams: before: 634 executed / 235 failures, after: 1093 executed, 11 failures
- Fixes the non-bold caption font in 2nd stage.
- Implements a number SPI codes.
- Implements helper functions for registry and file access
Thanks to all testers for all the regression testing :)


See issue #4595 for more details.

svn path=/trunk/; revision=41604
2009-06-25 02:43:38 +00:00
James Tabor
cdacb4b6b5 - Hax-implement NtGdiSetPixelFormat and add a support function UserGethWnd with some code cleanup.
svn path=/trunk/; revision=41250
2009-06-02 06:50:36 +00:00
Gregor Schneider
b48f3e2f98 Order rectangle points to avoid CreateCompatibleBitmap failure because of negative size values
svn path=/trunk/; revision=40569
2009-04-18 11:07:58 +00:00
Timo Kreuzer
ea055dde70 Rename NtGdiDeleteObject to GreDeleteObject
svn path=/trunk/; revision=40240
2009-03-25 20:24:34 +00:00
Timo Kreuzer
af62ba6188 Change most DC struct members to the names they have on Windows according to gdikdx
svn path=/trunk/; revision=40111
2009-03-20 01:35:49 +00:00
Timo Kreuzer
8d620098f5 win32k RECT/RECTL issues:
- Although RECT and RECTL are defined equal, the compiler treats them as incompatible. MS has created a lot of definitions with RECT and a lot with RECTL. So far we had to typecast them. Now with adding some defines into a win32k header file, we can finally treat them as equal inside win32k and get rid of a lot of type casts. Also use RECTL in favour of RECT internally, as this is the type that MS uses for the DDI and seems to be the more appropriate type.
- We had a lot of "const PRECT" stuff inside win32k. Note: there's difference between "const RECT *" (what you currently want) and "CONST PRECT" (which you proabably don't want). Despite the fact that CONST is not an official modifier (please stick to const) the main difference is that the former describes a pointer to a constant structure, while the latter describes a constant pointer to a modifyable structure.
- In an attempt to clean up the overpolluted IntGdi namespace, "objectify" the rect functions, moving them into their own namespace RECTL_Xxx.

svn path=/trunk/; revision=40100
2009-03-19 01:42:34 +00:00
Thomas Bluemel
6df90967f0 Fix background color used for DrawCaptionTemp with DC_INBUTTON
svn path=/trunk/; revision=38802
2009-01-16 23:56:11 +00:00
Timo Kreuzer
766c25b7e3 Some people were thinking they could use NtGdiExtTextOut from within Win32k and get away with it. Since MmCopyFromCaller is broken, it was actually working. Implement NtGdiExtTextOutW as a wrapper around the real function, that is now called GreExtTextOutW, using the naming style that ms also uses to get some more stucture in here. Also get rid of 2 pool allocations and use only one if a local buffer is not sufficient. Should get us more TextOut performance.
svn path=/trunk/; revision=38261
2008-12-22 03:58:04 +00:00
KJK::Hyperion
1bd07ee187 modified include/reactos/probe.h
Workaround for gcc 4.1.3. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7

modified   ntoskrnl/include/internal/mm.h
   gcc 4.3.2 doesn't like to be told to inline MmAcquirePageListLock

modified   ntoskrnl/include/internal/probe.h
   Cleaning up after TSVN's buggy "apply patch"

modified   subsystems/win32/win32k/ntuser/message.c
   Silence a gcc 4.3.2 warning (possibly incorrectly)

modified   dll/directx/ddraw/ddraw.rbuild
modified   dll/win32/gdi32/gdi32.rbuild
modified   dll/win32/kernel32/kernel32.rbuild
modified   dll/win32/psapi/psapi.rbuild
modified   dll/win32/setupapi/setupapi.rbuild
modified   dll/win32/syssetup/syssetup.rbuild
modified   dll/win32/user32/user32.rbuild
modified   drivers/input/kbdclass/kbdclass.rbuild
modified   drivers/input/mouclass/mouclass.rbuild
modified   drivers/network/afd/afd.rbuild
modified   drivers/network/tcpip/tcpip.rbuild
modified   lib/rtl/rtl.rbuild
modified   subsystems/win32/win32k/win32k.rbuild
modified   subsystems/win32/win32k/objects/gdiobj.c
   gcc 4.1.3 workarounds. See embedded comments

modified   base/services/eventlog/eventlog.h
modified   dll/win32/advapi32/advapi32.h
   Removed superfluous includes of pseh/pseh.h

modified   dll/directx/ddraw/Ddraw/ddraw_displaymode.c
modified   dll/directx/ddraw/Ddraw/ddraw_main.c
modified   dll/directx/ddraw/Ddraw/ddraw_setcooperativelevel.c
modified   dll/directx/ddraw/Ddraw/GetCaps.c
modified   dll/directx/ddraw/Ddraw/GetDeviceIdentifier.c
modified   dll/directx/ddraw/main.c
modified   dll/directx/ddraw/rosdraw.h
modified   dll/directx/ddraw/Surface/surface_main.c
   ddraw migrated to PSEH 2.0

modified   dll/win32/gdi32/include/precomp.h
modified   dll/win32/gdi32/misc/misc.c
modified   dll/win32/gdi32/objects/bitmap.c
   gdi32 migrated to PSEH 2.0

modified   dll/win32/kernel32/except/except.c
modified   dll/win32/kernel32/file/find.c
modified   dll/win32/kernel32/k32.h
modified   dll/win32/kernel32/mem/isbad.c
modified   dll/win32/kernel32/misc/console.c
modified   dll/win32/kernel32/process/procsup.c
modified   dll/win32/kernel32/string/lstring.c
modified   dll/win32/kernel32/thread/thread.c
   kernel32 migrated to PSEH 2.0

modified   dll/win32/psapi/precomp.h
modified   dll/win32/psapi/psapi.c
   psapi migrated to PSEH 2.0

modified   dll/win32/setupapi/cfgmgr.c
modified   dll/win32/setupapi/setupapi_private.h
   setupapi migrated to PSEH 2.0

modified   dll/win32/syssetup/wizard.c
   syssetup migrated to PSEH 2.0

modified   dll/win32/user32/include/user32.h
modified   dll/win32/user32/windows/class.c
modified   dll/win32/user32/windows/text.c
modified   dll/win32/user32/windows/window.c
   user32 migrated to PSEH 2.0

modified   drivers/input/kbdclass/kbdclass.c
modified   drivers/input/kbdclass/kbdclass.h
   kbdclass migrated to PSEH 2.0

modified   drivers/input/mouclass/mouclass.c
modified   drivers/input/mouclass/mouclass.h
   mouclass migrated to PSEH 2.0

modified   drivers/network/afd/afd/info.c
modified   drivers/network/afd/afd/lock.c
modified   drivers/network/afd/afd/tdi.c
modified   drivers/network/afd/afd/tdiconn.c
   afd migrated to PSEH 2.0

modified   drivers/network/lan/lan/lan.c
   lan migrated to PSEH 2.0

modified   drivers/network/tcpip/tcpip/dispatch.c
   tcpip migrated to PSEH 2.0

modified   lib/rtl/debug.c
modified   lib/rtl/res.c
modified   lib/rtl/rtl.h
modified   lib/rtl/unicode.c
modified   lib/rtl/workitem.c
   rtl migrated to PSEH 2.0

modified   ntoskrnl/include/precomp.h
   ntoskrnl migrated to PSEH 2.0

modified   subsystems/csr/csrsrv/api.c
   csrsrv migrated to PSEH 2.0

modified   subsystems/win32/win32k/eng/bitblt.c
modified   subsystems/win32/win32k/eng/mem.c
modified   subsystems/win32/win32k/include/mmcopy.h
modified   subsystems/win32/win32k/misc/copy.c
modified   subsystems/win32/win32k/ntuser/callback.c
modified   subsystems/win32/win32k/ntuser/class.c
modified   subsystems/win32/win32k/ntuser/clipboard.c
modified   subsystems/win32/win32k/ntuser/cursoricon.c
modified   subsystems/win32/win32k/ntuser/display.c
modified   subsystems/win32/win32k/ntuser/hook.c
modified   subsystems/win32/win32k/ntuser/input.c
modified   subsystems/win32/win32k/ntuser/kbdlayout.c
modified   subsystems/win32/win32k/ntuser/menu.c
modified   subsystems/win32/win32k/ntuser/misc.c
modified   subsystems/win32/win32k/ntuser/ntstubs.c
modified   subsystems/win32/win32k/ntuser/painting.c
modified   subsystems/win32/win32k/ntuser/simplecall.c
modified   subsystems/win32/win32k/ntuser/sysparams.c
modified   subsystems/win32/win32k/ntuser/window.c
modified   subsystems/win32/win32k/objects/bitblt.c
modified   subsystems/win32/win32k/objects/bitmaps.c
modified   subsystems/win32/win32k/objects/brush.c
modified   subsystems/win32/win32k/objects/cliprgn.c
modified   subsystems/win32/win32k/objects/color.c
modified   subsystems/win32/win32k/objects/coord.c
modified   subsystems/win32/win32k/objects/dc.c
modified   subsystems/win32/win32k/objects/dcutil.c
modified   subsystems/win32/win32k/objects/dibobj.c
modified   subsystems/win32/win32k/objects/fillshap.c
modified   subsystems/win32/win32k/objects/font.c
modified   subsystems/win32/win32k/objects/freetype.c
modified   subsystems/win32/win32k/objects/icm.c
modified   subsystems/win32/win32k/objects/line.c
modified   subsystems/win32/win32k/objects/path.c
modified   subsystems/win32/win32k/objects/pen.c
modified   subsystems/win32/win32k/objects/print.c
modified   subsystems/win32/win32k/objects/region.c
modified   subsystems/win32/win32k/objects/text.c
modified   subsystems/win32/win32k/pch.h
   win32k migrated to PSEH 2.0

svn path=/trunk/; revision=37776
2008-11-30 19:28:11 +00:00
Stefan Ginsberg
ef394b196f - Less STDCALL, more WINAPI/NTAPI/APIENTRY
svn path=/trunk/; revision=37752
2008-11-29 22:48:58 +00:00
Timo Kreuzer
65e82782c9 Win32 structure cleanup part 3 / x:
- rename DESKTOP_OBJECT to DESKTOP

svn path=/trunk/; revision=36789
2008-10-17 13:09:56 +00:00
Timo Kreuzer
d13301ae65 Win32 structure cleanup part 1 / x:
- replace W32THREAD with THREADINFO, define W32THREAD like it's on Windows and make it part of THREADINFO.

svn path=/trunk/; revision=36769
2008-10-16 17:52:38 +00:00
Jeffrey Morlan
af7891739c NtUserBeginPaint: Taking the bounding box of the update region first and clipping it to the client area afterwards was making rcPaint contain the entire client area when scrolling. It should be done the other way around: clip to the client area first, then box. Since there is already a clipped update region in the DC, this is easy; just use GdiGetClipBox.
svn path=/trunk/; revision=34923
2008-07-29 02:08:56 +00:00
James Tabor
2ac4cc37b5 Rename and add new internal functions.
svn path=/trunk/; revision=33723
2008-05-27 01:38:01 +00:00
Hervé Poussineau
35aafac05c Don't depend of UNICODE/_UNICODE
svn path=/trunk/; revision=33369
2008-05-08 16:29:50 +00:00
Timo Kreuzer
3a8626a802 - Rename GDIOBJ_AllocObj to GDIOBJ_allocObjWithHandle and make it return a pointer to a locked object.c
- Implement GDIOBJ_AllocObjDepricated as a wrapper for those functions that currently still need the old way of allocation. Will be gone soon
- Implement GDIOBJ_AllocObj that only allocates a memory object without a handle
- Rename GDIOBJ_FreeObject to GDIOBJ_FreeObjByHandle
- Implement GDIOBJ_FreeObj that only frees the memory object
- Rename all XXX_Alloc and XXX_Free functions accordingly
- Fix NtGdiCreateClientObject and NtGdiDeleteClientObject
- Reformat TextIntCreateFontIndirect
- NtGdiHfontCreate: reformat and MmCopyFromCaller -> SEH

svn path=/trunk/; revision=32721
2008-03-19 00:56:40 +00:00
Timo Kreuzer
4e4095383f - Set the BaseObject.hHmgr field in GDIOBJ_AllocObj
- rename RGNDATA_ functions to REGION_ to have a consistent naming.
- move REGION prototypes to region.h
- rename REGION_AllocRgn to REGION_AllocRgnWithHandle and make it return a pointer to a locked region.
- rename UnsafeIntGetRgnBox to REGION_GetRgnBox
- rename UnsafeIntRectInRegion to REGION_RectInRegion
- remove UnsafeIntUnionRectWithRgn maco
- implement REGION_SetRectRgn and call it from NtGdiSetRectRgn
- reorder some parameters
- remove REGION_CropRgn, use REGION_CropAndOffsetRegion instead
- Implement UserShowCursor based on the code from NtUserCallOneParam and call it from inside the switch statement.

svn path=/trunk/; revision=32713
2008-03-17 22:17:48 +00:00
Timo Kreuzer
c11d265144 Bye, bye, GDIOBJ header! You've served us well, but now the time has come for you to make room for BASEOBJECT.
Also bye, bye, HandleTable parameter. You've never done any reasonable job, so no one will be missing you.

svn path=/trunk/; revision=32497
2008-02-26 23:09:20 +00:00
Timo Kreuzer
16956db4f1 - Reference CursorIcon before deleting it
- IntGetPaintMessage: Set MessageQueue->PaintCount to 0, if no dirty Window is found. Stops spamming the debuglog, once is enough.
- UserGetDCEx: Check if a dce's hDC is valid, if not warn and create a new one. With our current code those hDCs should never get deleted, but this is also a hack, on Windows you can delete them.
- Don't dump the stack backtrace twice in GDIOBJ_Xxx functions

svn path=/trunk/; revision=32473
2008-02-25 01:32:17 +00:00
Timo Kreuzer
ebc9271c72 some cleanup
- move NtGdiFlushUserBatch prototype to ntgdi.h
- move pool tags from ntgdihdl.h to win32k/tags.h
- move DC struct from ntgdihdl.h to win32k/dc.h
- replace GDIEMPTYHDR with BASEOBJECT
- use BASEOBJECT in DC and GDIDEVICE structures
- rename some NtGdiXxx functions that don't deserve that name and remove some that were defined by a macro, but don't exist on windows (#if 0'ed atm)
- remove RetrieveDisplayHDC() prototype (doesn't exist)

svn path=/trunk/; revision=32419
2008-02-18 23:05:41 +00:00
James Tabor
b5c759cceb Fix regression in RealizePalette. Send broadcast message if palette was changed.
svn path=/trunk/; revision=31621
2008-01-06 06:57:57 +00:00
James Tabor
4197bbe411 Removed NtGdiExtTextOut/PolyTextOut. Update related files.
svn path=/trunk/; revision=31619
2008-01-06 02:16:09 +00:00
Timo Kreuzer
4bb2dd0e07 replace NtGdiSelectObject with NtGdiSelectBitmap, NtGdiSelectBrush and NtGdiSelectFont in painting.c
svn path=/trunk/; revision=30925
2007-12-01 01:14:52 +00:00
Thomas Bluemel
fdb8bd5a53 Optimize GetWindowText(Length)A/W and WM_GETTEXT(LENGTH)
svn path=/trunk/; revision=30490
2007-11-16 02:37:14 +00:00
Thomas Bluemel
4fae2f5e49 Implement GetWindowLongA/W without having to call win32k for most cases
svn path=/trunk/; revision=30477
2007-11-15 22:08:13 +00:00
Thomas Bluemel
23c877364c - Fix desktop heaps handling and various bugs
- Begin superseding the WINDOW_OBJECT structure by WINDOW which is located on the desktop heap
- Implement GetClientRect() and GetWindowRect() to read the information from the desktop heap

svn path=/trunk/; revision=30467
2007-11-15 19:42:41 +00:00
Hervé Poussineau
233f55f44f Do not check for a system menu on the NULL window
svn path=/trunk/; revision=30388
2007-11-12 13:36:34 +00:00
Timo Kreuzer
a8f9ec7c2a - NtUserScrollDC() only returns TRUE or FALSE
- NtGdiBitBlt(): don't SetLastError() on invalid dc, don't DPRINT1, DPRINT is enough.
- IntGdiGetClipBox(): don't SetLastError() on invalid dc

svn path=/trunk/; revision=30344
2007-11-11 00:41:27 +00:00
Timo Kreuzer
fffc7ba078 UserScrollDC: 2nd try to fix the invalidated region. desk.cpl looks ok now and in my tests all worked like on XP, also fix the returned invalidated rect (don't use NtGdiGetClipBox)
NtUserScrollDC: return the region type
NtUserScrollwindowEx: fix the default clip region

svn path=/trunk/; revision=29903
2007-10-26 22:08:53 +00:00
Timo Kreuzer
f95e0ccee8 UserScrollDC:
- rename rcScroll to rcClip
- simplify calculation of source point
- fix calculation of invalidated region

svn path=/trunk/; revision=29890
2007-10-25 23:10:50 +00:00
Daniel Reimer
ae7da04787 Delete all Trailing spaces in code.
svn path=/trunk/; revision=29690
2007-10-19 23:21:45 +00:00
Thomas Bluemel
9849a423d6 Tweak the ScrollDC implementation a bit so that it produces a better output. The implementation still is completely incorrect as it should call the driver for this operation instead of doing a BitBlt operation...
svn path=/trunk/; revision=29670
2007-10-19 03:23:04 +00:00
Timo Kreuzer
52b31af55d implement NtUserInvalidateRect and NtUserInvalidateRgn
svn path=/trunk/; revision=28033
2007-07-30 03:30:55 +00:00
Timo Kreuzer
0aa1be9e3f probe and copy hdc from usermode PAINTSTRUCT using SEH
svn path=/trunk/; revision=28028
2007-07-30 01:39:26 +00:00
Timo Kreuzer
caeec5d190 - TextOutW: call NtGdiExtTextOut
- remove NtGdiTextOut from win32k
todo: NtGdiExtTextOut -> NtGdiExtTextOutW (does someone know what the 9th parameter is?)

svn path=/trunk/; revision=27840
2007-07-26 13:57:17 +00:00
Timo Kreuzer
e4aff98165 UserScrollDC (complete rewrite):
- include the region that could not be copied (invisible before) into invalid region
- use less regions and calculations
- return the type of the invalidated region (used by NtUserScrollWindowEx)
- Remove LPtoDP and DPtoPL. Everything is now in logical coordinates.
NtUserScrollDC:
- use SEH for buffer transfer
NtUserScrollWindowEx:
- use SEH for buffer transfer instead of MmCopyFromCaller
- use SEH to write back to usermode
- return the type of invalid region not of the invalidated region (nothing if SW_INVALIDATE is not set)
- use members of WINDOW_OBJECT instead of calling IntWinListChildren
Use hungarian notation for variables

fixes bug 2237
See issue #2237 for more details.

svn path=/trunk/; revision=27815
2007-07-25 21:51:56 +00:00
Aleksey Bragin
3c7b25d58e - Revert vis.c and winpos.c changes from 27672, due to a bug 2409.
- Fix win32k compiling without compilation units.

See issue #2409 for more details.

svn path=/trunk/; revision=27726
2007-07-19 12:43:54 +00:00
Timo Kreuzer
5a95124349 - fix IntValidateParent
- validate Parent windows on moving pixels
(both was fine earlier, but has been messed up recently)
- move sending of WM_SIZE and WM_MOVE from co_WinPosShowWindow to co_WinPosSetWindowPos
co_WinPosSetWindowPos:
- instantly erase when drawing windows or exposing region
- Invalidate child windows on BeginPaint
This should fix most window redrawing bugs and also (hopefully) speed up the gui (less redrawing).

svn path=/trunk/; revision=27672
2007-07-15 03:30:03 +00:00
Timo Kreuzer
0a3292ae0a co_UserRedrawWindow(): Don't use region after it was deleted -> hRgn = NULL
svn path=/trunk/; revision=27315
2007-06-28 19:23:59 +00:00