ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
40 participants
704 discussions
Start a n
N
ew thread
[ion] 20367: - Major Win32k Header Cleanup: Add ntgdi.h based on latest Platform SDK Public header. It contains the official definitions for NtGdi APIs.
by ion@svn.reactos.com
- Major Win32k Header Cleanup: Add ntgdi.h based on latest Platform SDK Public header. It contains the official definitions for NtGdi APIs. - Added ntgdityps.h for structures needed to use the header (which were sadly not publically shipped). - Removed internal win32k header data from public headers and put it to internal win32k headers. - Fixed ntuser.h STDCALL->WINAPI. - Added ntgdihdl.h for shared GDI Handle information between gdi32/win32k - Added ntusrtyp.h for some shared NtUser types. - Added ntgdibad.h which contains all non-compatible NtGdi prototypes, along with a detailed comment for each, and information on how to fix it. I had a 20 000+ line patch fixing all these issues, but it contained many bugs and I scrapped it in place for this approach, which while dirtier at first, simplifies the number of changes needed so that others can work on it as well. - Fixed some gdi32/win32k/user32 header issues. Deleted: trunk/reactos/include/win32k/bitmaps.h Deleted: trunk/reactos/include/win32k/brush.h Deleted: trunk/reactos/include/win32k/caret.h Deleted: trunk/reactos/include/win32k/cliprgn.h Deleted: trunk/reactos/include/win32k/color.h Deleted: trunk/reactos/include/win32k/coord.h Deleted: trunk/reactos/include/win32k/cursoricon.h Deleted: trunk/reactos/include/win32k/dc.h Deleted: trunk/reactos/include/win32k/driver.h Deleted: trunk/reactos/include/win32k/fillshap.h Deleted: trunk/reactos/include/win32k/float.h Deleted: trunk/reactos/include/win32k/font.h Deleted: trunk/reactos/include/win32k/gdiobj.h Deleted: trunk/reactos/include/win32k/icm.h Deleted: trunk/reactos/include/win32k/kapi.h Deleted: trunk/reactos/include/win32k/line.h Deleted: trunk/reactos/include/win32k/math.h Deleted: trunk/reactos/include/win32k/menu.h Deleted: trunk/reactos/include/win32k/metafile.h Deleted: trunk/reactos/include/win32k/misc.h Deleted: trunk/reactos/include/win32k/ntddraw.h Added: trunk/reactos/include/win32k/ntgdibad.h Added: trunk/reactos/include/win32k/ntgdihdl.h Added: trunk/reactos/include/win32k/ntgdityp.h Modified: trunk/reactos/include/win32k/ntuser.h Added: trunk/reactos/include/win32k/ntusrtyp.h Deleted: trunk/reactos/include/win32k/paint.h Deleted: trunk/reactos/include/win32k/path.h Deleted: trunk/reactos/include/win32k/pen.h Deleted: trunk/reactos/include/win32k/print.h Deleted: trunk/reactos/include/win32k/region.h Deleted: trunk/reactos/include/win32k/text.h Deleted: trunk/reactos/include/win32k/win32k.h Deleted: trunk/reactos/include/win32k/wingl.h Modified: trunk/reactos/lib/gdi32/gdi32.def Added: trunk/reactos/lib/gdi32/include/gdi32p.h Modified: trunk/reactos/lib/gdi32/include/precomp.h Modified: trunk/reactos/lib/gdi32/misc/gdientry.c Modified: trunk/reactos/lib/gdi32/misc/stubs.c Modified: trunk/reactos/lib/gdi32/misc/stubsa.c Modified: trunk/reactos/lib/gdi32/misc/stubsw.c Modified: trunk/reactos/lib/gdi32/misc/wingl.c Modified: trunk/reactos/lib/gdi32/objects/bitmap.c Modified: trunk/reactos/lib/gdi32/objects/brush.c Modified: trunk/reactos/lib/gdi32/objects/dc.c Modified: trunk/reactos/lib/gdi32/objects/font.c Modified: trunk/reactos/lib/gdi32/objects/path.c Modified: trunk/reactos/lib/user32/include/user32.h Modified: trunk/reactos/subsys/win32k/eng/objects.h Added: trunk/reactos/subsys/win32k/include/bitmaps.h Added: trunk/reactos/subsys/win32k/include/brush.h Modified: trunk/reactos/subsys/win32k/include/color.h Added: trunk/reactos/subsys/win32k/include/coord.h Added: trunk/reactos/subsys/win32k/include/dc.h Modified: trunk/reactos/subsys/win32k/include/dib.h Added: trunk/reactos/subsys/win32k/include/driver.h Added: trunk/reactos/subsys/win32k/include/gdifloat.h Added: trunk/reactos/subsys/win32k/include/gdiobj.h Modified: trunk/reactos/subsys/win32k/include/intgdi.h Modified: trunk/reactos/subsys/win32k/include/menu.h Added: trunk/reactos/subsys/win32k/include/misc.h Modified: trunk/reactos/subsys/win32k/include/object.h Modified: trunk/reactos/subsys/win32k/include/path.h Added: trunk/reactos/subsys/win32k/include/pen.h Added: trunk/reactos/subsys/win32k/include/region.h Modified: trunk/reactos/subsys/win32k/include/text.h Modified: trunk/reactos/subsys/win32k/include/win32k.h Modified: trunk/reactos/subsys/win32k/main/dllmain.c Modified: trunk/reactos/subsys/win32k/ntddraw/stubs.c Modified: trunk/reactos/subsys/win32k/ntuser/cursoricon.c Modified: trunk/reactos/subsys/win32k/ntuser/desktop.c Modified: trunk/reactos/subsys/win32k/ntuser/menu.c Modified: trunk/reactos/subsys/win32k/ntuser/painting.c Modified: trunk/reactos/subsys/win32k/ntuser/winpos.c Modified: trunk/reactos/subsys/win32k/objects/bitmaps.c Modified: trunk/reactos/subsys/win32k/objects/brush.c Modified: trunk/reactos/subsys/win32k/objects/dc.c Modified: trunk/reactos/subsys/win32k/objects/dib.c Modified: trunk/reactos/subsys/win32k/objects/icm.c Modified: trunk/reactos/subsys/win32k/objects/line.c Modified: trunk/reactos/subsys/win32k/objects/paint.c Modified: trunk/reactos/subsys/win32k/objects/path.c Modified: trunk/reactos/subsys/win32k/objects/pen.c Modified: trunk/reactos/subsys/win32k/objects/print.c Modified: trunk/reactos/subsys/win32k/objects/region.c Modified: trunk/reactos/subsys/win32k/objects/text.c Modified: trunk/reactos/subsys/win32k/objects/wingl.c Modified: trunk/reactos/subsys/win32k/w32k.h Modified: trunk/reactos/tools/nci/w32ksvc.db Added: trunk/reactos/w32api/include/ntgdi.h Modified: trunk/reactos/w32api/include/wingdi.h _____ Deleted: trunk/reactos/include/win32k/bitmaps.h --- trunk/reactos/include/win32k/bitmaps.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/bitmaps.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,343 +0,0 @@ -#ifndef __WIN32K_BITMAPS_H -#define __WIN32K_BITMAPS_H - -/* GDI logical bitmap object */ -typedef struct _BITMAPOBJ -{ - SURFOBJ SurfObj; - FLONG flHooks; - FLONG flFlags; - SIZE dimension; /* For SetBitmapDimension(), do NOT use - to get width/height of bitmap, use - bitmap.bmWidth/bitmap.bmHeight for - that */ -#ifdef NTOS_MODE_USER - PVOID BitsLock; -#else - PFAST_MUTEX BitsLock; /* You need to hold this lock before you touch - the actual bits in the bitmap */ -#endif - - /* For device-independent bitmaps: */ - DIBSECTION *dib; - HPALETTE hDIBPalette; -} BITMAPOBJ, *PBITMAPOBJ; - -#define BITMAPOBJ_IS_APIBITMAP 0x1 - -/* Internal interface */ - -#define BITMAPOBJ_AllocBitmap() \ - ((HBITMAP) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BITMAP)) -#define BITMAPOBJ_FreeBitmap(hBMObj) \ - GDIOBJ_FreeObj((HGDIOBJ) hBMObj, GDI_OBJECT_TYPE_BITMAP) -/* NOTE: Use shared locks! */ -#define BITMAPOBJ_LockBitmap(hBMObj) (PBITMAPOBJ)EngLockSurface((HSURF)hBMObj) -#define BITMAPOBJ_UnlockBitmap(pBMObj) EngUnlockSurface(&pBMObj->SurfObj) -BOOL INTERNAL_CALL BITMAP_Cleanup(PVOID ObjectBody); - -BOOL INTERNAL_CALL BITMAPOBJ_InitBitsLock(BITMAPOBJ *pBMObj); -#define BITMAPOBJ_LockBitmapBits(pBMObj) ExEnterCriticalRegionAndAcquireFastMutexUnsafe((pBMObj)->BitsLock) -#define BITMAPOBJ_UnlockBitmapBits(pBMObj) ExReleaseFastMutexUnsafeAndLeaveCriticalRegion((pBMObj)->BitsLock) -void INTERNAL_CALL BITMAPOBJ_CleanupBitsLock(BITMAPOBJ *pBMObj); - -INT FASTCALL BITMAPOBJ_GetWidthBytes (INT bmWidth, INT bpp); -HBITMAP FASTCALL BITMAPOBJ_CopyBitmap (HBITMAP hBitmap); -INT FASTCALL DIB_GetDIBWidthBytes (INT width, INT depth); -int STDCALL DIB_GetDIBImageBytes (INT width, INT height, INT depth); -INT FASTCALL DIB_BitmapInfoSize (const BITMAPINFO * info, WORD coloruse); -INT STDCALL BITMAP_GetObject(BITMAPOBJ * bmp, INT count, LPVOID buffer); -HBITMAP FASTCALL BitmapToSurf(PBITMAPOBJ BitmapObj, HDEV GDIDevice); - -HBITMAP FASTCALL IntCreateCompatibleBitmap(PDC Dc, INT Width, INT Height); - -/* User Entry Points */ -BOOL -STDCALL -NtGdiAlphaBlend( - HDC hDCDest, - INT XOriginDest, - INT YOriginDest, - INT WidthDest, - INT HeightDest, - HDC hDCSrc, - INT XOriginSrc, - INT YOriginSrc, - INT WidthSrc, - INT HeightSrc, - BLENDFUNCTION BlendFunc); - -BOOL -STDCALL -NtGdiBitBlt ( - HDC hDCDest, - INT XDest, - INT YDest, - INT Width, - INT Height, - HDC hDCSrc, - INT XSrc, - INT YSrc, - DWORD ROP - ); -HBITMAP -STDCALL -NtGdiCreateBitmap ( - INT Width, - INT Height, - UINT Planes, - UINT BitsPerPel, - CONST VOID * Bits - ); -HBITMAP -STDCALL -NtGdiCreateCompatibleBitmap ( - HDC hDC, - INT Width, - INT Height - ); -HBITMAP -STDCALL -NtGdiCreateBitmapIndirect ( - CONST BITMAP * BM - ); -HBITMAP -STDCALL -NtGdiCreateDIBitmap ( - HDC hDC, - CONST BITMAPINFOHEADER * bmih, - DWORD Init, - CONST VOID * bInit, - CONST BITMAPINFO * bmi, - UINT Usage - ); -HBITMAP -STDCALL -NtGdiCreateDIBSection ( - HDC hDC, - CONST BITMAPINFO * bmi, - UINT Usage, - VOID * Bits, - HANDLE hSection, - DWORD dwOffset - ); -HBITMAP -STDCALL -NtGdiCreateDiscardableBitmap ( - HDC hDC, - INT Width, - INT Height - ); -BOOL -STDCALL -NtGdiExtFloodFill ( - HDC hDC, - INT XStart, - INT YStart, - COLORREF Color, - UINT FillType - ); -BOOL -STDCALL -NtGdiFloodFill ( - HDC hDC, - INT XStart, - INT YStart, - COLORREF Fill - ); -LONG -STDCALL -NtGdiGetBitmapBits ( - HBITMAP hBitmap, - LONG Buffer, - LPVOID Bits - ); -BOOL -STDCALL -NtGdiGetBitmapDimensionEx ( - HBITMAP hBitmap, - LPSIZE Dimension - ); -UINT -STDCALL -NtGdiGetDIBColorTable ( - HDC hDC, - UINT StartIndex, - UINT Entries, - RGBQUAD * Colors - ); -INT -STDCALL -NtGdiGetDIBits ( - HDC hDC, - HBITMAP hBitmap, - UINT StartScan, - UINT ScanLines, - LPVOID Bits, - LPBITMAPINFO bi, - UINT Usage - ); -COLORREF -STDCALL -NtGdiGetPixel ( - HDC hDC, - INT XPos, - INT YPos - ); -BOOL -STDCALL -NtGdiGradientFill ( - HDC hdc, - PTRIVERTEX pVertex, - ULONG uVertex, - PVOID pMesh, - ULONG uMesh, - ULONG ulMode - ); -BOOL -STDCALL -NtGdiMaskBlt ( - HDC hDCDest, - INT XDest, - INT YDest, - INT Width, - INT Height, - HDC hDCSrc, - INT XSrc, - INT YSrc, - HBITMAP hMaskBitmap, - INT xMask, - INT yMask, - DWORD ROP - ); -BOOL -STDCALL -NtGdiPlgBlt ( - HDC hDCDest, - CONST POINT * Point, - HDC hDCSrc, - INT XSrc, - INT YSrc, - INT Width, - INT Height, - HBITMAP hMaskBitmap, - INT xMask, - INT yMask - ); -LONG -STDCALL -NtGdiSetBitmapBits ( - HBITMAP hBitmap, - DWORD Bytes, - CONST VOID * Bits - ); -BOOL -STDCALL -NtGdiSetBitmapDimensionEx ( - HBITMAP hBitmap, - INT Width, - INT Height, - LPSIZE Size - ); -UINT -STDCALL -NtGdiSetDIBColorTable ( - HDC hDC, - UINT StartIndex, - UINT Entries, - CONST RGBQUAD * Colors - ); -INT -STDCALL -NtGdiSetDIBits ( - HDC hDC, - HBITMAP hBitmap, - UINT StartScan, - UINT ScanLines, - CONST VOID * Bits, - CONST BITMAPINFO * bmi, - UINT ColorUse - ); -INT -STDCALL -NtGdiSetDIBitsToDevice ( - HDC hDC, - INT XDest, - INT YDest, - DWORD Width, - DWORD Height, - INT XSrc, - INT YSrc, - UINT StartScan, - UINT ScanLines, - CONST VOID * Bits, - CONST BITMAPINFO * bmi, - UINT ColorUse - ); -COLORREF -STDCALL -NtGdiSetPixel ( - HDC hDC, - INT X, - INT Y, - COLORREF Color - ); -BOOL -STDCALL -NtGdiSetPixelV ( - HDC hDC, - INT X, - INT Y, - COLORREF Color - ); -BOOL -STDCALL -NtGdiStretchBlt ( - HDC hDCDest, - INT XOriginDest, - INT YOriginDest, - INT WidthDest, - INT HeightDest, - HDC hDCSrc, - INT XOriginSrc, - INT YOriginSrc, - INT WidthSrc, - INT HeightSrc, - DWORD ROP - ); -INT -STDCALL -NtGdiStretchDIBits ( - HDC hDC, - INT XDest, - INT YDest, - INT DestWidth, - INT DestHeight, - INT XSrc, - INT YSrc, - INT SrcWidth, - INT SrcHeight, - CONST VOID * Bits, - CONST BITMAPINFO * BitsInfo, - UINT Usage, - DWORD ROP - ); - -BOOL -STDCALL -NtGdiTransparentBlt( - HDC hdcDst, - INT xDst, - INT yDst, - INT cxDst, - INT cyDst, - HDC hdcSrc, - INT xSrc, - INT ySrc, - INT cxSrc, - INT cySrc, - COLORREF TransColor - ); - -#endif - _____ Deleted: trunk/reactos/include/win32k/brush.h --- trunk/reactos/include/win32k/brush.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/brush.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,112 +0,0 @@ -#ifndef __WIN32K_BRUSH_H -#define __WIN32K_BRUSH_H - -#include <win32k/gdiobj.h> - -/* Internal interface */ - -#define NB_HATCH_STYLES 6 - -/* - * The layout of this structure is taken from "Windows Graphics Programming" - * book written by Feng Yuan. - * - * DON'T MODIFY THIS STRUCTURE UNLESS REALLY NEEDED AND EVEN THEN ASK ON - * A MAILING LIST FIRST. - */ - -typedef struct -{ - ULONG AttrFlags; - COLORREF lbColor; -} BRUSHATTR, *PBRUSHATTR; - -typedef struct -{ - ULONG ulStyle; - HBITMAP hbmPattern; - HANDLE hbmClient; - ULONG flAttrs; - - ULONG ulBrushUnique; - BRUSHATTR *pBrushAttr; - BRUSHATTR BrushAttr; - POINT ptOrigin; - ULONG bCacheGrabbed; - COLORREF crBack; - COLORREF crFore; - ULONG ulPalTime; - ULONG ulSurfTime; - PVOID ulRealization; - ULONG Unknown4C[3]; - POINT ptPenWidth; - ULONG ulPenStyle; - DWORD *pStyle; - ULONG dwStyleCount; - ULONG Unknown6C; -} GDIBRUSHOBJ, *PGDIBRUSHOBJ; - -typedef struct -{ - BRUSHOBJ BrushObject; - PGDIBRUSHOBJ GdiBrushObject; - XLATEOBJ *XlateObject; -} GDIBRUSHINST, *PGDIBRUSHINST; - -/* GDI Brush Attributes */ - -#define GDIBRUSH_NEED_BK_CLR 0x0002 /* Background color is needed */ -#define GDIBRUSH_DITHER_OK 0x0004 /* Allow color dithering */ -#define GDIBRUSH_IS_SOLID 0x0010 /* Solid brush */ -#define GDIBRUSH_IS_HATCH 0x0020 /* Hatch brush */ -#define GDIBRUSH_IS_BITMAP 0x0040 /* DDB pattern brush */ -#define GDIBRUSH_IS_DIB 0x0080 /* DIB pattern brush */ -#define GDIBRUSH_IS_NULL 0x0100 /* Null/hollow brush */ -#define GDIBRUSH_IS_GLOBAL 0x0200 /* Stock objects */ -#define GDIBRUSH_IS_PEN 0x0400 /* Pen */ -#define GDIBRUSH_IS_OLDSTYLEPEN 0x0800 /* Geometric pen */ -#define GDIBRUSH_IS_MASKING 0x8000 /* Pattern bitmap is used as transparent mask (?) */ -#define GDIBRUSH_CACHED_IS_SOLID 0x80000000 - -#define BRUSHOBJ_AllocBrush() ((HBRUSH) GDIOBJ_AllocObj (GDI_OBJECT_TYPE_BRUSH)) -#define BRUSHOBJ_FreeBrush(hBrush) GDIOBJ_FreeObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH) -#define BRUSHOBJ_LockBrush(hBrush) ((PGDIBRUSHOBJ)GDIOBJ_LockObj((HGDIOBJ)hBrush, GDI_OBJECT_TYPE_BRUSH)) -#define BRUSHOBJ_UnlockBrush(pBrush) GDIOBJ_UnlockObjByPtr(pBrush) -BOOL INTERNAL_CALL BRUSH_Cleanup(PVOID ObjectBody); - -HBRUSH STDCALL -NtGdiCreateBrushIndirect( - CONST LOGBRUSH *LogBrush); - -HBRUSH STDCALL -NtGdiCreateDIBBrush( - CONST BITMAPINFO *BitmapInfoAndData, - UINT ColorSpec, - UINT BitmapInfoSize, - CONST VOID *PackedDIB); - -HBRUSH STDCALL -NtGdiCreateHatchBrush( - INT Style, - COLORREF Color); - -HBRUSH STDCALL -NtGdiCreatePatternBrush( - HBITMAP hBitmap); - -HBRUSH STDCALL -NtGdiCreateSolidBrush( - COLORREF Color); - -BOOL STDCALL -NtGdiFixBrushOrgEx( - VOID); - -BOOL STDCALL -NtGdiSetBrushOrgEx( - HDC hDC, - INT XOrg, - INT YOrg, - LPPOINT Point); - -#endif _____ Deleted: trunk/reactos/include/win32k/caret.h --- trunk/reactos/include/win32k/caret.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/caret.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,23 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: include/win32k/caret.h - * PURPOSE: GDI32/Win32k Caret interface - * PROGRAMMER: - * - */ - -#ifndef WIN32K_CARET_H_INCLUDED -#define WIN32K_CARET_H_INCLUDED - -typedef struct _THRDCARETINFO -{ - HWND hWnd; - HBITMAP Bitmap; - POINT Pos; - SIZE Size; - BYTE Visible; - BYTE Showing; -} THRDCARETINFO, *PTHRDCARETINFO; - -#endif /* WIN32K_FONT_H_INCLUDED */ _____ Deleted: trunk/reactos/include/win32k/cliprgn.h --- trunk/reactos/include/win32k/cliprgn.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/cliprgn.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,81 +0,0 @@ -#ifndef _WIN32K_CLIPRGN_H -#define _WIN32K_CLIPRGN_H - -HRGN WINAPI SaveVisRgn(HDC hdc); -INT WINAPI SelectVisRgn(HDC hdc, HRGN hrgn); - -int -STDCALL -NtGdiExcludeClipRect ( - HDC hDC, - int LeftRect, - int TopRect, - int RightRect, - int BottomRect - ); -int -STDCALL -NtGdiExtSelectClipRgn ( - HDC hDC, - HRGN hrgn, - int fnMode - ); -int -STDCALL -NtGdiGetClipBox ( - HDC hDC, - LPRECT rc - ); -int -STDCALL -NtGdiGetMetaRgn ( - HDC hDC, - HRGN hrgn - ); -int -STDCALL -NtGdiIntersectClipRect ( - HDC hDC, - int LeftRect, - int TopRect, - int RightRect, - int BottomRect - ); -int -STDCALL -NtGdiOffsetClipRgn ( - HDC hDC, - int XOffset, - int YOffset - ); -BOOL -STDCALL -NtGdiPtVisible ( - HDC hDC, - int X, - int Y - ); -BOOL -STDCALL -NtGdiRectVisible ( - HDC hDC, - CONST PRECT rc - ); -BOOL -STDCALL -NtGdiSelectClipPath ( - HDC hDC, - int Mode - ); -int -STDCALL -NtGdiSelectClipRgn ( - HDC hDC, - HRGN hrgn - ); -int -STDCALL -NtGdiSetMetaRgn ( - HDC hDC - ); -#endif _____ Deleted: trunk/reactos/include/win32k/color.h --- trunk/reactos/include/win32k/color.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/color.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,116 +0,0 @@ -#ifndef __WIN32K_COLOR_H -#define __WIN32K_COLOR_H - -#ifndef CLR_INVALID -#define CLR_INVALID 0xffffffff -#endif -#define PC_SYS_USED 0x80 /* palentry is used (both system and logical) */ -#define PC_SYS_RESERVED 0x40 /* system palentry is not to be mapped to */ -#define PC_SYS_MAPPED 0x10 /* logical palentry is a direct alias for system palentry */ - -BOOL -STDCALL -NtGdiAnimatePalette ( - HPALETTE hpal, - UINT StartIndex, - UINT Entries, - CONST PPALETTEENTRY ppe - ); -HPALETTE -STDCALL -NtGdiCreateHalftonePalette ( - HDC hDC - ); -HPALETTE -STDCALL -NtGdiCreatePalette ( - CONST PLOGPALETTE lgpl - ); -BOOL -STDCALL -NtGdiGetColorAdjustment ( - HDC hDC, - LPCOLORADJUSTMENT ca - ); -COLORREF -STDCALL -NtGdiGetNearestColor ( - HDC hDC, - COLORREF Color - ); -UINT -STDCALL -NtGdiGetNearestPaletteIndex ( - HPALETTE hpal, - COLORREF Color - ); -UINT -STDCALL -NtGdiGetPaletteEntries ( - HPALETTE hpal, - UINT StartIndex, - UINT Entries, - LPPALETTEENTRY pe - ); -UINT -STDCALL -NtGdiGetSystemPaletteEntries ( - HDC hDC, - UINT StartIndex, - UINT Entries, - LPPALETTEENTRY pe - ); -UINT -STDCALL -NtGdiGetSystemPaletteUse ( - HDC hDC - ); -UINT -STDCALL -NtGdiRealizePalette ( - HDC hDC - ); -BOOL -STDCALL -NtGdiResizePalette ( - HPALETTE hpal, - UINT Entries - ); -HPALETTE -STDCALL -NtGdiSelectPalette ( - HDC hDC, - HPALETTE hpal, - BOOL ForceBackground - ); -BOOL -STDCALL -NtGdiSetColorAdjustment ( - HDC hDC, - CONST LPCOLORADJUSTMENT ca - ); -UINT -STDCALL -NtGdiSetPaletteEntries ( - HPALETTE hpal, - UINT Start, - UINT Entries, - CONST LPPALETTEENTRY pe - ); -UINT -STDCALL -NtGdiSetSystemPaletteUse ( - HDC hDC, - UINT Usage - ); -BOOL -STDCALL -NtGdiUnrealizeObject ( - HGDIOBJ hgdiobj - ); -BOOL -STDCALL -NtGdiUpdateColors ( - HDC hDC - ); -#endif _____ Deleted: trunk/reactos/include/win32k/coord.h --- trunk/reactos/include/win32k/coord.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/coord.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,151 +0,0 @@ -#ifndef __WIN32K_COORD_H -#define __WIN32K_COORD_H - -BOOL -STDCALL -NtGdiCombineTransform ( - LPXFORM XformResult, - CONST LPXFORM xform1, - CONST LPXFORM xform2 - ); - -VOID -FASTCALL -IntDPtoLP ( PDC dc, LPPOINT Points, INT Count ); - -VOID -FASTCALL -CoordDPtoLP ( PDC Dc, LPPOINT Point ); - -BOOL -STDCALL -NtGdiDPtoLP ( - HDC hDC, - LPPOINT Points, - int Count - ); - -int -FASTCALL -IntGetGraphicsMode ( PDC dc ); - -int -STDCALL -NtGdiGetGraphicsMode ( HDC hDC ); - -BOOL -STDCALL -NtGdiGetWorldTransform ( - HDC hDC, - LPXFORM Xform - ); - -VOID -FASTCALL -CoordLPtoDP ( PDC Dc, LPPOINT Point ); - -VOID -FASTCALL -IntLPtoDP ( PDC dc, LPPOINT Points, INT Count ); - -BOOL -STDCALL -NtGdiLPtoDP ( - HDC hDC, - LPPOINT Points, - int Count - ); -BOOL -STDCALL -NtGdiModifyWorldTransform ( - HDC hDC, - CONST LPXFORM Xform, - DWORD Mode - ); -BOOL -STDCALL -NtGdiOffsetViewportOrgEx ( - HDC hDC, - int XOffset, - int YOffset, - LPPOINT Point - ); -BOOL -STDCALL -NtGdiOffsetWindowOrgEx ( - HDC hDC, - int XOffset, - int YOffset, - LPPOINT Point - ); -BOOL -STDCALL -NtGdiScaleViewportExtEx ( - HDC hDC, - int Xnum, - int Xdenom, - int Ynum, - int Ydenom, - LPSIZE Size - ); -BOOL -STDCALL -NtGdiScaleWindowExtEx ( - HDC hDC, - int Xnum, - int Xdenom, - int Ynum, - int Ydenom, - LPSIZE Size - ); -int -STDCALL -NtGdiSetGraphicsMode ( - HDC hDC, - int Mode - ); -int -STDCALL -NtGdiSetMapMode ( - HDC hDC, - int MapMode - ); -BOOL -STDCALL -NtGdiSetViewportExtEx ( - HDC hDC, - int XExtent, - int YExtent, - LPSIZE Size - ); -BOOL -STDCALL -NtGdiSetViewportOrgEx ( - HDC hDC, - int X, - int Y, - LPPOINT Point - ); -BOOL -STDCALL -NtGdiSetWindowExtEx ( - HDC hDC, - int XExtent, - int YExtent, - LPSIZE Size - ); -BOOL -STDCALL -NtGdiSetWindowOrgEx ( - HDC hDC, - int X, - int Y, - LPPOINT Point - ); -BOOL -STDCALL -NtGdiSetWorldTransform ( - HDC hDC, - CONST LPXFORM Xform - ); -#endif _____ Deleted: trunk/reactos/include/win32k/cursoricon.h --- trunk/reactos/include/win32k/cursoricon.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/cursoricon.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,95 +0,0 @@ - -#ifndef __WIN32K_CURSORICON_H -#define __WIN32K_CURSORICON_H - -#include <pshpack1.h> - -/* Structures for reading icon/cursor files and resources */ -// Structures for reading icon files and resources -typedef struct _ICONIMAGE -{ - BITMAPINFOHEADER icHeader; // DIB header - RGBQUAD icColors[1]; // Color table - BYTE icXOR[1]; // DIB bits for XOR mask - BYTE icAND[1]; // DIB bits for AND mask -} ICONIMAGE, *LPICONIMAGE; - -typedef struct _CURSORIMAGE -{ - BITMAPINFOHEADER icHeader; // DIB header - RGBQUAD icColors[1]; // Color table - BYTE icXOR[1]; // DIB bits for XOR mask - BYTE icAND[1]; // DIB bits for AND mask -} CURSORIMAGE, *LPCURSORIMAGE; - -typedef struct -{ - BYTE bWidth; - BYTE bHeight; - BYTE bColorCount; - BYTE bReserved; -} ICONRESDIR; - -typedef struct -{ - WORD wWidth; - WORD wHeight; -} CURSORRESDIR; - -typedef struct -{ - WORD wPlanes; // Number of Color Planes in the XOR image - WORD wBitCount; // Bits per pixel in the XOR image -} ICONDIR; - -typedef struct -{ - WORD wXHotspot; // Number of Color Planes in the XOR image - WORD wYHotspot; // Bits per pixel in the XOR image -} CURSORDIR; - -typedef struct -{ - BYTE bWidth; // Width, in pixels, of the icon image - BYTE bHeight; // Height, in pixels, of the icon image - BYTE bColorCount; // Number of colors in image (0 if >=8bpp) - BYTE bReserved; // Reserved ( must be 0) - union - { ICONDIR icon; - CURSORDIR cursor; - } Info; - DWORD dwBytesInRes; // How many bytes in this resource? - DWORD dwImageOffset; // Where in the file is this image? -} CURSORICONDIRENTRY; - -typedef struct -{ - WORD idReserved; // Reserved (must be 0) - WORD idType; // Resource Type (1 for icons, 0 for cursors) - WORD idCount; // How many images? - CURSORICONDIRENTRY idEntries[1]; // An entry for idCount number of images -} CURSORICONDIR; - -typedef struct -{ - union - { ICONRESDIR icon; - CURSORRESDIR cursor; - } ResInfo; - WORD wPlanes; // Color Planes - WORD wBitCount; // Bits per pixel - DWORD dwBytesInRes; // how many bytes in this resource? - WORD nID; // the ID -} GRPCURSORICONDIRENTRY; - -typedef struct -{ - WORD idReserved; // Reserved (must be 0) - WORD idType; // Resource type (1 for icons) - WORD idCount; // How many images? - GRPCURSORICONDIRENTRY idEntries[1]; // The entries for each image -} GRPCURSORICONDIR; - -#include <poppack.h> - -#endif _____ Deleted: trunk/reactos/include/win32k/dc.h --- trunk/reactos/include/win32k/dc.h 2005-12-27 03:12:00 UTC (rev 20366) +++ trunk/reactos/include/win32k/dc.h 2005-12-27 03:41:13 UTC (rev 20367) @@ -1,238 +0,0 @@ - -#ifndef __WIN32K_DC_H -#define __WIN32K_DC_H - -typedef struct _WIN_DC_INFO -{ - int flags; - HRGN hClipRgn; /* Clip region (may be 0) */ - HRGN hVisRgn; /* Visible region (must never be 0) */ - HRGN hGCClipRgn; /* GC clip region (ClipRgn AND VisRgn) */ - HPEN hPen; - HBRUSH hBrush; - HFONT hFont; - HBITMAP hBitmap; - HBITMAP hFirstBitmap; /* Bitmap selected at creation of the DC */ - -/* #if 0 */ - HANDLE hDevice; - HPALETTE hPalette; - - GdiPath path; -/* #endif */ - - WORD ROPmode; - WORD polyFillMode; - WORD stretchBltMode; - WORD relAbsMode; - WORD backgroundMode; - COLORREF backgroundColor; - COLORREF textColor; - - short brushOrgX; - short brushOrgY; - - WORD textAlign; /* Text alignment from SetTextAlign() */ - short charExtra; /* Spacing from SetTextCharacterExtra() */ - short breakTotalExtra; /* Total extra space for justification */ - short breakCount; /* Break char. count */ - short breakExtra; /* breakTotalExtra / breakCount */ [truncated at 1000 lines; 12716 more skipped]
18 years, 12 months
1
0
0
0
[ion] 20366: - Added support for NTLDR style freeloader GUI. To enable, edit freeldr.ini and add:
by ion@svn.reactos.com
- Added support for NTLDR style freeloader GUI. To enable, edit freeldr.ini and add: ShowTime=No MinimalUI=Yes MenuBox=No CenterMenu=No TimeText=Seconds until highlighted choice will be started automatically: Also make sure the following are set: MenuTextColor=Gray MenuColor=Black TextColor=Gray SelectedTextColor=Black SelectedColor=Gray. - Also made the boot-up screen black, not blue, since that's the actual color it's been after NT4. If booting without NOGUIBOOT, this results in a much nicer transition to the boot screen (especially if using the NTLDR theme) - Some other minor changes done to simplify transitions while booting. Hoping for filip to finish his Bootvid patch to remove the last annoying gui->text->gui switch near the end :). Modified: trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h Modified: trunk/reactos/boot/freeldr/freeldr/include/ui.h Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c Modified: trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c Modified: trunk/reactos/boot/freeldr/freeldr/ui/ui.c Modified: trunk/reactos/hal/halx86/generic/display.c Modified: trunk/reactos/hal/halx86/generic/halinit.c Modified: trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/ntoskrnl/io/driver.c _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h --- trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h 2005-12-27 03:06:35 UTC (rev 20365) +++ trunk/reactos/boot/freeldr/freeldr/include/ui/tui.h 2005-12-27 03:12:00 UTC (rev 20366) @@ -73,12 +73,12 @@ } TUI_MENU_INFO, *PTUI_MENU_INFO; -VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo); -VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo); -VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo); -VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber); -ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter); -BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); +VOID WINAPI TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo); +VOID WINAPI TuiDrawMenu(PTUI_MENU_INFO MenuInfo); +VOID WINAPI TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo); +VOID WINAPI TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber); +ULONG WINAPI TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter); +BOOL WINAPI TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter); /* _____ Modified: trunk/reactos/boot/freeldr/freeldr/include/ui.h --- trunk/reactos/boot/freeldr/freeldr/include/ui.h 2005-12-27 03:06:35 UTC (rev 20365) +++ trunk/reactos/boot/freeldr/freeldr/include/ui.h 2005-12-27 03:12:00 UTC (rev 20366) @@ -46,6 +46,10 @@ extern BOOL UserInterfaceUp; // Tells us if the user interface is displayed extern BOOL UiUseSpecialEffects; // Tells us if we should use fade effects +extern BOOL UiCenterMenu; +extern BOOL UiMenuBox; +extern BOOL UiMinimal; +extern CHAR UiTimeText[]; extern const CHAR UiMonthNames[12][15]; _____ Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c --- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2005-12-27 03:06:35 UTC (rev 20365) +++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c 2005-12-27 03:12:00 UTC (rev 20366) @@ -587,6 +587,10 @@ return; } + UiDrawBackdrop(); + UiDrawStatusText("Detecting Hardware..."); + UiDrawProgressBarCenter(1, 100, szLoadingMsg); + /* * Setup multiboot information structure */ @@ -677,19 +681,15 @@ strcat(reactos_kernel_cmdline, value); } - - UiDrawBackdrop(); - UiDrawStatusText("Detecting Hardware..."); - /* * Detect hardware */ MachHwDetect(); + UiDrawProgressBarCenter(5, 100, szLoadingMsg); if (AcpiPresent) LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE; UiDrawStatusText("Loading..."); - UiDrawProgressBarCenter(0, 100, szLoadingMsg); /* * Try to open system drive _____ Modified: trunk/reactos/boot/freeldr/freeldr/ui/tui.c --- trunk/reactos/boot/freeldr/freeldr/ui/tui.c 2005-12-27 03:06:35 UTC (rev 20365) +++ trunk/reactos/boot/freeldr/freeldr/ui/tui.c 2005-12-27 03:12:00 UTC (rev 20366) @@ -20,6 +20,8 @@ #include <freeldr.h> PVOID TextVideoBuffer = NULL; +extern BOOL UiDrawTime; +extern BOOL UiMinimal; /* * printf() - prints formatted text to stdout @@ -111,6 +113,25 @@ VOID TuiDrawBackdrop(VOID) { + if (UiMinimal) + { + // + // Fill in a black background + // + TuiFillArea(0, + 0, + UiScreenWidth - 1, + UiScreenHeight - 1, + 0, + 0); + + // + // Update the screen buffer + // + VideoCopyOffScreenBufferToVRAM(); + return; + } + // // Fill in the background (excluding title box & status bar) // @@ -429,6 +450,11 @@ { ULONG i; + // + // Minimal UI doesn't have a status bar + // + if (UiMinimal) return; + TuiDrawText(0, UiScreenHeight-1, " ", ATTR(UiStatusBarFgColor, UiStatusBarBgColor)); TuiDrawText(1, UiScreenHeight-1, StatusText, ATTR(UiStatusBarFgColor, UiStatusBarBgColor)); @@ -449,6 +475,9 @@ CHAR TempString[20]; BOOL PMHour = FALSE; + /* Don't draw the time if this has been disabled */ + if (!UiDrawTime) return; + MachRTCGetCurrentDateTime(&Year, &Month, &Day, &Hour, &Minute, &Second); if (Year < 1 || 9999 < Year || Month < 1 || 12 < Month || Day < 1 || 31 < Day || 23 < Hour || 59 < Minute || 59 < Second) @@ -663,10 +692,28 @@ ULONG Width = 50; // Allow for 50 "bars" ULONG Height = 2; - Left = (UiScreenWidth - Width - 4) / 2; - Right = Left + Width + 3; - Top = (UiScreenHeight - Height - 2) / 2; - Top += 2; + // + // Is this the minimal UI? + // + if (UiMinimal) + { + // + // Use alternate settings + // + Width = 80; + Left = 0; + Right = Left + Width; + Top = UiScreenHeight - Height - 4; + Bottom = Top + Height + 1; + } + else + { + Left = (UiScreenWidth - Width - 4) / 2; + Right = Left + Width + 3; + Top = (UiScreenHeight - Height - 2) / 2; + Top += 2; + } + Bottom = Top + Height + 1; TuiDrawProgressBar(Left, Top, Right, Bottom, Position, Range, ProgressText); @@ -685,12 +732,26 @@ Position = Range; } - // Draw the box - TuiDrawBox(Left, Top, Right, Bottom, VERT, HORZ, TRUE, TRUE, ATTR(UiMenuFgColor, UiMenuBgColor)); + // + // Minimal UI has no box, and only generic loading text + // + if (!UiMinimal) + { + // Draw the box + TuiDrawBox(Left, Top, Right, Bottom, VERT, HORZ, TRUE, TRUE, ATTR(UiMenuFgColor, UiMenuBgColor)); - // Draw the "Loading..." text - //TuiDrawText(70/2, Top+1, "Loading...", ATTR(UiTextColor, UiMenuBgColor)); - TuiDrawCenteredText(Left + 2, Top + 2, Right - 2, Top + 2, ProgressText, ATTR(UiTextColor, UiMenuBgColor)); + // + // Draw the "Loading..." text + // + TuiDrawCenteredText(Left + 2, Top + 2, Right - 2, Top + 2, ProgressText, ATTR(UiTextColor, UiMenuBgColor)); + } + else + { + // + // Draw the "Loading..." text + // + TuiDrawCenteredText(Left + 2, Top + 1, Right - 2, Top + 1, "ReactOS is loading files...", ATTR(7, 0)); + } // Draw the percent complete for (i=0; i<(Position*ProgressBarWidth)/Range; i++) @@ -698,14 +759,16 @@ TuiDrawText(Left+2+i, Top+2, "\xDB", ATTR(UiTextColor, UiMenuBgColor)); } - // Draw the rest - for (; i<ProgressBarWidth; i++) - { - TuiDrawText(Left+2+i, Top+2, "\xB2", ATTR(UiTextColor, UiMenuBgColor)); - } + // Draw the shadow for non-minimal UI + if (!UiMinimal) + { + for (; i<ProgressBarWidth; i++) + { + TuiDrawText(Left+2+i, Top+2, "\xB2", ATTR(UiTextColor, UiMenuBgColor)); + } + } TuiUpdateDateTime(); - VideoCopyOffScreenBufferToVRAM(); } _____ Modified: trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c --- trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c 2005-12-27 03:06:35 UTC (rev 20365) +++ trunk/reactos/boot/freeldr/freeldr/ui/tuimenu.c 2005-12-27 03:12:00 UTC (rev 20366) @@ -1,427 +1,549 @@ /* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: FreeLoader + * FILE: freeldr/ui/tuimenu.c + * PURPOSE: UI Menu Functions + * PROGRAMMERS: Alex Ionescu (alex(a)relsoft.net) + * Brian Palmer (brianp(a)sginet.com) */ +/* INCLUDES ******************************************************************/ + #include <freeldr.h> -BOOL TuiDisplayMenu(PCSTR MenuItemList[], ULONG MenuItemCount, ULONG DefaultMenuItem, LONG MenuTimeOut, ULONG* SelectedMenuItem, BOOL CanEscape, UiMenuKeyPressFilterCallback KeyPressFilter) +/* FUNCTIONS *****************************************************************/ + +BOOL +WINAPI +TuiDisplayMenu(PCSTR MenuItemList[], + ULONG MenuItemCount, + ULONG DefaultMenuItem, + LONG MenuTimeOut, + ULONG* SelectedMenuItem, + BOOL CanEscape, + UiMenuKeyPressFilterCallback KeyPressFilter) { - TUI_MENU_INFO MenuInformation; - ULONG LastClockSecond; - ULONG CurrentClockSecond; - ULONG KeyPress; + TUI_MENU_INFO MenuInformation; + ULONG LastClockSecond; + ULONG CurrentClockSecond; + ULONG KeyPress; - // - // The first thing we need to check is the timeout - // If it's zero then don't bother with anything, - // just return the default item - // - if (MenuTimeOut == 0) - { - if (SelectedMenuItem != NULL) - { - *SelectedMenuItem = DefaultMenuItem; - } + // + // Check if there's no timeout + if (!MenuTimeOut) + { + // + // Return the default selected item + // + if (SelectedMenuItem) *SelectedMenuItem = DefaultMenuItem; + return TRUE; + } - return TRUE; - } + // + // Setup the MENU_INFO structure + // + MenuInformation.MenuItemList = MenuItemList; + MenuInformation.MenuItemCount = MenuItemCount; + MenuInformation.MenuTimeRemaining = MenuTimeOut; + MenuInformation.SelectedMenuItem = DefaultMenuItem; - // - // Setup the MENU_INFO structure - // - MenuInformation.MenuItemList = MenuItemList; - MenuInformation.MenuItemCount = MenuItemCount; - MenuInformation.MenuTimeRemaining = MenuTimeOut; - MenuInformation.SelectedMenuItem = DefaultMenuItem; + // + // Calculate the size of the menu box + // + TuiCalcMenuBoxSize(&MenuInformation); - // - // Calculate the size of the menu box - // - TuiCalcMenuBoxSize(&MenuInformation); + // + // Draw the menu + // + TuiDrawMenu(&MenuInformation); - // - // Draw the menu - // - TuiDrawMenu(&MenuInformation); + // + // Get the current second of time + // + MachRTCGetCurrentDateTime(NULL, NULL, NULL, NULL, NULL, &LastClockSecond); - // - // Get the current second of time - // - MachRTCGetCurrentDateTime(NULL, NULL, NULL, NULL, NULL, &LastClockSecond); + // + // Process keys + // + while (TRUE) + { + // + // Process key presses + // + KeyPress = TuiProcessMenuKeyboardEvent(&MenuInformation, + KeyPressFilter); - // - // Process keys - // - while (1) - { - // - // Process key presses - // - KeyPress = TuiProcessMenuKeyboardEvent(&MenuInformation, KeyPressFilter); - if (KeyPress == KEY_ENTER) - { - // - // If they pressed enter then exit this loop - // - break; - } - else if (CanEscape && KeyPress == KEY_ESC) - { - // - // They pressed escape, so just return FALSE - // - return FALSE; - } + // + // Check for ENTER or ESC + // + if (KeyPress == KEY_ENTER) break; + if (CanEscape && KeyPress == KEY_ESC) return FALSE; - // - // Update the date & time - // - TuiUpdateDateTime(); + // + // Update the date & time + // + TuiUpdateDateTime(); + VideoCopyOffScreenBufferToVRAM(); - VideoCopyOffScreenBufferToVRAM(); + // + // Check if there is a countdown + // + if (MenuInformation.MenuTimeRemaining) + { + // + // Get the updated time, seconds only + // + MachRTCGetCurrentDateTime(NULL, + NULL, + NULL, + NULL, + NULL, + &CurrentClockSecond); - if (MenuInformation.MenuTimeRemaining > 0) - { - MachRTCGetCurrentDateTime(NULL, NULL, NULL, NULL, NULL, &CurrentClockSecond); - if (CurrentClockSecond != LastClockSecond) - { - // - // Update the time information - // - LastClockSecond = CurrentClockSecond; - MenuInformation.MenuTimeRemaining--; + // + // Check if more then a second has now elapsed + // + if (CurrentClockSecond != LastClockSecond) + { + // + // Update the time information + // + LastClockSecond = CurrentClockSecond; + MenuInformation.MenuTimeRemaining--; - // - // Update the menu - // - TuiDrawMenuBox(&MenuInformation); + // + // Update the menu + // + TuiDrawMenuBox(&MenuInformation); + VideoCopyOffScreenBufferToVRAM(); + } + } + else + { + // + // A time out occurred, exit this loop and return default OS + // + break; + } + } - VideoCopyOffScreenBufferToVRAM(); - } - } - else if (MenuInformation.MenuTimeRemaining == 0) - { - // - // A time out occurred, exit this loop and return default OS - // - break; - } - } - - // - // Update the selected menu item information - // - if (SelectedMenuItem != NULL) - { - *SelectedMenuItem = MenuInformation.SelectedMenuItem; - } - - return TRUE; + // + // Return the selected item + // + if (SelectedMenuItem) *SelectedMenuItem = MenuInformation.SelectedMenuItem; + return TRUE; } -VOID TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo) +VOID +WINAPI +TuiCalcMenuBoxSize(PTUI_MENU_INFO MenuInfo) { - ULONG Idx; - ULONG Width; - ULONG Height; - ULONG Length; + ULONG i; + ULONG Width = 0; + ULONG Height; + ULONG Length; - // - // Height is the menu item count plus 2 (top border & bottom border) - // - Height = MenuInfo->MenuItemCount + 2; - Height -= 1; // Height is zero-based + // + // Height is the menu item count plus 2 (top border & bottom border) + // + Height = MenuInfo->MenuItemCount + 2; + Height -= 1; // Height is zero-based - // - // Find the length of the longest string in the menu - // - Width = 0; - for(Idx=0; Idx<MenuInfo->MenuItemCount; Idx++) - { - Length = strlen(MenuInfo->MenuItemList[Idx]); + // + // Loop every item + // + for(i = 0; i < MenuInfo->MenuItemCount; i++) + { + // + // Get the string length and make it become the new width if necessary + // + Length = strlen(MenuInfo->MenuItemList[i]); + if (Length > Width) Width = Length; + } - if (Length > Width) - { - Width = Length; - } - } + // + // Allow room for left & right borders, plus 8 spaces on each side + // + Width += 18; - // - // Allow room for left & right borders, plus 8 spaces on each side - // - Width += 18; + // + // Check if we're drawing a centered menu + // + if (UiCenterMenu) + { + // + // Calculate the menu box area for a centered menu + // + MenuInfo->Left = (UiScreenWidth - Width) / 2; + MenuInfo->Top = (((UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT) - + Height) / 2) + TUI_TITLE_BOX_CHAR_HEIGHT; + } + else + { + // + // Put the menu in the default left-corner position + // + MenuInfo->Left = -1; + MenuInfo->Top = 4; + } - // - // Calculate the menu box area - // - MenuInfo->Left = (UiScreenWidth - Width) / 2; - MenuInfo->Right = (MenuInfo->Left) + Width; - MenuInfo->Top = (((UiScreenHeight - TUI_TITLE_BOX_CHAR_HEIGHT) - Height) / 2) + TUI_TITLE_BOX_CHAR_HEIGHT; - MenuInfo->Bottom = (MenuInfo->Top) + Height; + // + // The other margins are the same + // + MenuInfo->Right = (MenuInfo->Left) + Width; + MenuInfo->Bottom = (MenuInfo->Top) + Height; } -VOID TuiDrawMenu(PTUI_MENU_INFO MenuInfo) +VOID +WINAPI +TuiDrawMenu(PTUI_MENU_INFO MenuInfo) { - ULONG Idx; + ULONG i; - // - // Draw the backdrop - // - UiDrawBackdrop(); + // + // Draw the backdrop + // + UiDrawBackdrop(); - // - // Update the status bar - // - UiDrawStatusText("Use \x18\x19 to select, then press ENTER."); + // + // Check if this is the minimal (console) UI + // + if (UiMinimal) + { + // + // No GUI status bar text, just minimal text. first to tell the user to + // choose. + // + TuiDrawText(0, + MenuInfo->Top - 2, + "Please select the operating system to start:", + ATTR(UiMenuFgColor, UiMenuBgColor)); - // - // Draw the menu box - // - TuiDrawMenuBox(MenuInfo); + // + // Now tell him how to choose + // + TuiDrawText(0, + MenuInfo->Bottom + 1, + "Use the up and down arrow keys to move the highlight to " + "your choice.", + ATTR(UiMenuFgColor, UiMenuBgColor)); + TuiDrawText(0, + MenuInfo->Bottom + 2, + "Press ENTER to choose.", + ATTR(UiMenuFgColor, UiMenuBgColor)); - // - // Draw each line of the menu - // - for (Idx=0; Idx<MenuInfo->MenuItemCount; Idx++) - { - TuiDrawMenuItem(MenuInfo, Idx); - } + // + // And offer F8 options + // + TuiDrawText(0, + UiScreenHeight - 4, + "For troubleshooting and advanced startup options for " + "ReactOS, press F8.", + ATTR(UiMenuFgColor, UiMenuBgColor)); + } + else + { + // + // Update the status bar + // + UiDrawStatusText("Use \x18\x19 to select, then press ENTER."); + } - VideoCopyOffScreenBufferToVRAM(); -} + // + // Draw the menu box + // + TuiDrawMenuBox(MenuInfo); -VOID TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo) -{ - CHAR MenuLineText[80]; - CHAR TempString[80]; - ULONG Idx; - - // - // Draw the menu box - // - UiDrawBox(MenuInfo->Left, - MenuInfo->Top, - MenuInfo->Right, - MenuInfo->Bottom, - D_VERT, - D_HORZ, - FALSE, // Filled - TRUE, // Shadow - ATTR(UiMenuFgColor, UiMenuBgColor)); - - // - // If there is a timeout draw the time remaining - // - if (MenuInfo->MenuTimeRemaining >= 0) - { - strcpy(MenuLineText, "[ Time Remaining: "); - _itoa(MenuInfo->MenuTimeRemaining, TempString, 10); - strcat(MenuLineText, TempString); - strcat(MenuLineText, " ]"); - - UiDrawText(MenuInfo->Right - strlen(MenuLineText) - 1, - MenuInfo->Bottom, - MenuLineText, - ATTR(UiMenuFgColor, UiMenuBgColor)); - } - - // - // Now draw the separators - // - for (Idx=0; Idx<MenuInfo->MenuItemCount; Idx++) - { - if (_stricmp(MenuInfo->MenuItemList[Idx], "SEPARATOR") == 0) - { - UiDrawText(MenuInfo->Left, MenuInfo->Top + Idx + 1, "\xC7", ATTR(UiMenuFgColor, UiMenuBgColor)); - UiDrawText(MenuInfo->Right, MenuInfo->Top + Idx + 1, "\xB6", ATTR(UiMenuFgColor, UiMenuBgColor)); - } - } + // + // Draw each line of the menu + // + for (i = 0; i < MenuInfo->MenuItemCount; i++) TuiDrawMenuItem(MenuInfo, i); + VideoCopyOffScreenBufferToVRAM(); } -VOID TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, ULONG MenuItemNumber) +VOID +WINAPI +TuiDrawMenuBox(PTUI_MENU_INFO MenuInfo) { - ULONG Idx; - CHAR MenuLineText[80]; - ULONG SpaceTotal; - ULONG SpaceLeft; - ULONG SpaceRight; - UCHAR Attribute; + CHAR MenuLineText[80]; + CHAR TempString[80]; + ULONG i; - // - // We will want the string centered so calculate - // how many spaces will be to the left and right - // - SpaceTotal = (MenuInfo->Right - MenuInfo->Left - 2) - strlen(MenuInfo->MenuItemList[MenuItemNumber]); - SpaceLeft = (SpaceTotal / 2) + 1; - SpaceRight = (SpaceTotal - SpaceLeft) + 1; + // + // Draw the menu box if requested + // + if (UiMenuBox) + { + UiDrawBox(MenuInfo->Left, + MenuInfo->Top, + MenuInfo->Right, + MenuInfo->Bottom, + D_VERT, + D_HORZ, + FALSE, // Filled + TRUE, // Shadow + ATTR(UiMenuFgColor, UiMenuBgColor)); + } - // - // Insert the spaces on the left - // - for (Idx=0; Idx<SpaceLeft; Idx++) - { - MenuLineText[Idx] = ' '; - } - MenuLineText[Idx] = '\0'; + // + // If there is a timeout draw the time remaining + // + if (MenuInfo->MenuTimeRemaining >= 0) + { + // + // Copy the integral time text string, and remove the last 2 chars + // + strcpy(TempString, UiTimeText); + i = strlen(TempString); + TempString[i - 2] = 0; - // - // Now append the text string - // - strcat(MenuLineText, MenuInfo->MenuItemList[MenuItemNumber]); + // + // Display the first part of the string and the remaining time + // + strcpy(MenuLineText, TempString); + _itoa(MenuInfo->MenuTimeRemaining, TempString, 10); + strcat(MenuLineText, TempString); - // - // Now append the spaces on the right - // - for (Idx=0; Idx<SpaceRight; Idx++) - { - strcat(MenuLineText, " "); - } + // + // Add the last 2 chars + // + strcat(MenuLineText, &UiTimeText[i - 2]); - // - // If it is a separator then adjust the text accordingly - // - if (_stricmp(MenuInfo->MenuItemList[MenuItemNumber], "SEPARATOR") == 0) - { - memset(MenuLineText, 0, 80); - memset(MenuLineText, 0xC4, (MenuInfo->Right - MenuInfo->Left - 1)); - Attribute = ATTR(UiMenuFgColor, UiMenuBgColor); - } - else - { - Attribute = ATTR(UiTextColor, UiMenuBgColor); - } + // + // Check if this is a centered menu + // + if (UiCenterMenu) + { + // + // Display it in the center of the menu + // + UiDrawText(MenuInfo->Right - strlen(MenuLineText) - 1, + MenuInfo->Bottom, + MenuLineText, + ATTR(UiMenuFgColor, UiMenuBgColor)); + } + else + { + // + // Display under the menu directly + // + UiDrawText(0, + MenuInfo->Bottom + 3, + MenuLineText, + ATTR(UiMenuFgColor, UiMenuBgColor)); + } + } - // - // If this is the selected menu item then draw it as selected - // otherwise just draw it using the normal colors - // - if (MenuItemNumber == MenuInfo->SelectedMenuItem) - { - UiDrawText(MenuInfo->Left + 1, - MenuInfo->Top + 1 + MenuItemNumber, - MenuLineText, - ATTR(UiSelectedTextColor, UiSelectedTextBgColor)); - } - else - { - UiDrawText(MenuInfo->Left + 1, - MenuInfo->Top + 1 + MenuItemNumber, - MenuLineText, - Attribute); - } + // + // Loop each item + // + for (i = 0; i < MenuInfo->MenuItemCount; i++) + { + // + // Check if it's a separator + // + if (!(_stricmp(MenuInfo->MenuItemList[i], "SEPARATOR"))) + { + // + // Draw the separator line + // + UiDrawText(MenuInfo->Left, + MenuInfo->Top + i + 1, + "\xC7", + ATTR(UiMenuFgColor, UiMenuBgColor)); + UiDrawText(MenuInfo->Right, + MenuInfo->Top + i + 1, + "\xB6", + ATTR(UiMenuFgColor, UiMenuBgColor)); + } + } } -ULONG TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, UiMenuKeyPressFilterCallback KeyPressFilter) +VOID +WINAPI +TuiDrawMenuItem(PTUI_MENU_INFO MenuInfo, + ULONG MenuItemNumber) { - ULONG KeyEvent = 0; + ULONG i; + CHAR MenuLineText[80]; + ULONG SpaceTotal; + ULONG SpaceLeft; + ULONG SpaceRight = 0; + UCHAR Attribute = ATTR(UiTextColor, UiMenuBgColor); - // - // Check for a keypress - // - if (MachConsKbHit()) - { - // - // Cancel the timeout - // - if (MenuInfo->MenuTimeRemaining != -1) - { - MenuInfo->MenuTimeRemaining = -1; - TuiDrawMenuBox(MenuInfo); - } + // + // Check if using centered menu + // + if (UiCenterMenu) + { + // + // We will want the string centered so calculate + // how many spaces will be to the left and right + // + SpaceTotal = (MenuInfo->Right - MenuInfo->Left - 2) - + strlen(MenuInfo->MenuItemList[MenuItemNumber]); + SpaceLeft = (SpaceTotal / 2) + 1; + SpaceRight = (SpaceTotal - SpaceLeft) + 1; - // - // Get the key - // - KeyEvent = MachConsGetCh(); + // + // Insert the spaces on the left + // + for (i = 0; i < SpaceLeft; i++) MenuLineText[i] = ' '; + MenuLineText[i] = '\0'; + } + else + { + // + // Simply left-align it + // + MenuLineText[0] = '\0'; + strcat(MenuLineText, " "); + } - // - // Is it extended? - // - if (KeyEvent == 0) - KeyEvent = MachConsGetCh(); // Yes - so get the extended key + // + // Now append the text string + // + strcat(MenuLineText, MenuInfo->MenuItemList[MenuItemNumber]); - // - // Call the supplied key filter callback function to see - // if it is going to handle this keypress. - // - if (KeyPressFilter != NULL) - { - if (KeyPressFilter(KeyEvent)) - { - // It processed the key character - TuiDrawMenu(MenuInfo); + // + // Check if using centered menu, and add spaces on the right if so + // + if (UiCenterMenu) for (i=0; i < SpaceRight; i++) strcat(MenuLineText, " "); - return 0; - } - } + // + // If it is a separator + // + if (!(_stricmp(MenuInfo->MenuItemList[MenuItemNumber], "SEPARATOR"))) + { + // + // Make it a separator line and use menu colors + // + memset(MenuLineText, 0, 80); + memset(MenuLineText, 0xC4, (MenuInfo->Right - MenuInfo->Left - 1)); + Attribute = ATTR(UiMenuFgColor, UiMenuBgColor); + } + else if (MenuItemNumber == MenuInfo->SelectedMenuItem) + { + // + // If this is the selected item, use the selected colors + // + Attribute = ATTR(UiSelectedTextColor, UiSelectedTextBgColor); + } - // - // Process the key - // - switch (KeyEvent) - { - case KEY_UP: + // + // Draw the item + // + UiDrawText(MenuInfo->Left + 1, + MenuInfo->Top + 1 + MenuItemNumber, + MenuLineText, + Attribute); +} - if (MenuInfo->SelectedMenuItem > 0) - { - MenuInfo->SelectedMenuItem--; +ULONG +WINAPI +TuiProcessMenuKeyboardEvent(PTUI_MENU_INFO MenuInfo, [truncated at 1000 lines; 314 more skipped]
18 years, 12 months
1
0
0
0
[ion] 20365: - Add information on new executive locks being worked on.
by ion@svn.reactos.com
- Add information on new executive locks being worked on. Added: trunk/reactos/media/doc/locks.txt _____ Added: trunk/reactos/media/doc/locks.txt --- trunk/reactos/media/doc/locks.txt 2005-12-27 01:53:00 UTC (rev 20364) +++ trunk/reactos/media/doc/locks.txt 2005-12-27 03:06:35 UTC (rev 20365) @@ -0,0 +1,39 @@ +Next-Gen (NT 5.2) Executive Locks in NTOSKRNL. +------------------------------ +1a. Rundown Protection +USED IN: Thread/Process Ps* Code. +EXAMPLES: NtSetInformationProcess/Thread, PspCreateThread/Process, PspSuspend/ResumeThread... +REPLACES: Unlocked access and/or PsLock/UnlockProcess. +ROS STATUS: Implemented. Code needs cleanup. Not yet tested. Not yet used. + +1b. Cache-Aware Rundown Protection +USED IN: Unknown. Functions exported for drivers. +EXAMPLES: None. +REPLACES: Nothing. +ROS STATUS: Unimplemented. + +2. Guarded Mutex +USED IN: Configuration Manager, MCB Functions (FsRtl), Binary Hive Module (Hv), PnP (Notifications), LPC, Jobs (Ps), Device Map (Ob), and Memory Management (Address Space/Virtual Memory). +EXAMPLES: Too many. +REPLACES: Anything that used FAST_MUTEX. +ROS STATUS: Implemented, slightly tested; appears to still contain a bug. + +3. Fast Referencing +USED IN: Tokens. +EXAMPLES: R: PsReferencePrimary/EffectiveToken. D: Failure code of anything that calls those two functions. +REPLACES: Normal referencing. +ROS STATUS: Hackplemented stubs. + +4a. Pushlocks +USED IN: Configuration Manager (Cm), Handle Table (Ex), Binary Hive Module (Hv), Memory Management (Address Space/Virtual Memory), Object Namespace (Directories/Names) (Ob), Impersonation (Ps). +EXAMPLES: Too many. +REPLACES: Anything that used ERESOURCE. +ROS STATUS: Implemented (missing Block/([Timed]Wait)Unblock) and slightly tested. + +4b. Cache-Aware Pushlocks +USED IN: AWE (Mm). +EXAMPLES: None. +REPLACES: Executive Resources. +ROS STATUS: Unimplemented. + +TODO: Kernel Locks (Queued and In-Stack Spinlocks) \ No newline at end of file
18 years, 12 months
1
0
0
0
[weiden] 20364: fixed remote device property pages
by weiden@svn.reactos.com
fixed remote device property pages Modified: trunk/reactos/lib/devmgr/advprop.c _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-12-27 01:37:04 UTC (rev 20363) +++ trunk/reactos/lib/devmgr/advprop.c 2005-12-27 01:53:00 UTC (rev 20364) @@ -65,6 +65,7 @@ BOOL IsAdmin : 1; BOOL DoDefaultDevAction : 1; BOOL PageInitialized : 1; + BOOL ShowRemotePages : 1; BOOL HasDriverPage : 1; BOOL HasResourcePage : 1; BOOL HasPowerPage : 1; @@ -423,7 +424,9 @@ &bDrvInstalled) && bDrvInstalled) { - if (SetupDiCallClassInstaller(DIF_ADDPROPERTYPAGE_ADVANCED, + if (SetupDiCallClassInstaller((dap->ShowRemotePages ? + DIF_ADDREMOTEPROPERTYPAGE_ADVANCED : + DIF_ADDPROPERTYPAGE_ADVANCED), DeviceInfoSet, DeviceInfoData)) { @@ -1093,6 +1096,7 @@ DevAdvPropInfo->CurrentDeviceInfoSet = INVALID_HANDLE_VALUE; DevAdvPropInfo->CurrentDeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); + DevAdvPropInfo->ShowRemotePages = (lpMachineName != NULL && lpMachineName[0] != L'\0'); DevAdvPropInfo->hMachine = hMachine; DevAdvPropInfo->lpMachineName = lpMachineName; DevAdvPropInfo->szDevName[0] = L'\0'; @@ -1108,7 +1112,7 @@ psh.hwndParent = hWndParent; psh.pszCaption = DevAdvPropInfo->szDevName; - DevAdvPropInfo->PropertySheetType = lpMachineName != NULL ? + DevAdvPropInfo->PropertySheetType = DevAdvPropInfo->ShowRemotePages ? DIGCDP_FLAG_REMOTE_ADVANCED : DIGCDP_FLAG_ADVANCED;
18 years, 12 months
1
0
0
0
[hpoussin] 20363: Handle DIF_ADDPROPERTYPAGE_ADVANCED in SetupDiCallClassInstaller (needed by r20358)
by hpoussin@svn.reactos.com
Handle DIF_ADDPROPERTYPAGE_ADVANCED in SetupDiCallClassInstaller (needed by r20358) Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-12-27 01:14:55 UTC (rev 20362) +++ trunk/reactos/lib/setupapi/devinst.c 2005-12-27 01:37:04 UTC (rev 20363) @@ -3757,6 +3757,9 @@ switch (InstallFunction) { + case DIF_ADDPROPERTYPAGE_ADVANCED: + CanHandle = CLASS_COINSTALLER | DEVICE_COINSTALLER | CLASS_INSTALLER; + break; case DIF_ALLOW_INSTALL: CanHandle = CLASS_COINSTALLER | CLASS_INSTALLER; break;
18 years, 12 months
1
0
0
0
[weiden] 20362: wrc wants an empty line at the end of the file
by weiden@svn.reactos.com
wrc wants an empty line at the end of the file Modified: trunk/reactos/lib/devmgr/Es.rc Modified: trunk/reactos/lib/devmgr/Hu.rc Modified: trunk/reactos/lib/devmgr/Pl.rc _____ Modified: trunk/reactos/lib/devmgr/Es.rc --- trunk/reactos/lib/devmgr/Es.rc 2005-12-27 00:11:29 UTC (rev 20361) +++ trunk/reactos/lib/devmgr/Es.rc 2005-12-27 01:14:55 UTC (rev 20362) @@ -141,4 +141,5 @@ EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY -END \ No newline at end of file +END + _____ Modified: trunk/reactos/lib/devmgr/Hu.rc --- trunk/reactos/lib/devmgr/Hu.rc 2005-12-27 00:11:29 UTC (rev 20361) +++ trunk/reactos/lib/devmgr/Hu.rc 2005-12-27 01:14:55 UTC (rev 20362) @@ -140,4 +140,5 @@ EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY -END \ No newline at end of file +END + _____ Modified: trunk/reactos/lib/devmgr/Pl.rc --- trunk/reactos/lib/devmgr/Pl.rc 2005-12-27 00:11:29 UTC (rev 20361) +++ trunk/reactos/lib/devmgr/Pl.rc 2005-12-27 01:14:55 UTC (rev 20362) @@ -141,4 +141,5 @@ EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY -END \ No newline at end of file +END +
18 years, 12 months
1
0
0
0
[greatlrd] 20361: forget update de.rc
by greatlrd@svn.reactos.com
forget update de.rc Modified: trunk/reactos/lib/devmgr/De.rc _____ Modified: trunk/reactos/lib/devmgr/De.rc --- trunk/reactos/lib/devmgr/De.rc 2005-12-27 00:03:24 UTC (rev 20360) +++ trunk/reactos/lib/devmgr/De.rc 2005-12-27 00:11:29 UTC (rev 20361) @@ -127,3 +127,18 @@ LTEXT "Gerõte&benutzung:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END + +IDD_DEVICEDRIVER DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Driver" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Driver provider:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver date:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY +END
18 years, 12 months
1
0
0
0
[greatlrd] 20360: Maintain work sync res with en.rc the rc file need update there translation for the new dialog boz
by greatlrd@svn.reactos.com
Maintain work sync res with en.rc the rc file need update there translation for the new dialog boz Modified: trunk/reactos/lib/devmgr/Es.rc Modified: trunk/reactos/lib/devmgr/Hu.rc Modified: trunk/reactos/lib/devmgr/Pl.rc _____ Modified: trunk/reactos/lib/devmgr/Es.rc --- trunk/reactos/lib/devmgr/Es.rc 2005-12-26 23:56:25 UTC (rev 20359) +++ trunk/reactos/lib/devmgr/Es.rc 2005-12-27 00:03:24 UTC (rev 20360) @@ -127,3 +127,18 @@ LTEXT "Uso del &Dispositivo:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END + +IDD_DEVICEDRIVER DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Driver" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Driver provider:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver date:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY +END \ No newline at end of file _____ Modified: trunk/reactos/lib/devmgr/Hu.rc --- trunk/reactos/lib/devmgr/Hu.rc 2005-12-26 23:56:25 UTC (rev 20359) +++ trunk/reactos/lib/devmgr/Hu.rc 2005-12-27 00:03:24 UTC (rev 20360) @@ -126,3 +126,18 @@ LTEXT "&Eszk÷z hasznßlat:", -1, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END + +IDD_DEVICEDRIVER DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Driver" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Driver provider:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver date:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY +END \ No newline at end of file _____ Modified: trunk/reactos/lib/devmgr/Pl.rc --- trunk/reactos/lib/devmgr/Pl.rc 2005-12-26 23:56:25 UTC (rev 20359) +++ trunk/reactos/lib/devmgr/Pl.rc 2005-12-27 00:03:24 UTC (rev 20360) @@ -127,3 +127,18 @@ LTEXT "&U?ycie urz?dzenia:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END + +IDD_DEVICEDRIVER DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Driver" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Driver provider:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver date:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY +END \ No newline at end of file
18 years, 12 months
1
0
0
0
[greatlrd] 20359: Maintain work sync res with en.rc res change adding IDS_USERDOMAINFORMAT "%1 (%2\\%3)" and IDS_USERFORMAT "%1" no need update the translatons.
by greatlrd@svn.reactos.com
Maintain work sync res with en.rc res change adding IDS_USERDOMAINFORMAT "%1 (%2\\%3)" and IDS_USERFORMAT "%1" no need update the translatons. Modified: trunk/reactos/lib/aclui/aclui_De.rc Modified: trunk/reactos/lib/aclui/aclui_Es.rc Modified: trunk/reactos/lib/aclui/aclui_Hu.rc Modified: trunk/reactos/lib/aclui/aclui_Ja.rc Modified: trunk/reactos/lib/aclui/aclui_Nl.rc Modified: trunk/reactos/lib/aclui/aclui_Pl.rc Modified: trunk/reactos/lib/aclui/aclui_Ru.rc Modified: trunk/reactos/lib/aclui/aclui_Sv.rc _____ Modified: trunk/reactos/lib/aclui/aclui_De.rc --- trunk/reactos/lib/aclui/aclui_De.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_De.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -24,4 +24,6 @@ IDS_SPECIAL_PERMISSIONS "Spezielle Berechtigungen" IDS_PERMISSIONS_FOR "Berechtigungen f³r %1" IDS_PERMISSIONS "Berechtigungen" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Es.rc --- trunk/reactos/lib/aclui/aclui_Es.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Es.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -32,5 +32,7 @@ IDS_SPECIAL_PERMISSIONS "Permisos especiales" IDS_PERMISSIONS_FOR "Permisos para %1" IDS_PERMISSIONS "Permisos" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Hu.rc --- trunk/reactos/lib/aclui/aclui_Hu.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Hu.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -29,5 +29,7 @@ IDS_SPECIAL_PERMISSIONS "K³l÷nleges engedÚlyek" IDS_PERMISSIONS_FOR "%1 engedÚlye" IDS_PERMISSIONS "EngedÚlyek" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Ja.rc --- trunk/reactos/lib/aclui/aclui_Ja.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Ja.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -24,5 +24,7 @@ IDS_SPECIAL_PERMISSIONS "ô?ÄÛé?âAâNâZâXïûë?" IDS_PERMISSIONS_FOR "%1 éÍé?âAâNâZâXïûë?" IDS_PERMISSIONS "âAâNâZâXïûë?" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Nl.rc --- trunk/reactos/lib/aclui/aclui_Nl.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Nl.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -24,4 +24,6 @@ IDS_SPECIAL_PERMISSIONS "Speciale Permissies" IDS_PERMISSIONS_FOR "Permissies voor %1" IDS_PERMISSIONS "Permissies" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Pl.rc --- trunk/reactos/lib/aclui/aclui_Pl.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Pl.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -24,5 +24,7 @@ IDS_SPECIAL_PERMISSIONS "Uprawnienia specjalne" IDS_PERMISSIONS_FOR "Uprawnienia dla %1" IDS_PERMISSIONS "Uprawnienia" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Ru.rc --- trunk/reactos/lib/aclui/aclui_Ru.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Ru.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -24,5 +24,7 @@ IDS_SPECIAL_PERMISSIONS "?±¯ß¹Õ ÓþÕ°ÕÝÞ " IDS_PERMISSIONS_FOR "ðÓþÕ°ÕÝÞ õÙ %1" IDS_PERMISSIONS "ðÓþÕ°ÕÝÞ " + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" } _____ Modified: trunk/reactos/lib/aclui/aclui_Sv.rc --- trunk/reactos/lib/aclui/aclui_Sv.rc 2005-12-26 23:37:04 UTC (rev 20358) +++ trunk/reactos/lib/aclui/aclui_Sv.rc 2005-12-26 23:56:25 UTC (rev 20359) @@ -43,5 +43,7 @@ IDS_SPECIAL_PERMISSIONS "Sõrskilda beh÷righeter" IDS_PERMISSIONS_FOR "Beh÷righeter f÷r %1" IDS_PERMISSIONS "Beh÷righeter" + IDS_USERDOMAINFORMAT "%1 (%2\\%3)" + IDS_USERFORMAT "%1" }
18 years, 12 months
1
0
0
0
[weiden] 20358: Add the driver page if necessary, based on a patch by Herve
by weiden@svn.reactos.com
Add the driver page if necessary, based on a patch by Herve Modified: trunk/reactos/lib/devmgr/En.rc Modified: trunk/reactos/lib/devmgr/advprop.c Modified: trunk/reactos/lib/devmgr/misc.c Modified: trunk/reactos/lib/devmgr/precomp.h Modified: trunk/reactos/lib/devmgr/resource.h _____ Modified: trunk/reactos/lib/devmgr/En.rc --- trunk/reactos/lib/devmgr/En.rc 2005-12-26 23:35:02 UTC (rev 20357) +++ trunk/reactos/lib/devmgr/En.rc 2005-12-26 23:37:04 UTC (rev 20358) @@ -127,3 +127,18 @@ LTEXT "&Device usage:", IDC_DEVUSAGELABEL, 7, 188, 222, 8, WS_DISABLED COMBOBOX IDC_DEVUSAGE, 7, 198, 239, 40, CBS_DROPDOWNLIST | WS_VSCROLL | WS_DISABLED END + +IDD_DEVICEDRIVER DIALOG DISCARDABLE 0, 0, 252, 218 +STYLE WS_CHILD | WS_DISABLED | WS_CAPTION +CAPTION "Driver" +FONT 8, "MS Shell Dlg" +BEGIN + ICON "", IDC_DEVICON, 7, 7, 20, 20 + LTEXT "", IDC_DEVNAME, 37, 9, 174, 16, SS_NOPREFIX + LTEXT "Driver provider:", -1, 37, 39, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVPROVIDER, 100, 39, 146, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver date:", -1, 37, 53, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVDATE, 100, 53, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY + LTEXT "Driver version:", -1, 37, 67, 60, 8, SS_NOPREFIX + EDITTEXT IDC_DRVVERSION, 100, 67, 145, 12, NOT WS_TABSTOP | NOT WS_BORDER | ES_AUTOHSCROLL | ES_READONLY +END _____ Modified: trunk/reactos/lib/devmgr/advprop.c --- trunk/reactos/lib/devmgr/advprop.c 2005-12-26 23:35:02 UTC (rev 20357) +++ trunk/reactos/lib/devmgr/advprop.c 2005-12-26 23:37:04 UTC (rev 20358) @@ -39,6 +39,7 @@ HWND hWndGeneralPage; HWND hWndParent; WNDPROC ParentOldWndProc; + HICON hDevIcon; HDEVINFO DeviceInfoSet; SP_DEVINFO_DATA DeviceInfoData; @@ -49,6 +50,8 @@ LPCWSTR lpMachineName; HINSTANCE hComCtl32; + PCREATEPROPERTYSHEETPAGEW pCreatePropertySheetPageW; + PDESTROYPROPERTYSHEETPAGE pDestroyPropertySheetPage; DWORD PropertySheetType; DWORD nDevPropSheets; @@ -61,6 +64,10 @@ BOOL CloseDevInst : 1; BOOL IsAdmin : 1; BOOL DoDefaultDevAction : 1; + BOOL PageInitialized : 1; + BOOL HasDriverPage : 1; + BOOL HasResourcePage : 1; + BOOL HasPowerPage : 1; WCHAR szDevName[255]; WCHAR szTemp[255]; @@ -68,7 +75,68 @@ /* struct may be dynamically expanded here! */ } DEVADVPROP_INFO, *PDEVADVPROP_INFO; +#define PM_INITIALIZE (WM_APP + 0x101) + +static INT_PTR +CALLBACK +AdvProcDriverDlgProc(IN HWND hwndDlg, + IN UINT uMsg, + IN WPARAM wParam, + IN LPARAM lParam) +{ + PDEVADVPROP_INFO dap; + INT_PTR Ret = FALSE; + + dap = (PDEVADVPROP_INFO)GetWindowLongPtr(hwndDlg, + DWL_USER); + + if (dap != NULL || uMsg == WM_INITDIALOG) + { + switch (uMsg) + { + case WM_NOTIFY: + { + NMHDR *hdr = (NMHDR*)lParam; + switch (hdr->code) + { + case PSN_APPLY: + break; + } + break; + } + + case WM_INITDIALOG: + { + dap = (PDEVADVPROP_INFO)((LPPROPSHEETPAGE)lParam)->lParam; + if (dap != NULL) + { + SetWindowLongPtr(hwndDlg, + DWL_USER, + (DWORD_PTR)dap); + + /* set the device image */ + SendDlgItemMessage(hwndDlg, + IDC_DEVICON, + STM_SETICON, + (WPARAM)dap->hDevIcon, + 0); + + /* set the device name edit control text */ + SetDlgItemText(hwndDlg, + IDC_DEVNAME, + dap->szDevName); + } + Ret = TRUE; + break; + } + } + } + + return Ret; +} + + static VOID InitDevUsageActions(IN HWND hwndDlg, IN HWND hComboBox, @@ -232,50 +300,62 @@ IN PDEVADVPROP_INFO dap, IN BOOL ReOpen) { - HICON hIcon; HWND hDevUsage, hPropSheetDlg, hDevProbBtn; CONFIGRET cr; ULONG Status, ProblemNumber; + SP_DEVINSTALL_PARAMS_W InstallParams; UINT TroubleShootStrId = IDS_TROUBLESHOOTDEV; BOOL bFlag, bDevActionAvailable = TRUE; - DWORD i; + BOOL bDrvInstalled = FALSE; + DWORD iPage; HDEVINFO DeviceInfoSet = NULL; PSP_DEVINFO_DATA DeviceInfoData = NULL; + PROPSHEETHEADER psh; + DWORD nDriverPages = 0; hPropSheetDlg = GetParent(hwndDlg); - if (ReOpen) + if (dap->PageInitialized) { - PROPSHEETHEADER psh; - /* switch to the General page */ PropSheet_SetCurSelByID(hPropSheetDlg, IDD_DEVICEGENERAL); /* remove and destroy the existing device property sheet pages */ - for (i = 0; - i != dap->nDevPropSheets; - i++) + if (dap->DevPropSheets != NULL) { - PropSheet_RemovePage(hPropSheetDlg, - -1, - dap->DevPropSheets[i]); + for (iPage = 0; + iPage != dap->nDevPropSheets; + iPage++) + { + if (dap->DevPropSheets[iPage] != NULL) + { + PropSheet_RemovePage(hPropSheetDlg, + -1, + dap->DevPropSheets[iPage]); + } + } } + } - if (dap->FreeDevPropSheets) - { - /* don't free the array if it's the one allocated in - DisplayDeviceAdvancedProperties */ - HeapFree(GetProcessHeap(), - 0, - dap->DevPropSheets); + iPage = 0; - dap->FreeDevPropSheets = FALSE; - } + if (dap->FreeDevPropSheets) + { + /* don't free the array if it's the one allocated in + DisplayDeviceAdvancedProperties */ + HeapFree(GetProcessHeap(), + 0, + dap->DevPropSheets); - dap->DevPropSheets = NULL; - dap->nDevPropSheets = 0; + dap->FreeDevPropSheets = FALSE; + } + dap->DevPropSheets = NULL; + dap->nDevPropSheets = 0; + + if (ReOpen) + { /* create a new device info set and re-open the device */ if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) { @@ -310,7 +390,7 @@ } else { -GetParentNode: + GetParentNode: /* get the parent node from the initial devinst */ CM_Get_Parent_Ex(&dap->ParentDevInst, dap->DeviceInfoData.DevInst, @@ -328,77 +408,53 @@ DeviceInfoSet = dap->DeviceInfoSet; DeviceInfoData = &dap->DeviceInfoData; } + } + else + { + DeviceInfoSet = dap->DeviceInfoSet; + DeviceInfoData = &dap->DeviceInfoData; + } - /* find out how many new device property sheets to add. - fake a PROPSHEETHEADER structure, we don't plan to - call PropertySheet again!*/ - psh.dwSize = sizeof(PROPSHEETHEADER); - psh.dwFlags = 0; - psh.nPages = 0; - - if (!SetupDiGetClassDevPropertySheets(DeviceInfoSet, - DeviceInfoData, - &psh, - 0, - &dap->nDevPropSheets, - dap->PropertySheetType) && - dap->nDevPropSheets != 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) + dap->HasDriverPage = FALSE; + dap->HasResourcePage = FALSE; + dap->HasPowerPage = FALSE; + if (IsDriverInstalled(DeviceInfoData->DevInst, + dap->hMachine, + &bDrvInstalled) && + bDrvInstalled) + { + if (SetupDiCallClassInstaller(DIF_ADDPROPERTYPAGE_ADVANCED, + DeviceInfoSet, + DeviceInfoData)) { - dap->DevPropSheets = HeapAlloc(GetProcessHeap(), - HEAP_ZERO_MEMORY, - dap->nDevPropSheets * sizeof(HPROPSHEETPAGE)); - if (dap->DevPropSheets != NULL) + /* get install params */ + InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W); + if (!SetupDiGetDeviceInstallParamsW(DeviceInfoSet, + DeviceInfoData, + &InstallParams)) { - psh.phpage = dap->DevPropSheets; + /* zero the flags */ + InstallParams.Flags = 0; + } - /* query the new property sheet pages to add */ - if (SetupDiGetClassDevPropertySheets(DeviceInfoSet, - DeviceInfoData, - &psh, - dap->nDevPropSheets, - NULL, - dap->PropertySheetType)) - { - /* add the property sheets */ - - for (i = 0; - i != dap->nDevPropSheets; - i++) - { - PropSheet_AddPage(hPropSheetDlg, - dap->DevPropSheets[i]); - } - - dap->FreeDevPropSheets = TRUE; - } - else - { - /* cleanup, we were unable to get the device property sheets */ - HeapFree(GetProcessHeap(), - 0, - dap->DevPropSheets); - - dap->nDevPropSheets = 0; - dap->DevPropSheets = NULL; - } - } - else - dap->nDevPropSheets = 0; + dap->HasDriverPage = !(InstallParams.Flags & DI_DRIVERPAGE_ADDED); + dap->HasResourcePage = !(InstallParams.Flags & DI_RESOURCEPAGE_ADDED); + dap->HasPowerPage = !(InstallParams.Flags & DI_FLAGSEX_POWERPAGE_ADDED); } } - else + + /* get the device icon */ + if (dap->hDevIcon != NULL) { - if (dap->CurrentDeviceInfoSet != INVALID_HANDLE_VALUE) - { - DeviceInfoSet = dap->CurrentDeviceInfoSet; - DeviceInfoData = &dap->CurrentDeviceInfoData; - } - else - { - DeviceInfoSet = dap->DeviceInfoSet; - DeviceInfoData = &dap->DeviceInfoData; - } + DestroyIcon(dap->hDevIcon); + dap->hDevIcon = NULL; } + if (!SetupDiLoadClassIcon(&DeviceInfoData->ClassGuid, + &dap->hDevIcon, + NULL)) + { + dap->hDevIcon = NULL; + } /* get the device name */ if (GetDeviceDescriptionString(DeviceInfoSet, @@ -406,26 +462,17 @@ dap->szDevName, sizeof(dap->szDevName) / sizeof(dap->szDevName[0]))) { - PropSheet_SetTitle(GetParent(hwndDlg), + PropSheet_SetTitle(hPropSheetDlg, PSH_PROPTITLE, dap->szDevName); } /* set the device image */ - if (SetupDiLoadClassIcon(&DeviceInfoData->ClassGuid, - &hIcon, - NULL)) - { - HICON hOldIcon = (HICON)SendDlgItemMessage(hwndDlg, - IDC_DEVICON, - STM_SETICON, - (WPARAM)hIcon, - 0); - if (hOldIcon != NULL) - { - DestroyIcon(hOldIcon); - } - } + SendDlgItemMessage(hwndDlg, + IDC_DEVICON, + STM_SETICON, + (WPARAM)dap->hDevIcon, + 0); /* set the device name edit control text */ SetDlgItemText(hwndDlg, @@ -641,6 +688,108 @@ dap); } + /* find out how many new device property sheets to add. + fake a PROPSHEETHEADER structure, we don't plan to + call PropertySheet again!*/ + psh.dwSize = sizeof(PROPSHEETHEADER); + psh.dwFlags = 0; + psh.nPages = 0; + + /* get the number of device property sheets for the device */ + if (!SetupDiGetClassDevPropertySheets(DeviceInfoSet, + DeviceInfoData, + &psh, + 0, + &nDriverPages, + dap->PropertySheetType) && + nDriverPages != 0 && GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + dap->nDevPropSheets += nDriverPages; + } + else + { + nDriverPages = 0; + } + + /* include the driver page */ + if (dap->HasDriverPage) + dap->nDevPropSheets++; + + /* add the device property sheets */ + if (dap->nDevPropSheets != 0) + { + dap->DevPropSheets = HeapAlloc(GetProcessHeap(), + HEAP_ZERO_MEMORY, + dap->nDevPropSheets * sizeof(HPROPSHEETPAGE)); + if (dap->DevPropSheets != NULL) + { + if (nDriverPages != 0) + { + psh.phpage = dap->DevPropSheets; + + /* query the device property sheet pages to add */ + if (SetupDiGetClassDevPropertySheets(DeviceInfoSet, + DeviceInfoData, + &psh, + dap->nDevPropSheets, + NULL, + dap->PropertySheetType)) + { + /* add the property sheets */ + for (iPage = 0; + iPage != nDriverPages; + iPage++) + { + PropSheet_AddPage(hPropSheetDlg, + dap->DevPropSheets[iPage]); + } + + dap->FreeDevPropSheets = TRUE; + } + else + { + /* cleanup, we were unable to get the device property sheets */ + dap->nDevPropSheets -= nDriverPages; + nDriverPages = 0; + if (dap->nDevPropSheets == 0) + { + HeapFree(GetProcessHeap(), + 0, + dap->DevPropSheets); + dap->DevPropSheets = NULL; + } + } + } + + /* add the driver page if necessary */ + if (dap->HasDriverPage) + { + PROPSHEETPAGE pspDriver = {0}; + pspDriver.dwSize = sizeof(PROPSHEETPAGE); + pspDriver.dwFlags = PSP_DEFAULT; + pspDriver.hInstance = hDllInstance; + pspDriver.pszTemplate = (LPCWSTR)MAKEINTRESOURCE(IDD_DEVICEDRIVER); + pspDriver.pfnDlgProc = AdvProcDriverDlgProc; + pspDriver.lParam = (LPARAM)dap; + dap->DevPropSheets[iPage] = dap->pCreatePropertySheetPageW(&pspDriver); + if (dap->DevPropSheets[iPage] != NULL) + { + if (PropSheet_AddPage(hPropSheetDlg, + dap->DevPropSheets[iPage])) + { + iPage++; + } + else + { + dap->pDestroyPropertySheetPage(dap->DevPropSheets[iPage]); + } + } + } + } + else + dap->nDevPropSheets = 0; + } + /* finally, disable the apply button */ PropSheet_UnChanged(hPropSheetDlg, hwndDlg); @@ -785,9 +934,12 @@ } } - UpdateDevInfo(hwndDlg, - dap, - FALSE); + /* do not call UpdateDevInfo directly in here because it modifies + the pages of the property sheet! */ + PostMessage(hwndDlg, + PM_INITIALIZE, + 0, + 0); } Ret = TRUE; break; @@ -803,28 +955,28 @@ break; } + case PM_INITIALIZE: + { + UpdateDevInfo(hwndDlg, + dap, + FALSE); + dap->PageInitialized = TRUE; + break; + } + case WM_DESTROY: { - HICON hDevIcon; - /* restore the old window proc of the subclassed parent window */ if (dap->hWndParent != NULL && dap->ParentOldWndProc != NULL) { - SetWindowLongPtr(dap->hWndParent, - GWLP_WNDPROC, - (LONG_PTR)dap->ParentOldWndProc); + if (SetWindowLongPtr(dap->hWndParent, + GWLP_WNDPROC, + (LONG_PTR)dap->ParentOldWndProc) == (LONG_PTR)DlgParentSubWndProc) + { + RemoveProp(dap->hWndParent, + L"DevMgrDevChangeSub"); + } } - - /* destroy the device icon */ - hDevIcon = (HICON)SendDlgItemMessage(hwndDlg, - IDC_DEVICON, - STM_GETICON, - 0, - 0); - if (hDevIcon != NULL) - { - DestroyIcon(hDevIcon); - } break; } } @@ -845,7 +997,6 @@ { PROPSHEETHEADER psh = {0}; PROPSHEETPAGE pspGeneral = {0}; - DWORD nPropSheets = 0; PPROPERTYSHEETW pPropertySheetW; PCREATEPROPERTYSHEETPAGEW pCreatePropertySheetPageW; PDESTROYPROPERTYSHEETPAGE pDestroyPropertySheetPage; @@ -946,6 +1097,8 @@ DevAdvPropInfo->lpMachineName = lpMachineName; DevAdvPropInfo->szDevName[0] = L'\0'; DevAdvPropInfo->hComCtl32 = hComCtl32; + DevAdvPropInfo->pCreatePropertySheetPageW = pCreatePropertySheetPageW; + DevAdvPropInfo->pDestroyPropertySheetPage = pDestroyPropertySheetPage; DevAdvPropInfo->IsAdmin = IsUserAdmin(); DevAdvPropInfo->DoDefaultDevAction = ((dwFlags & DPF_DEVICE_STATUS_ACTION) != 0); @@ -959,27 +1112,9 @@ DIGCDP_FLAG_REMOTE_ADVANCED : DIGCDP_FLAG_ADVANCED; - /* find out how many property sheets we need */ - if (SetupDiGetClassDevPropertySheets(DeviceInfoSet, - &DevAdvPropInfo->DeviceInfoData, - &psh, - 0, - &nPropSheets, - DevAdvPropInfo->PropertySheetType) && - nPropSheets != 0) - { - DPRINT1("SetupDiGetClassDevPropertySheets unexpectedly returned TRUE!\n"); - goto Cleanup; - } - - if (nPropSheets != 0 && GetLastError() != ERROR_INSUFFICIENT_BUFFER) - { - goto Cleanup; - } - psh.phpage = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, - (nPropSheets + 1) * sizeof(HPROPSHEETPAGE)); + 1 * sizeof(HPROPSHEETPAGE)); if (psh.phpage == NULL) { goto Cleanup; @@ -992,32 +1127,14 @@ pspGeneral.pszTemplate = (LPCWSTR)MAKEINTRESOURCE(IDD_DEVICEGENERAL); pspGeneral.pfnDlgProc = AdvPropGeneralDlgProc; pspGeneral.lParam = (LPARAM)DevAdvPropInfo; - psh.phpage[0] = pCreatePropertySheetPageW(&pspGeneral); - if (psh.phpage[0] != NULL) + psh.phpage[psh.nPages] = pCreatePropertySheetPageW(&pspGeneral); + if (psh.phpage[psh.nPages] != NULL) { psh.nPages++; } - DevAdvPropInfo->nDevPropSheets = nPropSheets; + DevAdvPropInfo->nDevPropSheets = psh.nPages; - if (nPropSheets != 0) - { - DevAdvPropInfo->DevPropSheets = psh.phpage + psh.nPages; - - /* create the device property sheets */ - if (!SetupDiGetClassDevPropertySheets(DeviceInfoSet, - &DevAdvPropInfo->DeviceInfoData, - &psh, - nPropSheets + psh.nPages, - NULL, - DevAdvPropInfo->PropertySheetType)) - { - goto Cleanup; - } - } - - /* FIXME - add the "Driver" property sheet if necessary */ - if (psh.nPages != 0) { Ret = pPropertySheetW(&psh); @@ -1066,6 +1183,11 @@ SetupDiDestroyDeviceInfoList(DevAdvPropInfo->CurrentDeviceInfoSet); } + if (DevAdvPropInfo->hDevIcon != NULL) + { + DestroyIcon(DevAdvPropInfo->hDevIcon); + } + HeapFree(GetProcessHeap(), 0, DevAdvPropInfo); _____ Modified: trunk/reactos/lib/devmgr/misc.c --- trunk/reactos/lib/devmgr/misc.c 2005-12-26 23:35:02 UTC (rev 20357) +++ trunk/reactos/lib/devmgr/misc.c 2005-12-26 23:37:04 UTC (rev 20358) @@ -532,6 +532,31 @@ BOOL +IsDriverInstalled(IN DEVINST DevInst, + IN HMACHINE hMachine, + OUT BOOL *Installed) +{ + CONFIGRET cr; + ULONG Status, ProblemNumber; + BOOL Ret = FALSE; + + cr = CM_Get_DevNode_Status_Ex(&Status, + &ProblemNumber, + DevInst, + 0, + hMachine); + if (cr == CR_SUCCESS) + { + *Installed = ((Status & DN_HAS_PROBLEM) != 0 || + (Status & (DN_DRIVER_LOADED | DN_STARTED)) != 0); + Ret = TRUE; + } + + return Ret; +} + + +BOOL EnableDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, _____ Modified: trunk/reactos/lib/devmgr/precomp.h --- trunk/reactos/lib/devmgr/precomp.h 2005-12-26 23:35:02 UTC (rev 20357) +++ trunk/reactos/lib/devmgr/precomp.h 2005-12-26 23:37:04 UTC (rev 20358) @@ -262,6 +262,11 @@ OUT BOOL *IsHidden); BOOL +IsDriverInstalled(IN DEVINST DevInst, + IN HMACHINE hMachine, + OUT BOOL *Installed); + +BOOL CanDisableDevice(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *CanDisable); _____ Modified: trunk/reactos/lib/devmgr/resource.h --- trunk/reactos/lib/devmgr/resource.h 2005-12-26 23:35:02 UTC (rev 20357) +++ trunk/reactos/lib/devmgr/resource.h 2005-12-26 23:37:04 UTC (rev 20358) @@ -5,6 +5,8 @@ #define IDD_HARDWARE 100 #define IDD_DEVICEGENERAL 101 +#define IDD_DEVICEDRIVER 102 +#define IDD_DEVICERESOURCES 103 #define IDC_DEVICON 0x57B #define IDC_DEVNAME 0x57C @@ -24,6 +26,9 @@ #define IDC_PROPERTIES 0x58A #define IDC_DEVUSAGELABEL 0x58B #define IDC_DEVPROBLEM 0x58C +#define IDC_DRVPROVIDER 0x58D +#define IDC_DRVDATE 0x58E +#define IDC_DRVVERSION 0x58F #define IDS_NAME 0x100 #define IDS_TYPE 0x101
18 years, 12 months
1
0
0
0
← Newer
1
...
11
12
13
14
15
16
17
...
71
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Results per page:
10
25
50
100
200