                                 (fromIntegral $ fromEnum stopType)
                                 (fromIntegral stop)
 
-onElementNoMorePads, afterElementNoMorePads :: (ElementClass element)
-                                            => element
-                                            -> IO ()
-                                            -> IO (ConnectId element)
-onElementNoMorePads =
-    connect_NONE__NONE "no-more-pads" False
-afterElementNoMorePads =
-    connect_NONE__NONE "no-more-pads" True
-
-onElementPadAdded, afterElementPadAdded :: (ElementClass element)
-                                        => element
-                                        -> (Pad -> IO ())
-                                        -> IO (ConnectId element)
-onElementPadAdded =
-    connect_OBJECT__NONE "pad-added" False
-afterElementPadAdded =
-    connect_OBJECT__NONE "pad-added" True
-
-onElementPadRemoved, afterElementPadRemoved :: (ElementClass element)
-                                            => element
-                                            -> (Pad -> IO ())
-                                            -> IO (ConnectId element)
-onElementPadRemoved =
-    connect_OBJECT__NONE "pad-removed" False
-afterElementPadRemoved =
-    connect_OBJECT__NONE "pad-removed" True
+-- | The signal emitted when an element will not generate more dynamic
+--   pads.
+elementNoMorePads :: (ElementClass element)
+                  => Signal element (IO ())
+elementNoMorePads =
+    Signal $ connect_NONE__NONE "no-more-pads"
+
+-- | The signal emitted when a new 'Pad' has been added to the
+--   element.
+elementPadAdded :: (ElementClass element)
+                => Signal element (Pad -> IO ())
+elementPadAdded =
+    Signal $ connect_OBJECT__NONE "pad-added"
+
+-- | The signal emitted when a 'Pad' has been removed from the
+--   element.
+elementPadRemoved :: (ElementClass element)
+                  => Signal element (Pad -> IO ())
+elementPadRemoved =
+    Signal $ connect_OBJECT__NONE "pad-removed"

--  available under LGPL Version 2. The documentation included with
--  this library is based on the original GStreamer documentation.
--  
-- | Maintainer  : gtk2hs-devel@lists.sourceforge.net
--   Stability   : alpha
--   Portability : portable (depends on GHC)
module Media.Streaming.GStreamer.Core.Element (
  
  Element,
  ElementClass,
  castToElement,

                                          fromIntegral destVal)
                   else return Nothing

-- | Query an element for its stream position.
elementQueryPosition :: ElementClass element
                     => element -- ^ @element@ - the element to query
                     -> Format  -- ^ @format@ - the format requested
                     -> IO (Maybe (Format, Word64)) -- ^ the resulting format and value
elementQueryPosition element format =
    alloca $ \formatPtr ->
        alloca $ \curPtr ->
