module GI.Gio.Objects.BytesIcon
(
BytesIcon(..) ,
BytesIconK ,
toBytesIcon ,
noBytesIcon ,
bytesIconGetBytes ,
bytesIconNew ,
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
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, *)])
foreign import ccall "g_bytes_icon_new" g_bytes_icon_new ::
Ptr GLib.Bytes ->
IO (Ptr BytesIcon)
bytesIconNew ::
(MonadIO m) =>
GLib.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'
foreign import ccall "g_bytes_icon_get_bytes" g_bytes_icon_get_bytes ::
Ptr BytesIcon ->
IO (Ptr GLib.Bytes)
bytesIconGetBytes ::
(MonadIO m, BytesIconK a) =>
a ->
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'