module Graphics.UI.Gtk.General.Settings (
Settings,
SettingsClass,
castToSettings, gTypeSettings,
toSettings,
settingsGetDefault,
settingsGetForScreen,
settingsSetLongProperty,
settingsSetStringProperty
) where
import System.Glib.FFI
import System.Glib.UTFString
import Graphics.UI.Gtk.Types
settingsGetDefault ::
IO (Maybe Settings)
settingsGetDefault =
maybeNull (makeNewGObject mkSettings)
gtk_settings_get_default
settingsGetForScreen ::
ScreenClass screen
=> screen
-> IO Settings
settingsGetForScreen screen =
makeNewGObject mkSettings $
(\(Screen arg1) -> withForeignPtr arg1 $ \argPtr1 ->gtk_settings_get_for_screen argPtr1)
(toScreen screen)
settingsSetLongProperty ::
(SettingsClass settings, GlibString string)
=> settings
-> string
-> Int
-> string
-> IO ()
settingsSetLongProperty settings name value origin =
withUTFString name $ \namePtr ->
withUTFString origin $ \originPtr ->
(\(Settings arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_settings_set_long_property argPtr1 arg2 arg3 arg4)
(toSettings settings)
namePtr
(fromIntegral value)
originPtr
settingsSetStringProperty ::
(SettingsClass settings, GlibString string)
=> settings
-> string
-> string
-> string
-> IO ()
settingsSetStringProperty settings name value origin =
withUTFString name $ \namePtr ->
withUTFString value $ \valuePtr ->
withUTFString origin $ \originPtr ->
(\(Settings arg1) arg2 arg3 arg4 -> withForeignPtr arg1 $ \argPtr1 ->gtk_settings_set_string_property argPtr1 arg2 arg3 arg4)
(toSettings settings)
namePtr
valuePtr
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 ())))))