{-# LANGUAGE TypeApplications #-}


-- | Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- GtkHeaderBar is similar to a horizontal t'GI.Gtk.Objects.Box.Box'. It allows children to
-- be placed at the start or the end. In addition, it allows the window
-- title to be displayed. The title will be centered with respect to the
-- width of the box, even if the children at either side take up different
-- amounts of space.
-- 
-- GtkHeaderBar can add typical window frame controls, such as minimize,
-- maximize and close buttons, or the window icon.
-- 
-- For these reasons, GtkHeaderBar is the natural choice for use as the custom
-- titlebar widget of a t'GI.Gtk.Objects.Window.Window' (see 'GI.Gtk.Objects.Window.windowSetTitlebar'), as it gives
-- features typical of titlebars while allowing the addition of child widgets.
-- 
-- The GtkHeaderBar implementation of the t'GI.Gtk.Interfaces.Buildable.Buildable' interface supports
-- adding children at the start or end sides by specifying “start” or “end” as
-- the “type” attribute of a \<child> element, or setting the title widget by
-- specifying “title” value.
-- 
-- By default the GtkHeaderBar uses a t'GI.Gtk.Objects.Label.Label' displaying the title of the
-- window it is contained in as the title widget, equivalent to the following
-- UI definition:
-- 
-- >
-- ><object class="GtkHeaderBar">
-- >  <property name="title-widget">
-- >    <object class="GtkLabel">
-- >      <property name="label" translatable="yes">Label</property>
-- >      <property name="single-line-mode">True</property>
-- >      <property name="ellipsize">end</property>
-- >      <property name="width-chars">5</property>
-- >      <style>
-- >        <class name="title"/>
-- >      </style>
-- >    </object>
-- >  </property>
-- ></object>
-- 
-- 
-- = CSS nodes
-- 
-- 
-- === /plain code/
-- >
-- >headerbar
-- >╰── windowhandle
-- >    ╰── box
-- >        ├── box.start
-- >        │   ├── windowcontrols.start
-- >        │   ╰── [other children]
-- >        ├── [Title Widget]
-- >        ╰── box.end
-- >            ├── [other children]
-- >            ╰── windowcontrols.end
-- 
-- 
-- A t'GI.Gtk.Objects.HeaderBar.HeaderBar'\'s CSS node is called @headerbar@. It contains a @windowhandle@
-- subnode, which contains a @box@ subnode, which contains two @box@ subnodes at
-- the start and end of the header bar, as well as a center node that represents
-- the title.
-- 
-- Each of the boxes contains a @windowcontrols@ subnode, see t'GI.Gtk.Objects.WindowControls.WindowControls'
-- for details, as well as other children.
-- 
-- = Accessibility
-- 
-- GtkHeaderBar uses the 'GI.Gtk.Enums.AccessibleRoleGroup' role.

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

module GI.Gtk.Objects.HeaderBar
    ( 

-- * Exported types
    HeaderBar(..)                           ,
    IsHeaderBar                             ,
    toHeaderBar                             ,


 -- * 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"), [packEnd]("GI.Gtk.Objects.HeaderBar#g:method:packEnd"), [packStart]("GI.Gtk.Objects.HeaderBar#g:method:packStart"), [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.Gtk.Objects.HeaderBar#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"), [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"), [getDecorationLayout]("GI.Gtk.Objects.HeaderBar#g:method:getDecorationLayout"), [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"), [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"), [getShowTitleButtons]("GI.Gtk.Objects.HeaderBar#g:method:getShowTitleButtons"), [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"), [getTitleWidget]("GI.Gtk.Objects.HeaderBar#g:method:getTitleWidget"), [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"), [setDecorationLayout]("GI.Gtk.Objects.HeaderBar#g:method:setDecorationLayout"), [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"), [setSensitive]("GI.Gtk.Objects.Widget#g:method:setSensitive"), [setShowTitleButtons]("GI.Gtk.Objects.HeaderBar#g:method:setShowTitleButtons"), [setSizeRequest]("GI.Gtk.Objects.Widget#g:method:setSizeRequest"), [setStateFlags]("GI.Gtk.Objects.Widget#g:method:setStateFlags"), [setTitleWidget]("GI.Gtk.Objects.HeaderBar#g:method:setTitleWidget"), [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)
    ResolveHeaderBarMethod                  ,
#endif

-- ** getDecorationLayout #method:getDecorationLayout#

#if defined(ENABLE_OVERLOADING)
    HeaderBarGetDecorationLayoutMethodInfo  ,
#endif
    headerBarGetDecorationLayout            ,


-- ** getShowTitleButtons #method:getShowTitleButtons#

#if defined(ENABLE_OVERLOADING)
    HeaderBarGetShowTitleButtonsMethodInfo  ,
#endif
    headerBarGetShowTitleButtons            ,


-- ** getTitleWidget #method:getTitleWidget#

#if defined(ENABLE_OVERLOADING)
    HeaderBarGetTitleWidgetMethodInfo       ,
#endif
    headerBarGetTitleWidget                 ,


-- ** new #method:new#

    headerBarNew                            ,


-- ** packEnd #method:packEnd#

#if defined(ENABLE_OVERLOADING)
    HeaderBarPackEndMethodInfo              ,
#endif
    headerBarPackEnd                        ,


-- ** packStart #method:packStart#

#if defined(ENABLE_OVERLOADING)
    HeaderBarPackStartMethodInfo            ,
#endif
    headerBarPackStart                      ,


-- ** remove #method:remove#

#if defined(ENABLE_OVERLOADING)
    HeaderBarRemoveMethodInfo               ,
#endif
    headerBarRemove                         ,


-- ** setDecorationLayout #method:setDecorationLayout#

#if defined(ENABLE_OVERLOADING)
    HeaderBarSetDecorationLayoutMethodInfo  ,
#endif
    headerBarSetDecorationLayout            ,


-- ** setShowTitleButtons #method:setShowTitleButtons#

#if defined(ENABLE_OVERLOADING)
    HeaderBarSetShowTitleButtonsMethodInfo  ,
#endif
    headerBarSetShowTitleButtons            ,


-- ** setTitleWidget #method:setTitleWidget#

#if defined(ENABLE_OVERLOADING)
    HeaderBarSetTitleWidgetMethodInfo       ,
#endif
    headerBarSetTitleWidget                 ,




 -- * Properties


-- ** decorationLayout #attr:decorationLayout#
-- | The decoration layout for buttons. If this property is
-- not set, the t'GI.Gtk.Objects.Settings.Settings':@/gtk-decoration-layout/@ setting
-- is used.
-- 
-- See 'GI.Gtk.Objects.HeaderBar.headerBarSetDecorationLayout' for information
-- about the format of this string.

#if defined(ENABLE_OVERLOADING)
    HeaderBarDecorationLayoutPropertyInfo   ,
#endif
    clearHeaderBarDecorationLayout          ,
    constructHeaderBarDecorationLayout      ,
    getHeaderBarDecorationLayout            ,
#if defined(ENABLE_OVERLOADING)
    headerBarDecorationLayout               ,
#endif
    setHeaderBarDecorationLayout            ,


-- ** showTitleButtons #attr:showTitleButtons#
-- | Whether to show title buttons like close, minimize, maximize.
-- 
-- Which buttons are actually shown and where is determined
-- by the t'GI.Gtk.Objects.HeaderBar.HeaderBar':@/decoration-layout/@ property, and by
-- the state of the window (e.g. a close button will not be
-- shown if the window can\'t be closed).

#if defined(ENABLE_OVERLOADING)
    HeaderBarShowTitleButtonsPropertyInfo   ,
#endif
    constructHeaderBarShowTitleButtons      ,
    getHeaderBarShowTitleButtons            ,
#if defined(ENABLE_OVERLOADING)
    headerBarShowTitleButtons               ,
#endif
    setHeaderBarShowTitleButtons            ,


-- ** titleWidget #attr:titleWidget#
-- | /No description available in the introspection data./

#if defined(ENABLE_OVERLOADING)
    HeaderBarTitleWidgetPropertyInfo        ,
#endif
    clearHeaderBarTitleWidget               ,
    constructHeaderBarTitleWidget           ,
    getHeaderBarTitleWidget                 ,
#if defined(ENABLE_OVERLOADING)
    headerBarTitleWidget                    ,
#endif
    setHeaderBarTitleWidget                 ,




    ) 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.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 qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Accessible as Gtk.Accessible
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.ConstraintTarget as Gtk.ConstraintTarget
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget

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

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

foreign import ccall "gtk_header_bar_get_type"
    c_gtk_header_bar_get_type :: IO B.Types.GType

instance B.Types.TypedObject HeaderBar where
    glibType :: IO GType
glibType = IO GType
c_gtk_header_bar_get_type

instance B.Types.GObject HeaderBar

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

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

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

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

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

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

#endif

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

#endif

-- VVV Prop "decoration-layout"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just True,Just True)

-- | Get the value of the “@decoration-layout@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' headerBar #decorationLayout
-- @
getHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe T.Text)
getHeaderBarDecorationLayout :: forall (m :: * -> *) o.
(MonadIO m, IsHeaderBar o) =>
o -> m (Maybe Text)
getHeaderBarDecorationLayout o
obj = IO (Maybe Text) -> m (Maybe Text)
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
"decoration-layout"

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

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

