{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- A view switcher action bar.
-- 
-- An action bar letting you switch between multiple views contained in a
-- t'GI.Adw.Objects.ViewStack.ViewStack', via an t'GI.Adw.Objects.ViewSwitcher.ViewSwitcher'. It is designed to be put
-- at the bottom of a window and to be revealed only on really narrow windows,
-- e.g. on mobile phones. It can\'t be revealed if there are less than two pages.
-- 
-- You can conveniently bind the [ViewSwitcherBar:reveal]("GI.Adw.Objects.ViewSwitcherBar#g:attr:reveal") property
-- to [ViewSwitcherTitle:titleVisible]("GI.Adw.Objects.ViewSwitcherTitle#g:attr:titleVisible") to automatically reveal the
-- view switcher bar when the title label is displayed in place of the view
-- switcher.
-- 
-- An example of the UI definition for a common use case:
-- 
-- 
-- === /xml code/
-- ><object class="GtkWindow"/>
-- >  <child type="titlebar">
-- >    <object class="AdwHeaderBar">
-- >      <property name="centering-policy">strict</property>
-- >      <child type="title">
-- >        <object class="AdwViewSwitcherTitle" id="title">
-- >          <property name="stack">stack</property>
-- >        </object>
-- >      </child>
-- >    </object>
-- >  </child>
-- >  <child>
-- >    <object class="GtkBox">
-- >      <child>
-- >        <object class="AdwViewStack" id="stack"/>
-- >      </child>
-- >      <child>
-- >        <object class="AdwViewSwitcherBar">
-- >          <property name="stack">stack</property>
-- >          <binding name="reveal">
-- >            <lookup name="title-visible">title</lookup>
-- >          </binding>
-- >        </object>
-- >      </child>
-- >    </object>
-- >  </child>
-- ></object>
-- 
-- 
-- == CSS nodes
-- 
-- @AdwViewSwitcherBar@ has a single CSS node with name@ viewswitcherbar@.
-- 
-- /Since: 1.0/

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

module GI.Adw.Objects.ViewSwitcherBar
    ( 

-- * Exported types
    ViewSwitcherBar(..)                     ,
    IsViewSwitcherBar                       ,
    toViewSwitcherBar                       ,


 -- * 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"), [addController]("GI.Gtk.Objects.Widget#g:method:addController"), [addCssClass]("GI.Gtk.Objects.Widget#g:method:addCssClass"), [addMnemonicLabel]("GI.Gtk.Objects.Widget#g:method:addMnemonicLabel"), [addTickCallback]("GI.Gtk.Objects.Widget#g:method:addTickCallback"), [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"), [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"), [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"), [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"), [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"), [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"), [getReveal]("GI.Adw.Objects.ViewSwitcherBar#g:method:getReveal"), [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"), [getStack]("GI.Adw.Objects.ViewSwitcherBar#g:method:getStack"), [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"), [getVisible]("GI.Gtk.Objects.Widget#g:method:getVisible"), [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"), [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"), [setReveal]("GI.Adw.Objects.ViewSwitcherBar#g:method:setReveal"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setStack]("GI.Adw.Objects.ViewSwitcherBar#g:method:setStack"), [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"), [setVisible]("GI.Gtk.Objects.Widget#g:method:setVisible").

#if defined(ENABLE_OVERLOADING)
    ResolveViewSwitcherBarMethod            ,
#endif

-- ** getReveal #method:getReveal#

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarGetRevealMethodInfo      ,
#endif
    viewSwitcherBarGetReveal                ,


-- ** getStack #method:getStack#

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarGetStackMethodInfo       ,
#endif
    viewSwitcherBarGetStack                 ,


-- ** new #method:new#

    viewSwitcherBarNew                      ,


-- ** setReveal #method:setReveal#

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarSetRevealMethodInfo      ,
#endif
    viewSwitcherBarSetReveal                ,


-- ** setStack #method:setStack#

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarSetStackMethodInfo       ,
#endif
    viewSwitcherBarSetStack                 ,




 -- * Properties


-- ** reveal #attr:reveal#
-- | Whether the bar should be revealed or hidden.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarRevealPropertyInfo       ,
#endif
    constructViewSwitcherBarReveal          ,
    getViewSwitcherBarReveal                ,
    setViewSwitcherBarReveal                ,
#if defined(ENABLE_OVERLOADING)
    viewSwitcherBarReveal                   ,
#endif


-- ** stack #attr:stack#
-- | The stack the view switcher controls.
-- 
-- /Since: 1.0/

#if defined(ENABLE_OVERLOADING)
    ViewSwitcherBarStackPropertyInfo        ,
#endif
    clearViewSwitcherBarStack               ,
    constructViewSwitcherBarStack           ,
    getViewSwitcherBarStack                 ,
    setViewSwitcherBarStack                 ,
#if defined(ENABLE_OVERLOADING)
    viewSwitcherBarStack                    ,
#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.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.ViewStack as Adw.ViewStack
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.Objects.Widget as Gtk.Widget

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

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

foreign import ccall "adw_view_switcher_bar_get_type"
    c_adw_view_switcher_bar_get_type :: IO B.Types.GType

instance B.Types.TypedObject ViewSwitcherBar where
    glibType :: IO GType
glibType = IO GType
c_adw_view_switcher_bar_get_type

instance B.Types.GObject ViewSwitcherBar

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

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

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

-- | Convert 'ViewSwitcherBar' 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 ViewSwitcherBar) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_adw_view_switcher_bar_get_type
    gvalueSet_ :: Ptr GValue -> Maybe ViewSwitcherBar -> IO ()
gvalueSet_ Ptr GValue
gv Maybe ViewSwitcherBar
P.Nothing = Ptr GValue -> Ptr ViewSwitcherBar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr ViewSwitcherBar
forall a. Ptr a
FP.nullPtr :: FP.Ptr ViewSwitcherBar)
    gvalueSet_ Ptr GValue
