{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

The 'GI.Gtk.Objects.Adjustment.Adjustment' object represents a value which has an associated lower
and upper bound, together with step and page increments, and a page size.
It is used within several GTK+ widgets, including 'GI.Gtk.Objects.SpinButton.SpinButton', 'GI.Gtk.Objects.Viewport.Viewport',
and 'GI.Gtk.Objects.Range.Range' (which is a base class for 'GI.Gtk.Objects.Scrollbar.Scrollbar' and 'GI.Gtk.Objects.Scale.Scale').

The 'GI.Gtk.Objects.Adjustment.Adjustment' object does not update the value itself. Instead
it is left up to the owner of the 'GI.Gtk.Objects.Adjustment.Adjustment' to control the value.
-}

module GI.Gtk.Objects.Adjustment
    ( 

-- * Exported types
    Adjustment(..)                          ,
    IsAdjustment                            ,
    toAdjustment                            ,
    noAdjustment                            ,


 -- * Methods
-- ** changed #method:changed#
    AdjustmentChangedMethodInfo             ,
    adjustmentChanged                       ,


-- ** clampPage #method:clampPage#
    AdjustmentClampPageMethodInfo           ,
    adjustmentClampPage                     ,


-- ** configure #method:configure#
    AdjustmentConfigureMethodInfo           ,
    adjustmentConfigure                     ,


-- ** getLower #method:getLower#
    AdjustmentGetLowerMethodInfo            ,
    adjustmentGetLower                      ,


-- ** getMinimumIncrement #method:getMinimumIncrement#
    AdjustmentGetMinimumIncrementMethodInfo ,
    adjustmentGetMinimumIncrement           ,


-- ** getPageIncrement #method:getPageIncrement#
    AdjustmentGetPageIncrementMethodInfo    ,
    adjustmentGetPageIncrement              ,


-- ** getPageSize #method:getPageSize#
    AdjustmentGetPageSizeMethodInfo         ,
    adjustmentGetPageSize                   ,


-- ** getStepIncrement #method:getStepIncrement#
    AdjustmentGetStepIncrementMethodInfo    ,
    adjustmentGetStepIncrement              ,


-- ** getUpper #method:getUpper#
    AdjustmentGetUpperMethodInfo            ,
    adjustmentGetUpper                      ,


-- ** getValue #method:getValue#
    AdjustmentGetValueMethodInfo            ,
    adjustmentGetValue                      ,


-- ** new #method:new#
    adjustmentNew                           ,


-- ** setLower #method:setLower#
    AdjustmentSetLowerMethodInfo            ,
    adjustmentSetLower                      ,


-- ** setPageIncrement #method:setPageIncrement#
    AdjustmentSetPageIncrementMethodInfo    ,
    adjustmentSetPageIncrement              ,


-- ** setPageSize #method:setPageSize#
    AdjustmentSetPageSizeMethodInfo         ,
    adjustmentSetPageSize                   ,


-- ** setStepIncrement #method:setStepIncrement#
    AdjustmentSetStepIncrementMethodInfo    ,
    adjustmentSetStepIncrement              ,


-- ** setUpper #method:setUpper#
    AdjustmentSetUpperMethodInfo            ,
    adjustmentSetUpper                      ,


-- ** setValue #method:setValue#
    AdjustmentSetValueMethodInfo            ,
    adjustmentSetValue                      ,


-- ** valueChanged #method:valueChanged#
    AdjustmentValueChangedMethodInfo        ,
    adjustmentValueChanged                  ,




 -- * Properties
-- ** lower #attr:lower#
    AdjustmentLowerPropertyInfo             ,
    adjustmentLower                         ,
    constructAdjustmentLower                ,
    getAdjustmentLower                      ,
    setAdjustmentLower                      ,


-- ** pageIncrement #attr:pageIncrement#
    AdjustmentPageIncrementPropertyInfo     ,
    adjustmentPageIncrement                 ,
    constructAdjustmentPageIncrement        ,
    getAdjustmentPageIncrement              ,
    setAdjustmentPageIncrement              ,


-- ** pageSize #attr:pageSize#
    AdjustmentPageSizePropertyInfo          ,
    adjustmentPageSize                      ,
    constructAdjustmentPageSize             ,
    getAdjustmentPageSize                   ,
    setAdjustmentPageSize                   ,


-- ** stepIncrement #attr:stepIncrement#
    AdjustmentStepIncrementPropertyInfo     ,
    adjustmentStepIncrement                 ,
    constructAdjustmentStepIncrement        ,
    getAdjustmentStepIncrement              ,
    setAdjustmentStepIncrement              ,


-- ** upper #attr:upper#
    AdjustmentUpperPropertyInfo             ,
    adjustmentUpper                         ,
    constructAdjustmentUpper                ,
    getAdjustmentUpper                      ,
    setAdjustmentUpper                      ,


-- ** value #attr:value#
    AdjustmentValuePropertyInfo             ,
    adjustmentValue                         ,
    constructAdjustmentValue                ,
    getAdjustmentValue                      ,
    setAdjustmentValue                      ,




 -- * Signals
-- ** changed #signal:changed#
    AdjustmentChangedCallback               ,
    AdjustmentChangedSignalInfo             ,
    C_AdjustmentChangedCallback             ,
    afterAdjustmentChanged                  ,
    genClosure_AdjustmentChanged            ,
    mk_AdjustmentChangedCallback            ,
    noAdjustmentChangedCallback             ,
    onAdjustmentChanged                     ,
    wrap_AdjustmentChangedCallback          ,


-- ** valueChanged #signal:valueChanged#
    AdjustmentValueChangedCallback          ,
    AdjustmentValueChangedSignalInfo        ,
    C_AdjustmentValueChangedCallback        ,
    afterAdjustmentValueChanged             ,
    genClosure_AdjustmentValueChanged       ,
    mk_AdjustmentValueChangedCallback       ,
    noAdjustmentValueChangedCallback        ,
    onAdjustmentValueChanged                ,
    wrap_AdjustmentValueChangedCallback     ,




    ) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object