-- | Set the value of the “@decoration-layout@” 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' #decorationLayout
-- @
clearHeaderBarDecorationLayout :: (MonadIO m, IsHeaderBar o) => o -> m ()
clearHeaderBarDecorationLayout :: forall (m :: * -> *) o. (MonadIO m, IsHeaderBar o) => o -> m ()
clearHeaderBarDecorationLayout 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 Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"decoration-layout" (Maybe Text
forall a. Maybe a
Nothing :: Maybe T.Text)

#if defined(ENABLE_OVERLOADING)
data HeaderBarDecorationLayoutPropertyInfo
instance AttrInfo HeaderBarDecorationLayoutPropertyInfo where
    type AttrAllowedOps HeaderBarDecorationLayoutPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint HeaderBarDecorationLayoutPropertyInfo = IsHeaderBar
    type AttrSetTypeConstraint HeaderBarDecorationLayoutPropertyInfo = (~) T.Text
    type AttrTransferTypeConstraint HeaderBarDecorationLayoutPropertyInfo = (~) T.Text
    type AttrTransferType HeaderBarDecorationLayoutPropertyInfo = T.Text
    type AttrGetType HeaderBarDecorationLayoutPropertyInfo = (Maybe T.Text)
    type AttrLabel HeaderBarDecorationLayoutPropertyInfo = "decoration-layout"
    type AttrOrigin HeaderBarDecorationLayoutPropertyInfo = HeaderBar
    attrGet = getHeaderBarDecorationLayout
    attrSet = setHeaderBarDecorationLayout
    attrTransfer _ v = do
        return v
    attrConstruct = constructHeaderBarDecorationLayout
    attrClear = clearHeaderBarDecorationLayout
