{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A view container for [class/@viewSwitcher@/].
-- 
-- @AdwViewStack@ is a container which only shows one page at a time.
-- It is typically used to hold an application\'s main views.
-- 
-- It doesn\'t provide a way to transition between pages.
-- Instead, a separate widget such as [class/@viewSwitcher@/] can be used with
-- @AdwViewStack@ to provide this functionality.
-- 
-- @AdwViewStack@ pages can have a title, an icon, an attention request, and a
-- numbered badge that [class/@viewSwitcher@/] will use to let users identify which
-- page is which. Set them using the [property/@viewStackPage@/:title],
-- [property/@viewStackPage@/:icon-name],
-- [property/@viewStackPage@/:needs-attention], and
-- [property/@viewStackPage@/:badge-number] properties.
-- 
-- Unlike t'GI.Gtk.Objects.Stack.Stack', transitions between views are not animated.
-- 
-- @AdwViewStack@ maintains a [class/@viewStackPage@/] object for each added child,
-- which holds additional per-child properties. You obtain the
-- [class/@viewStackPage@/] for a child with [method/@viewStack@/.get_page] and you
-- can obtain a t'GI.Gtk.Interfaces.SelectionModel.SelectionModel' containing all the pages with
-- [method/@viewStack@/.get_pages].
-- 
-- == AdwViewStack as GtkBuildable
-- 
-- To set child-specific properties in a .ui file, create
-- [class/@viewStackPage@/] objects explicitly, and set the child widget as a
-- property on it:
-- 
-- 
-- === /xml code/
-- >  <object class="AdwViewStack" id="stack">
-- >    <child>
-- >      <object class="AdwViewStackPage">
-- >        <property name="name">overview</property>
-- >        <property name="title">Overview</property>
-- >        <property name="child">
-- >          <object class="AdwStatusPage">
-- >            <property name="title">Welcome!</property>
-- >          </object>
-- >        </property>
-- >      </object>
-- >    </child>
-- >  </object>
-- 
-- 
-- == CSS nodes
-- 
-- @AdwViewStack@ has a single CSS node named @stack@.
-- 
-- /Since: 1.0/

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

module GI.Adw.Objects.ViewStack
    ( 

-- * Exported types
    ViewStack(..)                           ,
    IsViewStack                             ,
    toViewStack                             ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [actionSetEnabled]("GI.Gtk.Objects.Widget#g:method:actionSetEnabled"), [activate]("GI.Gtk.Objects.Widget#g:method:activate"), [activateAction]("GI.Gtk.Objects.Widget#g:method:activateAction"), [activateDefault]("GI.Gtk.Objects.Widget#g:method:activateDefault"), [add]("GI.Adw.Objects.ViewStack#g:method:add"), [addController]("GI.Gtk.Objects.Widget#g:method:addController"), [addCssClass]("GI.Gtk.Objects.Widget#g:method:addCssClass"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addNamed]("GI.Adw.Objects.ViewStack#g:method:addNamed"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [addTitled]("GI.Adw.Objects.ViewStack#g:method:addTitled"), [addTitledWithIcon]("GI.Adw.Objects.ViewStack#g:method:addTitledWithIcon"), [allocate]("GI.Gtk.Objects.Widget#g:method:allocate"), [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [childFocus]("GI.Gtk.Objects.Widget#g:method:childFocus"), [computeBounds]("GI.Gtk.Objects.Widget#g:method:computeBounds"), [computeExpand]("GI.Gtk.Objects.Widget#g:method:computeExpand"), [computePoint]("GI.Gtk.Objects.Widget#g:method:computePoint"), [computeTransform]("GI.Gtk.Objects.Widget#g:method:computeTransform"), [contains]("GI.Gtk.Objects.Widget#g:method:contains"), [createPangoContext]("GI.Gtk.Objects.Widget#g:method:createPangoContext"), [createPangoLayout]("GI.Gtk.Objects.Widget#g:method:createPangoLayout"), [disposeTemplate]("GI.Gtk.Objects.Widget#g:method:disposeTemplate"), [dragCheckThreshold]("GI.Gtk.Objects.Widget#g:method:dragCheckThreshold"), [errorBell]("GI.Gtk.Objects.Widget#g:method:errorBell"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [grabFocus]("GI.Gtk.Objects.Widget#g:method:grabFocus"), [hasCssClass]("GI.Gtk.Objects.Widget#g:method:hasCssClass"), [hasDefault]("GI.Gtk.Objects.Widget#g:method:hasDefault"), [hasFocus]("GI.Gtk.Objects.Widget#g:method:hasFocus"), [hasVisibleFocus]("GI.Gtk.Objects.Widget#g:method:hasVisibleFocus"), [hide]("GI.Gtk.Objects.Widget#g:method:hide"), [inDestruction]("GI.Gtk.Objects.Widget#g:method:inDestruction"), [initTemplate]("GI.Gtk.Objects.Widget#g:method:initTemplate"), [insertActionGroup]("GI.Gtk.Objects.Widget#g:method:insertActionGroup"), [insertAfter]("GI.Gtk.Objects.Widget#g:method:insertAfter"), [insertBefore]("GI.Gtk.Objects.Widget#g:method:insertBefore"), [isAncestor]("GI.Gtk.Objects.Widget#g:method:isAncestor"), [isDrawable]("GI.Gtk.Objects.Widget#g:method:isDrawable"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isFocus]("GI.Gtk.Objects.Widget#g:method:isFocus"), [isSensitive]("GI.Gtk.Objects.Widget#g:method:isSensitive"), [isVisible]("GI.Gtk.Objects.Widget#g:method:isVisible"), [keynavFailed]("GI.Gtk.Objects.Widget#g:method:keynavFailed"), [listMnemonicLabels]("GI.Gtk.Objects.Widget#g:method:listMnemonicLabels"), [map]("GI.Gtk.Objects.Widget#g:method:map"), [measure]("GI.Gtk.Objects.Widget#g:method:measure"), [mnemonicActivate]("GI.Gtk.Objects.Widget#g:method:mnemonicActivate"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [observeChildren]("GI.Gtk.Objects.Widget#g:method:observeChildren"), [observeControllers]("GI.Gtk.Objects.Widget#g:method:observeControllers"), [pick]("GI.Gtk.Objects.Widget#g:method:pick"), [queueAllocate]("GI.Gtk.Objects.Widget#g:method:queueAllocate"), [queueDraw]("GI.Gtk.Objects.Widget#g:method:queueDraw"), [queueResize]("GI.Gtk.Objects.Widget#g:method:queueResize"), [realize]("GI.Gtk.Objects.Widget#g:method:realize"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [remove]("GI.Adw.Objects.ViewStack#g:method:remove"), [removeController]("GI.Gtk.Objects.Widget#g:method:removeController"), [removeCssClass]("GI.Gtk.Objects.Widget#g:method:removeCssClass"), [removeMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:removeMnemonicLabel"), [removeTickCallback]("GI.Gtk.Objects.Widget#g:method:removeTickCallback"), [resetProperty]("GI.Gtk.Interfaces.Accessible#g:method:resetProperty"), [resetRelation]("GI.Gtk.Interfaces.Accessible#g:method:resetRelation"), [resetState]("GI.Gtk.Interfaces.Accessible#g:method:resetState"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [shouldLayout]("GI.Gtk.Objects.Widget#g:method:shouldLayout"), [show]("GI.Gtk.Objects.Widget#g:method:show"), [sizeAllocate]("GI.Gtk.Objects.Widget#g:method:sizeAllocate"), [snapshotChild]("GI.Gtk.Objects.Widget#g:method:snapshotChild"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [translateCoordinates]("GI.Gtk.Objects.Widget#g:method:translateCoordinates"), [triggerTooltipQuery]("GI.Gtk.Objects.Widget#g:method:triggerTooltipQuery"), [unmap]("GI.Gtk.Objects.Widget#g:method:unmap"), [unparent]("GI.Gtk.Objects.Widget#g:method:unparent"), [unrealize]("GI.Gtk.Objects.Widget#g:method:unrealize"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [unsetStateFlags]("GI.Gtk.Objects.Widget#g:method:unsetStateFlags"), [updateProperty]("GI.Gtk.Interfaces.Accessible#g:method:updateProperty"), [updateRelation]("GI.Gtk.Interfaces.Accessible#g:method:updateRelation"), [updateState]("GI.Gtk.Interfaces.Accessible#g:method:updateState"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getAccessibleRole]("GI.Gtk.Interfaces.Accessible#g:method:getAccessibleRole"), [getAllocatedBaseline]("GI.Gtk.Objects.Widget#g:method:getAllocatedBaseline"), [getAllocatedHeight]("GI.Gtk.Objects.Widget#g:method:getAllocatedHeight"), [getAllocatedWidth]("GI.Gtk.Objects.Widget#g:method:getAllocatedWidth"), [getAllocation]("GI.Gtk.Objects.Widget#g:method:getAllocation"), [getAncestor]("GI.Gtk.Objects.Widget#g:method:getAncestor"), [getBuildableId]("GI.Gtk.Interfaces.Buildable#g:method:getBuildableId"), [getCanFocus]("GI.Gtk.Objects.Widget#g:method:getCanFocus"), [getCanTarget]("GI.Gtk.Objects.Widget#g:method:getCanTarget"), [getChildByName]("GI.Adw.Objects.ViewStack#g:method:getChildByName"), [getChildVisible]("GI.Gtk.Objects.Widget#g:method:getChildVisible"), [getClipboard]("GI.Gtk.Objects.Widget#g:method:getClipboard"), [getCssClasses]("GI.Gtk.Objects.Widget#g:method:getCssClasses"), [getCssName]("GI.Gtk.Objects.Widget#g:method:getCssName"), [getCursor]("GI.Gtk.Objects.Widget#g:method:getCursor"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDirection]("GI.Gtk.Objects.Widget#g:method:getDirection"), [getDisplay]("GI.Gtk.Objects.Widget#g:method:getDisplay"), [getFirstChild]("GI.Gtk.Objects.Widget#g:method:getFirstChild"), [getFocusChild]("GI.Gtk.Objects.Widget#g:method:getFocusChild"), [getFocusOnClick]("GI.Gtk.Objects.Widget#g:method:getFocusOnClick"), [getFocusable]("GI.Gtk.Objects.Widget#g:method:getFocusable"), [getFontMap]("GI.Gtk.Objects.Widget#g:method:getFontMap"), [getFontOptions]("GI.Gtk.Objects.Widget#g:method:getFontOptions"), [getFrameClock]("GI.Gtk.Objects.Widget#g:method:getFrameClock"), [getHalign]("GI.Gtk.Objects.Widget#g:method:getHalign"), [getHasTooltip]("GI.Gtk.Objects.Widget#g:method:getHasTooltip"), [getHeight]("GI.Gtk.Objects.Widget#g:method:getHeight"), [getHexpand]("GI.Gtk.Objects.Widget#g:method:getHexpand"), [getHexpandSet]("GI.Gtk.Objects.Widget#g:method:getHexpandSet"), [getHhomogeneous]("GI.Adw.Objects.ViewStack#g:method:getHhomogeneous"), [getLastChild]("GI.Gtk.Objects.Widget#g:method:getLastChild"), [getLayoutManager]("GI.Gtk.Objects.Widget#g:method:getLayoutManager"), [getMapped]("GI.Gtk.Objects.Widget#g:method:getMapped"), [getMarginBottom]("GI.Gtk.Objects.Widget#g:method:getMarginBottom"), [getMarginEnd]("GI.Gtk.Objects.Widget#g:method:getMarginEnd"), [getMarginStart]("GI.Gtk.Objects.Widget#g:method:getMarginStart"), [getMarginTop]("GI.Gtk.Objects.Widget#g:method:getMarginTop"), [getName]("GI.Gtk.Objects.Widget#g:method:getName"), [getNative]("GI.Gtk.Objects.Widget#g:method:getNative"), [getNextSibling]("GI.Gtk.Objects.Widget#g:method:getNextSibling"), [getOpacity]("GI.Gtk.Objects.Widget#g:method:getOpacity"), [getOverflow]("GI.Gtk.Objects.Widget#g:method:getOverflow"), [getPage]("GI.Adw.Objects.ViewStack#g:method:getPage"), [getPages]("GI.Adw.Objects.ViewStack#g:method:getPages"), [getPangoContext]("GI.Gtk.Objects.Widget#g:method:getPangoContext"), [getParent]("GI.Gtk.Objects.Widget#g:method:getParent"), [getPreferredSize]("GI.Gtk.Objects.Widget#g:method:getPreferredSize"), [getPrevSibling]("GI.Gtk.Objects.Widget#g:method:getPrevSibling"), [getPrimaryClipboard]("GI.Gtk.Objects.Widget#g:method:getPrimaryClipboard"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRealized]("GI.Gtk.Objects.Widget#g:method:getRealized"), [getReceivesDefault]("GI.Gtk.Objects.Widget#g:method:getReceivesDefault"), [getRequestMode]("GI.Gtk.Objects.Widget#g:method:getRequestMode"), [getRoot]("GI.Gtk.Objects.Widget#g:method:getRoot"), [getScaleFactor]("GI.Gtk.Objects.Widget#g:method:getScaleFactor"), [getSensitive]("GI.Gtk.Objects.Widget#g:method:getSensitive"), [getSettings]("GI.Gtk.Objects.Widget#g:method:getSettings"), [getSize]("GI.Gtk.Objects.Widget#g:method:getSize"), [getSizeRequest]("GI.Gtk.Objects.Widget#g:method:getSizeRequest"), [getStateFlags]("GI.Gtk.Objects.Widget#g:method:getStateFlags"), [getStyleContext]("GI.Gtk.Objects.Widget#g:method:getStyleContext"), [getTemplateChild]("GI.Gtk.Objects.Widget#g:method:getTemplateChild"), [getTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:getTooltipMarkup"), [getTooltipText]("GI.Gtk.Objects.Widget#g:method:getTooltipText"), [getValign]("GI.Gtk.Objects.Widget#g:method:getValign"), [getVexpand]("GI.Gtk.Objects.Widget#g:method:getVexpand"), [getVexpandSet]("GI.Gtk.Objects.Widget#g:method:getVexpandSet"), [getVhomogeneous]("GI.Adw.Objects.ViewStack#g:method:getVhomogeneous"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [getVisibleChild]("GI.Adw.Objects.ViewStack#g:method:getVisibleChild"), [getVisibleChildName]("GI.Adw.Objects.ViewStack#g:method:getVisibleChildName"), [getWidth]("GI.Gtk.Objects.Widget#g:method:getWidth").
-- 
-- ==== Setters
-- [setCanFocus]("GI.Gtk.Objects.Widget#g:method:setCanFocus"), [setCanTarget]("GI.Gtk.Objects.Widget#g:method:setCanTarget"), [setChildVisible]("GI.Gtk.Objects.Widget#g:method:setChildVisible"), [setCssClasses]("GI.Gtk.Objects.Widget#g:method:setCssClasses"), [setCursor]("GI.Gtk.Objects.Widget#g:method:setCursor"), [setCursorFromName]("GI.Gtk.Objects.Widget#g:method:setCursorFromName"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setDirection]("GI.Gtk.Objects.Widget#g:method:setDirection"), [setFocusChild]("GI.Gtk.Objects.Widget#g:method:setFocusChild"), [setFocusOnClick]("GI.Gtk.Objects.Widget#g:method:setFocusOnClick"), [setFocusable]("GI.Gtk.Objects.Widget#g:method:setFocusable"), [setFontMap]("GI.Gtk.Objects.Widget#g:method:setFontMap"), [setFontOptions]("GI.Gtk.Objects.Widget#g:method:setFontOptions"), [setHalign]("GI.Gtk.Objects.Widget#g:method:setHalign"), [setHasTooltip]("GI.Gtk.Objects.Widget#g:method:setHasTooltip"), [setHexpand]("GI.Gtk.Objects.Widget#g:method:setHexpand"), [setHexpandSet]("GI.Gtk.Objects.Widget#g:method:setHexpandSet"), [setHhomogeneous]("GI.Adw.Objects.ViewStack#g:method:setHhomogeneous"), [setLayoutManager]("GI.Gtk.Objects.Widget#g:method:setLayoutManager"), [setMarginBottom]("GI.Gtk.Objects.Widget#g:method:setMarginBottom"), [setMarginEnd]("GI.Gtk.Objects.Widget#g:method:setMarginEnd"), [setMarginStart]("GI.Gtk.Objects.Widget#g:method:setMarginStart"), [setMarginTop]("GI.Gtk.Objects.Widget#g:method:setMarginTop"), [setName]("GI.Gtk.Objects.Widget#g:method:setName"), [setOpacity]("GI.Gtk.Objects.Widget#g:method:setOpacity"), [setOverflow]("GI.Gtk.Objects.Widget#g:method:setOverflow"), [setParent]("GI.Gtk.Objects.Widget#g:method:setParent"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty"), [setReceivesDefault]("GI.Gtk.Objects.Widget#g:method:setReceivesDefault"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setTooltipMarkup]("GI.Gtk.Objects.Widget#g:method:setTooltipMarkup"), [setTooltipText]("GI.Gtk.Objects.Widget#g:method:setTooltipText"), [setValign]("GI.Gtk.Objects.Widget#g:method:setValign"), [setVexpand]("GI.Gtk.Objects.Widget#g:method:setVexpand"), [setVexpandSet]("GI.Gtk.Objects.Widget#g:method:setVexpandSet"), [setVhomogeneous]("GI.Adw.Objects.ViewStack#g:method:setVhomogeneous"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible"), [setVisibleChild]("GI.Adw.Objects.ViewStack#g:method:setVisibleChild"), [setVisibleChildName]("GI.Adw.Objects.ViewStack#g:method:setVisibleChildName").

#if defined(ENABLE_OVERLOADING)
    ResolveViewStackMethod                  ,
#endif

-- ** add #method:add#

#if defined(ENABLE_OVERLOADING)
    ViewStackAddMethodInfo                  ,
#endif
    viewStackAdd                            ,


-- ** addNamed #method:addNamed#

#if defined(ENABLE_OVERLOADING)
    ViewStackAddNamedMethodInfo             ,
#endif
    viewStackAddNamed                       ,


-- ** addTitled #method:addTitled#

#if defined(ENABLE_OVERLOADING)
    ViewStackAddTitledMethodInfo            ,
#endif
    viewStackAddTitled                      ,


-- ** addTitledWithIcon #method:addTitledWithIcon#

#if defined(ENABLE_OVERLOADING)
    ViewStackAddTitledWithIconMethodInfo    ,
#endif
    viewStackAddTitledWithIcon              ,


-- ** getChildByName #method:getChildByName#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetChildByNameMethodInfo       ,
#endif
    viewStackGetChildByName                 ,


-- ** getHhomogeneous #method:getHhomogeneous#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetHhomogeneousMethodInfo      ,
#endif
    viewStackGetHhomogeneous                ,


-- ** getPage #method:getPage#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetPageMethodInfo              ,
#endif
    viewStackGetPage                        ,


-- ** getPages #method:getPages#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetPagesMethodInfo             ,
#endif
    viewStackGetPages                       ,


-- ** getVhomogeneous #method:getVhomogeneous#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetVhomogeneousMethodInfo      ,
#endif
    viewStackGetVhomogeneous                ,


-- ** getVisibleChild #method:getVisibleChild#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetVisibleChildMethodInfo      ,
#endif
    viewStackGetVisibleChild                ,


-- ** getVisibleChildName #method:getVisibleChildName#

#if defined(ENABLE_OVERLOADING)
    ViewStackGetVisibleChildNameMethodInfo  ,
#endif
    viewStackGetVisibleChildName            ,


-- ** new #method:new#

    viewStackNew                            ,


-- ** remove #method:remove#

#if defined(ENABLE_OVERLOADING)
    ViewStackRemoveMethodInfo               ,
#endif
    viewStackRemove                         ,


-- ** setHhomogeneous #method:setHhomogeneous#

#if defined(ENABLE_OVERLOADING)
    ViewStackSetHhomogeneousMethodInfo      ,
#endif
    viewStackSetHhomogeneous                ,


-- ** setVhomogeneous #method:setVhomogeneous#

#if defined(ENABLE_OVERLOADING)
    ViewStackSetVhomogeneousMethodInfo      ,
#endif
    viewStackSetVhomogeneous                ,


-- ** setVisibleChild #method:setVisibleChild#

#if defined(ENABLE_OVERLOADING)
    ViewStackSetVisibleChildMethodInfo      ,
#endif
    viewStackSetVisibleChild                ,


-- ** setVisibleChildName #method:setVisibleChildName#

#if defined(ENABLE_OVERLOADING)
    ViewStackSetVisibleChildNameMethodInfo  ,
#endif
    viewStackSetVisibleChildName            ,




 -- * Properties


-- ** hhomogeneous #attr:hhomogeneous#
-- | Whether the stack is horizontally homogeneous.
-- 
-- If the stack is horizontally homogeneous, it allocates the same width for
-- all children.
-- 
-- If it\'s @FALSE@, the stack may change width when a different child becomes
-- visible.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewStackHhomogeneousPropertyInfo       ,
#endif
    constructViewStackHhomogeneous          ,
    getViewStackHhomogeneous                ,
    setViewStackHhomogeneous                ,
#if defined(ENABLE_OVERLOADING)
    viewStackHhomogeneous                   ,
#endif


-- ** pages #attr:pages#
-- | A selection model with the stack\'s pages.
-- 
-- This can be used to keep an up-to-date view. The model also implements
-- t'GI.Gtk.Interfaces.SelectionModel.SelectionModel' and can be used to track and change the visible
-- page.

#if defined(ENABLE_OVERLOADING)
    ViewStackPagesPropertyInfo              ,
#endif
    getViewStackPages                       ,
#if defined(ENABLE_OVERLOADING)
    viewStackPages                          ,
#endif


-- ** vhomogeneous #attr:vhomogeneous#
-- | Whether the stack is vertically homogeneous.
-- 
-- If the stack is vertically homogeneous, it allocates the same height for
-- all children.
-- 
-- If it\'s @FALSE@, the stack may change height when a different child becomes
-- visible.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewStackVhomogeneousPropertyInfo       ,
#endif
    constructViewStackVhomogeneous          ,
    getViewStackVhomogeneous                ,
    setViewStackVhomogeneous                ,
#if defined(ENABLE_OVERLOADING)
    viewStackVhomogeneous                   ,
#endif


-- ** visibleChild #attr:visibleChild#
-- | The widget currently visible in the stack.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewStackVisibleChildPropertyInfo       ,
#endif
    constructViewStackVisibleChild          ,
    getViewStackVisibleChild                ,
    setViewStackVisibleChild                ,
#if defined(ENABLE_OVERLOADING)
    viewStackVisibleChild                   ,
#endif


-- ** visibleChildName #attr:visibleChildName#
-- | The name of the widget currently visible in the stack.
-- 
-- See [property/@viewStack@/:visible-child].
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewStackVisibleChildNamePropertyInfo   ,
#endif
    constructViewStackVisibleChildName      ,
    getViewStackVisibleChildName            ,
    setViewStackVisibleChildName            ,
#if defined(ENABLE_OVERLOADING)
    viewStackVisibleChildName               ,
#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.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 {-# SOURCE #-} qualified GI.Adw.Objects.ViewStackPage as Adw.ViewStackPage
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import qualified GI.Gtk.Interfaces.SelectionModel as Gtk.SelectionModel
import qualified GI.Gtk.Objects.Widget as Gtk.Widget

-- | Memory-managed wrapper type.
newtype ViewStack = ViewStack (SP.ManagedPtr ViewStack)
    deriving (ViewStack -> ViewStack -> Bool
(ViewStack -> ViewStack -> Bool)
-> (ViewStack -> ViewStack -> Bool) -> Eq ViewStack
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: ViewStack -> ViewStack -> Bool
== :: ViewStack -> ViewStack -> Bool
$c/= :: ViewStack -> ViewStack -> Bool
/= :: ViewStack -> ViewStack -> Bool
Eq)

instance SP.ManagedPtrNewtype ViewStack where
    toManagedPtr :: ViewStack -> ManagedPtr ViewStack
toManagedPtr (ViewStack ManagedPtr ViewStack
p) = ManagedPtr ViewStack
p

foreign import ccall "adw_view_stack_get_type"
    c_adw_view_stack_get_type :: IO B.Types.GType

instance B.Types.TypedObject ViewStack where
    glibType :: IO GType
glibType = IO GType
c_adw_view_stack_get_type

instance B.Types.GObject ViewStack

-- | Type class for types which can be safely cast to `ViewStack`, for instance with `toViewStack`.
class (SP.GObject o, O.IsDescendantOf ViewStack o) => IsViewStack o
instance (SP.GObject o, O.IsDescendantOf ViewStack o) => IsViewStack o

instance O.HasParentTypes ViewStack
type instance O.ParentTypes ViewStack = '[Gtk.Widget.Widget, GObject.Object.Object, Gtk.Accessible.Accessible, Gtk.Buildable.Buildable, Gtk.ConstraintTarget.ConstraintTarget]

-- | Cast to `ViewStack`, for types for which this is known to be safe. For general casts, use `Data.GI.Base.ManagedPtr.castTo`.
toViewStack :: (MIO.MonadIO m, IsViewStack o) => o -> m ViewStack
toViewStack :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> m ViewStack
toViewStack = IO ViewStack -> m ViewStack
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ViewStack -> m ViewStack)
-> (o -> IO ViewStack) -> o -> m ViewStack
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ViewStack -> ViewStack) -> o -> IO ViewStack
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr ViewStack -> ViewStack
ViewStack

-- | Convert 'ViewStack' to and from 'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe ViewStack) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_view_stack_get_type
    gvalueSet_ :: Ptr GValue -> Maybe ViewStack -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ViewStack
P.Nothing = Ptr GValue -> Ptr ViewStack -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ViewStack
forall a. Ptr a
FP.nullPtr :: FP.Ptr ViewStack)
    gvalueSet_ Ptr GValue
gv (P.Just ViewStack
obj) = ViewStack -> (Ptr ViewStack -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ViewStack
obj (Ptr GValue -> Ptr ViewStack -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe ViewStack)
gvalueGet_ Ptr GValue
gv = do
        Ptr ViewStack
ptr <- Ptr GValue -> IO (Ptr ViewStack)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ViewStack)
        if Ptr ViewStack
ptr Ptr ViewStack -> Ptr ViewStack -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ViewStack
forall a. Ptr a
FP.nullPtr
        then ViewStack -> Maybe ViewStack
forall a. a -> Maybe a
P.Just (ViewStack -> Maybe ViewStack)
-> IO ViewStack -> IO (Maybe ViewStack)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ViewStack -> ViewStack)
-> Ptr ViewStack -> IO ViewStack
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ViewStack -> ViewStack
ViewStack Ptr ViewStack
ptr
        else Maybe ViewStack -> IO (Maybe ViewStack)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ViewStack
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveViewStackMethod (t :: Symbol) (o :: *) :: * where
    ResolveViewStackMethod "actionSetEnabled" o = Gtk.Widget.WidgetActionSetEnabledMethodInfo
    ResolveViewStackMethod "activate" o = Gtk.Widget.WidgetActivateMethodInfo
    ResolveViewStackMethod "activateAction" o = Gtk.Widget.WidgetActivateActionMethodInfo
    ResolveViewStackMethod "activateDefault" o = Gtk.Widget.WidgetActivateDefaultMethodInfo
    ResolveViewStackMethod "add" o = ViewStackAddMethodInfo
    ResolveViewStackMethod "addController" o = Gtk.Widget.WidgetAddControllerMethodInfo
    ResolveViewStackMethod "addCssClass" o = Gtk.Widget.WidgetAddCssClassMethodInfo
    ResolveViewStackMethod "addMnemonicLabel" o = Gtk.Widget.WidgetAddMnemonicLabelMethodInfo
    ResolveViewStackMethod "addNamed" o = ViewStackAddNamedMethodInfo
    ResolveViewStackMethod "addTickCallback" o = Gtk.Widget.WidgetAddTickCallbackMethodInfo
    ResolveViewStackMethod "addTitled" o = ViewStackAddTitledMethodInfo
    ResolveViewStackMethod "addTitledWithIcon" o = ViewStackAddTitledWithIconMethodInfo
    ResolveViewStackMethod "allocate" o = Gtk.Widget.WidgetAllocateMethodInfo
    ResolveViewStackMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveViewStackMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveViewStackMethod "childFocus" o = Gtk.Widget.WidgetChildFocusMethodInfo
    ResolveViewStackMethod "computeBounds" o = Gtk.Widget.WidgetComputeBoundsMethodInfo
    ResolveViewStackMethod "computeExpand" o = Gtk.Widget.WidgetComputeExpandMethodInfo
    ResolveViewStackMethod "computePoint" o = Gtk.Widget.WidgetComputePointMethodInfo
    ResolveViewStackMethod "computeTransform" o = Gtk.Widget.WidgetComputeTransformMethodInfo
    ResolveViewStackMethod "contains" o = Gtk.Widget.WidgetContainsMethodInfo
    ResolveViewStackMethod "createPangoContext" o = Gtk.Widget.WidgetCreatePangoContextMethodInfo
    ResolveViewStackMethod "createPangoLayout" o = Gtk.Widget.WidgetCreatePangoLayoutMethodInfo
    ResolveViewStackMethod "disposeTemplate" o = Gtk.Widget.WidgetDisposeTemplateMethodInfo
    ResolveViewStackMethod "dragCheckThreshold" o = Gtk.Widget.WidgetDragCheckThresholdMethodInfo
    ResolveViewStackMethod "errorBell" o = Gtk.Widget.WidgetErrorBellMethodInfo
    ResolveViewStackMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveViewStackMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveViewStackMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveViewStackMethod "grabFocus" o = Gtk.Widget.WidgetGrabFocusMethodInfo
    ResolveViewStackMethod "hasCssClass" o = Gtk.Widget.WidgetHasCssClassMethodInfo
    ResolveViewStackMethod "hasDefault" o = Gtk.Widget.WidgetHasDefaultMethodInfo
    ResolveViewStackMethod "hasFocus" o = Gtk.Widget.WidgetHasFocusMethodInfo
    ResolveViewStackMethod "hasVisibleFocus" o = Gtk.Widget.WidgetHasVisibleFocusMethodInfo
    ResolveViewStackMethod "hide" o = Gtk.Widget.WidgetHideMethodInfo
    ResolveViewStackMethod "inDestruction" o = Gtk.Widget.WidgetInDestructionMethodInfo
    ResolveViewStackMethod "initTemplate" o = Gtk.Widget.WidgetInitTemplateMethodInfo
    ResolveViewStackMethod "insertActionGroup" o = Gtk.Widget.WidgetInsertActionGroupMethodInfo
    ResolveViewStackMethod "insertAfter" o = Gtk.Widget.WidgetInsertAfterMethodInfo
    ResolveViewStackMethod "insertBefore" o = Gtk.Widget.WidgetInsertBeforeMethodInfo
    ResolveViewStackMethod "isAncestor" o = Gtk.Widget.WidgetIsAncestorMethodInfo
    ResolveViewStackMethod "isDrawable" o = Gtk.Widget.WidgetIsDrawableMethodInfo
    ResolveViewStackMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveViewStackMethod "isFocus" o = Gtk.Widget.WidgetIsFocusMethodInfo
    ResolveViewStackMethod "isSensitive" o = Gtk.Widget.WidgetIsSensitiveMethodInfo
    ResolveViewStackMethod "isVisible" o = Gtk.Widget.WidgetIsVisibleMethodInfo
    ResolveViewStackMethod "keynavFailed" o = Gtk.Widget.WidgetKeynavFailedMethodInfo
    ResolveViewStackMethod "listMnemonicLabels" o = Gtk.Widget.WidgetListMnemonicLabelsMethodInfo
    ResolveViewStackMethod "map" o = Gtk.Widget.WidgetMapMethodInfo
    ResolveViewStackMethod "measure" o = Gtk.Widget.WidgetMeasureMethodInfo
    ResolveViewStackMethod "mnemonicActivate" o = Gtk.Widget.WidgetMnemonicActivateMethodInfo
    ResolveViewStackMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveViewStackMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveViewStackMethod "observeChildren" o = Gtk.Widget.WidgetObserveChildrenMethodInfo
    ResolveViewStackMethod "observeControllers" o = Gtk.Widget.WidgetObserveControllersMethodInfo
    ResolveViewStackMethod "pick" o = Gtk.Widget.WidgetPickMethodInfo
    ResolveViewStackMethod "queueAllocate" o = Gtk.Widget.WidgetQueueAllocateMethodInfo
    ResolveViewStackMethod "queueDraw" o = Gtk.Widget.WidgetQueueDrawMethodInfo
    ResolveViewStackMethod "queueResize" o = Gtk.Widget.WidgetQueueResizeMethodInfo
    ResolveViewStackMethod "realize" o = Gtk.Widget.WidgetRealizeMethodInfo
    ResolveViewStackMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveViewStackMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveViewStackMethod "remove" o = ViewStackRemoveMethodInfo
    ResolveViewStackMethod "removeController" o = Gtk.Widget.WidgetRemoveControllerMethodInfo
    ResolveViewStackMethod "removeCssClass" o = Gtk.Widget.WidgetRemoveCssClassMethodInfo
    ResolveViewStackMethod "removeMnemonicLabel" o = Gtk.Widget.WidgetRemoveMnemonicLabelMethodInfo
    ResolveViewStackMethod "removeTickCallback" o = Gtk.Widget.WidgetRemoveTickCallbackMethodInfo
    ResolveViewStackMethod "resetProperty" o = Gtk.Accessible.AccessibleResetPropertyMethodInfo
    ResolveViewStackMethod "resetRelation" o = Gtk.Accessible.AccessibleResetRelationMethodInfo
    ResolveViewStackMethod "resetState" o = Gtk.Accessible.AccessibleResetStateMethodInfo
    ResolveViewStackMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveViewStackMethod "shouldLayout" o = Gtk.Widget.WidgetShouldLayoutMethodInfo
    ResolveViewStackMethod "show" o = Gtk.Widget.WidgetShowMethodInfo
    ResolveViewStackMethod "sizeAllocate" o = Gtk.Widget.WidgetSizeAllocateMethodInfo
    ResolveViewStackMethod "snapshotChild" o = Gtk.Widget.WidgetSnapshotChildMethodInfo
    ResolveViewStackMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveViewStackMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveViewStackMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveViewStackMethod "translateCoordinates" o = Gtk.Widget.WidgetTranslateCoordinatesMethodInfo
    ResolveViewStackMethod "triggerTooltipQuery" o = Gtk.Widget.WidgetTriggerTooltipQueryMethodInfo
    ResolveViewStackMethod "unmap" o = Gtk.Widget.WidgetUnmapMethodInfo
    ResolveViewStackMethod "unparent" o = Gtk.Widget.WidgetUnparentMethodInfo
    ResolveViewStackMethod "unrealize" o = Gtk.Widget.WidgetUnrealizeMethodInfo
    ResolveViewStackMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveViewStackMethod "unsetStateFlags" o = Gtk.Widget.WidgetUnsetStateFlagsMethodInfo
    ResolveViewStackMethod "updateProperty" o = Gtk.Accessible.AccessibleUpdatePropertyMethodInfo
    ResolveViewStackMethod "updateRelation" o = Gtk.Accessible.AccessibleUpdateRelationMethodInfo
    ResolveViewStackMethod "updateState" o = Gtk.Accessible.AccessibleUpdateStateMethodInfo
    ResolveViewStackMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveViewStackMethod "getAccessibleRole" o = Gtk.Accessible.AccessibleGetAccessibleRoleMethodInfo
    ResolveViewStackMethod "getAllocatedBaseline" o = Gtk.Widget.WidgetGetAllocatedBaselineMethodInfo
    ResolveViewStackMethod "getAllocatedHeight" o = Gtk.Widget.WidgetGetAllocatedHeightMethodInfo
    ResolveViewStackMethod "getAllocatedWidth" o = Gtk.Widget.WidgetGetAllocatedWidthMethodInfo
    ResolveViewStackMethod "getAllocation" o = Gtk.Widget.WidgetGetAllocationMethodInfo
    ResolveViewStackMethod "getAncestor" o = Gtk.Widget.WidgetGetAncestorMethodInfo
    ResolveViewStackMethod "getBuildableId" o = Gtk.Buildable.BuildableGetBuildableIdMethodInfo
    ResolveViewStackMethod "getCanFocus" o = Gtk.Widget.WidgetGetCanFocusMethodInfo
    ResolveViewStackMethod "getCanTarget" o = Gtk.Widget.WidgetGetCanTargetMethodInfo
    ResolveViewStackMethod "getChildByName" o = ViewStackGetChildByNameMethodInfo
    ResolveViewStackMethod "getChildVisible" o = Gtk.Widget.WidgetGetChildVisibleMethodInfo
    ResolveViewStackMethod "getClipboard" o = Gtk.Widget.WidgetGetClipboardMethodInfo
    ResolveViewStackMethod "getCssClasses" o = Gtk.Widget.WidgetGetCssClassesMethodInfo
    ResolveViewStackMethod "getCssName" o = Gtk.Widget.WidgetGetCssNameMethodInfo
    ResolveViewStackMethod "getCursor" o = Gtk.Widget.WidgetGetCursorMethodInfo
    ResolveViewStackMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveViewStackMethod "getDirection" o = Gtk.Widget.WidgetGetDirectionMethodInfo
    ResolveViewStackMethod "getDisplay" o = Gtk.Widget.WidgetGetDisplayMethodInfo
    ResolveViewStackMethod "getFirstChild" o = Gtk.Widget.WidgetGetFirstChildMethodInfo
    ResolveViewStackMethod "getFocusChild" o = Gtk.Widget.WidgetGetFocusChildMethodInfo
    ResolveViewStackMethod "getFocusOnClick" o = Gtk.Widget.WidgetGetFocusOnClickMethodInfo
    ResolveViewStackMethod "getFocusable" o = Gtk.Widget.WidgetGetFocusableMethodInfo
    ResolveViewStackMethod "getFontMap" o = Gtk.Widget.WidgetGetFontMapMethodInfo
    ResolveViewStackMethod "getFontOptions" o = Gtk.Widget.WidgetGetFontOptionsMethodInfo
    ResolveViewStackMethod "getFrameClock" o = Gtk.Widget.WidgetGetFrameClockMethodInfo
    ResolveViewStackMethod "getHalign" o = Gtk.Widget.WidgetGetHalignMethodInfo
    ResolveViewStackMethod "getHasTooltip" o = Gtk.Widget.WidgetGetHasTooltipMethodInfo
    ResolveViewStackMethod "getHeight" o = Gtk.Widget.WidgetGetHeightMethodInfo
    ResolveViewStackMethod "getHexpand" o = Gtk.Widget.WidgetGetHexpandMethodInfo
    ResolveViewStackMethod "getHexpandSet" o = Gtk.Widget.WidgetGetHexpandSetMethodInfo
    ResolveViewStackMethod "getHhomogeneous" o = ViewStackGetHhomogeneousMethodInfo
    ResolveViewStackMethod "getLastChild" o = Gtk.Widget.WidgetGetLastChildMethodInfo
    ResolveViewStackMethod "getLayoutManager" o = Gtk.Widget.WidgetGetLayoutManagerMethodInfo
    ResolveViewStackMethod "getMapped" o = Gtk.Widget.WidgetGetMappedMethodInfo
    ResolveViewStackMethod "getMarginBottom" o = Gtk.Widget.WidgetGetMarginBottomMethodInfo
    ResolveViewStackMethod "getMarginEnd" o = Gtk.Widget.WidgetGetMarginEndMethodInfo
    ResolveViewStackMethod "getMarginStart" o = Gtk.Widget.WidgetGetMarginStartMethodInfo
    ResolveViewStackMethod "getMarginTop" o = Gtk.Widget.WidgetGetMarginTopMethodInfo
    ResolveViewStackMethod "getName" o = Gtk.Widget.WidgetGetNameMethodInfo
    ResolveViewStackMethod "getNative" o = Gtk.Widget.WidgetGetNativeMethodInfo
    ResolveViewStackMethod "getNextSibling" o = Gtk.Widget.WidgetGetNextSiblingMethodInfo
    ResolveViewStackMethod "getOpacity" o = Gtk.Widget.WidgetGetOpacityMethodInfo
    ResolveViewStackMethod "getOverflow" o = Gtk.Widget.WidgetGetOverflowMethodInfo
    ResolveViewStackMethod "getPage" o = ViewStackGetPageMethodInfo
    ResolveViewStackMethod "getPages" o = ViewStackGetPagesMethodInfo
    ResolveViewStackMethod "getPangoContext" o = Gtk.Widget.WidgetGetPangoContextMethodInfo
    ResolveViewStackMethod "getParent" o = Gtk.Widget.WidgetGetParentMethodInfo
    ResolveViewStackMethod "getPreferredSize" o = Gtk.Widget.WidgetGetPreferredSizeMethodInfo
    ResolveViewStackMethod "getPrevSibling" o = Gtk.Widget.WidgetGetPrevSiblingMethodInfo
    ResolveViewStackMethod "getPrimaryClipboard" o = Gtk.Widget.WidgetGetPrimaryClipboardMethodInfo
    ResolveViewStackMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveViewStackMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveViewStackMethod "getRealized" o = Gtk.Widget.WidgetGetRealizedMethodInfo
    ResolveViewStackMethod "getReceivesDefault" o = Gtk.Widget.WidgetGetReceivesDefaultMethodInfo
    ResolveViewStackMethod "getRequestMode" o = Gtk.Widget.WidgetGetRequestModeMethodInfo
    ResolveViewStackMethod "getRoot" o = Gtk.Widget.WidgetGetRootMethodInfo
    ResolveViewStackMethod "getScaleFactor" o = Gtk.Widget.WidgetGetScaleFactorMethodInfo
    ResolveViewStackMethod "getSensitive" o = Gtk.Widget.WidgetGetSensitiveMethodInfo
    ResolveViewStackMethod "getSettings" o = Gtk.Widget.WidgetGetSettingsMethodInfo
    ResolveViewStackMethod "getSize" o = Gtk.Widget.WidgetGetSizeMethodInfo
    ResolveViewStackMethod "getSizeRequest" o = Gtk.Widget.WidgetGetSizeRequestMethodInfo
    ResolveViewStackMethod "getStateFlags" o = Gtk.Widget.WidgetGetStateFlagsMethodInfo
    ResolveViewStackMethod "getStyleContext" o = Gtk.Widget.WidgetGetStyleContextMethodInfo
    ResolveViewStackMethod "getTemplateChild" o = Gtk.Widget.WidgetGetTemplateChildMethodInfo
    ResolveViewStackMethod "getTooltipMarkup" o = Gtk.Widget.WidgetGetTooltipMarkupMethodInfo
    ResolveViewStackMethod "getTooltipText" o = Gtk.Widget.WidgetGetTooltipTextMethodInfo
    ResolveViewStackMethod "getValign" o = Gtk.Widget.WidgetGetValignMethodInfo
    ResolveViewStackMethod "getVexpand" o = Gtk.Widget.WidgetGetVexpandMethodInfo
    ResolveViewStackMethod "getVexpandSet" o = Gtk.Widget.WidgetGetVexpandSetMethodInfo
    ResolveViewStackMethod "getVhomogeneous" o = ViewStackGetVhomogeneousMethodInfo
    ResolveViewStackMethod "getVisible" o = Gtk.Widget.WidgetGetVisibleMethodInfo
    ResolveViewStackMethod "getVisibleChild" o = ViewStackGetVisibleChildMethodInfo
    ResolveViewStackMethod "getVisibleChildName" o = ViewStackGetVisibleChildNameMethodInfo
    ResolveViewStackMethod "getWidth" o = Gtk.Widget.WidgetGetWidthMethodInfo
    ResolveViewStackMethod "setCanFocus" o = Gtk.Widget.WidgetSetCanFocusMethodInfo
    ResolveViewStackMethod "setCanTarget" o = Gtk.Widget.WidgetSetCanTargetMethodInfo
    ResolveViewStackMethod "setChildVisible" o = Gtk.Widget.WidgetSetChildVisibleMethodInfo
    ResolveViewStackMethod "setCssClasses" o = Gtk.Widget.WidgetSetCssClassesMethodInfo
    ResolveViewStackMethod "setCursor" o = Gtk.Widget.WidgetSetCursorMethodInfo
    ResolveViewStackMethod "setCursorFromName" o = Gtk.Widget.WidgetSetCursorFromNameMethodInfo
    ResolveViewStackMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveViewStackMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveViewStackMethod "setDirection" o = Gtk.Widget.WidgetSetDirectionMethodInfo
    ResolveViewStackMethod "setFocusChild" o = Gtk.Widget.WidgetSetFocusChildMethodInfo
    ResolveViewStackMethod "setFocusOnClick" o = Gtk.Widget.WidgetSetFocusOnClickMethodInfo
    ResolveViewStackMethod "setFocusable" o = Gtk.Widget.WidgetSetFocusableMethodInfo
    ResolveViewStackMethod "setFontMap" o = Gtk.Widget.WidgetSetFontMapMethodInfo
    ResolveViewStackMethod "setFontOptions" o = Gtk.Widget.WidgetSetFontOptionsMethodInfo
    ResolveViewStackMethod "setHalign" o = Gtk.Widget.WidgetSetHalignMethodInfo
    ResolveViewStackMethod "setHasTooltip" o = Gtk.Widget.WidgetSetHasTooltipMethodInfo
    ResolveViewStackMethod "setHexpand" o = Gtk.Widget.WidgetSetHexpandMethodInfo
    ResolveViewStackMethod "setHexpandSet" o = Gtk.Widget.WidgetSetHexpandSetMethodInfo
    ResolveViewStackMethod "setHhomogeneous" o = ViewStackSetHhomogeneousMethodInfo
    ResolveViewStackMethod "setLayoutManager" o = Gtk.Widget.WidgetSetLayoutManagerMethodInfo
    ResolveViewStackMethod "setMarginBottom" o = Gtk.Widget.WidgetSetMarginBottomMethodInfo
    ResolveViewStackMethod "setMarginEnd" o = Gtk.Widget.WidgetSetMarginEndMethodInfo
    ResolveViewStackMethod "setMarginStart" o = Gtk.Widget.WidgetSetMarginStartMethodInfo
    ResolveViewStackMethod "setMarginTop" o = Gtk.Widget.WidgetSetMarginTopMethodInfo
    ResolveViewStackMethod "setName" o = Gtk.Widget.WidgetSetNameMethodInfo
    ResolveViewStackMethod "setOpacity" o = Gtk.Widget.WidgetSetOpacityMethodInfo
    ResolveViewStackMethod "setOverflow" o = Gtk.Widget.WidgetSetOverflowMethodInfo
    ResolveViewStackMethod "setParent" o = Gtk.Widget.WidgetSetParentMethodInfo
    ResolveViewStackMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveViewStackMethod "setReceivesDefault" o = Gtk.Widget.WidgetSetReceivesDefaultMethodInfo
    ResolveViewStackMethod "setSensitive" o = Gtk.Widget.WidgetSetSensitiveMethodInfo
    ResolveViewStackMethod "setSizeRequest" o = Gtk.Widget.WidgetSetSizeRequestMethodInfo
    ResolveViewStackMethod "setStateFlags" o = Gtk.Widget.WidgetSetStateFlagsMethodInfo
    ResolveViewStackMethod "setTooltipMarkup" o = Gtk.Widget.WidgetSetTooltipMarkupMethodInfo
    ResolveViewStackMethod "setTooltipText" o = Gtk.Widget.WidgetSetTooltipTextMethodInfo
    ResolveViewStackMethod "setValign" o = Gtk.Widget.WidgetSetValignMethodInfo
    ResolveViewStackMethod "setVexpand" o = Gtk.Widget.WidgetSetVexpandMethodInfo
    ResolveViewStackMethod "setVexpandSet" o = Gtk.Widget.WidgetSetVexpandSetMethodInfo
    ResolveViewStackMethod "setVhomogeneous" o = ViewStackSetVhomogeneousMethodInfo
    ResolveViewStackMethod "setVisible" o = Gtk.Widget.WidgetSetVisibleMethodInfo
    ResolveViewStackMethod "setVisibleChild" o = ViewStackSetVisibleChildMethodInfo
    ResolveViewStackMethod "setVisibleChildName" o = ViewStackSetVisibleChildNameMethodInfo
    ResolveViewStackMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveViewStackMethod t ViewStack, O.OverloadedMethod info ViewStack p) => OL.IsLabel t (ViewStack -> 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 ~ ResolveViewStackMethod t ViewStack, O.OverloadedMethod info ViewStack p, R.HasField t ViewStack p) => R.HasField t ViewStack p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveViewStackMethod t ViewStack, O.OverloadedMethodInfo info ViewStack) => OL.IsLabel t (O.MethodProxy info ViewStack) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

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

-- | Get the value of the “@hhomogeneous@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' viewStack #hhomogeneous
-- @
getViewStackHhomogeneous :: (MonadIO m, IsViewStack o) => o -> m Bool
getViewStackHhomogeneous :: forall (m :: * -> *) o. (MonadIO m, IsViewStack o) => o -> m Bool
getViewStackHhomogeneous 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
"hhomogeneous"

-- | Set the value of the “@hhomogeneous@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' viewStack [ #hhomogeneous 'Data.GI.Base.Attributes.:=' value ]
-- @
setViewStackHhomogeneous :: (MonadIO m, IsViewStack o) => o -> Bool -> m ()
setViewStackHhomogeneous :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> Bool -> m ()
setViewStackHhomogeneous 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
"hhomogeneous" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@hhomogeneous@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructViewStackHhomogeneous :: (IsViewStack o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructViewStackHhomogeneous :: forall o (m :: * -> *).
(IsViewStack o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructViewStackHhomogeneous 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
"hhomogeneous" Bool
val

#if defined(ENABLE_OVERLOADING)
data ViewStackHhomogeneousPropertyInfo
instance AttrInfo ViewStackHhomogeneousPropertyInfo where
    type AttrAllowedOps ViewStackHhomogeneousPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ViewStackHhomogeneousPropertyInfo = IsViewStack
    type AttrSetTypeConstraint ViewStackHhomogeneousPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ViewStackHhomogeneousPropertyInfo = (~) Bool
    type AttrTransferType ViewStackHhomogeneousPropertyInfo = Bool
    type AttrGetType ViewStackHhomogeneousPropertyInfo = Bool
    type AttrLabel ViewStackHhomogeneousPropertyInfo = "hhomogeneous"
    type AttrOrigin ViewStackHhomogeneousPropertyInfo = ViewStack
    attrGet = getViewStackHhomogeneous
    attrSet = setViewStackHhomogeneous
    attrTransfer _ v = do
        return v
    attrConstruct = constructViewStackHhomogeneous
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.hhomogeneous"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#g:attr:hhomogeneous"
        })
#endif

-- VVV Prop "pages"
   -- Type: TInterface (Name {namespace = "Gtk", name = "SelectionModel"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@pages@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' viewStack #pages
-- @
getViewStackPages :: (MonadIO m, IsViewStack o) => o -> m (Maybe Gtk.SelectionModel.SelectionModel)
getViewStackPages :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> m (Maybe SelectionModel)
getViewStackPages o
obj = IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe SelectionModel) -> m (Maybe SelectionModel))
-> IO (Maybe SelectionModel) -> m (Maybe SelectionModel)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr SelectionModel -> SelectionModel)
-> IO (Maybe SelectionModel)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"pages" ManagedPtr SelectionModel -> SelectionModel
Gtk.SelectionModel.SelectionModel

#if defined(ENABLE_OVERLOADING)
data ViewStackPagesPropertyInfo
instance AttrInfo ViewStackPagesPropertyInfo where
    type AttrAllowedOps ViewStackPagesPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ViewStackPagesPropertyInfo = IsViewStack
    type AttrSetTypeConstraint ViewStackPagesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint ViewStackPagesPropertyInfo = (~) ()
    type AttrTransferType ViewStackPagesPropertyInfo = ()
    type AttrGetType ViewStackPagesPropertyInfo = (Maybe Gtk.SelectionModel.SelectionModel)
    type AttrLabel ViewStackPagesPropertyInfo = "pages"
    type AttrOrigin ViewStackPagesPropertyInfo = ViewStack
    attrGet = getViewStackPages
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.pages"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#g:attr:pages"
        })
