dzl-gtk: Dazzle Reference Manual

## dzl-gtk dzl-gtk |

## Functions

void | dzl_gtk_widget_action_set ()
gboolean | dzl_gtk_widget_action ()
gboolean | dzl_gtk_widget_action_with_string ()
void | dzl_gtk_widget_mux_action_groups ()
void | dzl_gtk_widget_hide_with_fade ()
void | dzl_gtk_widget_show_with_fade ()
void | dzl_gtk_widget_add_style_class ()
void | dzl_gtk_widget_remove_style_class ()
gpointer | dzl_gtk_widget_find_child_typed ()
void | dzl_gtk_text_buffer_remove_tag ()
void | dzl_gtk_list_store_insert_sorted ()
GtkWidget * | dzl_gtk_widget_get_relative ()
gboolean | dzl_gtk_widget_is_ancestor_or_relative ()

## Description

## Functions

### dzl_gtk_widget_action_set ()

    void
    dzl_gtk_widget_action_set (GtkWidget *widget,
                               const gchar *group,
                               const gchar *name,
                               const gchar *first_property,
                               ...);

### dzl_gtk_widget_action ()

    gboolean
    dzl_gtk_widget_action (GtkWidget *widget,
                           const gchar *group,
                           const gchar *name,
                           GVariant *param);

### dzl_gtk_widget_action_with_string ()

    gboolean
    dzl_gtk_widget_action_with_string (GtkWidget *widget,
                                       const gchar *group,
                                       const gchar *name,
                                       const gchar *param);

### dzl_gtk_widget_mux_action_groups ()

    void
    dzl_gtk_widget_mux_action_groups (GtkWidget *widget,
                                      GtkWidget *from_widget,
                                      const gchar *mux_key);

This function will find all of the actions on `from_widget` in various groups and add them to `widget` . As this just copies the action groups over, note that it does not allow for muxing items within the same group.

You should specify a key for `mux_key` so that if the same mux key is seen again, the previous muxings will be removed.

#### Parameters

widget | a GtkWidget |
from_widget | A GtkWidget containing the groups to copy |
mux_key | a unique key to represent the muxing. | [nullable]

### dzl_gtk_widget_hide_with_fade ()

    void
    dzl_gtk_widget_hide_with_fade (GtkWidget *widget);

### dzl_gtk_widget_show_with_fade ()

    void
    dzl_gtk_widget_show_with_fade (GtkWidget *widget);

### dzl_gtk_widget_add_style_class ()

    void
    dzl_gtk_widget_add_style_class (GtkWidget *widget,
                                    const gchar *class_name);

### dzl_gtk_widget_remove_style_class ()

    void
    dzl_gtk_widget_remove_style_class (GtkWidget *widget,
                                       const gchar *class_name);

### dzl_gtk_widget_find_child_typed ()

    gpointer
    dzl_gtk_widget_find_child_typed (GtkWidget *widget,
                                     GType type);

Tries to locate a widget in a hierarchy given it's GType.

There is not an efficient implementation of this method, so use it only when the hierarchy of widgets is small.

#### Returns

A widget or `NULL`.

[transfer none][type Gtk.Widget][nullable]

### dzl_gtk_text_buffer_remove_tag ()

    void
    dzl_gtk_text_buffer_remove_tag (GtkTextBuffer *buffer,
                                    GtkTextTag *tag,
                                    const GtkTextIter *start,
                                    const GtkTextIter *end,
                                    gboolean minimal_damage);

Like `gtk_text_buffer_remove_tag()` but allows specifying that the tags should be removed one at a time to avoid over-damaging the views displaying `buffer` .

### dzl_gtk_list_store_insert_sorted ()

    void
    dzl_gtk_list_store_insert_sorted (GtkListStore *store,
                                      GtkTreeIter *iter,
                                      gconstpointer key,
                                      guint compare_column,
                                      GCompareDataFunc compare_func,
                                      gpointer compare_data);

This function will binary search the contents of `store` looking for the location to insert a new row.

`compare_column` must be the index of a column that is a `G_TYPE_POINTER`, `G_TYPE_BOXED` or `G_TYPE_OBJECT` based column.

`compare_func` will be called with `key` as the first parameter and the value from the GtkListStore row as the second parameter. The third and final parameter is `compare_data` .

#### Parameters

store | A GtkListStore |
iter | A location for a GtkTextIter. | [out]
key | A key to compare to when binary searching |
compare_column | the column containing the data to compare |
compare_func | A callback to compare. | [scope call][closure compare_data]
compare_data | data for `compare_func` |

Since: 3.26

### dzl_gtk_widget_get_relative ()

    GtkWidget *
    dzl_gtk_widget_get_relative (GtkWidget *widget,
                                 GType relative_type);

This is similar to `gtk_widget_get_ancestor()`, but looks for relatives via properties such as “relative-to” and others.

#### Parameters

widget | a GtkWidget |
relative_type | the type of widget to locate |

#### Returns

A GtkWidget or `NULL`.

[transfer none][nullable]

### dzl_gtk_widget_is_ancestor_or_relative ()

    gboolean
    dzl_gtk_widget_is_ancestor_or_relative
                                   (GtkWidget *widget,
                                    GtkWidget *ancestor);

This function is like `gtk_widget_is_ancestor()` except that it checks various relative widgets that are not in the direct hierarchy of widgets. That includes “attach-widget”, “relative-to”, and “transient-for”.

#### Parameters

widget | a GtkWidget |
ancestor | a GtkWidget that might be an ancestor |

#### Returns

`TRUE` if `ancestor` is an ancestor or relative for `widget` .

Since: 3.26

## Types and Values