diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2024-02-12 00:15:04 -0700 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2024-02-12 00:15:04 -0700 |
commit | bfcdd442de82eb0e554b0e6b21aedad6615f4367 (patch) | |
tree | eebd7f735aa6b50e23e4afb51e47039827fa1a27 /src | |
parent | dcf08c3d8960d18e3943645b58732f9c27a10ec0 (diff) | |
download | wetterhorn-bfcdd442de82eb0e554b0e6b21aedad6615f4367.tar.gz wetterhorn-bfcdd442de82eb0e554b0e6b21aedad6615f4367.tar.bz2 wetterhorn-bfcdd442de82eb0e554b0e6b21aedad6615f4367.zip |
Do not actually need to have the config wetterhorn function an FFI function.
Remove it as such!
Diffstat (limited to 'src')
-rw-r--r-- | src/Config.hs | 4 | ||||
-rw-r--r-- | src/Wetterhorn/Core.hs | 2 | ||||
-rw-r--r-- | src/Wetterhorn/FFI.hs | 5 |
3 files changed, 3 insertions, 8 deletions
diff --git a/src/Config.hs b/src/Config.hs index 14326cb..818150e 100644 --- a/src/Config.hs +++ b/src/Config.hs @@ -1,8 +1,6 @@ -module Config () where +module Config (wetterhorn) where import Wetterhorn.Core -foreign export ccall wetterhorn :: IO Wetterhorn - wetterhorn :: IO Wetterhorn wetterhorn = initWetterhorn defaultConfig diff --git a/src/Wetterhorn/Core.hs b/src/Wetterhorn/Core.hs index 7a5c0b1..33ce78d 100644 --- a/src/Wetterhorn/Core.hs +++ b/src/Wetterhorn/Core.hs @@ -50,7 +50,7 @@ defaultConfig = WConfig { keybindingHandler = \sym -> do i <- incrementState - wio (printf "[%d] Got key yolol %d\n" i sym), + wio (printf "[%d] Got key %d\n" i sym), surfaceHandler = \state ptr -> wio (printf "Surface %s is %s\n" (showHex (ptrToIntPtr ptr) "") (show state)) } diff --git a/src/Wetterhorn/FFI.hs b/src/Wetterhorn/FFI.hs index 1463396..1d74248 100644 --- a/src/Wetterhorn/FFI.hs +++ b/src/Wetterhorn/FFI.hs @@ -2,6 +2,7 @@ -- for the plugin. module Wetterhorn.FFI () where +import Config import Control.Monad (forM_) import qualified Data.ByteString as BS import qualified Data.ByteString.Char8 as CH @@ -42,10 +43,6 @@ runForeignWithReturn2 fn ptrA ptrB stableptr = do poke ptrB vB newStablePtr (conf, state') --- | This function should be defined somewhere in the code. This is kind of like --- the "main" function in XMonad. -foreign import ccall wetterhorn :: IO Wetterhorn - -- | This function is the implementation of the "hotstart" mechanism. It gives a -- pointer to the previously marshalled state and the length of that array and -- this function returns a Wetterhorn instance. |