#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Interfaces.DesktopAppInfoLookup
(
DesktopAppInfoLookup(..) ,
noDesktopAppInfoLookup ,
IsDesktopAppInfoLookup ,
toDesktopAppInfoLookup ,
#if ENABLE_OVERLOADING
DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo,
#endif
desktopAppInfoLookupGetDefaultForUriScheme,
) 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 {-# SOURCE #-} qualified GI.Gio.Interfaces.AppInfo as Gio.AppInfo
newtype DesktopAppInfoLookup = DesktopAppInfoLookup (ManagedPtr DesktopAppInfoLookup)
noDesktopAppInfoLookup :: Maybe DesktopAppInfoLookup
noDesktopAppInfoLookup = Nothing
#if ENABLE_OVERLOADING
type instance O.SignalList DesktopAppInfoLookup = DesktopAppInfoLookupSignalList
type DesktopAppInfoLookupSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_desktop_app_info_lookup_get_type"
c_g_desktop_app_info_lookup_get_type :: IO GType
instance GObject DesktopAppInfoLookup where
gobjectType = c_g_desktop_app_info_lookup_get_type
class (GObject o, O.IsDescendantOf DesktopAppInfoLookup o) => IsDesktopAppInfoLookup o
instance (GObject o, O.IsDescendantOf DesktopAppInfoLookup o) => IsDesktopAppInfoLookup o
instance O.HasParentTypes DesktopAppInfoLookup
type instance O.ParentTypes DesktopAppInfoLookup = '[GObject.Object.Object]
toDesktopAppInfoLookup :: (MonadIO m, IsDesktopAppInfoLookup o) => o -> m DesktopAppInfoLookup
toDesktopAppInfoLookup = liftIO . unsafeCastTo DesktopAppInfoLookup
#if ENABLE_OVERLOADING
instance O.HasAttributeList DesktopAppInfoLookup
type instance O.AttributeList DesktopAppInfoLookup = DesktopAppInfoLookupAttributeList
type DesktopAppInfoLookupAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolveDesktopAppInfoLookupMethod (t :: Symbol) (o :: *) :: * where
ResolveDesktopAppInfoLookupMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDesktopAppInfoLookupMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDesktopAppInfoLookupMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDesktopAppInfoLookupMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDesktopAppInfoLookupMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDesktopAppInfoLookupMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDesktopAppInfoLookupMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDesktopAppInfoLookupMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDesktopAppInfoLookupMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDesktopAppInfoLookupMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDesktopAppInfoLookupMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDesktopAppInfoLookupMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDesktopAppInfoLookupMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDesktopAppInfoLookupMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDesktopAppInfoLookupMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDesktopAppInfoLookupMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDesktopAppInfoLookupMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDesktopAppInfoLookupMethod "getDefaultForUriScheme" o = DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo
ResolveDesktopAppInfoLookupMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDesktopAppInfoLookupMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDesktopAppInfoLookupMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDesktopAppInfoLookupMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDesktopAppInfoLookupMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDesktopAppInfoLookupMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDesktopAppInfoLookupMethod t DesktopAppInfoLookup, O.MethodInfo info DesktopAppInfoLookup p) => OL.IsLabel t (DesktopAppInfoLookup -> 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
foreign import ccall "g_desktop_app_info_lookup_get_default_for_uri_scheme" g_desktop_app_info_lookup_get_default_for_uri_scheme ::
Ptr DesktopAppInfoLookup ->
CString ->
IO (Ptr Gio.AppInfo.AppInfo)
{-# DEPRECATED desktopAppInfoLookupGetDefaultForUriScheme ["The 'GI.Gio.Interfaces.DesktopAppInfoLookup.DesktopAppInfoLookup' interface is deprecated and unused by gio."] #-}
desktopAppInfoLookupGetDefaultForUriScheme ::
(B.CallStack.HasCallStack, MonadIO m, IsDesktopAppInfoLookup a) =>
a
-> T.Text
-> m Gio.AppInfo.AppInfo
desktopAppInfoLookupGetDefaultForUriScheme lookup uriScheme = liftIO $ do
lookup' <- unsafeManagedPtrCastPtr lookup
uriScheme' <- textToCString uriScheme
result <- g_desktop_app_info_lookup_get_default_for_uri_scheme lookup' uriScheme'
checkUnexpectedReturnNULL "desktopAppInfoLookupGetDefaultForUriScheme" result
result' <- (wrapObject Gio.AppInfo.AppInfo) result
touchManagedPtr lookup
freeMem uriScheme'
return result'
#if ENABLE_OVERLOADING
data DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo
instance (signature ~ (T.Text -> m Gio.AppInfo.AppInfo), MonadIO m, IsDesktopAppInfoLookup a) => O.MethodInfo DesktopAppInfoLookupGetDefaultForUriSchemeMethodInfo a signature where
overloadedMethod _ = desktopAppInfoLookupGetDefaultForUriScheme
#endif