#endif

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

-- | Get the value of the “@vhomogeneous@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' viewStack #vhomogeneous
-- @
getViewStackVhomogeneous :: (MonadIO m, IsViewStack o) => o -> m Bool
getViewStackVhomogeneous :: forall (m :: * -> *) o. (MonadIO m, IsViewStack o) => o -> m Bool
getViewStackVhomogeneous 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
"vhomogeneous"

-- | Set the value of the “@vhomogeneous@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' viewStack [ #vhomogeneous 'Data.GI.Base.Attributes.:=' value ]
-- @
setViewStackVhomogeneous :: (MonadIO m, IsViewStack o) => o -> Bool -> m ()
setViewStackVhomogeneous :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> Bool -> m ()
setViewStackVhomogeneous 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
"vhomogeneous" Bool
val

-- | Construct a `GValueConstruct` with valid value for the “@vhomogeneous@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructViewStackVhomogeneous :: (IsViewStack o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructViewStackVhomogeneous :: forall o (m :: * -> *).
(IsViewStack o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructViewStackVhomogeneous 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
"vhomogeneous" Bool
val

#if defined(ENABLE_OVERLOADING)
data ViewStackVhomogeneousPropertyInfo
instance AttrInfo ViewStackVhomogeneousPropertyInfo where
    type AttrAllowedOps ViewStackVhomogeneousPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ViewStackVhomogeneousPropertyInfo = IsViewStack
    type AttrSetTypeConstraint ViewStackVhomogeneousPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint ViewStackVhomogeneousPropertyInfo = (~) Bool
    type AttrTransferType ViewStackVhomogeneousPropertyInfo = Bool
    type AttrGetType ViewStackVhomogeneousPropertyInfo = Bool
    type AttrLabel ViewStackVhomogeneousPropertyInfo = "vhomogeneous"
    type AttrOrigin ViewStackVhomogeneousPropertyInfo = ViewStack
    attrGet = getViewStackVhomogeneous
    attrSet = setViewStackVhomogeneous
    attrTransfer _ v = do
        return v
    attrConstruct = constructViewStackVhomogeneous
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.vhomogeneous"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#g:attr:vhomogeneous"
        })