gv (P.Just ViewSwitcherBar
obj) = ViewSwitcherBar -> (Ptr ViewSwitcherBar -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ViewSwitcherBar
obj (Ptr GValue -> Ptr ViewSwitcherBar -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe ViewSwitcherBar)
gvalueGet_ Ptr GValue
gv = do
        Ptr ViewSwitcherBar
ptr <- Ptr GValue -> IO (Ptr ViewSwitcherBar)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr ViewSwitcherBar)
        if Ptr ViewSwitcherBar
ptr Ptr ViewSwitcherBar -> Ptr ViewSwitcherBar -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr ViewSwitcherBar
forall a. Ptr a
FP.nullPtr
        then ViewSwitcherBar -> Maybe ViewSwitcherBar
forall a. a -> Maybe a
P.Just (ViewSwitcherBar -> Maybe ViewSwitcherBar)
-> IO ViewSwitcherBar -> IO (Maybe ViewSwitcherBar)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr ViewSwitcherBar -> ViewSwitcherBar)
-> Ptr ViewSwitcherBar -> IO ViewSwitcherBar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ViewSwitcherBar -> ViewSwitcherBar
ViewSwitcherBar Ptr ViewSwitcherBar
ptr
        else Maybe ViewSwitcherBar -> IO (Maybe ViewSwitcherBar)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ViewSwitcherBar
forall a. Maybe a
P.Nothing
        
    

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

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

#endif

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

#endif

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

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

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

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

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

-- VVV Prop "stack"
   -- Type: TInterface (Name {namespace = "Adw", name = "ViewStack"})
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

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

-- | Set the value of the “@stack@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' viewSwitcherBar [ #stack 'Data.GI.Base.Attributes.:=' value ]
-- @
setViewSwitcherBarStack :: (MonadIO m, IsViewSwitcherBar o, Adw.ViewStack.IsViewStack a) => o -> a -> m ()
setViewSwitcherBarStack :: forall (m :: * -> *) o a.
(MonadIO m, IsViewSwitcherBar o, IsViewStack a) =>
o -> a -> m ()
setViewSwitcherBarStack o
obj a
val = IO () -> m ()
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
"stack" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)

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

