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

module GI.Gtk.Objects.RcStyle
    ( 

-- * Exported types
    RcStyle(..)                             ,
    RcStyleK                                ,
    toRcStyle                               ,
    noRcStyle                               ,


 -- * Methods
-- ** rcStyleCopy
    rcStyleCopy                             ,


-- ** rcStyleNew
    rcStyleNew                              ,




    ) where

import Prelude ()
import Data.GI.Base.ShortPrelude

import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map

import GI.Gtk.Types
import GI.Gtk.Callbacks
import qualified GI.GObject as GObject

newtype RcStyle = RcStyle (ForeignPtr RcStyle)
foreign import ccall "gtk_rc_style_get_type"
    c_gtk_rc_style_get_type :: IO GType

type instance ParentTypes RcStyle = RcStyleParentTypes
type RcStyleParentTypes = '[GObject.Object]

instance GObject RcStyle where
    gobjectIsInitiallyUnowned _ = False
    gobjectType _ = c_gtk_rc_style_get_type
    

class GObject o => RcStyleK o
instance (GObject o, IsDescendantOf RcStyle o) => RcStyleK o

toRcStyle :: RcStyleK o => o -> IO RcStyle
toRcStyle = unsafeCastTo RcStyle

noRcStyle :: Maybe RcStyle
noRcStyle = Nothing

type instance AttributeList RcStyle = RcStyleAttributeList
type RcStyleAttributeList = ('[ ] :: [(Symbol, *)])

type instance SignalList RcStyle = RcStyleSignalList
type RcStyleSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method RcStyle::new
-- method type : Constructor
-- Args : []
-- Lengths : []
-- hInArgs : []
-- returnType : TInterface "Gtk" "RcStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_style_new" gtk_rc_style_new :: 
    IO (Ptr RcStyle)

{-# DEPRECATED rcStyleNew ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcStyleNew ::
    (MonadIO m) =>
    m RcStyle
rcStyleNew  = liftIO $ do
    result <- gtk_rc_style_new
    checkUnexpectedReturnNULL "gtk_rc_style_new" result
    result' <- (wrapObject RcStyle) result
    return result'

-- method RcStyle::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gtk" "RcStyle", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gtk" "RcStyle"
-- throws : False
-- Skip return : False

foreign import ccall "gtk_rc_style_copy" gtk_rc_style_copy :: 
    Ptr RcStyle ->                          -- _obj : TInterface "Gtk" "RcStyle"
    IO (Ptr RcStyle)

{-# DEPRECATED rcStyleCopy ["(Since version 3.0)","Use #GtkCssProvider instead."]#-}
rcStyleCopy ::
    (MonadIO m, RcStyleK a) =>
    a ->                                    -- _obj
    m RcStyle
rcStyleCopy _obj = liftIO $ do
    let _obj' = unsafeManagedPtrCastPtr _obj
    result <- gtk_rc_style_copy _obj'
    checkUnexpectedReturnNULL "gtk_rc_style_copy" result
    result' <- (wrapObject RcStyle) result
    touchManagedPtr _obj
    return result'