#endif

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

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

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

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

#if defined(ENABLE_OVERLOADING)
data HeaderBarShowTitleButtonsPropertyInfo
instance AttrInfo HeaderBarShowTitleButtonsPropertyInfo where
    type AttrAllowedOps HeaderBarShowTitleButtonsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint HeaderBarShowTitleButtonsPropertyInfo = IsHeaderBar
    type AttrSetTypeConstraint HeaderBarShowTitleButtonsPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint HeaderBarShowTitleButtonsPropertyInfo = (~) Bool
    type AttrTransferType HeaderBarShowTitleButtonsPropertyInfo = Bool
    type AttrGetType HeaderBarShowTitleButtonsPropertyInfo = Bool
    type AttrLabel HeaderBarShowTitleButtonsPropertyInfo = "show-title-buttons"
    type AttrOrigin HeaderBarShowTitleButtonsPropertyInfo = HeaderBar
    attrGet = getHeaderBarShowTitleButtons
    attrSet = setHeaderBarShowTitleButtons
    attrTransfer _ v = do
        return v
    attrConstruct = constructHeaderBarShowTitleButtons
    attrClear = undefined
#endif

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

-- | Get the value of the “@title-widget@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' headerBar #titleWidget
-- @
getHeaderBarTitleWidget :: (MonadIO m, IsHeaderBar o) => o -> m (Maybe Gtk.Widget.Widget)
getHeaderBarTitleWidget :: forall (m :: * -> *) o.
(MonadIO m, IsHeaderBar o) =>
o -> m (Maybe Widget)
getHeaderBarTitleWidget o
obj = IO (Maybe Widget) -> m (Maybe Widget)
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
"title-widget" ManagedPtr Widget -> Widget
Gtk.Widget.Widget

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

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

