{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Scrollbar
(
Scrollbar(..) ,
IsScrollbar ,
toScrollbar ,
#if defined(ENABLE_OVERLOADING)
ResolveScrollbarMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ScrollbarGetAdjustmentMethodInfo ,
#endif
scrollbarGetAdjustment ,
scrollbarNew ,
#if defined(ENABLE_OVERLOADING)
ScrollbarSetAdjustmentMethodInfo ,
#endif
scrollbarSetAdjustment ,
#if defined(ENABLE_OVERLOADING)
ScrollbarAdjustmentPropertyInfo ,
#endif
clearScrollbarAdjustment ,
constructScrollbarAdjustment ,
getScrollbarAdjustment ,
#if defined(ENABLE_OVERLOADING)
scrollbarAdjustment ,
#endif
setScrollbarAdjustment ,
) 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 Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.Cairo.Structs.Context as Cairo.Context
import qualified GI.Cairo.Structs.FontOptions as Cairo.FontOptions
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gdk.Flags as Gdk.Flags
import qualified GI.Gdk.Interfaces.Paintable as Gdk.Paintable
import qualified GI.Gdk.Objects.Clipboard as Gdk.Clipboard
import qualified GI.Gdk.Objects.Cursor as Gdk.Cursor
import qualified GI.Gdk.Objects.Device as Gdk.Device
import qualified GI.Gdk.Objects.Display as Gdk.Display
import qualified GI.Gdk.Objects.Event as Gdk.Event
import qualified GI.Gdk.Objects.FrameClock as Gdk.FrameClock
import qualified GI.Gdk.Objects.Snapshot as Gdk.Snapshot
import qualified GI.Gdk.Objects.Surface as Gdk.Surface
import qualified GI.Gdk.Objects.Texture as Gdk.Texture
import qualified GI.Gdk.Structs.RGBA as Gdk.RGBA
import qualified GI.Gdk.Structs.Rectangle as Gdk.Rectangle
import qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import qualified GI.Gio.Interfaces.Icon as Gio.Icon
import qualified GI.Gio.Interfaces.ListModel as Gio.ListModel
import qualified GI.Graphene.Structs.Matrix as Graphene.Matrix
import qualified GI.Graphene.Structs.Point as Graphene.Point
import qualified GI.Graphene.Structs.Point3D as Graphene.Point3D
import qualified GI.Graphene.Structs.Rect as Graphene.Rect
import qualified GI.Graphene.Structs.Size as Graphene.Size
import qualified GI.Graphene.Structs.Vec3 as Graphene.Vec3
import qualified GI.Graphene.Structs.Vec4 as Graphene.Vec4
import qualified GI.Gsk.Enums as Gsk.Enums
import qualified GI.Gsk.Objects.GLShader as Gsk.GLShader
import qualified GI.Gsk.Objects.RenderNode as Gsk.RenderNode
import qualified GI.Gsk.Objects.Renderer as Gsk.Renderer
import qualified GI.Gsk.Structs.ColorStop as Gsk.ColorStop
import qualified GI.Gsk.Structs.Path as Gsk.Path
import qualified GI.Gsk.Structs.RoundedRect as Gsk.RoundedRect
import qualified GI.Gsk.Structs.Shadow as Gsk.Shadow
import qualified GI.Gsk.Structs.Stroke as Gsk.Stroke
import qualified GI.Gsk.Structs.Transform as Gsk.Transform
import qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Flags as Gtk.Flags
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.AccessibleRange as Gtk.AccessibleRange
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Native as Gtk.Native
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Orientable as Gtk.Orientable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Root as Gtk.Root
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.StyleProvider as Gtk.StyleProvider
import {-# SOURCE #-} qualified GI.Gtk.Objects.ATContext as Gtk.ATContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import {-# SOURCE #-} qualified GI.Gtk.Objects.EventController as Gtk.EventController
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutChild as Gtk.LayoutChild
import {-# SOURCE #-} qualified GI.Gtk.Objects.LayoutManager as Gtk.LayoutManager
import {-# SOURCE #-} qualified GI.Gtk.Objects.Settings as Gtk.Settings
import {-# SOURCE #-} qualified GI.Gtk.Objects.Snapshot as Gtk.Snapshot
import {-# SOURCE #-} qualified GI.Gtk.Objects.StyleContext as Gtk.StyleContext
import {-# SOURCE #-} qualified GI.Gtk.Objects.Tooltip as Gtk.Tooltip
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
import {-# SOURCE #-} qualified GI.Gtk.Structs.Border as Gtk.Border
import {-# SOURCE #-} qualified GI.Gtk.Structs.Requisition as Gtk.Requisition
import qualified GI.Pango.Enums as Pango.Enums
import qualified GI.Pango.Objects.Context as Pango.Context
import qualified GI.Pango.Objects.FontMap as Pango.FontMap
import qualified GI.Pango.Objects.Layout as Pango.Layout
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Enums as Gtk.Enums
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.AccessibleRange as Gtk.AccessibleRange
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Orientable as Gtk.Orientable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
#endif
newtype Scrollbar = Scrollbar (SP.ManagedPtr Scrollbar)
deriving (Scrollbar -> Scrollbar -> Bool
(Scrollbar -> Scrollbar -> Bool)
-> (Scrollbar -> Scrollbar -> Bool) -> Eq Scrollbar
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Scrollbar -> Scrollbar -> Bool
== :: Scrollbar -> Scrollbar -> Bool
$c/= :: Scrollbar -> Scrollbar -> Bool
/= :: Scrollbar -> Scrollbar -> Bool
Eq)
instance SP.ManagedPtrNewtype Scrollbar where
toManagedPtr :: Scrollbar -> ManagedPtr Scrollbar
toManagedPtr (Scrollbar ManagedPtr Scrollbar
p) = ManagedPtr Scrollbar
p
foreign import ccall "gtk_scrollbar_get_type"
c_gtk_scrollbar_get_type :: IO B.Types.GType
instance B.Types.TypedObject Scrollbar where
glibType :: IO GType
glibType = IO GType
c_gtk_scrollbar_get_type
instance B.Types.GObject Scrollbar
class (SP.GObject o, O.IsDescendantOf Scrollbar o) => IsScrollbar o
instance (SP.GObject o, O.IsDescendantOf Scrollbar o) => IsScrollbar o
instance O.HasParentTypes Scrollbar
type instance O.ParentTypes Scrollbar = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.AccessibleRange.AccessibleRange, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget, Gtk.Orientable.Orientable]
toScrollbar :: (MIO.MonadIO m, IsScrollbar o) => o -> m Scrollbar
toScrollbar :: forall (m :: * -> *) o.
(MonadIO m, IsScrollbar o) =>
o -> m Scrollbar
toScrollbar = IO Scrollbar -> m Scrollbar
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Scrollbar -> m Scrollbar)
-> (o -> IO Scrollbar) -> o -> m Scrollbar
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Scrollbar -> Scrollbar) -> o -> IO Scrollbar
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Scrollbar -> Scrollbar
Scrollbar
instance B.GValue.IsGValue (Maybe Scrollbar) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_scrollbar_get_type
gvalueSet_ :: Ptr GValue -> Maybe Scrollbar -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Scrollbar
P.Nothing = Ptr GValue -> Ptr Scrollbar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Scrollbar
forall a. Ptr a
FP.nullPtr :: FP.Ptr Scrollbar)
gvalueSet_ Ptr GValue
gv (P.Just Scrollbar
obj) = Scrollbar -> (Ptr Scrollbar -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Scrollbar
obj (Ptr GValue -> Ptr Scrollbar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Scrollbar)
gvalueGet_ Ptr GValue
gv = do
Ptr Scrollbar
ptr <- Ptr GValue -> IO (Ptr Scrollbar)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Scrollbar)
if Ptr Scrollbar
ptr Ptr Scrollbar -> Ptr Scrollbar -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Scrollbar
forall a. Ptr a
FP.nullPtr
then Scrollbar -> Maybe Scrollbar
forall a. a -> Maybe a
P.Just (Scrollbar -> Maybe Scrollbar)
-> IO Scrollbar -> IO (Maybe Scrollbar)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Scrollbar -> Scrollbar)
-> Ptr Scrollbar -> IO Scrollbar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Scrollbar -> Scrollbar
Scrollbar Ptr Scrollbar
ptr
else Maybe Scrollbar -> IO (Maybe Scrollbar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Scrollbar
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveScrollbarMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveScrollbarMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveScrollbarMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveScrollbarMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveScrollbarMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveScrollbarMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveScrollbarMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveScrollbarMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveScrollbarMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveScrollbarMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveScrollbarMethod "announce" o = Gtk.Accessible.AccessibleAnnounceMethodInfo
ResolveScrollbarMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveScrollbarMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveScrollbarMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveScrollbarMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveScrollbarMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveScrollbarMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveScrollbarMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveScrollbarMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveScrollbarMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveScrollbarMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveScrollbarMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveScrollbarMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveScrollbarMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveScrollbarMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveScrollbarMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveScrollbarMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveScrollbarMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveScrollbarMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveScrollbarMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveScrollbarMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveScrollbarMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveScrollbarMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveScrollbarMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveScrollbarMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveScrollbarMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveScrollbarMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveScrollbarMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveScrollbarMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveScrollbarMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveScrollbarMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveScrollbarMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveScrollbarMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveScrollbarMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveScrollbarMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveScrollbarMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveScrollbarMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveScrollbarMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveScrollbarMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveScrollbarMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveScrollbarMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveScrollbarMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveScrollbarMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveScrollbarMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveScrollbarMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveScrollbarMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveScrollbarMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveScrollbarMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveScrollbarMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveScrollbarMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveScrollbarMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveScrollbarMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveScrollbarMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveScrollbarMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveScrollbarMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveScrollbarMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveScrollbarMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveScrollbarMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveScrollbarMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveScrollbarMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveScrollbarMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveScrollbarMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveScrollbarMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveScrollbarMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveScrollbarMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveScrollbarMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveScrollbarMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveScrollbarMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveScrollbarMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveScrollbarMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveScrollbarMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveScrollbarMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveScrollbarMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveScrollbarMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveScrollbarMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveScrollbarMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveScrollbarMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveScrollbarMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveScrollbarMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveScrollbarMethod "getAdjustment" o = ScrollbarGetAdjustmentMethodInfo
ResolveScrollbarMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveScrollbarMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveScrollbarMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveScrollbarMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveScrollbarMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveScrollbarMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveScrollbarMethod "getBaseline" o = Gtk.Widget.WidgetGetBaselineMethodInfo
ResolveScrollbarMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveScrollbarMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveScrollbarMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveScrollbarMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveScrollbarMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveScrollbarMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveScrollbarMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveScrollbarMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveScrollbarMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveScrollbarMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveScrollbarMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveScrollbarMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveScrollbarMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveScrollbarMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveScrollbarMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveScrollbarMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveScrollbarMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveScrollbarMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveScrollbarMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveScrollbarMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveScrollbarMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveScrollbarMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveScrollbarMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveScrollbarMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveScrollbarMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveScrollbarMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveScrollbarMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveScrollbarMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveScrollbarMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveScrollbarMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveScrollbarMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveScrollbarMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveScrollbarMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveScrollbarMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveScrollbarMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveScrollbarMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveScrollbarMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveScrollbarMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveScrollbarMethod "getOrientation" o = Gtk.Orientable.OrientableGetOrientationMethodInfo
ResolveScrollbarMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveScrollbarMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveScrollbarMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveScrollbarMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveScrollbarMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveScrollbarMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveScrollbarMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveScrollbarMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveScrollbarMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveScrollbarMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveScrollbarMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveScrollbarMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveScrollbarMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveScrollbarMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveScrollbarMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveScrollbarMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveScrollbarMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveScrollbarMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveScrollbarMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveScrollbarMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveScrollbarMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveScrollbarMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveScrollbarMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveScrollbarMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveScrollbarMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveScrollbarMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveScrollbarMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveScrollbarMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveScrollbarMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveScrollbarMethod "setAdjustment" o = ScrollbarSetAdjustmentMethodInfo
ResolveScrollbarMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveScrollbarMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveScrollbarMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveScrollbarMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveScrollbarMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveScrollbarMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveScrollbarMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveScrollbarMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveScrollbarMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveScrollbarMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveScrollbarMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveScrollbarMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveScrollbarMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveScrollbarMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveScrollbarMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveScrollbarMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveScrollbarMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveScrollbarMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveScrollbarMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveScrollbarMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveScrollbarMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveScrollbarMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveScrollbarMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveScrollbarMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveScrollbarMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveScrollbarMethod "setOrientation" o = Gtk.Orientable.OrientableSetOrientationMethodInfo
ResolveScrollbarMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveScrollbarMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveScrollbarMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveScrollbarMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveScrollbarMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveScrollbarMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveScrollbarMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveScrollbarMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveScrollbarMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveScrollbarMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveScrollbarMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveScrollbarMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveScrollbarMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveScrollbarMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveScrollbarMethod t Scrollbar, O.OverloadedMethod info Scrollbar p) => OL.IsLabel t (Scrollbar -> 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 ~ ResolveScrollbarMethod t Scrollbar, O.OverloadedMethod info Scrollbar p, R.HasField t Scrollbar p) => R.HasField t Scrollbar p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveScrollbarMethod t Scrollbar, O.OverloadedMethodInfo info Scrollbar) => OL.IsLabel t (O.MethodProxy info Scrollbar) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m Gtk.Adjustment.Adjustment
getScrollbarAdjustment :: forall (m :: * -> *) o.
(MonadIO m, IsScrollbar o) =>
o -> m Adjustment
getScrollbarAdjustment 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
"getScrollbarAdjustment" (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
"adjustment" ManagedPtr Adjustment -> Adjustment
Gtk.Adjustment.Adjustment
setScrollbarAdjustment :: (MonadIO m, IsScrollbar o, Gtk.Adjustment.IsAdjustment a) => o -> a -> m ()
setScrollbarAdjustment :: forall (m :: * -> *) o a.
(MonadIO m, IsScrollbar o, IsAdjustment a) =>
o -> a -> m ()
setScrollbarAdjustment 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
"adjustment" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructScrollbarAdjustment :: (IsScrollbar o, MIO.MonadIO m, Gtk.Adjustment.IsAdjustment a) => a -> m (GValueConstruct o)
constructScrollbarAdjustment :: forall o (m :: * -> *) a.
(IsScrollbar o, MonadIO m, IsAdjustment a) =>
a -> m (GValueConstruct o)
constructScrollbarAdjustment 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
"adjustment" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearScrollbarAdjustment :: (MonadIO m, IsScrollbar o) => o -> m ()
clearScrollbarAdjustment :: forall (m :: * -> *) o. (MonadIO m, IsScrollbar o) => o -> m ()
clearScrollbarAdjustment 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
"adjustment" (Maybe Adjustment
forall a. Maybe a
Nothing :: Maybe Gtk.Adjustment.Adjustment)
#if defined(ENABLE_OVERLOADING)
data ScrollbarAdjustmentPropertyInfo
instance AttrInfo ScrollbarAdjustmentPropertyInfo where
type AttrAllowedOps ScrollbarAdjustmentPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ScrollbarAdjustmentPropertyInfo = IsScrollbar
type AttrSetTypeConstraint ScrollbarAdjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferTypeConstraint ScrollbarAdjustmentPropertyInfo = Gtk.Adjustment.IsAdjustment
type AttrTransferType ScrollbarAdjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrGetType ScrollbarAdjustmentPropertyInfo = Gtk.Adjustment.Adjustment
type AttrLabel ScrollbarAdjustmentPropertyInfo = "adjustment"
type AttrOrigin ScrollbarAdjustmentPropertyInfo = Scrollbar
attrGet = getScrollbarAdjustment
attrSet = setScrollbarAdjustment
attrTransfer _ v = do
unsafeCastTo Gtk.Adjustment.Adjustment v
attrConstruct = constructScrollbarAdjustment
attrClear = clearScrollbarAdjustment
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Scrollbar.adjustment"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Scrollbar.html#g:attr:adjustment"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Scrollbar
type instance O.AttributeList Scrollbar = ScrollbarAttributeList
type ScrollbarAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("adjustment", ScrollbarAdjustmentPropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("orientation", Gtk.Orientable.OrientableOrientationPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
scrollbarAdjustment :: AttrLabelProxy "adjustment"
scrollbarAdjustment = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Scrollbar = ScrollbarSignalList
type ScrollbarSignalList = ('[ '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "gtk_scrollbar_new" gtk_scrollbar_new ::
CUInt ->
Ptr Gtk.Adjustment.Adjustment ->
IO (Ptr Scrollbar)
scrollbarNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Adjustment.IsAdjustment a) =>
Gtk.Enums.Orientation
-> Maybe (a)
-> m Scrollbar
scrollbarNew :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAdjustment a) =>
Orientation -> Maybe a -> m Scrollbar
scrollbarNew Orientation
orientation Maybe a
adjustment = IO Scrollbar -> m Scrollbar
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Scrollbar -> m Scrollbar) -> IO Scrollbar -> m Scrollbar
forall a b. (a -> b) -> a -> b
$ do
let orientation' :: CUInt
orientation' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (Orientation -> Int) -> Orientation -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Orientation -> Int
forall a. Enum a => a -> Int
fromEnum) Orientation
orientation
Ptr Adjustment
maybeAdjustment <- case Maybe a
adjustment of
Maybe a
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 a
jAdjustment -> do
Ptr Adjustment
jAdjustment' <- a -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jAdjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jAdjustment'
Ptr Scrollbar
result <- CUInt -> Ptr Adjustment -> IO (Ptr Scrollbar)
gtk_scrollbar_new CUInt
orientation' Ptr Adjustment
maybeAdjustment
Text -> Ptr Scrollbar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"scrollbarNew" Ptr Scrollbar
result
Scrollbar
result' <- ((ManagedPtr Scrollbar -> Scrollbar)
-> Ptr Scrollbar -> IO Scrollbar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Scrollbar -> Scrollbar
Scrollbar) Ptr Scrollbar
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
adjustment a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Scrollbar -> IO Scrollbar
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Scrollbar
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_scrollbar_get_adjustment" gtk_scrollbar_get_adjustment ::
Ptr Scrollbar ->
IO (Ptr Gtk.Adjustment.Adjustment)
scrollbarGetAdjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollbar a) =>
a
-> m Gtk.Adjustment.Adjustment
scrollbarGetAdjustment :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsScrollbar a) =>
a -> m Adjustment
scrollbarGetAdjustment a
self = 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 Scrollbar
self' <- a -> IO (Ptr Scrollbar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Adjustment
result <- Ptr Scrollbar -> IO (Ptr Adjustment)
gtk_scrollbar_get_adjustment Ptr Scrollbar
self'
Text -> Ptr Adjustment -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"scrollbarGetAdjustment" 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
self
Adjustment -> IO Adjustment
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Adjustment
result'
#if defined(ENABLE_OVERLOADING)
data ScrollbarGetAdjustmentMethodInfo
instance (signature ~ (m Gtk.Adjustment.Adjustment), MonadIO m, IsScrollbar a) => O.OverloadedMethod ScrollbarGetAdjustmentMethodInfo a signature where
overloadedMethod = scrollbarGetAdjustment
instance O.OverloadedMethodInfo ScrollbarGetAdjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Scrollbar.scrollbarGetAdjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Scrollbar.html#v:scrollbarGetAdjustment"
})
#endif
foreign import ccall "gtk_scrollbar_set_adjustment" gtk_scrollbar_set_adjustment ::
Ptr Scrollbar ->
Ptr Gtk.Adjustment.Adjustment ->
IO ()
scrollbarSetAdjustment ::
(B.CallStack.HasCallStack, MonadIO m, IsScrollbar a, Gtk.Adjustment.IsAdjustment b) =>
a
-> Maybe (b)
-> m ()
scrollbarSetAdjustment :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsScrollbar a, IsAdjustment b) =>
a -> Maybe b -> m ()
scrollbarSetAdjustment a
self Maybe b
adjustment = 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 Scrollbar
self' <- a -> IO (Ptr Scrollbar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr Adjustment
maybeAdjustment <- case Maybe b
adjustment 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
jAdjustment -> do
Ptr Adjustment
jAdjustment' <- b -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jAdjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jAdjustment'
Ptr Scrollbar -> Ptr Adjustment -> IO ()
gtk_scrollbar_set_adjustment Ptr Scrollbar
self' Ptr Adjustment
maybeAdjustment
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
adjustment 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 ScrollbarSetAdjustmentMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsScrollbar a, Gtk.Adjustment.IsAdjustment b) => O.OverloadedMethod ScrollbarSetAdjustmentMethodInfo a signature where
overloadedMethod = scrollbarSetAdjustment
instance O.OverloadedMethodInfo ScrollbarSetAdjustmentMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Scrollbar.scrollbarSetAdjustment",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.9/docs/GI-Gtk-Objects-Scrollbar.html#v:scrollbarSetAdjustment"
})
#endif