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

#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
       && !defined(__HADDOCK_VERSION__))

module GI.JavaScriptCore.Functions
    (

 -- * Methods
-- ** getMajorVersion #method:getMajorVersion#

    getMajorVersion                         ,


-- ** getMicroVersion #method:getMicroVersion#

    getMicroVersion                         ,


-- ** getMinorVersion #method:getMinorVersion#

    getMinorVersion                         ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP


-- function jsc_get_minor_version
-- Args : []
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "jsc_get_minor_version" jsc_get_minor_version ::
    IO Word32

{- |
Returns the minor version number of the JavaScriptCore library.
(e.g. in JavaScriptCore version 1.8.3 this is 8.)

This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the 'GI.JavaScriptCore.Constants.MINOR_VERSION'
macro, which represents the minor version of the JavaScriptCore headers you
have included when compiling your code.
-}
getMinorVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    {- ^ __Returns:__ the minor version number of the JavaScriptCore library -}
getMinorVersion  = liftIO $ do
    result <- jsc_get_minor_version
    return result


-- function jsc_get_micro_version
-- Args : []
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "jsc_get_micro_version" jsc_get_micro_version ::
    IO Word32

{- |
Returns the micro version number of the JavaScriptCore library.
(e.g. in JavaScriptCore version 1.8.3 this is 3.)

This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the 'GI.JavaScriptCore.Constants.MICRO_VERSION'
macro, which represents the micro version of the JavaScriptCore headers you
have included when compiling your code.
-}
getMicroVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    {- ^ __Returns:__ the micro version number of the JavaScriptCore library -}
getMicroVersion  = liftIO $ do
    result <- jsc_get_micro_version
    return result


-- function jsc_get_major_version
-- Args : []
-- Lengths : []
-- returnType : Just (TBasicType TUInt)
-- throws : False
-- Skip return : False

foreign import ccall "jsc_get_major_version" jsc_get_major_version ::
    IO Word32

{- |
Returns the major version number of the JavaScriptCore library.
(e.g. in JavaScriptCore version 1.8.3 this is 1.)

This function is in the library, so it represents the JavaScriptCore library
your code is running against. Contrast with the 'GI.JavaScriptCore.Constants.MAJOR_VERSION'
macro, which represents the major version of the JavaScriptCore headers you
have included when compiling your code.
-}
getMajorVersion ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m Word32
    {- ^ __Returns:__ the major version number of the JavaScriptCore library -}
getMajorVersion  = liftIO $ do
    result <- jsc_get_major_version
    return result