-- | Set the value of the “@stack@” property to `Nothing`.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.clear' #stack
-- @
clearViewSwitcherBarStack :: (MonadIO m, IsViewSwitcherBar o) => o -> m ()
clearViewSwitcherBarStack :: forall (m :: * -> *) o.
(MonadIO m, IsViewSwitcherBar o) =>
o -> m ()
clearViewSwitcherBarStack o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe ViewStack -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"stack" (Maybe ViewStack
forall a. Maybe a
Nothing :: Maybe Adw.ViewStack.ViewStack)

#if defined(ENABLE_OVERLOADING)
data ViewSwitcherBarStackPropertyInfo
instance AttrInfo ViewSwitcherBarStackPropertyInfo where
    type AttrAllowedOps ViewSwitcherBarStackPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint ViewSwitcherBarStackPropertyInfo = IsViewSwitcherBar
    type AttrSetTypeConstraint ViewSwitcherBarStackPropertyInfo = Adw.ViewStack.IsViewStack
    type AttrTransferTypeConstraint ViewSwitcherBarStackPropertyInfo = Adw.ViewStack.IsViewStack
    type AttrTransferType ViewSwitcherBarStackPropertyInfo = Adw.ViewStack.ViewStack
    type AttrGetType ViewSwitcherBarStackPropertyInfo = (Maybe Adw.ViewStack.ViewStack)
    type AttrLabel ViewSwitcherBarStackPropertyInfo = "stack"
    type AttrOrigin ViewSwitcherBarStackPropertyInfo = ViewSwitcherBar
    attrGet = getViewSwitcherBarStack
    attrSet = setViewSwitcherBarStack
    attrTransfer _ v = do
        unsafeCastTo Adw.ViewStack.ViewStack v
    attrConstruct = constructViewSwitcherBarStack
    attrClear = clearViewSwitcherBarStack
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.Adw.Objects.ViewSwitcherBar.stack"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-adwaita-1.0.1/docs/GI-Adw-Objects-ViewSwitcherBar.html#g:attr:stack"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ViewSwitcherBar
type instance O.AttributeList ViewSwitcherBar = ViewSwitcherBarAttributeList
type ViewSwitcherBarAttributeList = ('[ '("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), '("layoutManager", Gtk.Widget.WidgetLayoutManagerPropertyInfo), '("marginBottom", Gtk.Widget.WidgetMarginBottomPropertyInfo), '("marginEnd", Gtk.Widget.WidgetMarginEndPropertyInfo), '("marginStart", Gtk.Widget.WidgetMarginStartPropertyInfo), '("marginTop", Gtk.Widget.WidgetMarginTopPropertyInfo), '("name", Gtk.Widget.WidgetNamePropertyInfo), '("opacity", Gtk.Widget.WidgetOpacityPropertyInfo), '("overflow", Gtk.Widget.WidgetOverflowPropertyInfo), '("parent", Gtk.Widget.WidgetParentPropertyInfo), '("receivesDefault", Gtk.Widget.WidgetReceivesDefaultPropertyInfo), '("reveal", ViewSwitcherBarRevealPropertyInfo), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("stack", ViewSwitcherBarStackPropertyInfo), '("tooltipMarkup", Gtk.Widget.WidgetTooltipMarkupPropertyInfo), '("tooltipText", Gtk.Widget.WidgetTooltipTextPropertyInfo), '("valign", Gtk.Widget.WidgetValignPropertyInfo), '("vexpand", Gtk.Widget.WidgetVexpandPropertyInfo), '("vexpandSet", Gtk.Widget.WidgetVexpandSetPropertyInfo), '("visible", Gtk.Widget.WidgetVisiblePropertyInfo), '("widthRequest", Gtk.Widget.WidgetWidthRequestPropertyInfo)] :: [(Symbol, *)])
#endif

#if defined(ENABLE_OVERLOADING)
viewSwitcherBarReveal :: AttrLabelProxy "reveal"
viewSwitcherBarReveal = AttrLabelProxy

viewSwitcherBarStack :: AttrLabelProxy "stack"
viewSwitcherBarStack = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ViewSwitcherBar = ViewSwitcherBarSignalList
type ViewSwitcherBarSignalList = ('[ '("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 ViewSwitcherBar::new
-- method type : Constructor
-- Args: []
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "Adw" , name = "ViewSwitcherBar" })
-- throws : False
-- Skip return : False

foreign import ccall "adw_view_switcher_bar_new" adw_view_switcher_bar_new :: 
    IO (Ptr ViewSwitcherBar)

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

#if defined(ENABLE_OVERLOADING)
#endif

-- method ViewSwitcherBar::get_reveal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewSwitcherBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `AdwViewSwitcherBar`"
--                 , 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_switcher_bar_get_reveal" adw_view_switcher_bar_get_reveal :: 
    Ptr ViewSwitcherBar ->                  -- self : TInterface (Name {namespace = "Adw", name = "ViewSwitcherBar"})
    IO CInt

-- | Gets whether /@self@/ should be revealed or hidden.
-- 
-- /Since: 1.0/
viewSwitcherBarGetReveal ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
    a
    -- ^ /@self@/: a @AdwViewSwitcherBar@
    -> m Bool
    -- ^ __Returns:__ whether /@self@/ is revealed
viewSwitcherBarGetReveal :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
a -> m Bool
viewSwitcherBarGetReveal a
self = IO Bool -> m Bool
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 ViewSwitcherBar
self' <- a -> IO (Ptr ViewSwitcherBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    CInt
result <- Ptr ViewSwitcherBar -> IO CInt
adw_view_switcher_bar_get_reveal Ptr ViewSwitcherBar
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 (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data ViewSwitcherBarGetRevealMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsViewSwitcherBar a) => O.OverloadedMethod ViewSwitcherBarGetRevealMethodInfo a signature where
    overloadedMethod = viewSwitcherBarGetReveal

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


#endif

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

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

-- | Gets the stack controlled by /@self@/.
-- 
-- /Since: 1.0/
viewSwitcherBarGetStack ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
    a
    -- ^ /@self@/: a @AdwViewSwitcherBar@
    -> m (Maybe Adw.ViewStack.ViewStack)
    -- ^ __Returns:__ the stack
viewSwitcherBarGetStack :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
a -> m (Maybe ViewStack)
viewSwitcherBarGetStack a
self = IO (Maybe ViewStack) -> m (Maybe ViewStack)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe ViewStack) -> m (Maybe ViewStack))
-> IO (Maybe ViewStack) -> m (Maybe ViewStack)
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewSwitcherBar
self' <- a -> IO (Ptr ViewSwitcherBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr ViewStack
result <- Ptr ViewSwitcherBar -> IO (Ptr ViewStack)
adw_view_switcher_bar_get_stack Ptr ViewSwitcherBar
self'
    Maybe ViewStack
