    {-# LINE 2 "./Graphics/UI/Gtk/General/Settings.chs" #-}
    -- -*-haskell-*-
    -- GIMP Toolkit (GTK) Clipboard
    --
    -- Author : Axel Simon
    --
    -- Created: 26 March 2007
    --
    -- Copyright (C) 2007 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.
    --
    -- I removed all definitions for the clipboard by Juergen Nicklisch since
    -- the way the clipboards were selected didn't tie in with the Selection
    -- module.
    --
    -- |
    -- Maintainer : gtk2hs-users@lists.sourceforge.net
    -- Stability : provisional
    -- Portability : portable (depends on GHC)
    --
    -- Storing data on clipboards
    --
    module Graphics.UI.Gtk.General.Settings (

    -- * Class Hierarchy
    --
    -- |
    -- @
    -- | 'GObject'
    -- | +----Settings
    -- @

    -- * Types
      Settings,
      SettingsClass,
      castToSettings, gTypeSettings,
      toSettings,

    -- * Methods
      settingsGetDefault,

      settingsGetForScreen,

      settingsSetLongProperty,
      settingsSetStringProperty
      ) where

    import System.Glib.FFI
    import System.Glib.UTFString
    import Graphics.UI.Gtk.Types
    {-# LINE 60 "./Graphics/UI/Gtk/General/Settings.chs" #-}

    {-# LINE 62 "./Graphics/UI/Gtk/General/Settings.chs" #-}

    --------------------
    -- Methods

    -- | Gets the Settings object for the default GDK screen, creating
    -- it if necessary. See 'settingsGetForScreen'.
    --
    settingsGetDefault ::
        IO (Maybe Settings) -- ^ returns a Settings. If there is no default
                            -- screen, then returns Nothing.
    settingsGetDefault :: IO (Maybe Settings)
    settingsGetDefault =
      (IO (Ptr Settings) -> IO Settings)
    -> IO (Ptr Settings) -> IO (Maybe Settings)
    forall a. (IO (Ptr a) -> IO a) -> IO (Ptr a) -> IO (Maybe a)
    maybeNull ((ForeignPtr Settings -> Settings, FinalizerPtr Settings)
    -> IO (Ptr Settings) -> IO Settings
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr Settings -> Settings, FinalizerPtr Settings)
    forall {a}. (ForeignPtr Settings -> Settings, FinalizerPtr a)
    mkSettings)
        IO (Ptr Settings)
    gtk_settings_get_default
    {-# LINE 76 "./Graphics/UI/Gtk/General/Settings.chs" #-}

    -- | Gets the Settings object for screen, creating it if necessary.
    --
    settingsGetForScreen ::
        ScreenClass screen
     => screen
     -> IO Settings
    settingsGetForScreen :: forall screen. ScreenClass screen => screen -> IO Settings
    settingsGetForScreen screen
    screen =
      (ForeignPtr Settings -> Settings, FinalizerPtr Settings)
    -> IO (Ptr Settings) -> IO Settings
    forall obj.
    GObjectClass obj =>
    (ForeignPtr obj -> obj, FinalizerPtr obj) -> IO (Ptr obj) -> IO obj
    makeNewGObject (ForeignPtr Settings -> Settings, FinalizerPtr Settings)
    forall {a}. (ForeignPtr Settings -> Settings, FinalizerPtr a)
    mkSettings (IO (Ptr Settings) -> IO Settings)
    -> IO (Ptr Settings) -> IO Settings
    forall a b. (a -> b) -> a -> b
    $
        (\(Screen ForeignPtr Screen
    arg1) -> ForeignPtr Screen
    -> (Ptr Screen -> IO (Ptr Settings)) -> IO (Ptr Settings)
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Screen
    arg1 ((Ptr Screen -> IO (Ptr Settings)) -> IO (Ptr Settings))
    -> (Ptr Screen -> IO (Ptr Settings)) -> IO (Ptr Settings)
    forall a b. (a -> b) -> a -> b
    $ \Ptr Screen
    argPtr1 ->Ptr Screen -> IO (Ptr Settings)
    gtk_settings_get_for_screen Ptr Screen
    argPtr1)
    {-# LINE 87 "./Graphics/UI/Gtk/General/Settings.chs" #-}
          (toScreen screen)

    settingsSetLongProperty ::
        (SettingsClass settings, GlibString string)
     => settings
     -> string
     -> Int
     -> string
     -> IO ()
    settingsSetLongProperty :: forall settings string.
    (SettingsClass settings, GlibString string) =>
    settings -> string -> Int -> string -> IO ()
    settingsSetLongProperty settings
    settings string
    name Int
    value string
    origin =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    name ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    namePtr ->
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    origin ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    originPtr ->
      (\(Settings ForeignPtr Settings
    arg1) CString
    arg2 CLong
    arg3 CString
    arg4 -> ForeignPtr Settings -> (Ptr Settings -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Settings
    arg1 ((Ptr Settings -> IO ()) -> IO ())
    -> (Ptr Settings -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Settings
    argPtr1 ->Ptr Settings -> CString -> CLong -> CString -> IO ()
    gtk_settings_set_long_property Ptr Settings
    argPtr1 CString
    arg2 CLong
    arg3 CString
    arg4)
    {-# LINE 101 "./Graphics/UI/Gtk/General/Settings.chs" #-}
        (toSettings settings)
        CString
    namePtr
        (Int -> CLong
    forall a b. (Integral a, Num b) => a -> b
    fromIntegral Int
    value)
        CString
    originPtr

    settingsSetStringProperty ::
        (SettingsClass settings, GlibString string)
     => settings
     -> string
     -> string
     -> string
     -> IO ()
    settingsSetStringProperty :: forall settings string.
    (SettingsClass settings, GlibString string) =>
    settings -> string -> string -> string -> IO ()
    settingsSetStringProperty settings
    settings string
    name string
    value string
    origin =
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    name ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    namePtr ->
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    value ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    valuePtr ->
      string -> (CString -> IO ()) -> IO ()
    forall a. string -> (CString -> IO a) -> IO a
    forall s a. GlibString s => s -> (CString -> IO a) -> IO a
    withUTFString string
    origin ((CString -> IO ()) -> IO ()) -> (CString -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \CString
    originPtr ->
      (\(Settings ForeignPtr Settings
    arg1) CString
    arg2 CString
    arg3 CString
    arg4 -> ForeignPtr Settings -> (Ptr Settings -> IO ()) -> IO ()
    forall a b. ForeignPtr a -> (Ptr a -> IO b) -> IO b
    withForeignPtr ForeignPtr Settings
    arg1 ((Ptr Settings -> IO ()) -> IO ())
    -> (Ptr Settings -> IO ()) -> IO ()
    forall a b. (a -> b) -> a -> b
    $ \Ptr Settings
    argPtr1 ->Ptr Settings -> CString -> CString -> CString -> IO ()
    gtk_settings_set_string_property Ptr Settings
    argPtr1 CString
    arg2 CString
    arg3 CString
    arg4)
    {-# LINE 118 "./Graphics/UI/Gtk/General/Settings.chs" #-}
        (toSettings settings)
        CString
    namePtr
        CString
    valuePtr
        CString
    originPtr

    foreign import ccall safe "gtk_settings_get_default"
      gtk_settings_get_default :: (IO (Ptr Settings))

    foreign import ccall safe "gtk_settings_get_for_screen"
      gtk_settings_get_for_screen :: ((Ptr Screen) -> (IO (Ptr Settings)))

    foreign import ccall safe "gtk_settings_set_long_property"
      gtk_settings_set_long_property :: ((Ptr Settings) -> ((Ptr CChar) -> (CLong -> ((Ptr CChar) -> (IO ())))))

    foreign import ccall safe "gtk_settings_set_string_property"
      gtk_settings_set_string_property :: ((Ptr Settings) -> ((Ptr CChar) -> ((Ptr CChar) -> ((Ptr CChar) -> (IO ())))))