newtype Adjustment = Adjustment (ManagedPtr Adjustment)
foreign import ccall "gtk_adjustment_get_type"
    c_gtk_adjustment_get_type :: IO GType

instance GObject Adjustment where
    gobjectType _ = c_gtk_adjustment_get_type
    

class GObject o => IsAdjustment o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError Adjustment a) =>
    IsAdjustment a
#endif
instance IsAdjustment Adjustment
instance GObject.Object.IsObject Adjustment

toAdjustment :: IsAdjustment o => o -> IO Adjustment
toAdjustment = unsafeCastTo Adjustment

noAdjustment :: Maybe Adjustment
noAdjustment = Nothing

type family ResolveAdjustmentMethod (t :: Symbol) (o :: *) :: * where
    ResolveAdjustmentMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAdjustmentMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAdjustmentMethod "changed" o = AdjustmentChangedMethodInfo
    ResolveAdjustmentMethod "clampPage" o = AdjustmentClampPageMethodInfo
    ResolveAdjustmentMethod "configure" o = AdjustmentConfigureMethodInfo
    ResolveAdjustmentMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAdjustmentMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAdjustmentMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAdjustmentMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAdjustmentMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAdjustmentMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAdjustmentMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAdjustmentMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveAdjustmentMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveAdjustmentMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAdjustmentMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAdjustmentMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAdjustmentMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAdjustmentMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAdjustmentMethod "valueChanged" o = AdjustmentValueChangedMethodInfo
    ResolveAdjustmentMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAdjustmentMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAdjustmentMethod "getLower" o = AdjustmentGetLowerMethodInfo
    ResolveAdjustmentMethod "getMinimumIncrement" o = AdjustmentGetMinimumIncrementMethodInfo
    ResolveAdjustmentMethod "getPageIncrement" o = AdjustmentGetPageIncrementMethodInfo
    ResolveAdjustmentMethod "getPageSize" o = AdjustmentGetPageSizeMethodInfo
    ResolveAdjustmentMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAdjustmentMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAdjustmentMethod "getStepIncrement" o = AdjustmentGetStepIncrementMethodInfo
    ResolveAdjustmentMethod "getUpper" o = AdjustmentGetUpperMethodInfo
    ResolveAdjustmentMethod "getValue" o = AdjustmentGetValueMethodInfo
    ResolveAdjustmentMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAdjustmentMethod "setLower" o = AdjustmentSetLowerMethodInfo
    ResolveAdjustmentMethod "setPageIncrement" o = AdjustmentSetPageIncrementMethodInfo
    ResolveAdjustmentMethod "setPageSize" o = AdjustmentSetPageSizeMethodInfo
    ResolveAdjustmentMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAdjustmentMethod "setStepIncrement" o = AdjustmentSetStepIncrementMethodInfo
    ResolveAdjustmentMethod "setUpper" o = AdjustmentSetUpperMethodInfo
    ResolveAdjustmentMethod "setValue" o = AdjustmentSetValueMethodInfo
    ResolveAdjustmentMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAdjustmentMethod t Adjustment, O.MethodInfo info Adjustment p) => O.IsLabelProxy t (Adjustment -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveAdjustmentMethod t Adjustment, O.MethodInfo info Adjustment p) => O.IsLabel t (Adjustment -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- signal Adjustment::changed
type AdjustmentChangedCallback =
    IO ()

noAdjustmentChangedCallback :: Maybe AdjustmentChangedCallback
noAdjustmentChangedCallback = Nothing

type C_AdjustmentChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_AdjustmentChangedCallback :: C_AdjustmentChangedCallback -> IO (FunPtr C_AdjustmentChangedCallback)

genClosure_AdjustmentChanged :: AdjustmentChangedCallback -> IO Closure
genClosure_AdjustmentChanged cb = do
    let cb' = wrap_AdjustmentChangedCallback cb
    mk_AdjustmentChangedCallback cb' >>= newCClosure


wrap_AdjustmentChangedCallback ::
    AdjustmentChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_AdjustmentChangedCallback _cb _ _ = do
    _cb 


onAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
onAdjustmentChanged obj cb = liftIO $ connectAdjustmentChanged obj cb SignalConnectBefore
afterAdjustmentChanged :: (GObject a, MonadIO m) => a -> AdjustmentChangedCallback -> m SignalHandlerId
afterAdjustmentChanged obj cb = connectAdjustmentChanged obj cb SignalConnectAfter

connectAdjustmentChanged :: (GObject a, MonadIO m) =>
                            a -> AdjustmentChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAdjustmentChanged obj cb after = liftIO $ do
    let cb' = wrap_AdjustmentChangedCallback cb
    cb'' <- mk_AdjustmentChangedCallback cb'
    connectSignalFunPtr obj "changed" cb'' after

-- signal Adjustment::value-changed
type AdjustmentValueChangedCallback =
    IO ()

noAdjustmentValueChangedCallback :: Maybe AdjustmentValueChangedCallback
noAdjustmentValueChangedCallback = Nothing

type C_AdjustmentValueChangedCallback =
    Ptr () ->                               -- object
    Ptr () ->                               -- user_data
    IO ()

foreign import ccall "wrapper"
    mk_AdjustmentValueChangedCallback :: C_AdjustmentValueChangedCallback -> IO (FunPtr C_AdjustmentValueChangedCallback)

genClosure_AdjustmentValueChanged :: AdjustmentValueChangedCallback -> IO Closure
genClosure_AdjustmentValueChanged cb = do
    let cb' = wrap_AdjustmentValueChangedCallback cb
    mk_AdjustmentValueChangedCallback cb' >>= newCClosure


wrap_AdjustmentValueChangedCallback ::
    AdjustmentValueChangedCallback ->
    Ptr () ->
    Ptr () ->
    IO ()
wrap_AdjustmentValueChangedCallback _cb _ _ = do
    _cb 


onAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
onAdjustmentValueChanged obj cb = liftIO $ connectAdjustmentValueChanged obj cb SignalConnectBefore
afterAdjustmentValueChanged :: (GObject a, MonadIO m) => a -> AdjustmentValueChangedCallback -> m SignalHandlerId
afterAdjustmentValueChanged obj cb = connectAdjustmentValueChanged obj cb SignalConnectAfter

connectAdjustmentValueChanged :: (GObject a, MonadIO m) =>
                                 a -> AdjustmentValueChangedCallback -> SignalConnectMode -> m SignalHandlerId
connectAdjustmentValueChanged obj cb after = liftIO $ do
    let cb' = wrap_AdjustmentValueChangedCallback cb
    cb'' <- mk_AdjustmentValueChangedCallback cb'
    connectSignalFunPtr obj "value-changed" cb'' after

-- VVV Prop "lower"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentLower obj = liftIO $ getObjectPropertyDouble obj "lower"

setAdjustmentLower :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentLower obj val = liftIO $ setObjectPropertyDouble obj "lower" val

constructAdjustmentLower :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentLower val = constructObjectPropertyDouble "lower" val

data AdjustmentLowerPropertyInfo
instance AttrInfo AdjustmentLowerPropertyInfo where
    type AttrAllowedOps AdjustmentLowerPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentLowerPropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentLowerPropertyInfo = IsAdjustment
    type AttrGetType AdjustmentLowerPropertyInfo = Double
    type AttrLabel AdjustmentLowerPropertyInfo = "lower"
    type AttrOrigin AdjustmentLowerPropertyInfo = Adjustment
    attrGet _ = getAdjustmentLower
    attrSet _ = setAdjustmentLower
    attrConstruct _ = constructAdjustmentLower
    attrClear _ = undefined

-- VVV Prop "page-increment"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentPageIncrement obj = liftIO $ getObjectPropertyDouble obj "page-increment"

setAdjustmentPageIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentPageIncrement obj val = liftIO $ setObjectPropertyDouble obj "page-increment" val

constructAdjustmentPageIncrement :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentPageIncrement val = constructObjectPropertyDouble "page-increment" val

data AdjustmentPageIncrementPropertyInfo
instance AttrInfo AdjustmentPageIncrementPropertyInfo where
    type AttrAllowedOps AdjustmentPageIncrementPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentPageIncrementPropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentPageIncrementPropertyInfo = IsAdjustment
    type AttrGetType AdjustmentPageIncrementPropertyInfo = Double
    type AttrLabel AdjustmentPageIncrementPropertyInfo = "page-increment"
    type AttrOrigin AdjustmentPageIncrementPropertyInfo = Adjustment
    attrGet _ = getAdjustmentPageIncrement
    attrSet _ = setAdjustmentPageIncrement
    attrConstruct _ = constructAdjustmentPageIncrement
    attrClear _ = undefined

-- VVV Prop "page-size"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentPageSize obj = liftIO $ getObjectPropertyDouble obj "page-size"

setAdjustmentPageSize :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentPageSize obj val = liftIO $ setObjectPropertyDouble obj "page-size" val

constructAdjustmentPageSize :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentPageSize val = constructObjectPropertyDouble "page-size" val

data AdjustmentPageSizePropertyInfo
instance AttrInfo AdjustmentPageSizePropertyInfo where
    type AttrAllowedOps AdjustmentPageSizePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentPageSizePropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentPageSizePropertyInfo = IsAdjustment
    type AttrGetType AdjustmentPageSizePropertyInfo = Double
    type AttrLabel AdjustmentPageSizePropertyInfo = "page-size"
    type AttrOrigin AdjustmentPageSizePropertyInfo = Adjustment
    attrGet _ = getAdjustmentPageSize
    attrSet _ = setAdjustmentPageSize
    attrConstruct _ = constructAdjustmentPageSize
    attrClear _ = undefined

-- VVV Prop "step-increment"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentStepIncrement obj = liftIO $ getObjectPropertyDouble obj "step-increment"

setAdjustmentStepIncrement :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentStepIncrement obj val = liftIO $ setObjectPropertyDouble obj "step-increment" val

constructAdjustmentStepIncrement :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentStepIncrement val = constructObjectPropertyDouble "step-increment" val

data AdjustmentStepIncrementPropertyInfo
instance AttrInfo AdjustmentStepIncrementPropertyInfo where
    type AttrAllowedOps AdjustmentStepIncrementPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentStepIncrementPropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentStepIncrementPropertyInfo = IsAdjustment
    type AttrGetType AdjustmentStepIncrementPropertyInfo = Double
    type AttrLabel AdjustmentStepIncrementPropertyInfo = "step-increment"
    type AttrOrigin AdjustmentStepIncrementPropertyInfo = Adjustment
    attrGet _ = getAdjustmentStepIncrement
    attrSet _ = setAdjustmentStepIncrement
    attrConstruct _ = constructAdjustmentStepIncrement
    attrClear _ = undefined

-- VVV Prop "upper"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentUpper obj = liftIO $ getObjectPropertyDouble obj "upper"

setAdjustmentUpper :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentUpper obj val = liftIO $ setObjectPropertyDouble obj "upper" val

constructAdjustmentUpper :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentUpper val = constructObjectPropertyDouble "upper" val

data AdjustmentUpperPropertyInfo
instance AttrInfo AdjustmentUpperPropertyInfo where
    type AttrAllowedOps AdjustmentUpperPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentUpperPropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentUpperPropertyInfo = IsAdjustment
    type AttrGetType AdjustmentUpperPropertyInfo = Double
    type AttrLabel AdjustmentUpperPropertyInfo = "upper"
    type AttrOrigin AdjustmentUpperPropertyInfo = Adjustment
    attrGet _ = getAdjustmentUpper
    attrSet _ = setAdjustmentUpper
    attrConstruct _ = constructAdjustmentUpper
    attrClear _ = undefined

-- VVV Prop "value"
   -- Type: TBasicType TDouble
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

getAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> m Double
getAdjustmentValue obj = liftIO $ getObjectPropertyDouble obj "value"

setAdjustmentValue :: (MonadIO m, IsAdjustment o) => o -> Double -> m ()
setAdjustmentValue obj val = liftIO $ setObjectPropertyDouble obj "value" val

constructAdjustmentValue :: (IsAdjustment o) => Double -> IO (GValueConstruct o)
constructAdjustmentValue val = constructObjectPropertyDouble "value" val

data AdjustmentValuePropertyInfo
instance AttrInfo AdjustmentValuePropertyInfo where
    type AttrAllowedOps AdjustmentValuePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint AdjustmentValuePropertyInfo = (~) Double
    type AttrBaseTypeConstraint AdjustmentValuePropertyInfo = IsAdjustment
    type AttrGetType AdjustmentValuePropertyInfo = Double
    type AttrLabel AdjustmentValuePropertyInfo = "value"
    type AttrOrigin AdjustmentValuePropertyInfo = Adjustment
    attrGet _ = getAdjustmentValue
    attrSet _ = setAdjustmentValue
    attrConstruct _ = constructAdjustmentValue
    attrClear _ = undefined

instance O.HasAttributeList Adjustment
type instance O.AttributeList Adjustment = AdjustmentAttributeList
type AdjustmentAttributeList = ('[ '("lower", AdjustmentLowerPropertyInfo), '("pageIncrement", AdjustmentPageIncrementPropertyInfo), '("pageSize", AdjustmentPageSizePropertyInfo), '("stepIncrement", AdjustmentStepIncrementPropertyInfo), '("upper", AdjustmentUpperPropertyInfo), '("value", AdjustmentValuePropertyInfo)] :: [(Symbol, *)])

adjustmentLower :: AttrLabelProxy "lower"
adjustmentLower = AttrLabelProxy

adjustmentPageIncrement :: AttrLabelProxy "pageIncrement"
adjustmentPageIncrement = AttrLabelProxy

adjustmentPageSize :: AttrLabelProxy "pageSize"
adjustmentPageSize = AttrLabelProxy

adjustmentStepIncrement :: AttrLabelProxy "stepIncrement"
adjustmentStepIncrement = AttrLabelProxy

adjustmentUpper :: AttrLabelProxy "upper"
adjustmentUpper = AttrLabelProxy

adjustmentValue :: AttrLabelProxy "value"
adjustmentValue = AttrLabelProxy

data AdjustmentChangedSignalInfo
instance SignalInfo AdjustmentChangedSignalInfo where
    type HaskellCallbackType AdjustmentChangedSignalInfo = AdjustmentChangedCallback
    connectSignal _ = connectAdjustmentChanged

data AdjustmentValueChangedSignalInfo
instance SignalInfo AdjustmentValueChangedSignalInfo where
    type HaskellCallbackType AdjustmentValueChangedSignalInfo = AdjustmentValueChangedCallback
    connectSignal _ = connectAdjustmentValueChanged

type instance O.SignalList Adjustment = AdjustmentSignalList
type AdjustmentSignalList = ('[ '("changed", AdjustmentChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("valueChanged", AdjustmentValueChangedSignalInfo)] :: [(Symbol, *)])

-- method Adjustment::new
-- method type : Constructor
-- Args : [Arg {argCName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the initial value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minimum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the maximum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the step increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the page increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the page size", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gtk", name = "Adjustment"}))
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_new" gtk_adjustment_new :: 
    CDouble ->                              -- value : TBasicType TDouble
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    CDouble ->                              -- step_increment : TBasicType TDouble
    CDouble ->                              -- page_increment : TBasicType TDouble
    CDouble ->                              -- page_size : TBasicType TDouble
    IO (Ptr Adjustment)

{- |
Creates a new 'GI.Gtk.Objects.Adjustment.Adjustment'.
-}
adjustmentNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Double
    {- ^ /@value@/: the initial value -}
    -> Double
    {- ^ /@lower@/: the minimum value -}
    -> Double
    {- ^ /@upper@/: the maximum value -}
    -> Double
    {- ^ /@stepIncrement@/: the step increment -}
    -> Double
    {- ^ /@pageIncrement@/: the page increment -}
    -> Double
    {- ^ /@pageSize@/: the page size -}
    -> m Adjustment
    {- ^ __Returns:__ a new 'GI.Gtk.Objects.Adjustment.Adjustment' -}
adjustmentNew value lower upper stepIncrement pageIncrement pageSize = liftIO $ do
    let value' = realToFrac value
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    let stepIncrement' = realToFrac stepIncrement
    let pageIncrement' = realToFrac pageIncrement
    let pageSize' = realToFrac pageSize
    result <- gtk_adjustment_new value' lower' upper' stepIncrement' pageIncrement' pageSize'
    checkUnexpectedReturnNULL "adjustmentNew" result
    result' <- (newObject Adjustment) result
    return result'

-- method Adjustment::changed
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_changed" gtk_adjustment_changed :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO ()

{-# DEPRECATED adjustmentChanged ["(Since version 3.18)","GTK+ emits 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ itself whenever any","   of the properties (other than value) change"] #-}
{- |
Emits a 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal from the 'GI.Gtk.Objects.Adjustment.Adjustment'.
This is typically called by the owner of the 'GI.Gtk.Objects.Adjustment.Adjustment' after it has
changed any of the 'GI.Gtk.Objects.Adjustment.Adjustment' properties other than the value.
-}
adjustmentChanged ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m ()
adjustmentChanged adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    gtk_adjustment_changed adjustment'
    touchManagedPtr adjustment
    return ()

data AdjustmentChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentChangedMethodInfo a signature where
    overloadedMethod _ = adjustmentChanged

-- method Adjustment::clamp_page
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the lower value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the upper value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_clamp_page" gtk_adjustment_clamp_page :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    IO ()

{- |
Updates the 'GI.Gtk.Objects.Adjustment.Adjustment':@/value/@ property to ensure that the range
between /@lower@/ and /@upper@/ is in the current page (i.e. between
'GI.Gtk.Objects.Adjustment.Adjustment':@/value/@ and 'GI.Gtk.Objects.Adjustment.Adjustment':@/value/@ + 'GI.Gtk.Objects.Adjustment.Adjustment':@/page-size/@).
If the range is larger than the page size, then only the start of it will
be in the current page.

A 'GI.Gtk.Objects.Adjustment.Adjustment'::@/value-changed/@ signal will be emitted if the value is changed.
-}
adjustmentClampPage ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@lower@/: the lower value -}
    -> Double
    {- ^ /@upper@/: the upper value -}
    -> m ()
adjustmentClampPage adjustment lower upper = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    gtk_adjustment_clamp_page adjustment' lower' upper'
    touchManagedPtr adjustment
    return ()

data AdjustmentClampPageMethodInfo
instance (signature ~ (Double -> Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentClampPageMethodInfo a signature where
    overloadedMethod _ = adjustmentClampPage

-- method Adjustment::configure
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new minimum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new maximum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new step increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new page increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new page size", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_configure" gtk_adjustment_configure :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- value : TBasicType TDouble
    CDouble ->                              -- lower : TBasicType TDouble
    CDouble ->                              -- upper : TBasicType TDouble
    CDouble ->                              -- step_increment : TBasicType TDouble
    CDouble ->                              -- page_increment : TBasicType TDouble
    CDouble ->                              -- page_size : TBasicType TDouble
    IO ()

{- |
Sets all properties of the adjustment at once.

Use this function to avoid multiple emissions of the
'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal. See 'GI.Gtk.Objects.Adjustment.adjustmentSetLower'
for an alternative way of compressing multiple emissions of
'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ into one.

@since 2.14
-}
adjustmentConfigure ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@value@/: the new value -}
    -> Double
    {- ^ /@lower@/: the new minimum value -}
    -> Double
    {- ^ /@upper@/: the new maximum value -}
    -> Double
    {- ^ /@stepIncrement@/: the new step increment -}
    -> Double
    {- ^ /@pageIncrement@/: the new page increment -}
    -> Double
    {- ^ /@pageSize@/: the new page size -}
    -> m ()
adjustmentConfigure adjustment value lower upper stepIncrement pageIncrement pageSize = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let value' = realToFrac value
    let lower' = realToFrac lower
    let upper' = realToFrac upper
    let stepIncrement' = realToFrac stepIncrement
    let pageIncrement' = realToFrac pageIncrement
    let pageSize' = realToFrac pageSize
    gtk_adjustment_configure adjustment' value' lower' upper' stepIncrement' pageIncrement' pageSize'
    touchManagedPtr adjustment
    return ()

data AdjustmentConfigureMethodInfo
instance (signature ~ (Double -> Double -> Double -> Double -> Double -> Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentConfigureMethodInfo a signature where
    overloadedMethod _ = adjustmentConfigure

-- method Adjustment::get_lower
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_lower" gtk_adjustment_get_lower :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Retrieves the minimum value of the adjustment.

@since 2.14
-}
adjustmentGetLower ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current minimum value of the adjustment -}
adjustmentGetLower adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_lower adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetLowerMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetLowerMethodInfo a signature where
    overloadedMethod _ = adjustmentGetLower

-- method Adjustment::get_minimum_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_minimum_increment" gtk_adjustment_get_minimum_increment :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Gets the smaller of step increment and page increment.

@since 3.2
-}
adjustmentGetMinimumIncrement ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ the minimum increment of /@adjustment@/ -}
adjustmentGetMinimumIncrement adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_minimum_increment adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetMinimumIncrementMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetMinimumIncrementMethodInfo a signature where
    overloadedMethod _ = adjustmentGetMinimumIncrement