maybeResult <- Ptr ViewStack
-> (Ptr ViewStack -> IO ViewStack) -> IO (Maybe ViewStack)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr ViewStack
result ((Ptr ViewStack -> IO ViewStack) -> IO (Maybe ViewStack))
-> (Ptr ViewStack -> IO ViewStack) -> IO (Maybe ViewStack)
forall a b. (a -> b) -> a -> b
$ \Ptr ViewStack
result' -> do
        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
Adw.ViewStack.ViewStack) Ptr ViewStack
result'
        ViewStack -> IO ViewStack
forall (m :: * -> *) a. Monad m => a -> m a
return ViewStack
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe ViewStack -> IO (Maybe ViewStack)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe ViewStack
maybeResult

#if defined(ENABLE_OVERLOADING)
data ViewSwitcherBarGetStackMethodInfo
instance (signature ~ (m (Maybe Adw.ViewStack.ViewStack)), MonadIO m, IsViewSwitcherBar a) => O.OverloadedMethod ViewSwitcherBarGetStackMethodInfo a signature where
    overloadedMethod = viewSwitcherBarGetStack

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


#endif

-- method ViewSwitcherBar::set_reveal
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewSwitcherBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `AdwViewSwitcherBar`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "reveal"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "whether to reveal @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_switcher_bar_set_reveal" adw_view_switcher_bar_set_reveal :: 
    Ptr ViewSwitcherBar ->                  -- self : TInterface (Name {namespace = "Adw", name = "ViewSwitcherBar"})
    CInt ->                                 -- reveal : TBasicType TBoolean
    IO ()

