{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.AppInfoMonitor
(
AppInfoMonitor(..) ,
IsAppInfoMonitor ,
toAppInfoMonitor ,
noAppInfoMonitor ,
#if defined(ENABLE_OVERLOADING)
ResolveAppInfoMonitorMethod ,
#endif
appInfoMonitorGet ,
AppInfoMonitorChangedCallback ,
#if defined(ENABLE_OVERLOADING)
AppInfoMonitorChangedSignalInfo ,
#endif
C_AppInfoMonitorChangedCallback ,
afterAppInfoMonitorChanged ,
genClosure_AppInfoMonitorChanged ,
mk_AppInfoMonitorChangedCallback ,
noAppInfoMonitorChangedCallback ,
onAppInfoMonitorChanged ,
wrap_AppInfoMonitorChangedCallback ,
) 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.GI.Base.Signals as B.Signals
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
newtype AppInfoMonitor = AppInfoMonitor (ManagedPtr AppInfoMonitor)
deriving (AppInfoMonitor -> AppInfoMonitor -> Bool
(AppInfoMonitor -> AppInfoMonitor -> Bool)
-> (AppInfoMonitor -> AppInfoMonitor -> Bool) -> Eq AppInfoMonitor
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: AppInfoMonitor -> AppInfoMonitor -> Bool
$c/= :: AppInfoMonitor -> AppInfoMonitor -> Bool
== :: AppInfoMonitor -> AppInfoMonitor -> Bool
$c== :: AppInfoMonitor -> AppInfoMonitor -> Bool
Eq)
foreign import ccall "g_app_info_monitor_get_type"
c_g_app_info_monitor_get_type :: IO GType
instance GObject AppInfoMonitor where
gobjectType :: IO GType
gobjectType = IO GType
c_g_app_info_monitor_get_type
instance B.GValue.IsGValue AppInfoMonitor where
toGValue :: AppInfoMonitor -> IO GValue
toGValue o :: AppInfoMonitor
o = do
GType
gtype <- IO GType
c_g_app_info_monitor_get_type
AppInfoMonitor -> (Ptr AppInfoMonitor -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AppInfoMonitor
o (GType
-> (GValue -> Ptr AppInfoMonitor -> IO ())
-> Ptr AppInfoMonitor
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr AppInfoMonitor -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO AppInfoMonitor
fromGValue gv :: GValue
gv = do
Ptr AppInfoMonitor
ptr <- GValue -> IO (Ptr AppInfoMonitor)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr AppInfoMonitor)
(ManagedPtr AppInfoMonitor -> AppInfoMonitor)
-> Ptr AppInfoMonitor -> IO AppInfoMonitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AppInfoMonitor -> AppInfoMonitor
AppInfoMonitor Ptr AppInfoMonitor
ptr
class (GObject o, O.IsDescendantOf AppInfoMonitor o) => IsAppInfoMonitor o
instance (GObject o, O.IsDescendantOf AppInfoMonitor o) => IsAppInfoMonitor o
instance O.HasParentTypes AppInfoMonitor
type instance O.ParentTypes AppInfoMonitor = '[GObject.Object.Object]
toAppInfoMonitor :: (MonadIO m, IsAppInfoMonitor o) => o -> m AppInfoMonitor
toAppInfoMonitor :: o -> m AppInfoMonitor
toAppInfoMonitor = IO AppInfoMonitor -> m AppInfoMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AppInfoMonitor -> m AppInfoMonitor)
-> (o -> IO AppInfoMonitor) -> o -> m AppInfoMonitor
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr AppInfoMonitor -> AppInfoMonitor)
-> o -> IO AppInfoMonitor
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr AppInfoMonitor -> AppInfoMonitor
AppInfoMonitor
noAppInfoMonitor :: Maybe AppInfoMonitor
noAppInfoMonitor :: Maybe AppInfoMonitor
noAppInfoMonitor = Maybe AppInfoMonitor
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveAppInfoMonitorMethod (t :: Symbol) (o :: *) :: * where
ResolveAppInfoMonitorMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveAppInfoMonitorMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveAppInfoMonitorMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveAppInfoMonitorMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveAppInfoMonitorMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveAppInfoMonitorMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveAppInfoMonitorMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveAppInfoMonitorMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveAppInfoMonitorMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveAppInfoMonitorMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveAppInfoMonitorMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveAppInfoMonitorMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveAppInfoMonitorMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveAppInfoMonitorMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveAppInfoMonitorMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveAppInfoMonitorMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveAppInfoMonitorMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveAppInfoMonitorMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveAppInfoMonitorMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveAppInfoMonitorMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveAppInfoMonitorMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveAppInfoMonitorMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveAppInfoMonitorMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveAppInfoMonitorMethod t AppInfoMonitor, O.MethodInfo info AppInfoMonitor p) => OL.IsLabel t (AppInfoMonitor -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
type AppInfoMonitorChangedCallback =
IO ()
noAppInfoMonitorChangedCallback :: Maybe AppInfoMonitorChangedCallback
noAppInfoMonitorChangedCallback :: Maybe (IO ())
noAppInfoMonitorChangedCallback = Maybe (IO ())
forall a. Maybe a
Nothing
type C_AppInfoMonitorChangedCallback =
Ptr () ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_AppInfoMonitorChangedCallback :: C_AppInfoMonitorChangedCallback -> IO (FunPtr C_AppInfoMonitorChangedCallback)
genClosure_AppInfoMonitorChanged :: MonadIO m => AppInfoMonitorChangedCallback -> m (GClosure C_AppInfoMonitorChangedCallback)
genClosure_AppInfoMonitorChanged :: IO () -> m (GClosure C_AppInfoMonitorChangedCallback)
genClosure_AppInfoMonitorChanged cb :: IO ()
cb = IO (GClosure C_AppInfoMonitorChangedCallback)
-> m (GClosure C_AppInfoMonitorChangedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_AppInfoMonitorChangedCallback)
-> m (GClosure C_AppInfoMonitorChangedCallback))
-> IO (GClosure C_AppInfoMonitorChangedCallback)
-> m (GClosure C_AppInfoMonitorChangedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_AppInfoMonitorChangedCallback
cb' = IO () -> C_AppInfoMonitorChangedCallback
wrap_AppInfoMonitorChangedCallback IO ()
cb
C_AppInfoMonitorChangedCallback
-> IO (FunPtr C_AppInfoMonitorChangedCallback)
mk_AppInfoMonitorChangedCallback C_AppInfoMonitorChangedCallback
cb' IO (FunPtr C_AppInfoMonitorChangedCallback)
-> (FunPtr C_AppInfoMonitorChangedCallback
-> IO (GClosure C_AppInfoMonitorChangedCallback))
-> IO (GClosure C_AppInfoMonitorChangedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_AppInfoMonitorChangedCallback
-> IO (GClosure C_AppInfoMonitorChangedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_AppInfoMonitorChangedCallback ::
AppInfoMonitorChangedCallback ->
C_AppInfoMonitorChangedCallback
wrap_AppInfoMonitorChangedCallback :: IO () -> C_AppInfoMonitorChangedCallback
wrap_AppInfoMonitorChangedCallback _cb :: IO ()
_cb _ _ = do
IO ()
_cb
onAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> AppInfoMonitorChangedCallback -> m SignalHandlerId
onAppInfoMonitorChanged :: a -> IO () -> m SignalHandlerId
onAppInfoMonitorChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_AppInfoMonitorChangedCallback
cb' = IO () -> C_AppInfoMonitorChangedCallback
wrap_AppInfoMonitorChangedCallback IO ()
cb
FunPtr C_AppInfoMonitorChangedCallback
cb'' <- C_AppInfoMonitorChangedCallback
-> IO (FunPtr C_AppInfoMonitorChangedCallback)
mk_AppInfoMonitorChangedCallback C_AppInfoMonitorChangedCallback
cb'
a
-> Text
-> FunPtr C_AppInfoMonitorChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "changed" FunPtr C_AppInfoMonitorChangedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterAppInfoMonitorChanged :: (IsAppInfoMonitor a, MonadIO m) => a -> AppInfoMonitorChangedCallback -> m SignalHandlerId
afterAppInfoMonitorChanged :: a -> IO () -> m SignalHandlerId
afterAppInfoMonitorChanged obj :: a
obj cb :: IO ()
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_AppInfoMonitorChangedCallback
cb' = IO () -> C_AppInfoMonitorChangedCallback
wrap_AppInfoMonitorChangedCallback IO ()
cb
FunPtr C_AppInfoMonitorChangedCallback
cb'' <- C_AppInfoMonitorChangedCallback
-> IO (FunPtr C_AppInfoMonitorChangedCallback)
mk_AppInfoMonitorChangedCallback C_AppInfoMonitorChangedCallback
cb'
a
-> Text
-> FunPtr C_AppInfoMonitorChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "changed" FunPtr C_AppInfoMonitorChangedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data AppInfoMonitorChangedSignalInfo
instance SignalInfo AppInfoMonitorChangedSignalInfo where
type HaskellCallbackType AppInfoMonitorChangedSignalInfo = AppInfoMonitorChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_AppInfoMonitorChangedCallback cb
cb'' <- mk_AppInfoMonitorChangedCallback cb'
connectSignalFunPtr obj "changed" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AppInfoMonitor
type instance O.AttributeList AppInfoMonitor = AppInfoMonitorAttributeList
type AppInfoMonitorAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList AppInfoMonitor = AppInfoMonitorSignalList
type AppInfoMonitorSignalList = ('[ '("changed", AppInfoMonitorChangedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_app_info_monitor_get" g_app_info_monitor_get ::
IO (Ptr AppInfoMonitor)
appInfoMonitorGet ::
(B.CallStack.HasCallStack, MonadIO m) =>
m AppInfoMonitor
appInfoMonitorGet :: m AppInfoMonitor
appInfoMonitorGet = IO AppInfoMonitor -> m AppInfoMonitor
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO AppInfoMonitor -> m AppInfoMonitor)
-> IO AppInfoMonitor -> m AppInfoMonitor
forall a b. (a -> b) -> a -> b
$ do
Ptr AppInfoMonitor
result <- IO (Ptr AppInfoMonitor)
g_app_info_monitor_get
Text -> Ptr AppInfoMonitor -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "appInfoMonitorGet" Ptr AppInfoMonitor
result
AppInfoMonitor
result' <- ((ManagedPtr AppInfoMonitor -> AppInfoMonitor)
-> Ptr AppInfoMonitor -> IO AppInfoMonitor
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr AppInfoMonitor -> AppInfoMonitor
AppInfoMonitor) Ptr AppInfoMonitor
result
AppInfoMonitor -> IO AppInfoMonitor
forall (m :: * -> *) a. Monad m => a -> m a
return AppInfoMonitor
result'
#if defined(ENABLE_OVERLOADING)
#endif