gi-gobject-0.2.46.13: GI/GObject/Structs/TypePluginClass.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
The #GTypePlugin interface is used by the type system in order to handle
the lifecycle of dynamically loaded types.
-}
module GI.GObject.Structs.TypePluginClass
(
-- * Exported types
TypePluginClass(..) ,
newZeroTypePluginClass ,
noTypePluginClass ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.GObject.Types
import GI.GObject.Callbacks
newtype TypePluginClass = TypePluginClass (ForeignPtr TypePluginClass)
-- | Construct a `TypePluginClass` struct initialized to zero.
newZeroTypePluginClass :: MonadIO m => m TypePluginClass
newZeroTypePluginClass = liftIO $ callocBytes 48 >>= wrapPtr TypePluginClass
noTypePluginClass :: Maybe TypePluginClass
noTypePluginClass = Nothing
-- XXX Skipped getter for "TypePluginClass:use_plugin" :: Not implemented: "Wrapping foreign callbacks is not supported yet"
-- XXX Skipped getter for "TypePluginClass:unuse_plugin" :: Not implemented: "Wrapping foreign callbacks is not supported yet"
-- XXX Skipped getter for "TypePluginClass:complete_type_info" :: Not implemented: "Wrapping foreign callbacks is not supported yet"
-- XXX Skipped getter for "TypePluginClass:complete_interface_info" :: Not implemented: "Wrapping foreign callbacks is not supported yet"
type family ResolveTypePluginClassMethod (t :: Symbol) (o :: *) :: * where
ResolveTypePluginClassMethod l o = MethodResolutionFailed l o
instance (info ~ ResolveTypePluginClassMethod t TypePluginClass, MethodInfo info TypePluginClass p) => IsLabelProxy t (TypePluginClass -> p) where
fromLabelProxy _ = overloadedMethod (MethodProxy :: MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveTypePluginClassMethod t TypePluginClass, MethodInfo info TypePluginClass p) => IsLabel t (TypePluginClass -> p) where
fromLabel _ = overloadedMethod (MethodProxy :: MethodProxy info)
#endif