Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
Integrating the launch with the launching application. This is used to handle for instance startup notification and launching the new application on the same screen as the launching window.
- newtype AppLaunchContext = AppLaunchContext (ManagedPtr AppLaunchContext)
- class GObject o => IsAppLaunchContext o
- toAppLaunchContext :: (MonadIO m, IsAppLaunchContext o) => o -> m AppLaunchContext
- noAppLaunchContext :: Maybe AppLaunchContext
- appLaunchContextGetDisplay :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) => a -> b -> [c] -> m Text
- appLaunchContextGetEnvironment :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> m [Text]
- appLaunchContextGetStartupNotifyId :: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) => a -> b -> [c] -> m Text
- appLaunchContextLaunchFailed :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> m ()
- appLaunchContextNew :: (HasCallStack, MonadIO m) => m AppLaunchContext
- appLaunchContextSetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> Text -> m ()
- appLaunchContextUnsetenv :: (HasCallStack, MonadIO m, IsAppLaunchContext a) => a -> Text -> m ()
- type AppLaunchContextLaunchFailedCallback = Text -> IO ()
- type C_AppLaunchContextLaunchFailedCallback = Ptr () -> CString -> Ptr () -> IO ()
- afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId
- genClosure_AppLaunchContextLaunchFailed :: AppLaunchContextLaunchFailedCallback -> IO Closure
- mk_AppLaunchContextLaunchFailedCallback :: C_AppLaunchContextLaunchFailedCallback -> IO (FunPtr C_AppLaunchContextLaunchFailedCallback)
- noAppLaunchContextLaunchFailedCallback :: Maybe AppLaunchContextLaunchFailedCallback
- onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId
- wrap_AppLaunchContextLaunchFailedCallback :: AppLaunchContextLaunchFailedCallback -> Ptr () -> CString -> Ptr () -> IO ()
- type AppLaunchContextLaunchedCallback = AppInfo -> GVariant -> IO ()
- type C_AppLaunchContextLaunchedCallback = Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> IO ()
- afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId
- genClosure_AppLaunchContextLaunched :: AppLaunchContextLaunchedCallback -> IO Closure
- mk_AppLaunchContextLaunchedCallback :: C_AppLaunchContextLaunchedCallback -> IO (FunPtr C_AppLaunchContextLaunchedCallback)
- noAppLaunchContextLaunchedCallback :: Maybe AppLaunchContextLaunchedCallback
- onAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId
- wrap_AppLaunchContextLaunchedCallback :: AppLaunchContextLaunchedCallback -> Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> IO ()
Exported types
newtype AppLaunchContext Source #
class GObject o => IsAppLaunchContext o Source #
toAppLaunchContext :: (MonadIO m, IsAppLaunchContext o) => o -> m AppLaunchContext Source #
Methods
getDisplay
appLaunchContextGetDisplay Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) | |
=> a |
|
-> b |
|
-> [c] | |
-> m Text | Returns: a display string for the display. |
Gets the display string for the context
. This is used to ensure new
applications are started on the same display as the launching
application, by setting the DISPLAY
environment variable.
getEnvironment
appLaunchContextGetEnvironment Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a) | |
=> a |
|
-> m [Text] | Returns: the child's environment |
Gets the complete environment variable list to be passed to
the child process when context
is used to launch an application.
This is a Nothing
-terminated array of strings, where each string has
the form KEY=VALUE
.
Since: 2.32
getStartupNotifyId
appLaunchContextGetStartupNotifyId Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a, IsAppInfo b, IsFile c) | |
=> a |
|
-> b |
|
-> [c] | |
-> m Text | Returns: a startup notification ID for the application, or |
Initiates startup notification for the application and returns the
DESKTOP_STARTUP_ID
for the launched operation, if supported.
Startup notification IDs are defined in the FreeDesktop.Org Startup Notifications standard.
launchFailed
appLaunchContextLaunchFailed Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a) | |
=> a |
|
-> Text |
|
-> m () |
Called when an application has failed to launch, so that it can cancel
the application startup notification started in appLaunchContextGetStartupNotifyId
.
new
:: (HasCallStack, MonadIO m) | |
=> m AppLaunchContext | Returns: a |
Creates a new application launch context. This is not normally used,
instead you instantiate a subclass of this, such as GdkAppLaunchContext
.
setenv
appLaunchContextSetenv Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a) | |
=> a |
|
-> Text |
|
-> Text |
|
-> m () |
Arranges for variable
to be set to value
in the child's
environment when context
is used to launch an application.
Since: 2.32
unsetenv
appLaunchContextUnsetenv Source #
:: (HasCallStack, MonadIO m, IsAppLaunchContext a) | |
=> a |
|
-> Text |
|
-> m () |
Arranges for variable
to be unset in the child's environment
when context
is used to launch an application.
Since: 2.32
Signals
launchFailed
type AppLaunchContextLaunchFailedCallback = Text -> IO () Source #
afterAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId Source #
genClosure_AppLaunchContextLaunchFailed :: AppLaunchContextLaunchFailedCallback -> IO Closure Source #
mk_AppLaunchContextLaunchFailedCallback :: C_AppLaunchContextLaunchFailedCallback -> IO (FunPtr C_AppLaunchContextLaunchFailedCallback) Source #
onAppLaunchContextLaunchFailed :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchFailedCallback -> m SignalHandlerId Source #
wrap_AppLaunchContextLaunchFailedCallback :: AppLaunchContextLaunchFailedCallback -> Ptr () -> CString -> Ptr () -> IO () Source #
launched
type C_AppLaunchContextLaunchedCallback = Ptr () -> Ptr AppInfo -> Ptr GVariant -> Ptr () -> IO () Source #
afterAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId Source #
mk_AppLaunchContextLaunchedCallback :: C_AppLaunchContextLaunchedCallback -> IO (FunPtr C_AppLaunchContextLaunchedCallback) Source #
onAppLaunchContextLaunched :: (IsAppLaunchContext a, MonadIO m) => a -> AppLaunchContextLaunchedCallback -> m SignalHandlerId Source #