#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.MenuLinkIter
(
MenuLinkIter(..) ,
IsMenuLinkIter ,
toMenuLinkIter ,
noMenuLinkIter ,
#if ENABLE_OVERLOADING
MenuLinkIterGetNameMethodInfo ,
#endif
menuLinkIterGetName ,
#if ENABLE_OVERLOADING
MenuLinkIterGetNextMethodInfo ,
#endif
menuLinkIterGetNext ,
#if ENABLE_OVERLOADING
MenuLinkIterGetValueMethodInfo ,
#endif
menuLinkIterGetValue ,
#if ENABLE_OVERLOADING
MenuLinkIterNextMethodInfo ,
#endif
menuLinkIterNext ,
) 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 {-# SOURCE #-} qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
newtype MenuLinkIter = MenuLinkIter (ManagedPtr MenuLinkIter)
foreign import ccall "g_menu_link_iter_get_type"
c_g_menu_link_iter_get_type :: IO GType
instance GObject MenuLinkIter where
gobjectType = c_g_menu_link_iter_get_type
class (GObject o, O.IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o
instance (GObject o, O.IsDescendantOf MenuLinkIter o) => IsMenuLinkIter o
instance O.HasParentTypes MenuLinkIter
type instance O.ParentTypes MenuLinkIter = '[GObject.Object.Object]
toMenuLinkIter :: (MonadIO m, IsMenuLinkIter o) => o -> m MenuLinkIter
toMenuLinkIter = liftIO . unsafeCastTo MenuLinkIter
noMenuLinkIter :: Maybe MenuLinkIter
noMenuLinkIter = Nothing
#if ENABLE_OVERLOADING
type family ResolveMenuLinkIterMethod (t :: Symbol) (o :: *) :: * where
ResolveMenuLinkIterMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveMenuLinkIterMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveMenuLinkIterMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveMenuLinkIterMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveMenuLinkIterMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveMenuLinkIterMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveMenuLinkIterMethod "next" o = MenuLinkIterNextMethodInfo
ResolveMenuLinkIterMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveMenuLinkIterMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveMenuLinkIterMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveMenuLinkIterMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveMenuLinkIterMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveMenuLinkIterMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveMenuLinkIterMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveMenuLinkIterMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveMenuLinkIterMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveMenuLinkIterMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveMenuLinkIterMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveMenuLinkIterMethod "getName" o = MenuLinkIterGetNameMethodInfo
ResolveMenuLinkIterMethod "getNext" o = MenuLinkIterGetNextMethodInfo
ResolveMenuLinkIterMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveMenuLinkIterMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveMenuLinkIterMethod "getValue" o = MenuLinkIterGetValueMethodInfo
ResolveMenuLinkIterMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveMenuLinkIterMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveMenuLinkIterMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveMenuLinkIterMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveMenuLinkIterMethod t MenuLinkIter, O.MethodInfo info MenuLinkIter p) => OL.IsLabel t (MenuLinkIter -> 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
#if ENABLE_OVERLOADING
instance O.HasAttributeList MenuLinkIter
type instance O.AttributeList MenuLinkIter = MenuLinkIterAttributeList
type MenuLinkIterAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList MenuLinkIter = MenuLinkIterSignalList
type MenuLinkIterSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_menu_link_iter_get_name" g_menu_link_iter_get_name ::
Ptr MenuLinkIter ->
IO CString
menuLinkIterGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuLinkIter a) =>
a
-> m T.Text
menuLinkIterGetName iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- g_menu_link_iter_get_name iter'
checkUnexpectedReturnNULL "menuLinkIterGetName" result
result' <- cstringToText result
touchManagedPtr iter
return result'
#if ENABLE_OVERLOADING
data MenuLinkIterGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsMenuLinkIter a) => O.MethodInfo MenuLinkIterGetNameMethodInfo a signature where
overloadedMethod _ = menuLinkIterGetName
#endif
foreign import ccall "g_menu_link_iter_get_next" g_menu_link_iter_get_next ::
Ptr MenuLinkIter ->
Ptr CString ->
Ptr (Ptr Gio.MenuModel.MenuModel) ->
IO CInt
menuLinkIterGetNext ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuLinkIter a) =>
a
-> m ((Bool, T.Text, Gio.MenuModel.MenuModel))
menuLinkIterGetNext iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
outLink <- allocMem :: IO (Ptr CString)
value <- allocMem :: IO (Ptr (Ptr Gio.MenuModel.MenuModel))
result <- g_menu_link_iter_get_next iter' outLink value
let result' = (/= 0) result
outLink' <- peek outLink
outLink'' <- cstringToText outLink'
value' <- peek value
value'' <- (wrapObject Gio.MenuModel.MenuModel) value'
touchManagedPtr iter
freeMem outLink
freeMem value
return (result', outLink'', value'')
#if ENABLE_OVERLOADING
data MenuLinkIterGetNextMethodInfo
instance (signature ~ (m ((Bool, T.Text, Gio.MenuModel.MenuModel))), MonadIO m, IsMenuLinkIter a) => O.MethodInfo MenuLinkIterGetNextMethodInfo a signature where
overloadedMethod _ = menuLinkIterGetNext
#endif
foreign import ccall "g_menu_link_iter_get_value" g_menu_link_iter_get_value ::
Ptr MenuLinkIter ->
IO (Ptr Gio.MenuModel.MenuModel)
menuLinkIterGetValue ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuLinkIter a) =>
a
-> m Gio.MenuModel.MenuModel
menuLinkIterGetValue iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- g_menu_link_iter_get_value iter'
checkUnexpectedReturnNULL "menuLinkIterGetValue" result
result' <- (wrapObject Gio.MenuModel.MenuModel) result
touchManagedPtr iter
return result'
#if ENABLE_OVERLOADING
data MenuLinkIterGetValueMethodInfo
instance (signature ~ (m Gio.MenuModel.MenuModel), MonadIO m, IsMenuLinkIter a) => O.MethodInfo MenuLinkIterGetValueMethodInfo a signature where
overloadedMethod _ = menuLinkIterGetValue
#endif
foreign import ccall "g_menu_link_iter_next" g_menu_link_iter_next ::
Ptr MenuLinkIter ->
IO CInt
menuLinkIterNext ::
(B.CallStack.HasCallStack, MonadIO m, IsMenuLinkIter a) =>
a
-> m Bool
menuLinkIterNext iter = liftIO $ do
iter' <- unsafeManagedPtrCastPtr iter
result <- g_menu_link_iter_next iter'
let result' = (/= 0) result
touchManagedPtr iter
return result'
#if ENABLE_OVERLOADING
data MenuLinkIterNextMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsMenuLinkIter a) => O.MethodInfo MenuLinkIterNextMethodInfo a signature where
overloadedMethod _ = menuLinkIterNext
#endif