module GI.Gio.Objects.ApplicationCommandLine
(
ApplicationCommandLine(..) ,
IsApplicationCommandLine ,
toApplicationCommandLine ,
noApplicationCommandLine ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineCreateFileForArgMethodInfo,
#endif
applicationCommandLineCreateFileForArg ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetArgumentsMethodInfo,
#endif
applicationCommandLineGetArguments ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetCwdMethodInfo ,
#endif
applicationCommandLineGetCwd ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetEnvironMethodInfo,
#endif
applicationCommandLineGetEnviron ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetExitStatusMethodInfo,
#endif
applicationCommandLineGetExitStatus ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetIsRemoteMethodInfo,
#endif
applicationCommandLineGetIsRemote ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetOptionsDictMethodInfo,
#endif
applicationCommandLineGetOptionsDict ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetPlatformDataMethodInfo,
#endif
applicationCommandLineGetPlatformData ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetStdinMethodInfo,
#endif
applicationCommandLineGetStdin ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineGetenvMethodInfo ,
#endif
applicationCommandLineGetenv ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineSetExitStatusMethodInfo,
#endif
applicationCommandLineSetExitStatus ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineArgumentsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
applicationCommandLineArguments ,
#endif
constructApplicationCommandLineArguments,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineIsRemotePropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
applicationCommandLineIsRemote ,
#endif
getApplicationCommandLineIsRemote ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLineOptionsPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
applicationCommandLineOptions ,
#endif
constructApplicationCommandLineOptions ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
ApplicationCommandLinePlatformDataPropertyInfo,
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
applicationCommandLinePlatformData ,
#endif
constructApplicationCommandLinePlatformData,
) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GLib.Structs.VariantDict as GLib.VariantDict
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Interfaces.File as Gio.File
import qualified GI.Gio.Objects.InputStream as Gio.InputStream
newtype ApplicationCommandLine = ApplicationCommandLine (ManagedPtr ApplicationCommandLine)
foreign import ccall "g_application_command_line_get_type"
c_g_application_command_line_get_type :: IO GType
instance GObject ApplicationCommandLine where
gobjectType _ = c_g_application_command_line_get_type
class GObject o => IsApplicationCommandLine o
#if MIN_VERSION_base(4,9,0)
instance (GObject a, O.UnknownAncestorError ApplicationCommandLine a) =>
IsApplicationCommandLine a
#endif
instance IsApplicationCommandLine ApplicationCommandLine
instance GObject.Object.IsObject ApplicationCommandLine
toApplicationCommandLine :: (MonadIO m, IsApplicationCommandLine o) => o -> m ApplicationCommandLine
toApplicationCommandLine = liftIO . unsafeCastTo ApplicationCommandLine
noApplicationCommandLine :: Maybe ApplicationCommandLine
noApplicationCommandLine = Nothing
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type family ResolveApplicationCommandLineMethod (t :: Symbol) (o :: *) :: * where
ResolveApplicationCommandLineMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveApplicationCommandLineMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveApplicationCommandLineMethod "createFileForArg" o = ApplicationCommandLineCreateFileForArgMethodInfo
ResolveApplicationCommandLineMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveApplicationCommandLineMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveApplicationCommandLineMethod "getenv" o = ApplicationCommandLineGetenvMethodInfo
ResolveApplicationCommandLineMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveApplicationCommandLineMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveApplicationCommandLineMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveApplicationCommandLineMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveApplicationCommandLineMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveApplicationCommandLineMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
ResolveApplicationCommandLineMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
ResolveApplicationCommandLineMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveApplicationCommandLineMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveApplicationCommandLineMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveApplicationCommandLineMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveApplicationCommandLineMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveApplicationCommandLineMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveApplicationCommandLineMethod "getArguments" o = ApplicationCommandLineGetArgumentsMethodInfo
ResolveApplicationCommandLineMethod "getCwd" o = ApplicationCommandLineGetCwdMethodInfo
ResolveApplicationCommandLineMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveApplicationCommandLineMethod "getEnviron" o = ApplicationCommandLineGetEnvironMethodInfo
ResolveApplicationCommandLineMethod "getExitStatus" o = ApplicationCommandLineGetExitStatusMethodInfo
ResolveApplicationCommandLineMethod "getIsRemote" o = ApplicationCommandLineGetIsRemoteMethodInfo
ResolveApplicationCommandLineMethod "getOptionsDict" o = ApplicationCommandLineGetOptionsDictMethodInfo
ResolveApplicationCommandLineMethod "getPlatformData" o = ApplicationCommandLineGetPlatformDataMethodInfo
ResolveApplicationCommandLineMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveApplicationCommandLineMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveApplicationCommandLineMethod "getStdin" o = ApplicationCommandLineGetStdinMethodInfo
ResolveApplicationCommandLineMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveApplicationCommandLineMethod "setExitStatus" o = ApplicationCommandLineSetExitStatusMethodInfo
ResolveApplicationCommandLineMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveApplicationCommandLineMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveApplicationCommandLineMethod t ApplicationCommandLine, O.MethodInfo info ApplicationCommandLine p) => O.IsLabelProxy t (ApplicationCommandLine -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveApplicationCommandLineMethod t ApplicationCommandLine, O.MethodInfo info ApplicationCommandLine p) => O.IsLabel t (ApplicationCommandLine -> 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
#endif
constructApplicationCommandLineArguments :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
constructApplicationCommandLineArguments val = constructObjectPropertyVariant "arguments" (Just val)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineArgumentsPropertyInfo
instance AttrInfo ApplicationCommandLineArgumentsPropertyInfo where
type AttrAllowedOps ApplicationCommandLineArgumentsPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint ApplicationCommandLineArgumentsPropertyInfo = (~) GVariant
type AttrBaseTypeConstraint ApplicationCommandLineArgumentsPropertyInfo = IsApplicationCommandLine
type AttrGetType ApplicationCommandLineArgumentsPropertyInfo = ()
type AttrLabel ApplicationCommandLineArgumentsPropertyInfo = "arguments"
type AttrOrigin ApplicationCommandLineArgumentsPropertyInfo = ApplicationCommandLine
attrGet _ = undefined
attrSet _ = undefined
attrConstruct _ = constructApplicationCommandLineArguments
attrClear _ = undefined
#endif
getApplicationCommandLineIsRemote :: (MonadIO m, IsApplicationCommandLine o) => o -> m Bool
getApplicationCommandLineIsRemote obj = liftIO $ getObjectPropertyBool obj "is-remote"
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineIsRemotePropertyInfo
instance AttrInfo ApplicationCommandLineIsRemotePropertyInfo where
type AttrAllowedOps ApplicationCommandLineIsRemotePropertyInfo = '[ 'AttrGet]
type AttrSetTypeConstraint ApplicationCommandLineIsRemotePropertyInfo = (~) ()
type AttrBaseTypeConstraint ApplicationCommandLineIsRemotePropertyInfo = IsApplicationCommandLine
type AttrGetType ApplicationCommandLineIsRemotePropertyInfo = Bool
type AttrLabel ApplicationCommandLineIsRemotePropertyInfo = "is-remote"
type AttrOrigin ApplicationCommandLineIsRemotePropertyInfo = ApplicationCommandLine
attrGet _ = getApplicationCommandLineIsRemote
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
constructApplicationCommandLineOptions :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
constructApplicationCommandLineOptions val = constructObjectPropertyVariant "options" (Just val)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineOptionsPropertyInfo
instance AttrInfo ApplicationCommandLineOptionsPropertyInfo where
type AttrAllowedOps ApplicationCommandLineOptionsPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint ApplicationCommandLineOptionsPropertyInfo = (~) GVariant
type AttrBaseTypeConstraint ApplicationCommandLineOptionsPropertyInfo = IsApplicationCommandLine
type AttrGetType ApplicationCommandLineOptionsPropertyInfo = ()
type AttrLabel ApplicationCommandLineOptionsPropertyInfo = "options"
type AttrOrigin ApplicationCommandLineOptionsPropertyInfo = ApplicationCommandLine
attrGet _ = undefined
attrSet _ = undefined
attrConstruct _ = constructApplicationCommandLineOptions
attrClear _ = undefined
#endif
constructApplicationCommandLinePlatformData :: (IsApplicationCommandLine o) => GVariant -> IO (GValueConstruct o)
constructApplicationCommandLinePlatformData val = constructObjectPropertyVariant "platform-data" (Just val)
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLinePlatformDataPropertyInfo
instance AttrInfo ApplicationCommandLinePlatformDataPropertyInfo where
type AttrAllowedOps ApplicationCommandLinePlatformDataPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrSetTypeConstraint ApplicationCommandLinePlatformDataPropertyInfo = (~) GVariant
type AttrBaseTypeConstraint ApplicationCommandLinePlatformDataPropertyInfo = IsApplicationCommandLine
type AttrGetType ApplicationCommandLinePlatformDataPropertyInfo = ()
type AttrLabel ApplicationCommandLinePlatformDataPropertyInfo = "platform-data"
type AttrOrigin ApplicationCommandLinePlatformDataPropertyInfo = ApplicationCommandLine
attrGet _ = undefined
attrSet _ = undefined
attrConstruct _ = constructApplicationCommandLinePlatformData
attrClear _ = undefined
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
instance O.HasAttributeList ApplicationCommandLine
type instance O.AttributeList ApplicationCommandLine = ApplicationCommandLineAttributeList
type ApplicationCommandLineAttributeList = ('[ '("arguments", ApplicationCommandLineArgumentsPropertyInfo), '("isRemote", ApplicationCommandLineIsRemotePropertyInfo), '("options", ApplicationCommandLineOptionsPropertyInfo), '("platformData", ApplicationCommandLinePlatformDataPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
applicationCommandLineArguments :: AttrLabelProxy "arguments"
applicationCommandLineArguments = AttrLabelProxy
applicationCommandLineIsRemote :: AttrLabelProxy "isRemote"
applicationCommandLineIsRemote = AttrLabelProxy
applicationCommandLineOptions :: AttrLabelProxy "options"
applicationCommandLineOptions = AttrLabelProxy
applicationCommandLinePlatformData :: AttrLabelProxy "platformData"
applicationCommandLinePlatformData = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
type instance O.SignalList ApplicationCommandLine = ApplicationCommandLineSignalList
type ApplicationCommandLineSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_application_command_line_create_file_for_arg" g_application_command_line_create_file_for_arg ::
Ptr ApplicationCommandLine ->
CString ->
IO (Ptr Gio.File.File)
applicationCommandLineCreateFileForArg ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> T.Text
-> m Gio.File.File
applicationCommandLineCreateFileForArg cmdline arg = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
arg' <- textToCString arg
result <- g_application_command_line_create_file_for_arg cmdline' arg'
checkUnexpectedReturnNULL "applicationCommandLineCreateFileForArg" result
result' <- (wrapObject Gio.File.File) result
touchManagedPtr cmdline
freeMem arg'
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineCreateFileForArgMethodInfo
instance (signature ~ (T.Text -> m Gio.File.File), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineCreateFileForArgMethodInfo a signature where
overloadedMethod _ = applicationCommandLineCreateFileForArg
#endif
foreign import ccall "g_application_command_line_get_arguments" g_application_command_line_get_arguments ::
Ptr ApplicationCommandLine ->
Ptr Int32 ->
IO (Ptr CString)
applicationCommandLineGetArguments ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m [T.Text]
applicationCommandLineGetArguments cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
argc <- allocMem :: IO (Ptr Int32)
result <- g_application_command_line_get_arguments cmdline' argc
argc' <- peek argc
checkUnexpectedReturnNULL "applicationCommandLineGetArguments" result
result' <- (unpackUTF8CArrayWithLength argc') result
(mapCArrayWithLength argc') freeMem result
freeMem result
touchManagedPtr cmdline
freeMem argc
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetArgumentsMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetArgumentsMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetArguments
#endif
foreign import ccall "g_application_command_line_get_cwd" g_application_command_line_get_cwd ::
Ptr ApplicationCommandLine ->
IO CString
applicationCommandLineGetCwd ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m (Maybe [Char])
applicationCommandLineGetCwd cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_cwd cmdline'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- cstringToString result'
return result''
touchManagedPtr cmdline
return maybeResult
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetCwdMethodInfo
instance (signature ~ (m (Maybe [Char])), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetCwdMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetCwd
#endif
foreign import ccall "g_application_command_line_get_environ" g_application_command_line_get_environ ::
Ptr ApplicationCommandLine ->
IO (Ptr CString)
applicationCommandLineGetEnviron ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m [T.Text]
applicationCommandLineGetEnviron cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_environ cmdline'
checkUnexpectedReturnNULL "applicationCommandLineGetEnviron" result
result' <- unpackZeroTerminatedUTF8CArray result
touchManagedPtr cmdline
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetEnvironMethodInfo
instance (signature ~ (m [T.Text]), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetEnvironMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetEnviron
#endif
foreign import ccall "g_application_command_line_get_exit_status" g_application_command_line_get_exit_status ::
Ptr ApplicationCommandLine ->
IO Int32
applicationCommandLineGetExitStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m Int32
applicationCommandLineGetExitStatus cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_exit_status cmdline'
touchManagedPtr cmdline
return result
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetExitStatusMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetExitStatusMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetExitStatus
#endif
foreign import ccall "g_application_command_line_get_is_remote" g_application_command_line_get_is_remote ::
Ptr ApplicationCommandLine ->
IO CInt
applicationCommandLineGetIsRemote ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m Bool
applicationCommandLineGetIsRemote cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_is_remote cmdline'
let result' = (/= 0) result
touchManagedPtr cmdline
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetIsRemoteMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetIsRemoteMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetIsRemote
#endif
foreign import ccall "g_application_command_line_get_options_dict" g_application_command_line_get_options_dict ::
Ptr ApplicationCommandLine ->
IO (Ptr GLib.VariantDict.VariantDict)
applicationCommandLineGetOptionsDict ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m GLib.VariantDict.VariantDict
applicationCommandLineGetOptionsDict cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_options_dict cmdline'
checkUnexpectedReturnNULL "applicationCommandLineGetOptionsDict" result
result' <- (newBoxed GLib.VariantDict.VariantDict) result
touchManagedPtr cmdline
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetOptionsDictMethodInfo
instance (signature ~ (m GLib.VariantDict.VariantDict), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetOptionsDictMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetOptionsDict
#endif
foreign import ccall "g_application_command_line_get_platform_data" g_application_command_line_get_platform_data ::
Ptr ApplicationCommandLine ->
IO (Ptr GVariant)
applicationCommandLineGetPlatformData ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m (Maybe GVariant)
applicationCommandLineGetPlatformData cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_platform_data cmdline'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- wrapGVariantPtr result'
return result''
touchManagedPtr cmdline
return maybeResult
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetPlatformDataMethodInfo
instance (signature ~ (m (Maybe GVariant)), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetPlatformDataMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetPlatformData
#endif
foreign import ccall "g_application_command_line_get_stdin" g_application_command_line_get_stdin ::
Ptr ApplicationCommandLine ->
IO (Ptr Gio.InputStream.InputStream)
applicationCommandLineGetStdin ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> m Gio.InputStream.InputStream
applicationCommandLineGetStdin cmdline = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
result <- g_application_command_line_get_stdin cmdline'
checkUnexpectedReturnNULL "applicationCommandLineGetStdin" result
result' <- (wrapObject Gio.InputStream.InputStream) result
touchManagedPtr cmdline
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetStdinMethodInfo
instance (signature ~ (m Gio.InputStream.InputStream), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetStdinMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetStdin
#endif
foreign import ccall "g_application_command_line_getenv" g_application_command_line_getenv ::
Ptr ApplicationCommandLine ->
CString ->
IO CString
applicationCommandLineGetenv ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> T.Text
-> m T.Text
applicationCommandLineGetenv cmdline name = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
name' <- textToCString name
result <- g_application_command_line_getenv cmdline' name'
checkUnexpectedReturnNULL "applicationCommandLineGetenv" result
result' <- cstringToText result
touchManagedPtr cmdline
freeMem name'
return result'
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineGetenvMethodInfo
instance (signature ~ (T.Text -> m T.Text), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineGetenvMethodInfo a signature where
overloadedMethod _ = applicationCommandLineGetenv
#endif
foreign import ccall "g_application_command_line_set_exit_status" g_application_command_line_set_exit_status ::
Ptr ApplicationCommandLine ->
Int32 ->
IO ()
applicationCommandLineSetExitStatus ::
(B.CallStack.HasCallStack, MonadIO m, IsApplicationCommandLine a) =>
a
-> Int32
-> m ()
applicationCommandLineSetExitStatus cmdline exitStatus = liftIO $ do
cmdline' <- unsafeManagedPtrCastPtr cmdline
g_application_command_line_set_exit_status cmdline' exitStatus
touchManagedPtr cmdline
return ()
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data ApplicationCommandLineSetExitStatusMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsApplicationCommandLine a) => O.MethodInfo ApplicationCommandLineSetExitStatusMethodInfo a signature where
overloadedMethod _ = applicationCommandLineSetExitStatus
#endif