Hoogle Search

Within LTS Haskell 24.67 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. type AppLaunchContextLaunchedCallback = AppInfo -> GVariant -> IO ()

    gi-gio GI.Gio.Objects.AppLaunchContext

    The AppLaunchContext::launched signal is emitted when a AppInfo is successfully launched. Because a launch operation may involve spawning multiple instances of the target application, you should expect this signal to be emitted multiple times, one time for each spawned instance. The platformData is an GVariant dictionary mapping strings to variants (ie a{sv}), which contains additional, platform-specific data about this launch. On UNIX, at least the pid and startup-notification-id keys will be present. Since 2.72 the pid may be 0 if the process id wasn't known (for example if the process was launched via D-Bus). The pid may not be set at all in subsequent releases. On Windows, pid is guaranteed to be valid only for the duration of the AppLaunchContext::launched signal emission; after the signal is emitted, GLib will call spawnClosePid. If you need to keep the GPid after the signal has been emitted, then you can duplicate pid using DuplicateHandle(). Since: 2.36

  2. type ApplicationActivateCallback = IO ()

    gi-gio GI.Gio.Objects.Application

    The activate signal is emitted on the primary instance when an activation occurs. See applicationActivate.

  3. type ApplicationCommandLineCallback = ApplicationCommandLine -> IO Int32

    gi-gio GI.Gio.Objects.Application

    The commandLine signal is emitted on the primary instance when a commandline is not handled locally. See applicationRun and the ApplicationCommandLine documentation for more information.

  4. type ApplicationHandleLocalOptionsCallback = VariantDict -> IO Int32

    gi-gio GI.Gio.Objects.Application

    The handleLocalOptions signal is emitted on the local instance after the parsing of the commandline options has occurred. You can add options to be recognised during commandline option parsing using applicationAddMainOptionEntries and applicationAddOptionGroup. Signal handlers can inspect options (along with values pointed to from the argData of an installed GOptionEntrys) in order to decide to perform certain actions, including direct local handling (which may be useful for options like --version). In the event that the application is marked ApplicationFlagsHandlesCommandLine the "normal processing" will send the options dictionary to the primary instance where it can be read with applicationCommandLineGetOptionsDict. The signal handler can modify the dictionary before returning, and the modified dictionary will be sent. In the event that ApplicationFlagsHandlesCommandLine is not set, "normal processing" will treat the remaining uncollected command line arguments as filenames or URIs. If there are no arguments, the application is activated by applicationActivate. One or more arguments results in a call to applicationOpen. If you want to handle the local commandline arguments for yourself by converting them to calls to applicationOpen or actionGroupActivateAction then you must be sure to register the application first. You should probably not call applicationActivate for yourself, however: just return -1 and allow the default handler to do it for you. This will ensure that the --gapplication-service switch works properly (i.e. no activation in that case). Note that this signal is emitted from the default implementation of local_command_line(). If you override that function and don't chain up then this signal will never be emitted. You can override local_command_line() if you need more powerful capabilities than what is provided here, but this should not normally be required. Since: 2.40

  5. type ApplicationNameLostCallback = IO Bool

    gi-gio GI.Gio.Objects.Application

    The nameLost signal is emitted only on the registered primary instance when a new instance has taken over. This can only happen if the application is using the ApplicationFlagsAllowReplacement flag. The default handler for this signal calls applicationQuit. Since: 2.60

  6. type ApplicationOpenCallback = [File] -> Text -> IO ()

    gi-gio GI.Gio.Objects.Application

    The open signal is emitted on the primary instance when there are files to open. See applicationOpen for more information.

  7. type ApplicationShutdownCallback = IO ()

    gi-gio GI.Gio.Objects.Application

    The shutdown signal is emitted only on the registered primary instance immediately after the main loop terminates.

  8. type ApplicationStartupCallback = IO ()

    gi-gio GI.Gio.Objects.Application

    The startup signal is emitted on the primary instance immediately after registration. See applicationRegister.

  9. type CancellableCancelledCallback = IO ()

    gi-gio GI.Gio.Objects.Cancellable

    Emitted when the operation has been cancelled. Can be used by implementations of cancellable operations. If the operation is cancelled from another thread, the signal will be emitted in the thread that cancelled the operation, not the thread that is running the operation. Note that disconnecting from this signal (or any signal) in a multi-threaded program is prone to race conditions. For instance it is possible that a signal handler may be invoked even after a call to signalHandlerDisconnect for that handler has already returned. There is also a problem when cancellation happens right before connecting to the signal. If this happens the signal will unexpectedly not be emitted, and checking before connecting to the signal leaves a race condition where this is still happening. In order to make it safe and easy to connect handlers there are two helper functions: cancellableConnect and cancellableDisconnect which protect against problems like this. An example of how to us this:

    C code

    // Make sure we don't do unnecessary work if already cancelled
    if (g_cancellable_set_error_if_cancelled (cancellable, error))
    return;
    
    // Set up all the data needed to be able to handle cancellation
    // of the operation
    my_data = my_data_new (...);
    
    id = 0;
    if (cancellable)
    id = g_cancellable_connect (cancellable,
    G_CALLBACK (cancelled_handler)
    data, NULL);
    
    // cancellable operation here...
    
    g_cancellable_disconnect (cancellable, id);
    
    // cancelled_handler is never called after this, it is now safe
    // to free the data
    my_data_free (my_data);
    
    Note that the cancelled signal is emitted in the thread that the user cancelled from, which may be the main thread. So, the cancellable signal should not do something that can block.

  10. charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32

    gi-gio GI.Gio.Objects.CharsetConverter

    Gets the number of fallbacks that converter has applied so far. Since: 2.24

Page 454 of many | Previous | Next