{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gtk.Objects.TextTagTable
(
TextTagTable(..) ,
IsTextTagTable ,
toTextTagTable ,
#if defined(ENABLE_OVERLOADING)
ResolveTextTagTableMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
TextTagTableAddMethodInfo ,
#endif
textTagTableAdd ,
#if defined(ENABLE_OVERLOADING)
TextTagTableForeachMethodInfo ,
#endif
textTagTableForeach ,
#if defined(ENABLE_OVERLOADING)
TextTagTableGetSizeMethodInfo ,
#endif
textTagTableGetSize ,
#if defined(ENABLE_OVERLOADING)
TextTagTableLookupMethodInfo ,
#endif
textTagTableLookup ,
textTagTableNew ,
#if defined(ENABLE_OVERLOADING)
TextTagTableRemoveMethodInfo ,
#endif
textTagTableRemove ,
C_TextTagTableTagAddedCallback ,
TextTagTableTagAddedCallback ,
#if defined(ENABLE_OVERLOADING)
TextTagTableTagAddedSignalInfo ,
#endif
afterTextTagTableTagAdded ,
genClosure_TextTagTableTagAdded ,
mk_TextTagTableTagAddedCallback ,
noTextTagTableTagAddedCallback ,
onTextTagTableTagAdded ,
wrap_TextTagTableTagAddedCallback ,
C_TextTagTableTagChangedCallback ,
TextTagTableTagChangedCallback ,
#if defined(ENABLE_OVERLOADING)
TextTagTableTagChangedSignalInfo ,
#endif
afterTextTagTableTagChanged ,
genClosure_TextTagTableTagChanged ,
mk_TextTagTableTagChangedCallback ,
noTextTagTableTagChangedCallback ,
onTextTagTableTagChanged ,
wrap_TextTagTableTagChangedCallback ,
C_TextTagTableTagRemovedCallback ,
TextTagTableTagRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
TextTagTableTagRemovedSignalInfo ,
#endif
afterTextTagTableTagRemoved ,
genClosure_TextTagTableTagRemoved ,
mk_TextTagTableTagRemovedCallback ,
noTextTagTableTagRemovedCallback ,
onTextTagTableTagRemoved ,
wrap_TextTagTableTagRemovedCallback ,
) 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 qualified GI.Gtk.Callbacks as Gtk.Callbacks
import {-# SOURCE #-} qualified GI.Gtk.Interfaces.Buildable as Gtk.Buildable
import {-# SOURCE #-} qualified GI.Gtk.Objects.TextTag as Gtk.TextTag
newtype TextTagTable = TextTagTable (SP.ManagedPtr TextTagTable)
deriving (TextTagTable -> TextTagTable -> Bool
(TextTagTable -> TextTagTable -> Bool)
-> (TextTagTable -> TextTagTable -> Bool) -> Eq TextTagTable
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: TextTagTable -> TextTagTable -> Bool
$c/= :: TextTagTable -> TextTagTable -> Bool
== :: TextTagTable -> TextTagTable -> Bool
$c== :: TextTagTable -> TextTagTable -> Bool
Eq)
instance SP.ManagedPtrNewtype TextTagTable where
toManagedPtr :: TextTagTable -> ManagedPtr TextTagTable
toManagedPtr (TextTagTable ManagedPtr TextTagTable
p) = ManagedPtr TextTagTable
p
foreign import ccall "gtk_text_tag_table_get_type"
c_gtk_text_tag_table_get_type :: IO B.Types.GType
instance B.Types.TypedObject TextTagTable where
glibType :: IO GType
glibType = IO GType
c_gtk_text_tag_table_get_type
instance B.Types.GObject TextTagTable
class (SP.GObject o, O.IsDescendantOf TextTagTable o) => IsTextTagTable o
instance (SP.GObject o, O.IsDescendantOf TextTagTable o) => IsTextTagTable o
instance O.HasParentTypes TextTagTable
type instance O.ParentTypes TextTagTable = '[GObject.Object.Object, Gtk.Buildable.Buildable]
toTextTagTable :: (MIO.MonadIO m, IsTextTagTable o) => o -> m TextTagTable
toTextTagTable :: forall (m :: * -> *) o.
(MonadIO m, IsTextTagTable o) =>
o -> m TextTagTable
toTextTagTable = IO TextTagTable -> m TextTagTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO TextTagTable -> m TextTagTable)
-> (o -> IO TextTagTable) -> o -> m TextTagTable
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr TextTagTable -> TextTagTable) -> o -> IO TextTagTable
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr TextTagTable -> TextTagTable
TextTagTable
instance B.GValue.IsGValue (Maybe TextTagTable) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gtk_text_tag_table_get_type
gvalueSet_ :: Ptr GValue -> Maybe TextTagTable -> IO ()
gvalueSet_ Ptr GValue
gv Maybe TextTagTable
P.Nothing = Ptr GValue -> Ptr TextTagTable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr TextTagTable
forall a. Ptr a
FP.nullPtr :: FP.Ptr TextTagTable)
gvalueSet_ Ptr GValue
gv (P.Just TextTagTable
obj) = TextTagTable -> (Ptr TextTagTable -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr TextTagTable
obj (Ptr GValue -> Ptr TextTagTable -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe TextTagTable)
gvalueGet_ Ptr GValue
gv = do
Ptr TextTagTable
ptr <- Ptr GValue -> IO (Ptr TextTagTable)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr TextTagTable)
if Ptr TextTagTable
ptr Ptr TextTagTable -> Ptr TextTagTable -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr TextTagTable
forall a. Ptr a
FP.nullPtr
then TextTagTable -> Maybe TextTagTable
forall a. a -> Maybe a
P.Just (TextTagTable -> Maybe TextTagTable)
-> IO TextTagTable -> IO (Maybe TextTagTable)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr TextTagTable -> TextTagTable)
-> Ptr TextTagTable -> IO TextTagTable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr TextTagTable -> TextTagTable
TextTagTable Ptr TextTagTable
ptr
else Maybe TextTagTable -> IO (Maybe TextTagTable)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TextTagTable
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveTextTagTableMethod (t :: Symbol) (o :: *) :: * where
ResolveTextTagTableMethod "add" o = TextTagTableAddMethodInfo
ResolveTextTagTableMethod "addChild" o = Gtk.Buildable.BuildableAddChildMethodInfo
ResolveTextTagTableMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveTextTagTableMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveTextTagTableMethod "constructChild" o = Gtk.Buildable.BuildableConstructChildMethodInfo
ResolveTextTagTableMethod "customFinished" o = Gtk.Buildable.BuildableCustomFinishedMethodInfo
ResolveTextTagTableMethod "customTagEnd" o = Gtk.Buildable.BuildableCustomTagEndMethodInfo
ResolveTextTagTableMethod "customTagStart" o = Gtk.Buildable.BuildableCustomTagStartMethodInfo
ResolveTextTagTableMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveTextTagTableMethod "foreach" o = TextTagTableForeachMethodInfo
ResolveTextTagTableMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveTextTagTableMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveTextTagTableMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveTextTagTableMethod "lookup" o = TextTagTableLookupMethodInfo
ResolveTextTagTableMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveTextTagTableMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveTextTagTableMethod "parserFinished" o = Gtk.Buildable.BuildableParserFinishedMethodInfo
ResolveTextTagTableMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveTextTagTableMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveTextTagTableMethod "remove" o = TextTagTableRemoveMethodInfo
ResolveTextTagTableMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveTextTagTableMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveTextTagTableMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveTextTagTableMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveTextTagTableMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveTextTagTableMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveTextTagTableMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveTextTagTableMethod "getInternalChild" o = Gtk.Buildable.BuildableGetInternalChildMethodInfo
ResolveTextTagTableMethod "getName" o = Gtk.Buildable.BuildableGetNameMethodInfo
ResolveTextTagTableMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveTextTagTableMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveTextTagTableMethod "getSize" o = TextTagTableGetSizeMethodInfo
ResolveTextTagTableMethod "setBuildableProperty" o = Gtk.Buildable.BuildableSetBuildablePropertyMethodInfo
ResolveTextTagTableMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveTextTagTableMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveTextTagTableMethod "setName" o = Gtk.Buildable.BuildableSetNameMethodInfo
ResolveTextTagTableMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveTextTagTableMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveTextTagTableMethod t TextTagTable, O.OverloadedMethod info TextTagTable p) => OL.IsLabel t (TextTagTable -> 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 ~ ResolveTextTagTableMethod t TextTagTable, O.OverloadedMethod info TextTagTable p, R.HasField t TextTagTable p) => R.HasField t TextTagTable p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveTextTagTableMethod t TextTagTable, O.OverloadedMethodInfo info TextTagTable) => OL.IsLabel t (O.MethodProxy info TextTagTable) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type TextTagTableTagAddedCallback =
Gtk.TextTag.TextTag
-> IO ()
noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback
noTextTagTableTagAddedCallback :: Maybe TextTagTableTagAddedCallback
noTextTagTableTagAddedCallback = Maybe TextTagTableTagAddedCallback
forall a. Maybe a
Nothing
type C_TextTagTableTagAddedCallback =
Ptr () ->
Ptr Gtk.TextTag.TextTag ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextTagTableTagAddedCallback :: C_TextTagTableTagAddedCallback -> IO (FunPtr C_TextTagTableTagAddedCallback)
genClosure_TextTagTableTagAdded :: MonadIO m => TextTagTableTagAddedCallback -> m (GClosure C_TextTagTableTagAddedCallback)
genClosure_TextTagTableTagAdded :: forall (m :: * -> *).
MonadIO m =>
TextTagTableTagAddedCallback
-> m (GClosure C_TextTagTableTagAddedCallback)
genClosure_TextTagTableTagAdded TextTagTableTagAddedCallback
cb = IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback))
-> IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagAddedCallback TextTagTableTagAddedCallback
cb
C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagAddedCallback C_TextTagTableTagAddedCallback
cb' IO (FunPtr C_TextTagTableTagAddedCallback)
-> (FunPtr C_TextTagTableTagAddedCallback
-> IO (GClosure C_TextTagTableTagAddedCallback))
-> IO (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TextTagTableTagAddedCallback
-> IO (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TextTagTableTagAddedCallback ::
TextTagTableTagAddedCallback ->
C_TextTagTableTagAddedCallback
wrap_TextTagTableTagAddedCallback :: TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagAddedCallback TextTagTableTagAddedCallback
_cb Ptr ()
_ Ptr TextTag
tag Ptr ()
_ = do
TextTag
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
TextTagTableTagAddedCallback
_cb TextTag
tag'
onTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
onTextTagTableTagAdded :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagAddedCallback -> m SignalHandlerId
onTextTagTableTagAdded a
obj TextTagTableTagAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagAddedCallback TextTagTableTagAddedCallback
cb
FunPtr C_TextTagTableTagAddedCallback
cb'' <- C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagAddedCallback C_TextTagTableTagAddedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-added" FunPtr C_TextTagTableTagAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTextTagTableTagAdded :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagAddedCallback -> m SignalHandlerId
afterTextTagTableTagAdded :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagAddedCallback -> m SignalHandlerId
afterTextTagTableTagAdded a
obj TextTagTableTagAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagAddedCallback TextTagTableTagAddedCallback
cb
FunPtr C_TextTagTableTagAddedCallback
cb'' <- C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagAddedCallback C_TextTagTableTagAddedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-added" FunPtr C_TextTagTableTagAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TextTagTableTagAddedSignalInfo
instance SignalInfo TextTagTableTagAddedSignalInfo where
type HaskellCallbackType TextTagTableTagAddedSignalInfo = TextTagTableTagAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextTagTableTagAddedCallback cb
cb'' <- mk_TextTagTableTagAddedCallback cb'
connectSignalFunPtr obj "tag-added" cb'' connectMode detail
#endif
type TextTagTableTagChangedCallback =
Gtk.TextTag.TextTag
-> Bool
-> IO ()
noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback
noTextTagTableTagChangedCallback :: Maybe TextTagTableTagChangedCallback
noTextTagTableTagChangedCallback = Maybe TextTagTableTagChangedCallback
forall a. Maybe a
Nothing
type C_TextTagTableTagChangedCallback =
Ptr () ->
Ptr Gtk.TextTag.TextTag ->
CInt ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextTagTableTagChangedCallback :: C_TextTagTableTagChangedCallback -> IO (FunPtr C_TextTagTableTagChangedCallback)
genClosure_TextTagTableTagChanged :: MonadIO m => TextTagTableTagChangedCallback -> m (GClosure C_TextTagTableTagChangedCallback)
genClosure_TextTagTableTagChanged :: forall (m :: * -> *).
MonadIO m =>
TextTagTableTagChangedCallback
-> m (GClosure C_TextTagTableTagChangedCallback)
genClosure_TextTagTableTagChanged TextTagTableTagChangedCallback
cb = IO (GClosure C_TextTagTableTagChangedCallback)
-> m (GClosure C_TextTagTableTagChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TextTagTableTagChangedCallback)
-> m (GClosure C_TextTagTableTagChangedCallback))
-> IO (GClosure C_TextTagTableTagChangedCallback)
-> m (GClosure C_TextTagTableTagChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagChangedCallback
cb' = TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback
wrap_TextTagTableTagChangedCallback TextTagTableTagChangedCallback
cb
C_TextTagTableTagChangedCallback
-> IO (FunPtr C_TextTagTableTagChangedCallback)
mk_TextTagTableTagChangedCallback C_TextTagTableTagChangedCallback
cb' IO (FunPtr C_TextTagTableTagChangedCallback)
-> (FunPtr C_TextTagTableTagChangedCallback
-> IO (GClosure C_TextTagTableTagChangedCallback))
-> IO (GClosure C_TextTagTableTagChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TextTagTableTagChangedCallback
-> IO (GClosure C_TextTagTableTagChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TextTagTableTagChangedCallback ::
TextTagTableTagChangedCallback ->
C_TextTagTableTagChangedCallback
wrap_TextTagTableTagChangedCallback :: TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback
wrap_TextTagTableTagChangedCallback TextTagTableTagChangedCallback
_cb Ptr ()
_ Ptr TextTag
tag CInt
sizeChanged Ptr ()
_ = do
TextTag
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
let sizeChanged' :: Bool
sizeChanged' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
sizeChanged
TextTagTableTagChangedCallback
_cb TextTag
tag' Bool
sizeChanged'
onTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
onTextTagTableTagChanged :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagChangedCallback -> m SignalHandlerId
onTextTagTableTagChanged a
obj TextTagTableTagChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagChangedCallback
cb' = TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback
wrap_TextTagTableTagChangedCallback TextTagTableTagChangedCallback
cb
FunPtr C_TextTagTableTagChangedCallback
cb'' <- C_TextTagTableTagChangedCallback
-> IO (FunPtr C_TextTagTableTagChangedCallback)
mk_TextTagTableTagChangedCallback C_TextTagTableTagChangedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-changed" FunPtr C_TextTagTableTagChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTextTagTableTagChanged :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagChangedCallback -> m SignalHandlerId
afterTextTagTableTagChanged :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagChangedCallback -> m SignalHandlerId
afterTextTagTableTagChanged a
obj TextTagTableTagChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagChangedCallback
cb' = TextTagTableTagChangedCallback -> C_TextTagTableTagChangedCallback
wrap_TextTagTableTagChangedCallback TextTagTableTagChangedCallback
cb
FunPtr C_TextTagTableTagChangedCallback
cb'' <- C_TextTagTableTagChangedCallback
-> IO (FunPtr C_TextTagTableTagChangedCallback)
mk_TextTagTableTagChangedCallback C_TextTagTableTagChangedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-changed" FunPtr C_TextTagTableTagChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TextTagTableTagChangedSignalInfo
instance SignalInfo TextTagTableTagChangedSignalInfo where
type HaskellCallbackType TextTagTableTagChangedSignalInfo = TextTagTableTagChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextTagTableTagChangedCallback cb
cb'' <- mk_TextTagTableTagChangedCallback cb'
connectSignalFunPtr obj "tag-changed" cb'' connectMode detail
#endif
type TextTagTableTagRemovedCallback =
Gtk.TextTag.TextTag
-> IO ()
noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagRemovedCallback
noTextTagTableTagRemovedCallback :: Maybe TextTagTableTagAddedCallback
noTextTagTableTagRemovedCallback = Maybe TextTagTableTagAddedCallback
forall a. Maybe a
Nothing
type C_TextTagTableTagRemovedCallback =
Ptr () ->
Ptr Gtk.TextTag.TextTag ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_TextTagTableTagRemovedCallback :: C_TextTagTableTagRemovedCallback -> IO (FunPtr C_TextTagTableTagRemovedCallback)
genClosure_TextTagTableTagRemoved :: MonadIO m => TextTagTableTagRemovedCallback -> m (GClosure C_TextTagTableTagRemovedCallback)
genClosure_TextTagTableTagRemoved :: forall (m :: * -> *).
MonadIO m =>
TextTagTableTagAddedCallback
-> m (GClosure C_TextTagTableTagAddedCallback)
genClosure_TextTagTableTagRemoved TextTagTableTagAddedCallback
cb = IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback))
-> IO (GClosure C_TextTagTableTagAddedCallback)
-> m (GClosure C_TextTagTableTagAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagRemovedCallback TextTagTableTagAddedCallback
cb
C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagRemovedCallback C_TextTagTableTagAddedCallback
cb' IO (FunPtr C_TextTagTableTagAddedCallback)
-> (FunPtr C_TextTagTableTagAddedCallback
-> IO (GClosure C_TextTagTableTagAddedCallback))
-> IO (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_TextTagTableTagAddedCallback
-> IO (GClosure C_TextTagTableTagAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_TextTagTableTagRemovedCallback ::
TextTagTableTagRemovedCallback ->
C_TextTagTableTagRemovedCallback
wrap_TextTagTableTagRemovedCallback :: TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagRemovedCallback TextTagTableTagAddedCallback
_cb Ptr ()
_ Ptr TextTag
tag Ptr ()
_ = do
TextTag
tag' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
tag
TextTagTableTagAddedCallback
_cb TextTag
tag'
onTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
onTextTagTableTagRemoved :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagAddedCallback -> m SignalHandlerId
onTextTagTableTagRemoved a
obj TextTagTableTagAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagRemovedCallback TextTagTableTagAddedCallback
cb
FunPtr C_TextTagTableTagAddedCallback
cb'' <- C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagRemovedCallback C_TextTagTableTagAddedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-removed" FunPtr C_TextTagTableTagAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterTextTagTableTagRemoved :: (IsTextTagTable a, MonadIO m) => a -> TextTagTableTagRemovedCallback -> m SignalHandlerId
afterTextTagTableTagRemoved :: forall a (m :: * -> *).
(IsTextTagTable a, MonadIO m) =>
a -> TextTagTableTagAddedCallback -> m SignalHandlerId
afterTextTagTableTagRemoved a
obj TextTagTableTagAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_TextTagTableTagAddedCallback
cb' = TextTagTableTagAddedCallback -> C_TextTagTableTagAddedCallback
wrap_TextTagTableTagRemovedCallback TextTagTableTagAddedCallback
cb
FunPtr C_TextTagTableTagAddedCallback
cb'' <- C_TextTagTableTagAddedCallback
-> IO (FunPtr C_TextTagTableTagAddedCallback)
mk_TextTagTableTagRemovedCallback C_TextTagTableTagAddedCallback
cb'
a
-> Text
-> FunPtr C_TextTagTableTagAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"tag-removed" FunPtr C_TextTagTableTagAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data TextTagTableTagRemovedSignalInfo
instance SignalInfo TextTagTableTagRemovedSignalInfo where
type HaskellCallbackType TextTagTableTagRemovedSignalInfo = TextTagTableTagRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_TextTagTableTagRemovedCallback cb
cb'' <- mk_TextTagTableTagRemovedCallback cb'
connectSignalFunPtr obj "tag-removed" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList TextTagTable
type instance O.AttributeList TextTagTable = TextTagTableAttributeList
type TextTagTableAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList TextTagTable = TextTagTableSignalList
type TextTagTableSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("tagAdded", TextTagTableTagAddedSignalInfo), '("tagChanged", TextTagTableTagChangedSignalInfo), '("tagRemoved", TextTagTableTagRemovedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gtk_text_tag_table_new" gtk_text_tag_table_new ::
IO (Ptr TextTagTable)
textTagTableNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
m TextTagTable
textTagTableNew :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m TextTagTable
textTagTableNew = IO TextTagTable -> m TextTagTable
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO TextTagTable -> m TextTagTable)
-> IO TextTagTable -> m TextTagTable
forall a b. (a -> b) -> a -> b
$ do
Ptr TextTagTable
result <- IO (Ptr TextTagTable)
gtk_text_tag_table_new
Text -> Ptr TextTagTable -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"textTagTableNew" Ptr TextTagTable
result
TextTagTable
result' <- ((ManagedPtr TextTagTable -> TextTagTable)
-> Ptr TextTagTable -> IO TextTagTable
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr TextTagTable -> TextTagTable
TextTagTable) Ptr TextTagTable
result
TextTagTable -> IO TextTagTable
forall (m :: * -> *) a. Monad m => a -> m a
return TextTagTable
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gtk_text_tag_table_add" gtk_text_tag_table_add ::
Ptr TextTagTable ->
Ptr Gtk.TextTag.TextTag ->
IO CInt
textTagTableAdd ::
(B.CallStack.HasCallStack, MonadIO m, IsTextTagTable a, Gtk.TextTag.IsTextTag b) =>
a
-> b
-> m Bool
textTagTableAdd :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) =>
a -> b -> m Bool
textTagTableAdd a
table b
tag = 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 TextTagTable
table' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr TextTag
tag' <- b -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tag
CInt
result <- Ptr TextTagTable -> Ptr TextTag -> IO CInt
gtk_text_tag_table_add Ptr TextTagTable
table' Ptr TextTag
tag'
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
table
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tag
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data TextTagTableAddMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsTextTagTable a, Gtk.TextTag.IsTextTag b) => O.OverloadedMethod TextTagTableAddMethodInfo a signature where
overloadedMethod = textTagTableAdd
instance O.OverloadedMethodInfo TextTagTableAddMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TextTagTable.textTagTableAdd",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-TextTagTable.html#v:textTagTableAdd"
}
#endif
foreign import ccall "gtk_text_tag_table_foreach" gtk_text_tag_table_foreach ::
Ptr TextTagTable ->
FunPtr Gtk.Callbacks.C_TextTagTableForeach ->
Ptr () ->
IO ()
textTagTableForeach ::
(B.CallStack.HasCallStack, MonadIO m, IsTextTagTable a) =>
a
-> Gtk.Callbacks.TextTagTableForeach
-> m ()
textTagTableForeach :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextTagTable a) =>
a -> TextTagTableTagAddedCallback -> m ()
textTagTableForeach a
table TextTagTableTagAddedCallback
func = 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 TextTagTable
table' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
FunPtr C_TextTagTableForeach
func' <- C_TextTagTableForeach -> IO (FunPtr C_TextTagTableForeach)
Gtk.Callbacks.mk_TextTagTableForeach (Maybe (Ptr (FunPtr C_TextTagTableForeach))
-> TextTagTableForeach_WithClosures -> C_TextTagTableForeach
Gtk.Callbacks.wrap_TextTagTableForeach Maybe (Ptr (FunPtr C_TextTagTableForeach))
forall a. Maybe a
Nothing (TextTagTableTagAddedCallback -> TextTagTableForeach_WithClosures
Gtk.Callbacks.drop_closures_TextTagTableForeach TextTagTableTagAddedCallback
func))
let data_ :: Ptr a
data_ = Ptr a
forall a. Ptr a
nullPtr
Ptr TextTagTable -> FunPtr C_TextTagTableForeach -> Ptr () -> IO ()
gtk_text_tag_table_foreach Ptr TextTagTable
table' FunPtr C_TextTagTableForeach
func' Ptr ()
forall a. Ptr a
data_
Ptr Any -> IO ()
forall a. Ptr a -> IO ()
safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO ()
forall a b. (a -> b) -> a -> b
$ FunPtr C_TextTagTableForeach -> Ptr Any
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_TextTagTableForeach
func'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextTagTableForeachMethodInfo
instance (signature ~ (Gtk.Callbacks.TextTagTableForeach -> m ()), MonadIO m, IsTextTagTable a) => O.OverloadedMethod TextTagTableForeachMethodInfo a signature where
overloadedMethod = textTagTableForeach
instance O.OverloadedMethodInfo TextTagTableForeachMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TextTagTable.textTagTableForeach",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-TextTagTable.html#v:textTagTableForeach"
}
#endif
foreign import ccall "gtk_text_tag_table_get_size" gtk_text_tag_table_get_size ::
Ptr TextTagTable ->
IO Int32
textTagTableGetSize ::
(B.CallStack.HasCallStack, MonadIO m, IsTextTagTable a) =>
a
-> m Int32
textTagTableGetSize :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextTagTable a) =>
a -> m Int32
textTagTableGetSize a
table = IO Int32 -> m Int32
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
Ptr TextTagTable
table' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Int32
result <- Ptr TextTagTable -> IO Int32
gtk_text_tag_table_get_size Ptr TextTagTable
table'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
Int32 -> IO Int32
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result
#if defined(ENABLE_OVERLOADING)
data TextTagTableGetSizeMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsTextTagTable a) => O.OverloadedMethod TextTagTableGetSizeMethodInfo a signature where
overloadedMethod = textTagTableGetSize
instance O.OverloadedMethodInfo TextTagTableGetSizeMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TextTagTable.textTagTableGetSize",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-TextTagTable.html#v:textTagTableGetSize"
}
#endif
foreign import ccall "gtk_text_tag_table_lookup" gtk_text_tag_table_lookup ::
Ptr TextTagTable ->
CString ->
IO (Ptr Gtk.TextTag.TextTag)
textTagTableLookup ::
(B.CallStack.HasCallStack, MonadIO m, IsTextTagTable a) =>
a
-> T.Text
-> m (Maybe Gtk.TextTag.TextTag)
textTagTableLookup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsTextTagTable a) =>
a -> Text -> m (Maybe TextTag)
textTagTableLookup a
table Text
name = IO (Maybe TextTag) -> m (Maybe TextTag)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe TextTag) -> m (Maybe TextTag))
-> IO (Maybe TextTag) -> m (Maybe TextTag)
forall a b. (a -> b) -> a -> b
$ do
Ptr TextTagTable
table' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
CString
name' <- Text -> IO CString
textToCString Text
name
Ptr TextTag
result <- Ptr TextTagTable -> CString -> IO (Ptr TextTag)
gtk_text_tag_table_lookup Ptr TextTagTable
table' CString
name'
Maybe TextTag
maybeResult <- Ptr TextTag -> (Ptr TextTag -> IO TextTag) -> IO (Maybe TextTag)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr TextTag
result ((Ptr TextTag -> IO TextTag) -> IO (Maybe TextTag))
-> (Ptr TextTag -> IO TextTag) -> IO (Maybe TextTag)
forall a b. (a -> b) -> a -> b
$ \Ptr TextTag
result' -> do
TextTag
result'' <- ((ManagedPtr TextTag -> TextTag) -> Ptr TextTag -> IO TextTag
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr TextTag -> TextTag
Gtk.TextTag.TextTag) Ptr TextTag
result'
TextTag -> IO TextTag
forall (m :: * -> *) a. Monad m => a -> m a
return TextTag
result''
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
name'
Maybe TextTag -> IO (Maybe TextTag)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe TextTag
maybeResult
#if defined(ENABLE_OVERLOADING)
data TextTagTableLookupMethodInfo
instance (signature ~ (T.Text -> m (Maybe Gtk.TextTag.TextTag)), MonadIO m, IsTextTagTable a) => O.OverloadedMethod TextTagTableLookupMethodInfo a signature where
overloadedMethod = textTagTableLookup
instance O.OverloadedMethodInfo TextTagTableLookupMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TextTagTable.textTagTableLookup",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-TextTagTable.html#v:textTagTableLookup"
}
#endif
foreign import ccall "gtk_text_tag_table_remove" gtk_text_tag_table_remove ::
Ptr TextTagTable ->
Ptr Gtk.TextTag.TextTag ->
IO ()
textTagTableRemove ::
(B.CallStack.HasCallStack, MonadIO m, IsTextTagTable a, Gtk.TextTag.IsTextTag b) =>
a
-> b
-> m ()
textTagTableRemove :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsTextTagTable a, IsTextTag b) =>
a -> b -> m ()
textTagTableRemove a
table b
tag = 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 TextTagTable
table' <- a -> IO (Ptr TextTagTable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
table
Ptr TextTag
tag' <- b -> IO (Ptr TextTag)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
tag
Ptr TextTagTable -> Ptr TextTag -> IO ()
gtk_text_tag_table_remove Ptr TextTagTable
table' Ptr TextTag
tag'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
table
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
tag
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data TextTagTableRemoveMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsTextTagTable a, Gtk.TextTag.IsTextTag b) => O.OverloadedMethod TextTagTableRemoveMethodInfo a signature where
overloadedMethod = textTagTableRemove
instance O.OverloadedMethodInfo TextTagTableRemoveMethodInfo a where
overloadedMethodInfo = O.MethodInfo {
O.overloadedMethodName = "GI.Gtk.Objects.TextTagTable.textTagTableRemove",
O.overloadedMethodURL = "https://hackage.haskell.org/package/gi-gtk-3.0.37/docs/GI-Gtk-Objects-TextTagTable.html#v:textTagTableRemove"
}
#endif