-- method Adjustment::get_page_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_page_increment" gtk_adjustment_get_page_increment :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Retrieves the page increment of the adjustment.

@since 2.14
-}
adjustmentGetPageIncrement ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current page increment of the adjustment -}
adjustmentGetPageIncrement adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_page_increment adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetPageIncrementMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetPageIncrementMethodInfo a signature where
    overloadedMethod _ = adjustmentGetPageIncrement

-- method Adjustment::get_page_size
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_page_size" gtk_adjustment_get_page_size :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Retrieves the page size of the adjustment.

@since 2.14
-}
adjustmentGetPageSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current page size of the adjustment -}
adjustmentGetPageSize adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_page_size adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetPageSizeMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetPageSizeMethodInfo a signature where
    overloadedMethod _ = adjustmentGetPageSize

-- method Adjustment::get_step_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_step_increment" gtk_adjustment_get_step_increment :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Retrieves the step increment of the adjustment.

@since 2.14
-}
adjustmentGetStepIncrement ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current step increment of the adjustment. -}
adjustmentGetStepIncrement adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_step_increment adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetStepIncrementMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetStepIncrementMethodInfo a signature where
    overloadedMethod _ = adjustmentGetStepIncrement

-- method Adjustment::get_upper
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_upper" gtk_adjustment_get_upper :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Retrieves the maximum value of the adjustment.

