Functions

  cairo_region_create_from_clip_extents (cr)
  cairo_rounded_rectangle (cr, rect, x_radius, y_radius)
  cancellable_chain (self, other)
  counter_arena_get_default ()
  dnd_get_uri_list (selection_data)
  file_manager_show (file)
  frame_source_add (frames_per_sec, callback, *user_data)
  frame_source_add_full (priority, frames_per_sec, callback, *user_data)
  fuzzy_highlight (str, query, case_sensitive)
  g_date_time_format_for_display (self)
  g_time_span_to_label (span)
  g_time_span_to_label_mapping (binding, from_value, to_value, user_data)
  g_variant_hash (data)
  get_current_cpu_call ()
  gtk_list_store_insert_sorted (store, key, compare_column, compare_func, *compare_data)
  gtk_text_buffer_remove_tag (buffer, tag, start, end, minimal_damage)
  gtk_widget_action (widget, group, name, param)
  gtk_widget_action_with_string (widget, group, name, param)
  gtk_widget_add_style_class (widget, class_name)
  gtk_widget_find_child_typed (widget, type)
  gtk_widget_get_relative (widget, relative_type)
  gtk_widget_hide_with_fade (widget)
  gtk_widget_is_ancestor_or_relative (widget, ancestor)
  gtk_widget_mux_action_groups (widget, from_widget, mux_key)
  gtk_widget_remove_style_class (widget, class_name)
  gtk_widget_show_with_fade (widget)
  levenshtein (needle, haystack)
  overlay_add_child (self, child, type)
  pango_font_description_to_css (font_desc)
  rgba_shade (rgba, k)
  shortcut_chord_equal (data1, data2)
  shortcut_chord_hash (data)
  shortcut_chord_table_get_type ()

Details

Dazzle.cairo_region_create_from_clip_extents(cr)
Parameters:cr (cairo.Context) –
Returns:A #CairoRegion.
Return type:cairo.Region

cr a cairo context Creates a region from the extents of the context’s current clip area.

Dazzle.cairo_rounded_rectangle(cr, rect, x_radius, y_radius)
Parameters:

Adds a rounded rectangle to cr’s current path.

Dazzle.cancellable_chain(self, other)
Parameters:
Returns:

a Gio.Cancellable or None

Return type:

Gio.Cancellable or None

If both self and other are not None, then the cancellation of other will be propagated to self if other is cancelled.

If self and other are the same, self is returned and no additional chaining will occur.

If self and other are None, then None is returned. If self is non-None, it will be returned. If self is None and other is non-None, other will be returned. This is useful to succinctly chain cancellables like:

cancellable = dzl_cancellable_chain (cancellable, self->cancellable);

New in version 3.28.

Dazzle.counter_arena_get_default()
Return type:Dazzle.CounterArena
Dazzle.dnd_get_uri_list(selection_data)
Parameters:selection_data (Gtk.SelectionData) – the Gtk.SelectionData from drag_data_received
Returns:a string array which will hold the uris or None if there were no valid uris. GLib.strfreev should be used when the string array is no longer used
Return type:[str]

Create a list of valid uri’s from a uri-list drop.

Deprecated since version ???: Use Gtk.SelectionData.get_uris() instead; it is exactly the same.

Dazzle.file_manager_show(file)
Parameters:file (Gio.File) –
Raises:GLib.Error
Return type:bool
Dazzle.frame_source_add(frames_per_sec, callback, *user_data)
Parameters:
Returns:

A source id that can be removed with GLib.Source.remove().

Return type:

int

Creates a new frame source that will execute when the timeout interval for the source has elapsed. The timing will try to synchronize based on the end time of the animation.

Dazzle.frame_source_add_full(priority, frames_per_sec, callback, *user_data)
Parameters:
Return type:

int

Dazzle.fuzzy_highlight(str, query, case_sensitive)
Parameters:
  • str (str) –
  • query (str) –
  • case_sensitive (bool) –
Return type:

str

