4141 #define DMLIB_API
4242#endif
4343
44+ #if defined(__clang__)
45+ #pragma clang diagnostic push
46+ // identifier '_TASKDIALOGCONFIG' is reserved because it starts with '_' followed by a capital letter
47+ #pragma clang diagnostic ignored "-Wreserved-identifier"
48+ #endif
49+
4450typedef struct _TASKDIALOGCONFIG TASKDIALOGCONFIG ; // forward declaration, from <CommCtrl.h>
4551
52+ #if defined(__clang__)
53+ #pragma clang diagnostic pop
54+ #endif
4655/* *
47- * @namespace DarkMode
56+ * @namespace dmlib
4857 * @brief Provides dark mode theming, subclassing, and rendering utilities for most Win32 controls.
4958 */
50- namespace DarkMode
59+ namespace dmlib
5160{
5261 struct Colors
5362 {
@@ -117,9 +126,9 @@ namespace DarkMode
117126 * - `light`: Light mode appearance.
118127 * - `dark`: Dark mode appearance.
119128 *
120- * Set via configuration and used by style evaluators (e.g. @ref DarkMode ::calculateTreeViewStyle).
129+ * Set via configuration and used by style evaluators (e.g. @ref dmlib ::calculateTreeViewStyle).
121130 *
122- * @see DarkMode ::calculateTreeViewStyle()
131+ * @see dmlib ::calculateTreeViewStyle()
123132 */
124133 enum class TreeViewStyle : unsigned char
125134 {
@@ -131,10 +140,10 @@ namespace DarkMode
131140 /* *
132141 * @brief Describes metadata fields and compile-time features of the dark mode library.
133142 *
134- * Values of this enum are used with @ref DarkMode ::getLibInfo to retrieve version numbers and
143+ * Values of this enum are used with @ref dmlib ::getLibInfo to retrieve version numbers and
135144 * determine whether specific features were enabled during compilation.
136145 *
137- * @see DarkMode ::getLibInfo()
146+ * @see dmlib ::getLibInfo()
138147 */
139148 enum class LibInfo : unsigned char
140149 {
@@ -153,13 +162,13 @@ namespace DarkMode
153162 /* *
154163 * @brief Defines the available dark mode types for manual configurations.
155164 *
156- * Can be used in `DarkMode ::initDarkModeConfig` and in `DarkMode ::setDarkModeConfigEx`
165+ * Can be used in `dmlib ::initDarkModeConfig` and in `dmlib ::setDarkModeConfigEx`
157166 * with static_cast<UINT>(DarkModeType::'value').
158167 *
159168 * @note Also used internally to distinguish between light, dark, and classic modes.
160169 *
161- * @see DarkMode ::initDarkModeConfig()
162- * @see DarkMode ::setDarkModeConfigEx()
170+ * @see dmlib ::initDarkModeConfig()
171+ * @see dmlib ::setDarkModeConfigEx()
163172 */
164173 enum class DarkModeType : unsigned char
165174 {
@@ -471,7 +480,7 @@ namespace DarkMode
471480
472481 // / Applies theming and/or subclassing to all child controls of a parent window.
473482 DMLIB_API void setChildCtrlsSubclassAndThemeEx (HWND hParent, bool subclass, bool theme);
474- // / Wrapper for `DarkMode ::setChildCtrlsSubclassAndThemeEx`.
483+ // / Wrapper for `dmlib ::setChildCtrlsSubclassAndThemeEx`.
475484 DMLIB_API void setChildCtrlsSubclassAndTheme (HWND hParent);
476485 // / Applies theming to all child controls of a parent window.
477486 DMLIB_API void setChildCtrlsTheme (HWND hParent);
@@ -528,7 +537,7 @@ namespace DarkMode
528537 // / Applies "DarkMode_Explorer" visual style to scroll bars.
529538 DMLIB_API void setDarkScrollBar (HWND hWnd);
530539 // / Applies "DarkMode_Explorer" visual style to tooltip controls based on context.
531- DMLIB_API void setDarkTooltips (HWND hWnd, int tooltipType);
540+ DMLIB_API void setDarkTooltips (HWND hWnd, UINT tooltipType);
532541 // / Applies "DarkMode_DarkTheme" visual style if supported and experimental mode is active.
533542 DMLIB_API void setDarkThemeTheme (HWND hWnd);
534543
@@ -708,7 +717,7 @@ namespace DarkMode
708717 *
709718 * CHOOSEFONT cf{};
710719 * cf.Flags |= CF_ENABLEHOOK | CF_ENABLETEMPLATE;
711- * cf.lpfnHook = static_cast<LPCFHOOKPROC>(DarkMode ::HookDlgProc);
720+ * cf.lpfnHook = static_cast<LPCFHOOKPROC>(dmlib ::HookDlgProc);
712721 * cf.hInstance = GetModuleHandle(nullptr);
713722 * cf.lpTemplateName = MAKEINTRESOURCE(IDD_DARK_FONT_DIALOG);
714723 * ```
@@ -731,7 +740,7 @@ namespace DarkMode
731740 * @brief Wrapper for `TaskDialogIndirect` with dark mode support.
732741 *
733742 * Parameters are same as for `TaskDialogIndirect`.
734- * Should be used with `DarkMode ::setDarkTaskDlg`
743+ * Should be used with `dmlib ::setDarkTaskDlg`
735744 * used in task dialog callback procedure.
736745 *
737746 * ## Example of Callback Procedure
@@ -746,27 +755,25 @@ namespace DarkMode
746755 * {
747756 * if (uMsg == TDN_DIALOG_CONSTRUCTED)
748757 * {
749- * DarkMode ::setDarkTaskDlg(hWnd);
758+ * dmlib ::setDarkTaskDlg(hWnd);
750759 * }
751760 * return S_OK;
752761 * }
753762 * ```
754763 *
755- * @see DarkMode ::DarkTaskDlgCallback()
756- * @see DarkMode ::setDarkTaskDlg()
764+ * @see dmlib ::DarkTaskDlgCallback()
765+ * @see dmlib ::setDarkTaskDlg()
757766 */
758767 DMLIB_API HRESULT darkTaskDialogIndirect (const TASKDIALOGCONFIG * pTaskConfig, int * pnButton, int * pnRadioButton, BOOL * pfVerificationFlagChecked);
759768
760- /* *
761- * @brief Displays a message box as task dialog with themed styling.
762- */
769+ // / Displays a message box as task dialog with themed styling.
763770 DMLIB_API HRESULT darkMessageBoxW (HWND hWnd, LPCWSTR lpText, LPCWSTR lpCaption, UINT uType);
764771
765772#ifdef __cplusplus
766773 } // extern "C"
767774#endif
768775
769- } // namespace DarkMode
776+ } // namespace dmlib
770777
771778#else
772779#define _DARKMODELIB_NOT_USED
0 commit comments