module Graphics.UI.FLTK.LowLevel.FL
(
Option(..),
run,
check,
ready,
option,
setOption,
addAwakeHandler,
getAwakeHandler_,
display,
ownColormap,
getSystemColors,
foreground,
background,
background2,
setScheme,
isScheme,
setFirstWindow,
nextWindow,
setGrab,
getMouse,
eventStates,
extract,
extractEventStates,
handle,
handle_,
belowmouse,
setBelowmouse,
setPushed,
setFocus,
setHandler,
paste,
toRectangle,
fromRectangle,
screenBounds,
screenDPI,
screenWorkArea,
setColorRgb,
toAttribute,
release,
setVisibleFocus,
visibleFocus,
setDndTextOps,
dndTextOps,
deleteWidget,
doWidgetDeletion,
watchWidgetPointer,
releaseWidgetPointer,
clearWidgetPointer,
version,
help,
visual,
glVisual,
glVisualWithAlist,
scheme,
wait,
setWait,
readqueue,
addTimeout,
repeatTimeout,
hasTimeout,
removeTimeout,
addCheck,
hasCheck,
removeCheck,
addIdle,
hasIdle,
removeIdle,
damage,
redraw,
flush,
firstWindow,
modal,
grab,
getKey,
compose,
composeReset,
testShortcut,
enableIm,
disableIm,
pushed,
focus,
copy,
copyWithDestination,
pasteWithSource,
dnd,
x,
y,
w,
h,
screenCount,
setColor,
getColor,
getColorRgb,
removeFromColormap,
BoxtypeSpec,
getBoxtype,
setBoxtype,
boxDx,
boxDy,
boxDw,
boxDh,
drawBoxActive,
getFontName,
getFont,
getFontSizes,
setFontByString,
setFontByFont,
setFonts,
setFontsWithString,
event,
eventShift,
eventCtrl,
eventCommand,
eventAlt,
eventButtons,
eventButton1,
eventButton2,
eventButton3,
eventX,
eventY,
eventXRoot,
eventYRoot,
eventDx,
eventDy,
eventClicks,
setEventClicks,
eventIsClick,
setEventIsClick,
eventButton,
eventState,
containsEventState,
eventKey,
eventOriginalKey,
eventKeyPressed,
eventInsideRegion,
eventInsideWidget,
eventDispatch,
setEventDispatch,
eventText,
eventLength,
)
where
import C2HS hiding (cFromEnum, cToBool,cToEnum)
import Data.IORef
import Foreign.C.Types
import Graphics.UI.FLTK.LowLevel.Fl_Enumerations
import Graphics.UI.FLTK.LowLevel.Fl_Types
import Graphics.UI.FLTK.LowLevel.Utils
import Graphics.UI.FLTK.LowLevel.Hierarchy hiding (
setVisibleFocus,
handle,
redraw,
flush,
testShortcut,
copy,
setColor,
getColor,
focus,
display
)
import Graphics.UI.FLTK.LowLevel.Dispatch
import qualified System.IO.Unsafe as Unsafe (unsafePerformIO)
data Option = OptionArrowFocus
| OptionVisibleFocus
| OptionDndText
| OptionShowTooltips
| OptionLast
deriving (Show)
instance Enum Option where
succ OptionArrowFocus = OptionVisibleFocus
succ OptionVisibleFocus = OptionDndText
succ OptionDndText = OptionShowTooltips
succ OptionShowTooltips = OptionLast
succ OptionLast = error "Option.succ: OptionLast has no successor"
pred OptionVisibleFocus = OptionArrowFocus
pred OptionDndText = OptionVisibleFocus
pred OptionShowTooltips = OptionDndText
pred OptionLast = OptionShowTooltips
pred OptionArrowFocus = error "Option.pred: OptionArrowFocus has no predecessor"
enumFromTo from to = go from
where
end = fromEnum to
go v = case compare (fromEnum v) end of
LT -> v : go (succ v)
EQ -> [v]
GT -> []
enumFrom from = enumFromTo from OptionLast
fromEnum OptionArrowFocus = 0
fromEnum OptionVisibleFocus = 1
fromEnum OptionDndText = 2
fromEnum OptionShowTooltips = 3
fromEnum OptionLast = 4
toEnum 0 = OptionArrowFocus
toEnum 1 = OptionVisibleFocus
toEnum 2 = OptionDndText
toEnum 3 = OptionShowTooltips
toEnum 4 = OptionLast
toEnum unmatched = error ("Option.toEnum: Cannot match " ++ show unmatched)
ptrToGlobalEventHandler :: IORef (FunPtr GlobalEventHandlerPrim)
ptrToGlobalEventHandler = Unsafe.unsafePerformIO $ do
initialHandler <- toGlobalEventHandlerPrim (\_ -> return (1))
newIORef initialHandler
type EventDispatchPrim = (CInt ->
Ptr () ->
IO CInt)
foreign import ccall "wrapper"
wrapEventDispatchPrim :: EventDispatchPrim ->
IO (FunPtr EventDispatchPrim)
foreign import ccall "dynamic"
unwrapEventDispatchPrim :: FunPtr EventDispatchPrim -> EventDispatchPrim
run :: IO Int
run = fl_run >>= return . fromIntegral
check :: IO Int
check = fl_check >>= return . fromIntegral
ready :: IO Int
ready = fl_ready >>= return . fromIntegral
option :: Option -> IO Bool
option o = fl_option (cFromEnum o) >>= \(c::CInt) -> return $ cToBool $ ((fromIntegral c) :: Int)
setOption :: Option -> Bool -> IO ()
setOption o t = fl_set_option (cFromEnum o) (Graphics.UI.FLTK.LowLevel.Utils.cFromBool t)
unsafeToCallbackPrim :: GlobalCallback -> FunPtr CallbackPrim
unsafeToCallbackPrim = (Unsafe.unsafePerformIO) . toGlobalCallbackPrim
addAwakeHandler' :: (FunPtr CallbackPrim) -> ((Ptr ())) -> IO ((Int))
addAwakeHandler' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
addAwakeHandler''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
addAwakeHandler :: GlobalCallback -> IO Int
addAwakeHandler awakeHandler =
do
callbackPtr <- toGlobalCallbackPrim awakeHandler
addAwakeHandler' callbackPtr nullPtr
getAwakeHandler_' :: (Ptr (FunPtr CallbackPrim)) -> (Ptr (Ptr ())) -> IO ((Int))
getAwakeHandler_' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
getAwakeHandler_''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
getAwakeHandler_ :: IO GlobalCallback
getAwakeHandler_ =
alloca $ \ptrToFunPtr ->
alloca $ \ptrToUD -> do
_ <- getAwakeHandler_' ptrToFunPtr ptrToUD
funPtr <- peek ptrToFunPtr
return $ unwrapGlobalCallbackPtr $ castFunPtr funPtr
version :: IO ((Double))
version =
version'_ >>= \res ->
let {res' = realToFrac res} in
return (res')
help :: IO ((String))
help =
help'_ >>= \res ->
peekCString res >>= \res' ->
return (res')
display :: String -> IO ()
display text = withCString text $ \str -> fl_display str
visual :: (Mode) -> IO ((Bool))
visual a1 =
let {a1' = cFromEnum a1} in
visual'_ a1' >>= \res ->
let {res' = cToBool res} in
return (res')
glVisual :: (Mode) -> IO ((Bool))
glVisual a1 =
let {a1' = cFromEnum a1} in
glVisual'_ a1' >>= \res ->
let {res' = cToBool res} in
return (res')
glVisualWithAlist :: (Mode) -> (Ptr CInt) -> IO ((Bool))
glVisualWithAlist a1 a2 =
let {a1' = cFromEnum a1} in
let {a2' = id a2} in
glVisualWithAlist'_ a1' a2' >>= \res ->
let {res' = cToBool res} in
return (res')
ownColormap :: IO ()
ownColormap = fl_own_colormap
getSystemColors :: IO ()
getSystemColors = fl_get_system_colors
foreground :: RGB -> IO ()
foreground (r,g,b) = fl_foreground
(fromIntegral r)
(fromIntegral g)
(fromIntegral b)
background :: RGB -> IO ()
background (r,g,b) = fl_background
(fromIntegral r)
(fromIntegral g)
(fromIntegral b)
background2 :: RGB -> IO ()
background2 (r,g,b) = fl_background2
(fromIntegral r)
(fromIntegral g)
(fromIntegral b)
unsafePerformIO :: IO a -> a
unsafePerformIO = Unsafe.unsafePerformIO
scheme :: (String)
scheme =
unsafePerformIO $
let {res = scheme'_} in
peekCString res >>= \res' ->
return (res')
setScheme :: String -> IO Int
setScheme sch = withCString sch $ \str -> fl_set_scheme str >>= return . fromIntegral
isScheme :: String -> IO Bool
isScheme sch = withCString sch $ \str -> fl_is_scheme str >>= return . toBool
wait :: IO ((Int))
wait =
wait'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
setWait :: (Double) -> IO ((Double))
setWait a1 =
let {a1' = realToFrac a1} in
setWait'_ a1' >>= \res ->
let {res' = realToFrac res} in
return (res')
readqueue :: IO ((Ref Widget))
readqueue =
readqueue'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
addTimeout :: (Double) -> (GlobalCallback) -> IO ((()))
addTimeout a1 a2 =
let {a1' = realToFrac a1} in
let {a2' = unsafeToCallbackPrim a2} in
addTimeout'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
repeatTimeout :: (Double) -> (GlobalCallback) -> IO ((()))
repeatTimeout a1 a2 =
let {a1' = realToFrac a1} in
let {a2' = unsafeToCallbackPrim a2} in
repeatTimeout'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
hasTimeout :: (GlobalCallback) -> IO ((Int))
hasTimeout a1 =
let {a1' = unsafeToCallbackPrim a1} in
hasTimeout'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
removeTimeout :: (GlobalCallback) -> IO ((()))
removeTimeout a1 =
let {a1' = unsafeToCallbackPrim a1} in
removeTimeout'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
addCheck :: (GlobalCallback) -> IO ((()))
addCheck a1 =
let {a1' = unsafeToCallbackPrim a1} in
addCheck'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
hasCheck :: (GlobalCallback) -> IO ((Int))
hasCheck a1 =
let {a1' = unsafeToCallbackPrim a1} in
hasCheck'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
removeCheck :: (GlobalCallback) -> IO ((()))
removeCheck a1 =
let {a1' = unsafeToCallbackPrim a1} in
removeCheck'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
addIdle :: (GlobalCallback) -> IO ((()))
addIdle a1 =
let {a1' = unsafeToCallbackPrim a1} in
addIdle'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
hasIdle :: (GlobalCallback) -> IO ((Int))
hasIdle a1 =
let {a1' = unsafeToCallbackPrim a1} in
hasIdle'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
removeIdle :: (GlobalCallback) -> IO ((()))
removeIdle a1 =
let {a1' = unsafeToCallbackPrim a1} in
removeIdle'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
damage :: IO ((Int))
damage =
damage'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
redraw :: IO ((()))
redraw =
redraw'_ >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
flush :: IO ((()))
flush =
flush'_ >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
firstWindow :: IO ((Ref Window))
firstWindow =
firstWindow'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
setFirstWindow' :: (Ptr ()) -> IO ((()))
setFirstWindow' a1 =
let {a1' = id a1} in
setFirstWindow''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setFirstWindow :: (Parent a Window) => Ref a -> IO ()
setFirstWindow wp =
withRef wp setFirstWindow'
nextWindow' :: (Ptr ()) -> IO ((Ref Window))
nextWindow' a1 =
let {a1' = id a1} in
nextWindow''_ a1' >>= \res ->
let {res' = unsafeToRef res} in
return (res')
nextWindow :: (Parent a Window) => Ref a -> IO (Ref Window)
nextWindow currWindow =
withRef currWindow nextWindow'
modal :: IO ((Ref Window))
modal =
modal'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
grab :: IO ((Ref Window))
grab =
grab'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
setGrab' :: (Ptr ()) -> IO ((()))
setGrab' a1 =
let {a1' = id a1} in
setGrab''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setGrab :: (Parent a Window) => Ref a -> IO ()
setGrab wp = withRef wp setGrab'
event :: IO ((Event))
event =
event'_ >>= \res ->
let {res' = cToEnum res} in
return (res')
eventX :: IO ((Int))
eventX =
eventX'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventY :: IO ((Int))
eventY =
eventY'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventXRoot :: IO ((Int))
eventXRoot =
eventXRoot'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventYRoot :: IO ((Int))
eventYRoot =
eventYRoot'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventDx :: IO ((Int))
eventDx =
eventDx'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventDy :: IO ((Int))
eventDy =
eventDy'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
getMouse' :: IO ((Int), (Int))
getMouse' =
alloca $ \a1' ->
alloca $ \a2' ->
getMouse''_ a1' a2' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
return (a1'', a2'')
getMouse :: IO Position
getMouse = do
(x_pos,y_pos) <- getMouse'
return $ (Position (X x_pos) (Y y_pos))
eventClicks :: IO ((Int))
eventClicks =
eventClicks'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
setEventClicks :: (Int) -> IO ((()))
setEventClicks a1 =
let {a1' = fromIntegral a1} in
setEventClicks'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
eventIsClick :: IO ((Bool))
eventIsClick =
eventIsClick'_ >>= \res ->
let {res' = toBool res} in
return (res')
setEventIsClick :: (Int) -> IO ((()))
setEventIsClick a1 =
let {a1' = fromIntegral a1} in
setEventIsClick'_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
eventButton :: IO ((MouseButton))
eventButton =
eventButton'_ >>= \res ->
let {res' = cToEnum res} in
return (res')
eventStates :: [EventState]
eventStates = [
Kb_ShiftState,
Kb_CapsLockState,
Kb_CtrlState,
Kb_AltState,
Kb_NumLockState,
Kb_MetaState,
Kb_ScrollLockState,
Mouse_Button1State,
Mouse_Button2State,
Mouse_Button3State
]
extractEventStates :: CInt -> [EventState]
extractEventStates = extract eventStates
eventState :: IO (([EventState]))
eventState =
eventState'_ >>= \res ->
let {res' = extractEventStates res} in
return (res')
containsEventState :: (EventState) -> IO ((Bool))
containsEventState a1 =
let {a1' = cFromEnum a1} in
containsEventState'_ a1' >>= \res ->
let {res' = toBool res} in
return (res')
eventKey :: IO ((KeyType))
eventKey =
eventKey'_ >>= \res ->
let {res' = cToKeyType res} in
return (res')
eventOriginalKey :: IO ((KeyType))
eventOriginalKey =
eventOriginalKey'_ >>= \res ->
let {res' = cToKeyType res} in
return (res')
eventKeyPressed :: (KeyType) -> IO ((Bool))
eventKeyPressed a1 =
let {a1' = cFromKeyType a1} in
eventKeyPressed'_ a1' >>= \res ->
let {res' = toBool res} in
return (res')
getKey :: (KeyType) -> IO ((Bool))
getKey a1 =
let {a1' = cFromKeyType a1} in
getKey'_ a1' >>= \res ->
let {res' = toBool res} in
return (res')
eventText :: IO ((String))
eventText =
eventText'_ >>= \res ->
peekCString res >>= \res' ->
return (res')
eventLength :: IO ((Int))
eventLength =
eventLength'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
compose :: IO ((Bool), (Int))
compose =
alloca $ \a1' ->
compose'_ a1' >>= \res ->
let {res' = toBool res} in
peekIntConv a1'>>= \a1'' ->
return (res', a1'')
composeReset :: IO ((()))
composeReset =
composeReset'_ >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
eventInsideRegion' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Int))
eventInsideRegion' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
eventInsideRegion''_ a1' a2' a3' a4' >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventInsideRegion :: Rectangle -> IO Event
eventInsideRegion (Rectangle
(Position
(X x_pos)
(Y y_pos))
(Size
(Width width)
(Height height))) =
do
eventNum <- eventInsideRegion' x_pos y_pos width height
return $ toEnum eventNum
eventInsideWidget' :: (Ptr ()) -> IO ((Int))
eventInsideWidget' a1 =
let {a1' = id a1} in
eventInsideWidget''_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
eventInsideWidget :: (Parent a Widget) => Ref a -> IO Event
eventInsideWidget wp =
withRef wp (\ptr -> do
eventNum <- eventInsideWidget' (castPtr ptr)
return $ toEnum eventNum)
testShortcut :: (FlShortcut) -> IO ((Bool))
testShortcut a1 =
let {a1' = id a1} in
testShortcut'_ a1' >>= \res ->
let {res' = toBool res} in
return (res')
enableIm :: IO ((()))
enableIm =
enableIm'_ >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
disableIm :: IO ((()))
disableIm =
disableIm'_ >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
handle' :: (Int) -> (Ptr ()) -> IO ((Int))
handle' a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = id a2} in
handle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
handle :: (Parent a Window) => Event -> Ref a -> IO Int
handle e wp =
withRef wp (handle' (cFromEnum e))
handle_' :: (Int) -> (Ptr ()) -> IO ((Int))
handle_' a1 a2 =
let {a1' = fromIntegral a1} in
let {a2' = id a2} in
handle_''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
handle_ :: (Parent a Window) => Event -> Ref a -> IO Int
handle_ e wp =
withRef wp (handle_' (cFromEnum e))
belowmouse :: IO ((Ref Widget))
belowmouse =
belowmouse'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
setBelowmouse' :: (Ptr ()) -> IO ((()))
setBelowmouse' a1 =
let {a1' = id a1} in
setBelowmouse''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setBelowmouse :: (Parent a Widget) => Ref a -> IO ()
setBelowmouse wp = withRef wp setBelowmouse'
pushed :: IO ((Ref Widget))
pushed =
pushed'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
setPushed' :: (Ptr ()) -> IO ((()))
setPushed' a1 =
let {a1' = id a1} in
setPushed''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setPushed :: (Parent a Widget) => Ref a -> IO ()
setPushed wp = withRef wp setPushed'
focus :: IO ((Ref Widget))
focus =
focus'_ >>= \res ->
let {res' = unsafeToRef res} in
return (res')
setFocus' :: (Ptr ()) -> IO ((()))
setFocus' a1 =
let {a1' = id a1} in
setFocus''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setFocus :: (Parent a Widget) => Ref a -> IO ()
setFocus wp = withRef wp setFocus'
addHandler' :: (FunPtr GlobalEventHandlerPrim) -> IO ((()))
addHandler' a1 =
let {a1' = id a1} in
addHandler''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
removeHandler' :: (FunPtr GlobalEventHandlerPrim) -> IO ((()))
removeHandler' a1 =
let {a1' = id a1} in
removeHandler''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setHandler :: GlobalEventHandlerF -> IO ()
setHandler eh = do
newGlobalEventHandler <- toGlobalEventHandlerPrim eh
curr <- do
old <- readIORef ptrToGlobalEventHandler
writeIORef ptrToGlobalEventHandler newGlobalEventHandler
return old
removeHandler' curr
addHandler' newGlobalEventHandler
setEventDispatch' :: (Ptr (FunPtr EventDispatchPrim)) -> IO ((()))
setEventDispatch' a1 =
let {a1' = id a1} in
setEventDispatch''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
eventDispatch' :: IO ((FunPtr EventDispatchPrim))
eventDispatch' =
eventDispatch''_ >>= \res ->
let {res' = id res} in
return (res')
eventDispatch :: (Parent a Widget) => IO (Event -> Ref a -> IO (Int))
eventDispatch =
do
funPtr <- eventDispatch'
return (\e window ->
withRef
window
(\ptr ->
let eventNum = fromIntegral (fromEnum e)
fun = unwrapEventDispatchPrim funPtr
in fun eventNum (castPtr ptr) >>=
return . fromIntegral
)
)
setEventDispatch :: (Parent a Widget) => (Event -> Ref a -> IO Int) -> IO ()
setEventDispatch ed = do
do
let toPrim = (\e ptr ->
let eventEnum = toEnum $ fromIntegral e
in do
obj <- toRef ptr
result <- ed eventEnum obj
return $ fromIntegral result
)
callbackPtr <- wrapEventDispatchPrim toPrim
ptrToCallbackPtr <- new callbackPtr
poke ptrToCallbackPtr callbackPtr
setEventDispatch' ptrToCallbackPtr
copy :: (String) -> (Int) -> IO ((()))
copy a1 a2 =
withCString a1 $ \a1' ->
let {a2' = fromIntegral a2} in
copy'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
copyWithDestination :: (String) -> (Int) -> (Int) -> IO ((()))
copyWithDestination a1 a2 a3 =
withCString a1 $ \a1' ->
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
copyWithDestination'_ a1' a2' a3' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
pasteWithSource :: (Ptr ()) -> (Int) -> IO ((()))
pasteWithSource a1 a2 =
let {a1' = id a1} in
let {a2' = fromIntegral a2} in
pasteWithSource'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
paste :: (Parent a Widget) => Ref a -> Maybe Int -> IO ()
paste widget (Just clipboard) = withRef widget ((flip pasteWithSource) clipboard)
paste widget Nothing = withRef widget ((flip pasteWithSource) 0)
dnd :: IO ((Int))
dnd =
dnd'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
x :: IO ((Int))
x =
x'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
y :: IO ((Int))
y =
y'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
w :: IO ((Int))
w =
w'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
h :: IO ((Int))
h =
h'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
screenCount :: IO ((Int))
screenCount =
screenCount'_ >>= \res ->
let {res' = fromIntegral res} in
return (res')
screenXYWH :: IO ((Int), (Int), (Int), (Int))
screenXYWH =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
screenXYWH'_ a1' a2' a3' a4' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenXYWYWithMXMY :: (Int) -> (Int) -> IO ((Int), (Int), (Int), (Int))
screenXYWYWithMXMY a5 a6 =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
screenXYWYWithMXMY'_ a1' a2' a3' a4' a5' a6' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenXYWNWithN :: (Int) -> IO ((Int), (Int), (Int), (Int))
screenXYWNWithN a5 =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
let {a5' = fromIntegral a5} in
screenXYWNWithN'_ a1' a2' a3' a4' a5' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenXYWHWithNMXMYMWMH :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Int), (Int), (Int), (Int))
screenXYWHWithNMXMYMWMH a5 a6 a7 a8 =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
let {a7' = fromIntegral a7} in
let {a8' = fromIntegral a8} in
screenXYWHWithNMXMYMWMH'_ a1' a2' a3' a4' a5' a6' a7' a8' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenBounds :: Maybe ScreenLocation -> IO Rectangle
screenBounds location =
case location of
(Just (Intersect (Rectangle (Position (X x_pos) (Y y_pos)) (Size (Width width) (Height height))))) ->
screenXYWHWithNMXMYMWMH x_pos y_pos width height >>= return . toRectangle
(Just (ScreenPosition (Position (X x_pos) (Y y_pos)))) ->
screenXYWYWithMXMY x_pos y_pos >>= return . toRectangle
(Just (ScreenNumber n)) ->
screenXYWNWithN n >>= return . toRectangle
Nothing ->
screenXYWH >>= return . toRectangle
screenDpi' :: IO ((Float), (Float))
screenDpi' =
alloca $ \a1' ->
alloca $ \a2' ->
screenDpi''_ a1' a2' >>
peekFloatConv a1'>>= \a1'' ->
peekFloatConv a2'>>= \a2'' ->
return (a1'', a2'')
screenDpiWithN' :: (Int) -> IO ((Float), (Float))
screenDpiWithN' a3 =
alloca $ \a1' ->
alloca $ \a2' ->
let {a3' = fromIntegral a3} in
screenDpiWithN''_ a1' a2' a3' >>
peekFloatConv a1'>>= \a1'' ->
peekFloatConv a2'>>= \a2'' ->
return (a1'', a2'')
screenDPI :: Maybe Int -> IO DPI
screenDPI (Just n) = do
(dpiX, dpiY) <- screenDpiWithN' n
return $ DPI dpiX dpiY
screenDPI Nothing = do
(dpiX, dpiY) <- screenDpi'
return $ DPI dpiX dpiY
screenWorkAreaWithMXMY' :: (Int) -> (Int) -> IO ((Int), (Int), (Int), (Int))
screenWorkAreaWithMXMY' a5 a6 =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
screenWorkAreaWithMXMY''_ a1' a2' a3' a4' a5' a6' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenWorkAreaWithN' :: (Int) -> IO ((Int), (Int), (Int), (Int))
screenWorkAreaWithN' a5 =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
let {a5' = fromIntegral a5} in
screenWorkAreaWithN''_ a1' a2' a3' a4' a5' >>
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenWorkArea' :: IO ((Int), (Int), (Int), (Int))
screenWorkArea' =
alloca $ \a1' ->
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
screenWorkArea''_ a1' a2' a3' a4' >>= \res ->
peekIntConv a1'>>= \a1'' ->
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (a1'', a2'', a3'', a4'')
screenWorkArea :: Maybe ScreenLocation -> IO Rectangle
screenWorkArea location =
case location of
(Just (Intersect (Rectangle (Position (X x_pos) (Y y_pos)) _))) ->
screenWorkAreaWithMXMY' x_pos y_pos >>= return . toRectangle
(Just (ScreenPosition (Position (X x_pos) (Y y_pos)))) ->
screenWorkAreaWithMXMY' x_pos y_pos >>= return . toRectangle
(Just (ScreenNumber n)) ->
screenWorkAreaWithN' n >>= return . toRectangle
Nothing ->
screenWorkArea' >>= return . toRectangle
setColorRgb :: Color -> Int -> Int -> Int -> IO ()
setColorRgb c r g b = fl_set_color_rgb
(cFromColor c)
(fromIntegral r)
(fromIntegral g)
(fromIntegral b)
setColor :: (Color) -> (Int) -> IO ((()))
setColor a1 a2 =
let {a1' = cFromColor a1} in
let {a2' = fromIntegral a2} in
setColor'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
getColor :: (Color) -> IO ((Int))
getColor a1 =
let {a1' = cFromColor a1} in
getColor'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
getColorRgb :: (Color) -> IO ((()), (Word8), (Word8), (Word8))
getColorRgb a1 =
let {a1' = cFromColor a1} in
alloca $ \a2' ->
alloca $ \a3' ->
alloca $ \a4' ->
getColorRgb'_ a1' a2' a3' a4' >>= \res ->
let {res' = supressWarningAboutRes res} in
peekIntConv a2'>>= \a2'' ->
peekIntConv a3'>>= \a3'' ->
peekIntConv a4'>>= \a4'' ->
return (res', a2'', a3'', a4'')
freeColor' :: (Color) -> IO ((()))
freeColor' a1 =
let {a1' = cFromColor a1} in
freeColor''_ a1' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
freeColorWithOverlay' :: (Color) -> (Int) -> IO ((()))
freeColorWithOverlay' a1 a2 =
let {a1' = cFromColor a1} in
let {a2' = fromIntegral a2} in
freeColorWithOverlay''_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
removeFromColormap :: Maybe Int -> Color -> IO ()
removeFromColormap (Just overlay) c = freeColorWithOverlay' c overlay
removeFromColormap Nothing c = freeColor' c
getFont :: (Font) -> IO ((String))
getFont a1 =
let {a1' = cFromFont a1} in
getFont'_ a1' >>= \res ->
peekCString res >>= \res' ->
return (res')
getFontNameWithAttributes' :: (Font) -> IO ((String), (Maybe FontAttribute))
getFontNameWithAttributes' a1 =
let {a1' = cFromFont a1} in
alloca $ \a2' ->
getFontNameWithAttributes''_ a1' a2' >>= \res ->
peekCString res >>= \res' ->
toAttribute a2'>>= \a2'' ->
return (res', a2'')
toAttribute :: Ptr CInt -> IO (Maybe FontAttribute)
toAttribute ptr =
do
attributeCode <- peekIntConv ptr
return $ cToFontAttribute attributeCode
getFontName :: Font -> IO (String, Maybe FontAttribute)
getFontName f = getFontNameWithAttributes' f
getFontSizes :: (Font) -> IO ((Int), (Int))
getFontSizes a1 =
let {a1' = cFromFont a1} in
alloca $ \a2' ->
getFontSizes'_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
peekIntConv a2'>>= \a2'' ->
return (res', a2'')
setFontByString :: (Font) -> (String) -> IO ((()))
setFontByString a1 a2 =
let {a1' = cFromFont a1} in
let {a2' = unsafeToCString a2} in
setFontByString'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setFontByFont :: (Font) -> (Font) -> IO ((()))
setFontByFont a1 a2 =
let {a1' = cFromFont a1} in
let {a2' = cFromFont a2} in
setFontByFont'_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setFonts :: IO ((Font))
setFonts =
setFonts'_ >>= \res ->
let {res' = cToFont res} in
return (res')
setFontsWithString :: (String) -> IO ((Font))
setFontsWithString a1 =
withCString a1 $ \a1' ->
setFontsWithString'_ a1' >>= \res ->
let {res' = cToFont res} in
return (res')
getBoxtype' :: (Boxtype) -> IO ((FunPtr BoxDrawFPrim))
getBoxtype' a1 =
let {a1' = cFromEnum a1} in
getBoxtype''_ a1' >>= \res ->
let {res' = id res} in
return (res')
getBoxtype :: Boxtype -> IO BoxDrawF
getBoxtype bt = do
wrappedFunPtr <- getBoxtype' bt
let boxDrawPrim = unwrapBoxDrawFPrim wrappedFunPtr
return $ toBoxDrawF boxDrawPrim
setBoxtype' :: (Boxtype) -> (FunPtr BoxDrawFPrim) -> (Word8) -> (Word8) -> (Word8) -> (Word8) -> IO ((()))
setBoxtype' a1 a2 a3 a4 a5 a6 =
let {a1' = cFromEnum a1} in
let {a2' = id a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = fromIntegral a6} in
setBoxtype''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
setBoxtypeByBoxtype' :: (Boxtype) -> (Boxtype) -> IO ((()))
setBoxtypeByBoxtype' a1 a2 =
let {a1' = cFromEnum a1} in
let {a2' = cFromEnum a2} in
setBoxtypeByBoxtype''_ a1' a2' >>= \res ->
let {res' = supressWarningAboutRes res} in
return (res')
data BoxtypeSpec = FromSpec BoxDrawF Word8 Word8 Word8 Word8
| FromBoxtype Boxtype
setBoxtype :: Boxtype -> BoxtypeSpec -> IO ()
setBoxtype bt (FromSpec f dx dy dw dh) =
do
funPtr <- wrapBoxDrawFPrim (toBoxDrawFPrim f)
setBoxtype' bt funPtr dx dy dw dh
setBoxtype bt (FromBoxtype template) =
setBoxtypeByBoxtype' bt template
boxDx :: (Boxtype) -> IO ((Int))
boxDx a1 =
let {a1' = cFromEnum a1} in
boxDx'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
boxDy :: (Boxtype) -> IO ((Int))
boxDy a1 =
let {a1' = cFromEnum a1} in
boxDy'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
boxDw :: (Boxtype) -> IO ((Int))
boxDw a1 =
let {a1' = cFromEnum a1} in
boxDw'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
boxDh :: (Boxtype) -> IO ((Int))
boxDh a1 =
let {a1' = cFromEnum a1} in
boxDh'_ a1' >>= \res ->
let {res' = fromIntegral res} in
return (res')
drawBoxActive :: IO ((Bool))
drawBoxActive =
drawBoxActive'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventShift :: IO ((Bool))
eventShift =
eventShift'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventCtrl :: IO ((Bool))
eventCtrl =
eventCtrl'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventCommand :: IO ((Bool))
eventCommand =
eventCommand'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventAlt :: IO ((Bool))
eventAlt =
eventAlt'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventButtons :: IO ((Bool))
eventButtons =
eventButtons'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventButton1 :: IO ((Bool))
eventButton1 =
eventButton1'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventButton2 :: IO ((Bool))
eventButton2 =
eventButton2'_ >>= \res ->
let {res' = toBool res} in
return (res')
eventButton3 :: IO ((Bool))
eventButton3 =
eventButton3'_ >>= \res ->
let {res' = toBool res} in
return (res')
release :: IO ()
release = fl_release
setVisibleFocus :: Int -> IO ()
setVisibleFocus = fl_set_visible_focus . fromIntegral
visibleFocus :: IO Int
visibleFocus = fl_visible_focus >>= return . fromIntegral
setDndTextOps :: Bool -> IO ()
setDndTextOps = fl_set_dnd_text_ops . fromBool
dndTextOps :: IO Option
dndTextOps = fl_dnd_text_ops >>= return . cToEnum
deleteWidget :: (Parent a Widget) => Ref a -> IO ()
deleteWidget wptr =
swapRef wptr $ \ptr -> do
fl_delete_widget ptr
return nullPtr
doWidgetDeletion :: IO ()
doWidgetDeletion = fl_do_widget_deletion
watchWidgetPointer :: (Parent a Widget) => Ref a -> IO ()
watchWidgetPointer wp = withRef wp fl_Watch_widget_Pointer
releaseWidgetPointer :: (Parent a Widget) => Ref a -> IO ()
releaseWidgetPointer wp = withRef wp fl_release_widget_pointer
clearWidgetPointer :: (Parent a Widget) => Ref a -> IO ()
clearWidgetPointer wp = withRef wp fl_Clear_Widget_Pointer
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_run"
fl_run :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_check"
fl_check :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_ready"
fl_ready :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_option"
fl_option :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_option"
fl_set_option :: (CInt -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_add_awake_handler_"
addAwakeHandler''_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> ((Ptr ()) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_awake_handler_"
getAwakeHandler_''_ :: ((Ptr (FunPtr ((Ptr ()) -> (IO ())))) -> ((Ptr (Ptr ())) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_version"
version'_ :: (IO CDouble)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_help"
help'_ :: (IO (Ptr CChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_display"
fl_display :: ((Ptr CChar) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_visual"
visual'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_gl_visual"
glVisual'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_gl_visual_with_alist"
glVisualWithAlist'_ :: (CInt -> ((Ptr CInt) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_own_colormap"
fl_own_colormap :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_system_colors"
fl_get_system_colors :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_foreground"
fl_foreground :: (CUChar -> (CUChar -> (CUChar -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_background"
fl_background :: (CUChar -> (CUChar -> (CUChar -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_background2"
fl_background2 :: (CUChar -> (CUChar -> (CUChar -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_scheme"
scheme'_ :: (Ptr CChar)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_scheme"
fl_set_scheme :: ((Ptr CChar) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_is_scheme"
fl_is_scheme :: ((Ptr CChar) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_wait"
wait'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_wait"
setWait'_ :: (CDouble -> (IO CDouble))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_readqueue"
readqueue'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_add_timeout"
addTimeout'_ :: (CDouble -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_repeat_timeout"
repeatTimeout'_ :: (CDouble -> ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_has_timeout"
hasTimeout'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_remove_timeout"
removeTimeout'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_add_check"
addCheck'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_has_check"
hasCheck'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_remove_check"
removeCheck'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_add_idle"
addIdle'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_has_idle"
hasIdle'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_remove_idle"
removeIdle'_ :: ((FunPtr ((Ptr ()) -> (IO ()))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_damage"
damage'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_redraw"
redraw'_ :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_flush"
flush'_ :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_first_window"
firstWindow'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_first_window"
setFirstWindow''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_next_window"
nextWindow''_ :: ((Ptr ()) -> (IO (Ptr ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_modal"
modal'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_grab"
grab'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_grab"
setGrab''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event"
event'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_x"
eventX'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_y"
eventY'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_x_root"
eventXRoot'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_y_root"
eventYRoot'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_dx"
eventDx'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_dy"
eventDy'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_mouse"
getMouse''_ :: ((Ptr CInt) -> ((Ptr CInt) -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_clicks"
eventClicks'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_event_clicks"
setEventClicks'_ :: (CInt -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_is_click"
eventIsClick'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_event_is_click"
setEventIsClick'_ :: (CInt -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_button"
eventButton'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_state"
eventState'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_contains_event_state"
containsEventState'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_key"
eventKey'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_original_key"
eventOriginalKey'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_key_pressed"
eventKeyPressed'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_key"
getKey'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_text"
eventText'_ :: (IO (Ptr CChar))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_length"
eventLength'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_compose"
compose'_ :: ((Ptr CInt) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_compose_reset"
composeReset'_ :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_inside_region"
eventInsideRegion''_ :: (CInt -> (CInt -> (CInt -> (CInt -> (IO CInt)))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_inside_widget"
eventInsideWidget''_ :: ((Ptr ()) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_test_shortcut"
testShortcut'_ :: (CUInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_enable_im"
enableIm'_ :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_disable_im"
disableIm'_ :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_handle"
handle''_ :: (CInt -> ((Ptr ()) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_handle_"
handle_''_ :: (CInt -> ((Ptr ()) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_belowmouse"
belowmouse'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_belowmouse"
setBelowmouse''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_pushed"
pushed'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_pushed"
setPushed''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_focus"
focus'_ :: (IO (Ptr ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_focus"
setFocus''_ :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_add_handler"
addHandler''_ :: ((FunPtr (CInt -> (IO CInt))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_remove_handler"
removeHandler''_ :: ((FunPtr (CInt -> (IO CInt))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_event_dispatch"
setEventDispatch''_ :: ((Ptr (FunPtr (CInt -> ((Ptr ()) -> (IO CInt))))) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_dispatch"
eventDispatch''_ :: (IO (FunPtr (CInt -> ((Ptr ()) -> (IO CInt)))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_copy"
copy'_ :: ((Ptr CChar) -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_copy_with_destination"
copyWithDestination'_ :: ((Ptr CChar) -> (CInt -> (CInt -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_paste_with_source"
pasteWithSource'_ :: ((Ptr ()) -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_dnd"
dnd'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_x"
x'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_y"
y'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_w"
w'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_h"
h'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_count"
screenCount'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_xywh"
screenXYWH'_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_xywh_with_mxmy"
screenXYWYWithMXMY'_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (CInt -> (CInt -> (IO ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_xywh_with_n"
screenXYWNWithN'_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_xywh_with_mxmymwmh"
screenXYWHWithNMXMYMWMH'_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (CInt -> (CInt -> (CInt -> (CInt -> (IO ())))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_dpi"
screenDpi''_ :: ((Ptr CFloat) -> ((Ptr CFloat) -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_dpi_with_n"
screenDpiWithN''_ :: ((Ptr CFloat) -> ((Ptr CFloat) -> (CInt -> (IO ()))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_work_area_with_mx_my"
screenWorkAreaWithMXMY''_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (CInt -> (CInt -> (IO ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_work_area_with_n"
screenWorkAreaWithN''_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (CInt -> (IO ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_screen_work_area"
screenWorkArea''_ :: ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> ((Ptr CInt) -> (IO ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_color_rgb"
fl_set_color_rgb :: (CUInt -> (CUChar -> (CUChar -> (CUChar -> (IO ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_color"
setColor'_ :: (CUInt -> (CUInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_color"
getColor'_ :: (CUInt -> (IO CUInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_color_rgb"
getColorRgb'_ :: (CUInt -> ((Ptr CUChar) -> ((Ptr CUChar) -> ((Ptr CUChar) -> (IO ())))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_free_color"
freeColor''_ :: (CUInt -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_free_color_with_overlay"
freeColorWithOverlay''_ :: (CUInt -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_font"
getFont'_ :: (CInt -> (IO (Ptr CChar)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_font_name_with_attributes"
getFontNameWithAttributes''_ :: (CInt -> ((Ptr CInt) -> (IO (Ptr CChar))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_font_sizes"
getFontSizes'_ :: (CInt -> ((Ptr CInt) -> (IO CInt)))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_font_by_string"
setFontByString'_ :: (CInt -> ((Ptr CChar) -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_font_by_font"
setFontByFont'_ :: (CInt -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_fonts"
setFonts'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_fonts_with_string"
setFontsWithString'_ :: ((Ptr CChar) -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_get_boxtype"
getBoxtype''_ :: (CInt -> (IO (FunPtr (CInt -> (CInt -> (CInt -> (CInt -> (CUInt -> (IO ())))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_boxtype"
setBoxtype''_ :: (CInt -> ((FunPtr (CInt -> (CInt -> (CInt -> (CInt -> (CUInt -> (IO ()))))))) -> (CUChar -> (CUChar -> (CUChar -> (CUChar -> (IO ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_boxtype_by_boxtype"
setBoxtypeByBoxtype''_ :: (CInt -> (CInt -> (IO ())))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_box_dx"
boxDx'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_box_dy"
boxDy'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_box_dw"
boxDw'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_box_dh"
boxDh'_ :: (CInt -> (IO CInt))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_draw_box_active"
drawBoxActive'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_shift"
eventShift'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_ctrl"
eventCtrl'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_command"
eventCommand'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_alt"
eventAlt'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_buttons"
eventButtons'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_button1"
eventButton1'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_button2"
eventButton2'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_event_button3"
eventButton3'_ :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_release"
fl_release :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_visible_focus"
fl_set_visible_focus :: (CInt -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_visible_focus"
fl_visible_focus :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_set_dnd_text_ops"
fl_set_dnd_text_ops :: (CInt -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_dnd_text_ops"
fl_dnd_text_ops :: (IO CInt)
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_delete_widget"
fl_delete_widget :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_do_widget_deletion"
fl_do_widget_deletion :: (IO ())
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_watch_widget_pointer"
fl_Watch_widget_Pointer :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_release_widget_pointer"
fl_release_widget_pointer :: ((Ptr ()) -> (IO ()))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/FL.chs.h Fl_clear_widget_pointer"
fl_Clear_Widget_Pointer :: ((Ptr ()) -> (IO ()))