{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.TextChildAnchor
(
TextChildAnchor(..) ,
IsTextChildAnchor ,
toTextChildAnchor ,
noTextChildAnchor ,
#if defined(ENABLE_OVERLOADING)
ResolveTextChildAnchorMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TextChildAnchorGetDeletedMethodInfo ,
#endif
textChildAnchorGetDeleted ,
#if defined(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.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 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.Gtk.Objects.Widget as Gtk.Widget
newtype TextChildAnchor = TextChildAnchor (ManagedPtr TextChildAnchor)
deriving (Eq)
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
instance B.GValue.IsGValue TextChildAnchor where
toGValue o = do
gtype <- c_gtk_text_child_anchor_get_type
B.ManagedPtr.withManagedPtr o (B.GValue.buildGValue gtype B.GValue.set_object)
fromGValue gv = do
ptr <- B.GValue.get_object gv :: IO (Ptr TextChildAnchor)
B.ManagedPtr.newObject TextChildAnchor ptr
class (GObject o, O.IsDescendantOf TextChildAnchor o) => IsTextChildAnchor o
instance (GObject o, O.IsDescendantOf TextChildAnchor o) => IsTextChildAnchor o
instance O.HasParentTypes TextChildAnchor
type instance O.ParentTypes TextChildAnchor = '[GObject.Object.Object]
toTextChildAnchor :: (MonadIO m, IsTextChildAnchor o) => o -> m TextChildAnchor
toTextChildAnchor = liftIO . unsafeCastTo TextChildAnchor
noTextChildAnchor :: Maybe TextChildAnchor
noTextChildAnchor = Nothing
#if defined(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 "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTextChildAnchorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTextChildAnchorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextChildAnchorMethod t TextChildAnchor, O.MethodInfo info TextChildAnchor p) => OL.IsLabel t (TextChildAnchor -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextChildAnchor
type instance O.AttributeList TextChildAnchor = TextChildAnchorAttributeList
type TextChildAnchorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(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 defined(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 defined(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 defined(ENABLE_OVERLOADING)
data TextChildAnchorGetWidgetsMethodInfo
instance (signature ~ (m [Gtk.Widget.Widget]), MonadIO m, IsTextChildAnchor a) => O.MethodInfo TextChildAnchorGetWidgetsMethodInfo a signature where
overloadedMethod = textChildAnchorGetWidgets
#endif