#endif

-- VVV Prop "visible-child"
   -- Type: TInterface (Name {namespace = "Gtk", name = "Widget"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just False)

-- | Get the value of the “@visible-child@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' viewStack #visibleChild
-- @
getViewStackVisibleChild :: (MonadIO m, IsViewStack o) => o -> m (Maybe Gtk.Widget.Widget)
getViewStackVisibleChild :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> m (Maybe Widget)
getViewStackVisibleChild 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
"visible-child" ManagedPtr Widget -> Widget
Gtk.Widget.Widget

-- | Set the value of the “@visible-child@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' viewStack [ #visibleChild 'Data.GI.Base.Attributes.:=' value ]
-- @
setViewStackVisibleChild :: (MonadIO m, IsViewStack o, Gtk.Widget.IsWidget a) => o -> a -> m ()
setViewStackVisibleChild :: forall (m :: * -> *) o a.
(MonadIO m, IsViewStack o, IsWidget a) =>
o -> a -> m ()
setViewStackVisibleChild 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
"visible-child" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

-- | Construct a `GValueConstruct` with valid value for the “@visible-child@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructViewStackVisibleChild :: (IsViewStack o, MIO.MonadIO m, Gtk.Widget.IsWidget a) => a -> m (GValueConstruct o)
constructViewStackVisibleChild :: forall o (m :: * -> *) a.
(IsViewStack o, MonadIO m, IsWidget a) =>
a -> m (GValueConstruct o)
constructViewStackVisibleChild 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
"visible-child" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)

