{-# LINE 2 "./System/GIO/Icons/EmblemedIcon.chs" #-}
module System.GIO.Icons.EmblemedIcon (
EmblemedIcon(..),
EmblemedIconClass,
emblemedIconNew,
emblemedIconGetIcon,
emblemedIconGetEmblems,
emblemedIconAddEmblem,
) where
import Control.Monad
import System.GIO.Enums
import System.Glib.FFI
import System.Glib.Flags
import System.Glib.GError
import System.Glib.GList
import System.Glib.GObject
import System.Glib.UTFString
import System.GIO.Types
{-# LINE 61 "./System/GIO/Icons/EmblemedIcon.chs" #-}
{-# LINE 63 "./System/GIO/Icons/EmblemedIcon.chs" #-}
emblemedIconNew :: (IconClass icon, EmblemClass emblem) => icon -> emblem -> IO EmblemedIcon
emblemedIconNew icon emblem =
(\(Icon arg1) (Emblem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_emblemed_icon_new argPtr1 argPtr2)
{-# LINE 71 "./System/GIO/Icons/EmblemedIcon.chs" #-}
(toIcon icon) (toEmblem emblem)
>>= (constructNewGObject mkEmblemedIcon . return) . castPtr
emblemedIconGetIcon :: EmblemedIconClass emblemed => emblemed
-> IO Icon
emblemedIconGetIcon emblemed =
makeNewGObject mkIcon $
(\(EmblemedIcon arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_emblemed_icon_get_icon argPtr1) (toEmblemedIcon emblemed)
emblemedIconGetEmblems :: EmblemedIconClass emblemed => emblemed
-> IO [Emblem]
emblemedIconGetEmblems emblemed = do
glistPtr <- (\(EmblemedIcon arg1) -> withForeignPtr arg1 $ \argPtr1 ->g_emblemed_icon_get_emblems argPtr1) (toEmblemedIcon emblemed)
emblemPtrs <- readGList glistPtr
mapM (makeNewGObject mkEmblem . return) emblemPtrs
emblemedIconAddEmblem :: EmblemedIconClass emblemed => emblemed
-> Emblem
-> IO ()
emblemedIconAddEmblem emblemed emblem =
(\(EmblemedIcon arg1) (Emblem arg2) -> withForeignPtr arg1 $ \argPtr1 ->withForeignPtr arg2 $ \argPtr2 ->g_emblemed_icon_add_emblem argPtr1 argPtr2)
{-# LINE 95 "./System/GIO/Icons/EmblemedIcon.chs" #-}
(toEmblemedIcon emblemed)
emblem
foreign import ccall safe "g_emblemed_icon_new"
g_emblemed_icon_new :: ((Ptr Icon) -> ((Ptr Emblem) -> (IO (Ptr Icon))))
foreign import ccall safe "g_emblemed_icon_get_icon"
g_emblemed_icon_get_icon :: ((Ptr EmblemedIcon) -> (IO (Ptr Icon)))
foreign import ccall safe "g_emblemed_icon_get_emblems"
g_emblemed_icon_get_emblems :: ((Ptr EmblemedIcon) -> (IO (Ptr ())))
foreign import ccall safe "g_emblemed_icon_add_emblem"
g_emblemed_icon_add_emblem :: ((Ptr EmblemedIcon) -> ((Ptr Emblem) -> (IO ())))