diff win/wintoast.cpp @ 2127:663467f6eee4

Code cleanup: Add constants to header for dark mode, buffer sizes and Unicode support. Windows and OS/2 can both be built without Unicode support for legacy platforms and apps. Some new Windows features require Unicode (notifications, edge) and Unicode is buggy on OS/2. Can now check if Unicode is supported with the DW_FEATURE_UTF8_UNICODE feature test. Dark mode constants added DW_DARK_MODE_DISABLED/BASIC/FULL/FORCED. Win: Include dw.h in the WinToast glue for the constants, and improve safety in Edge glue.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sun, 28 Jun 2020 20:34:25 +0000
parents 251d050d306b
children 2e804b4db81e
line wrap: on
line diff
--- a/win/wintoast.cpp	Sun Jun 28 05:39:08 2020 +0000
+++ b/win/wintoast.cpp	Sun Jun 28 20:34:25 2020 +0000
@@ -1,12 +1,12 @@
 /* Simple WinToast forwarder from Dynamic Windows APIs */
 
+#include "dw.h"
 #include "wintoastlib.h"
 
 using namespace WinToastLib;
 
 extern "C" {
    LRESULT CALLBACK _wndproc(HWND hWnd, UINT msg, WPARAM mp1, LPARAM mp2);
-   void dw_signal_disconnect_by_window(HWND window);
 }
 
 class DWHandler : public IWinToastHandler {
@@ -118,9 +118,9 @@
          handler->templ = templ;
 
          if(templ && WinToast::instance()->showToast(*templ, handler) >= 0)
-            return 0; // DW_ERROR_NONE
+            return DW_ERROR_NONE;
       }
-      return -1; // DW_ERROR_UNKNOWN
+      return DW_ERROR_UNKNOWN;
    }
 
    BOOL _dw_toast_is_compatible(void)