gi-webkit-0.2.4.12: GI/WebKit/Structs/WebPluginMIMEType.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)
A structure representing one of the MIME types associated with a
plugin. A #GSList of these objects will be returned by
#webkit_web_plugin_get_mimetypes, use
#webkit_web_plugin_mime_type_list_free to free it.
-}
module GI.WebKit.Structs.WebPluginMIMEType
(
-- * Exported types
WebPluginMIMEType(..) ,
noWebPluginMIMEType ,
-- * Properties
-- ** Description
webPluginMIMETypeReadDescription ,
-- ** Extensions
webPluginMIMETypeReadExtensions ,
-- ** Name
webPluginMIMETypeReadName ,
) 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.WebKit.Types
import GI.WebKit.Callbacks
newtype WebPluginMIMEType = WebPluginMIMEType (ForeignPtr WebPluginMIMEType)
noWebPluginMIMEType :: Maybe WebPluginMIMEType
noWebPluginMIMEType = Nothing
webPluginMIMETypeReadName :: WebPluginMIMEType -> IO T.Text
webPluginMIMETypeReadName s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CString
val' <- cstringToText val
return val'
webPluginMIMETypeReadDescription :: WebPluginMIMEType -> IO T.Text
webPluginMIMETypeReadDescription s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CString
val' <- cstringToText val
return val'
webPluginMIMETypeReadExtensions :: WebPluginMIMEType -> IO T.Text
webPluginMIMETypeReadExtensions s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO CString
val' <- cstringToText val
return val'