#if defined(ENABLE_OVERLOADING)
data ViewStackVisibleChildPropertyInfo
instance AttrInfo ViewStackVisibleChildPropertyInfo where
    type AttrAllowedOps ViewStackVisibleChildPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ViewStackVisibleChildPropertyInfo = IsViewStack
    type AttrSetTypeConstraint ViewStackVisibleChildPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferTypeConstraint ViewStackVisibleChildPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferType ViewStackVisibleChildPropertyInfo = Gtk.Widget.Widget
    type AttrGetType ViewStackVisibleChildPropertyInfo = (Maybe Gtk.Widget.Widget)
    type AttrLabel ViewStackVisibleChildPropertyInfo = "visible-child"
    type AttrOrigin ViewStackVisibleChildPropertyInfo = ViewStack
    attrGet = getViewStackVisibleChild
    attrSet = setViewStackVisibleChild
    attrTransfer _ v = do
        unsafeCastTo Gtk.Widget.Widget v
    attrConstruct = constructViewStackVisibleChild
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.visibleChild"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#g:attr:visibleChild"
        })
#endif

-- VVV Prop "visible-child-name"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just False)

-- | Get the value of the “@visible-child-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' viewStack #visibleChildName
-- @
getViewStackVisibleChildName :: (MonadIO m, IsViewStack o) => o -> m (Maybe T.Text)
getViewStackVisibleChildName :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> m (Maybe Text)
getViewStackVisibleChildName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"visible-child-name"

