aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/LayoutModifier.hs
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2007-11-23 15:25:19 +0100
committerAndrea Rossato <andrea.rossato@unibz.it>2007-11-23 15:25:19 +0100
commit43e3cc02dbbe9e3402fbf117d4a8412b843ce35e (patch)
tree44558ca76fa451e2572b030d51e45c2bc5d9286f /XMonad/Layout/LayoutModifier.hs
parentc1d14f8145d7ee929c9c72eb05eb41092641e519 (diff)
downloadXMonadContrib-43e3cc02dbbe9e3402fbf117d4a8412b843ce35e.tar.gz
XMonadContrib-43e3cc02dbbe9e3402fbf117d4a8412b843ce35e.tar.xz
XMonadContrib-43e3cc02dbbe9e3402fbf117d4a8412b843ce35e.zip
LayouModifier: haddock docs
darcs-hash:20071123142519-32816-499cc42b2f9ad51fc3d9f6575ccc7f8514a0493e.gz
Diffstat (limited to 'XMonad/Layout/LayoutModifier.hs')
-rw-r--r--XMonad/Layout/LayoutModifier.hs14
1 files changed, 10 insertions, 4 deletions
diff --git a/XMonad/Layout/LayoutModifier.hs b/XMonad/Layout/LayoutModifier.hs
index 7d8c615..15b0619 100644
--- a/XMonad/Layout/LayoutModifier.hs
+++ b/XMonad/Layout/LayoutModifier.hs
@@ -11,7 +11,7 @@
-- Stability : unstable
-- Portability : portable
--
--- A module for writing easy Layouts
+-- A module for writing easy Llayouts and layout modifiers
-----------------------------------------------------------------------------
module XMonad.Layout.LayoutModifier (
@@ -25,13 +25,19 @@ import XMonad
import XMonad.StackSet ( Stack )
-- $usage
--- Use LayoutHelpers to help write easy Layouts.
+-- Use LayoutModifier to help write easy Layouts.
+--
+-- LayouModifier defines a class 'LayoutModifier'. Each method as a
+-- default implementation.
+--
+-- For usage examples you can see "XMonad.Layout.WorkspaceDir",
+-- "XMonad.Layout.Magnifier", "XMonad.Layout.NoBorder",
class (Show (m a), Read (m a)) => LayoutModifier m a where
handleMess :: m a -> SomeMessage -> X (Maybe (m a))
handleMess m mess | Just Hide <- fromMessage mess = doUnhook
- | Just ReleaseResources <- fromMessage mess = doUnhook
- | otherwise = return Nothing
+ | Just ReleaseResources <- fromMessage mess = doUnhook
+ | otherwise = return Nothing
where doUnhook = do unhook m; return Nothing
handleMessOrMaybeModifyIt :: m a -> SomeMessage -> X (Maybe (Either (m a) SomeMessage))
handleMessOrMaybeModifyIt m mess = do mm' <- handleMess m mess