-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Task to install and export everything you need to use WildBind in X11
--   
--   Task to install and export everything you need to use WildBind in X11.
--   See <a>https://github.com/debug-ito/wild-bind</a>
@package wild-bind-task-x11
@version 0.1.0.1


-- | This module exports everything you probably need to use WildBind in
--   X11 environments.
module WildBind.Task.X11

-- | A convenient function to create an executable action with X11
--   <tt>FrontEnd</tt> and <a>Indicator</a> for a number pad.
--   
--   <pre>
--   main :: IO ()
--   main = wildNumPad $ binds $ do
--     on NumCenter `run` putStrLn "You pushed center."
--   </pre>
--   
--   Note that the executable must be compiled by ghc with
--   <b><tt>-threaded</tt> option enabled.</b>
--   
--   With this function, the <tt>"/"</tt> (divide) key on the numpad is
--   bound to toggling the <a>Indicator</a>, ignoring the binding you
--   provide.
--   
--   For the input type <tt>i</tt>, you can use <a>NumPadUnlocked</a> or
--   <a>NumPadLocked</a>.
wildNumPad :: (NumPadPosition i, KeySymLike i, ModifierLike i, Describable i, Ord i, Enum i, Bounded i) => Binding ActiveWindow i -> IO ()

-- | A more flexible version of <a>wildNumPad</a>. It passes you an
--   <a>Indicator</a>, and uses the <a>Binding</a> you return as-is.
wildNumPad' :: (NumPadPosition i, KeySymLike i, ModifierLike i, Describable i, Ord i, Enum i, Bounded i) => (Indicator ActiveWindow i -> Binding ActiveWindow i) -> IO ()

-- | A space efficient, packed, unboxed Unicode text type.
data Text :: *

-- | Information about window. You can inspect properties
--   <a>winInstance</a> and <a>winClass</a> by <tt>wmctrl</tt> command.
--   
--   <pre>
--   $ wmctrl -lx
--   0x01400004 -1 xfce4-panel.Xfce4-panel  mydesktop xfce4-panel
--   0x01800003 -1 xfdesktop.Xfdesktop   mydesktop desktop
--   0x03800004  0 xfce4-terminal.Xfce4-terminal  mydesktop Terminal - toshio@mydesktop - byobu
--   0x03a000a7  0 emacs.Emacs23         mydesktop emacs@mydesktop
--   0x03e010fc  0 Navigator.Firefox     mydesktop debug-ito (Toshio Ito) - Mozilla Firefox
--   0x02600003  0 totem.Totem           mydesktop Movie Player
--   </pre>
--   
--   In the above example, the third column shows
--   <tt>winInstance.winClass</tt>.
data Window :: *

-- | Use this type especially when the <a>Window</a> is active.
type ActiveWindow = Window

-- | name of the application instance (part of <tt>WM_CLASS</tt> property)
winInstance :: Window -> Text

-- | name of the application class (part of <tt>WM_CLASS</tt> property)
winClass :: Window -> Text

-- | what's shown in the title bar
winName :: Window -> Text

-- | Indicator interface. <tt>s</tt> is the front-end state, <tt>i</tt> is
--   the input type.
data Indicator s i :: * -> * -> *

-- | Something that can be mapped to number pad's key positions.
class NumPadPosition a
toNumPad :: NumPadPosition a => a -> NumPadLocked

-- | Update and show the description for the current binding.
updateDescription :: Indicator s i -> i -> ActionDescription -> IO ()

-- | Get the current presence of the indicator. Returns <a>True</a> if it's
--   present.
getPresence :: Indicator s i -> IO Bool

-- | Set the presence of the indicator.
setPresence :: Indicator s i -> Bool -> IO ()

-- | Toggle the presence of the indicator.
togglePresence :: Indicator s i -> IO ()

-- | Destroy the indicator. This usually means quitting the entire
--   application.
quit :: Indicator s i -> IO ()