-- | Set the value of the “@visible-child-name@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' viewStack [ #visibleChildName 'Data.GI.Base.Attributes.:=' value ]
-- @
setViewStackVisibleChildName :: (MonadIO m, IsViewStack o) => o -> T.Text -> m ()
setViewStackVisibleChildName :: forall (m :: * -> *) o.
(MonadIO m, IsViewStack o) =>
o -> Text -> m ()
setViewStackVisibleChildName o
obj Text
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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"visible-child-name" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)

-- | Construct a `GValueConstruct` with valid value for the “@visible-child-name@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructViewStackVisibleChildName :: (IsViewStack o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructViewStackVisibleChildName :: forall o (m :: * -> *).
(IsViewStack o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructViewStackVisibleChildName Text
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 Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"visible-child-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)

#if defined(ENABLE_OVERLOADING)
data ViewStackVisibleChildNamePropertyInfo
instance AttrInfo ViewStackVisibleChildNamePropertyInfo where
    type AttrAllowedOps ViewStackVisibleChildNamePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint ViewStackVisibleChildNamePropertyInfo = IsViewStack
    type AttrSetTypeConstraint ViewStackVisibleChildNamePropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint ViewStackVisibleChildNamePropertyInfo = (~) T.Text
    type AttrTransferType ViewStackVisibleChildNamePropertyInfo = T.Text
    type AttrGetType ViewStackVisibleChildNamePropertyInfo = (Maybe T.Text)
    type AttrLabel ViewStackVisibleChildNamePropertyInfo = "visible-child-name"
    type AttrOrigin ViewStackVisibleChildNamePropertyInfo = ViewStack
    attrGet = getViewStackVisibleChildName
    attrSet = setViewStackVisibleChildName
    attrTransfer _ v = do
        return v
    attrConstruct = constructViewStackVisibleChildName
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.visibleChildName"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#g:attr:visibleChildName"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ViewStack
type instance O.AttributeList ViewStack = ViewStackAttributeList
type ViewStackAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("focusOnClick", Gtk.Widget.WidgetFocusOnClickPropertyInfo), '("focusable", Gtk.Widget.WidgetFocusablePropertyInfo), '("halign", Gtk.Widget.WidgetHalignPropertyInfo), '("hasDefault", Gtk.Widget.WidgetHasDefaultPropertyInfo), '("hasFocus", Gtk.Widget.WidgetHasFocusPropertyInfo), '("hasTooltip", Gtk.Widget.WidgetHasTooltipPropertyInfo), '("heightRequest", Gtk.Widget.WidgetHeightRequestPropertyInfo), '("hexpand", Gtk.Widget.WidgetHexpandPropertyInfo), '("hexpandSet", Gtk.Widget.WidgetHexpandSetPropertyInfo), '("hhomogeneous", ViewStackHhomogeneousPropertyInfo), '("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), '("pages", ViewStackPagesPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("vhomogeneous", ViewStackVhomogeneousPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("visibleChild", ViewStackVisibleChildPropertyInfo), '("visibleChildName", ViewStackVisibleChildNamePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
viewStackHhomogeneous :: AttrLabelProxy "hhomogeneous"
viewStackHhomogeneous = AttrLabelProxy

viewStackPages :: AttrLabelProxy "pages"
viewStackPages = AttrLabelProxy

viewStackVhomogeneous :: AttrLabelProxy "vhomogeneous"
viewStackVhomogeneous = AttrLabelProxy

viewStackVisibleChild :: AttrLabelProxy "visibleChild"
viewStackVisibleChild = AttrLabelProxy

viewStackVisibleChildName :: AttrLabelProxy "visibleChildName"
viewStackVisibleChildName = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ViewStack = ViewStackSignalList
type ViewStackSignalList = ('[ '("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, *)])

#endif

-- method ViewStack::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "Adw" , name = "ViewStack" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_new" adw_view_stack_new :: 
    IO (Ptr ViewStack)

-- | Creates a new @AdwViewStack@.
-- 
-- /Since: 1.0/
viewStackNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ViewStack
    -- ^ __Returns:__ the newly created @AdwViewStack@
viewStackNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m ViewStack
viewStackNew  = IO ViewStack -> m ViewStack
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStack -> m ViewStack) -> IO ViewStack -> m ViewStack
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
result <- IO (Ptr ViewStack)
adw_view_stack_new
    Text -> Ptr ViewStack -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackNew" Ptr ViewStack
result
    ViewStack
result' <- ((ManagedPtr ViewStack -> ViewStack)
-> Ptr ViewStack -> IO ViewStack
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStack -> ViewStack
ViewStack) Ptr ViewStack
result
    ViewStack -> IO ViewStack
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStack
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method ViewStack::add
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to add" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewStackPage" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_add" adw_view_stack_add :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Adw.ViewStackPage.ViewStackPage)

-- | Adds a child to /@self@/.
-- 
-- /Since: 1.0/
viewStackAdd ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: the widget to add
    -> m Adw.ViewStackPage.ViewStackPage
    -- ^ __Returns:__ the [class/@viewStackPage@/] for /@child@/
viewStackAdd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> m ViewStackPage
viewStackAdd a
self b
child = IO ViewStackPage -> m ViewStackPage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStackPage -> m ViewStackPage)
-> IO ViewStackPage -> m ViewStackPage
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ViewStackPage
result <- Ptr ViewStack -> Ptr Widget -> IO (Ptr ViewStackPage)
adw_view_stack_add Ptr ViewStack
self' Ptr Widget
child'
    Text -> Ptr ViewStackPage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackAdd" Ptr ViewStackPage
result
    ViewStackPage
result' <- ((ManagedPtr ViewStackPage -> ViewStackPage)
-> Ptr ViewStackPage -> IO ViewStackPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStackPage -> ViewStackPage
Adw.ViewStackPage.ViewStackPage) Ptr ViewStackPage
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    ViewStackPage -> IO ViewStackPage
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStackPage
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackAddMethodInfo
instance (signature ~ (b -> m Adw.ViewStackPage.ViewStackPage), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackAddMethodInfo a signature where
    overloadedMethod = viewStackAdd

instance O.OverloadedMethodInfo ViewStackAddMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackAdd",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackAdd"
        })