@since 2.14
-}
adjustmentGetUpper ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current maximum value of the adjustment -}
adjustmentGetUpper adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_upper adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetUpperMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetUpperMethodInfo a signature where
    overloadedMethod _ = adjustmentGetUpper

-- method Adjustment::get_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TDouble)
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_get_value" gtk_adjustment_get_value :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO CDouble

{- |
Gets the current value of the adjustment.
See 'GI.Gtk.Objects.Adjustment.adjustmentSetValue'.
-}
adjustmentGetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m Double
    {- ^ __Returns:__ The current value of the adjustment -}
adjustmentGetValue adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    result <- gtk_adjustment_get_value adjustment'
    let result' = realToFrac result
    touchManagedPtr adjustment
    return result'

data AdjustmentGetValueMethodInfo
instance (signature ~ (m Double), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentGetValueMethodInfo a signature where
    overloadedMethod _ = adjustmentGetValue

-- method Adjustment::set_lower
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "lower", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new minimum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_lower" gtk_adjustment_set_lower :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- lower : TBasicType TDouble
    IO ()

{- |
Sets the minimum value of the adjustment.

When setting multiple adjustment properties via their individual
setters, multiple 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signals will be emitted.
However, since the emission of the 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal
is tied to the emission of the 'GI.GObject.Objects.Object.Object'::@/notify/@ signals of the changed
properties, it’s possible to compress the 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@
signals into one by calling 'GI.GObject.Objects.Object.objectFreezeNotify' and
'GI.GObject.Objects.Object.objectThawNotify' around the calls to the individual setters.

Alternatively, using a single @/g_object_set()/@ for all the properties
to change, or using 'GI.Gtk.Objects.Adjustment.adjustmentConfigure' has the same effect
of compressing 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ emissions.

@since 2.14
-}
adjustmentSetLower ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@lower@/: the new minimum value -}
    -> m ()
