-- | Central hub module of this library. reexports all necessary submodules
module GEGL
  ( gegl_init
  , gegl_exit
  , module Export
  ) where

import Foreign.Ptr (nullPtr)

import GEGL.Buffer as Export
import GEGL.Buffer.BufferIterator as Export
import GEGL.Color as Export
import GEGL.Connection as Export
import GEGL.Enums as Export
import GEGL.Node as Export
import GEGL.Node.State as Export
import GEGL.Operation as Export
import GEGL.Process as Export
import GEGL.Rectangle as Export
import GEGL.Reparent as Export

import qualified GEGL.FFI as FFI

-- relrod: Pretty straightforward here.

-- | Initialize the GEGL evnironment.
-- This function must be called before any other GEGL calls.
-- It does not pass any @argc@ or @argv@ values to 'FFI.c_gegl_init'
gegl_init :: IO ()
gegl_init = FFI.c_gegl_init nullPtr nullPtr

-- | Exit and clean up after GEGL has been used.
-- Must be called at the end of the program
gegl_exit :: IO ()
gegl_exit = FFI.c_gegl_exit