-- | Sets whether /@self@/ should be revealed or hidden.
-- 
-- /Since: 1.0/
viewSwitcherBarSetReveal ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
    a
    -- ^ /@self@/: a @AdwViewSwitcherBar@
    -> Bool
    -- ^ /@reveal@/: whether to reveal /@self@/
    -> m ()
viewSwitcherBarSetReveal :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsViewSwitcherBar a) =>
a -> Bool -> m ()
viewSwitcherBarSetReveal a
self Bool
reveal = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewSwitcherBar
self' <- a -> IO (Ptr ViewSwitcherBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    let reveal' :: CInt
reveal' = (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
reveal
    Ptr ViewSwitcherBar -> CInt -> IO ()
adw_view_switcher_bar_set_reveal Ptr ViewSwitcherBar
self' CInt
reveal'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewSwitcherBarSetRevealMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsViewSwitcherBar a) => O.OverloadedMethod ViewSwitcherBarSetRevealMethodInfo a signature where
    overloadedMethod = viewSwitcherBarSetReveal

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


#endif

-- method ViewSwitcherBar::set_stack
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "self"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewSwitcherBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a `AdwViewSwitcherBar`"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "stack"
--           , argType =
--               TInterface Name { namespace = "Adw" , name = "ViewStack" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a stack" , 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_switcher_bar_set_stack" adw_view_switcher_bar_set_stack :: 
    Ptr ViewSwitcherBar ->                  -- self : TInterface (Name {namespace = "Adw", name = "ViewSwitcherBar"})
    Ptr Adw.ViewStack.ViewStack ->          -- stack : TInterface (Name {namespace = "Adw", name = "ViewStack"})
    IO ()

-- | Sets the stack controlled by /@self@/.
-- 
-- /Since: 1.0/
viewSwitcherBarSetStack ::
    (B.CallStack.HasCallStack, MonadIO m, IsViewSwitcherBar a, Adw.ViewStack.IsViewStack b) =>
    a
    -- ^ /@self@/: a @AdwViewSwitcherBar@
    -> Maybe (b)
    -- ^ /@stack@/: a stack
    -> m ()
viewSwitcherBarSetStack :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsViewSwitcherBar a, IsViewStack b) =>
a -> Maybe b -> m ()
viewSwitcherBarSetStack a
self Maybe b
stack = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ViewSwitcherBar
self' <- a -> IO (Ptr ViewSwitcherBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
    Ptr ViewStack
maybeStack <- case Maybe b
stack of
        Maybe b
Nothing -> Ptr ViewStack -> IO (Ptr ViewStack)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ViewStack
forall a. Ptr a
nullPtr
        Just b
jStack -> do
            Ptr ViewStack
jStack' <- b -> IO (Ptr ViewStack)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jStack
            Ptr ViewStack -> IO (Ptr ViewStack)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr ViewStack
jStack'
    Ptr ViewSwitcherBar -> Ptr ViewStack -> IO ()
adw_view_switcher_bar_set_stack Ptr ViewSwitcherBar
self' Ptr ViewStack
maybeStack
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
stack b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data ViewSwitcherBarSetStackMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsViewSwitcherBar a, Adw.ViewStack.IsViewStack b) => O.OverloadedMethod ViewSwitcherBarSetStackMethodInfo a signature where
    overloadedMethod = viewSwitcherBarSetStack

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


#endif