adjustmentSetLower adjustment lower = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let lower' = realToFrac lower
    gtk_adjustment_set_lower adjustment' lower'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetLowerMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetLowerMethodInfo a signature where
    overloadedMethod _ = adjustmentSetLower

-- method Adjustment::set_page_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new page increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_page_increment" gtk_adjustment_set_page_increment :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- page_increment : TBasicType TDouble
    IO ()

{- |
Sets the page increment of the adjustment.

See 'GI.Gtk.Objects.Adjustment.adjustmentSetLower' about how to compress multiple
emissions of the 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal when setting
multiple adjustment properties.

@since 2.14
-}
adjustmentSetPageIncrement ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@pageIncrement@/: the new page increment -}
    -> m ()
adjustmentSetPageIncrement adjustment pageIncrement = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let pageIncrement' = realToFrac pageIncrement
    gtk_adjustment_set_page_increment adjustment' pageIncrement'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetPageIncrementMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetPageIncrementMethodInfo a signature where
    overloadedMethod _ = adjustmentSetPageIncrement

-- method Adjustment::set_page_size
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "page_size", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new page size", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_page_size" gtk_adjustment_set_page_size :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- page_size : TBasicType TDouble
    IO ()

{- |
Sets the page size of the adjustment.

See 'GI.Gtk.Objects.Adjustment.adjustmentSetLower' about how to compress multiple
emissions of the GtkAdjustment::changed signal when setting
multiple adjustment properties.

@since 2.14
-}
adjustmentSetPageSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@pageSize@/: the new page size -}
    -> m ()
