diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-03-26 19:03:03 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-03-26 19:03:03 +0300 |
commit | b20d44c618f370a1998c70dd5708d9bbe4ed1c80 (patch) | |
tree | 0ec7e019648955a77e70163e6becdb06e78ca823 /lib/WindowsEnv/Utils.hs | |
parent | put utility modules to bin/Utils/ (diff) | |
download | windows-env-b20d44c618f370a1998c70dd5708d9bbe4ed1c80.tar.gz windows-env-b20d44c618f370a1998c70dd5708d9bbe4ed1c80.zip |
rename directories
Diffstat (limited to 'lib/WindowsEnv/Utils.hs')
-rw-r--r-- | lib/WindowsEnv/Utils.hs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/WindowsEnv/Utils.hs b/lib/WindowsEnv/Utils.hs deleted file mode 100644 index c852229..0000000 --- a/lib/WindowsEnv/Utils.hs +++ /dev/null @@ -1,30 +0,0 @@ --- | --- Copyright : (c) 2016 Egor Tensin <Egor.Tensin@gmail.com> --- License : MIT --- Maintainer : Egor.Tensin@gmail.com --- Stability : experimental --- Portability : Windows-only - -module WindowsEnv.Utils - ( notifyEnvironmentUpdate - ) where - -import Foreign.C.Types (CIntPtr(..)) -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 "Windows.h 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 |