-- | Set the value of the “@title-widget@” 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' #titleWidget
-- @
clearHeaderBarTitleWidget :: (MonadIO m, IsHeaderBar o) => o -> m ()
clearHeaderBarTitleWidget :: forall (m :: * -> *) o. (MonadIO m, IsHeaderBar o) => o -> m ()
clearHeaderBarTitleWidget 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 Widget -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"title-widget" (Maybe Widget
forall a. Maybe a
Nothing :: Maybe Gtk.Widget.Widget)

#if defined(ENABLE_OVERLOADING)
data HeaderBarTitleWidgetPropertyInfo
instance AttrInfo HeaderBarTitleWidgetPropertyInfo where
    type AttrAllowedOps HeaderBarTitleWidgetPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint HeaderBarTitleWidgetPropertyInfo = IsHeaderBar
    type AttrSetTypeConstraint HeaderBarTitleWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferTypeConstraint HeaderBarTitleWidgetPropertyInfo = Gtk.Widget.IsWidget
    type AttrTransferType HeaderBarTitleWidgetPropertyInfo = Gtk.Widget.Widget
    type AttrGetType HeaderBarTitleWidgetPropertyInfo = (Maybe Gtk.Widget.Widget)
    type AttrLabel HeaderBarTitleWidgetPropertyInfo = "title-widget"
    type AttrOrigin HeaderBarTitleWidgetPropertyInfo = HeaderBar
    attrGet = getHeaderBarTitleWidget
    attrSet = setHeaderBarTitleWidget
    attrTransfer _ v = do
        unsafeCastTo Gtk.Widget.Widget v
    attrConstruct = constructHeaderBarTitleWidget
    attrClear = clearHeaderBarTitleWidget
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList HeaderBar
type instance O.AttributeList HeaderBar = HeaderBarAttributeList
type HeaderBarAttributeList = ('[ '("accessibleRole", Gtk.Accessible.AccessibleAccessibleRolePropertyInfo), '("canFocus", Gtk.Widget.WidgetCanFocusPropertyInfo), '("canTarget", Gtk.Widget.WidgetCanTargetPropertyInfo), '("cssClasses", Gtk.Widget.WidgetCssClassesPropertyInfo), '("cssName", Gtk.Widget.WidgetCssNamePropertyInfo), '("cursor", Gtk.Widget.WidgetCursorPropertyInfo), '("decorationLayout", HeaderBarDecorationLayoutPropertyInfo), '("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), '("root", Gtk.Widget.WidgetRootPropertyInfo), '("scaleFactor", Gtk.Widget.WidgetScaleFactorPropertyInfo), '("sensitive", Gtk.Widget.WidgetSensitivePropertyInfo), '("showTitleButtons", HeaderBarShowTitleButtonsPropertyInfo), '("titleWidget", HeaderBarTitleWidgetPropertyInfo), '("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)
headerBarDecorationLayout :: AttrLabelProxy "decorationLayout"
headerBarDecorationLayout = AttrLabelProxy

headerBarShowTitleButtons :: AttrLabelProxy "showTitleButtons"
headerBarShowTitleButtons = AttrLabelProxy

headerBarTitleWidget :: AttrLabelProxy "titleWidget"
headerBarTitleWidget = AttrLabelProxy

#endif

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

foreign import ccall "gtk_header_bar_new" gtk_header_bar_new :: 
    IO (Ptr HeaderBar)

-- | Creates a new t'GI.Gtk.Objects.HeaderBar.HeaderBar' widget.
headerBarNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m HeaderBar
    -- ^ __Returns:__ a new t'GI.Gtk.Objects.HeaderBar.HeaderBar'
headerBarNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m HeaderBar
headerBarNew  = IO HeaderBar -> m HeaderBar
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO HeaderBar -> m HeaderBar) -> IO HeaderBar -> m HeaderBar
forall a b. (a -> b) -> a -> b
$ do
    Ptr HeaderBar
result <- IO (Ptr HeaderBar)
gtk_header_bar_new
    Text -> Ptr HeaderBar -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"headerBarNew" Ptr HeaderBar
result
    HeaderBar
result' <- ((ManagedPtr HeaderBar -> HeaderBar)
-> Ptr HeaderBar -> IO HeaderBar
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr HeaderBar -> HeaderBar
HeaderBar) Ptr HeaderBar
result
    HeaderBar -> IO HeaderBar
forall (m :: * -> *) a. Monad m => a -> m a
return HeaderBar
result'

#if defined(ENABLE_OVERLOADING)
#endif