adjustmentSetPageSize adjustment pageSize = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let pageSize' = realToFrac pageSize
    gtk_adjustment_set_page_size adjustment' pageSize'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetPageSizeMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetPageSizeMethodInfo a signature where
    overloadedMethod _ = adjustmentSetPageSize

-- method Adjustment::set_step_increment
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "step_increment", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new step increment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_step_increment" gtk_adjustment_set_step_increment :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- step_increment : TBasicType TDouble
    IO ()

{- |
Sets the step increment of the adjustment.

See 'GI.Gtk.Objects.Adjustment.adjustmentSetLower' about how to compress multiple
emissions of the 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal when setting
multiple adjustment properties.

@since 2.14
-}
adjustmentSetStepIncrement ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@stepIncrement@/: the new step increment -}
    -> m ()
adjustmentSetStepIncrement adjustment stepIncrement = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let stepIncrement' = realToFrac stepIncrement
    gtk_adjustment_set_step_increment adjustment' stepIncrement'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetStepIncrementMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetStepIncrementMethodInfo a signature where
    overloadedMethod _ = adjustmentSetStepIncrement

-- method Adjustment::set_upper
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "upper", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new maximum value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_upper" gtk_adjustment_set_upper :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- upper : TBasicType TDouble
    IO ()

{- |
Sets the maximum value of the adjustment.

Note that values will be restricted by @upper - page-size@
if the page-size property is nonzero.

See 'GI.Gtk.Objects.Adjustment.adjustmentSetLower' about how to compress multiple
emissions of the 'GI.Gtk.Objects.Adjustment.Adjustment'::@/changed/@ signal when setting
multiple adjustment properties.

@since 2.14
-}
adjustmentSetUpper ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@upper@/: the new maximum value -}
    -> m ()