#endif

-- method ViewStack::add_named
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to add" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewStackPage" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_add_named" adw_view_stack_add_named :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr Adw.ViewStackPage.ViewStackPage)

-- | Adds a child to /@self@/.
-- 
-- The child is identified by the /@name@/.
-- 
-- /Since: 1.0/
viewStackAddNamed ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: the widget to add
    -> Maybe (T.Text)
    -- ^ /@name@/: the name for /@child@/
    -> m Adw.ViewStackPage.ViewStackPage
    -- ^ __Returns:__ the @AdwViewStackPage@ for /@child@/
viewStackAddNamed :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> Maybe Text -> m ViewStackPage
viewStackAddNamed a
self b
child Maybe Text
name = IO ViewStackPage -> m ViewStackPage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStackPage -> m ViewStackPage)
-> IO ViewStackPage -> m ViewStackPage
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr CChar
maybeName <- case Maybe Text
name of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jName -> do
            Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
            Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
    Ptr ViewStackPage
result <- Ptr ViewStack -> Ptr Widget -> Ptr CChar -> IO (Ptr ViewStackPage)
adw_view_stack_add_named Ptr ViewStack
self' Ptr Widget
child' Ptr CChar
maybeName
    Text -> Ptr ViewStackPage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackAddNamed" Ptr ViewStackPage