-- method HeaderBar::get_decoration_layout
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , 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 "gtk_header_bar_get_decoration_layout" gtk_header_bar_get_decoration_layout :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    IO CString

-- | Gets the decoration layout set with
-- 'GI.Gtk.Objects.HeaderBar.headerBarSetDecorationLayout'.
headerBarGetDecorationLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> m (Maybe T.Text)
    -- ^ __Returns:__ the decoration layout
headerBarGetDecorationLayout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsHeaderBar a) =>
a -> m (Maybe Text)
headerBarGetDecorationLayout a
bar = IO (Maybe Text) -> m (Maybe Text)
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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    CString
result <- Ptr HeaderBar -> IO CString
gtk_header_bar_get_decoration_layout Ptr HeaderBar
bar'
    Maybe Text
maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull CString
result ((CString -> IO Text) -> IO (Maybe Text))
-> (CString -> IO Text) -> IO (Maybe Text)
forall a b. (a -> b) -> a -> b
$ \CString
result' -> do
        Text
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
        Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    Maybe Text -> IO (Maybe Text)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
maybeResult

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

instance O.OverloadedMethodInfo HeaderBarGetDecorationLayoutMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarGetDecorationLayout",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarGetDecorationLayout"
        }


#endif

-- method HeaderBar::get_show_title_buttons
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , 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 "gtk_header_bar_get_show_title_buttons" gtk_header_bar_get_show_title_buttons :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    IO CInt

-- | Returns whether this header bar shows the standard window
-- title buttons.
headerBarGetShowTitleButtons ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if title buttons are shown
headerBarGetShowTitleButtons :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsHeaderBar a) =>
a -> m Bool
headerBarGetShowTitleButtons a
bar = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    CInt
result <- Ptr HeaderBar -> IO CInt
gtk_header_bar_get_show_title_buttons Ptr HeaderBar
bar'
    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
bar
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data HeaderBarGetShowTitleButtonsMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsHeaderBar a) => O.OverloadedMethod HeaderBarGetShowTitleButtonsMethodInfo a signature where
    overloadedMethod = headerBarGetShowTitleButtons

instance O.OverloadedMethodInfo HeaderBarGetShowTitleButtonsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarGetShowTitleButtons",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarGetShowTitleButtons"
        }


#endif

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

foreign import ccall "gtk_header_bar_get_title_widget" gtk_header_bar_get_title_widget :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    IO (Ptr Gtk.Widget.Widget)

-- | Retrieves the title widget of the header. See
-- 'GI.Gtk.Objects.HeaderBar.headerBarSetTitleWidget'.
headerBarGetTitleWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> m (Maybe Gtk.Widget.Widget)
    -- ^ __Returns:__ the title widget
    --    of the header, or 'P.Nothing' if none has been set explicitly.
headerBarGetTitleWidget :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsHeaderBar a) =>
a -> m (Maybe Widget)
headerBarGetTitleWidget a
bar = IO (Maybe Widget) -> m (Maybe Widget)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Widget) -> m (Maybe Widget))
-> IO (Maybe Widget) -> m (Maybe Widget)
forall a b. (a -> b) -> a -> b
$ do
    Ptr HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    Ptr Widget
result <- Ptr HeaderBar -> IO (Ptr Widget)
gtk_header_bar_get_title_widget Ptr HeaderBar
bar'
    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 (m :: * -> *) a. Monad m => a -> m a
return Widget
result''
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    Maybe Widget -> IO (Maybe Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Widget
maybeResult

#if defined(ENABLE_OVERLOADING)
data HeaderBarGetTitleWidgetMethodInfo
instance (signature ~ (m (Maybe Gtk.Widget.Widget)), MonadIO m, IsHeaderBar a) => O.OverloadedMethod HeaderBarGetTitleWidgetMethodInfo a signature where
    overloadedMethod = headerBarGetTitleWidget

instance O.OverloadedMethodInfo HeaderBarGetTitleWidgetMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarGetTitleWidget",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarGetTitleWidget"
        }


#endif

-- method HeaderBar::pack_end
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkHeaderBar" , 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 #GtkWidget to be added to @bar"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_pack_end" gtk_header_bar_pack_end :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Adds /@child@/ to /@bar@/, packed with reference to the
-- end of the /@bar@/.
headerBarPackEnd ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@bar@/: A t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> b
    -- ^ /@child@/: the t'GI.Gtk.Objects.Widget.Widget' to be added to /@bar@/
    -> m ()
