#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Handy.Objects.HeaderGroup
(
HeaderGroup(..) ,
IsHeaderGroup ,
toHeaderGroup ,
noHeaderGroup ,
#if ENABLE_OVERLOADING
HeaderGroupAddHeaderBarMethodInfo ,
#endif
headerGroupAddHeaderBar ,
#if ENABLE_OVERLOADING
HeaderGroupGetFocusMethodInfo ,
#endif
headerGroupGetFocus ,
#if ENABLE_OVERLOADING
HeaderGroupGetHeaderBarsMethodInfo ,
#endif
headerGroupGetHeaderBars ,
headerGroupNew ,
#if ENABLE_OVERLOADING
HeaderGroupRemoveHeaderBarMethodInfo ,
#endif
headerGroupRemoveHeaderBar ,
#if ENABLE_OVERLOADING
HeaderGroupSetFocusMethodInfo ,
#endif
headerGroupSetFocus ,
#if ENABLE_OVERLOADING
HeaderGroupFocusPropertyInfo ,
#endif
clearHeaderGroupFocus ,
constructHeaderGroupFocus ,
getHeaderGroupFocus ,
#if ENABLE_OVERLOADING
headerGroupFocus ,
#endif
setHeaderGroupFocus ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import qualified GI.Gtk.Objects.HeaderBar as Gtk.HeaderBar
newtype HeaderGroup = HeaderGroup (ManagedPtr HeaderGroup)
foreign import ccall "hdy_header_group_get_type"
c_hdy_header_group_get_type :: IO GType
instance GObject HeaderGroup where
gobjectType = c_hdy_header_group_get_type
class (GObject o, O.IsDescendantOf HeaderGroup o) => IsHeaderGroup o
instance (GObject o, O.IsDescendantOf HeaderGroup o) => IsHeaderGroup o
instance O.HasParentTypes HeaderGroup
type instance O.ParentTypes HeaderGroup = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toHeaderGroup :: (MonadIO m, IsHeaderGroup o) => o -> m HeaderGroup
toHeaderGroup = liftIO . unsafeCastTo HeaderGroup
noHeaderGroup :: Maybe HeaderGroup
noHeaderGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveHeaderGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveHeaderGroupMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveHeaderGroupMethod "addHeaderBar" o = HeaderGroupAddHeaderBarMethodInfo
ResolveHeaderGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveHeaderGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveHeaderGroupMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveHeaderGroupMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveHeaderGroupMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveHeaderGroupMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveHeaderGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveHeaderGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveHeaderGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveHeaderGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveHeaderGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveHeaderGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveHeaderGroupMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveHeaderGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveHeaderGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveHeaderGroupMethod "removeHeaderBar" o = HeaderGroupRemoveHeaderBarMethodInfo
ResolveHeaderGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveHeaderGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveHeaderGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveHeaderGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveHeaderGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveHeaderGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveHeaderGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveHeaderGroupMethod "getFocus" o = HeaderGroupGetFocusMethodInfo
ResolveHeaderGroupMethod "getHeaderBars" o = HeaderGroupGetHeaderBarsMethodInfo
ResolveHeaderGroupMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveHeaderGroupMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
ResolveHeaderGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveHeaderGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveHeaderGroupMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveHeaderGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveHeaderGroupMethod "setFocus" o = HeaderGroupSetFocusMethodInfo
ResolveHeaderGroupMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveHeaderGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveHeaderGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveHeaderGroupMethod t HeaderGroup, O.MethodInfo info HeaderGroup p) => OL.IsLabel t (HeaderGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getHeaderGroupFocus :: (MonadIO m, IsHeaderGroup o) => o -> m (Maybe Gtk.HeaderBar.HeaderBar)
getHeaderGroupFocus obj = liftIO $ B.Properties.getObjectPropertyObject obj "focus" Gtk.HeaderBar.HeaderBar
setHeaderGroupFocus :: (MonadIO m, IsHeaderGroup o, Gtk.HeaderBar.IsHeaderBar a) => o -> a -> m ()
setHeaderGroupFocus obj val = liftIO $ B.Properties.setObjectPropertyObject obj "focus" (Just val)
constructHeaderGroupFocus :: (IsHeaderGroup o, Gtk.HeaderBar.IsHeaderBar a) => a -> IO (GValueConstruct o)
constructHeaderGroupFocus val = B.Properties.constructObjectPropertyObject "focus" (Just val)
clearHeaderGroupFocus :: (MonadIO m, IsHeaderGroup o) => o -> m ()
clearHeaderGroupFocus obj = liftIO $ B.Properties.setObjectPropertyObject obj "focus" (Nothing :: Maybe Gtk.HeaderBar.HeaderBar)
#if ENABLE_OVERLOADING
data HeaderGroupFocusPropertyInfo
instance AttrInfo HeaderGroupFocusPropertyInfo where
type AttrAllowedOps HeaderGroupFocusPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint HeaderGroupFocusPropertyInfo = Gtk.HeaderBar.IsHeaderBar
type AttrBaseTypeConstraint HeaderGroupFocusPropertyInfo = IsHeaderGroup
type AttrGetType HeaderGroupFocusPropertyInfo = (Maybe Gtk.HeaderBar.HeaderBar)
type AttrLabel HeaderGroupFocusPropertyInfo = "focus"
type AttrOrigin HeaderGroupFocusPropertyInfo = HeaderGroup
attrGet _ = getHeaderGroupFocus
attrSet _ = setHeaderGroupFocus
attrConstruct _ = constructHeaderGroupFocus
attrClear _ = clearHeaderGroupFocus
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList HeaderGroup
type instance O.AttributeList HeaderGroup = HeaderGroupAttributeList
type HeaderGroupAttributeList = ('[ '("focus", HeaderGroupFocusPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
headerGroupFocus :: AttrLabelProxy "focus"
headerGroupFocus = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList HeaderGroup = HeaderGroupSignalList
type HeaderGroupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "hdy_header_group_new" hdy_header_group_new ::
IO (Ptr HeaderGroup)
headerGroupNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m HeaderGroup
headerGroupNew = liftIO $ do
result <- hdy_header_group_new
checkUnexpectedReturnNULL "headerGroupNew" result
result' <- (wrapObject HeaderGroup) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "hdy_header_group_add_header_bar" hdy_header_group_add_header_bar ::
Ptr HeaderGroup ->
Ptr Gtk.HeaderBar.HeaderBar ->
IO ()
headerGroupAddHeaderBar ::
(B.CallStack.HasCallStack, MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) =>
a
-> b
-> m ()
headerGroupAddHeaderBar self headerBar = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
headerBar' <- unsafeManagedPtrCastPtr headerBar
hdy_header_group_add_header_bar self' headerBar'
touchManagedPtr self
touchManagedPtr headerBar
return ()
#if ENABLE_OVERLOADING
data HeaderGroupAddHeaderBarMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) => O.MethodInfo HeaderGroupAddHeaderBarMethodInfo a signature where
overloadedMethod _ = headerGroupAddHeaderBar
#endif
foreign import ccall "hdy_header_group_get_focus" hdy_header_group_get_focus ::
Ptr HeaderGroup ->
IO (Ptr Gtk.HeaderBar.HeaderBar)
headerGroupGetFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsHeaderGroup a) =>
a
-> m (Maybe Gtk.HeaderBar.HeaderBar)
headerGroupGetFocus self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- hdy_header_group_get_focus self'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (newObject Gtk.HeaderBar.HeaderBar) result'
return result''
touchManagedPtr self
return maybeResult
#if ENABLE_OVERLOADING
data HeaderGroupGetFocusMethodInfo
instance (signature ~ (m (Maybe Gtk.HeaderBar.HeaderBar)), MonadIO m, IsHeaderGroup a) => O.MethodInfo HeaderGroupGetFocusMethodInfo a signature where
overloadedMethod _ = headerGroupGetFocus
#endif
foreign import ccall "hdy_header_group_get_header_bars" hdy_header_group_get_header_bars ::
Ptr HeaderGroup ->
IO (Ptr (GSList (Ptr Gtk.HeaderBar.HeaderBar)))
headerGroupGetHeaderBars ::
(B.CallStack.HasCallStack, MonadIO m, IsHeaderGroup a) =>
a
-> m [Gtk.HeaderBar.HeaderBar]
headerGroupGetHeaderBars self = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
result <- hdy_header_group_get_header_bars self'
result' <- unpackGSList result
result'' <- mapM (newObject Gtk.HeaderBar.HeaderBar) result'
touchManagedPtr self
return result''
#if ENABLE_OVERLOADING
data HeaderGroupGetHeaderBarsMethodInfo
instance (signature ~ (m [Gtk.HeaderBar.HeaderBar]), MonadIO m, IsHeaderGroup a) => O.MethodInfo HeaderGroupGetHeaderBarsMethodInfo a signature where
overloadedMethod _ = headerGroupGetHeaderBars
#endif
foreign import ccall "hdy_header_group_remove_header_bar" hdy_header_group_remove_header_bar ::
Ptr HeaderGroup ->
Ptr Gtk.HeaderBar.HeaderBar ->
IO ()
headerGroupRemoveHeaderBar ::
(B.CallStack.HasCallStack, MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) =>
a
-> b
-> m ()
headerGroupRemoveHeaderBar self headerBar = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
headerBar' <- unsafeManagedPtrCastPtr headerBar
hdy_header_group_remove_header_bar self' headerBar'
touchManagedPtr self
touchManagedPtr headerBar
return ()
#if ENABLE_OVERLOADING
data HeaderGroupRemoveHeaderBarMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) => O.MethodInfo HeaderGroupRemoveHeaderBarMethodInfo a signature where
overloadedMethod _ = headerGroupRemoveHeaderBar
#endif
foreign import ccall "hdy_header_group_set_focus" hdy_header_group_set_focus ::
Ptr HeaderGroup ->
Ptr Gtk.HeaderBar.HeaderBar ->
IO ()
headerGroupSetFocus ::
(B.CallStack.HasCallStack, MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) =>
a
-> Maybe (b)
-> m ()
headerGroupSetFocus self headerBar = liftIO $ do
self' <- unsafeManagedPtrCastPtr self
maybeHeaderBar <- case headerBar of
Nothing -> return nullPtr
Just jHeaderBar -> do
jHeaderBar' <- unsafeManagedPtrCastPtr jHeaderBar
return jHeaderBar'
hdy_header_group_set_focus self' maybeHeaderBar
touchManagedPtr self
whenJust headerBar touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data HeaderGroupSetFocusMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsHeaderGroup a, Gtk.HeaderBar.IsHeaderBar b) => O.MethodInfo HeaderGroupSetFocusMethodInfo a signature where
overloadedMethod _ = headerGroupSetFocus
#endif