{-# LINE 2 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
module Graphics.UI.Gtk.Abstract.Scale (
Scale,
ScaleClass,
castToScale, gTypeScale,
toScale,
scaleSetDigits,
scaleGetDigits,
scaleSetDrawValue,
scaleGetDrawValue,
PositionType(..),
scaleSetValuePos,
scaleGetValuePos,
scaleDigits,
scaleDrawValue,
scaleValuePos,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import Graphics.UI.Gtk.Types
{-# LINE 82 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
import Graphics.UI.Gtk.General.Enums (PositionType(..))
{-# LINE 85 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
scaleSetDigits :: ScaleClass self => self
-> Int
-> IO ()
scaleSetDigits self digits =
(\(Scale arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_set_digits argPtr1 arg2)
{-# LINE 99 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
(fromIntegral digits)
scaleGetDigits :: ScaleClass self => self
-> IO Int
scaleGetDigits self =
liftM fromIntegral $
(\(Scale arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_get_digits argPtr1)
{-# LINE 109 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
scaleSetDrawValue :: ScaleClass self => self
-> Bool
-> IO ()
scaleSetDrawValue self drawValue =
(\(Scale arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_set_draw_value argPtr1 arg2)
{-# LINE 119 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
(fromBool drawValue)
scaleGetDrawValue :: ScaleClass self => self
-> IO Bool
scaleGetDrawValue self =
liftM toBool $
(\(Scale arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_get_draw_value argPtr1)
{-# LINE 130 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
scaleSetValuePos :: ScaleClass self => self
-> PositionType
-> IO ()
scaleSetValuePos self pos =
(\(Scale arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_set_value_pos argPtr1 arg2)
{-# LINE 140 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
((fromIntegral . fromEnum) pos)
scaleGetValuePos :: ScaleClass self => self
-> IO PositionType
scaleGetValuePos self =
liftM (toEnum . fromIntegral) $
(\(Scale arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_scale_get_value_pos argPtr1)
{-# LINE 151 "./Graphics/UI/Gtk/Abstract/Scale.chs" #-}
(toScale self)
scaleDigits :: ScaleClass self => Attr self Int
scaleDigits = newAttr
scaleGetDigits
scaleSetDigits
scaleDrawValue :: ScaleClass self => Attr self Bool
scaleDrawValue = newAttr
scaleGetDrawValue
scaleSetDrawValue
scaleValuePos :: ScaleClass self => Attr self PositionType
scaleValuePos = newAttr
scaleGetValuePos
scaleSetValuePos
foreign import ccall safe "gtk_scale_set_digits"
gtk_scale_set_digits :: ((Ptr Scale) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_scale_get_digits"
gtk_scale_get_digits :: ((Ptr Scale) -> (IO CInt))
foreign import ccall safe "gtk_scale_set_draw_value"
gtk_scale_set_draw_value :: ((Ptr Scale) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_scale_get_draw_value"
gtk_scale_get_draw_value :: ((Ptr Scale) -> (IO CInt))
foreign import ccall safe "gtk_scale_set_value_pos"
gtk_scale_set_value_pos :: ((Ptr Scale) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_scale_get_value_pos"
gtk_scale_get_value_pos :: ((Ptr Scale) -> (IO CInt))