module Graphics.UI.Gtk.Misc.Viewport (
Viewport,
ViewportClass,
ShadowType(..),
castToViewport, gTypeViewport,
toViewport,
viewportNew,
viewportGetHAdjustment,
viewportGetVAdjustment,
viewportSetHAdjustment,
viewportSetVAdjustment,
viewportSetShadowType,
viewportGetShadowType,
viewportGetBinWindow,
viewportGetViewWindow,
viewportHAdjustment,
viewportVAdjustment,
viewportShadowType,
) where
import Control.Monad (liftM)
import System.Glib.FFI
import System.Glib.Attributes
import Graphics.UI.Gtk.Abstract.Object (makeNewObject)
import Graphics.UI.Gtk.Types
import Graphics.UI.Gtk.General.Enums (ShadowType(..))
viewportNew ::
Adjustment
-> Adjustment
-> IO Viewport
viewportNew hadjustment vadjustment =
makeNewObject mkViewport $
liftM (castPtr :: Ptr Widget -> Ptr Viewport) $
(\(Adjustment arg1) (Adjustment arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_viewport_new argPtr1 argPtr2)
hadjustment
vadjustment
viewportGetHAdjustment :: ViewportClass self => self -> IO Adjustment
viewportGetHAdjustment self =
makeNewObject mkAdjustment $
(\(Viewport arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_get_hadjustment argPtr1)
(toViewport self)
viewportGetVAdjustment :: ViewportClass self => self -> IO Adjustment
viewportGetVAdjustment self =
makeNewObject mkAdjustment $
(\(Viewport arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_get_vadjustment argPtr1)
(toViewport self)
viewportSetHAdjustment :: ViewportClass self => self -> Adjustment -> IO ()
viewportSetHAdjustment self adjustment =
(\(Viewport arg1) (Adjustment arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_viewport_set_hadjustment argPtr1 argPtr2)
(toViewport self)
adjustment
viewportSetVAdjustment :: ViewportClass self => self -> Adjustment -> IO ()
viewportSetVAdjustment self adjustment =
(\(Viewport arg1) (Adjustment arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->gtk_viewport_set_vadjustment argPtr1 argPtr2)
(toViewport self)
adjustment
viewportSetShadowType :: ViewportClass self => self
-> ShadowType
-> IO ()
viewportSetShadowType self type_ =
(\(Viewport arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_set_shadow_type argPtr1 arg2)
(toViewport self)
((fromIntegral . fromEnum) type_)
viewportGetShadowType :: ViewportClass self => self
-> IO ShadowType
viewportGetShadowType self =
liftM (toEnum . fromIntegral) $
(\(Viewport arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_get_shadow_type argPtr1)
(toViewport self)
viewportGetBinWindow :: ViewportClass self => self -> IO DrawWindow
viewportGetBinWindow self =
makeNewGObject mkDrawWindow $
(\(Viewport arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_get_bin_window argPtr1)
(toViewport self)
viewportGetViewWindow :: ViewportClass self => self -> IO DrawWindow
viewportGetViewWindow self =
makeNewGObject mkDrawWindow $
(\(Viewport arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_viewport_get_view_window argPtr1)
(toViewport self)
viewportHAdjustment :: ViewportClass self => Attr self Adjustment
viewportHAdjustment = newAttr
viewportGetHAdjustment
viewportSetHAdjustment
viewportVAdjustment :: ViewportClass self => Attr self Adjustment
viewportVAdjustment = newAttr
viewportGetVAdjustment
viewportSetVAdjustment
viewportShadowType :: ViewportClass self => Attr self ShadowType
viewportShadowType = newAttr
viewportGetShadowType
viewportSetShadowType
foreign import ccall unsafe "gtk_viewport_new"
gtk_viewport_new :: ((Ptr Adjustment) -> ((Ptr Adjustment) -> (IO (Ptr Widget))))
foreign import ccall unsafe "gtk_viewport_get_hadjustment"
gtk_viewport_get_hadjustment :: ((Ptr Viewport) -> (IO (Ptr Adjustment)))
foreign import ccall unsafe "gtk_viewport_get_vadjustment"
gtk_viewport_get_vadjustment :: ((Ptr Viewport) -> (IO (Ptr Adjustment)))
foreign import ccall safe "gtk_viewport_set_hadjustment"
gtk_viewport_set_hadjustment :: ((Ptr Viewport) -> ((Ptr Adjustment) -> (IO ())))
foreign import ccall safe "gtk_viewport_set_vadjustment"
gtk_viewport_set_vadjustment :: ((Ptr Viewport) -> ((Ptr Adjustment) -> (IO ())))
foreign import ccall safe "gtk_viewport_set_shadow_type"
gtk_viewport_set_shadow_type :: ((Ptr Viewport) -> (CInt -> (IO ())))
foreign import ccall unsafe "gtk_viewport_get_shadow_type"
gtk_viewport_get_shadow_type :: ((Ptr Viewport) -> (IO CInt))
foreign import ccall safe "gtk_viewport_get_bin_window"
gtk_viewport_get_bin_window :: ((Ptr Viewport) -> (IO (Ptr DrawWindow)))
foreign import ccall safe "gtk_viewport_get_view_window"
gtk_viewport_get_view_window :: ((Ptr Viewport) -> (IO (Ptr DrawWindow)))