#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Wnck.Objects.ClassGroup
(
ClassGroup(..) ,
IsClassGroup ,
toClassGroup ,
noClassGroup ,
classGroupGet ,
#if ENABLE_OVERLOADING
ClassGroupGetIconMethodInfo ,
#endif
classGroupGetIcon ,
#if ENABLE_OVERLOADING
ClassGroupGetIdMethodInfo ,
#endif
classGroupGetId ,
#if ENABLE_OVERLOADING
ClassGroupGetMiniIconMethodInfo ,
#endif
classGroupGetMiniIcon ,
#if ENABLE_OVERLOADING
ClassGroupGetNameMethodInfo ,
#endif
classGroupGetName ,
#if ENABLE_OVERLOADING
ClassGroupGetResClassMethodInfo ,
#endif
classGroupGetResClass ,
#if ENABLE_OVERLOADING
ClassGroupGetWindowsMethodInfo ,
#endif
classGroupGetWindows ,
C_ClassGroupIconChangedCallback ,
ClassGroupIconChangedCallback ,
#if ENABLE_OVERLOADING
ClassGroupIconChangedSignalInfo ,
#endif
afterClassGroupIconChanged ,
genClosure_ClassGroupIconChanged ,
mk_ClassGroupIconChangedCallback ,
noClassGroupIconChangedCallback ,
onClassGroupIconChanged ,
wrap_ClassGroupIconChangedCallback ,
C_ClassGroupNameChangedCallback ,
ClassGroupNameChangedCallback ,
#if ENABLE_OVERLOADING
ClassGroupNameChangedSignalInfo ,
#endif
afterClassGroupNameChanged ,
genClosure_ClassGroupNameChanged ,
mk_ClassGroupNameChangedCallback ,
noClassGroupNameChangedCallback ,
onClassGroupNameChanged ,
wrap_ClassGroupNameChangedCallback ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GdkPixbuf.Objects.Pixbuf as GdkPixbuf.Pixbuf
import {-# SOURCE #-} qualified GI.Wnck.Objects.Window as Wnck.Window
newtype ClassGroup = ClassGroup (ManagedPtr ClassGroup)
foreign import ccall "wnck_class_group_get_type"
c_wnck_class_group_get_type :: IO GType
instance GObject ClassGroup where
gobjectType = c_wnck_class_group_get_type
class (GObject o, O.IsDescendantOf ClassGroup o) => IsClassGroup o
instance (GObject o, O.IsDescendantOf ClassGroup o) => IsClassGroup o
instance O.HasParentTypes ClassGroup
type instance O.ParentTypes ClassGroup = '[GObject.Object.Object]
toClassGroup :: (MonadIO m, IsClassGroup o) => o -> m ClassGroup
toClassGroup = liftIO . unsafeCastTo ClassGroup
noClassGroup :: Maybe ClassGroup
noClassGroup = Nothing
#if ENABLE_OVERLOADING
type family ResolveClassGroupMethod (t :: Symbol) (o :: *) :: * where
ResolveClassGroupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveClassGroupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveClassGroupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveClassGroupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveClassGroupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveClassGroupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveClassGroupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveClassGroupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveClassGroupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveClassGroupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveClassGroupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveClassGroupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveClassGroupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveClassGroupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveClassGroupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveClassGroupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveClassGroupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveClassGroupMethod "getIcon" o = ClassGroupGetIconMethodInfo
ResolveClassGroupMethod "getId" o = ClassGroupGetIdMethodInfo
ResolveClassGroupMethod "getMiniIcon" o = ClassGroupGetMiniIconMethodInfo
ResolveClassGroupMethod "getName" o = ClassGroupGetNameMethodInfo
ResolveClassGroupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveClassGroupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveClassGroupMethod "getResClass" o = ClassGroupGetResClassMethodInfo
ResolveClassGroupMethod "getWindows" o = ClassGroupGetWindowsMethodInfo
ResolveClassGroupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveClassGroupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveClassGroupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveClassGroupMethod t ClassGroup, O.MethodInfo info ClassGroup p) => OL.IsLabel t (ClassGroup -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
type ClassGroupIconChangedCallback =
IO ()
noClassGroupIconChangedCallback :: Maybe ClassGroupIconChangedCallback
noClassGroupIconChangedCallback = Nothing
type C_ClassGroupIconChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ClassGroupIconChangedCallback :: C_ClassGroupIconChangedCallback -> IO (FunPtr C_ClassGroupIconChangedCallback)
genClosure_ClassGroupIconChanged :: MonadIO m => ClassGroupIconChangedCallback -> m (GClosure C_ClassGroupIconChangedCallback)
genClosure_ClassGroupIconChanged cb = liftIO $ do
let cb' = wrap_ClassGroupIconChangedCallback cb
mk_ClassGroupIconChangedCallback cb' >>= B.GClosure.newGClosure
wrap_ClassGroupIconChangedCallback ::
ClassGroupIconChangedCallback ->
C_ClassGroupIconChangedCallback
wrap_ClassGroupIconChangedCallback _cb _ _ = do
_cb
onClassGroupIconChanged :: (IsClassGroup a, MonadIO m) => a -> ClassGroupIconChangedCallback -> m SignalHandlerId
onClassGroupIconChanged obj cb = liftIO $ do
let cb' = wrap_ClassGroupIconChangedCallback cb
cb'' <- mk_ClassGroupIconChangedCallback cb'
connectSignalFunPtr obj "icon-changed" cb'' SignalConnectBefore
afterClassGroupIconChanged :: (IsClassGroup a, MonadIO m) => a -> ClassGroupIconChangedCallback -> m SignalHandlerId
afterClassGroupIconChanged obj cb = liftIO $ do
let cb' = wrap_ClassGroupIconChangedCallback cb
cb'' <- mk_ClassGroupIconChangedCallback cb'
connectSignalFunPtr obj "icon-changed" cb'' SignalConnectAfter
type ClassGroupNameChangedCallback =
IO ()
noClassGroupNameChangedCallback :: Maybe ClassGroupNameChangedCallback
noClassGroupNameChangedCallback = Nothing
type C_ClassGroupNameChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_ClassGroupNameChangedCallback :: C_ClassGroupNameChangedCallback -> IO (FunPtr C_ClassGroupNameChangedCallback)
genClosure_ClassGroupNameChanged :: MonadIO m => ClassGroupNameChangedCallback -> m (GClosure C_ClassGroupNameChangedCallback)
genClosure_ClassGroupNameChanged cb = liftIO $ do
let cb' = wrap_ClassGroupNameChangedCallback cb
mk_ClassGroupNameChangedCallback cb' >>= B.GClosure.newGClosure
wrap_ClassGroupNameChangedCallback ::
ClassGroupNameChangedCallback ->
C_ClassGroupNameChangedCallback
wrap_ClassGroupNameChangedCallback _cb _ _ = do
_cb
onClassGroupNameChanged :: (IsClassGroup a, MonadIO m) => a -> ClassGroupNameChangedCallback -> m SignalHandlerId
onClassGroupNameChanged obj cb = liftIO $ do
let cb' = wrap_ClassGroupNameChangedCallback cb
cb'' <- mk_ClassGroupNameChangedCallback cb'
connectSignalFunPtr obj "name-changed" cb'' SignalConnectBefore
afterClassGroupNameChanged :: (IsClassGroup a, MonadIO m) => a -> ClassGroupNameChangedCallback -> m SignalHandlerId
afterClassGroupNameChanged obj cb = liftIO $ do
let cb' = wrap_ClassGroupNameChangedCallback cb
cb'' <- mk_ClassGroupNameChangedCallback cb'
connectSignalFunPtr obj "name-changed" cb'' SignalConnectAfter
#if ENABLE_OVERLOADING
instance O.HasAttributeList ClassGroup
type instance O.AttributeList ClassGroup = ClassGroupAttributeList
type ClassGroupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
data ClassGroupIconChangedSignalInfo
instance SignalInfo ClassGroupIconChangedSignalInfo where
type HaskellCallbackType ClassGroupIconChangedSignalInfo = ClassGroupIconChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ClassGroupIconChangedCallback cb
cb'' <- mk_ClassGroupIconChangedCallback cb'
connectSignalFunPtr obj "icon-changed" cb'' connectMode
data ClassGroupNameChangedSignalInfo
instance SignalInfo ClassGroupNameChangedSignalInfo where
type HaskellCallbackType ClassGroupNameChangedSignalInfo = ClassGroupNameChangedCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_ClassGroupNameChangedCallback cb
cb'' <- mk_ClassGroupNameChangedCallback cb'
connectSignalFunPtr obj "name-changed" cb'' connectMode
type instance O.SignalList ClassGroup = ClassGroupSignalList
type ClassGroupSignalList = ('[ '("iconChanged", ClassGroupIconChangedSignalInfo), '("nameChanged", ClassGroupNameChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "wnck_class_group_get_icon" wnck_class_group_get_icon ::
Ptr ClassGroup ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
classGroupGetIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m GdkPixbuf.Pixbuf.Pixbuf
classGroupGetIcon classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_icon classGroup'
checkUnexpectedReturnNULL "classGroupGetIcon" result
result' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result
touchManagedPtr classGroup
return result'
#if ENABLE_OVERLOADING
data ClassGroupGetIconMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetIconMethodInfo a signature where
overloadedMethod _ = classGroupGetIcon
#endif
foreign import ccall "wnck_class_group_get_id" wnck_class_group_get_id ::
Ptr ClassGroup ->
IO CString
classGroupGetId ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m T.Text
classGroupGetId classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_id classGroup'
checkUnexpectedReturnNULL "classGroupGetId" result
result' <- cstringToText result
touchManagedPtr classGroup
return result'
#if ENABLE_OVERLOADING
data ClassGroupGetIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetIdMethodInfo a signature where
overloadedMethod _ = classGroupGetId
#endif
foreign import ccall "wnck_class_group_get_mini_icon" wnck_class_group_get_mini_icon ::
Ptr ClassGroup ->
IO (Ptr GdkPixbuf.Pixbuf.Pixbuf)
classGroupGetMiniIcon ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m GdkPixbuf.Pixbuf.Pixbuf
classGroupGetMiniIcon classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_mini_icon classGroup'
checkUnexpectedReturnNULL "classGroupGetMiniIcon" result
result' <- (newObject GdkPixbuf.Pixbuf.Pixbuf) result
touchManagedPtr classGroup
return result'
#if ENABLE_OVERLOADING
data ClassGroupGetMiniIconMethodInfo
instance (signature ~ (m GdkPixbuf.Pixbuf.Pixbuf), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetMiniIconMethodInfo a signature where
overloadedMethod _ = classGroupGetMiniIcon
#endif
foreign import ccall "wnck_class_group_get_name" wnck_class_group_get_name ::
Ptr ClassGroup ->
IO CString
classGroupGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m T.Text
classGroupGetName classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_name classGroup'
checkUnexpectedReturnNULL "classGroupGetName" result
result' <- cstringToText result
touchManagedPtr classGroup
return result'
#if ENABLE_OVERLOADING
data ClassGroupGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetNameMethodInfo a signature where
overloadedMethod _ = classGroupGetName
#endif
foreign import ccall "wnck_class_group_get_res_class" wnck_class_group_get_res_class ::
Ptr ClassGroup ->
IO CString
{-# DEPRECATED classGroupGetResClass ["(Since version 3.2)","Use 'GI.Wnck.Objects.ClassGroup.classGroupGetId' instead."] #-}
classGroupGetResClass ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m T.Text
classGroupGetResClass classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_res_class classGroup'
checkUnexpectedReturnNULL "classGroupGetResClass" result
result' <- cstringToText result
touchManagedPtr classGroup
return result'
#if ENABLE_OVERLOADING
data ClassGroupGetResClassMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetResClassMethodInfo a signature where
overloadedMethod _ = classGroupGetResClass
#endif
foreign import ccall "wnck_class_group_get_windows" wnck_class_group_get_windows ::
Ptr ClassGroup ->
IO (Ptr (GList (Ptr Wnck.Window.Window)))
classGroupGetWindows ::
(B.CallStack.HasCallStack, MonadIO m, IsClassGroup a) =>
a
-> m [Wnck.Window.Window]
classGroupGetWindows classGroup = liftIO $ do
classGroup' <- unsafeManagedPtrCastPtr classGroup
result <- wnck_class_group_get_windows classGroup'
result' <- unpackGList result
result'' <- mapM (newObject Wnck.Window.Window) result'
touchManagedPtr classGroup
return result''
#if ENABLE_OVERLOADING
data ClassGroupGetWindowsMethodInfo
instance (signature ~ (m [Wnck.Window.Window]), MonadIO m, IsClassGroup a) => O.MethodInfo ClassGroupGetWindowsMethodInfo a signature where
overloadedMethod _ = classGroupGetWindows
#endif
foreign import ccall "wnck_class_group_get" wnck_class_group_get ::
CString ->
IO (Ptr ClassGroup)
classGroupGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m ClassGroup
classGroupGet id = liftIO $ do
id' <- textToCString id
result <- wnck_class_group_get id'
checkUnexpectedReturnNULL "classGroupGet" result
result' <- (newObject ClassGroup) result
freeMem id'
return result'
#if ENABLE_OVERLOADING
#endif