From 427ae9ad54492954578cafbfcd2d815a084e0986 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 18 Jul 2016 00:17:44 +0300 Subject: put modules to 'Windows' --- src/WindowsUtils.hs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 src/WindowsUtils.hs (limited to 'src/WindowsUtils.hs') diff --git a/src/WindowsUtils.hs b/src/WindowsUtils.hs deleted file mode 100644 index 6fa1f0e..0000000 --- a/src/WindowsUtils.hs +++ /dev/null @@ -1,28 +0,0 @@ -{- - - Copyright 2016 Egor Tensin - - This file is licensed under the terms of the MIT License. - - See LICENSE.txt for details. --} - -module WindowsUtils - ( notifyEnvironmentUpdate - ) where - -import qualified Graphics.Win32.GDI.Types as WinAPI -import qualified Graphics.Win32.Message as WinAPI -import qualified System.Win32.Types as WinAPI - -foreign import ccall "SendNotifyMessageW" - c_SendNotifyMessage :: WinAPI.HWND -> WinAPI.WindowMessage -> WinAPI.WPARAM -> WinAPI.LPARAM -> IO WinAPI.LRESULT - -notifyEnvironmentUpdate :: IO () -notifyEnvironmentUpdate = - WinAPI.withTString "Environment" $ \lparamPtr -> do - let wparam = 0 - let lparam = fromIntegral $ WinAPI.castPtrToUINTPtr lparamPtr - _ <- c_SendNotifyMessage allWindows messageCode wparam lparam - return () - where - messageCode = WinAPI.wM_WININICHANGE - hWND_BROADCAST = WinAPI.castUINTPtrToPtr 0xffff - allWindows = hWND_BROADCAST -- cgit v1.2.3