#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gtk.Objects.TextChildAnchor
(
TextChildAnchor(..) ,
IsTextChildAnchor ,
toTextChildAnchor ,
noTextChildAnchor ,
#if ENABLE_OVERLOADING
TextChildAnchorGetDeletedMethodInfo ,
#endif
textChildAnchorGetDeleted ,
#if ENABLE_OVERLOADING
TextChildAnchorGetWidgetsMethodInfo ,
#endif
textChildAnchorGetWidgets ,
textChildAnchorNew ,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gtk.Objects.Widget as Gtk.Widget
newtype TextChildAnchor = TextChildAnchor (ManagedPtr TextChildAnchor)
foreign import ccall "gtk_text_child_anchor_get_type"
c_gtk_text_child_anchor_get_type :: IO GType
instance GObject TextChildAnchor where
gobjectType _ = c_gtk_text_child_anchor_get_type
class GObject o => IsTextChildAnchor o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError TextChildAnchor a) =>
IsTextChildAnchor a
#endif
instance IsTextChildAnchor TextChildAnchor
instance GObject.Object.IsObject TextChildAnchor
toTextChildAnchor :: (MonadIO m, IsTextChildAnchor o) => o -> m TextChildAnchor
toTextChildAnchor = liftIO . unsafeCastTo TextChildAnchor
noTextChildAnchor :: Maybe TextChildAnchor
noTextChildAnchor = Nothing
#if ENABLE_OVERLOADING
type family ResolveTextChildAnchorMethod (t :: Symbol) (o :: *) :: * where
ResolveTextChildAnchorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTextChildAnchorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTextChildAnchorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTextChildAnchorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTextChildAnchorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTextChildAnchorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTextChildAnchorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTextChildAnchorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTextChildAnchorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTextChildAnchorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTextChildAnchorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTextChildAnchorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTextChildAnchorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTextChildAnchorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTextChildAnchorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTextChildAnchorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTextChildAnchorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTextChildAnchorMethod "getDeleted" o = TextChildAnchorGetDeletedMethodInfo
ResolveTextChildAnchorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTextChildAnchorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTextChildAnchorMethod "getWidgets" o = TextChildAnchorGetWidgetsMethodInfo
ResolveTextChildAnchorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTextChildAnchorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTextChildAnchorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextChildAnchorMethod t TextChildAnchor, O.MethodInfo info TextChildAnchor p) => O.IsLabelProxy t (TextChildAnchor -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTextChildAnchorMethod t TextChildAnchor, O.MethodInfo info TextChildAnchor p) => O.IsLabel t (TextChildAnchor -> 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
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList TextChildAnchor
type instance O.AttributeList TextChildAnchor = TextChildAnchorAttributeList
type TextChildAnchorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList TextChildAnchor = TextChildAnchorSignalList
type TextChildAnchorSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_text_child_anchor_new" gtk_text_child_anchor_new ::
IO (Ptr TextChildAnchor)
textChildAnchorNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m TextChildAnchor
textChildAnchorNew = liftIO $ do
result <- gtk_text_child_anchor_new
checkUnexpectedReturnNULL "textChildAnchorNew" result
result' <- (wrapObject TextChildAnchor) result
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gtk_text_child_anchor_get_deleted" gtk_text_child_anchor_get_deleted ::
Ptr TextChildAnchor ->
IO CInt
textChildAnchorGetDeleted ::
(B.CallStack.HasCallStack, MonadIO m, IsTextChildAnchor a) =>
a
-> m Bool
textChildAnchorGetDeleted anchor = liftIO $ do
anchor' <- unsafeManagedPtrCastPtr anchor
result <- gtk_text_child_anchor_get_deleted anchor'
let result' = (/= 0) result
touchManagedPtr anchor
return result'
#if ENABLE_OVERLOADING
data TextChildAnchorGetDeletedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsTextChildAnchor a) => O.MethodInfo TextChildAnchorGetDeletedMethodInfo a signature where
overloadedMethod _ = textChildAnchorGetDeleted
#endif
foreign import ccall "gtk_text_child_anchor_get_widgets" gtk_text_child_anchor_get_widgets ::
Ptr TextChildAnchor ->
IO (Ptr (GList (Ptr Gtk.Widget.Widget)))
textChildAnchorGetWidgets ::
(B.CallStack.HasCallStack, MonadIO m, IsTextChildAnchor a) =>
a
-> m [Gtk.Widget.Widget]
textChildAnchorGetWidgets anchor = liftIO $ do
anchor' <- unsafeManagedPtrCastPtr anchor
result <- gtk_text_child_anchor_get_widgets anchor'
result' <- unpackGList result
result'' <- mapM (newObject Gtk.Widget.Widget) result'
g_list_free result
touchManagedPtr anchor
return result''
#if ENABLE_OVERLOADING
data TextChildAnchorGetWidgetsMethodInfo
instance (signature ~ (m [Gtk.Widget.Widget]), MonadIO m, IsTextChildAnchor a) => O.MethodInfo TextChildAnchorGetWidgetsMethodInfo a signature where
overloadedMethod _ = textChildAnchorGetWidgets
#endif