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.

  1. miscThreadsEnter :: (HasCallStack, MonadIO m, IsMisc a) => a -> m ()

    gi-atk GI.Atk.Objects.Misc

    Deprecated: Since 2.12.

  2. miscThreadsLeave :: (HasCallStack, MonadIO m, IsMisc a) => a -> m ()

    gi-atk GI.Atk.Objects.Misc

    Deprecated: Since 2.12.

  3. GrabStatusAlreadyGrabbed :: GrabStatus

    gi-gdk3 GI.Gdk.Enums

    the resource is actively grabbed by another client.

  4. threadsAddIdle :: (HasCallStack, MonadIO m) => Int32 -> SourceFunc -> m Word32

    gi-gdk3 GI.Gdk.Functions

    Adds a function to be called whenever there are no higher priority events pending. If the function returns False it is automatically removed from the list of event sources and will not be called again. This variant of idleAdd calls function with the GDK lock held. It can be thought of a MT-safe version for GTK+ widgets for the following use case, where you have to worry about idle_callback() running in thread A and accessing self after it has been finalized in thread B:

    C code

    static gboolean
    idle_callback (gpointer data)
    {
    // gdk_threads_enter(); would be needed for g_idle_add()
    
    SomeWidget *self = data;
    // do stuff with self
    
    self->idle_id = 0;
    
    // gdk_threads_leave(); would be needed for g_idle_add()
    return FALSE;
    }
    
    static void
    some_widget_do_stuff_later (SomeWidget *self)
    {
    self->idle_id = gdk_threads_add_idle (idle_callback, self)
    // using g_idle_add() here would require thread protection in the callback
    }
    
    static void
    some_widget_finalize (GObject *object)
    {
    SomeWidget *self = SOME_WIDGET (object);
    if (self->idle_id)
    g_source_remove (self->idle_id);
    G_OBJECT_CLASS (parent_class)->finalize (object);
    }
    
    Since: 2.12

  5. threadsAddTimeout :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

    gi-gdk3 GI.Gdk.Functions

    Sets a function to be called at regular intervals holding the GDK lock, with the given priority. The function is called repeatedly until it returns False, at which point the timeout is automatically destroyed and the function will not be called again. The notify function is called when the timeout is destroyed. The first call to the function will be at the end of the first interval. Note that timeout functions may be delayed, due to the processing of other event sources. Thus they should not be relied on for precise timing. After each call to the timeout function, the time of the next timeout is recalculated based on the current time and the given interval (it does not try to “catch up” time lost in delays). This variant of timeoutAdd can be thought of a MT-safe version for GTK+ widgets for the following use case:

    C code

    static gboolean timeout_callback (gpointer data)
    {
    SomeWidget *self = data;
    
    // do stuff with self
    
    self->timeout_id = 0;
    
    return G_SOURCE_REMOVE;
    }
    
    static void some_widget_do_stuff_later (SomeWidget *self)
    {
    self->timeout_id = g_timeout_add (timeout_callback, self)
    }
    
    static void some_widget_finalize (GObject *object)
    {
    SomeWidget *self = SOME_WIDGET (object);
    
    if (self->timeout_id)
    g_source_remove (self->timeout_id);
    
    G_OBJECT_CLASS (parent_class)->finalize (object);
    }
    
    Since: 2.12

  6. threadsAddTimeoutSeconds :: (HasCallStack, MonadIO m) => Int32 -> Word32 -> SourceFunc -> m Word32

    gi-gdk3 GI.Gdk.Functions

    A variant of threadsAddTimeout with second-granularity. See timeoutAddSeconds for a discussion of why it is a good idea to use this function if you don’t need finer granularity. Since: 2.14

  7. threadsEnter :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  8. threadsInit :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  9. threadsLeave :: (HasCallStack, MonadIO m) => m ()

    gi-gdk3 GI.Gdk.Functions

    Deprecated: (Since version 3.6)All GDK and GTK+ calls should be made from the mainthread

  10. OsThread :: ThreadAffinity

    ki Ki

    Bound to an OS thread.

Page 639 of many | Previous | Next