-- GENERATED by C->Haskell Compiler, version 0.13.4 (gtk2hs branch) "Bin IO", 13 Nov 2004 (Haskell)
-- Edit the ORIGNAL .chs file instead!


{-# LINE 1 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}
{-# OPTIONS_HADDOCK hide #-}
-- -*-haskell-*-
-- -------------------- automatically generated file - do not edit ----------
--  Object hierarchy for the GIMP Toolkit (GTK) Binding for Haskell
--
--  Author : Axel Simon
--
--  Copyright (C) 2001-2005 Axel Simon
--
--  This library is free software; you can redistribute it and/or
--  modify it under the terms of the GNU Lesser General Public
--  License as published by the Free Software Foundation; either
--  version 2.1 of the License, or (at your option) any later version.
--
--  This library is distributed in the hope that it will be useful,
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
--  Lesser General Public License for more details.
--
-- #hide

-- |
-- Maintainer  : gtk2hs-users@lists.sourceforge.net
-- Stability   : provisional
-- Portability : portable (depends on GHC)
--
-- This file reflects the Gtk+ object hierarchy in terms of Haskell classes.
--
-- Note: the mk... functions were originally meant to simply be an alias
-- for the constructor. However, in order to communicate the destructor
-- of an object to objectNew, the mk... functions are now a tuple containing
-- Haskell constructor and the destructor function pointer. This hack avoids
-- changing all modules that simply pass mk... to objectNew.
--
module Media.Streaming.GStreamer.Core.Hierarchy (

  module System.Glib.GObject,
  Object(Object), ObjectClass,
  toObject, 
  mkObject, unObject,
  castToObject, gTypeObject,
  Pad(Pad), PadClass,
  toPad, 
  mkPad, unPad,
  castToPad, gTypePad,
  GhostPad(GhostPad), GhostPadClass,
  toGhostPad, 
  mkGhostPad, unGhostPad,
  castToGhostPad, gTypeGhostPad,
  PluginFeature(PluginFeature), PluginFeatureClass,
  toPluginFeature, 
  mkPluginFeature, unPluginFeature,
  castToPluginFeature, gTypePluginFeature,
  ElementFactory(ElementFactory), ElementFactoryClass,
  toElementFactory, 
  mkElementFactory, unElementFactory,
  castToElementFactory, gTypeElementFactory,
  TypeFindFactory(TypeFindFactory), TypeFindFactoryClass,
  toTypeFindFactory, 
  mkTypeFindFactory, unTypeFindFactory,
  castToTypeFindFactory, gTypeTypeFindFactory,
  IndexFactory(IndexFactory), IndexFactoryClass,
  toIndexFactory, 
  mkIndexFactory, unIndexFactory,
  castToIndexFactory, gTypeIndexFactory,
  Element(Element), ElementClass,
  toElement, 
  mkElement, unElement,
  castToElement, gTypeElement,
  Bin(Bin), BinClass,
  toBin, 
  mkBin, unBin,
  castToBin, gTypeBin,
  Pipeline(Pipeline), PipelineClass,
  toPipeline, 
  mkPipeline, unPipeline,
  castToPipeline, gTypePipeline,
  ImplementsInterface(ImplementsInterface), ImplementsInterfaceClass,
  toImplementsInterface, 
  mkImplementsInterface, unImplementsInterface,
  castToImplementsInterface, gTypeImplementsInterface,
  TagSetter(TagSetter), TagSetterClass,
  toTagSetter, 
  mkTagSetter, unTagSetter,
  castToTagSetter, gTypeTagSetter,
  BaseSrc(BaseSrc), BaseSrcClass,
  toBaseSrc, 
  mkBaseSrc, unBaseSrc,
  castToBaseSrc, gTypeBaseSrc,
  PushSrc(PushSrc), PushSrcClass,
  toPushSrc, 
  mkPushSrc, unPushSrc,
  castToPushSrc, gTypePushSrc,
  BaseSink(BaseSink), BaseSinkClass,
  toBaseSink, 
  mkBaseSink, unBaseSink,
  castToBaseSink, gTypeBaseSink,
  BaseTransform(BaseTransform), BaseTransformClass,
  toBaseTransform, 
  mkBaseTransform, unBaseTransform,
  castToBaseTransform, gTypeBaseTransform,
  Plugin(Plugin), PluginClass,
  toPlugin, 
  mkPlugin, unPlugin,
  castToPlugin, gTypePlugin,
  Registry(Registry), RegistryClass,
  toRegistry, 
  mkRegistry, unRegistry,
  castToRegistry, gTypeRegistry,
  Bus(Bus), BusClass,
  toBus, 
  mkBus, unBus,
  castToBus, gTypeBus,
  Clock(Clock), ClockClass,
  toClock, 
  mkClock, unClock,
  castToClock, gTypeClock,
  AudioClock(AudioClock), AudioClockClass,
  toAudioClock, 
  mkAudioClock, unAudioClock,
  castToAudioClock, gTypeAudioClock,
  SystemClock(SystemClock), SystemClockClass,
  toSystemClock, 
  mkSystemClock, unSystemClock,
  castToSystemClock, gTypeSystemClock,
  NetClientClock(NetClientClock), NetClientClockClass,
  toNetClientClock, 
  mkNetClientClock, unNetClientClock,
  castToNetClientClock, gTypeNetClientClock,
  Index(Index), IndexClass,
  toIndex, 
  mkIndex, unIndex,
  castToIndex, gTypeIndex,
  PadTemplate(PadTemplate), PadTemplateClass,
  toPadTemplate, 
  mkPadTemplate, unPadTemplate,
  castToPadTemplate, gTypePadTemplate,
  Task(Task), TaskClass,
  toTask, 
  mkTask, unTask,
  castToTask, gTypeTask,
  XML(XML), XMLClass,
  toXML, 
  mkXML, unXML,
  castToXML, gTypeXML,
  ChildProxy(ChildProxy), ChildProxyClass,
  toChildProxy, 
  mkChildProxy, unChildProxy,
  castToChildProxy, gTypeChildProxy,
  CollectPads(CollectPads), CollectPadsClass,
  toCollectPads, 
  mkCollectPads, unCollectPads,
  castToCollectPads, gTypeCollectPads,
  URIHandler(URIHandler), URIHandlerClass,
  toURIHandler, 
  mkURIHandler, unURIHandler,
  castToURIHandler, gTypeURIHandler,
  Adapter(Adapter), AdapterClass,
  toAdapter, 
  mkAdapter, unAdapter,
  castToAdapter, gTypeAdapter,
  Controller(Controller), ControllerClass,
  toController, 
  mkController, unController,
  castToController, gTypeController
  ) where

import Foreign.ForeignPtr (ForeignPtr, castForeignPtr, unsafeForeignPtrToPtr)
import Foreign.C.Types    (CULong, CUInt)
import System.Glib.GType	(GType, typeInstanceIsA)
import System.Glib.GObject
{-# LINE 171 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}


{-# LINE 173 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- The usage of foreignPtrToPtr should be safe as the evaluation will only be
-- forced if the object is used afterwards
--
castTo :: (GObjectClass obj, GObjectClass obj') => GType -> String
                                                -> (obj -> obj')
castTo gtype objTypeName obj =
  case toGObject obj of
    gobj@(GObject objFPtr)
      | typeInstanceIsA ((unsafeForeignPtrToPtr.castForeignPtr) objFPtr) gtype
                  -> unsafeCastGObject gobj
      | otherwise -> error $ "Cannot cast object to " ++ objTypeName


-- ********************************************************************* Object

newtype Object = Object (ForeignPtr (Object)) deriving (Eq,Ord)

mkObject = (Object, objectUnref)
unObject (Object o) = o

class GObjectClass o => ObjectClass o
toObject :: ObjectClass o => o -> Object
toObject = unsafeCastGObject . toGObject

instance ObjectClass Object
instance GObjectClass Object where
  toGObject = GObject . castForeignPtr . unObject
  unsafeCastGObject = Object . castForeignPtr . unGObject

castToObject :: GObjectClass obj => obj -> Object
castToObject = castTo gTypeObject "Object"

gTypeObject :: GType
gTypeObject =
  gst_object_get_type
{-# LINE 209 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************************ Pad

newtype Pad = Pad (ForeignPtr (Pad)) deriving (Eq,Ord)

mkPad = (Pad, objectUnref)
unPad (Pad o) = o

class ObjectClass o => PadClass o
toPad :: PadClass o => o -> Pad
toPad = unsafeCastGObject . toGObject

instance PadClass Pad
instance ObjectClass Pad
instance GObjectClass Pad where
  toGObject = GObject . castForeignPtr . unPad
  unsafeCastGObject = Pad . castForeignPtr . unGObject

castToPad :: GObjectClass obj => obj -> Pad
castToPad = castTo gTypePad "Pad"

gTypePad :: GType
gTypePad =
  gst_pad_get_type
{-# LINE 233 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************* GhostPad

newtype GhostPad = GhostPad (ForeignPtr (GhostPad)) deriving (Eq,Ord)

mkGhostPad = (GhostPad, objectUnref)
unGhostPad (GhostPad o) = o

class PadClass o => GhostPadClass o
toGhostPad :: GhostPadClass o => o -> GhostPad
toGhostPad = unsafeCastGObject . toGObject

instance GhostPadClass GhostPad
instance PadClass GhostPad
instance ObjectClass GhostPad
instance GObjectClass GhostPad where
  toGObject = GObject . castForeignPtr . unGhostPad
  unsafeCastGObject = GhostPad . castForeignPtr . unGObject

castToGhostPad :: GObjectClass obj => obj -> GhostPad
castToGhostPad = castTo gTypeGhostPad "GhostPad"

gTypeGhostPad :: GType
gTypeGhostPad =
  gst_ghost_pad_get_type
{-# LINE 258 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************** PluginFeature

newtype PluginFeature = PluginFeature (ForeignPtr (PluginFeature)) deriving (Eq,Ord)

mkPluginFeature = (PluginFeature, objectUnref)
unPluginFeature (PluginFeature o) = o

class ObjectClass o => PluginFeatureClass o
toPluginFeature :: PluginFeatureClass o => o -> PluginFeature
toPluginFeature = unsafeCastGObject . toGObject

instance PluginFeatureClass PluginFeature
instance ObjectClass PluginFeature
instance GObjectClass PluginFeature where
  toGObject = GObject . castForeignPtr . unPluginFeature
  unsafeCastGObject = PluginFeature . castForeignPtr . unGObject

castToPluginFeature :: GObjectClass obj => obj -> PluginFeature
castToPluginFeature = castTo gTypePluginFeature "PluginFeature"

gTypePluginFeature :: GType
gTypePluginFeature =
  gst_plugin_feature_get_type
{-# LINE 282 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************* ElementFactory

newtype ElementFactory = ElementFactory (ForeignPtr (ElementFactory)) deriving (Eq,Ord)

mkElementFactory = (ElementFactory, objectUnref)
unElementFactory (ElementFactory o) = o

class PluginFeatureClass o => ElementFactoryClass o
toElementFactory :: ElementFactoryClass o => o -> ElementFactory
toElementFactory = unsafeCastGObject . toGObject

instance ElementFactoryClass ElementFactory
instance PluginFeatureClass ElementFactory
instance ObjectClass ElementFactory
instance GObjectClass ElementFactory where
  toGObject = GObject . castForeignPtr . unElementFactory
  unsafeCastGObject = ElementFactory . castForeignPtr . unGObject

castToElementFactory :: GObjectClass obj => obj -> ElementFactory
castToElementFactory = castTo gTypeElementFactory "ElementFactory"

gTypeElementFactory :: GType
gTypeElementFactory =
  gst_element_factory_get_type
{-# LINE 307 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************ TypeFindFactory

newtype TypeFindFactory = TypeFindFactory (ForeignPtr (TypeFindFactory)) deriving (Eq,Ord)

mkTypeFindFactory = (TypeFindFactory, objectUnref)
unTypeFindFactory (TypeFindFactory o) = o

class PluginFeatureClass o => TypeFindFactoryClass o
toTypeFindFactory :: TypeFindFactoryClass o => o -> TypeFindFactory
toTypeFindFactory = unsafeCastGObject . toGObject

instance TypeFindFactoryClass TypeFindFactory
instance PluginFeatureClass TypeFindFactory
instance ObjectClass TypeFindFactory
instance GObjectClass TypeFindFactory where
  toGObject = GObject . castForeignPtr . unTypeFindFactory
  unsafeCastGObject = TypeFindFactory . castForeignPtr . unGObject

castToTypeFindFactory :: GObjectClass obj => obj -> TypeFindFactory
castToTypeFindFactory = castTo gTypeTypeFindFactory "TypeFindFactory"

gTypeTypeFindFactory :: GType
gTypeTypeFindFactory =
  gst_type_find_factory_get_type
{-# LINE 332 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- *************************************************************** IndexFactory

newtype IndexFactory = IndexFactory (ForeignPtr (IndexFactory)) deriving (Eq,Ord)

mkIndexFactory = (IndexFactory, objectUnref)
unIndexFactory (IndexFactory o) = o

class PluginFeatureClass o => IndexFactoryClass o
toIndexFactory :: IndexFactoryClass o => o -> IndexFactory
toIndexFactory = unsafeCastGObject . toGObject

instance IndexFactoryClass IndexFactory
instance PluginFeatureClass IndexFactory
instance ObjectClass IndexFactory
instance GObjectClass IndexFactory where
  toGObject = GObject . castForeignPtr . unIndexFactory
  unsafeCastGObject = IndexFactory . castForeignPtr . unGObject

castToIndexFactory :: GObjectClass obj => obj -> IndexFactory
castToIndexFactory = castTo gTypeIndexFactory "IndexFactory"

gTypeIndexFactory :: GType
gTypeIndexFactory =
  gst_index_factory_get_type
{-# LINE 357 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************** Element

newtype Element = Element (ForeignPtr (Element)) deriving (Eq,Ord)

mkElement = (Element, objectUnref)
unElement (Element o) = o

class ObjectClass o => ElementClass o
toElement :: ElementClass o => o -> Element
toElement = unsafeCastGObject . toGObject

instance ElementClass Element
instance ObjectClass Element
instance GObjectClass Element where
  toGObject = GObject . castForeignPtr . unElement
  unsafeCastGObject = Element . castForeignPtr . unGObject

castToElement :: GObjectClass obj => obj -> Element
castToElement = castTo gTypeElement "Element"

gTypeElement :: GType
gTypeElement =
  gst_element_get_type
{-# LINE 381 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************************ Bin

newtype Bin = Bin (ForeignPtr (Bin)) deriving (Eq,Ord)

mkBin = (Bin, objectUnref)
unBin (Bin o) = o

class ElementClass o => BinClass o
toBin :: BinClass o => o -> Bin
toBin = unsafeCastGObject . toGObject

instance BinClass Bin
instance ElementClass Bin
instance ObjectClass Bin
instance GObjectClass Bin where
  toGObject = GObject . castForeignPtr . unBin
  unsafeCastGObject = Bin . castForeignPtr . unGObject

castToBin :: GObjectClass obj => obj -> Bin
castToBin = castTo gTypeBin "Bin"

gTypeBin :: GType
gTypeBin =
  gst_bin_get_type
{-# LINE 406 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************* Pipeline

newtype Pipeline = Pipeline (ForeignPtr (Pipeline)) deriving (Eq,Ord)

mkPipeline = (Pipeline, objectUnref)
unPipeline (Pipeline o) = o

class BinClass o => PipelineClass o
toPipeline :: PipelineClass o => o -> Pipeline
toPipeline = unsafeCastGObject . toGObject

instance PipelineClass Pipeline
instance BinClass Pipeline
instance ElementClass Pipeline
instance ObjectClass Pipeline
instance GObjectClass Pipeline where
  toGObject = GObject . castForeignPtr . unPipeline
  unsafeCastGObject = Pipeline . castForeignPtr . unGObject

castToPipeline :: GObjectClass obj => obj -> Pipeline
castToPipeline = castTo gTypePipeline "Pipeline"

gTypePipeline :: GType
gTypePipeline =
  gst_pipeline_get_type
{-# LINE 432 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************** ImplementsInterface

newtype ImplementsInterface = ImplementsInterface (ForeignPtr (ImplementsInterface)) deriving (Eq,Ord)

mkImplementsInterface = (ImplementsInterface, objectUnref)
unImplementsInterface (ImplementsInterface o) = o

class ElementClass o => ImplementsInterfaceClass o
toImplementsInterface :: ImplementsInterfaceClass o => o -> ImplementsInterface
toImplementsInterface = unsafeCastGObject . toGObject

instance ImplementsInterfaceClass ImplementsInterface
instance ElementClass ImplementsInterface
instance ObjectClass ImplementsInterface
instance GObjectClass ImplementsInterface where
  toGObject = GObject . castForeignPtr . unImplementsInterface
  unsafeCastGObject = ImplementsInterface . castForeignPtr . unGObject

castToImplementsInterface :: GObjectClass obj => obj -> ImplementsInterface
castToImplementsInterface = castTo gTypeImplementsInterface "ImplementsInterface"

gTypeImplementsInterface :: GType
gTypeImplementsInterface =
  gst_implements_interface_get_type
{-# LINE 457 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ****************************************************************** TagSetter

newtype TagSetter = TagSetter (ForeignPtr (TagSetter)) deriving (Eq,Ord)

mkTagSetter = (TagSetter, objectUnref)
unTagSetter (TagSetter o) = o

class ElementClass o => TagSetterClass o
toTagSetter :: TagSetterClass o => o -> TagSetter
toTagSetter = unsafeCastGObject . toGObject

instance TagSetterClass TagSetter
instance ElementClass TagSetter
instance ObjectClass TagSetter
instance GObjectClass TagSetter where
  toGObject = GObject . castForeignPtr . unTagSetter
  unsafeCastGObject = TagSetter . castForeignPtr . unGObject

castToTagSetter :: GObjectClass obj => obj -> TagSetter
castToTagSetter = castTo gTypeTagSetter "TagSetter"

gTypeTagSetter :: GType
gTypeTagSetter =
  gst_tag_setter_get_type
{-# LINE 482 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************** BaseSrc

newtype BaseSrc = BaseSrc (ForeignPtr (BaseSrc)) deriving (Eq,Ord)

mkBaseSrc = (BaseSrc, objectUnref)
unBaseSrc (BaseSrc o) = o

class ElementClass o => BaseSrcClass o
toBaseSrc :: BaseSrcClass o => o -> BaseSrc
toBaseSrc = unsafeCastGObject . toGObject

instance BaseSrcClass BaseSrc
instance ElementClass BaseSrc
instance ObjectClass BaseSrc
instance GObjectClass BaseSrc where
  toGObject = GObject . castForeignPtr . unBaseSrc
  unsafeCastGObject = BaseSrc . castForeignPtr . unGObject

castToBaseSrc :: GObjectClass obj => obj -> BaseSrc
castToBaseSrc = castTo gTypeBaseSrc "BaseSrc"

gTypeBaseSrc :: GType
gTypeBaseSrc =
  gst_base_src_get_type
{-# LINE 507 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************** PushSrc

newtype PushSrc = PushSrc (ForeignPtr (PushSrc)) deriving (Eq,Ord)

mkPushSrc = (PushSrc, objectUnref)
unPushSrc (PushSrc o) = o

class BaseSrcClass o => PushSrcClass o
toPushSrc :: PushSrcClass o => o -> PushSrc
toPushSrc = unsafeCastGObject . toGObject

instance PushSrcClass PushSrc
instance BaseSrcClass PushSrc
instance ElementClass PushSrc
instance ObjectClass PushSrc
instance GObjectClass PushSrc where
  toGObject = GObject . castForeignPtr . unPushSrc
  unsafeCastGObject = PushSrc . castForeignPtr . unGObject

castToPushSrc :: GObjectClass obj => obj -> PushSrc
castToPushSrc = castTo gTypePushSrc "PushSrc"

gTypePushSrc :: GType
gTypePushSrc =
  gst_push_src_get_type
{-# LINE 533 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************* BaseSink

newtype BaseSink = BaseSink (ForeignPtr (BaseSink)) deriving (Eq,Ord)

mkBaseSink = (BaseSink, objectUnref)
unBaseSink (BaseSink o) = o

class ElementClass o => BaseSinkClass o
toBaseSink :: BaseSinkClass o => o -> BaseSink
toBaseSink = unsafeCastGObject . toGObject

instance BaseSinkClass BaseSink
instance ElementClass BaseSink
instance ObjectClass BaseSink
instance GObjectClass BaseSink where
  toGObject = GObject . castForeignPtr . unBaseSink
  unsafeCastGObject = BaseSink . castForeignPtr . unGObject

castToBaseSink :: GObjectClass obj => obj -> BaseSink
castToBaseSink = castTo gTypeBaseSink "BaseSink"

gTypeBaseSink :: GType
gTypeBaseSink =
  gst_base_sink_get_type
{-# LINE 558 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************** BaseTransform

newtype BaseTransform = BaseTransform (ForeignPtr (BaseTransform)) deriving (Eq,Ord)

mkBaseTransform = (BaseTransform, objectUnref)
unBaseTransform (BaseTransform o) = o

class ElementClass o => BaseTransformClass o
toBaseTransform :: BaseTransformClass o => o -> BaseTransform
toBaseTransform = unsafeCastGObject . toGObject

instance BaseTransformClass BaseTransform
instance ElementClass BaseTransform
instance ObjectClass BaseTransform
instance GObjectClass BaseTransform where
  toGObject = GObject . castForeignPtr . unBaseTransform
  unsafeCastGObject = BaseTransform . castForeignPtr . unGObject

castToBaseTransform :: GObjectClass obj => obj -> BaseTransform
castToBaseTransform = castTo gTypeBaseTransform "BaseTransform"

gTypeBaseTransform :: GType
gTypeBaseTransform =
  gst_base_transform_get_type
{-# LINE 583 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ********************************************************************* Plugin

newtype Plugin = Plugin (ForeignPtr (Plugin)) deriving (Eq,Ord)

mkPlugin = (Plugin, objectUnref)
unPlugin (Plugin o) = o

class ObjectClass o => PluginClass o
toPlugin :: PluginClass o => o -> Plugin
toPlugin = unsafeCastGObject . toGObject

instance PluginClass Plugin
instance ObjectClass Plugin
instance GObjectClass Plugin where
  toGObject = GObject . castForeignPtr . unPlugin
  unsafeCastGObject = Plugin . castForeignPtr . unGObject

castToPlugin :: GObjectClass obj => obj -> Plugin
castToPlugin = castTo gTypePlugin "Plugin"

gTypePlugin :: GType
gTypePlugin =
  gst_plugin_get_type
{-# LINE 607 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************* Registry

newtype Registry = Registry (ForeignPtr (Registry)) deriving (Eq,Ord)

mkRegistry = (Registry, objectUnref)
unRegistry (Registry o) = o

class ObjectClass o => RegistryClass o
toRegistry :: RegistryClass o => o -> Registry
toRegistry = unsafeCastGObject . toGObject

instance RegistryClass Registry
instance ObjectClass Registry
instance GObjectClass Registry where
  toGObject = GObject . castForeignPtr . unRegistry
  unsafeCastGObject = Registry . castForeignPtr . unGObject

castToRegistry :: GObjectClass obj => obj -> Registry
castToRegistry = castTo gTypeRegistry "Registry"

gTypeRegistry :: GType
gTypeRegistry =
  gst_registry_get_type
{-# LINE 631 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************************ Bus

newtype Bus = Bus (ForeignPtr (Bus)) deriving (Eq,Ord)

mkBus = (Bus, objectUnref)
unBus (Bus o) = o

class ObjectClass o => BusClass o
toBus :: BusClass o => o -> Bus
toBus = unsafeCastGObject . toGObject

instance BusClass Bus
instance ObjectClass Bus
instance GObjectClass Bus where
  toGObject = GObject . castForeignPtr . unBus
  unsafeCastGObject = Bus . castForeignPtr . unGObject

castToBus :: GObjectClass obj => obj -> Bus
castToBus = castTo gTypeBus "Bus"

gTypeBus :: GType
gTypeBus =
  gst_bus_get_type
{-# LINE 655 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ********************************************************************** Clock

newtype Clock = Clock (ForeignPtr (Clock)) deriving (Eq,Ord)

mkClock = (Clock, objectUnref)
unClock (Clock o) = o

class ObjectClass o => ClockClass o
toClock :: ClockClass o => o -> Clock
toClock = unsafeCastGObject . toGObject

instance ClockClass Clock
instance ObjectClass Clock
instance GObjectClass Clock where
  toGObject = GObject . castForeignPtr . unClock
  unsafeCastGObject = Clock . castForeignPtr . unGObject

castToClock :: GObjectClass obj => obj -> Clock
castToClock = castTo gTypeClock "Clock"

gTypeClock :: GType
gTypeClock =
  gst_clock_get_type
{-# LINE 679 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ***************************************************************** AudioClock

newtype AudioClock = AudioClock (ForeignPtr (AudioClock)) deriving (Eq,Ord)

mkAudioClock = (AudioClock, objectUnref)
unAudioClock (AudioClock o) = o

class ClockClass o => AudioClockClass o
toAudioClock :: AudioClockClass o => o -> AudioClock
toAudioClock = unsafeCastGObject . toGObject

instance AudioClockClass AudioClock
instance ClockClass AudioClock
instance ObjectClass AudioClock
instance GObjectClass AudioClock where
  toGObject = GObject . castForeignPtr . unAudioClock
  unsafeCastGObject = AudioClock . castForeignPtr . unGObject

castToAudioClock :: GObjectClass obj => obj -> AudioClock
castToAudioClock = castTo gTypeAudioClock "AudioClock"

gTypeAudioClock :: GType
gTypeAudioClock =
  gst_audio_clock_get_type
{-# LINE 704 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- **************************************************************** SystemClock

newtype SystemClock = SystemClock (ForeignPtr (SystemClock)) deriving (Eq,Ord)

mkSystemClock = (SystemClock, objectUnref)
unSystemClock (SystemClock o) = o

class ClockClass o => SystemClockClass o
toSystemClock :: SystemClockClass o => o -> SystemClock
toSystemClock = unsafeCastGObject . toGObject

instance SystemClockClass SystemClock
instance ClockClass SystemClock
instance ObjectClass SystemClock
instance GObjectClass SystemClock where
  toGObject = GObject . castForeignPtr . unSystemClock
  unsafeCastGObject = SystemClock . castForeignPtr . unGObject

castToSystemClock :: GObjectClass obj => obj -> SystemClock
castToSystemClock = castTo gTypeSystemClock "SystemClock"

gTypeSystemClock :: GType
gTypeSystemClock =
  gst_system_clock_get_type
{-# LINE 729 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************* NetClientClock

newtype NetClientClock = NetClientClock (ForeignPtr (NetClientClock)) deriving (Eq,Ord)

mkNetClientClock = (NetClientClock, objectUnref)
unNetClientClock (NetClientClock o) = o

class ClockClass o => NetClientClockClass o
toNetClientClock :: NetClientClockClass o => o -> NetClientClock
toNetClientClock = unsafeCastGObject . toGObject

instance NetClientClockClass NetClientClock
instance ClockClass NetClientClock
instance ObjectClass NetClientClock
instance GObjectClass NetClientClock where
  toGObject = GObject . castForeignPtr . unNetClientClock
  unsafeCastGObject = NetClientClock . castForeignPtr . unGObject

castToNetClientClock :: GObjectClass obj => obj -> NetClientClock
castToNetClientClock = castTo gTypeNetClientClock "NetClientClock"

gTypeNetClientClock :: GType
gTypeNetClientClock =
  gst_net_client_clock_get_type
{-# LINE 754 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ********************************************************************** Index

newtype Index = Index (ForeignPtr (Index)) deriving (Eq,Ord)

mkIndex = (Index, objectUnref)
unIndex (Index o) = o

class ObjectClass o => IndexClass o
toIndex :: IndexClass o => o -> Index
toIndex = unsafeCastGObject . toGObject

instance IndexClass Index
instance ObjectClass Index
instance GObjectClass Index where
  toGObject = GObject . castForeignPtr . unIndex
  unsafeCastGObject = Index . castForeignPtr . unGObject

castToIndex :: GObjectClass obj => obj -> Index
castToIndex = castTo gTypeIndex "Index"

gTypeIndex :: GType
gTypeIndex =
  gst_index_get_type
{-# LINE 778 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- **************************************************************** PadTemplate

newtype PadTemplate = PadTemplate (ForeignPtr (PadTemplate)) deriving (Eq,Ord)

mkPadTemplate = (PadTemplate, objectUnref)
unPadTemplate (PadTemplate o) = o

class ObjectClass o => PadTemplateClass o
toPadTemplate :: PadTemplateClass o => o -> PadTemplate
toPadTemplate = unsafeCastGObject . toGObject

instance PadTemplateClass PadTemplate
instance ObjectClass PadTemplate
instance GObjectClass PadTemplate where
  toGObject = GObject . castForeignPtr . unPadTemplate
  unsafeCastGObject = PadTemplate . castForeignPtr . unGObject

castToPadTemplate :: GObjectClass obj => obj -> PadTemplate
castToPadTemplate = castTo gTypePadTemplate "PadTemplate"

gTypePadTemplate :: GType
gTypePadTemplate =
  gst_pad_template_get_type
{-# LINE 802 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- *********************************************************************** Task

newtype Task = Task (ForeignPtr (Task)) deriving (Eq,Ord)

mkTask = (Task, objectUnref)
unTask (Task o) = o

class ObjectClass o => TaskClass o
toTask :: TaskClass o => o -> Task
toTask = unsafeCastGObject . toGObject

instance TaskClass Task
instance ObjectClass Task
instance GObjectClass Task where
  toGObject = GObject . castForeignPtr . unTask
  unsafeCastGObject = Task . castForeignPtr . unGObject

castToTask :: GObjectClass obj => obj -> Task
castToTask = castTo gTypeTask "Task"

gTypeTask :: GType
gTypeTask =
  gst_task_get_type
{-# LINE 826 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ************************************************************************ XML

newtype XML = XML (ForeignPtr (XML)) deriving (Eq,Ord)

mkXML = (XML, objectUnref)
unXML (XML o) = o

class ObjectClass o => XMLClass o
toXML :: XMLClass o => o -> XML
toXML = unsafeCastGObject . toGObject

instance XMLClass XML
instance ObjectClass XML
instance GObjectClass XML where
  toGObject = GObject . castForeignPtr . unXML
  unsafeCastGObject = XML . castForeignPtr . unGObject

castToXML :: GObjectClass obj => obj -> XML
castToXML = castTo gTypeXML "XML"

gTypeXML :: GType
gTypeXML =
  gst_xml_get_type
{-# LINE 850 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ***************************************************************** ChildProxy

newtype ChildProxy = ChildProxy (ForeignPtr (ChildProxy)) deriving (Eq,Ord)

mkChildProxy = (ChildProxy, objectUnref)
unChildProxy (ChildProxy o) = o

class ObjectClass o => ChildProxyClass o
toChildProxy :: ChildProxyClass o => o -> ChildProxy
toChildProxy = unsafeCastGObject . toGObject

instance ChildProxyClass ChildProxy
instance ObjectClass ChildProxy
instance GObjectClass ChildProxy where
  toGObject = GObject . castForeignPtr . unChildProxy
  unsafeCastGObject = ChildProxy . castForeignPtr . unGObject

castToChildProxy :: GObjectClass obj => obj -> ChildProxy
castToChildProxy = castTo gTypeChildProxy "ChildProxy"

gTypeChildProxy :: GType
gTypeChildProxy =
  gst_child_proxy_get_type
{-# LINE 874 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- **************************************************************** CollectPads

newtype CollectPads = CollectPads (ForeignPtr (CollectPads)) deriving (Eq,Ord)

mkCollectPads = (CollectPads, objectUnref)
unCollectPads (CollectPads o) = o

class ObjectClass o => CollectPadsClass o
toCollectPads :: CollectPadsClass o => o -> CollectPads
toCollectPads = unsafeCastGObject . toGObject

instance CollectPadsClass CollectPads
instance ObjectClass CollectPads
instance GObjectClass CollectPads where
  toGObject = GObject . castForeignPtr . unCollectPads
  unsafeCastGObject = CollectPads . castForeignPtr . unGObject

castToCollectPads :: GObjectClass obj => obj -> CollectPads
castToCollectPads = castTo gTypeCollectPads "CollectPads"

gTypeCollectPads :: GType
gTypeCollectPads =
  gst_collect_pads_get_type
{-# LINE 898 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ***************************************************************** URIHandler

newtype URIHandler = URIHandler (ForeignPtr (URIHandler)) deriving (Eq,Ord)

mkURIHandler = (URIHandler, objectUnref)
unURIHandler (URIHandler o) = o

class GObjectClass o => URIHandlerClass o
toURIHandler :: URIHandlerClass o => o -> URIHandler
toURIHandler = unsafeCastGObject . toGObject

instance URIHandlerClass URIHandler
instance GObjectClass URIHandler where
  toGObject = GObject . castForeignPtr . unURIHandler
  unsafeCastGObject = URIHandler . castForeignPtr . unGObject

castToURIHandler :: GObjectClass obj => obj -> URIHandler
castToURIHandler = castTo gTypeURIHandler "URIHandler"

gTypeURIHandler :: GType
gTypeURIHandler =
  gst_uri_handler_get_type
{-# LINE 921 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ******************************************************************** Adapter

newtype Adapter = Adapter (ForeignPtr (Adapter)) deriving (Eq,Ord)

mkAdapter = (Adapter, objectUnref)
unAdapter (Adapter o) = o

class GObjectClass o => AdapterClass o
toAdapter :: AdapterClass o => o -> Adapter
toAdapter = unsafeCastGObject . toGObject

instance AdapterClass Adapter
instance GObjectClass Adapter where
  toGObject = GObject . castForeignPtr . unAdapter
  unsafeCastGObject = Adapter . castForeignPtr . unGObject

castToAdapter :: GObjectClass obj => obj -> Adapter
castToAdapter = castTo gTypeAdapter "Adapter"

gTypeAdapter :: GType
gTypeAdapter =
  gst_adapter_get_type
{-# LINE 944 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}

-- ***************************************************************** Controller

newtype Controller = Controller (ForeignPtr (Controller)) deriving (Eq,Ord)

mkController = (Controller, objectUnref)
unController (Controller o) = o

class GObjectClass o => ControllerClass o
toController :: ControllerClass o => o -> Controller
toController = unsafeCastGObject . toGObject

instance ControllerClass Controller
instance GObjectClass Controller where
  toGObject = GObject . castForeignPtr . unController
  unsafeCastGObject = Controller . castForeignPtr . unGObject

castToController :: GObjectClass obj => obj -> Controller
castToController = castTo gTypeController "Controller"

gTypeController :: GType
gTypeController =
  gst_controller_get_type
{-# LINE 967 "./Media/Streaming/GStreamer/Core/Hierarchy.chs" #-}


foreign import ccall unsafe "gst_object_get_type"
  gst_object_get_type :: CUInt

foreign import ccall unsafe "gst_pad_get_type"
  gst_pad_get_type :: CUInt

foreign import ccall unsafe "gst_ghost_pad_get_type"
  gst_ghost_pad_get_type :: CUInt

foreign import ccall unsafe "gst_plugin_feature_get_type"
  gst_plugin_feature_get_type :: CUInt

foreign import ccall unsafe "gst_element_factory_get_type"
  gst_element_factory_get_type :: CUInt

foreign import ccall unsafe "gst_type_find_factory_get_type"
  gst_type_find_factory_get_type :: CUInt

foreign import ccall unsafe "gst_index_factory_get_type"
  gst_index_factory_get_type :: CUInt

foreign import ccall unsafe "gst_element_get_type"
  gst_element_get_type :: CUInt

foreign import ccall unsafe "gst_bin_get_type"
  gst_bin_get_type :: CUInt

foreign import ccall unsafe "gst_pipeline_get_type"
  gst_pipeline_get_type :: CUInt

foreign import ccall unsafe "gst_implements_interface_get_type"
  gst_implements_interface_get_type :: CUInt

foreign import ccall unsafe "gst_tag_setter_get_type"
  gst_tag_setter_get_type :: CUInt

foreign import ccall unsafe "gst_base_src_get_type"
  gst_base_src_get_type :: CUInt

foreign import ccall unsafe "gst_push_src_get_type"
  gst_push_src_get_type :: CUInt

foreign import ccall unsafe "gst_base_sink_get_type"
  gst_base_sink_get_type :: CUInt

foreign import ccall unsafe "gst_base_transform_get_type"
  gst_base_transform_get_type :: CUInt

foreign import ccall unsafe "gst_plugin_get_type"
  gst_plugin_get_type :: CUInt

foreign import ccall unsafe "gst_registry_get_type"
  gst_registry_get_type :: CUInt

foreign import ccall unsafe "gst_bus_get_type"
  gst_bus_get_type :: CUInt

foreign import ccall unsafe "gst_clock_get_type"
  gst_clock_get_type :: CUInt

foreign import ccall unsafe "gst_audio_clock_get_type"
  gst_audio_clock_get_type :: CUInt

foreign import ccall unsafe "gst_system_clock_get_type"
  gst_system_clock_get_type :: CUInt

foreign import ccall unsafe "gst_net_client_clock_get_type"
  gst_net_client_clock_get_type :: CUInt

foreign import ccall unsafe "gst_index_get_type"
  gst_index_get_type :: CUInt

foreign import ccall unsafe "gst_pad_template_get_type"
  gst_pad_template_get_type :: CUInt

foreign import ccall unsafe "gst_task_get_type"
  gst_task_get_type :: CUInt

foreign import ccall unsafe "gst_xml_get_type"
  gst_xml_get_type :: CUInt

foreign import ccall unsafe "gst_child_proxy_get_type"
  gst_child_proxy_get_type :: CUInt

foreign import ccall unsafe "gst_collect_pads_get_type"
  gst_collect_pads_get_type :: CUInt

foreign import ccall unsafe "gst_uri_handler_get_type"
  gst_uri_handler_get_type :: CUInt

foreign import ccall unsafe "gst_adapter_get_type"
  gst_adapter_get_type :: CUInt

foreign import ccall unsafe "gst_controller_get_type"
  gst_controller_get_type :: CUInt