result
    ViewStackPage
result' <- ((ManagedPtr ViewStackPage -> ViewStackPage)
-> Ptr ViewStackPage -> IO ViewStackPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStackPage -> ViewStackPage
Adw.ViewStackPage.ViewStackPage) Ptr ViewStackPage
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
    ViewStackPage -> IO ViewStackPage
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStackPage
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackAddNamedMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> m Adw.ViewStackPage.ViewStackPage), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackAddNamedMethodInfo a signature where
    overloadedMethod = viewStackAddNamed

instance O.OverloadedMethodInfo ViewStackAddNamedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackAddNamed",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackAddNamed"
        })


#endif

-- method ViewStack::add_titled
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to add" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "title"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a human-readable title for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewStackPage" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_add_titled" adw_view_stack_add_titled :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- title : TBasicType TUTF8
    IO (Ptr Adw.ViewStackPage.ViewStackPage)

-- | Adds a child to /@self@/.
-- 
-- The child is identified by the /@name@/. The /@title@/ will be used by
-- [class/@viewSwitcher@/] to represent /@child@/, so it should be short.
-- 
-- /Since: 1.0/
viewStackAddTitled ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: the widget to add
    -> Maybe (T.Text)
    -- ^ /@name@/: the name for /@child@/
    -> T.Text
    -- ^ /@title@/: a human-readable title for /@child@/
    -> m Adw.ViewStackPage.ViewStackPage
    -- ^ __Returns:__ the @AdwViewStackPage@ for /@child@/
viewStackAddTitled :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> Maybe Text -> Text -> m ViewStackPage
viewStackAddTitled a
self b
child Maybe Text
name Text
title = IO ViewStackPage -> m ViewStackPage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStackPage -> m ViewStackPage)
-> IO ViewStackPage -> m ViewStackPage
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr CChar
maybeName <- case Maybe Text
name of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jName -> do
            Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
            Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
    Ptr CChar
title' <- Text -> IO (Ptr CChar)
textToCString Text
title
    Ptr ViewStackPage
result <- Ptr ViewStack
-> Ptr Widget -> Ptr CChar -> Ptr CChar -> IO (Ptr ViewStackPage)
adw_view_stack_add_titled Ptr ViewStack
self' Ptr Widget
child' Ptr CChar
maybeName Ptr CChar
title'
    Text -> Ptr ViewStackPage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackAddTitled" Ptr ViewStackPage
result
    ViewStackPage
result' <- ((ManagedPtr ViewStackPage -> ViewStackPage)
-> Ptr ViewStackPage -> IO ViewStackPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStackPage -> ViewStackPage
Adw.ViewStackPage.ViewStackPage) Ptr ViewStackPage
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
title'
    ViewStackPage -> IO ViewStackPage
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStackPage
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackAddTitledMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> T.Text -> m Adw.ViewStackPage.ViewStackPage), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackAddTitledMethodInfo a signature where
    overloadedMethod = viewStackAddTitled

instance O.OverloadedMethodInfo ViewStackAddTitledMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackAddTitled",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackAddTitled"
        })


#endif

-- method ViewStack::add_titled_with_icon
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the widget to add" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "title"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a human-readable title for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "icon_name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an icon name for @child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewStackPage" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_add_titled_with_icon" adw_view_stack_add_titled_with_icon :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    CString ->                              -- name : TBasicType TUTF8
    CString ->                              -- title : TBasicType TUTF8
    CString ->                              -- icon_name : TBasicType TUTF8
    IO (Ptr Adw.ViewStackPage.ViewStackPage)

-- | Adds a child to /@self@/.
-- 
-- The child is identified by the /@name@/. The /@title@/ and /@iconName@/ will be used
-- by [class/@viewSwitcher@/] to represent /@child@/.
-- 
-- /Since: 1.2/
viewStackAddTitledWithIcon ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: the widget to add
    -> Maybe (T.Text)
    -- ^ /@name@/: the name for /@child@/
    -> T.Text
    -- ^ /@title@/: a human-readable title for /@child@/
    -> T.Text
    -- ^ /@iconName@/: an icon name for /@child@/
    -> m Adw.ViewStackPage.ViewStackPage
    -- ^ __Returns:__ the @AdwViewStackPage@ for /@child@/
viewStackAddTitledWithIcon :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> Maybe Text -> Text -> Text -> m ViewStackPage
viewStackAddTitledWithIcon a
self b
child Maybe Text
name Text
title Text
iconName = IO ViewStackPage -> m ViewStackPage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStackPage -> m ViewStackPage)
-> IO ViewStackPage -> m ViewStackPage
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr CChar
maybeName <- case Maybe Text
name of
        Maybe Text
Nothing -> Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
forall a. Ptr a
nullPtr
        Just Text
jName -> do
            Ptr CChar
jName' <- Text -> IO (Ptr CChar)
textToCString Text
jName
            Ptr CChar -> IO (Ptr CChar)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr CChar
jName'
    Ptr CChar
title' <- Text -> IO (Ptr CChar)
textToCString Text
title
    Ptr CChar
iconName' <- Text -> IO (Ptr CChar)
textToCString Text
iconName
    Ptr ViewStackPage
result <- Ptr ViewStack
-> Ptr Widget
-> Ptr CChar
-> Ptr CChar
-> Ptr CChar
-> IO (Ptr ViewStackPage)
adw_view_stack_add_titled_with_icon Ptr ViewStack
self' Ptr Widget
child' Ptr CChar
maybeName Ptr CChar
title' Ptr CChar
iconName'
    Text -> Ptr ViewStackPage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackAddTitledWithIcon" Ptr ViewStackPage
result
    ViewStackPage
result' <- ((ManagedPtr ViewStackPage -> ViewStackPage)
-> Ptr ViewStackPage -> IO ViewStackPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStackPage -> ViewStackPage
Adw.ViewStackPage.ViewStackPage) Ptr ViewStackPage
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
maybeName
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
title'
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
iconName'
    ViewStackPage -> IO ViewStackPage
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStackPage
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackAddTitledWithIconMethodInfo
instance (signature ~ (b -> Maybe (T.Text) -> T.Text -> T.Text -> m Adw.ViewStackPage.ViewStackPage), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackAddTitledWithIconMethodInfo a signature where
    overloadedMethod = viewStackAddTitledWithIcon

instance O.OverloadedMethodInfo ViewStackAddTitledWithIconMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackAddTitledWithIcon",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackAddTitledWithIcon"
        })


#endif

-- method ViewStack::get_child_by_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the child to find"
--                 , 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 "adw_view_stack_get_child_by_name" adw_view_stack_get_child_by_name :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    CString ->                              -- name : TBasicType TUTF8
    IO (Ptr Gtk.Widget.Widget)

-- | Finds the child with /@name@/ in /@self@/.
-- 
-- /Since: 1.0/
viewStackGetChildByName ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> T.Text
    -- ^ /@name@/: the name of the child to find
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the requested child
viewStackGetChildByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> Text -> m (Maybe Widget)
viewStackGetChildByName a
self Text
name = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
    Ptr Widget
result <- Ptr ViewStack -> Ptr CChar -> IO (Ptr Widget)
adw_view_stack_get_child_by_name Ptr ViewStack
self' Ptr CChar
name'
    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
self
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
    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 ViewStackGetChildByNameMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.Widget.Widget)), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetChildByNameMethodInfo a signature where
    overloadedMethod = viewStackGetChildByName

instance O.OverloadedMethodInfo ViewStackGetChildByNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetChildByName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetChildByName"
        })


#endif

-- method ViewStack::get_hhomogeneous
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_get_hhomogeneous" adw_view_stack_get_hhomogeneous :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO CInt

-- | Gets whether /@self@/ is horizontally homogeneous.
-- 
-- /Since: 1.0/
viewStackGetHhomogeneous ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> m Bool
    -- ^ __Returns:__ whether /@self@/ is horizontally homogeneous
viewStackGetHhomogeneous :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> m Bool
viewStackGetHhomogeneous a
self = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr ViewStack -> IO CInt
adw_view_stack_get_hhomogeneous Ptr ViewStack
self'
    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
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackGetHhomogeneousMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetHhomogeneousMethodInfo a signature where
    overloadedMethod = viewStackGetHhomogeneous

instance O.OverloadedMethodInfo ViewStackGetHhomogeneousMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetHhomogeneous",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetHhomogeneous"
        })


#endif

-- method ViewStack::get_page
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child of @self" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewStackPage" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_get_page" adw_view_stack_get_page :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO (Ptr Adw.ViewStackPage.ViewStackPage)

-- | Gets the [class/@viewStackPage@/] object for /@child@/.
-- 
-- /Since: 1.0/
viewStackGetPage ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: a child of /@self@/
    -> m Adw.ViewStackPage.ViewStackPage
    -- ^ __Returns:__ the page object for /@child@/
viewStackGetPage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> m ViewStackPage
viewStackGetPage a
self b
child = IO ViewStackPage -> m ViewStackPage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ViewStackPage -> m ViewStackPage)
-> IO ViewStackPage -> m ViewStackPage
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ViewStackPage
result <- Ptr ViewStack -> Ptr Widget -> IO (Ptr ViewStackPage)
adw_view_stack_get_page Ptr ViewStack
self' Ptr Widget
child'
    Text -> Ptr ViewStackPage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackGetPage" Ptr ViewStackPage
result
    ViewStackPage
result' <- ((ManagedPtr ViewStackPage -> ViewStackPage)
-> Ptr ViewStackPage -> IO ViewStackPage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ViewStackPage -> ViewStackPage
Adw.ViewStackPage.ViewStackPage) Ptr ViewStackPage
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    ViewStackPage -> IO ViewStackPage
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStackPage
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackGetPageMethodInfo
instance (signature ~ (b -> m Adw.ViewStackPage.ViewStackPage), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackGetPageMethodInfo a signature where
    overloadedMethod = viewStackGetPage

instance O.OverloadedMethodInfo ViewStackGetPageMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetPage",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetPage"
        })


