#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Interfaces.Scrollable
(
Scrollable(..) ,
noScrollable ,
IsScrollable ,
toScrollable ,
#if ENABLE_OVERLOADING
ScrollableGetBorderMethodInfo ,
#endif
scrollableGetBorder ,
#if ENABLE_OVERLOADING
ScrollableGetHadjustmentMethodInfo ,
#endif
scrollableGetHadjustment ,
#if ENABLE_OVERLOADING
ScrollableGetHscrollPolicyMethodInfo ,
#endif
scrollableGetHscrollPolicy ,
#if ENABLE_OVERLOADING
ScrollableGetVadjustmentMethodInfo ,
#endif
scrollableGetVadjustment ,
#if ENABLE_OVERLOADING
ScrollableGetVscrollPolicyMethodInfo ,
#endif
scrollableGetVscrollPolicy ,
#if ENABLE_OVERLOADING
ScrollableSetHadjustmentMethodInfo ,
#endif
scrollableSetHadjustment ,
#if ENABLE_OVERLOADING
ScrollableSetHscrollPolicyMethodInfo ,
#endif
scrollableSetHscrollPolicy ,
#if ENABLE_OVERLOADING
ScrollableSetVadjustmentMethodInfo ,
#endif
scrollableSetVadjustment ,
#if ENABLE_OVERLOADING
ScrollableSetVscrollPolicyMethodInfo ,
#endif
scrollableSetVscrollPolicy ,
#if ENABLE_OVERLOADING
ScrollableHadjustmentPropertyInfo ,
#endif
clearScrollableHadjustment ,
constructScrollableHadjustment ,
getScrollableHadjustment ,
#if ENABLE_OVERLOADING
scrollableHadjustment ,
#endif
setScrollableHadjustment ,
#if ENABLE_OVERLOADING
ScrollableHscrollPolicyPropertyInfo ,
#endif
constructScrollableHscrollPolicy ,
getScrollableHscrollPolicy ,
#if ENABLE_OVERLOADING
scrollableHscrollPolicy ,
#endif
setScrollableHscrollPolicy ,
#if ENABLE_OVERLOADING
ScrollableVadjustmentPropertyInfo ,
#endif
clearScrollableVadjustment ,
constructScrollableVadjustment ,
getScrollableVadjustment ,
#if ENABLE_OVERLOADING
scrollableVadjustment ,
#endif
setScrollableVadjustment ,
#if ENABLE_OVERLOADING
ScrollableVscrollPolicyPropertyInfo ,
#endif
constructScrollableVscrollPolicy ,
getScrollableVscrollPolicy ,
#if ENABLE_OVERLOADING
scrollableVscrollPolicy ,
#endif
setScrollableVscrollPolicy ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
newtype Scrollable = Scrollable (ManagedPtr Scrollable)
noScrollable :: Maybe Scrollable
noScrollable = Nothing
#if ENABLE_OVERLOADING
type instance O.SignalList Scrollable = ScrollableSignalList
type ScrollableSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_scrollable_get_type"
c_gtk_scrollable_get_type :: IO GType
instance GObject Scrollable where
gobjectType = c_gtk_scrollable_get_type
class (GObject o, O.IsDescendantOf Scrollable o) => IsScrollable o
instance (GObject o, O.IsDescendantOf Scrollable o) => IsScrollable o
instance O.HasParentTypes Scrollable
type instance O.ParentTypes Scrollable = '[GObject.Object.Object]
toScrollable :: (MonadIO m, IsScrollable o) => o -> m Scrollable
toScrollable = liftIO . unsafeCastTo Scrollable
getScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m Gtk.Adjustment.Adjustment
getScrollableHadjustment obj = liftIO $ checkUnexpectedNothing "getScrollableHadjustment" $ B.Properties.getObjectPropertyObject obj "hadjustment" Gtk.Adjustment.Adjustment
setScrollableHadjustment :: (MonadIO m, IsScrollable o, Gtk.Adjustment.IsAdjustment a) => o -> a -> m ()
setScrollableHadjustment obj val = liftIO $ B.Properties.setObjectPropertyObject obj "hadjustment" (Just val)
constructScrollableHadjustment :: (IsScrollable o, Gtk.Adjustment.IsAdjustment a) => a -> IO (GValueConstruct o)
constructScrollableHadjustment val = B.Properties.constructObjectPropertyObject "hadjustment" (Just val)
clearScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableHadjustment obj = liftIO $ B.Properties.setObjectPropertyObject obj "hadjustment" (Nothing :: Maybe Gtk.Adjustment.Adjustment)
#if ENABLE_OVERLOADING
data ScrollableHadjustmentPropertyInfo
instance AttrInfo ScrollableHadjustmentPropertyInfo where
type AttrAllowedOps ScrollableHadjustmentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrBaseTypeConstraint ScrollableHadjustmentPropertyInfo = IsScrollable
type AttrGetType ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrLabel ScrollableHadjustmentPropertyInfo = "hadjustment"
type AttrOrigin ScrollableHadjustmentPropertyInfo = Scrollable
attrGet _ = getScrollableHadjustment
attrSet _ = setScrollableHadjustment
attrConstruct _ = constructScrollableHadjustment
attrClear _ = clearScrollableHadjustment
#endif
getScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m Gtk.Enums.ScrollablePolicy
getScrollableHscrollPolicy obj = liftIO $ B.Properties.getObjectPropertyEnum obj "hscroll-policy"
setScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> Gtk.Enums.ScrollablePolicy -> m ()
setScrollableHscrollPolicy obj val = liftIO $ B.Properties.setObjectPropertyEnum obj "hscroll-policy" val
constructScrollableHscrollPolicy :: (IsScrollable o) => Gtk.Enums.ScrollablePolicy -> IO (GValueConstruct o)
constructScrollableHscrollPolicy val = B.Properties.constructObjectPropertyEnum "hscroll-policy" val
#if ENABLE_OVERLOADING
data ScrollableHscrollPolicyPropertyInfo
instance AttrInfo ScrollableHscrollPolicyPropertyInfo where
type AttrAllowedOps ScrollableHscrollPolicyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ScrollableHscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrBaseTypeConstraint ScrollableHscrollPolicyPropertyInfo = IsScrollable
type AttrGetType ScrollableHscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrLabel ScrollableHscrollPolicyPropertyInfo = "hscroll-policy"
type AttrOrigin ScrollableHscrollPolicyPropertyInfo = Scrollable
attrGet _ = getScrollableHscrollPolicy
attrSet _ = setScrollableHscrollPolicy
attrConstruct _ = constructScrollableHscrollPolicy
attrClear _ = undefined
#endif
getScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m Gtk.Adjustment.Adjustment
getScrollableVadjustment obj = liftIO $ checkUnexpectedNothing "getScrollableVadjustment" $ B.Properties.getObjectPropertyObject obj "vadjustment" Gtk.Adjustment.Adjustment
setScrollableVadjustment :: (MonadIO m, IsScrollable o, Gtk.Adjustment.IsAdjustment a) => o -> a -> m ()
setScrollableVadjustment obj val = liftIO $ B.Properties.setObjectPropertyObject obj "vadjustment" (Just val)
constructScrollableVadjustment :: (IsScrollable o, Gtk.Adjustment.IsAdjustment a) => a -> IO (GValueConstruct o)
constructScrollableVadjustment val = B.Properties.constructObjectPropertyObject "vadjustment" (Just val)
clearScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableVadjustment obj = liftIO $ B.Properties.setObjectPropertyObject obj "vadjustment" (Nothing :: Maybe Gtk.Adjustment.Adjustment)
#if ENABLE_OVERLOADING
data ScrollableVadjustmentPropertyInfo
instance AttrInfo ScrollableVadjustmentPropertyInfo where
type AttrAllowedOps ScrollableVadjustmentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrBaseTypeConstraint ScrollableVadjustmentPropertyInfo = IsScrollable
type AttrGetType ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrLabel ScrollableVadjustmentPropertyInfo = "vadjustment"
type AttrOrigin ScrollableVadjustmentPropertyInfo = Scrollable
attrGet _ = getScrollableVadjustment
attrSet _ = setScrollableVadjustment
attrConstruct _ = constructScrollableVadjustment
attrClear _ = clearScrollableVadjustment
#endif
getScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m Gtk.Enums.ScrollablePolicy
getScrollableVscrollPolicy obj = liftIO $ B.Properties.getObjectPropertyEnum obj "vscroll-policy"
setScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> Gtk.Enums.ScrollablePolicy -> m ()
setScrollableVscrollPolicy obj val = liftIO $ B.Properties.setObjectPropertyEnum obj "vscroll-policy" val
constructScrollableVscrollPolicy :: (IsScrollable o) => Gtk.Enums.ScrollablePolicy -> IO (GValueConstruct o)
constructScrollableVscrollPolicy val = B.Properties.constructObjectPropertyEnum "vscroll-policy" val
#if ENABLE_OVERLOADING
data ScrollableVscrollPolicyPropertyInfo
instance AttrInfo ScrollableVscrollPolicyPropertyInfo where
type AttrAllowedOps ScrollableVscrollPolicyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ScrollableVscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrBaseTypeConstraint ScrollableVscrollPolicyPropertyInfo = IsScrollable
type AttrGetType ScrollableVscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrLabel ScrollableVscrollPolicyPropertyInfo = "vscroll-policy"
type AttrOrigin ScrollableVscrollPolicyPropertyInfo = Scrollable
attrGet _ = getScrollableVscrollPolicy
attrSet _ = setScrollableVscrollPolicy
attrConstruct _ = constructScrollableVscrollPolicy
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList Scrollable
type instance O.AttributeList Scrollable = ScrollableAttributeList
type ScrollableAttributeList = ('[ '("hadjustment", ScrollableHadjustmentPropertyInfo), '("hscrollPolicy", ScrollableHscrollPolicyPropertyInfo), '("vadjustment", ScrollableVadjustmentPropertyInfo), '("vscrollPolicy", ScrollableVscrollPolicyPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
scrollableHadjustment :: AttrLabelProxy "hadjustment"
scrollableHadjustment = AttrLabelProxy
scrollableHscrollPolicy :: AttrLabelProxy "hscrollPolicy"
scrollableHscrollPolicy = AttrLabelProxy
scrollableVadjustment :: AttrLabelProxy "vadjustment"
scrollableVadjustment = AttrLabelProxy
scrollableVscrollPolicy :: AttrLabelProxy "vscrollPolicy"
scrollableVscrollPolicy = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type family ResolveScrollableMethod (t :: Symbol) (o :: *) :: * where
ResolveScrollableMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveScrollableMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveScrollableMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveScrollableMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveScrollableMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveScrollableMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveScrollableMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveScrollableMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveScrollableMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveScrollableMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveScrollableMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveScrollableMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveScrollableMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveScrollableMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveScrollableMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveScrollableMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveScrollableMethod "getBorder" o = ScrollableGetBorderMethodInfo
ResolveScrollableMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveScrollableMethod "getHadjustment" o = ScrollableGetHadjustmentMethodInfo
ResolveScrollableMethod "getHscrollPolicy" o = ScrollableGetHscrollPolicyMethodInfo
ResolveScrollableMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveScrollableMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveScrollableMethod "getVadjustment" o = ScrollableGetVadjustmentMethodInfo
ResolveScrollableMethod "getVscrollPolicy" o = ScrollableGetVscrollPolicyMethodInfo
ResolveScrollableMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveScrollableMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveScrollableMethod "setHadjustment" o = ScrollableSetHadjustmentMethodInfo
ResolveScrollableMethod "setHscrollPolicy" o = ScrollableSetHscrollPolicyMethodInfo
ResolveScrollableMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveScrollableMethod "setVadjustment" o = ScrollableSetVadjustmentMethodInfo
ResolveScrollableMethod "setVscrollPolicy" o = ScrollableSetVscrollPolicyMethodInfo
ResolveScrollableMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveScrollableMethod t Scrollable, O.MethodInfo info Scrollable p) => OL.IsLabel t (Scrollable -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
foreign import ccall "gtk_scrollable_get_border" gtk_scrollable_get_border ::
Ptr Scrollable ->
Ptr Gtk.Border.Border ->
IO CInt
scrollableGetBorder ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> m ((Bool, Gtk.Border.Border))
scrollableGetBorder scrollable = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
border <- callocBoxedBytes 8 :: IO (Ptr Gtk.Border.Border)
result <- gtk_scrollable_get_border scrollable' border
let result' = (/= 0) result
border' <- (wrapBoxed Gtk.Border.Border) border
touchManagedPtr scrollable
return (result', border')
#if ENABLE_OVERLOADING
data ScrollableGetBorderMethodInfo
instance (signature ~ (m ((Bool, Gtk.Border.Border))), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableGetBorderMethodInfo a signature where
overloadedMethod _ = scrollableGetBorder
#endif
foreign import ccall "gtk_scrollable_get_hadjustment" gtk_scrollable_get_hadjustment ::
Ptr Scrollable ->
IO (Ptr Gtk.Adjustment.Adjustment)
scrollableGetHadjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> m Gtk.Adjustment.Adjustment
scrollableGetHadjustment scrollable = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
result <- gtk_scrollable_get_hadjustment scrollable'
checkUnexpectedReturnNULL "scrollableGetHadjustment" result
result' <- (newObject Gtk.Adjustment.Adjustment) result
touchManagedPtr scrollable
return result'
#if ENABLE_OVERLOADING
data ScrollableGetHadjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableGetHadjustmentMethodInfo a signature where
overloadedMethod _ = scrollableGetHadjustment
#endif
foreign import ccall "gtk_scrollable_get_hscroll_policy" gtk_scrollable_get_hscroll_policy ::
Ptr Scrollable ->
IO CUInt
scrollableGetHscrollPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> m Gtk.Enums.ScrollablePolicy
scrollableGetHscrollPolicy scrollable = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
result <- gtk_scrollable_get_hscroll_policy scrollable'
let result' = (toEnum . fromIntegral) result
touchManagedPtr scrollable
return result'
#if ENABLE_OVERLOADING
data ScrollableGetHscrollPolicyMethodInfo
instance (signature ~ (m Gtk.Enums.ScrollablePolicy), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableGetHscrollPolicyMethodInfo a signature where
overloadedMethod _ = scrollableGetHscrollPolicy
#endif
foreign import ccall "gtk_scrollable_get_vadjustment" gtk_scrollable_get_vadjustment ::
Ptr Scrollable ->
IO (Ptr Gtk.Adjustment.Adjustment)
scrollableGetVadjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> m Gtk.Adjustment.Adjustment
scrollableGetVadjustment scrollable = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
result <- gtk_scrollable_get_vadjustment scrollable'
checkUnexpectedReturnNULL "scrollableGetVadjustment" result
result' <- (newObject Gtk.Adjustment.Adjustment) result
touchManagedPtr scrollable
return result'
#if ENABLE_OVERLOADING
data ScrollableGetVadjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableGetVadjustmentMethodInfo a signature where
overloadedMethod _ = scrollableGetVadjustment
#endif
foreign import ccall "gtk_scrollable_get_vscroll_policy" gtk_scrollable_get_vscroll_policy ::
Ptr Scrollable ->
IO CUInt
scrollableGetVscrollPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> m Gtk.Enums.ScrollablePolicy
scrollableGetVscrollPolicy scrollable = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
result <- gtk_scrollable_get_vscroll_policy scrollable'
let result' = (toEnum . fromIntegral) result
touchManagedPtr scrollable
return result'
#if ENABLE_OVERLOADING
data ScrollableGetVscrollPolicyMethodInfo
instance (signature ~ (m Gtk.Enums.ScrollablePolicy), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableGetVscrollPolicyMethodInfo a signature where
overloadedMethod _ = scrollableGetVscrollPolicy
#endif
foreign import ccall "gtk_scrollable_set_hadjustment" gtk_scrollable_set_hadjustment ::
Ptr Scrollable ->
Ptr Gtk.Adjustment.Adjustment ->
IO ()
scrollableSetHadjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) =>
a
-> Maybe (b)
-> m ()
scrollableSetHadjustment scrollable hadjustment = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
maybeHadjustment <- case hadjustment of
Nothing -> return nullPtr
Just jHadjustment -> do
jHadjustment' <- unsafeManagedPtrCastPtr jHadjustment
return jHadjustment'
gtk_scrollable_set_hadjustment scrollable' maybeHadjustment
touchManagedPtr scrollable
whenJust hadjustment touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data ScrollableSetHadjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) => O.MethodInfo ScrollableSetHadjustmentMethodInfo a signature where
overloadedMethod _ = scrollableSetHadjustment
#endif
foreign import ccall "gtk_scrollable_set_hscroll_policy" gtk_scrollable_set_hscroll_policy ::
Ptr Scrollable ->
CUInt ->
IO ()
scrollableSetHscrollPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> Gtk.Enums.ScrollablePolicy
-> m ()
scrollableSetHscrollPolicy scrollable policy = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
let policy' = (fromIntegral . fromEnum) policy
gtk_scrollable_set_hscroll_policy scrollable' policy'
touchManagedPtr scrollable
return ()
#if ENABLE_OVERLOADING
data ScrollableSetHscrollPolicyMethodInfo
instance (signature ~ (Gtk.Enums.ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableSetHscrollPolicyMethodInfo a signature where
overloadedMethod _ = scrollableSetHscrollPolicy
#endif
foreign import ccall "gtk_scrollable_set_vadjustment" gtk_scrollable_set_vadjustment ::
Ptr Scrollable ->
Ptr Gtk.Adjustment.Adjustment ->
IO ()
scrollableSetVadjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) =>
a
-> Maybe (b)
-> m ()
scrollableSetVadjustment scrollable vadjustment = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
maybeVadjustment <- case vadjustment of
Nothing -> return nullPtr
Just jVadjustment -> do
jVadjustment' <- unsafeManagedPtrCastPtr jVadjustment
return jVadjustment'
gtk_scrollable_set_vadjustment scrollable' maybeVadjustment
touchManagedPtr scrollable
whenJust vadjustment touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data ScrollableSetVadjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) => O.MethodInfo ScrollableSetVadjustmentMethodInfo a signature where
overloadedMethod _ = scrollableSetVadjustment
#endif
foreign import ccall "gtk_scrollable_set_vscroll_policy" gtk_scrollable_set_vscroll_policy ::
Ptr Scrollable ->
CUInt ->
IO ()
scrollableSetVscrollPolicy ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollable a) =>
a
-> Gtk.Enums.ScrollablePolicy
-> m ()
scrollableSetVscrollPolicy scrollable policy = liftIO $ do
scrollable' <- unsafeManagedPtrCastPtr scrollable
let policy' = (fromIntegral . fromEnum) policy
gtk_scrollable_set_vscroll_policy scrollable' policy'
touchManagedPtr scrollable
return ()
#if ENABLE_OVERLOADING
data ScrollableSetVscrollPolicyMethodInfo
instance (signature ~ (Gtk.Enums.ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => O.MethodInfo ScrollableSetVscrollPolicyMethodInfo a signature where
overloadedMethod _ = scrollableSetVscrollPolicy
#endif