{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- The t'GI.Gtk.Objects.Bin.Bin' widget is a container with just one child.
-- It is not very useful itself, but it is useful for deriving subclasses,
-- since it provides common code needed for handling a single child widget.
-- 
-- Many GTK+ widgets are subclasses of t'GI.Gtk.Objects.Bin.Bin', including t'GI.Gtk.Objects.Window.Window',
-- t'GI.Gtk.Objects.Button.Button', t'GI.Gtk.Objects.Frame.Frame' or t'GI.Gtk.Objects.ScrolledWindow.ScrolledWindow'.

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.Gtk.Objects.Bin
    ( 

-- * Exported types
    Bin(..)                                 ,
    IsBin                                   ,
    toBin                                   ,
    noBin                                   ,


 -- * Methods
-- ** Overloaded methods #method:Overloaded methods#

#if defined(ENABLE_OVERLOADING)
    ResolveBinMethod                        ,
#endif


-- ** getChild #method:getChild#

#if defined(ENABLE_OVERLOADING)
    BinGetChildMethodInfo                   ,
#endif
    binGetChild                             ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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 Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL

import qualified GI.Atk.Interfaces.ImplementorIface as Atk.ImplementorIface
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.Container as Gtk.Container
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype Bin = Bin (ManagedPtr Bin)
    deriving (Bin -> Bin -> Bool
(Bin -> Bin -> Bool) -> (Bin -> Bin -> Bool) -> Eq Bin
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Bin -> Bin -> Bool
$c/= :: Bin -> Bin -> Bool
== :: Bin -> Bin -> Bool
$c== :: Bin -> Bin -> Bool
Eq)
foreign import ccall "gtk_bin_get_type"
    c_gtk_bin_get_type :: IO GType

instance GObject Bin where
    gobjectType :: IO GType
gobjectType = IO GType
c_gtk_bin_get_type
    

-- | Convert 'Bin' to and from 'Data.GI.Base.GValue.GValue' with 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue Bin where
    toGValue :: Bin -> IO GValue
toGValue o :: Bin
o = do
        GType
gtype <- IO GType
c_gtk_bin_get_type
        Bin -> (Ptr Bin -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Bin
o (GType -> (GValue -> Ptr Bin -> IO ()) -> Ptr Bin -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Bin -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO Bin
fromGValue gv :: GValue
gv = do
        Ptr Bin
ptr <- GValue -> IO (Ptr Bin)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr Bin)
        (ManagedPtr Bin -> Bin) -> Ptr Bin -> IO Bin
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Bin -> Bin
Bin Ptr Bin
ptr
        
    

-- | Type class for types which can be safely cast to `Bin`, for instance with `toBin`.
class (GObject o, O.IsDescendantOf Bin o) => IsBin o
instance (GObject o, O.IsDescendantOf Bin o) => IsBin o

instance O.HasParentTypes Bin
type instance O.ParentTypes Bin = '[Gtk.Container.Container, Gtk.Widget.Widget, GObject.Object.Object, Atk.ImplementorIface.ImplementorIface, Gtk.Buildable.Buildable]

-- | Cast to `Bin`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toBin :: (MonadIO m, IsBin o) => o -> m Bin
toBin :: o -> m Bin
toBin = IO Bin -> m Bin
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bin -> m Bin) -> (o -> IO Bin) -> o -> m Bin
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Bin -> Bin) -> o -> IO Bin
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr Bin -> Bin
Bin

-- | A convenience alias for `Nothing` :: `Maybe` `Bin`.
noBin :: Maybe Bin
noBin :: Maybe Bin
noBin = Maybe Bin
forall a. Maybe a
Nothing

#if defined(ENABLE_OVERLOADING)
type family ResolveBinMethod (t :: Symbol) (o :: *) :: * where
    ResolveBinMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveBinMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
    ResolveBinMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
    ResolveBinMethod "add" o = Gtk.Container.ContainerAddMethodInfo
    ResolveBinMethod "addAccelerator" o = Gtk.Widget.WidgetAddAcceleratorMethodInfo
    ResolveBinMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
    ResolveBinMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
    ResolveBinMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveBinMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveBinMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
    ResolveBinMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveBinMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveBinMethod "canActivateAccel" o = Gtk.Widget.WidgetCanActivateAccelMethodInfo
    ResolveBinMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveBinMethod "childType" o = Gtk.Container.ContainerChildTypeMethodInfo
    ResolveBinMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
    ResolveBinMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveBinMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
    ResolveBinMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
    ResolveBinMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
    ResolveBinMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
    ResolveBinMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveBinMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveBinMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
    ResolveBinMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
    ResolveBinMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
    ResolveBinMethod "destroy" o = Gtk.Widget.WidgetDestroyMethodInfo
    ResolveBinMethod "destroyed" o = Gtk.Widget.WidgetDestroyedMethodInfo
    ResolveBinMethod "deviceIsShadowed" o = Gtk.Widget.WidgetDeviceIsShadowedMethodInfo
    ResolveBinMethod "dragBegin" o = Gtk.Widget.WidgetDragBeginMethodInfo
    ResolveBinMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveBinMethod "dragDestAddImageTargets" o = Gtk.Widget.WidgetDragDestAddImageTargetsMethodInfo
    ResolveBinMethod "dragDestAddTextTargets" o = Gtk.Widget.WidgetDragDestAddTextTargetsMethodInfo
    ResolveBinMethod "dragDestAddUriTargets" o = Gtk.Widget.WidgetDragDestAddUriTargetsMethodInfo
    ResolveBinMethod "dragDestFindTarget" o = Gtk.Widget.WidgetDragDestFindTargetMethodInfo
    ResolveBinMethod "dragDestGetTargetList" o = Gtk.Widget.WidgetDragDestGetTargetListMethodInfo
    ResolveBinMethod "dragDestGetTrackMotion" o = Gtk.Widget.WidgetDragDestGetTrackMotionMethodInfo
    ResolveBinMethod "dragDestSet" o = Gtk.Widget.WidgetDragDestSetMethodInfo
    ResolveBinMethod "dragDestSetTargetList" o = Gtk.Widget.WidgetDragDestSetTargetListMethodInfo
    ResolveBinMethod "dragDestSetTrackMotion" o = Gtk.Widget.WidgetDragDestSetTrackMotionMethodInfo
    ResolveBinMethod "dragDestUnset" o = Gtk.Widget.WidgetDragDestUnsetMethodInfo
    ResolveBinMethod "dragGetData" o = Gtk.Widget.WidgetDragGetDataMethodInfo
    ResolveBinMethod "dragHighlight" o = Gtk.Widget.WidgetDragHighlightMethodInfo
    ResolveBinMethod "dragSourceAddImageTargets" o = Gtk.Widget.WidgetDragSourceAddImageTargetsMethodInfo
    ResolveBinMethod "dragSourceAddTextTargets" o = Gtk.Widget.WidgetDragSourceAddTextTargetsMethodInfo
    ResolveBinMethod "dragSourceAddUriTargets" o = Gtk.Widget.WidgetDragSourceAddUriTargetsMethodInfo
    ResolveBinMethod "dragSourceGetTargetList" o = Gtk.Widget.WidgetDragSourceGetTargetListMethodInfo
    ResolveBinMethod "dragSourceSet" o = Gtk.Widget.WidgetDragSourceSetMethodInfo
    ResolveBinMethod "dragSourceSetIconGicon" o = Gtk.Widget.WidgetDragSourceSetIconGiconMethodInfo
    ResolveBinMethod "dragSourceSetIconName" o = Gtk.Widget.WidgetDragSourceSetIconNameMethodInfo
    ResolveBinMethod "dragSourceSetIconPaintable" o = Gtk.Widget.WidgetDragSourceSetIconPaintableMethodInfo
    ResolveBinMethod "dragSourceSetTargetList" o = Gtk.Widget.WidgetDragSourceSetTargetListMethodInfo
    ResolveBinMethod "dragSourceUnset" o = Gtk.Widget.WidgetDragSourceUnsetMethodInfo
    ResolveBinMethod "dragUnhighlight" o = Gtk.Widget.WidgetDragUnhighlightMethodInfo
    ResolveBinMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveBinMethod "event" o = Gtk.Widget.WidgetEventMethodInfo
    ResolveBinMethod "forall" o = Gtk.Container.ContainerForallMethodInfo
    ResolveBinMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveBinMethod "foreach" o = Gtk.Container.ContainerForeachMethodInfo
    ResolveBinMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveBinMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveBinMethod "grabAdd" o = Gtk.Widget.WidgetGrabAddMethodInfo
    ResolveBinMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveBinMethod "grabRemove" o = Gtk.Widget.WidgetGrabRemoveMethodInfo
    ResolveBinMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveBinMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveBinMethod "hasGrab" o = Gtk.Widget.WidgetHasGrabMethodInfo
    ResolveBinMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveBinMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveBinMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveBinMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveBinMethod "inputShapeCombineRegion" o = Gtk.Widget.WidgetInputShapeCombineRegionMethodInfo
    ResolveBinMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveBinMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
    ResolveBinMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
    ResolveBinMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveBinMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveBinMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveBinMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveBinMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveBinMethod "isToplevel" o = Gtk.Widget.WidgetIsToplevelMethodInfo
    ResolveBinMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveBinMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveBinMethod "listAccelClosures" o = Gtk.Widget.WidgetListAccelClosuresMethodInfo
    ResolveBinMethod "listActionPrefixes" o = Gtk.Widget.WidgetListActionPrefixesMethodInfo
    ResolveBinMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveBinMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveBinMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
    ResolveBinMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveBinMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveBinMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveBinMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
    ResolveBinMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
    ResolveBinMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
    ResolveBinMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
    ResolveBinMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveBinMethod "queueComputeExpand" o = Gtk.Widget.WidgetQueueComputeExpandMethodInfo
    ResolveBinMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveBinMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveBinMethod "queueResizeNoRedraw" o = Gtk.Widget.WidgetQueueResizeNoRedrawMethodInfo
    ResolveBinMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveBinMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveBinMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveBinMethod "registerSurface" o = Gtk.Widget.WidgetRegisterSurfaceMethodInfo
    ResolveBinMethod "remove" o = Gtk.Container.ContainerRemoveMethodInfo
    ResolveBinMethod "removeAccelerator" o = Gtk.Widget.WidgetRemoveAcceleratorMethodInfo
    ResolveBinMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
    ResolveBinMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveBinMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveBinMethod "resetStyle" o = Gtk.Widget.WidgetResetStyleMethodInfo
    ResolveBinMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveBinMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveBinMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveBinMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
    ResolveBinMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveBinMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveBinMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveBinMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveBinMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveBinMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveBinMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveBinMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveBinMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveBinMethod "unregisterSurface" o = Gtk.Widget.WidgetUnregisterSurfaceMethodInfo
    ResolveBinMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveBinMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveBinMethod "getAccessible" o = Gtk.Widget.WidgetGetAccessibleMethodInfo
    ResolveBinMethod "getActionGroup" o = Gtk.Widget.WidgetGetActionGroupMethodInfo
    ResolveBinMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveBinMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveBinMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveBinMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveBinMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveBinMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveBinMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
    ResolveBinMethod "getChild" o = BinGetChildMethodInfo
    ResolveBinMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveBinMethod "getChildren" o = Gtk.Container.ContainerGetChildrenMethodInfo
    ResolveBinMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveBinMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
    ResolveBinMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveBinMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveBinMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveBinMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
    ResolveBinMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
    ResolveBinMethod "getFocusHadjustment" o = Gtk.Container.ContainerGetFocusHadjustmentMethodInfo
    ResolveBinMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveBinMethod "getFocusVadjustment" o = Gtk.Container.ContainerGetFocusVadjustmentMethodInfo
    ResolveBinMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveBinMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveBinMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveBinMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveBinMethod "getHasSurface" o = Gtk.Widget.WidgetGetHasSurfaceMethodInfo
    ResolveBinMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveBinMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
    ResolveBinMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveBinMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveBinMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
    ResolveBinMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
    ResolveBinMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
    ResolveBinMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveBinMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveBinMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveBinMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveBinMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveBinMethod "getModifierMask" o = Gtk.Widget.WidgetGetModifierMaskMethodInfo
    ResolveBinMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveBinMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
    ResolveBinMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveBinMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
    ResolveBinMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveBinMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveBinMethod "getPath" o = Gtk.Widget.WidgetGetPathMethodInfo
    ResolveBinMethod "getPathForChild" o = Gtk.Container.ContainerGetPathForChildMethodInfo
    ResolveBinMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveBinMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
    ResolveBinMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
    ResolveBinMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveBinMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveBinMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveBinMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveBinMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveBinMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
    ResolveBinMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveBinMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveBinMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
    ResolveBinMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveBinMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveBinMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveBinMethod "getSupportMultidevice" o = Gtk.Widget.WidgetGetSupportMultideviceMethodInfo
    ResolveBinMethod "getSurface" o = Gtk.Widget.WidgetGetSurfaceMethodInfo
    ResolveBinMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveBinMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveBinMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveBinMethod "getTooltipWindow" o = Gtk.Widget.WidgetGetTooltipWindowMethodInfo
    ResolveBinMethod "getToplevel" o = Gtk.Widget.WidgetGetToplevelMethodInfo
    ResolveBinMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveBinMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveBinMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveBinMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveBinMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
    ResolveBinMethod "setAccelPath" o = Gtk.Widget.WidgetSetAccelPathMethodInfo
    ResolveBinMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
    ResolveBinMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveBinMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
    ResolveBinMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveBinMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
    ResolveBinMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
    ResolveBinMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveBinMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveBinMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveBinMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
    ResolveBinMethod "setFocusHadjustment" o = Gtk.Container.ContainerSetFocusHadjustmentMethodInfo
    ResolveBinMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveBinMethod "setFocusVadjustment" o = Gtk.Container.ContainerSetFocusVadjustmentMethodInfo
    ResolveBinMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveBinMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveBinMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveBinMethod "setHasSurface" o = Gtk.Widget.WidgetSetHasSurfaceMethodInfo
    ResolveBinMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveBinMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveBinMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveBinMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
    ResolveBinMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveBinMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveBinMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveBinMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveBinMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveBinMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveBinMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
    ResolveBinMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveBinMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveBinMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveBinMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveBinMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveBinMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveBinMethod "setSupportMultidevice" o = Gtk.Widget.WidgetSetSupportMultideviceMethodInfo
    ResolveBinMethod "setSurface" o = Gtk.Widget.WidgetSetSurfaceMethodInfo
    ResolveBinMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveBinMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveBinMethod "setTooltipWindow" o = Gtk.Widget.WidgetSetTooltipWindowMethodInfo
    ResolveBinMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveBinMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveBinMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveBinMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveBinMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveBinMethod t Bin, O.MethodInfo info Bin p) => OL.IsLabel t (Bin -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Bin
type instance O.AttributeList Bin = BinAttributeList
type BinAttributeList = ('[ '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("expand", Gtk.Widget.WidgetExpandPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("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), '("isFocus", Gtk.Widget.WidgetIsFocusPropertyInfo), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("margin", Gtk.Widget.WidgetMarginPropertyInfo), '("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), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("surface", Gtk.Widget.WidgetSurfacePropertyInfo), '("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, *)])
#endif

#if defined(ENABLE_OVERLOADING)
#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Bin = BinSignalList
type BinSignalList = ('[ '("accelClosuresChanged", Gtk.Widget.WidgetAccelClosuresChangedSignalInfo), '("add", Gtk.Container.ContainerAddSignalInfo), '("canActivateAccel", Gtk.Widget.WidgetCanActivateAccelSignalInfo), '("destroy", Gtk.Widget.WidgetDestroySignalInfo), '("directionChanged", Gtk.Widget.WidgetDirectionChangedSignalInfo), '("dragBegin", Gtk.Widget.WidgetDragBeginSignalInfo), '("dragDataDelete", Gtk.Widget.WidgetDragDataDeleteSignalInfo), '("dragDataGet", Gtk.Widget.WidgetDragDataGetSignalInfo), '("dragDataReceived", Gtk.Widget.WidgetDragDataReceivedSignalInfo), '("dragDrop", Gtk.Widget.WidgetDragDropSignalInfo), '("dragEnd", Gtk.Widget.WidgetDragEndSignalInfo), '("dragFailed", Gtk.Widget.WidgetDragFailedSignalInfo), '("dragLeave", Gtk.Widget.WidgetDragLeaveSignalInfo), '("dragMotion", Gtk.Widget.WidgetDragMotionSignalInfo), '("grabNotify", Gtk.Widget.WidgetGrabNotifySignalInfo), '("hide", Gtk.Widget.WidgetHideSignalInfo), '("keynavFailed", Gtk.Widget.WidgetKeynavFailedSignalInfo), '("map", Gtk.Widget.WidgetMapSignalInfo), '("mnemonicActivate", Gtk.Widget.WidgetMnemonicActivateSignalInfo), '("moveFocus", Gtk.Widget.WidgetMoveFocusSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("popupMenu", Gtk.Widget.WidgetPopupMenuSignalInfo), '("queryTooltip", Gtk.Widget.WidgetQueryTooltipSignalInfo), '("realize", Gtk.Widget.WidgetRealizeSignalInfo), '("remove", Gtk.Container.ContainerRemoveSignalInfo), '("show", Gtk.Widget.WidgetShowSignalInfo), '("sizeAllocate", Gtk.Widget.WidgetSizeAllocateSignalInfo), '("stateFlagsChanged", Gtk.Widget.WidgetStateFlagsChangedSignalInfo), '("styleUpdated", Gtk.Widget.WidgetStyleUpdatedSignalInfo), '("unmap", Gtk.Widget.WidgetUnmapSignalInfo), '("unrealize", Gtk.Widget.WidgetUnrealizeSignalInfo)] :: [(Symbol, *)])

#endif

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

foreign import ccall "gtk_bin_get_child" gtk_bin_get_child :: 
    Ptr Bin ->                              -- bin : TInterface (Name {namespace = "Gtk", name = "Bin"})
    IO (Ptr Gtk.Widget.Widget)

-- | Gets the child of the t'GI.Gtk.Objects.Bin.Bin', or 'P.Nothing' if the bin contains
-- no child widget. The returned widget does not have a reference
-- added, so you do not need to unref it.
binGetChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsBin a) =>
    a
    -- ^ /@bin@/: a t'GI.Gtk.Objects.Bin.Bin'
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the child of /@bin@/, or 'P.Nothing' if it does
    -- not have a child.
binGetChild :: a -> m (Maybe Widget)
binGetChild bin :: a
bin = IO (Maybe Widget) -> m (Maybe Widget)
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 Bin
bin' <- a -> IO (Ptr Bin)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bin
    Ptr Widget
result <- Ptr Bin -> IO (Ptr Widget)
gtk_bin_get_child Ptr Bin
bin'
    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
$ \result' :: 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 (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bin
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data BinGetChildMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsBin a) => O.MethodInfo BinGetChildMethodInfo a signature where
    overloadedMethod = binGetChild

#endif