Hoogle Search
Within LTS Haskell 24.52 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
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.charsetConverterGetNumFallbacks :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Word32gi-gio GI.Gio.Objects.CharsetConverter Gets the number of fallbacks that converter has applied so far. Since: 2.24
charsetConverterGetUseFallback :: (HasCallStack, MonadIO m, IsCharsetConverter a) => a -> m Boolgi-gio GI.Gio.Objects.CharsetConverter Gets the CharsetConverter:useFallback property. Since: 2.24
-
gi-gio GI.Gio.Objects.CharsetConverter Sets the CharsetConverter:useFallback property. Since: 2.24
-
gi-gio GI.Gio.Objects.CharsetConverter Construct a GValueConstruct with valid value for the “use-fallback” property. This is rarely needed directly, but it is used by new.
getCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> m Boolgi-gio GI.Gio.Objects.CharsetConverter Get the value of the “use-fallback” property. When overloading is enabled, this is equivalent to
get charsetConverter #useFallback
setCharsetConverterUseFallback :: (MonadIO m, IsCharsetConverter o) => o -> Bool -> m ()gi-gio GI.Gio.Objects.CharsetConverter Set the value of the “use-fallback” property. When overloading is enabled, this is equivalent to
set charsetConverter [ #useFallback := value ]
type
DBusAuthObserverAllowMechanismCallback = Text -> IO Boolgi-gio GI.Gio.Objects.DBusAuthObserver Emitted to check if mechanism is allowed to be used. Since: 2.34
type
DBusAuthObserverAuthorizeAuthenticatedPeerCallback = IOStream -> Maybe Credentials -> IO Boolgi-gio GI.Gio.Objects.DBusAuthObserver Emitted to check if a peer that is successfully authenticated is authorized. Since: 2.26
-
gi-gio GI.Gio.Objects.DBusAuthObserver Connect a signal handler for the allowMechanism signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after dBusAuthObserver #allowMechanism callback
By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.