https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5e4f6c69c78314656caf0…
commit 5e4f6c69c78314656caf0b431e64af12178c42de
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Mon Dec 25 21:12:00 2017 +0100
[DESK] Rename DATA structures and some functions. #179
---
dll/cpl/desk/advmon.c | 4 ++--
dll/cpl/desk/background.c | 28 ++++++++++++++--------------
dll/cpl/desk/desk.c | 6 +++---
dll/cpl/desk/effappdlg.c | 12 ++++++------
dll/cpl/desk/settings.c | 32 ++++++++++++++++----------------
5 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/dll/cpl/desk/advmon.c b/dll/cpl/desk/advmon.c
index 306583f8b7..f363b66a16 100644
--- a/dll/cpl/desk/advmon.c
+++ b/dll/cpl/desk/advmon.c
@@ -23,7 +23,7 @@ PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
}
static BOOL
-InitPropSheetPage(PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc, LPARAM lParam)
+DisplayAdvancedSettingsInitPropSheetPage(PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC
DlgProc, LPARAM lParam)
{
HPROPSHEETPAGE hPage;
PROPSHEETPAGE psp;
@@ -102,7 +102,7 @@ DisplayAdvancedSettings(HWND hWndParent, PDISPLAY_DEVICE_ENTRY
DisplayDevice)
psh.pszCaption = szCaption;
psh.phpage = hpsp;
- InitPropSheetPage(&psh, IDD_ADVANCED_GENERAL, AdvGeneralPageProc,
(LPARAM)DisplayDevice);
+ DisplayAdvancedSettingsInitPropSheetPage(&psh, IDD_ADVANCED_GENERAL,
AdvGeneralPageProc, (LPARAM)DisplayDevice);
pdo = CreateDevSettings(DisplayDevice);
diff --git a/dll/cpl/desk/background.c b/dll/cpl/desk/background.c
index 9853ef9dfa..55b400b4e2 100644
--- a/dll/cpl/desk/background.c
+++ b/dll/cpl/desk/background.c
@@ -58,7 +58,7 @@ typedef struct
} BackgroundItem;
-typedef struct _DATA
+typedef struct _BACKGROUND_DATA
{
BOOL bWallpaperChanged;
BOOL bClrBackgroundChanged;
@@ -79,7 +79,7 @@ typedef struct _DATA
int cySource;
ULONG_PTR gdipToken;
-} DATA, *PDATA;
+} BACKGROUND_DATA, *PBACKGROUND_DATA;
GLOBAL_DATA g_GlobalData;
@@ -183,7 +183,7 @@ GdipGetSupportedFileExtensions(VOID)
static UINT
-AddWallpapersFromDirectory(UINT uCounter, HWND hwndBackgroundList, BackgroundItem
*backgroundItem, PDATA pData, LPCTSTR wallpaperFilename, LPCTSTR wallpaperDirectory)
+AddWallpapersFromDirectory(UINT uCounter, HWND hwndBackgroundList, BackgroundItem
*backgroundItem, PBACKGROUND_DATA pData, LPCTSTR wallpaperFilename, LPCTSTR
wallpaperDirectory)
{
WIN32_FIND_DATA fd;
HANDLE hFind;
@@ -292,7 +292,7 @@ AddWallpapersFromDirectory(UINT uCounter, HWND hwndBackgroundList,
BackgroundIte
/* Add the images in the C:\ReactOS, the wallpaper directory and the current wallpaper if
any */
static VOID
-AddListViewItems(HWND hwndDlg, PDATA pData)
+AddListViewItems(HWND hwndDlg, PBACKGROUND_DATA pData)
{
TCHAR szSearchPath[MAX_PATH];
LV_ITEM listItem;
@@ -454,7 +454,7 @@ AddListViewItems(HWND hwndDlg, PDATA pData)
static VOID
-InitBackgroundDialog(HWND hwndDlg, PDATA pData)
+InitBackgroundDialog(HWND hwndDlg, PBACKGROUND_DATA pData)
{
TCHAR szString[256];
HKEY regKey;
@@ -538,7 +538,7 @@ InitBackgroundDialog(HWND hwndDlg, PDATA pData)
static VOID
-OnColorButton(HWND hwndDlg, PDATA pData)
+OnColorButton(HWND hwndDlg, PBACKGROUND_DATA pData)
{
/* Load custom colors from Registry */
HKEY hKey = NULL;
@@ -622,7 +622,7 @@ CheckListViewFilenameExists(HWND hwndList, LPCTSTR tszFileName)
static VOID
-OnBrowseButton(HWND hwndDlg, PDATA pData)
+OnBrowseButton(HWND hwndDlg, PBACKGROUND_DATA pData)
{
OPENFILENAME ofn;
TCHAR filename[MAX_PATH];
@@ -752,7 +752,7 @@ OnBrowseButton(HWND hwndDlg, PDATA pData)
static VOID
-ListViewItemChanged(HWND hwndDlg, PDATA pData, int itemIndex)
+ListViewItemChanged(HWND hwndDlg, PBACKGROUND_DATA pData, int itemIndex)
{
BackgroundItem *backgroundItem = NULL;
@@ -786,7 +786,7 @@ ListViewItemChanged(HWND hwndDlg, PDATA pData, int itemIndex)
static VOID
-DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PDATA pData)
+DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PBACKGROUND_DATA pData)
{
float scaleX;
float scaleY;
@@ -997,7 +997,7 @@ DrawBackgroundPreview(LPDRAWITEMSTRUCT draw, PDATA pData)
static VOID
-SetWallpaper(PDATA pData)
+SetWallpaper(PBACKGROUND_DATA pData)
{
HKEY regKey;
TCHAR szWallpaper[MAX_PATH];
@@ -1121,7 +1121,7 @@ SetWallpaper(PDATA pData)
/* Change system color */
static VOID
-SetDesktopBackColor(HWND hwndDlg, DATA *pData)
+SetDesktopBackColor(HWND hwndDlg, PBACKGROUND_DATA pData)
{
HKEY hKey;
INT iElement = COLOR_BACKGROUND;
@@ -1159,15 +1159,15 @@ BackgroundPageProc(HWND hwndDlg,
WPARAM wParam,
LPARAM lParam)
{
- PDATA pData;
+ PBACKGROUND_DATA pData;
struct GdiplusStartupInput gdipStartup;
- pData = (PDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+ pData = (PBACKGROUND_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch (uMsg)
{
case WM_INITDIALOG:
- pData = (DATA*) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DATA));
+ pData = (PBACKGROUND_DATA)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
sizeof(BACKGROUND_DATA));
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pData);
gdipStartup.GdiplusVersion = 1;
gdipStartup.DebugEventCallback = NULL;
diff --git a/dll/cpl/desk/desk.c b/dll/cpl/desk/desk.c
index fa59d1733d..2cf27a7026 100644
--- a/dll/cpl/desk/desk.c
+++ b/dll/cpl/desk/desk.c
@@ -64,7 +64,7 @@ LoadPopupMenu(IN HINSTANCE hInstance,
}
static BOOL CALLBACK
-PropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
+DisplayAppletPropSheetAddPage(HPROPSHEETPAGE hpage, LPARAM lParam)
{
PROPSHEETHEADER *ppsh = (PROPSHEETHEADER *)lParam;
if (ppsh != NULL && ppsh->nPages < MAX_DESK_PAGES)
@@ -97,7 +97,7 @@ InitPropSheetPage(PROPSHEETHEADER *ppsh, WORD idDlg, DLGPROC DlgProc,
LPFNPSPCAL
hPage = CreatePropertySheetPage(&psp);
if (hPage != NULL)
{
- return PropSheetAddPage(hPage, (LPARAM)ppsh);
+ return DisplayAppletPropSheetAddPage(hPage, (LPARAM)ppsh);
}
}
@@ -199,7 +199,7 @@ DisplayApplet(HWND hwnd, UINT uMsg, LPARAM wParam, LPARAM lParam)
/* Override the background page if requested by a shell extension */
if (PropPages[i].idDlg == IDD_BACKGROUND && hpsxa != NULL &&
- SHReplaceFromPropSheetExtArray(hpsxa, CPLPAGE_DISPLAY_BACKGROUND,
PropSheetAddPage, (LPARAM)&psh) != 0)
+ SHReplaceFromPropSheetExtArray(hpsxa, CPLPAGE_DISPLAY_BACKGROUND,
DisplayAppletPropSheetAddPage, (LPARAM)&psh) != 0)
{
/* The shell extension added one or more pages to replace the background
page.
Don't create the built-in page anymore! */
diff --git a/dll/cpl/desk/effappdlg.c b/dll/cpl/desk/effappdlg.c
index 6b4d1a57a4..e5856a2d48 100644
--- a/dll/cpl/desk/effappdlg.c
+++ b/dll/cpl/desk/effappdlg.c
@@ -12,7 +12,7 @@
/* Update all the controls with the current values for the selected screen element */
static VOID
-UpdateControls(HWND hwndDlg, GLOBALS *g)
+EffAppearanceDlgUpdateControls(HWND hwndDlg, GLOBALS *g)
{
WPARAM state;
@@ -49,7 +49,7 @@ do { \
}
static VOID
-SaveCurrentValues(HWND hwndDlg, GLOBALS *g)
+EffAppearanceDlgSaveCurrentValues(HWND hwndDlg, GLOBALS *g)
{
/* The settings get saved at the end of ApplyScheme() in theme.c,
* when clicking Apply in the main dialog. */
@@ -107,7 +107,7 @@ do { \
#undef FILL_COMBOBOX
/* Update the controls */
- UpdateControls(hwndDlg, g);
+ EffAppearanceDlgUpdateControls(hwndDlg, g);
}
INT_PTR CALLBACK
@@ -132,7 +132,7 @@ EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
switch(LOWORD(wParam))
{
case IDOK:
- SaveCurrentValues(hwndDlg, g);
+ EffAppearanceDlgSaveCurrentValues(hwndDlg, g);
EndDialog(hwndDlg, IDOK);
break;
@@ -148,7 +148,7 @@ EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
case IDC_EFFAPPEARANCE_KEYBOARDCUES:
if (HIWORD(wParam) == BN_CLICKED)
{
- UpdateControls(hwndDlg, g);
+ EffAppearanceDlgUpdateControls(hwndDlg, g);
}
break;
@@ -165,7 +165,7 @@ EffAppearanceDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
lParam)
CB_GETCURSEL, 0, 0);
g->SchemeAdv.Effects.uiFontSmoothingType = (Index == CB_ERR) ?
0 : (Index + 1);
- UpdateControls(hwndDlg, g);
+ EffAppearanceDlgUpdateControls(hwndDlg, g);
}
break;
diff --git a/dll/cpl/desk/settings.c b/dll/cpl/desk/settings.c
index b1a8737b78..c8d4761a05 100644
--- a/dll/cpl/desk/settings.c
+++ b/dll/cpl/desk/settings.c
@@ -10,14 +10,14 @@
#include "desk.h"
-typedef struct _DATA
+typedef struct _SETTINGS_DATA
{
PDISPLAY_DEVICE_ENTRY DisplayDeviceList;
PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice;
HBITMAP hSpectrumBitmaps[NUM_SPECTRUM_BITMAPS];
int cxSource[NUM_SPECTRUM_BITMAPS];
int cySource[NUM_SPECTRUM_BITMAPS];
-} DATA, *PDATA;
+} SETTINGS_DATA, *PSETTINGS_DATA;
typedef struct _TIMEOUTDATA
{
@@ -27,7 +27,7 @@ typedef struct _TIMEOUTDATA
} TIMEOUTDATA, *PTIMEOUTDATA;
static VOID
-UpdateDisplay(IN HWND hwndDlg, PDATA pData, IN BOOL bUpdateThumb)
+UpdateDisplay(IN HWND hwndDlg, PSETTINGS_DATA pData, IN BOOL bUpdateThumb)
{
TCHAR Buffer[64];
TCHAR Pixel[64];
@@ -170,7 +170,7 @@ GetPossibleSettings(IN LPCTSTR DeviceName, OUT DWORD* pSettingsCount,
OUT PSETTI
}
static BOOL
-AddDisplayDevice(IN PDATA pData, IN const DISPLAY_DEVICE *DisplayDevice)
+AddDisplayDevice(IN PSETTINGS_DATA pData, IN const DISPLAY_DEVICE *DisplayDevice)
{
PDISPLAY_DEVICE_ENTRY newEntry = NULL;
LPTSTR description = NULL;
@@ -277,7 +277,7 @@ ByeBye:
}
static VOID
-OnDisplayDeviceChanged(IN HWND hwndDlg, IN PDATA pData, IN PDISPLAY_DEVICE_ENTRY
pDeviceEntry)
+OnDisplayDeviceChanged(IN HWND hwndDlg, IN PSETTINGS_DATA pData, IN PDISPLAY_DEVICE_ENTRY
pDeviceEntry)
{
PSETTINGS_ENTRY Current;
DWORD index;
@@ -308,16 +308,16 @@ OnDisplayDeviceChanged(IN HWND hwndDlg, IN PDATA pData, IN
PDISPLAY_DEVICE_ENTRY
}
static VOID
-OnInitDialog(IN HWND hwndDlg)
+SettingsOnInitDialog(IN HWND hwndDlg)
{
BITMAP bitmap;
DWORD Result = 0;
DWORD iDevNum = 0;
DWORD i;
DISPLAY_DEVICE displayDevice;
- PDATA pData;
+ PSETTINGS_DATA pData;
- pData = HeapAlloc(GetProcessHeap(), 0, sizeof(DATA));
+ pData = HeapAlloc(GetProcessHeap(), 0, sizeof(SETTINGS_DATA));
if (pData == NULL)
return;
@@ -419,9 +419,9 @@ OnInitDialog(IN HWND hwndDlg)
}
}
-/* Get the ID for DATA::hSpectrumBitmaps */
+/* Get the ID for SETTINGS_DATA::hSpectrumBitmaps */
static VOID
-ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel, IN PDATA pData)
+ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel, IN PSETTINGS_DATA
pData)
{
HDC hdcMem;
INT iBitmap;
@@ -453,7 +453,7 @@ ShowColorSpectrum(IN HDC hDC, IN LPRECT client, IN DWORD BitsPerPel,
IN PDATA pD
}
static VOID
-OnBPPChanged(IN HWND hwndDlg, IN PDATA pData)
+OnBPPChanged(IN HWND hwndDlg, IN PSETTINGS_DATA pData)
{
/* If new BPP is not compatible with resolution:
* 1) try to find the nearest smaller matching resolution
@@ -548,7 +548,7 @@ OnBPPChanged(IN HWND hwndDlg, IN PDATA pData)
}
static VOID
-OnResolutionChanged(IN HWND hwndDlg, IN PDATA pData, IN DWORD NewPosition,
+OnResolutionChanged(IN HWND hwndDlg, IN PSETTINGS_DATA pData, IN DWORD NewPosition,
IN BOOL bUpdateThumb)
{
/* If new resolution is not compatible with color depth:
@@ -722,7 +722,7 @@ ConfirmDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN
LPARAM lParam
}
static VOID
-ApplyDisplaySettings(HWND hwndDlg, PDATA pData)
+ApplyDisplaySettings(HWND hwndDlg, PSETTINGS_DATA pData)
{
TCHAR Message[1024], Title[256];
DEVMODE devmode;
@@ -807,15 +807,15 @@ ApplyDisplaySettings(HWND hwndDlg, PDATA pData)
INT_PTR CALLBACK
SettingsPageProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
{
- PDATA pData;
+ PSETTINGS_DATA pData;
- pData = (PDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+ pData = (PSETTINGS_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
switch(uMsg)
{
case WM_INITDIALOG:
{
- OnInitDialog(hwndDlg);
+ SettingsOnInitDialog(hwndDlg);
break;
}
case WM_DRAWITEM: