Functions¶
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- Dazzle.cairo_region_create_from_clip_extents(cr)¶
- Parameters:
cr (
cairo.Context
) –- Returns:
A #CairoRegion.
- Return type:
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:
cr (
cairo.Context
) – a cairo contextrect (
Gdk.Rectangle
) – aGdk.Rectangle
to drawx_radius (
int
) – the radius of the corners on the X axisy_radius (
int
) – the radius of the corners on the Y axis
Adds a rounded rectangle to cr's current path.
- Dazzle.cancellable_chain(self, other)¶
- Parameters:
self (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
other (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
- Returns:
a
Gio.Cancellable
orNone
- Return type:
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
, thenNone
is returned. If self is non-None
, it will be returned. If self isNone
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.dnd_get_uri_list(selection_data)¶
- Parameters:
selection_data (
Gtk.SelectionData
) – theGtk.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.frame_source_add(frames_per_sec, callback, *user_data)¶
- Parameters:
frames_per_sec (
int
) – Target frames per second.callback (
GLib.SourceFunc
) – AGLib.SourceFunc
to execute.
- Returns:
A source id that can be removed with
GLib.Source.remove
().- Return type:
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)¶
- Dazzle.fuzzy_highlight(str, query, case_sensitive)¶
- Dazzle.g_date_time_format_for_display(self)¶
- Parameters:
self (
GLib.DateTime
) – AGLib.DateTime
- Returns:
A newly allocated string describing the date and time imprecisely such as “Yesterday”.
- Return type:
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:
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:
binding (
GObject.Binding
) –from_value (
GObject.Value
) –to_value (
GObject.Value
) –
- Return type:
A
GObject.BindingTransformFunc
to transform a time span into a string label usingDazzle.g_time_span_to_label
().
- Dazzle.gtk_list_store_insert_sorted(store, key, compare_column, compare_func, *compare_data)¶
- Parameters:
store (
Gtk.ListStore
) – AGtk.ListStore
key (
object
orNone
) – A key to compare to when binary searchingcompare_column (
int
) – the column containing the data to comparecompare_func (
GLib.CompareDataFunc
) – A callback to compare
- 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
orGObject.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:
buffer (
Gtk.TextBuffer
) –tag (
Gtk.TextTag
) –start (
Gtk.TextIter
) –end (
Gtk.TextIter
) –minimal_damage (
bool
) –
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:
widget (
Gtk.Widget
) –group (
str
) –name (
str
) –param (
GLib.Variant
) –
- Return type:
- Dazzle.gtk_widget_action_with_string(widget, group, name, param)¶
- Parameters:
widget (
Gtk.Widget
) –group (
str
) –name (
str
) –param (
str
) –
- Return type:
- Dazzle.gtk_widget_add_style_class(widget, class_name)¶
- Parameters:
widget (
Gtk.Widget
) –class_name (
str
) –
- Dazzle.gtk_widget_find_child_typed(widget, type)¶
- Parameters:
widget (
Gtk.Widget
) –type (
GObject.GType
) –
- Returns:
A widget or
None
- Return type:
Gtk.Widget
orNone
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:
widget (
Gtk.Widget
) – aGtk.Widget
relative_type (
GObject.GType
) – the type of widget to locate
- Returns:
A
Gtk.Widget
orNone
.- Return type:
Gtk.Widget
orNone
This is similar to
Gtk.Widget.get_ancestor
(), but looks for relatives via properties such asGtk.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:
widget (
Gtk.Widget
) – aGtk.Widget
ancestor (
Gtk.Widget
) – aGtk.Widget
that might be an ancestor
- Returns:
True
if ancestor is an ancestor or relative for widget.- Return type:
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 includesGtk.Menu
:attach-widget
,Gtk.Popover
:relative-to
, andGtk.Window
:transient-for
.New in version 3.26.
- Dazzle.gtk_widget_mux_action_groups(widget, from_widget, mux_key)¶
- Parameters:
widget (
Gtk.Widget
) – aGtk.Widget
from_widget (
Gtk.Widget
) – AGtk.Widget
containing the groups to copymux_key (
str
orNone
) – a unique key to represent the muxing
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:
widget (
Gtk.Widget
) –class_name (
str
) –
- Dazzle.gtk_widget_show_with_fade(widget)¶
- Parameters:
widget (
Gtk.Widget
) –
- Dazzle.overlay_add_child(self, child, type)¶
- Parameters:
self (
Dazzle.DockOverlay
) –child (
Gtk.Widget
) –type (
str
) –
- 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:
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)¶
- Dazzle.shortcut_chord_table_get_type()¶
- Return type: