{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

Bookkeeping information about a loadable input method.
-}

module GI.Gtk.Structs.IMContextInfo
    ( 

-- * Exported types
    IMContextInfo(..)                       ,
    noIMContextInfo                         ,


 -- * Properties
-- ** ContextId
    iMContextInfoReadContextId              ,


-- ** ContextName
    iMContextInfoReadContextName            ,


-- ** DefaultLocales
    iMContextInfoReadDefaultLocales         ,


-- ** Domain
    iMContextInfoReadDomain                 ,


-- ** DomainDirname
    iMContextInfoReadDomainDirname          ,




    ) 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.Gtk.Types
import GI.Gtk.Callbacks

newtype IMContextInfo = IMContextInfo (ForeignPtr IMContextInfo)
noIMContextInfo :: Maybe IMContextInfo
noIMContextInfo = Nothing

iMContextInfoReadContextId :: IMContextInfo -> IO T.Text
iMContextInfoReadContextId s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 0) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadContextName :: IMContextInfo -> IO T.Text
iMContextInfoReadContextName s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 8) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDomain :: IMContextInfo -> IO T.Text
iMContextInfoReadDomain s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 16) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDomainDirname :: IMContextInfo -> IO T.Text
iMContextInfoReadDomainDirname s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO CString
    val' <- cstringToText val
    return val'

iMContextInfoReadDefaultLocales :: IMContextInfo -> IO T.Text
iMContextInfoReadDefaultLocales s = withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO CString
    val' <- cstringToText val
    return val'