module Graphics.UI.FLTK.LowLevel.Box
(
boxNew,
boxNewWithBoxtype
)
where
import C2HS hiding (cFromEnum, cFromBool, cToBool,cToEnum)
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
import Graphics.UI.FLTK.LowLevel.Dispatch
import Graphics.UI.FLTK.LowLevel.Widget
boxNew' :: (Int) -> (Int) -> (Int) -> (Int) -> IO ((Ptr ()))
boxNew' a1 a2 a3 a4 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
boxNew''_ a1' a2' a3' a4' >>= \res ->
let {res' = id res} in
return (res')
boxNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> IO ((Ptr ()))
boxNewWithLabel' a1 a2 a3 a4 a5 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = unsafeToCString a5} in
boxNewWithLabel''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
overriddenBoxNewWithLabel' :: (Int) -> (Int) -> (Int) -> (Int) -> (String) -> (Ptr ()) -> IO ((Ptr ()))
overriddenBoxNewWithLabel' a1 a2 a3 a4 a5 a6 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = unsafeToCString a5} in
let {a6' = id a6} in
overriddenBoxNewWithLabel''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
overriddenBoxNew' :: (Int) -> (Int) -> (Int) -> (Int) -> (Ptr ()) -> IO ((Ptr ()))
overriddenBoxNew' a1 a2 a3 a4 a5 =
let {a1' = fromIntegral a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = id a5} in
overriddenBoxNew''_ a1' a2' a3' a4' a5' >>= \res ->
let {res' = id res} in
return (res')
boxNewWithBoxtype' :: (Boxtype) -> (Int) -> (Int) -> (Int) -> (Int) -> (String) -> IO ((Ptr ()))
boxNewWithBoxtype' a1 a2 a3 a4 a5 a6 =
let {a1' = cFromEnum a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = unsafeToCString a6} in
boxNewWithBoxtype''_ a1' a2' a3' a4' a5' a6' >>= \res ->
let {res' = id res} in
return (res')
overriddenBoxNewWithBoxtype' :: (Boxtype) -> (Int) -> (Int) -> (Int) -> (Int) -> (String) -> (Ptr ()) -> IO ((Ptr ()))
overriddenBoxNewWithBoxtype' a1 a2 a3 a4 a5 a6 a7 =
let {a1' = cFromEnum a1} in
let {a2' = fromIntegral a2} in
let {a3' = fromIntegral a3} in
let {a4' = fromIntegral a4} in
let {a5' = fromIntegral a5} in
let {a6' = unsafeToCString a6} in
let {a7' = id a7} in
overriddenBoxNewWithBoxtype''_ a1' a2' a3' a4' a5' a6' a7' >>= \res ->
let {res' = id res} in
return (res')
boxNew :: Rectangle -> Maybe String -> Maybe (CustomWidgetFuncs Box) -> IO (Ref Box)
boxNew rectangle l' funcs' =
widgetMaker
rectangle
l'
funcs'
boxNew'
boxNewWithLabel'
overriddenBoxNew'
overriddenBoxNewWithLabel'
boxNewWithBoxtype :: Boxtype -> Rectangle -> String -> Maybe (CustomWidgetFuncs Box) -> IO (Ref Box)
boxNewWithBoxtype boxtype' rectangle' l' funcs' =
let (x_pos, y_pos, width, height) = fromRectangle rectangle'
in case funcs' of
Just fs -> do
ptr <- customWidgetFunctionStruct fs
overriddenBoxNewWithBoxtype' boxtype' x_pos y_pos width height l' (castPtr ptr) >>= toRef
Nothing ->
boxNewWithBoxtype' boxtype' x_pos y_pos width height l' >>= toRef
boxHandle' :: (Ptr ()) -> (CInt) -> IO ((Int))
boxHandle' a1 a2 =
let {a1' = id a1} in
let {a2' = id a2} in
boxHandle''_ a1' a2' >>= \res ->
let {res' = fromIntegral res} in
return (res')
instance (impl ~ (Event -> IO Int)) => Op (Handle ()) Box orig impl where
runOp _ _ box event = withRef box (\p -> boxHandle' p (fromIntegral . fromEnum $ event))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_Box_New"
boxNew''_ :: (CInt -> (CInt -> (CInt -> (CInt -> (IO (Ptr ()))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_Box_New_WithLabel"
boxNewWithLabel''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> (IO (Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_OverriddenBox_New_WithLabel"
overriddenBoxNewWithLabel''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> (IO (Ptr ()))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_OverriddenBox_New"
overriddenBoxNew''_ :: (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr ()) -> (IO (Ptr ())))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_Box_New_WithBoxtype"
boxNewWithBoxtype''_ :: (CInt -> (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> (IO (Ptr ()))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_OverriddenBox_New_WithBoxtype"
overriddenBoxNewWithBoxtype''_ :: (CInt -> (CInt -> (CInt -> (CInt -> (CInt -> ((Ptr CChar) -> ((Ptr ()) -> (IO (Ptr ())))))))))
foreign import ccall safe "Graphics/UI/FLTK/LowLevel/Box.chs.h Fl_Box_handle"
boxHandle''_ :: ((Ptr ()) -> (CInt -> (IO CInt)))