                                        (fromIntegral $ fromFlags seekFlags)
                                        (fromIntegral seekPos)
 
+-- | Send a seek event to an element. See
+--   'Media.Streaming.GStreamer.Core.Event.eventNewSeek' for the
+--   details of the parameters. The seek event is sent to the element
+--   using 'elementSendEvent'.
 elementSeek :: ElementClass element
-            => element
-            -> Double
-            -> Format
-            -> [SeekFlags]
-            -> SeekType
-            -> Int64
-            -> SeekType
-            -> Int64
-            -> IO Bool
+            => element     -- ^ @element@ - the element to seek on
+            -> Double      -- ^ @rate@ - the new playback rate
+            -> Format      -- ^ @format@ - the format of the seek values
+            -> [SeekFlags] -- ^ @seekFlags@ - the options to use
+            -> SeekType    -- ^ @curType@ - type and flags for the new current position
+            -> Int64       -- ^ @cur@ - the value of the new current position
+            -> SeekType    -- ^ @stopType@ - type and flags for the new stop position
+            -> Int64       -- ^ @stop@ - the value of the new stop position
+            -> IO Bool     -- ^ 'True' if the event was handled
 elementSeek element rate format flags curType cur stopType stop =
     liftM toBool $
         {# call element_seek #} (toElement element)

                                          fromIntegral duration)
                   else return Nothing

elementSendEvent :: (ElementClass element, EventClass event)
                 => element
                 -> event
                 -> IO Bool
elementSendEvent element event =
    liftM toBool $
        giveMiniObject (toEvent event) $ {# call element_send_event #} (toElement element)

elementSeekSimple :: ElementClass element
                  => element
                  -> Format
                  -> [SeekFlags]
                  -> Int64
                  -> IO Bool
elementSeekSimple element format seekFlags seekPos =
    liftM toBool $
        {# call element_seek_simple #} (toElement element)

                                (fromIntegral $ fromEnum stopType)
                                (fromIntegral stop)

-- | 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"
