Author: tkreuzer
Date: Sun Jun 28 03:54:02 2009
New Revision: 41653
URL:
http://svn.reactos.org/svn/reactos?rev=41653&view=rev
Log:
[FORMATTING] Fix indentation, no code change
Modified:
trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/stockobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/stockobj.c [iso-8859-1] Sun Jun 28
03:54:02 2009
@@ -30,37 +30,37 @@
static const COLORREF SysColors[] =
{
- RGB(212, 208, 200), /* COLOR_SCROLLBAR */
- RGB(58, 110, 165), /* COLOR_BACKGROUND */
- RGB(10, 36, 106), /* COLOR_ACTIVECAPTION */
- RGB(128, 128, 128), /* COLOR_INACTIVECAPTION */
- RGB(212, 208, 200), /* COLOR_MENU */
- RGB(255, 255, 255), /* COLOR_WINDOW */
- RGB(0, 0, 0), /* COLOR_WINDOWFRAME */
- RGB(0, 0, 0), /* COLOR_MENUTEXT */
- RGB(0, 0, 0), /* COLOR_WINDOWTEXT */
- RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
- RGB(212, 208, 200), /* COLOR_ACTIVEBORDER */
- RGB(212, 208, 200), /* COLOR_INACTIVEBORDER */
- RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
- RGB(10, 36, 106), /* COLOR_HIGHLIGHT */
- RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
- RGB(212, 208, 200), /* COLOR_BTNFACE */
- RGB(128, 128, 128), /* COLOR_BTNSHADOW */
- RGB(128, 128, 128), /* COLOR_GRAYTEXT */
- RGB(0, 0, 0), /* COLOR_BTNTEXT */
- RGB(212, 208, 200), /* COLOR_INACTIVECAPTIONTEXT */
- RGB(255, 255, 255), /* COLOR_BTNHIGHLIGHT */
- RGB(64, 64, 64), /* COLOR_3DDKSHADOW */
- RGB(212, 208, 200), /* COLOR_3DLIGHT */
- RGB(0, 0, 0), /* COLOR_INFOTEXT */
- RGB(255, 255, 225), /* COLOR_INFOBK */
- RGB(181, 181, 181), /* COLOR_UNKNOWN */
- RGB(0, 0, 128), /* COLOR_HOTLIGHT */
- RGB(166, 202, 240), /* COLOR_GRADIENTACTIVECAPTION */
- RGB(192, 192, 192), /* COLOR_GRADIENTINACTIVECAPTION */
- RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
- RGB(236, 233, 216) /* COLOR_MENUBAR */
+ RGB(212, 208, 200), /* COLOR_SCROLLBAR */
+ RGB(58, 110, 165), /* COLOR_BACKGROUND */
+ RGB(10, 36, 106), /* COLOR_ACTIVECAPTION */
+ RGB(128, 128, 128), /* COLOR_INACTIVECAPTION */
+ RGB(212, 208, 200), /* COLOR_MENU */
+ RGB(255, 255, 255), /* COLOR_WINDOW */
+ RGB(0, 0, 0), /* COLOR_WINDOWFRAME */
+ RGB(0, 0, 0), /* COLOR_MENUTEXT */
+ RGB(0, 0, 0), /* COLOR_WINDOWTEXT */
+ RGB(255, 255, 255), /* COLOR_CAPTIONTEXT */
+ RGB(212, 208, 200), /* COLOR_ACTIVEBORDER */
+ RGB(212, 208, 200), /* COLOR_INACTIVEBORDER */
+ RGB(128, 128, 128), /* COLOR_APPWORKSPACE */
+ RGB(10, 36, 106), /* COLOR_HIGHLIGHT */
+ RGB(255, 255, 255), /* COLOR_HIGHLIGHTTEXT */
+ RGB(212, 208, 200), /* COLOR_BTNFACE */
+ RGB(128, 128, 128), /* COLOR_BTNSHADOW */
+ RGB(128, 128, 128), /* COLOR_GRAYTEXT */
+ RGB(0, 0, 0), /* COLOR_BTNTEXT */
+ RGB(212, 208, 200), /* COLOR_INACTIVECAPTIONTEXT */
+ RGB(255, 255, 255), /* COLOR_BTNHIGHLIGHT */
+ RGB(64, 64, 64), /* COLOR_3DDKSHADOW */
+ RGB(212, 208, 200), /* COLOR_3DLIGHT */
+ RGB(0, 0, 0), /* COLOR_INFOTEXT */
+ RGB(255, 255, 225), /* COLOR_INFOBK */
+ RGB(181, 181, 181), /* COLOR_UNKNOWN */
+ RGB(0, 0, 128), /* COLOR_HOTLIGHT */
+ RGB(166, 202, 240), /* COLOR_GRADIENTACTIVECAPTION */
+ RGB(192, 192, 192), /* COLOR_GRADIENTINACTIVECAPTION */
+ RGB(49, 106, 197), /* COLOR_MENUHILIGHT */
+ RGB(236, 233, 216) /* COLOR_MENUBAR */
};
#define NUM_SYSCOLORS (sizeof(SysColors) / sizeof(SysColors[0]))
@@ -70,81 +70,88 @@
/* GDI stock objects */
static LOGPEN WhitePen =
-{ PS_SOLID, { 0, 0 }, RGB(255,255,255) };
+ { PS_SOLID, { 0, 0 }, RGB(255,255,255) };
static LOGPEN BlackPen =
-{ PS_SOLID, { 0, 0 }, RGB(0,0,0) };
+ { PS_SOLID, { 0, 0 }, RGB(0,0,0) };
static LOGPEN NullPen =
-{ PS_NULL, { 0, 0 }, 0 };
+ { PS_NULL, { 0, 0 }, 0 };
static LOGFONTW OEMFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream
Vera Sans Mono
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, OEM_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
+ }; //Bitstream Vera Sans Mono
static LOGFONTW AnsiFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream
Vera Sans Mono
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
+ }; //Bitstream Vera Sans Mono
static LOGFONTW AnsiVarFont =
- { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"
+ };
static LOGFONTW SystemFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Courier New" };
//Bitstream Vera Sans
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"Courier New"
+ }; //Bitstream Vera Sans
static LOGFONTW DeviceDefaultFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
//Bitstream Vera Sans
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"
+ }; //Bitstream Vera Sans
static LOGFONTW SystemFixedFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New" }; //Bitstream
Vera Sans Mono
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, FIXED_PITCH | FF_MODERN, L"Courier New"
+ }; //Bitstream Vera Sans Mono
/* FIXME: Is this correct? */
static LOGFONTW DefaultGuiFont =
-{ 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
- 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif" };
//Bitstream Vera Sans
+ { 11, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET,
+ 0, 0, DEFAULT_QUALITY, VARIABLE_PITCH | FF_SWISS, L"MS Sans Serif"
+ }; //Bitstream Vera Sans
HGDIOBJ StockObjects[NB_STOCK_OBJECTS];
static
HPEN
FASTCALL
-IntCreateStockPen( DWORD dwPenStyle,
- DWORD dwWidth,
- ULONG ulBrushStyle,
- ULONG ulColor)
-{
- HPEN hPen;
- PBRUSH pbrushPen = PEN_AllocPenWithHandle();
-
- if ((dwPenStyle & PS_STYLE_MASK) == PS_NULL) dwWidth = 1;
-
- pbrushPen->ptPenWidth.x = abs(dwWidth);
- pbrushPen->ptPenWidth.y = 0;
- pbrushPen->ulPenStyle = dwPenStyle;
- pbrushPen->BrushAttr.lbColor = ulColor;
- pbrushPen->ulStyle = ulBrushStyle;
- pbrushPen->hbmClient = (HANDLE)NULL;
- pbrushPen->dwStyleCount = 0;
- pbrushPen->pStyle = 0;
- pbrushPen->flAttrs = GDIBRUSH_IS_OLDSTYLEPEN;
-
- switch (dwPenStyle & PS_STYLE_MASK)
- {
- case PS_NULL:
- pbrushPen->flAttrs |= GDIBRUSH_IS_NULL;
- break;
-
- case PS_SOLID:
- pbrushPen->flAttrs |= GDIBRUSH_IS_SOLID;
- break;
- }
- hPen = pbrushPen->BaseObject.hHmgr;
- PEN_UnlockPen(pbrushPen);
- return hPen;
+IntCreateStockPen(DWORD dwPenStyle,
+ DWORD dwWidth,
+ ULONG ulBrushStyle,
+ ULONG ulColor)
+{
+ HPEN hPen;
+ PBRUSH pbrushPen = PEN_AllocPenWithHandle();
+
+ if ((dwPenStyle & PS_STYLE_MASK) == PS_NULL) dwWidth = 1;
+
+ pbrushPen->ptPenWidth.x = abs(dwWidth);
+ pbrushPen->ptPenWidth.y = 0;
+ pbrushPen->ulPenStyle = dwPenStyle;
+ pbrushPen->BrushAttr.lbColor = ulColor;
+ pbrushPen->ulStyle = ulBrushStyle;
+ pbrushPen->hbmClient = (HANDLE)NULL;
+ pbrushPen->dwStyleCount = 0;
+ pbrushPen->pStyle = 0;
+ pbrushPen->flAttrs = GDIBRUSH_IS_OLDSTYLEPEN;
+
+ switch (dwPenStyle & PS_STYLE_MASK)
+ {
+ case PS_NULL:
+ pbrushPen->flAttrs |= GDIBRUSH_IS_NULL;
+ break;
+
+ case PS_SOLID:
+ pbrushPen->flAttrs |= GDIBRUSH_IS_SOLID;
+ break;
+ }
+ hPen = pbrushPen->BaseObject.hHmgr;
+ PEN_UnlockPen(pbrushPen);
+ return hPen;
}
/*!
@@ -153,47 +160,47 @@
VOID FASTCALL
CreateStockObjects(void)
{
- UINT Object;
-
- DPRINT("Beginning creation of stock objects\n");
-
- /* Create GDI Stock Objects from the logical structures we've defined */
-
- StockObjects[WHITE_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
- StockObjects[DC_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
- StockObjects[LTGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(192,192,192));
- StockObjects[GRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(128,128,128));
- StockObjects[DKGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(64,64,64));
- StockObjects[BLACK_BRUSH] = IntGdiCreateSolidBrush(RGB(0,0,0));
- StockObjects[NULL_BRUSH] = IntGdiCreateNullBrush();
-
- StockObjects[WHITE_PEN] = IntCreateStockPen(WhitePen.lopnStyle, WhitePen.lopnWidth.x,
BS_SOLID, WhitePen.lopnColor);
- StockObjects[BLACK_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x,
BS_SOLID, BlackPen.lopnColor);
- StockObjects[DC_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x,
BS_SOLID, BlackPen.lopnColor);
- StockObjects[NULL_PEN] = IntCreateStockPen(NullPen.lopnStyle, NullPen.lopnWidth.x,
BS_SOLID, NullPen.lopnColor);
-
- StockObjects[20] = NULL; /* TODO: Unknown internal stock object */
- StockObjects[DEFAULT_BITMAP] = IntGdiCreateBitmap(1, 1, 1, 1, NULL);
-
- (void) TextIntCreateFontIndirect(&OEMFixedFont,
(HFONT*)&StockObjects[OEM_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&AnsiFixedFont,
(HFONT*)&StockObjects[ANSI_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&AnsiVarFont,
(HFONT*)&StockObjects[ANSI_VAR_FONT]);
- (void) TextIntCreateFontIndirect(&SystemFont,
(HFONT*)&StockObjects[SYSTEM_FONT]);
- (void) TextIntCreateFontIndirect(&DeviceDefaultFont,
(HFONT*)&StockObjects[DEVICE_DEFAULT_FONT]);
- (void) TextIntCreateFontIndirect(&SystemFixedFont,
(HFONT*)&StockObjects[SYSTEM_FIXED_FONT]);
- (void) TextIntCreateFontIndirect(&DefaultGuiFont,
(HFONT*)&StockObjects[DEFAULT_GUI_FONT]);
-
- StockObjects[DEFAULT_PALETTE] = (HGDIOBJ)PALETTE_Init();
-
- for (Object = 0; Object < NB_STOCK_OBJECTS; Object++)
- {
- if (NULL != StockObjects[Object])
- {
- GDIOBJ_ConvertToStockObj(&StockObjects[Object]);
- }
- }
-
- DPRINT("Completed creation of stock objects\n");
+ UINT Object;
+
+ DPRINT("Beginning creation of stock objects\n");
+
+ /* Create GDI Stock Objects from the logical structures we've defined */
+
+ StockObjects[WHITE_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
+ StockObjects[DC_BRUSH] = IntGdiCreateSolidBrush(RGB(255,255,255));
+ StockObjects[LTGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(192,192,192));
+ StockObjects[GRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(128,128,128));
+ StockObjects[DKGRAY_BRUSH] = IntGdiCreateSolidBrush(RGB(64,64,64));
+ StockObjects[BLACK_BRUSH] = IntGdiCreateSolidBrush(RGB(0,0,0));
+ StockObjects[NULL_BRUSH] = IntGdiCreateNullBrush();
+
+ StockObjects[WHITE_PEN] = IntCreateStockPen(WhitePen.lopnStyle, WhitePen.lopnWidth.x,
BS_SOLID, WhitePen.lopnColor);
+ StockObjects[BLACK_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x,
BS_SOLID, BlackPen.lopnColor);
+ StockObjects[DC_PEN] = IntCreateStockPen(BlackPen.lopnStyle, BlackPen.lopnWidth.x,
BS_SOLID, BlackPen.lopnColor);
+ StockObjects[NULL_PEN] = IntCreateStockPen(NullPen.lopnStyle, NullPen.lopnWidth.x,
BS_SOLID, NullPen.lopnColor);
+
+ StockObjects[20] = NULL; /* TODO: Unknown internal stock object */
+ StockObjects[DEFAULT_BITMAP] = IntGdiCreateBitmap(1, 1, 1, 1, NULL);
+
+ (void) TextIntCreateFontIndirect(&OEMFixedFont,
(HFONT*)&StockObjects[OEM_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&AnsiFixedFont,
(HFONT*)&StockObjects[ANSI_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&AnsiVarFont,
(HFONT*)&StockObjects[ANSI_VAR_FONT]);
+ (void) TextIntCreateFontIndirect(&SystemFont,
(HFONT*)&StockObjects[SYSTEM_FONT]);
+ (void) TextIntCreateFontIndirect(&DeviceDefaultFont,
(HFONT*)&StockObjects[DEVICE_DEFAULT_FONT]);
+ (void) TextIntCreateFontIndirect(&SystemFixedFont,
(HFONT*)&StockObjects[SYSTEM_FIXED_FONT]);
+ (void) TextIntCreateFontIndirect(&DefaultGuiFont,
(HFONT*)&StockObjects[DEFAULT_GUI_FONT]);
+
+ StockObjects[DEFAULT_PALETTE] = (HGDIOBJ)PALETTE_Init();
+
+ for (Object = 0; Object < NB_STOCK_OBJECTS; Object++)
+ {
+ if (NULL != StockObjects[Object])
+ {
+ GDIOBJ_ConvertToStockObj(&StockObjects[Object]);
+ }
+ }
+
+ DPRINT("Completed creation of stock objects\n");
}
/*!
@@ -204,150 +211,150 @@
HGDIOBJ APIENTRY
NtGdiGetStockObject(INT Object)
{
- DPRINT("NtGdiGetStockObject index %d\n", Object);
-
- return ((Object < 0) || (NB_STOCK_OBJECTS <= Object)) ? NULL :
StockObjects[Object];
+ DPRINT("NtGdiGetStockObject index %d\n", Object);
+
+ return ((Object < 0) || (NB_STOCK_OBJECTS <= Object)) ? NULL :
StockObjects[Object];
}
BOOL FASTCALL
IntSetSysColors(UINT nColors, INT *Elements, COLORREF *Colors)
{
- UINT i;
-
- ASSERT(Elements);
- ASSERT(Colors);
-
- for(i = 0; i < nColors; i++)
- {
- if((UINT)(*Elements) < NUM_SYSCOLORS)
- {
- gpsi->argbSystem[*Elements] = *Colors;
- IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
- IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
- }
- Elements++;
- Colors++;
- }
- return nColors > 0;
+ UINT i;
+
+ ASSERT(Elements);
+ ASSERT(Colors);
+
+ for (i = 0; i < nColors; i++)
+ {
+ if ((UINT)(*Elements) < NUM_SYSCOLORS)
+ {
+ gpsi->argbSystem[*Elements] = *Colors;
+ IntGdiSetSolidBrushColor(gpsi->ahbrSystem[*Elements], *Colors);
+ IntGdiSetSolidPenColor(gpsi->SysColorPens[*Elements], *Colors);
+ }
+ Elements++;
+ Colors++;
+ }
+ return nColors > 0;
}
BOOL FASTCALL
IntGetSysColorBrushes(HBRUSH *pahBrushes, UINT nBrushes)
{
- UINT i;
-
- ASSERT(pahBrushes);
-
- if(nBrushes > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- for(i = 0; i < nBrushes; i++)
- {
- pahBrushes[i] = gpsi->ahbrSystem[i];
- }
-
- return nBrushes > 0;
+ UINT i;
+
+ ASSERT(pahBrushes);
+
+ if (nBrushes > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ for (i = 0; i < nBrushes; i++)
+ {
+ pahBrushes[i] = gpsi->ahbrSystem[i];
+ }
+
+ return nBrushes > 0;
}
HGDIOBJ FASTCALL
IntGetSysColorBrush(INT Object)
{
- return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL :
gpsi->ahbrSystem[Object];
+ return ((Object < 0) || (NUM_SYSCOLORS <= Object)) ? NULL :
gpsi->ahbrSystem[Object];
}
BOOL FASTCALL
IntGetSysColorPens(HPEN *Pens, UINT nPens)
{
- UINT i;
-
- ASSERT(Pens);
-
- if(nPens > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- for(i = 0; i < nPens; i++)
- {
- *(Pens++) = gpsi->SysColorPens[i];
- }
-
- return nPens > 0;
+ UINT i;
+
+ ASSERT(Pens);
+
+ if (nPens > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ for (i = 0; i < nPens; i++)
+ {
+ *(Pens++) = gpsi->SysColorPens[i];
+ }
+
+ return nPens > 0;
}
BOOL FASTCALL
IntGetSysColors(COLORREF *Colors, UINT nColors)
{
- UINT i;
- COLORREF *col;
-
- ASSERT(Colors);
-
- if(nColors > NUM_SYSCOLORS)
- {
- SetLastWin32Error(ERROR_INVALID_PARAMETER);
- return FALSE;
- }
-
- col = &gpsi->argbSystem[0];
- for(i = 0; i < nColors; i++)
- {
- *(Colors++) = *(col++);
- }
-
- return nColors > 0;
+ UINT i;
+ COLORREF *col;
+
+ ASSERT(Colors);
+
+ if (nColors > NUM_SYSCOLORS)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
+ col = &gpsi->argbSystem[0];
+ for (i = 0; i < nColors; i++)
+ {
+ *(Colors++) = *(col++);
+ }
+
+ return nColors > 0;
}
DWORD FASTCALL
IntGetSysColor(INT nIndex)
{
- return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->argbSystem[nIndex];
+ return (NUM_SYSCOLORS <= (UINT)nIndex) ? 0 : gpsi->argbSystem[nIndex];
}
VOID FASTCALL
CreateSysColorObjects(VOID)
{
- UINT i;
- LOGPEN Pen;
-
- for(i = 0; i < NUM_SYSCOLORS; i++)
- {
- gpsi->argbSystem[i] = SysColors[i];
- }
-
- /* Create the syscolor brushes */
- for(i = 0; i < NUM_SYSCOLORS; i++)
- {
- if(gpsi->ahbrSystem[i] == NULL)
- {
- gpsi->ahbrSystem[i] = IntGdiCreateSolidBrush(SysColors[i]);
- if(gpsi->ahbrSystem[i] != NULL)
- {
- GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->ahbrSystem[i]);
- }
- }
- }
-
- /* Create the syscolor pens */
- Pen.lopnStyle = PS_SOLID;
- Pen.lopnWidth.x = 0;
- Pen.lopnWidth.y = 0;
- for(i = 0; i < NUM_SYSCOLORS; i++)
- {
- if(gpsi->SysColorPens[i] == NULL)
- {
- Pen.lopnColor = SysColors[i];
- gpsi->SysColorPens[i] = IntCreateStockPen(Pen.lopnStyle, Pen.lopnWidth.x,
BS_SOLID, Pen.lopnColor);
- if(gpsi->SysColorPens[i] != NULL)
- {
- GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->SysColorPens[i]);
- }
- }
- }
+ UINT i;
+ LOGPEN Pen;
+
+ for (i = 0; i < NUM_SYSCOLORS; i++)
+ {
+ gpsi->argbSystem[i] = SysColors[i];
+ }
+
+ /* Create the syscolor brushes */
+ for (i = 0; i < NUM_SYSCOLORS; i++)
+ {
+ if (gpsi->ahbrSystem[i] == NULL)
+ {
+ gpsi->ahbrSystem[i] = IntGdiCreateSolidBrush(SysColors[i]);
+ if (gpsi->ahbrSystem[i] != NULL)
+ {
+ GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->ahbrSystem[i]);
+ }
+ }
+ }
+
+ /* Create the syscolor pens */
+ Pen.lopnStyle = PS_SOLID;
+ Pen.lopnWidth.x = 0;
+ Pen.lopnWidth.y = 0;
+ for (i = 0; i < NUM_SYSCOLORS; i++)
+ {
+ if (gpsi->SysColorPens[i] == NULL)
+ {
+ Pen.lopnColor = SysColors[i];
+ gpsi->SysColorPens[i] = IntCreateStockPen(Pen.lopnStyle, Pen.lopnWidth.x,
BS_SOLID, Pen.lopnColor);
+ if (gpsi->SysColorPens[i] != NULL)
+ {
+ GDIOBJ_ConvertToStockObj((HGDIOBJ*)&gpsi->SysColorPens[i]);
+ }
+ }
+ }
}
/* EOF */