aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/Windows/Utils.hs
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-01-25 05:58:46 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-01-25 05:58:46 +0300
commitd3e2eeb7892e132120174de5567d932d83c97218 (patch)
treede2fa96af0f64764e7abf7b9482078e19502bae9 /src/Windows/Utils.hs
parentadd Portability to module descriptions (diff)
downloadwindows-env-d3e2eeb7892e132120174de5567d932d83c97218.tar.gz
windows-env-d3e2eeb7892e132120174de5567d932d83c97218.zip
rename namespace 'Windows' to 'WindowsEnv'
Diffstat (limited to 'src/Windows/Utils.hs')
-rw-r--r--src/Windows/Utils.hs30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/Windows/Utils.hs b/src/Windows/Utils.hs
deleted file mode 100644
index 414ec50..0000000
--- a/src/Windows/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 Windows.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