{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.Viewport
(
Viewport(..) ,
IsViewport ,
toViewport ,
#if defined(ENABLE_OVERLOADING)
ResolveViewportMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
ViewportGetChildMethodInfo ,
#endif
viewportGetChild ,
#if defined(ENABLE_OVERLOADING)
ViewportGetScrollToFocusMethodInfo ,
#endif
viewportGetScrollToFocus ,
viewportNew ,
#if defined(ENABLE_OVERLOADING)
ViewportSetChildMethodInfo ,
#endif
viewportSetChild ,
#if defined(ENABLE_OVERLOADING)
ViewportSetScrollToFocusMethodInfo ,
#endif
viewportSetScrollToFocus ,
#if defined(ENABLE_OVERLOADING)
ViewportChildPropertyInfo ,
#endif
clearViewportChild ,
constructViewportChild ,
getViewportChild ,
setViewportChild ,
#if defined(ENABLE_OVERLOADING)
viewportChild ,
#endif
#if defined(ENABLE_OVERLOADING)
ViewportScrollToFocusPropertyInfo ,
#endif
constructViewportScrollToFocus ,
getViewportScrollToFocus ,
setViewportScrollToFocus ,
#if defined(ENABLE_OVERLOADING)
viewportScrollToFocus ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
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.Scrollable as Gtk.Scrollable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Adjustment as Gtk.Adjustment
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype Viewport = Viewport (SP.ManagedPtr Viewport)
deriving (Viewport -> Viewport -> Bool
(Viewport -> Viewport -> Bool)
-> (Viewport -> Viewport -> Bool) -> Eq Viewport
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Viewport -> Viewport -> Bool
== :: Viewport -> Viewport -> Bool
$c/= :: Viewport -> Viewport -> Bool
/= :: Viewport -> Viewport -> Bool
Eq)
instance SP.ManagedPtrNewtype Viewport where
toManagedPtr :: Viewport -> ManagedPtr Viewport
toManagedPtr (Viewport ManagedPtr Viewport
p) = ManagedPtr Viewport
p
foreign import ccall "gtk_viewport_get_type"
c_gtk_viewport_get_type :: IO B.Types.GType
instance B.Types.TypedObject Viewport where
glibType :: IO GType
glibType = IO GType
c_gtk_viewport_get_type
instance B.Types.GObject Viewport
class (SP.GObject o, O.IsDescendantOf Viewport o) => IsViewport o
instance (SP.GObject o, O.IsDescendantOf Viewport o) => IsViewport o
instance O.HasParentTypes Viewport
type instance O.ParentTypes Viewport = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget, Gtk.Scrollable.Scrollable]
toViewport :: (MIO.MonadIO m, IsViewport o) => o -> m Viewport
toViewport :: forall (m :: * -> *) o.
(MonadIO m, IsViewport o) =>
o -> m Viewport
toViewport = IO Viewport -> m Viewport
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Viewport -> m Viewport)
-> (o -> IO Viewport) -> o -> m Viewport
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Viewport -> Viewport) -> o -> IO Viewport
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Viewport -> Viewport
Viewport
instance B.GValue.IsGValue (Maybe Viewport) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_viewport_get_type
gvalueSet_ :: Ptr GValue -> Maybe Viewport -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Viewport
P.Nothing = Ptr GValue -> Ptr Viewport -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Viewport
forall a. Ptr a
FP.nullPtr :: FP.Ptr Viewport)
gvalueSet_ Ptr GValue
gv (P.Just Viewport
obj) = Viewport -> (Ptr Viewport -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Viewport
obj (Ptr GValue -> Ptr Viewport -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe Viewport)
gvalueGet_ Ptr GValue
gv = do
Ptr Viewport
ptr <- Ptr GValue -> IO (Ptr Viewport)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Viewport)
if Ptr Viewport
ptr Ptr Viewport -> Ptr Viewport -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Viewport
forall a. Ptr a
FP.nullPtr
then Viewport -> Maybe Viewport
forall a. a -> Maybe a
P.Just (Viewport -> Maybe Viewport) -> IO Viewport -> IO (Maybe Viewport)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Viewport -> Viewport) -> Ptr Viewport -> IO Viewport
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Viewport -> Viewport
Viewport Ptr Viewport
ptr
else Maybe Viewport -> IO (Maybe Viewport)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Viewport
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveViewportMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveViewportMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
ResolveViewportMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
ResolveViewportMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
ResolveViewportMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
ResolveViewportMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
ResolveViewportMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
ResolveViewportMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
ResolveViewportMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
ResolveViewportMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
ResolveViewportMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveViewportMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveViewportMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
ResolveViewportMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
ResolveViewportMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
ResolveViewportMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
ResolveViewportMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
ResolveViewportMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
ResolveViewportMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
ResolveViewportMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
ResolveViewportMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
ResolveViewportMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
ResolveViewportMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
ResolveViewportMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveViewportMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveViewportMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveViewportMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
ResolveViewportMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
ResolveViewportMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
ResolveViewportMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
ResolveViewportMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
ResolveViewportMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
ResolveViewportMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
ResolveViewportMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
ResolveViewportMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
ResolveViewportMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
ResolveViewportMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
ResolveViewportMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
ResolveViewportMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
ResolveViewportMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveViewportMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
ResolveViewportMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
ResolveViewportMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
ResolveViewportMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
ResolveViewportMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
ResolveViewportMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
ResolveViewportMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
ResolveViewportMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
ResolveViewportMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveViewportMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveViewportMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
ResolveViewportMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
ResolveViewportMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
ResolveViewportMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
ResolveViewportMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
ResolveViewportMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
ResolveViewportMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
ResolveViewportMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveViewportMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveViewportMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
ResolveViewportMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
ResolveViewportMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
ResolveViewportMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
ResolveViewportMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
ResolveViewportMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
ResolveViewportMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
ResolveViewportMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveViewportMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
ResolveViewportMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
ResolveViewportMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
ResolveViewportMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
ResolveViewportMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveViewportMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveViewportMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveViewportMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
ResolveViewportMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
ResolveViewportMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
ResolveViewportMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
ResolveViewportMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
ResolveViewportMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveViewportMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
ResolveViewportMethod "updateNextAccessibleSibling" o = Gtk.Accessible.AccessibleUpdateNextAccessibleSiblingMethodInfo
ResolveViewportMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
ResolveViewportMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
ResolveViewportMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
ResolveViewportMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveViewportMethod "getAccessibleParent" o = Gtk.Accessible.AccessibleGetAccessibleParentMethodInfo
ResolveViewportMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
ResolveViewportMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
ResolveViewportMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
ResolveViewportMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
ResolveViewportMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
ResolveViewportMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
ResolveViewportMethod "getAtContext" o = Gtk.Accessible.AccessibleGetAtContextMethodInfo
ResolveViewportMethod "getBorder" o = Gtk.Scrollable.ScrollableGetBorderMethodInfo
ResolveViewportMethod "getBounds" o = Gtk.Accessible.AccessibleGetBoundsMethodInfo
ResolveViewportMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
ResolveViewportMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
ResolveViewportMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
ResolveViewportMethod "getChild" o = ViewportGetChildMethodInfo
ResolveViewportMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
ResolveViewportMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
ResolveViewportMethod "getColor" o = Gtk.Widget.WidgetGetColorMethodInfo
ResolveViewportMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
ResolveViewportMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
ResolveViewportMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
ResolveViewportMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveViewportMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
ResolveViewportMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
ResolveViewportMethod "getFirstAccessibleChild" o = Gtk.Accessible.AccessibleGetFirstAccessibleChildMethodInfo
ResolveViewportMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
ResolveViewportMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
ResolveViewportMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
ResolveViewportMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
ResolveViewportMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
ResolveViewportMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
ResolveViewportMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
ResolveViewportMethod "getHadjustment" o = Gtk.Scrollable.ScrollableGetHadjustmentMethodInfo
ResolveViewportMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
ResolveViewportMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
ResolveViewportMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
ResolveViewportMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
ResolveViewportMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
ResolveViewportMethod "getHscrollPolicy" o = Gtk.Scrollable.ScrollableGetHscrollPolicyMethodInfo
ResolveViewportMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
ResolveViewportMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
ResolveViewportMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
ResolveViewportMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
ResolveViewportMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
ResolveViewportMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
ResolveViewportMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
ResolveViewportMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
ResolveViewportMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
ResolveViewportMethod "getNextAccessibleSibling" o = Gtk.Accessible.AccessibleGetNextAccessibleSiblingMethodInfo
ResolveViewportMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
ResolveViewportMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
ResolveViewportMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
ResolveViewportMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
ResolveViewportMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
ResolveViewportMethod "getPlatformState" o = Gtk.Accessible.AccessibleGetPlatformStateMethodInfo
ResolveViewportMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
ResolveViewportMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
ResolveViewportMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
ResolveViewportMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveViewportMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveViewportMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
ResolveViewportMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
ResolveViewportMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
ResolveViewportMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
ResolveViewportMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
ResolveViewportMethod "getScrollToFocus" o = ViewportGetScrollToFocusMethodInfo
ResolveViewportMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
ResolveViewportMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
ResolveViewportMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
ResolveViewportMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
ResolveViewportMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
ResolveViewportMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
ResolveViewportMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
ResolveViewportMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
ResolveViewportMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
ResolveViewportMethod "getVadjustment" o = Gtk.Scrollable.ScrollableGetVadjustmentMethodInfo
ResolveViewportMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
ResolveViewportMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
ResolveViewportMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
ResolveViewportMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
ResolveViewportMethod "getVscrollPolicy" o = Gtk.Scrollable.ScrollableGetVscrollPolicyMethodInfo
ResolveViewportMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
ResolveViewportMethod "setAccessibleParent" o = Gtk.Accessible.AccessibleSetAccessibleParentMethodInfo
ResolveViewportMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
ResolveViewportMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
ResolveViewportMethod "setChild" o = ViewportSetChildMethodInfo
ResolveViewportMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
ResolveViewportMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
ResolveViewportMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
ResolveViewportMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
ResolveViewportMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveViewportMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveViewportMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
ResolveViewportMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
ResolveViewportMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
ResolveViewportMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
ResolveViewportMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
ResolveViewportMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
ResolveViewportMethod "setHadjustment" o = Gtk.Scrollable.ScrollableSetHadjustmentMethodInfo
ResolveViewportMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
ResolveViewportMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
ResolveViewportMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
ResolveViewportMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
ResolveViewportMethod "setHscrollPolicy" o = Gtk.Scrollable.ScrollableSetHscrollPolicyMethodInfo
ResolveViewportMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
ResolveViewportMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
ResolveViewportMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
ResolveViewportMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
ResolveViewportMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
ResolveViewportMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
ResolveViewportMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
ResolveViewportMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
ResolveViewportMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
ResolveViewportMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveViewportMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
ResolveViewportMethod "setScrollToFocus" o = ViewportSetScrollToFocusMethodInfo
ResolveViewportMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
ResolveViewportMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
ResolveViewportMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
ResolveViewportMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
ResolveViewportMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
ResolveViewportMethod "setVadjustment" o = Gtk.Scrollable.ScrollableSetVadjustmentMethodInfo
ResolveViewportMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
ResolveViewportMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
ResolveViewportMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
ResolveViewportMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
ResolveViewportMethod "setVscrollPolicy" o = Gtk.Scrollable.ScrollableSetVscrollPolicyMethodInfo
ResolveViewportMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveViewportMethod t Viewport, O.OverloadedMethod info Viewport p) => OL.IsLabel t (Viewport -> 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 ~ ResolveViewportMethod t Viewport, O.OverloadedMethod info Viewport p, R.HasField t Viewport p) => R.HasField t Viewport p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveViewportMethod t Viewport, O.OverloadedMethodInfo info Viewport) => OL.IsLabel t (O.MethodProxy info Viewport) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getViewportChild :: (MonadIO m, IsViewport o) => o -> m (Maybe Gtk.Widget.Widget)
getViewportChild :: forall (m :: * -> *) o.
(MonadIO m, IsViewport o) =>
o -> m (Maybe Widget)
getViewportChild o
obj = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ o -> String -> (ManagedPtr Widget -> Widget) -> IO (Maybe Widget)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"child" ManagedPtr Widget -> Widget
Gtk.Widget.Widget
setViewportChild :: (MonadIO m, IsViewport o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setViewportChild :: forall (m :: * -> *) o a.
(MonadIO m, IsViewport o, IsWidget a) =>
o -> a -> m ()
setViewportChild 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
"child" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructViewportChild :: (IsViewport o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructViewportChild :: forall o (m :: * -> *) a.
(IsViewport o, MonadIO m, IsWidget a) =>
a -> m (GValueConstruct o)
constructViewportChild 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
"child" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearViewportChild :: (MonadIO m, IsViewport o) => o -> m ()
clearViewportChild :: forall (m :: * -> *) o. (MonadIO m, IsViewport o) => o -> m ()
clearViewportChild 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 Widget -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"child" (Maybe Widget
forall a. Maybe a
Nothing :: Maybe Gtk.Widget.Widget)
#if defined(ENABLE_OVERLOADING)
data ViewportChildPropertyInfo
instance AttrInfo ViewportChildPropertyInfo where
type AttrAllowedOps ViewportChildPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint ViewportChildPropertyInfo = IsViewport
type AttrSetTypeConstraint ViewportChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferTypeConstraint ViewportChildPropertyInfo = Gtk.Widget.IsWidget
type AttrTransferType ViewportChildPropertyInfo = Gtk.Widget.Widget
type AttrGetType ViewportChildPropertyInfo = (Maybe Gtk.Widget.Widget)
type AttrLabel ViewportChildPropertyInfo = "child"
type AttrOrigin ViewportChildPropertyInfo = Viewport
attrGet = getViewportChild
attrSet = setViewportChild
attrTransfer _ v = do
unsafeCastTo Gtk.Widget.Widget v
attrConstruct = constructViewportChild
attrClear = clearViewportChild
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.child"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#g:attr:child"
})
#endif
getViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> m Bool
getViewportScrollToFocus :: forall (m :: * -> *) o. (MonadIO m, IsViewport o) => o -> m Bool
getViewportScrollToFocus o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"scroll-to-focus"
setViewportScrollToFocus :: (MonadIO m, IsViewport o) => o -> Bool -> m ()
setViewportScrollToFocus :: forall (m :: * -> *) o.
(MonadIO m, IsViewport o) =>
o -> Bool -> m ()
setViewportScrollToFocus o
obj Bool
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"scroll-to-focus" Bool
val
constructViewportScrollToFocus :: (IsViewport o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructViewportScrollToFocus :: forall o (m :: * -> *).
(IsViewport o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructViewportScrollToFocus Bool
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 -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"scroll-to-focus" Bool
val
#if defined(ENABLE_OVERLOADING)
data ViewportScrollToFocusPropertyInfo
instance AttrInfo ViewportScrollToFocusPropertyInfo where
type AttrAllowedOps ViewportScrollToFocusPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint ViewportScrollToFocusPropertyInfo = IsViewport
type AttrSetTypeConstraint ViewportScrollToFocusPropertyInfo = (~) Bool
type AttrTransferTypeConstraint ViewportScrollToFocusPropertyInfo = (~) Bool
type AttrTransferType ViewportScrollToFocusPropertyInfo = Bool
type AttrGetType ViewportScrollToFocusPropertyInfo = Bool
type AttrLabel ViewportScrollToFocusPropertyInfo = "scroll-to-focus"
type AttrOrigin ViewportScrollToFocusPropertyInfo = Viewport
attrGet = getViewportScrollToFocus
attrSet = setViewportScrollToFocus
attrTransfer _ v = do
return v
attrConstruct = constructViewportScrollToFocus
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.scrollToFocus"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#g:attr:scrollToFocus"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Viewport
type instance O.AttributeList Viewport = ViewportAttributeList
type ViewportAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("child", ViewportChildPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("hadjustment", Gtk.Scrollable.ScrollableHadjustmentPropertyInfo), '("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), '("hscrollPolicy", Gtk.Scrollable.ScrollableHscrollPolicyPropertyInfo), '("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), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("scrollToFocus", ViewportScrollToFocusPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("vadjustment", Gtk.Scrollable.ScrollableVadjustmentPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("vscrollPolicy", Gtk.Scrollable.ScrollableVscrollPolicyPropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
viewportChild :: AttrLabelProxy "child"
viewportChild = AttrLabelProxy
viewportScrollToFocus :: AttrLabelProxy "scrollToFocus"
viewportScrollToFocus = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Viewport = ViewportSignalList
type ViewportSignalList = ('[ '("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_viewport_new" gtk_viewport_new ::
Ptr Gtk.Adjustment.Adjustment ->
Ptr Gtk.Adjustment.Adjustment ->
IO (Ptr Viewport)
viewportNew ::
(B.CallStack.HasCallStack, MonadIO m, Gtk.Adjustment.IsAdjustment a, Gtk.Adjustment.IsAdjustment b) =>
Maybe (a)
-> Maybe (b)
-> m Viewport
viewportNew :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAdjustment a, IsAdjustment b) =>
Maybe a -> Maybe b -> m Viewport
viewportNew Maybe a
hadjustment Maybe b
vadjustment = IO Viewport -> m Viewport
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Viewport -> m Viewport) -> IO Viewport -> m Viewport
forall a b. (a -> b) -> a -> b
$ do
Ptr Adjustment
maybeHadjustment <- case Maybe a
hadjustment 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
jHadjustment -> do
Ptr Adjustment
jHadjustment' <- a -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jHadjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jHadjustment'
Ptr Adjustment
maybeVadjustment <- case Maybe b
vadjustment of
Maybe b
Nothing -> Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
forall a. Ptr a
nullPtr
Just b
jVadjustment -> do
Ptr Adjustment
jVadjustment' <- b -> IO (Ptr Adjustment)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jVadjustment
Ptr Adjustment -> IO (Ptr Adjustment)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Adjustment
jVadjustment'
Ptr Viewport
result <- Ptr Adjustment -> Ptr Adjustment -> IO (Ptr Viewport)
gtk_viewport_new Ptr Adjustment
maybeHadjustment Ptr Adjustment
maybeVadjustment
Text -> Ptr Viewport -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewportNew" Ptr Viewport
result
Viewport
result' <- ((ManagedPtr Viewport -> Viewport) -> Ptr Viewport -> IO Viewport
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Viewport -> Viewport
Viewport) Ptr Viewport
result
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
hadjustment a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
vadjustment b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Viewport -> IO Viewport
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Viewport
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_viewport_get_child" gtk_viewport_get_child ::
Ptr Viewport ->
IO (Ptr Gtk.Widget.Widget)
viewportGetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsViewport a) =>
a
-> m (Maybe Gtk.Widget.Widget)
viewportGetChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewport a) =>
a -> m (Maybe Widget)
viewportGetChild a
viewport = IO (Maybe Widget) -> m (Maybe Widget)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
Ptr Viewport
viewport' <- a -> IO (Ptr Viewport)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
viewport
Ptr Widget
result <- Ptr Viewport -> IO (Ptr Widget)
gtk_viewport_get_child Ptr Viewport
viewport'
Maybe Widget
maybeResult <- Ptr Widget -> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Widget
result ((Ptr Widget -> IO Widget) -> IO (Maybe Widget))
-> (Ptr Widget -> IO Widget) -> IO (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ \Ptr Widget
result' -> do
Widget
result'' <- ((ManagedPtr Widget -> Widget) -> Ptr Widget -> IO Widget
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Widget -> Widget
Gtk.Widget.Widget) Ptr Widget
result'
Widget -> IO Widget
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
viewport
Maybe Widget -> IO (Maybe Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult
#if defined(ENABLE_OVERLOADING)
data ViewportGetChildMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsViewport a) => O.OverloadedMethod ViewportGetChildMethodInfo a signature where
overloadedMethod = viewportGetChild
instance O.OverloadedMethodInfo ViewportGetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.viewportGetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#v:viewportGetChild"
})
#endif
foreign import ccall "gtk_viewport_get_scroll_to_focus" gtk_viewport_get_scroll_to_focus ::
Ptr Viewport ->
IO CInt
viewportGetScrollToFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsViewport a) =>
a
-> m Bool
viewportGetScrollToFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewport a) =>
a -> m Bool
viewportGetScrollToFocus a
viewport = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
Ptr Viewport
viewport' <- a -> IO (Ptr Viewport)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
viewport
CInt
result <- Ptr Viewport -> IO CInt
gtk_viewport_get_scroll_to_focus Ptr Viewport
viewport'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
viewport
Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ViewportGetScrollToFocusMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsViewport a) => O.OverloadedMethod ViewportGetScrollToFocusMethodInfo a signature where
overloadedMethod = viewportGetScrollToFocus
instance O.OverloadedMethodInfo ViewportGetScrollToFocusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.viewportGetScrollToFocus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#v:viewportGetScrollToFocus"
})
#endif
foreign import ccall "gtk_viewport_set_child" gtk_viewport_set_child ::
Ptr Viewport ->
Ptr Gtk.Widget.Widget ->
IO ()
viewportSetChild ::
(B.CallStack.HasCallStack, MonadIO m, IsViewport a, Gtk.Widget.IsWidget b) =>
a
-> Maybe (b)
-> m ()
viewportSetChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewport a, IsWidget b) =>
a -> Maybe b -> m ()
viewportSetChild a
viewport Maybe b
child = 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 Viewport
viewport' <- a -> IO (Ptr Viewport)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
viewport
Ptr Widget
maybeChild <- case Maybe b
child of
Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
Just b
jChild -> do
Ptr Widget
jChild' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jChild
Ptr Widget -> IO (Ptr Widget)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jChild'
Ptr Viewport -> Ptr Widget -> IO ()
gtk_viewport_set_child Ptr Viewport
viewport' Ptr Widget
maybeChild
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
viewport
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
child 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 ViewportSetChildMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsViewport a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewportSetChildMethodInfo a signature where
overloadedMethod = viewportSetChild
instance O.OverloadedMethodInfo ViewportSetChildMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.viewportSetChild",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#v:viewportSetChild"
})
#endif
foreign import ccall "gtk_viewport_set_scroll_to_focus" gtk_viewport_set_scroll_to_focus ::
Ptr Viewport ->
CInt ->
IO ()
viewportSetScrollToFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsViewport a) =>
a
-> Bool
-> m ()
viewportSetScrollToFocus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewport a) =>
a -> Bool -> m ()
viewportSetScrollToFocus a
viewport Bool
scrollToFocus = 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 Viewport
viewport' <- a -> IO (Ptr Viewport)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
viewport
let scrollToFocus' :: CInt
scrollToFocus' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
scrollToFocus
Ptr Viewport -> CInt -> IO ()
gtk_viewport_set_scroll_to_focus Ptr Viewport
viewport' CInt
scrollToFocus'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
viewport
() -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ViewportSetScrollToFocusMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsViewport a) => O.OverloadedMethod ViewportSetScrollToFocusMethodInfo a signature where
overloadedMethod = viewportSetScrollToFocus
instance O.OverloadedMethodInfo ViewportSetScrollToFocusMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gtk.Objects.Viewport.viewportSetScrollToFocus",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gtk-4.0.8/docs/GI-Gtk-Objects-Viewport.html#v:viewportSetScrollToFocus"
})
#endif