adjustmentSetUpper adjustment upper = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let upper' = realToFrac upper
    gtk_adjustment_set_upper adjustment' upper'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetUpperMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetUpperMethodInfo a signature where
    overloadedMethod _ = adjustmentSetUpper

-- method Adjustment::set_value
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "value", argType = TBasicType TDouble, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the new value", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_set_value" gtk_adjustment_set_value :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    CDouble ->                              -- value : TBasicType TDouble
    IO ()

{- |
Sets the 'GI.Gtk.Objects.Adjustment.Adjustment' value. The value is clamped to lie between
'GI.Gtk.Objects.Adjustment.Adjustment':@/lower/@ and 'GI.Gtk.Objects.Adjustment.Adjustment':@/upper/@.

Note that for adjustments which are used in a 'GI.Gtk.Objects.Scrollbar.Scrollbar', the
effective range of allowed values goes from 'GI.Gtk.Objects.Adjustment.Adjustment':@/lower/@ to
'GI.Gtk.Objects.Adjustment.Adjustment':@/upper/@ - 'GI.Gtk.Objects.Adjustment.Adjustment':@/page-size/@.
-}
adjustmentSetValue ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> Double
    {- ^ /@value@/: the new value -}
    -> m ()
adjustmentSetValue adjustment value = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    let value' = realToFrac value
    gtk_adjustment_set_value adjustment' value'
    touchManagedPtr adjustment
    return ()

