{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Interfaces.Scrollable
(
Scrollable(..) ,
IsScrollable ,
toScrollable ,
#if defined(ENABLE_OVERLOADING)
ResolveScrollableMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ScrollableGetBorderMethodInfo ,
#endif
scrollableGetBorder ,
#if defined(ENABLE_OVERLOADING)
ScrollableGetHadjustmentMethodInfo ,
#endif
scrollableGetHadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableGetHscrollPolicyMethodInfo ,
#endif
scrollableGetHscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
ScrollableGetVadjustmentMethodInfo ,
#endif
scrollableGetVadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableGetVscrollPolicyMethodInfo ,
#endif
scrollableGetVscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
ScrollableSetHadjustmentMethodInfo ,
#endif
scrollableSetHadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableSetHscrollPolicyMethodInfo ,
#endif
scrollableSetHscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
ScrollableSetVadjustmentMethodInfo ,
#endif
scrollableSetVadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableSetVscrollPolicyMethodInfo ,
#endif
scrollableSetVscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
ScrollableHadjustmentPropertyInfo ,
#endif
clearScrollableHadjustment ,
constructScrollableHadjustment ,
getScrollableHadjustment ,
#if defined(ENABLE_OVERLOADING)
scrollableHadjustment ,
#endif
setScrollableHadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableHscrollPolicyPropertyInfo ,
#endif
constructScrollableHscrollPolicy ,
getScrollableHscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
scrollableHscrollPolicy ,
#endif
setScrollableHscrollPolicy ,
#if defined(ENABLE_OVERLOADING)
ScrollableVadjustmentPropertyInfo ,
#endif
clearScrollableVadjustment ,
constructScrollableVadjustment ,
getScrollableVadjustment ,
#if defined(ENABLE_OVERLOADING)
scrollableVadjustment ,
#endif
setScrollableVadjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollableVscrollPolicyPropertyInfo ,
#endif
constructScrollableVscrollPolicy ,
getScrollableVscrollPolicy ,
#if defined(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.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
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.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
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 GHC.Records as R
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 (SP.ManagedPtr Scrollable)
deriving (Scrollable -> Scrollable -> Bool
(Scrollable -> Scrollable -> Bool)
-> (Scrollable -> Scrollable -> Bool) -> Eq Scrollable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Scrollable -> Scrollable -> Bool
== :: Scrollable -> Scrollable -> Bool
$c/= :: Scrollable -> Scrollable -> Bool
/= :: Scrollable -> Scrollable -> Bool
Eq)
instance SP.ManagedPtrNewtype Scrollable where
toManagedPtr :: Scrollable -> ManagedPtr Scrollable
toManagedPtr (Scrollable ManagedPtr Scrollable
p) = ManagedPtr Scrollable
p
foreign import ccall "gtk_scrollable_get_type"
c_gtk_scrollable_get_type :: IO B.Types.GType
instance B.Types.TypedObject Scrollable where
glibType :: IO GType
glibType = IO GType
c_gtk_scrollable_get_type
instance B.Types.GObject Scrollable
class (SP.GObject o, O.IsDescendantOf Scrollable o) => IsScrollable o
instance (SP.GObject o, O.IsDescendantOf Scrollable o) => IsScrollable o
instance O.HasParentTypes Scrollable
type instance O.ParentTypes Scrollable = '[GObject.Object.Object]
toScrollable :: (MIO.MonadIO m, IsScrollable o) => o -> m Scrollable
toScrollable :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> m Scrollable
toScrollable = IO Scrollable -> m Scrollable
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Scrollable -> m Scrollable)
-> (o -> IO Scrollable) -> o -> m Scrollable
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Scrollable -> Scrollable) -> o -> IO Scrollable
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Scrollable -> Scrollable
Scrollable
instance B.GValue.IsGValue (Maybe Scrollable) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_scrollable_get_type
gvalueSet_ :: Ptr GValue -> Maybe Scrollable -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Scrollable
P.Nothing = Ptr GValue -> Ptr Scrollable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Scrollable
forall a. Ptr a
FP.nullPtr :: FP.Ptr Scrollable)
gvalueSet_ Ptr GValue
gv (P.Just Scrollable
obj) = Scrollable -> (Ptr Scrollable -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Scrollable
obj (Ptr GValue -> Ptr Scrollable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Scrollable)
gvalueGet_ Ptr GValue
gv = do
Ptr Scrollable
ptr <- Ptr GValue -> IO (Ptr Scrollable)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Scrollable)
if Ptr Scrollable
ptr Ptr Scrollable -> Ptr Scrollable -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Scrollable
forall a. Ptr a
FP.nullPtr
then Scrollable -> Maybe Scrollable
forall a. a -> Maybe a
P.Just (Scrollable -> Maybe Scrollable)
-> IO Scrollable -> IO (Maybe Scrollable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Scrollable -> Scrollable)
-> Ptr Scrollable -> IO Scrollable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Scrollable -> Scrollable
Scrollable Ptr Scrollable
ptr
else Maybe Scrollable -> IO (Maybe Scrollable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Scrollable
forall a. Maybe a
P.Nothing
getScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m Gtk.Adjustment.Adjustment
getScrollableHadjustment :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> m Adjustment
getScrollableHadjustment o
obj = IO Adjustment -> m Adjustment
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Adjustment -> m Adjustment) -> IO Adjustment -> m Adjustment
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Adjustment) -> IO Adjustment
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getScrollableHadjustment" (IO (Maybe Adjustment) -> IO Adjustment)
-> IO (Maybe Adjustment) -> IO Adjustment
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Adjustment -> Adjustment)
-> IO (Maybe Adjustment)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"hadjustment" ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment
setScrollableHadjustment :: (MonadIO m, IsScrollable o, Gtk.Adjustment.IsAdjustment a) => o -> a -> m ()
setScrollableHadjustment :: forall (m :: * -> *) o a.
(MonadIO m, IsScrollable o, IsAdjustment a) =>
o -> a -> m ()
setScrollableHadjustment o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"hadjustment" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructScrollableHadjustment :: (IsScrollable o, MIO.MonadIO m, Gtk.Adjustment.IsAdjustment a) => a -> m (GValueConstruct o)
constructScrollableHadjustment :: forall o (m :: * -> *) a.
(IsScrollable o, MonadIO m, IsAdjustment a) =>
a -> m (GValueConstruct o)
constructScrollableHadjustment a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"hadjustment" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearScrollableHadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableHadjustment :: forall (m :: * -> *) o. (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableHadjustment o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Adjustment -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"hadjustment" (Maybe Adjustment
forall a. Maybe a
Nothing :: Maybe Gtk.Adjustment.Adjustment)
#if defined(ENABLE_OVERLOADING)
data ScrollableHadjustmentPropertyInfo
instance AttrInfo ScrollableHadjustmentPropertyInfo where
type AttrAllowedOps ScrollableHadjustmentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ScrollableHadjustmentPropertyInfo = IsScrollable
type AttrSetTypeConstraint ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferTypeConstraint ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferType ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrGetType ScrollableHadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrLabel ScrollableHadjustmentPropertyInfo = "hadjustment"
type AttrOrigin ScrollableHadjustmentPropertyInfo = Scrollable
attrGet = getScrollableHadjustment
attrSet = setScrollableHadjustment
attrTransfer _ v = do
unsafeCastTo Gtk.Adjustment.Adjustment v
attrConstruct = constructScrollableHadjustment
attrClear = clearScrollableHadjustment
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.hadjustment"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#g:attr:hadjustment"
})
#endif
getScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m Gtk.Enums.ScrollablePolicy
getScrollableHscrollPolicy :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> m ScrollablePolicy
getScrollableHscrollPolicy o
obj = IO ScrollablePolicy -> m ScrollablePolicy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ScrollablePolicy -> m ScrollablePolicy)
-> IO ScrollablePolicy -> m ScrollablePolicy
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ScrollablePolicy
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"hscroll-policy"
setScrollableHscrollPolicy :: (MonadIO m, IsScrollable o) => o -> Gtk.Enums.ScrollablePolicy -> m ()
setScrollableHscrollPolicy :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> ScrollablePolicy -> m ()
setScrollableHscrollPolicy o
obj ScrollablePolicy
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> ScrollablePolicy -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"hscroll-policy" ScrollablePolicy
val
constructScrollableHscrollPolicy :: (IsScrollable o, MIO.MonadIO m) => Gtk.Enums.ScrollablePolicy -> m (GValueConstruct o)
constructScrollableHscrollPolicy :: forall o (m :: * -> *).
(IsScrollable o, MonadIO m) =>
ScrollablePolicy -> m (GValueConstruct o)
constructScrollableHscrollPolicy ScrollablePolicy
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> ScrollablePolicy -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"hscroll-policy" ScrollablePolicy
val
#if defined(ENABLE_OVERLOADING)
data ScrollableHscrollPolicyPropertyInfo
instance AttrInfo ScrollableHscrollPolicyPropertyInfo where
type AttrAllowedOps ScrollableHscrollPolicyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ScrollableHscrollPolicyPropertyInfo = IsScrollable
type AttrSetTypeConstraint ScrollableHscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrTransferTypeConstraint ScrollableHscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrTransferType ScrollableHscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrGetType ScrollableHscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrLabel ScrollableHscrollPolicyPropertyInfo = "hscroll-policy"
type AttrOrigin ScrollableHscrollPolicyPropertyInfo = Scrollable
attrGet = getScrollableHscrollPolicy
attrSet = setScrollableHscrollPolicy
attrTransfer _ v = do
return v
attrConstruct = constructScrollableHscrollPolicy
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.hscrollPolicy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#g:attr:hscrollPolicy"
})
#endif
getScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m Gtk.Adjustment.Adjustment
getScrollableVadjustment :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> m Adjustment
getScrollableVadjustment o
obj = IO Adjustment -> m Adjustment
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Adjustment -> m Adjustment) -> IO Adjustment -> m Adjustment
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Adjustment) -> IO Adjustment
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getScrollableVadjustment" (IO (Maybe Adjustment) -> IO Adjustment)
-> IO (Maybe Adjustment) -> IO Adjustment
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr Adjustment -> Adjustment)
-> IO (Maybe Adjustment)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"vadjustment" ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment
setScrollableVadjustment :: (MonadIO m, IsScrollable o, Gtk.Adjustment.IsAdjustment a) => o -> a -> m ()
setScrollableVadjustment :: forall (m :: * -> *) o a.
(MonadIO m, IsScrollable o, IsAdjustment a) =>
o -> a -> m ()
setScrollableVadjustment o
obj a
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"vadjustment" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructScrollableVadjustment :: (IsScrollable o, MIO.MonadIO m, Gtk.Adjustment.IsAdjustment a) => a -> m (GValueConstruct o)
constructScrollableVadjustment :: forall o (m :: * -> *) a.
(IsScrollable o, MonadIO m, IsAdjustment a) =>
a -> m (GValueConstruct o)
constructScrollableVadjustment a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"vadjustment" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearScrollableVadjustment :: (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableVadjustment :: forall (m :: * -> *) o. (MonadIO m, IsScrollable o) => o -> m ()
clearScrollableVadjustment o
obj = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Adjustment -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"vadjustment" (Maybe Adjustment
forall a. Maybe a
Nothing :: Maybe Gtk.Adjustment.Adjustment)
#if defined(ENABLE_OVERLOADING)
data ScrollableVadjustmentPropertyInfo
instance AttrInfo ScrollableVadjustmentPropertyInfo where
type AttrAllowedOps ScrollableVadjustmentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ScrollableVadjustmentPropertyInfo = IsScrollable
type AttrSetTypeConstraint ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferTypeConstraint ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferType ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrGetType ScrollableVadjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrLabel ScrollableVadjustmentPropertyInfo = "vadjustment"
type AttrOrigin ScrollableVadjustmentPropertyInfo = Scrollable
attrGet = getScrollableVadjustment
attrSet = setScrollableVadjustment
attrTransfer _ v = do
unsafeCastTo Gtk.Adjustment.Adjustment v
attrConstruct = constructScrollableVadjustment
attrClear = clearScrollableVadjustment
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.vadjustment"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#g:attr:vadjustment"
})
#endif
getScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> m Gtk.Enums.ScrollablePolicy
getScrollableVscrollPolicy :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> m ScrollablePolicy
getScrollableVscrollPolicy o
obj = IO ScrollablePolicy -> m ScrollablePolicy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ScrollablePolicy -> m ScrollablePolicy)
-> IO ScrollablePolicy -> m ScrollablePolicy
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ScrollablePolicy
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"vscroll-policy"
setScrollableVscrollPolicy :: (MonadIO m, IsScrollable o) => o -> Gtk.Enums.ScrollablePolicy -> m ()
setScrollableVscrollPolicy :: forall (m :: * -> *) o.
(MonadIO m, IsScrollable o) =>
o -> ScrollablePolicy -> m ()
setScrollableVscrollPolicy o
obj ScrollablePolicy
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> ScrollablePolicy -> IO ()
forall a b.
(GObject a, Enum b, BoxedEnum b) =>
a -> String -> b -> IO ()
B.Properties.setObjectPropertyEnum o
obj String
"vscroll-policy" ScrollablePolicy
val
constructScrollableVscrollPolicy :: (IsScrollable o, MIO.MonadIO m) => Gtk.Enums.ScrollablePolicy -> m (GValueConstruct o)
constructScrollableVscrollPolicy :: forall o (m :: * -> *).
(IsScrollable o, MonadIO m) =>
ScrollablePolicy -> m (GValueConstruct o)
constructScrollableVscrollPolicy ScrollablePolicy
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> ScrollablePolicy -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"vscroll-policy" ScrollablePolicy
val
#if defined(ENABLE_OVERLOADING)
data ScrollableVscrollPolicyPropertyInfo
instance AttrInfo ScrollableVscrollPolicyPropertyInfo where
type AttrAllowedOps ScrollableVscrollPolicyPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ScrollableVscrollPolicyPropertyInfo = IsScrollable
type AttrSetTypeConstraint ScrollableVscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrTransferTypeConstraint ScrollableVscrollPolicyPropertyInfo = (~) Gtk.Enums.ScrollablePolicy
type AttrTransferType ScrollableVscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrGetType ScrollableVscrollPolicyPropertyInfo = Gtk.Enums.ScrollablePolicy
type AttrLabel ScrollableVscrollPolicyPropertyInfo = "vscroll-policy"
type AttrOrigin ScrollableVscrollPolicyPropertyInfo = Scrollable
attrGet = getScrollableVscrollPolicy
attrSet = setScrollableVscrollPolicy
attrTransfer _ v = do
return v
attrConstruct = constructScrollableVscrollPolicy
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.vscrollPolicy"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#g:attr:vscrollPolicy"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Scrollable
type instance O.AttributeList Scrollable = ScrollableAttributeList
type ScrollableAttributeList = ('[ '("hadjustment", ScrollableHadjustmentPropertyInfo), '("hscrollPolicy", ScrollableHscrollPolicyPropertyInfo), '("vadjustment", ScrollableVadjustmentPropertyInfo), '("vscrollPolicy", ScrollableVscrollPolicyPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
scrollableHadjustment :: AttrLabelProxy "hadjustment"
scrollableHadjustment = AttrLabelProxy
scrollableHscrollPolicy :: AttrLabelProxy "hscrollPolicy"
scrollableHscrollPolicy = AttrLabelProxy
scrollableVadjustment :: AttrLabelProxy "vadjustment"
scrollableVadjustment = AttrLabelProxy
scrollableVscrollPolicy :: AttrLabelProxy "vscrollPolicy"
scrollableVscrollPolicy = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveScrollableMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod info Scrollable p) => OL.IsLabel t (Scrollable -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveScrollableMethod t Scrollable, O.OverloadedMethod info Scrollable p, R.HasField t Scrollable p) => R.HasField t Scrollable p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveScrollableMethod t Scrollable, O.OverloadedMethodInfo info Scrollable) => OL.IsLabel t (O.MethodProxy info Scrollable) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> m (Bool, Border)
scrollableGetBorder a
scrollable = IO (Bool, Border) -> m (Bool, Border)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Border) -> m (Bool, Border))
-> IO (Bool, Border) -> m (Bool, Border)
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
Ptr Border
border <- Int -> IO (Ptr Border)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
8 :: IO (Ptr Gtk.Border.Border)
CInt
result <- Ptr Scrollable -> Ptr Border -> IO CInt
gtk_scrollable_get_border Ptr Scrollable
scrollable' Ptr Border
border
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Border
border' <- ((ManagedPtr Border -> Border) -> Ptr Border -> IO Border
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Border -> Border
Gtk.Border.Border) Ptr Border
border
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
(Bool, Border) -> IO (Bool, Border)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Border
border')
#if defined(ENABLE_OVERLOADING)
data ScrollableGetBorderMethodInfo
instance (signature ~ (m ((Bool, Gtk.Border.Border))), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableGetBorderMethodInfo a signature where
overloadedMethod = scrollableGetBorder
instance O.OverloadedMethodInfo ScrollableGetBorderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableGetBorder",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> m Adjustment
scrollableGetHadjustment a
scrollable = IO Adjustment -> m Adjustment
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Adjustment -> m Adjustment) -> IO Adjustment -> m Adjustment
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
Ptr Adjustment
result <- Ptr Scrollable -> IO (Ptr Adjustment)
gtk_scrollable_get_hadjustment Ptr Scrollable
scrollable'
Text -> Ptr Adjustment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"scrollableGetHadjustment" Ptr Adjustment
result
Adjustment
result' <- ((ManagedPtr Adjustment -> Adjustment)
-> Ptr Adjustment -> IO Adjustment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment) Ptr Adjustment
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
Adjustment -> IO Adjustment
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Adjustment
result'
#if defined(ENABLE_OVERLOADING)
data ScrollableGetHadjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableGetHadjustmentMethodInfo a signature where
overloadedMethod = scrollableGetHadjustment
instance O.OverloadedMethodInfo ScrollableGetHadjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableGetHadjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> m ScrollablePolicy
scrollableGetHscrollPolicy a
scrollable = IO ScrollablePolicy -> m ScrollablePolicy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScrollablePolicy -> m ScrollablePolicy)
-> IO ScrollablePolicy -> m ScrollablePolicy
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
CUInt
result <- Ptr Scrollable -> IO CUInt
gtk_scrollable_get_hscroll_policy Ptr Scrollable
scrollable'
let result' :: ScrollablePolicy
result' = (Int -> ScrollablePolicy
forall a. Enum a => Int -> a
toEnum (Int -> ScrollablePolicy)
-> (CUInt -> Int) -> CUInt -> ScrollablePolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
ScrollablePolicy -> IO ScrollablePolicy
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ScrollablePolicy
result'
#if defined(ENABLE_OVERLOADING)
data ScrollableGetHscrollPolicyMethodInfo
instance (signature ~ (m Gtk.Enums.ScrollablePolicy), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableGetHscrollPolicyMethodInfo a signature where
overloadedMethod = scrollableGetHscrollPolicy
instance O.OverloadedMethodInfo ScrollableGetHscrollPolicyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableGetHscrollPolicy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> m Adjustment
scrollableGetVadjustment a
scrollable = IO Adjustment -> m Adjustment
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Adjustment -> m Adjustment) -> IO Adjustment -> m Adjustment
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
Ptr Adjustment
result <- Ptr Scrollable -> IO (Ptr Adjustment)
gtk_scrollable_get_vadjustment Ptr Scrollable
scrollable'
Text -> Ptr Adjustment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"scrollableGetVadjustment" Ptr Adjustment
result
Adjustment
result' <- ((ManagedPtr Adjustment -> Adjustment)
-> Ptr Adjustment -> IO Adjustment
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment) Ptr Adjustment
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
Adjustment -> IO Adjustment
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Adjustment
result'
#if defined(ENABLE_OVERLOADING)
data ScrollableGetVadjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableGetVadjustmentMethodInfo a signature where
overloadedMethod = scrollableGetVadjustment
instance O.OverloadedMethodInfo ScrollableGetVadjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableGetVadjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> m ScrollablePolicy
scrollableGetVscrollPolicy a
scrollable = IO ScrollablePolicy -> m ScrollablePolicy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ScrollablePolicy -> m ScrollablePolicy)
-> IO ScrollablePolicy -> m ScrollablePolicy
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
CUInt
result <- Ptr Scrollable -> IO CUInt
gtk_scrollable_get_vscroll_policy Ptr Scrollable
scrollable'
let result' :: ScrollablePolicy
result' = (Int -> ScrollablePolicy
forall a. Enum a => Int -> a
toEnum (Int -> ScrollablePolicy)
-> (CUInt -> Int) -> CUInt -> ScrollablePolicy
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
ScrollablePolicy -> IO ScrollablePolicy
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ScrollablePolicy
result'
#if defined(ENABLE_OVERLOADING)
data ScrollableGetVscrollPolicyMethodInfo
instance (signature ~ (m Gtk.Enums.ScrollablePolicy), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableGetVscrollPolicyMethodInfo a signature where
overloadedMethod = scrollableGetVscrollPolicy
instance O.OverloadedMethodInfo ScrollableGetVscrollPolicyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableGetVscrollPolicy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) =>
a -> Maybe b -> m ()
scrollableSetHadjustment a
scrollable Maybe b
hadjustment = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
Ptr Adjustment
maybeHadjustment <- case Maybe b
hadjustment of
Maybe b
Nothing -> Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
forall a. Ptr a
nullPtr
Just b
jHadjustment -> do
Ptr Adjustment
jHadjustment' <- b -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jHadjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jHadjustment'
Ptr Scrollable -> Ptr Adjustment -> IO ()
gtk_scrollable_set_hadjustment Ptr Scrollable
scrollable' Ptr Adjustment
maybeHadjustment
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
hadjustment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ScrollableSetHadjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) => O.OverloadedMethod ScrollableSetHadjustmentMethodInfo a signature where
overloadedMethod = scrollableSetHadjustment
instance O.OverloadedMethodInfo ScrollableSetHadjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableSetHadjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> ScrollablePolicy -> m ()
scrollableSetHscrollPolicy a
scrollable ScrollablePolicy
policy = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
let policy' :: CUInt
policy' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (ScrollablePolicy -> Int) -> ScrollablePolicy -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ScrollablePolicy -> Int
forall a. Enum a => a -> Int
fromEnum) ScrollablePolicy
policy
Ptr Scrollable -> CUInt -> IO ()
gtk_scrollable_set_hscroll_policy Ptr Scrollable
scrollable' CUInt
policy'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ScrollableSetHscrollPolicyMethodInfo
instance (signature ~ (Gtk.Enums.ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableSetHscrollPolicyMethodInfo a signature where
overloadedMethod = scrollableSetHscrollPolicy
instance O.OverloadedMethodInfo ScrollableSetHscrollPolicyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableSetHscrollPolicy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsScrollable a, IsAdjustment b) =>
a -> Maybe b -> m ()
scrollableSetVadjustment a
scrollable Maybe b
vadjustment = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
Ptr Adjustment
maybeVadjustment <- case Maybe b
vadjustment of
Maybe b
Nothing -> Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
forall a. Ptr a
nullPtr
Just b
jVadjustment -> do
Ptr Adjustment
jVadjustment' <- b -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jVadjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jVadjustment'
Ptr Scrollable -> Ptr Adjustment -> IO ()
gtk_scrollable_set_vadjustment Ptr Scrollable
scrollable' Ptr Adjustment
maybeVadjustment
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
vadjustment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ScrollableSetVadjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsScrollable a, Gtk.Adjustment.IsAdjustment b) => O.OverloadedMethod ScrollableSetVadjustmentMethodInfo a signature where
overloadedMethod = scrollableSetVadjustment
instance O.OverloadedMethodInfo ScrollableSetVadjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableSetVadjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollable a) =>
a -> ScrollablePolicy -> m ()
scrollableSetVscrollPolicy a
scrollable ScrollablePolicy
policy = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr Scrollable
scrollable' <- a -> IO (Ptr Scrollable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
scrollable
let policy' :: CUInt
policy' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt)
-> (ScrollablePolicy -> Int) -> ScrollablePolicy -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. ScrollablePolicy -> Int
forall a. Enum a => a -> Int
fromEnum) ScrollablePolicy
policy
Ptr Scrollable -> CUInt -> IO ()
gtk_scrollable_set_vscroll_policy Ptr Scrollable
scrollable' CUInt
policy'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
scrollable
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ScrollableSetVscrollPolicyMethodInfo
instance (signature ~ (Gtk.Enums.ScrollablePolicy -> m ()), MonadIO m, IsScrollable a) => O.OverloadedMethod ScrollableSetVscrollPolicyMethodInfo a signature where
overloadedMethod = scrollableSetVscrollPolicy
instance O.OverloadedMethodInfo ScrollableSetVscrollPolicyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Interfaces.Scrollable.scrollableSetVscrollPolicy",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-3.0.41/docs/GI-Gtk-Interfaces-Scrollable.html#v:scrollableSetVscrollPolicy"
})
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Scrollable = ScrollableSignalList
type ScrollableSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif