hexchat-0.0.2.0: Haskell scripting interface for HexChat

Copyright(C) 2017 mniip
LicenseMIT
Maintainermniip@mniip.com
Stabilitynone
Portabilitynone
Safe HaskellNone
LanguageHaskell2010

HexChat.Internal

Description

This module contains the "raw" functions that leak the fact that all Haskell scripts are actually executed under the same hexchat_plugin structure. You should unhook everything you have hooked.

Synopsis

Documentation

data Hook Source #

An opaque type referencing a particular hook. Can be passed to unhook.

Instances

Eq Hook Source # 

Methods

(==) :: Hook -> Hook -> Bool #

(/=) :: Hook -> Hook -> Bool #

Ord Hook Source # 

Methods

compare :: Hook -> Hook -> Ordering #

(<) :: Hook -> Hook -> Bool #

(<=) :: Hook -> Hook -> Bool #

(>) :: Hook -> Hook -> Bool #

(>=) :: Hook -> Hook -> Bool #

max :: Hook -> Hook -> Hook #

min :: Hook -> Hook -> Hook #

Show Hook Source # 

Methods

showsPrec :: Int -> Hook -> ShowS #

show :: Hook -> String #

showList :: [Hook] -> ShowS #

data Eat Source #

This type defines whether the current hook "consumes" the event or lets other hooks know about it.

Constructors

EatNone

Pass the event to everything else.

EatHexChat

Pass the event to all other scripts but not HexChat.

EatPlugin

Pass the event to HexChat but not any other scripts.

EatAll

Completely consume the event.

Instances

data Context Source #

An opaque type referencing a context (tab or window).

data List Source #

Instances

Eq List Source # 

Methods

(==) :: List -> List -> Bool #

(/=) :: List -> List -> Bool #

sendModes :: Plugin -> [String] -> Int -> Char -> Char -> IO () Source #

getPrefs :: Plugin -> String -> (String -> IO a) -> (Int -> IO a) -> (Bool -> IO a) -> IO (Maybe a) Source #

hookCommand :: Plugin -> String -> CInt -> String -> ([String] -> [String] -> IO Eat) -> IO Hook Source #

hookServer :: Plugin -> String -> CInt -> ([String] -> [String] -> IO Eat) -> IO Hook Source #

unhook :: Plugin -> Hook -> IO () Source #

withHandle :: Plugin -> IO a -> IO a Source #

newtype Plugin Source #

Constructors

Plugin (Ptr HexChat_Plugin)