{- | 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.Gio.Objects.BytesIcon ( -- * Exported types BytesIcon(..) , BytesIconK , toBytesIcon , noBytesIcon , -- * Methods -- ** bytesIconGetBytes bytesIconGetBytes , -- ** bytesIconNew bytesIconNew , -- * Properties -- ** Bytes BytesIconBytesPropertyInfo , constructBytesIconBytes , getBytesIconBytes , ) 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.Gio.Types import GI.Gio.Callbacks import qualified GI.GLib as GLib import qualified GI.GObject as GObject newtype BytesIcon = BytesIcon (ForeignPtr BytesIcon) foreign import ccall "g_bytes_icon_get_type" c_g_bytes_icon_get_type :: IO GType type instance ParentTypes BytesIcon = BytesIconParentTypes type BytesIconParentTypes = '[GObject.Object, Icon, LoadableIcon] instance GObject BytesIcon where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_g_bytes_icon_get_type class GObject o => BytesIconK o instance (GObject o, IsDescendantOf BytesIcon o) => BytesIconK o toBytesIcon :: BytesIconK o => o -> IO BytesIcon toBytesIcon = unsafeCastTo BytesIcon noBytesIcon :: Maybe BytesIcon noBytesIcon = Nothing -- VVV Prop "bytes" -- Type: TInterface "GLib" "Bytes" -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly] getBytesIconBytes :: (MonadIO m, BytesIconK o) => o -> m GLib.Bytes getBytesIconBytes obj = liftIO $ getObjectPropertyBoxed obj "bytes" GLib.Bytes constructBytesIconBytes :: GLib.Bytes -> IO ([Char], GValue) constructBytesIconBytes val = constructObjectPropertyBoxed "bytes" val data BytesIconBytesPropertyInfo instance AttrInfo BytesIconBytesPropertyInfo where type AttrAllowedOps BytesIconBytesPropertyInfo = '[ 'AttrConstruct, 'AttrGet] type AttrSetTypeConstraint BytesIconBytesPropertyInfo = (~) GLib.Bytes type AttrBaseTypeConstraint BytesIconBytesPropertyInfo = BytesIconK type AttrGetType BytesIconBytesPropertyInfo = GLib.Bytes type AttrLabel BytesIconBytesPropertyInfo = "BytesIcon::bytes" attrGet _ = getBytesIconBytes attrSet _ = undefined attrConstruct _ = constructBytesIconBytes type instance AttributeList BytesIcon = BytesIconAttributeList type BytesIconAttributeList = ('[ '("bytes", BytesIconBytesPropertyInfo)] :: [(Symbol, *)]) type instance SignalList BytesIcon = BytesIconSignalList type BytesIconSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method BytesIcon::new -- method type : Constructor -- Args : [Arg {argName = "bytes", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "bytes", argType = TInterface "GLib" "Bytes", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "BytesIcon" -- throws : False -- Skip return : False foreign import ccall "g_bytes_icon_new" g_bytes_icon_new :: Ptr GLib.Bytes -> -- bytes : TInterface "GLib" "Bytes" IO (Ptr BytesIcon) bytesIconNew :: (MonadIO m) => GLib.Bytes -> -- bytes m BytesIcon bytesIconNew bytes = liftIO $ do let bytes' = unsafeManagedPtrGetPtr bytes result <- g_bytes_icon_new bytes' checkUnexpectedReturnNULL "g_bytes_icon_new" result result' <- (wrapObject BytesIcon) result touchManagedPtr bytes return result' -- method BytesIcon::get_bytes -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "BytesIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "BytesIcon", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "GLib" "Bytes" -- throws : False -- Skip return : False foreign import ccall "g_bytes_icon_get_bytes" g_bytes_icon_get_bytes :: Ptr BytesIcon -> -- _obj : TInterface "Gio" "BytesIcon" IO (Ptr GLib.Bytes) bytesIconGetBytes :: (MonadIO m, BytesIconK a) => a -> -- _obj m GLib.Bytes bytesIconGetBytes _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_bytes_icon_get_bytes _obj' checkUnexpectedReturnNULL "g_bytes_icon_get_bytes" result result' <- (newBoxed GLib.Bytes) result touchManagedPtr _obj return result'