on package:glib

Perform an action in response to a signal. Use it like this:
on obj sig $ do
...
or if the signal handler takes any arguments:
on obj sig $ \args -> do
...
Catch all GError exceptions and convert them into a general failure.
This function wraps any newly created objects that derives from GInitiallyUnowned also known as objects with "floating-references". The object will be refSink (for glib versions >= 2.10). On non-floating objects, this function behaves exactly the same as "makeNewGObject".
Flags representing a condition to watch for on a file descriptor.
  • IOIn There is data to read.
  • IOOut Data can be written (without blocking).
  • IOPri There is urgent data to read.
  • IOErr Error condition.
  • IOHup Hung up (the connection has been broken, usually for pipes and sockets).
  • IOInvalid Invalid request. The file descriptor is not open.
An opaque datatype representing a set of sources to be handled in a main loop.
The default MainContext. This is the main context used for main loop functions when a main loop is not explicitly specified.
Runs a single iteration for the given main loop. This involves checking to see if any event sources are ready to be processed, then if no events sources are ready and mayBlock is True, waiting for a source to become ready, then dispatching the highest priority events sources that are ready. Note that even when mayBlock is True, it is still possible for mainContextIteration to return False, since the the wait may be interrupted for other reasons than an event source becoming ready.
Creates a new MainContext.
The type of signal handler ids. If you ever need to use signalDisconnect to disconnect a signal handler then you will need to retain the ConnectId you got when you registered it.
Deprecated: use signalDisconnect instead
Disconnect a signal handler. After disconnecting the handler will no longer be invoked when the event occurs.
Stops a signal's current emission.
  • This will prevent the default method from running. The sequence in which handlers are run is "first", "on", "last" then "after" where Gtk-internal signals are connected either at "first" or at "last". Hence this function can only stop the signal processing if it is called from within a handler that is connected with an "on" signal and if the Gtk-internal handler is connected as "last". Gtk prints a warning if this function is used on a signal which isn't being emitted.
Offset correction for String to UTF8 mapping.
Gets a human-readable name for the application, as set by setApplicationName. This name should be localized if possible, and is intended for display to the user. Contrast with getProgramName, which gets a non-localized name. If setApplicationName has not been performed, returns the result of getProgramName (which may be Nothing if setProgramName has also not been performed).