Dazzle.g_date_time_format_for_display(self)
Parameters:self (GLib.DateTime) – A GLib.DateTime
Returns:A newly allocated string describing the date and time imprecisely such as “Yesterday”.
Return type:str

Helper function to create a human-friendly string describing approximately how long ago a GLib.DateTime is.

Dazzle.g_time_span_to_label(span)
Parameters:span (int) – the span of time
Returns:A newly allocated string describing the time span.
Return type:str

Creates a string describing the time span in hours, minutes, and seconds. For example, a time span of three and a half minutes would be “3:30”. 2 days, 3 hours, 6 minutes, and 20 seconds would be “51:06:20”.

Dazzle.g_time_span_to_label_mapping(binding, from_value, to_value, user_data)
Parameters:
Return type:

bool

A GObject.BindingTransformFunc to transform a time span into a string label using Dazzle.g_time_span_to_label().

Dazzle.g_variant_hash(data)
Parameters:data (object or None) –
Return type:int
Dazzle.get_current_cpu_call()
Return type:int
Dazzle.gtk_list_store_insert_sorted(store, key, compare_column, compare_func, *compare_data)
Parameters:
Returns:

A location for a Gtk.TextIter

Return type:

iter: Gtk.TreeIter

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 GObject.TYPE_POINTER, GObject.TYPE_BOXED or GObject.TYPE_OBJECT based column.

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

New in version 3.26.

Dazzle.gtk_text_buffer_remove_tag(buffer, tag, start, end, minimal_damage)
Parameters:

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

Dazzle.gtk_widget_action(widget, group, name, param)
Parameters:
Return type:

bool

Dazzle.gtk_widget_action_with_string(widget, group, name, param)
Parameters:
Return type:

bool

Dazzle.gtk_widget_add_style_class(widget, class_name)
Parameters:
Dazzle.gtk_widget_find_child_typed(widget, type)
Parameters:
Returns:

A widget or None

Return type:

Gtk.Widget or None

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

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

Dazzle.gtk_widget_get_relative(widget, relative_type)
Parameters:
Returns:

A Gtk.Widget or None.

Return type:

Gtk.Widget or None

This is similar to Gtk.Widget.get_ancestor(), but looks for relatives via properties such as Gtk.Popover :relative-to and others.

Dazzle.gtk_widget_hide_with_fade(widget)
Parameters:widget (Gtk.Widget) –
Dazzle.gtk_widget_is_ancestor_or_relative(widget, ancestor)
Parameters:
Returns:

True if ancestor is an ancestor or relative for widget.

Return type:

bool

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 Gtk.Menu :attach-widget, Gtk.Popover :relative-to, and Gtk.Window :transient-for.

New in version 3.26.

Dazzle.gtk_widget_mux_action_groups(widget, from_widget, mux_key)
Parameters:

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.

Dazzle.gtk_widget_remove_style_class(widget, class_name)
Parameters:
Dazzle.gtk_widget_show_with_fade(widget)
Parameters:widget (Gtk.Widget) –
Dazzle.levenshtein(needle, haystack)
Parameters:
  • needle (str) –
  • haystack (str) –
Return type:

int

Dazzle.overlay_add_child(self, child, type)
Parameters:
Dazzle.pango_font_description_to_css(font_desc)
Parameters:font_desc (Pango.FontDescription) –
Returns:A newly allocated string containing the CSS describing the font description.
Return type:str

This function will generate CSS suitable for Gtk’s CSS engine based on the properties of the Pango.FontDescription.

Dazzle.rgba_shade(rgba, k)
Parameters:
Returns:

the resulting shade

Return type:

dst: Gdk.RGBA

Creates a shade of the color rgba by multiplying its saturation and lightness by k.

Values of k greater than 1 will make the color brighter, while values less than 1 will make it darker. The alpha value will remain the same.

Dazzle.shortcut_chord_equal(data1, data2)
Parameters:
Return type:

bool

Dazzle.shortcut_chord_hash(data)
Parameters:data (object or None) –
Return type:int
Dazzle.shortcut_chord_table_get_type()
Return type:GObject.GType