Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 97b7e04d4a67814e1160568251f09714 > files > 393

ghc-xmonad-contrib-devel-0.9.1-8.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>XMonad.Actions.MouseGestures</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_XMonad-Actions-MouseGestures.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>xmonad-contrib-0.9.1: Third party extensions for xmonad</TD
><TD CLASS="topbut"
><A HREF="src/XMonad-Actions-MouseGestures.html"
>Source code</A
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>XMonad.Actions.MouseGestures</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>unportable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>unstable</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>&lt;l.mai@web.de&gt;</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Usage
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Support for simple mouse gestures.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ADirection2D"
>Direction2D</A
>  </TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
>= <A HREF="#v%3AU"
>U</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AD"
>D</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AR"
>R</A
></TD
></TR
><TR
><TD CLASS="decl"
>| <A HREF="#v%3AL"
>L</A
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmouseGestureH"
>mouseGestureH</A
> :: (<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmouseGesture"
>mouseGesture</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>] (<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow"
>Window</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow"
>Window</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmkCollect"
>mkCollect</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/mtl-1.1.0.2/Control-Monad-Trans.html#t%3AMonadIO"
>MonadIO</A
> m, <A HREF="/usr/share/doc/ghc/html/libraries/mtl-1.1.0.2/Control-Monad-Trans.html#t%3AMonadIO"
>MonadIO</A
> m') =&gt; m (<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
> -&gt; m' [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>], m' [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>])</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>Usage
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="doc"
><P
>You can use this module with the following in your <TT
>~/.xmonad/xmonad.hs</TT
>:
</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 <TT
>gestures</TT
> is a <TT
><A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
></TT
> 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
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:Direction2D"
><A NAME="t%3ADirection2D"
></A
></A
><B
>Direction2D</B
>  </TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Util-Types.html#Direction2D"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Two-dimensional directions:
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:U"
><A NAME="v%3AU"
></A
></A
><B
>U</B
></TD
><TD CLASS="rdoc"
>Up
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:D"
><A NAME="v%3AD"
></A
></A
><B
>D</B
></TD
><TD CLASS="rdoc"
>Down
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:R"
><A NAME="v%3AR"
></A
></A
><B
>R</B
></TD
><TD CLASS="rdoc"
>Right
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:L"
><A NAME="v%3AL"
></A
></A
><B
>L</B
></TD
><TD CLASS="rdoc"
>Left
</TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:Direction2D')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:Direction2D" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t%3ABounded"
>Bounded</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Prelude.html#t%3AEnum"
>Enum</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Eq.html#t%3AEq"
>Eq</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Ord.html#t%3AOrd"
>Ord</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Typeable.html#t%3ATypeable"
>Typeable</A
> <A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
></TD
></TR
></TABLE
></DIV
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mouseGestureH"
><A NAME="v%3AmouseGestureH"
></A
></A
><B
>mouseGestureH</B
> :: (<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-MouseGestures.html#mouseGestureH"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><TT
><A HREF="XMonad-Actions-MouseGestures.html#v%3AmouseGestureH"
>mouseGestureH</A
></TT
> moveHook endHook</TT
> is a mouse button
 event handler. It collects mouse movements, calling <TT
>moveHook</TT
> for each
 update; when the button is released, it calls <TT
>endHook</TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mouseGesture"
><A NAME="v%3AmouseGesture"
></A
></A
><B
>mouseGesture</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>] (<A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow"
>Window</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t%3AWindow"
>Window</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-MouseGestures.html#mouseGesture"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>A utility function on top of <TT
><A HREF="XMonad-Actions-MouseGestures.html#v%3AmouseGestureH"
>mouseGestureH</A
></TT
>. It uses a <TT
><A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
></TT
> to
 look up the mouse gesture, then executes the corresponding action (if any).
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:mkCollect"
><A NAME="v%3AmkCollect"
></A
></A
><B
>mkCollect</B
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/mtl-1.1.0.2/Control-Monad-Trans.html#t%3AMonadIO"
>MonadIO</A
> m, <A HREF="/usr/share/doc/ghc/html/libraries/mtl-1.1.0.2/Control-Monad-Trans.html#t%3AMonadIO"
>MonadIO</A
> m') =&gt; m (<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
> -&gt; m' [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>], m' [<A HREF="XMonad-Actions-MouseGestures.html#t%3ADirection2D"
>Direction2D</A
>])</TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-MouseGestures.html#mkCollect"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>A callback generator for <TT
><A HREF="XMonad-Actions-MouseGestures.html#v%3AmouseGestureH"
>mouseGestureH</A
></TT
>. <TT
><A HREF="XMonad-Actions-MouseGestures.html#v%3AmkCollect"
>mkCollect</A
></TT
> returns two
 callback functions for passing to <TT
><A HREF="XMonad-Actions-MouseGestures.html#v%3AmouseGestureH"
>mouseGestureH</A
></TT
>. 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
 <TT
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Control-Monad.html#v%3A%3E%3E%3D"
>&gt;&gt;=</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.6.1</TD
></TR
></TABLE
></BODY
></HTML
>