data AdjustmentSetValueMethodInfo
instance (signature ~ (Double -> m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentSetValueMethodInfo a signature where
    overloadedMethod _ = adjustmentSetValue

-- method Adjustment::value_changed
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "adjustment", argType = TInterface (Name {namespace = "Gtk", name = "Adjustment"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GtkAdjustment", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_adjustment_value_changed" gtk_adjustment_value_changed :: 
    Ptr Adjustment ->                       -- adjustment : TInterface (Name {namespace = "Gtk", name = "Adjustment"})
    IO ()

{-# DEPRECATED adjustmentValueChanged ["(Since version 3.18)","GTK+ emits 'GI.Gtk.Objects.Adjustment.Adjustment'::@/value-changed/@ itself whenever","   the value changes"] #-}
{- |
Emits a 'GI.Gtk.Objects.Adjustment.Adjustment'::@/value-changed/@ signal from the 'GI.Gtk.Objects.Adjustment.Adjustment'.
This is typically called by the owner of the 'GI.Gtk.Objects.Adjustment.Adjustment' after it has
changed the 'GI.Gtk.Objects.Adjustment.Adjustment':@/value/@ property.
-}
adjustmentValueChanged ::
    (B.CallStack.HasCallStack, MonadIO m, IsAdjustment a) =>
    a
    {- ^ /@adjustment@/: a 'GI.Gtk.Objects.Adjustment.Adjustment' -}
    -> m ()
adjustmentValueChanged adjustment = liftIO $ do
    adjustment' <- unsafeManagedPtrCastPtr adjustment
    gtk_adjustment_value_changed adjustment'
    touchManagedPtr adjustment
    return ()

data AdjustmentValueChangedMethodInfo
instance (signature ~ (m ()), MonadIO m, IsAdjustment a) => O.MethodInfo AdjustmentValueChangedMethodInfo a signature where
    overloadedMethod _ = adjustmentValueChanged