headerBarPackEnd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) =>
a -> b -> m ()
headerBarPackEnd a
bar b
child = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr HeaderBar -> Ptr Widget -> IO ()
gtk_header_bar_pack_end Ptr HeaderBar
bar' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

instance O.OverloadedMethodInfo HeaderBarPackEndMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarPackEnd",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarPackEnd"
        }


#endif

-- method HeaderBar::pack_start
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "A #GtkHeaderBar" , 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 #GtkWidget to be added to @bar"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_pack_start" gtk_header_bar_pack_start :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Adds /@child@/ to /@bar@/, packed with reference to the
-- start of the /@bar@/.
headerBarPackStart ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@bar@/: A t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> b
    -- ^ /@child@/: the t'GI.Gtk.Objects.Widget.Widget' to be added to /@bar@/
    -> m ()
headerBarPackStart :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) =>
a -> b -> m ()
headerBarPackStart a
bar b
child = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr HeaderBar -> Ptr Widget -> IO ()
gtk_header_bar_pack_start Ptr HeaderBar
bar' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

instance O.OverloadedMethodInfo HeaderBarPackStartMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarPackStart",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarPackStart"
        }


#endif

-- method HeaderBar::remove
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , 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 "gtk_header_bar_remove" gtk_header_bar_remove :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    Ptr Gtk.Widget.Widget ->                -- child : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Removes a child from /@bar@/, after it has been added
-- with 'GI.Gtk.Objects.HeaderBar.headerBarPackStart', 'GI.Gtk.Objects.HeaderBar.headerBarPackEnd'
-- or 'GI.Gtk.Objects.HeaderBar.headerBarSetTitleWidget'.
headerBarRemove ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> b
    -- ^ /@child@/: the child to remove
    -> m ()
headerBarRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) =>
a -> b -> m ()
headerBarRemove a
bar b
child = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    Ptr Widget
child' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
child
    Ptr HeaderBar -> Ptr Widget -> IO ()
gtk_header_bar_remove Ptr HeaderBar
bar' Ptr Widget
child'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
child
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

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

instance O.OverloadedMethodInfo HeaderBarRemoveMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarRemove",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarRemove"
        }


#endif

-- method HeaderBar::set_decoration_layout
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "layout"
--           , argType = TBasicType TUTF8
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "a decoration layout, or %NULL to\n    unset the layout"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_decoration_layout" gtk_header_bar_set_decoration_layout :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    CString ->                              -- layout : TBasicType TUTF8
    IO ()

-- | Sets the decoration layout for this header bar, overriding
-- the t'GI.Gtk.Objects.Settings.Settings':@/gtk-decoration-layout/@ setting.
-- 
-- There can be valid reasons for overriding the setting, such
-- as a header bar design that does not allow for buttons to take
-- room on the right, or only offers room for a single close button.
-- Split header bars are another example for overriding the
-- setting.
-- 
-- The format of the string is button names, separated by commas.
-- A colon separates the buttons that should appear on the left
-- from those on the right. Recognized button names are minimize,
-- maximize, close and icon (the window icon).
-- 
-- For example, “icon:minimize,maximize,close” specifies a icon
-- on the left, and minimize, maximize and close buttons on the right.
headerBarSetDecorationLayout ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> Maybe (T.Text)
    -- ^ /@layout@/: a decoration layout, or 'P.Nothing' to
    --     unset the layout
    -> m ()
headerBarSetDecorationLayout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsHeaderBar a) =>
a -> Maybe Text -> m ()
headerBarSetDecorationLayout a
bar Maybe Text
layout = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    CString
maybeLayout <- case Maybe Text
layout of
        Maybe Text
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
        Just Text
jLayout -> do
            CString
jLayout' <- Text -> IO CString
textToCString Text
jLayout
            CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jLayout'
    Ptr HeaderBar -> CString -> IO ()
gtk_header_bar_set_decoration_layout Ptr HeaderBar
bar' CString
maybeLayout
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeLayout
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data HeaderBarSetDecorationLayoutMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsHeaderBar a) => O.OverloadedMethod HeaderBarSetDecorationLayoutMethodInfo a signature where
    overloadedMethod = headerBarSetDecorationLayout

instance O.OverloadedMethodInfo HeaderBarSetDecorationLayoutMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarSetDecorationLayout",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarSetDecorationLayout"
        }