#endif

-- method ViewStack::get_pages
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Gtk" , name = "SelectionModel" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_get_pages" adw_view_stack_get_pages :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO (Ptr Gtk.SelectionModel.SelectionModel)

-- | Returns a t'GI.Gio.Interfaces.ListModel.ListModel' that contains the pages of the stack.
-- 
-- This can be used to keep an up-to-date view. The model also implements
-- t'GI.Gtk.Interfaces.SelectionModel.SelectionModel' and can be used to track and change the visible
-- page.
-- 
-- /Since: 1.0/
viewStackGetPages ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> m Gtk.SelectionModel.SelectionModel
    -- ^ __Returns:__ a @GtkSelectionModel@ for the stack\'s children
viewStackGetPages :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> m SelectionModel
viewStackGetPages a
self = IO SelectionModel -> m SelectionModel
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SelectionModel -> m SelectionModel)
-> IO SelectionModel -> m SelectionModel
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr SelectionModel
result <- Ptr ViewStack -> IO (Ptr SelectionModel)
adw_view_stack_get_pages Ptr ViewStack
self'
    Text -> Ptr SelectionModel -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"viewStackGetPages" Ptr SelectionModel
result
    SelectionModel
result' <- ((ManagedPtr SelectionModel -> SelectionModel)
-> Ptr SelectionModel -> IO SelectionModel
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr SelectionModel -> SelectionModel
Gtk.SelectionModel.SelectionModel) Ptr SelectionModel
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    SelectionModel -> IO SelectionModel
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return SelectionModel
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackGetPagesMethodInfo
instance (signature ~ (m Gtk.SelectionModel.SelectionModel), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetPagesMethodInfo a signature where
    overloadedMethod = viewStackGetPages

instance O.OverloadedMethodInfo ViewStackGetPagesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetPages",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetPages"
        })


#endif

-- method ViewStack::get_vhomogeneous
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_get_vhomogeneous" adw_view_stack_get_vhomogeneous :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO CInt

-- | Gets whether /@self@/ is vertically homogeneous.
-- 
-- /Since: 1.0/
viewStackGetVhomogeneous ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> m Bool
    -- ^ __Returns:__ whether /@self@/ is vertically homogeneous
viewStackGetVhomogeneous :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> m Bool
viewStackGetVhomogeneous a
self = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr ViewStack -> IO CInt
adw_view_stack_get_vhomogeneous Ptr ViewStack
self'
    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
self
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ViewStackGetVhomogeneousMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetVhomogeneousMethodInfo a signature where
    overloadedMethod = viewStackGetVhomogeneous

instance O.OverloadedMethodInfo ViewStackGetVhomogeneousMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetVhomogeneous",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetVhomogeneous"
        })


#endif

-- method ViewStack::get_visible_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , 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 "adw_view_stack_get_visible_child" adw_view_stack_get_visible_child :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO (Ptr Gtk.Widget.Widget)

-- | Gets the currently visible child of /@self@/, .
-- 
-- /Since: 1.0/
viewStackGetVisibleChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the visible child
viewStackGetVisibleChild :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> m (Maybe Widget)
viewStackGetVisibleChild a
self = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
result <- Ptr ViewStack -> IO (Ptr Widget)
adw_view_stack_get_visible_child Ptr ViewStack
self'
    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
self
    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 ViewStackGetVisibleChildMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetVisibleChildMethodInfo a signature where
    overloadedMethod = viewStackGetVisibleChild

instance O.OverloadedMethodInfo ViewStackGetVisibleChildMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetVisibleChild",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetVisibleChild"
        })


#endif

-- method ViewStack::get_visible_child_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_get_visible_child_name" adw_view_stack_get_visible_child_name :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO CString

-- | Returns the name of the currently visible child of /@self@/.
-- 
-- /Since: 1.0/
viewStackGetVisibleChildName ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the name of the visible child
viewStackGetVisibleChildName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> m (Maybe Text)
viewStackGetVisibleChildName a
self = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
result <- Ptr ViewStack -> IO (Ptr CChar)
adw_view_stack_get_visible_child_name Ptr ViewStack
self'
    Maybe Text
maybeResult <- Ptr CChar -> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr CChar
result ((Ptr CChar -> IO Text) -> IO (Maybe Text))
-> (Ptr CChar -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \Ptr CChar
result' -> do
        Text
result'' <- HasCallStack => Ptr CChar -> IO Text
Ptr CChar -> IO Text
cstringToText Ptr CChar
result'
        Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

#if defined(ENABLE_OVERLOADING)
data ViewStackGetVisibleChildNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackGetVisibleChildNameMethodInfo a signature where
    overloadedMethod = viewStackGetVisibleChildName

instance O.OverloadedMethodInfo ViewStackGetVisibleChildNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackGetVisibleChildName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackGetVisibleChildName"
        })


#endif

-- method ViewStack::remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the child to remove"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_remove" adw_view_stack_remove :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes a child widget from /@self@/.
-- 
-- /Since: 1.0/
viewStackRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: the child to remove
    -> m ()
viewStackRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> m ()
viewStackRemove a
self 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ViewStack -> Ptr Widget -> IO ()
adw_view_stack_remove Ptr ViewStack
self' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewStackRemoveMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackRemoveMethodInfo a signature where
    overloadedMethod = viewStackRemove

instance O.OverloadedMethodInfo ViewStackRemoveMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackRemove",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackRemove"
        })


#endif

-- method ViewStack::set_hhomogeneous
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "hhomogeneous"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "whether to make @self horizontally homogeneous"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_set_hhomogeneous" adw_view_stack_set_hhomogeneous :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    CInt ->                                 -- hhomogeneous : TBasicType TBoolean
    IO ()

-- | Sets /@self@/ to be horizontally homogeneous or not.
-- 
-- If the stack is horizontally homogeneous, it allocates the same width for
-- all children.
-- 
-- If it\'s @FALSE@, the stack may change width when a different child becomes
-- visible.
-- 
-- /Since: 1.0/
viewStackSetHhomogeneous ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> Bool
    -- ^ /@hhomogeneous@/: whether to make /@self@/ horizontally homogeneous
    -> m ()
viewStackSetHhomogeneous :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> Bool -> m ()
viewStackSetHhomogeneous a
self Bool
hhomogeneous = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let hhomogeneous' :: CInt
hhomogeneous' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
hhomogeneous
    Ptr ViewStack -> CInt -> IO ()
adw_view_stack_set_hhomogeneous Ptr ViewStack
self' CInt
hhomogeneous'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewStackSetHhomogeneousMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackSetHhomogeneousMethodInfo a signature where
    overloadedMethod = viewStackSetHhomogeneous

instance O.OverloadedMethodInfo ViewStackSetHhomogeneousMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackSetHhomogeneous",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackSetHhomogeneous"
        })


#endif

-- method ViewStack::set_vhomogeneous
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "vhomogeneous"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to make @self vertically homogeneous"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_set_vhomogeneous" adw_view_stack_set_vhomogeneous :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    CInt ->                                 -- vhomogeneous : TBasicType TBoolean
    IO ()

-- | Sets /@self@/ to be vertically homogeneous or not.
-- 
-- If the stack is vertically homogeneous, it allocates the same height for
-- all children.
-- 
-- If it\'s @FALSE@, the stack may change height when a different child becomes
-- visible.
-- 
-- /Since: 1.0/
viewStackSetVhomogeneous ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> Bool
    -- ^ /@vhomogeneous@/: whether to make /@self@/ vertically homogeneous
    -> m ()
viewStackSetVhomogeneous :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> Bool -> m ()
viewStackSetVhomogeneous a
self Bool
vhomogeneous = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let vhomogeneous' :: CInt
vhomogeneous' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
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
fromEnum) Bool
vhomogeneous
    Ptr ViewStack -> CInt -> IO ()
adw_view_stack_set_vhomogeneous Ptr ViewStack
self' CInt
vhomogeneous'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewStackSetVhomogeneousMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackSetVhomogeneousMethodInfo a signature where
    overloadedMethod = viewStackSetVhomogeneous

instance O.OverloadedMethodInfo ViewStackSetVhomogeneousMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackSetVhomogeneous",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackSetVhomogeneous"
        })


#endif

-- method ViewStack::set_visible_child
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "child"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a child of @self" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_set_visible_child" adw_view_stack_set_visible_child :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Makes /@child@/ the visible child of /@self@/.
-- 
-- /Since: 1.0/
viewStackSetVisibleChild ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@self@/: a view stack
    -> b
    -- ^ /@child@/: a child of /@self@/
    -> m ()
viewStackSetVisibleChild :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewStack a, IsWidget b) =>
a -> b -> m ()
viewStackSetVisibleChild a
self 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr ViewStack -> Ptr Widget -> IO ()
adw_view_stack_set_visible_child Ptr ViewStack
self' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewStackSetVisibleChildMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsViewStack a, Gtk.Widget.IsWidget b) => O.OverloadedMethod ViewStackSetVisibleChildMethodInfo a signature where
    overloadedMethod = viewStackSetVisibleChild

instance O.OverloadedMethodInfo ViewStackSetVisibleChildMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackSetVisibleChild",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackSetVisibleChild"
        })


#endif

-- method ViewStack::set_visible_child_name
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a view stack" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "name"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the name of the child"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_stack_set_visible_child_name" adw_view_stack_set_visible_child_name :: 
    Ptr ViewStack ->                        -- self : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    CString ->                              -- name : TBasicType TUTF8
    IO ()

-- | Makes the child with /@name@/ visible.
-- 
-- See [property/@viewStack@/:visible-child].
-- 
-- /Since: 1.0/
viewStackSetVisibleChildName ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewStack a) =>
    a
    -- ^ /@self@/: a view stack
    -> T.Text
    -- ^ /@name@/: the name of the child
    -> m ()
viewStackSetVisibleChildName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewStack a) =>
a -> Text -> m ()
viewStackSetVisibleChildName a
self Text
name = 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 ViewStack
self' <- a -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr CChar
name' <- Text -> IO (Ptr CChar)
textToCString Text
name
    Ptr ViewStack -> Ptr CChar -> IO ()
adw_view_stack_set_visible_child_name Ptr ViewStack
self' Ptr CChar
name'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Ptr CChar -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CChar
name'
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewStackSetVisibleChildNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsViewStack a) => O.OverloadedMethod ViewStackSetVisibleChildNameMethodInfo a signature where
    overloadedMethod = viewStackSetVisibleChildName

instance O.OverloadedMethodInfo ViewStackSetVisibleChildNameMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewStack.viewStackSetVisibleChildName",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.3/docs/GI-Adw-Objects-ViewStack.html#v:viewStackSetVisibleChildName"
        })


#endif