{-# LINE 2 "./Graphics/UI/Gtk/SourceView/SourceStyleScheme.chs" #-}
-- -*-haskell-*-
-- GIMP Toolkit (GTK) SourceStyleScheme
--
-- Author : Peter Gavin
-- derived from sourceview bindings by Axel Simon and Duncan Coutts
--
-- Created: 18 December 2008
--
-- Copyright (C) 2004-2008 Peter Gavin, Duncan Coutts, Axel Simon
--
-- This library is free software; you can redistribute it and/or
-- modify it under the terms of the GNU Lesser General Public
-- License as published by the Free Software Foundation; either
-- version 2.1 of the License, or (at your option) any later version.
--
-- This library is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-- Lesser General Public License for more details.
--
-- |
-- Maintainer : gtk2hs-users@lists.sourceforge.net
-- Stability : provisional
-- Portability : portable (depends on GHC)
--
module Graphics.UI.Gtk.SourceView.SourceStyleScheme (
  SourceStyleScheme,
  castToSourceStyleScheme,
  sourceStyleSchemeGetId,
  sourceStyleSchemeGetName,
  sourceStyleSchemeGetDescription,
  sourceStyleSchemeGetAuthors,
  sourceStyleSchemeGetFilename,
  sourceStyleSchemeGetStyle,
  sourceStyleSchemeDescription,
  sourceStyleSchemeFilename,
  sourceStyleSchemeId,
  sourceStyleSchemeName,
  ) where

import Control.Monad (liftM)

import System.Glib.FFI
import System.Glib.UTFString
import System.Glib.GObject (constructNewGObject)
import System.Glib.Attributes
import System.Glib.Properties
{-# LINE 49 "./Graphics/UI/Gtk/SourceView/SourceStyleScheme.chs" #-}
import Graphics.UI.Gtk.SourceView.Types
{-# LINE 50 "./Graphics/UI/Gtk/SourceView/SourceStyleScheme.chs" #-}
import Graphics.UI.Gtk.SourceView.SourceStyle
import Graphics.UI.Gtk.SourceView.SourceStyle.Internal
{-# LINE 52 "./Graphics/UI/Gtk/SourceView/SourceStyleScheme.chs" #-}


{-# LINE 54 "./Graphics/UI/Gtk/SourceView/SourceStyleScheme.chs" #-}

-- methods

-- |
--
sourceStyleSchemeGetId :: SourceStyleScheme -> IO String
sourceStyleSchemeGetId ss =
  (\(SourceStyleScheme arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_id argPtr1) ss >>= peekUTFString

-- |
--
sourceStyleSchemeGetName :: SourceStyleScheme -> IO String
sourceStyleSchemeGetName ss =
  (\(SourceStyleScheme arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_name argPtr1) ss >>= peekUTFString

-- |
--
sourceStyleSchemeGetDescription :: SourceStyleScheme -> IO String
sourceStyleSchemeGetDescription ss =
  (\(SourceStyleScheme arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_description argPtr1) ss >>= peekUTFString

-- |
--
sourceStyleSchemeGetAuthors :: SourceStyleScheme -> IO [String]
sourceStyleSchemeGetAuthors ss =
  (\(SourceStyleScheme arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_authors argPtr1) ss >>= peekUTFStringArray0

-- |
--
sourceStyleSchemeGetFilename :: SourceStyleScheme -> IO String
sourceStyleSchemeGetFilename ss =
  (\(SourceStyleScheme arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_filename argPtr1) ss >>= peekUTFString

-- |
--
sourceStyleSchemeGetStyle :: SourceStyleScheme -> String -> IO SourceStyle
sourceStyleSchemeGetStyle ss id = do
  styleObj <- makeNewGObject mkSourceStyleObject $
              withUTFString id ((\(SourceStyleScheme arg1) arg2 -> withForeignPtr arg1 $ \argPtr1 ->gtk_source_style_scheme_get_style argPtr1 arg2) ss)
  sourceStyleFromObject styleObj

-- |
--
sourceStyleSchemeDescription :: ReadAttr SourceStyleScheme String
sourceStyleSchemeDescription = readAttrFromStringProperty "description"

-- |
--
sourceStyleSchemeFilename :: ReadAttr SourceStyleScheme FilePath
sourceStyleSchemeFilename = readAttrFromStringProperty "filename"

-- |
--
sourceStyleSchemeId :: ReadAttr SourceStyleScheme String
sourceStyleSchemeId = readAttrFromStringProperty "id"

-- |
--
sourceStyleSchemeName :: ReadAttr SourceStyleScheme String
sourceStyleSchemeName = readAttrFromStringProperty "name"

foreign import ccall safe "gtk_source_style_scheme_get_id"
  gtk_source_style_scheme_get_id :: ((Ptr SourceStyleScheme) -> (IO (Ptr CChar)))

foreign import ccall safe "gtk_source_style_scheme_get_name"
  gtk_source_style_scheme_get_name :: ((Ptr SourceStyleScheme) -> (IO (Ptr CChar)))

foreign import ccall safe "gtk_source_style_scheme_get_description"
  gtk_source_style_scheme_get_description :: ((Ptr SourceStyleScheme) -> (IO (Ptr CChar)))

foreign import ccall safe "gtk_source_style_scheme_get_authors"
  gtk_source_style_scheme_get_authors :: ((Ptr SourceStyleScheme) -> (IO (Ptr (Ptr CChar))))

foreign import ccall safe "gtk_source_style_scheme_get_filename"
  gtk_source_style_scheme_get_filename :: ((Ptr SourceStyleScheme) -> (IO (Ptr CChar)))

foreign import ccall safe "gtk_source_style_scheme_get_style"
  gtk_source_style_scheme_get_style :: ((Ptr SourceStyleScheme) -> ((Ptr CChar) -> (IO (Ptr SourceStyleObject))))