#endif

-- method HeaderBar::set_show_title_buttons
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "setting"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to show standard title buttons"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_show_title_buttons" gtk_header_bar_set_show_title_buttons :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    CInt ->                                 -- setting : TBasicType TBoolean
    IO ()

-- | Sets whether this header bar shows the standard window
-- title buttons including close, maximize, and minimize.
headerBarSetShowTitleButtons ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> Bool
    -- ^ /@setting@/: 'P.True' to show standard title buttons
    -> m ()
headerBarSetShowTitleButtons :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsHeaderBar a) =>
a -> Bool -> m ()
headerBarSetShowTitleButtons a
bar Bool
setting = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    let setting' :: CInt
setting' = (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
setting
    Ptr HeaderBar -> CInt -> IO ()
gtk_header_bar_set_show_title_buttons Ptr HeaderBar
bar' CInt
setting'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data HeaderBarSetShowTitleButtonsMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsHeaderBar a) => O.OverloadedMethod HeaderBarSetShowTitleButtonsMethodInfo a signature where
    overloadedMethod = headerBarSetShowTitleButtons

instance O.OverloadedMethodInfo HeaderBarSetShowTitleButtonsMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarSetShowTitleButtons",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarSetShowTitleButtons"
        }


#endif

-- method HeaderBar::set_title_widget
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "bar"
--           , argType =
--               TInterface Name { namespace = "Gtk" , name = "HeaderBar" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GtkHeaderBar" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "title_widget"
--           , argType = TInterface Name { namespace = "Gtk" , name = "Widget" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a widget to use for a title"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "gtk_header_bar_set_title_widget" gtk_header_bar_set_title_widget :: 
    Ptr HeaderBar ->                        -- bar : TInterface (Name {namespace = "Gtk", name = "HeaderBar"})
    Ptr Gtk.Widget.Widget ->                -- title_widget : TInterface (Name {namespace = "Gtk", name = "Widget"})
    IO ()

-- | Sets the title for the t'GI.Gtk.Objects.HeaderBar.HeaderBar'.
-- 
-- When set to 'P.Nothing', the headerbar will display the title of the window it is
-- contained in.
-- 
-- The title should help a user identify the current view. To achieve the same
-- style as the builtin title, use the “title” style class.
-- 
-- You should set the title widget to 'P.Nothing', for the window title label to be
-- visible again.
headerBarSetTitleWidget ::
    (B.CallStack.HasCallStack, MonadIO m, IsHeaderBar a, Gtk.Widget.IsWidget b) =>
    a
    -- ^ /@bar@/: a t'GI.Gtk.Objects.HeaderBar.HeaderBar'
    -> Maybe (b)
    -- ^ /@titleWidget@/: a widget to use for a title
    -> m ()
headerBarSetTitleWidget :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsHeaderBar a, IsWidget b) =>
a -> Maybe b -> m ()
headerBarSetTitleWidget a
bar Maybe b
titleWidget = 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 HeaderBar
bar' <- a -> IO (Ptr HeaderBar)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
bar
    Ptr Widget
maybeTitleWidget <- case Maybe b
titleWidget of
        Maybe b
Nothing -> Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
forall a. Ptr a
nullPtr
        Just b
jTitleWidget -> do
            Ptr Widget
jTitleWidget' <- b -> IO (Ptr Widget)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jTitleWidget
            Ptr Widget -> IO (Ptr Widget)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Widget
jTitleWidget'
    Ptr HeaderBar -> Ptr Widget -> IO ()
gtk_header_bar_set_title_widget Ptr HeaderBar
bar' Ptr Widget
maybeTitleWidget
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
bar
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
titleWidget b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data HeaderBarSetTitleWidgetMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsHeaderBar a, Gtk.Widget.IsWidget b) => O.OverloadedMethod HeaderBarSetTitleWidgetMethodInfo a signature where
    overloadedMethod = headerBarSetTitleWidget

instance O.OverloadedMethodInfo HeaderBarSetTitleWidgetMethodInfo a where
    overloadedMethodInfo = O.MethodInfo {
        O.overloadedMethodName = "GI.Gtk.Objects.HeaderBar.headerBarSetTitleWidget",
        O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-4.0.4/docs/GI-Gtk-Objects-HeaderBar.html#v:headerBarSetTitleWidget"
        }


#endif