{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gtk.Objects.Layout ( -- * Exported types Layout(..) , LayoutK , toLayout , noLayout , -- * Methods -- ** layoutGetBinWindow layoutGetBinWindow , -- ** layoutGetHadjustment layoutGetHadjustment , -- ** layoutGetSize layoutGetSize , -- ** layoutGetVadjustment layoutGetVadjustment , -- ** layoutMove layoutMove , -- ** layoutNew layoutNew , -- ** layoutPut layoutPut , -- ** layoutSetHadjustment layoutSetHadjustment , -- ** layoutSetSize layoutSetSize , -- ** layoutSetVadjustment layoutSetVadjustment , -- * Properties -- ** Height LayoutHeightPropertyInfo , constructLayoutHeight , getLayoutHeight , setLayoutHeight , -- ** Width LayoutWidthPropertyInfo , constructLayoutWidth , getLayoutWidth , setLayoutWidth , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gtk.Types import GI.Gtk.Callbacks import qualified GI.Atk as Atk import qualified GI.GObject as GObject import qualified GI.Gdk as Gdk newtype Layout = Layout (ForeignPtr Layout) foreign import ccall "gtk_layout_get_type" c_gtk_layout_get_type :: IO GType type instance ParentTypes Layout = LayoutParentTypes type LayoutParentTypes = '[Container, Widget, GObject.Object, Atk.ImplementorIface, Buildable, Scrollable] instance GObject Layout where gobjectIsInitiallyUnowned _ = True gobjectType _ = c_gtk_layout_get_type class GObject o => LayoutK o instance (GObject o, IsDescendantOf Layout o) => LayoutK o toLayout :: LayoutK o => o -> IO Layout toLayout = unsafeCastTo Layout noLayout :: Maybe Layout noLayout = Nothing -- VVV Prop "height" -- Type: TBasicType TUInt32 -- Flags: [PropertyReadable,PropertyWritable] getLayoutHeight :: (MonadIO m, LayoutK o) => o -> m Word32 getLayoutHeight obj = liftIO $ getObjectPropertyCUInt obj "height" setLayoutHeight :: (MonadIO m, LayoutK o) => o -> Word32 -> m () setLayoutHeight obj val = liftIO $ setObjectPropertyCUInt obj "height" val constructLayoutHeight :: Word32 -> IO ([Char], GValue) constructLayoutHeight val = constructObjectPropertyCUInt "height" val data LayoutHeightPropertyInfo instance AttrInfo LayoutHeightPropertyInfo where type AttrAllowedOps LayoutHeightPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LayoutHeightPropertyInfo = (~) Word32 type AttrBaseTypeConstraint LayoutHeightPropertyInfo = LayoutK type AttrGetType LayoutHeightPropertyInfo = Word32 type AttrLabel LayoutHeightPropertyInfo = "Layout::height" attrGet _ = getLayoutHeight attrSet _ = setLayoutHeight attrConstruct _ = constructLayoutHeight -- VVV Prop "width" -- Type: TBasicType TUInt32 -- Flags: [PropertyReadable,PropertyWritable] getLayoutWidth :: (MonadIO m, LayoutK o) => o -> m Word32 getLayoutWidth obj = liftIO $ getObjectPropertyCUInt obj "width" setLayoutWidth :: (MonadIO m, LayoutK o) => o -> Word32 -> m () setLayoutWidth obj val = liftIO $ setObjectPropertyCUInt obj "width" val constructLayoutWidth :: Word32 -> IO ([Char], GValue) constructLayoutWidth val = constructObjectPropertyCUInt "width" val data LayoutWidthPropertyInfo instance AttrInfo LayoutWidthPropertyInfo where type AttrAllowedOps LayoutWidthPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint LayoutWidthPropertyInfo = (~) Word32 type AttrBaseTypeConstraint LayoutWidthPropertyInfo = LayoutK type AttrGetType LayoutWidthPropertyInfo = Word32 type AttrLabel LayoutWidthPropertyInfo = "Layout::width" attrGet _ = getLayoutWidth attrSet _ = setLayoutWidth attrConstruct _ = constructLayoutWidth type instance AttributeList Layout = LayoutAttributeList type LayoutAttributeList = ('[ '("app-paintable", WidgetAppPaintablePropertyInfo), '("border-width", ContainerBorderWidthPropertyInfo), '("can-default", WidgetCanDefaultPropertyInfo), '("can-focus", WidgetCanFocusPropertyInfo), '("child", ContainerChildPropertyInfo), '("composite-child", WidgetCompositeChildPropertyInfo), '("double-buffered", WidgetDoubleBufferedPropertyInfo), '("events", WidgetEventsPropertyInfo), '("expand", WidgetExpandPropertyInfo), '("hadjustment", ScrollableHadjustmentPropertyInfo), '("halign", WidgetHalignPropertyInfo), '("has-default", WidgetHasDefaultPropertyInfo), '("has-focus", WidgetHasFocusPropertyInfo), '("has-tooltip", WidgetHasTooltipPropertyInfo), '("height", LayoutHeightPropertyInfo), '("height-request", WidgetHeightRequestPropertyInfo), '("hexpand", WidgetHexpandPropertyInfo), '("hexpand-set", WidgetHexpandSetPropertyInfo), '("hscroll-policy", ScrollableHscrollPolicyPropertyInfo), '("is-focus", WidgetIsFocusPropertyInfo), '("margin", WidgetMarginPropertyInfo), '("margin-bottom", WidgetMarginBottomPropertyInfo), '("margin-end", WidgetMarginEndPropertyInfo), '("margin-left", WidgetMarginLeftPropertyInfo), '("margin-right", WidgetMarginRightPropertyInfo), '("margin-start", WidgetMarginStartPropertyInfo), '("margin-top", WidgetMarginTopPropertyInfo), '("name", WidgetNamePropertyInfo), '("no-show-all", WidgetNoShowAllPropertyInfo), '("opacity", WidgetOpacityPropertyInfo), '("parent", WidgetParentPropertyInfo), '("receives-default", WidgetReceivesDefaultPropertyInfo), '("resize-mode", ContainerResizeModePropertyInfo), '("scale-factor", WidgetScaleFactorPropertyInfo), '("sensitive", WidgetSensitivePropertyInfo), '("style", WidgetStylePropertyInfo), '("tooltip-markup", WidgetTooltipMarkupPropertyInfo), '("tooltip-text", WidgetTooltipTextPropertyInfo), '("vadjustment", ScrollableVadjustmentPropertyInfo), '("valign", WidgetValignPropertyInfo), '("vexpand", WidgetVexpandPropertyInfo), '("vexpand-set", WidgetVexpandSetPropertyInfo), '("visible", WidgetVisiblePropertyInfo), '("vscroll-policy", ScrollableVscrollPolicyPropertyInfo), '("width", LayoutWidthPropertyInfo), '("width-request", WidgetWidthRequestPropertyInfo), '("window", WidgetWindowPropertyInfo)] :: [(Symbol, *)]) type instance SignalList Layout = LayoutSignalList type LayoutSignalList = ('[ '("accel-closures-changed", WidgetAccelClosuresChangedSignalInfo), '("add", ContainerAddSignalInfo), '("button-press-event", WidgetButtonPressEventSignalInfo), '("button-release-event", WidgetButtonReleaseEventSignalInfo), '("can-activate-accel", WidgetCanActivateAccelSignalInfo), '("check-resize", ContainerCheckResizeSignalInfo), '("child-notify", WidgetChildNotifySignalInfo), '("composited-changed", WidgetCompositedChangedSignalInfo), '("configure-event", WidgetConfigureEventSignalInfo), '("damage-event", WidgetDamageEventSignalInfo), '("delete-event", WidgetDeleteEventSignalInfo), '("destroy", WidgetDestroySignalInfo), '("destroy-event", WidgetDestroyEventSignalInfo), '("direction-changed", WidgetDirectionChangedSignalInfo), '("drag-begin", WidgetDragBeginSignalInfo), '("drag-data-delete", WidgetDragDataDeleteSignalInfo), '("drag-data-get", WidgetDragDataGetSignalInfo), '("drag-data-received", WidgetDragDataReceivedSignalInfo), '("drag-drop", WidgetDragDropSignalInfo), '("drag-end", WidgetDragEndSignalInfo), '("drag-failed", WidgetDragFailedSignalInfo), '("drag-leave", WidgetDragLeaveSignalInfo), '("drag-motion", WidgetDragMotionSignalInfo), '("draw", WidgetDrawSignalInfo), '("enter-notify-event", WidgetEnterNotifyEventSignalInfo), '("event", WidgetEventSignalInfo), '("event-after", WidgetEventAfterSignalInfo), '("focus", WidgetFocusSignalInfo), '("focus-in-event", WidgetFocusInEventSignalInfo), '("focus-out-event", WidgetFocusOutEventSignalInfo), '("grab-broken-event", WidgetGrabBrokenEventSignalInfo), '("grab-focus", WidgetGrabFocusSignalInfo), '("grab-notify", WidgetGrabNotifySignalInfo), '("hide", WidgetHideSignalInfo), '("hierarchy-changed", WidgetHierarchyChangedSignalInfo), '("key-press-event", WidgetKeyPressEventSignalInfo), '("key-release-event", WidgetKeyReleaseEventSignalInfo), '("keynav-failed", WidgetKeynavFailedSignalInfo), '("leave-notify-event", WidgetLeaveNotifyEventSignalInfo), '("map", WidgetMapSignalInfo), '("map-event", WidgetMapEventSignalInfo), '("mnemonic-activate", WidgetMnemonicActivateSignalInfo), '("motion-notify-event", WidgetMotionNotifyEventSignalInfo), '("move-focus", WidgetMoveFocusSignalInfo), '("notify", GObject.ObjectNotifySignalInfo), '("parent-set", WidgetParentSetSignalInfo), '("popup-menu", WidgetPopupMenuSignalInfo), '("property-notify-event", WidgetPropertyNotifyEventSignalInfo), '("proximity-in-event", WidgetProximityInEventSignalInfo), '("proximity-out-event", WidgetProximityOutEventSignalInfo), '("query-tooltip", WidgetQueryTooltipSignalInfo), '("realize", WidgetRealizeSignalInfo), '("remove", ContainerRemoveSignalInfo), '("screen-changed", WidgetScreenChangedSignalInfo), '("scroll-event", WidgetScrollEventSignalInfo), '("selection-clear-event", WidgetSelectionClearEventSignalInfo), '("selection-get", WidgetSelectionGetSignalInfo), '("selection-notify-event", WidgetSelectionNotifyEventSignalInfo), '("selection-received", WidgetSelectionReceivedSignalInfo), '("selection-request-event", WidgetSelectionRequestEventSignalInfo), '("set-focus-child", ContainerSetFocusChildSignalInfo), '("show", WidgetShowSignalInfo), '("show-help", WidgetShowHelpSignalInfo), '("size-allocate", WidgetSizeAllocateSignalInfo), '("state-changed", WidgetStateChangedSignalInfo), '("state-flags-changed", WidgetStateFlagsChangedSignalInfo), '("style-set", WidgetStyleSetSignalInfo), '("style-updated", WidgetStyleUpdatedSignalInfo), '("touch-event", WidgetTouchEventSignalInfo), '("unmap", WidgetUnmapSignalInfo), '("unmap-event", WidgetUnmapEventSignalInfo), '("unrealize", WidgetUnrealizeSignalInfo), '("visibility-notify-event", WidgetVisibilityNotifyEventSignalInfo), '("window-state-event", WidgetWindowStateEventSignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method Layout::new -- method type : Constructor -- Args : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "hadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "vadjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "Layout" -- throws : False -- Skip return : False foreign import ccall "gtk_layout_new" gtk_layout_new :: Ptr Adjustment -> -- hadjustment : TInterface "Gtk" "Adjustment" Ptr Adjustment -> -- vadjustment : TInterface "Gtk" "Adjustment" IO (Ptr Layout) layoutNew :: (MonadIO m, AdjustmentK a, AdjustmentK b) => Maybe (a) -> -- hadjustment Maybe (b) -> -- vadjustment m Layout layoutNew hadjustment vadjustment = liftIO $ do maybeHadjustment <- case hadjustment of Nothing -> return nullPtr Just jHadjustment -> do let jHadjustment' = unsafeManagedPtrCastPtr jHadjustment return jHadjustment' maybeVadjustment <- case vadjustment of Nothing -> return nullPtr Just jVadjustment -> do let jVadjustment' = unsafeManagedPtrCastPtr jVadjustment return jVadjustment' result <- gtk_layout_new maybeHadjustment maybeVadjustment checkUnexpectedReturnNULL "gtk_layout_new" result result' <- (newObject Layout) result whenJust hadjustment touchManagedPtr whenJust vadjustment touchManagedPtr return result' -- method Layout::get_bin_window -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gdk" "Window" -- throws : False -- Skip return : False foreign import ccall "gtk_layout_get_bin_window" gtk_layout_get_bin_window :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" IO (Ptr Gdk.Window) layoutGetBinWindow :: (MonadIO m, LayoutK a) => a -> -- _obj m Gdk.Window layoutGetBinWindow _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_layout_get_bin_window _obj' checkUnexpectedReturnNULL "gtk_layout_get_bin_window" result result' <- (newObject Gdk.Window) result touchManagedPtr _obj return result' -- method Layout::get_hadjustment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "Adjustment" -- throws : False -- Skip return : False foreign import ccall "gtk_layout_get_hadjustment" gtk_layout_get_hadjustment :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" IO (Ptr Adjustment) {-# DEPRECATED layoutGetHadjustment ["(Since version 3.0)","Use gtk_scrollable_get_hadjustment()"]#-} layoutGetHadjustment :: (MonadIO m, LayoutK a) => a -> -- _obj m Adjustment layoutGetHadjustment _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_layout_get_hadjustment _obj' checkUnexpectedReturnNULL "gtk_layout_get_hadjustment" result result' <- (newObject Adjustment) result touchManagedPtr _obj return result' -- method Layout::get_size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_get_size" gtk_layout_get_size :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Ptr Word32 -> -- width : TBasicType TUInt32 Ptr Word32 -> -- height : TBasicType TUInt32 IO () layoutGetSize :: (MonadIO m, LayoutK a) => a -> -- _obj m (Word32,Word32) layoutGetSize _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj width <- allocMem :: IO (Ptr Word32) height <- allocMem :: IO (Ptr Word32) gtk_layout_get_size _obj' width height width' <- peek width height' <- peek height touchManagedPtr _obj freeMem width freeMem height return (width', height') -- method Layout::get_vadjustment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gtk" "Adjustment" -- throws : False -- Skip return : False foreign import ccall "gtk_layout_get_vadjustment" gtk_layout_get_vadjustment :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" IO (Ptr Adjustment) {-# DEPRECATED layoutGetVadjustment ["(Since version 3.0)","Use gtk_scrollable_get_vadjustment()"]#-} layoutGetVadjustment :: (MonadIO m, LayoutK a) => a -> -- _obj m Adjustment layoutGetVadjustment _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- gtk_layout_get_vadjustment _obj' checkUnexpectedReturnNULL "gtk_layout_get_vadjustment" result result' <- (newObject Adjustment) result touchManagedPtr _obj return result' -- method Layout::move -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_move" gtk_layout_move :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Ptr Widget -> -- child_widget : TInterface "Gtk" "Widget" Int32 -> -- x : TBasicType TInt32 Int32 -> -- y : TBasicType TInt32 IO () layoutMove :: (MonadIO m, LayoutK a, WidgetK b) => a -> -- _obj b -> -- child_widget Int32 -> -- x Int32 -> -- y m () layoutMove _obj child_widget x y = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let child_widget' = unsafeManagedPtrCastPtr child_widget gtk_layout_move _obj' child_widget' x y touchManagedPtr _obj touchManagedPtr child_widget return () -- method Layout::put -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "child_widget", argType = TInterface "Gtk" "Widget", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "x", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "y", argType = TBasicType TInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_put" gtk_layout_put :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Ptr Widget -> -- child_widget : TInterface "Gtk" "Widget" Int32 -> -- x : TBasicType TInt32 Int32 -> -- y : TBasicType TInt32 IO () layoutPut :: (MonadIO m, LayoutK a, WidgetK b) => a -> -- _obj b -> -- child_widget Int32 -> -- x Int32 -> -- y m () layoutPut _obj child_widget x y = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let child_widget' = unsafeManagedPtrCastPtr child_widget gtk_layout_put _obj' child_widget' x y touchManagedPtr _obj touchManagedPtr child_widget return () -- method Layout::set_hadjustment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_set_hadjustment" gtk_layout_set_hadjustment :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Ptr Adjustment -> -- adjustment : TInterface "Gtk" "Adjustment" IO () {-# DEPRECATED layoutSetHadjustment ["(Since version 3.0)","Use gtk_scrollable_set_hadjustment()"]#-} layoutSetHadjustment :: (MonadIO m, LayoutK a, AdjustmentK b) => a -> -- _obj Maybe (b) -> -- adjustment m () layoutSetHadjustment _obj adjustment = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeAdjustment <- case adjustment of Nothing -> return nullPtr Just jAdjustment -> do let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment return jAdjustment' gtk_layout_set_hadjustment _obj' maybeAdjustment touchManagedPtr _obj whenJust adjustment touchManagedPtr return () -- method Layout::set_size -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "width", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "height", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_set_size" gtk_layout_set_size :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Word32 -> -- width : TBasicType TUInt32 Word32 -> -- height : TBasicType TUInt32 IO () layoutSetSize :: (MonadIO m, LayoutK a) => a -> -- _obj Word32 -> -- width Word32 -> -- height m () layoutSetSize _obj width height = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj gtk_layout_set_size _obj' width height touchManagedPtr _obj return () -- method Layout::set_vadjustment -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "Layout", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "adjustment", argType = TInterface "Gtk" "Adjustment", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "gtk_layout_set_vadjustment" gtk_layout_set_vadjustment :: Ptr Layout -> -- _obj : TInterface "Gtk" "Layout" Ptr Adjustment -> -- adjustment : TInterface "Gtk" "Adjustment" IO () {-# DEPRECATED layoutSetVadjustment ["(Since version 3.0)","Use gtk_scrollable_set_vadjustment()"]#-} layoutSetVadjustment :: (MonadIO m, LayoutK a, AdjustmentK b) => a -> -- _obj Maybe (b) -> -- adjustment m () layoutSetVadjustment _obj adjustment = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeAdjustment <- case adjustment of Nothing -> return nullPtr Just jAdjustment -> do let jAdjustment' = unsafeManagedPtrCastPtr jAdjustment return jAdjustment' gtk_layout_set_vadjustment _obj' maybeAdjustment touchManagedPtr _obj whenJust adjustment touchManagedPtr return ()