Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 16551e78563a5b49ff9624ee1c8b8101 > files > 719

ghc-xmonad-contrib-devel-0.11-1.1.fc18.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>XMonad.Actions.MouseGestures</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_XMonad-Actions-MouseGestures.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Actions-MouseGestures.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">xmonad-contrib-0.11: Third party extensions for xmonad</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>unportable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>&lt;l.mai@web.de&gt;</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">XMonad.Actions.MouseGestures</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Usage
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Support for simple mouse gestures.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span>  <a href="#t:Direction2D">Direction2D</a> <ul class="subs"><li>= <a href="#v:U">U</a>  </li><li>| <a href="#v:D">D</a>  </li><li>| <a href="#v:R">R</a>  </li><li>| <a href="#v:L">L</a>  </li></ul></li><li class="src short"><a href="#v:mouseGestureH">mouseGestureH</a> :: (<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:mouseGesture">mouseGesture</a> :: <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.2.1/Data-Map.html#t:Map">Map</a> [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>] (<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:mkCollect">mkCollect</a> :: (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m') =&gt; m (<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a> -&gt; m' [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>], m' [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>])</li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>You can use this module with the following in your <code>~/.xmonad/xmonad.hs</code>:
</p><pre> import XMonad.Actions.MouseGestures
 import qualified XMonad.StackSet as W
</pre><p>then add an appropriate mouse binding:
</p><pre>     , ((modm .|. shiftMask, button3), mouseGesture gestures)
</pre><p>where <code>gestures</code> is a <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.4.2.1/Data-Map.html#t:Map">Map</a></code> from gestures to actions on
 windows, for example:
</p><pre>     gestures = M.fromList
         [ ([], focus)
         , ([U], \w -&gt; focus w &gt;&gt; windows W.swapUp)
         , ([D], \w -&gt; focus w &gt;&gt; windows W.swapDown)
         , ([R, D], \_ -&gt; sendMessage NextLayout)
         ]
</pre><p>This is just an example, of course; you can use any mouse button and
 gesture definitions you want.
</p><p>For detailed instructions on editing your mouse bindings, see
 <a href="XMonad-Doc-Extending.html#Editing_mouse_bindings">XMonad.Doc.Extending</a>.
</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Direction2D" class="def">Direction2D</a>  <a href="src/XMonad-Util-Types.html#Direction2D" class="link">Source</a></p><div class="doc"><p>Two-dimensional directions:
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:U" class="def">U</a></td><td class="doc"><p>Up
</p></td></tr><tr><td class="src"><a name="v:D" class="def">D</a></td><td class="doc"><p>Down
</p></td></tr><tr><td class="src"><a name="v:R" class="def">R</a></td><td class="doc"><p>Right
</p></td></tr><tr><td class="src"><a name="v:L" class="def">L</a></td><td class="doc"><p>Left
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Direction2D" class="caption collapser" onclick="toggleSection('i:Direction2D')">Instances</p><div id="section.i:Direction2D" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Bounded">Bounded</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Prelude.html#t:Enum">Enum</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Ord.html#t:Ord">Ord</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Read.html#t:Read">Read</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Text-Show.html#t:Show">Show</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Typeable-Internal.html#t:Typeable">Typeable</a> <a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mouseGestureH" class="def">mouseGestureH</a> :: (<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-MouseGestures.html#mouseGestureH" class="link">Source</a></p><div class="doc"><p><code><code><a href="XMonad-Actions-MouseGestures.html#v:mouseGestureH">mouseGestureH</a></code> moveHook endHook</code> is a mouse button
 event handler. It collects mouse movements, calling <code>moveHook</code> for each
 update; when the button is released, it calls <code>endHook</code>.
</p></div></div><div class="top"><p class="src"><a name="v:mouseGesture" class="def">mouseGesture</a> :: <a href="/usr/share/doc/ghc/html/libraries/containers-0.4.2.1/Data-Map.html#t:Map">Map</a> [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>] (<a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-MouseGestures.html#mouseGesture" class="link">Source</a></p><div class="doc"><p>A utility function on top of <code><a href="XMonad-Actions-MouseGestures.html#v:mouseGestureH">mouseGestureH</a></code>. It uses a <code><a href="/usr/share/doc/ghc/html/libraries/containers-0.4.2.1/Data-Map.html#t:Map">Map</a></code> to
 look up the mouse gesture, then executes the corresponding action (if any).
</p></div></div><div class="top"><p class="src"><a name="v:mkCollect" class="def">mkCollect</a> :: (<a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m, <a href="/usr/share/doc/ghc/html/libraries/transformers-0.3.0.0/Control-Monad-IO-Class.html#t:MonadIO">MonadIO</a> m') =&gt; m (<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a> -&gt; m' [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>], m' [<a href="XMonad-Actions-MouseGestures.html#t:Direction2D">Direction2D</a>])<a href="src/XMonad-Actions-MouseGestures.html#mkCollect" class="link">Source</a></p><div class="doc"><p>A callback generator for <code><a href="XMonad-Actions-MouseGestures.html#v:mouseGestureH">mouseGestureH</a></code>. <code><a href="XMonad-Actions-MouseGestures.html#v:mkCollect">mkCollect</a></code> returns two
 callback functions for passing to <code><a href="XMonad-Actions-MouseGestures.html#v:mouseGestureH">mouseGestureH</a></code>. The move hook will
 collect mouse movements (and return the current gesture as a list); the end
 hook will return a list of the completed gesture, which you can access with
 <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Control-Monad.html#v:-62--62--61-">&gt;&gt;=</a></code>.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>