A [class@Gtk.ListBoxRow] used to present actions.
The `HdyActionRow` widget can have a title, a subtitle and an icon. The row
can receive additional widgets at its end, or prefix widgets at its start.
It is convenient to present a preference and its related actions.
`HdyActionRow` is unactivatable by default, giving it an activatable widget
will automatically make it activatable, but unsetting it won't change the
row's activatability.
## HdyActionRow as GtkBuildable
The `HdyActionRow` implementation of the [iface@Gtk.Buildable] interface
supports adding a child at its end by specifying “suffix” or omitting the
“type” attribute of a <child> element.
It also supports adding a child as a prefix widget by specifying “prefix” as
the “type” attribute of a <child> element.
## CSS nodes
`HdyActionRow` has a main CSS node with name `row`.
It contains the subnode `box.header` for its main horizontal box, and
`box.title` for the vertical box containing the title and subtitle labels.
It contains subnodes `label.title` and `label.subtitle` representing
respectively the title label and subtitle label.
Creates a new `HdyActionRow`.
the newly created `HdyActionRow`
Activates @self.
an action row
Activates @self.
an action row
Adds a prefix widget to @self.
an action row
the prefix widget
Gets the widget activated when @self is activated.
the activatable widget for @self
an action row
Gets the icon name for @self.
the icon name for @self
an action row
Gets the subtitle for @self.
the subtitle for @self
an action row
Gets the number of lines at the end of which the subtitle label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
the number of lines at the end of which the subtitle label will be
ellipsized
an action row
Gets the number of lines at the end of which the title label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
the number of lines at the end of which the title label will be
ellipsized
an action row
Gets whether an embedded underline in the title or subtitle indicates a
mnemonic.
whether an embedded underline in the title or subtitle indicates a
mnemonic
an action row
Sets the widget to activate when @self is activated.
an action row
the target widget
Sets the icon name for @self.
an action row
the icon name
Sets the subtitle for @self.
an action row
the subtitle
Sets the number of lines at the end of which the subtitle label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
an action row
the number of lines at the end of which the subtitle label will be ellipsized
Sets the number of lines at the end of which the title label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
an action row
the number of lines at the end of which the title label will be ellipsized
Sets whether an embedded underline in the title or subtitle indicates a
mnemonic.
an action row
`TRUE` if underlines in the text indicate mnemonics
The activatable widget for this row.
The widget is activated, either by clicking on it, by calling
[method@ActionRow.activate], or via mnemonics in the title or the subtitle.
See the [property@ActionRow:use-underline] property to enable mnemonics.
The target widget will be activated by emitting the
[signal@Gtk.Widget::mnemonic-activate] signal on it.
The icon name for this row.
The subtitle for this row.
The number of lines at the end of which the subtitle label will be
ellipsized.
If the value is 0, the number of lines won't be limited.
The number of lines at the end of which the title label will be ellipsized.
If the value is 0, the number of lines won't be limited.
Whether embedded underlines in the title or subtitle indicates a mnemonic.
If true, an underline in the text of the title or subtitle labels indicates
the next character should be used for the mnemonic accelerator key.
This signal is emitted after the row has been activated.
the parent class
activates the row to trigger its main action
an action row
A freeform application window.
`HdyApplicationWindow` is a [class@Gtk.ApplicationWindow] subclass providing
the same features as [class@Window].
See [class@Window] for details.
Using [method@Gtk.Application.set_app_menu] and
[method@Gtk.Application.set_menubar] is not supported and may result in
visual glitches.
Creates a new `HdyApplicationWindow`.
the newly created `HdyApplicationWindow`
A widget displaying an image, with a generated fallback.
`HdyAvatar` is a widget to display a round avatar.
A provided image is made round before displaying, if no image is given this
widget generates a round fallback with the initials of the
[property@Avatar:text] on top of a colored background.
The color is picked based on the hash of the [property@Avatar:text].
If [property@Avatar:show-initials] is set to `FALSE`,
`avatar-default-symbolic` is shown instead of the initials.
Use [method@Avatar.set_loadable_icon] or [property@Avatar:loadable-icon] to
set a custom image.
## CSS nodes
`HdyAvatar` has a single CSS node with name `avatar`.
Creates a new `HdyAvatar`.
the newly created `HdyAvatar`
the size of the avatar
the text used to get the initials and color
whether to use initials instead of an icon as fallback
Renders @self into a [class@GdkPixbuf.Pixbuf] at @size and @scale_factor.
This can be used to export the fallback avatar.
the pixbuf
an avatar
the size of the pixbuf
the scale factor
Renders asynchronously @self into a pixbuf at @size and @scale_factor.
This can be used to export the fallback avatar.
an avatar
the size of the pixbuf
the scale factor
a cancellable
a [callback@Gio.AsyncReadyCallback] to call when
the avatar is generated
the data to pass to callback function
Finishes an asynchronous draw of an avatar to a pixbuf.
the resulting pixbuf
an avatar
a [iface@Gio.AsyncResult]
Gets the name of an icon to use as a fallback.
the icon name
an avatar
Gets the [iface@Gio.LoadableIcon] set via [method@Avatar.set_loadable_icon].
the [iface@Gio.LoadableIcon]
an avatar
Gets whether initials are used instead of an icon on the fallback avatar.
whether initials are used instead of an icon as fallback
an avatar
Gets the size of the avatar.
the size of the avatar
an avatar
Gets the text used to generate the fallback initials and color.
the text used to generate the fallback initials and
color
an avatar
Sets the name of an icon to use as a fallback.
If no name is set, `avatar-default-symbolic` will be used.
an avatar
the name of the icon from the icon theme
A callback which is called when the custom image needs to be reloaded.
It will be called on [property@Avatar:size] or
[property@Gtk.Widget:scale-factor] changes.
use [method@Avatar.set_loadable_icon] instead.
an avatar
callback to set a custom image
user data passed to @load_image
destroy notifier for @user_data
Sets the [iface@Gio.LoadableIcon] to use as an avatar.
The previous avatar is displayed till the new avatar is loaded, to
immediately remove the custom avatar set the loadable-icon to `NULL`.
The [iface@Gio.LoadableIcon] set via this function is preferred over a set
[callback@AvatarImageLoadFunc].
an avatar
a [iface@Gio.LoadableIcon]
Sets whether to use initials instead of an icon on the fallback avatar.
an avatar
whether to use initials instead of an icon as fallback
Sets the size of the avatar.
an avatar
the size to be used for the avatar
Set the text used to generate the fallback initials color.
an avatar
the text used to get the initials and color
The name of an icon to use as a fallback.
If no name is set, the avatar-default-symbolic icon will be used. If the
name doesn't match a valid icon, it is an error and no icon will be
displayed. If the icon theme is changed, the image will be updated
automatically.
A [iface@Gio.LoadableIcon] used to load the avatar.
Whether to show the initials or the fallback icon on the generated avatar.
The avatar size of the avatar.
Sets the text used to generate the fallback initials and color.
It's only used to generate the color if [property@Avatar:show-initials] is
`FALSE`.
Callback for loading an [class@Avatar]'s image.
The returned [class@GdkPixbuf.Pixbuf] is expected to be square with width and
height set to @size. The image is cropped to a circle without any scaling or
transformation.
use [method@Avatar.set_loadable_icon] instead.
the pixbuf to use as a custom avatar or
`NULL` to fallback to the generated avatar
the required size of the avatar
user data
A paginated scrolling widget.
The `HdyCarousel` widget can be used to display a set of pages with
swipe-based navigation between them.
[class@CarouselIndicatorDots] and [class@CarouselIndicatorLines] can be used
to provide page indicators for `HdyCarousel`.
## CSS nodes
`HdyCarousel` has a single CSS node with name `carousel`.
Creates a new `HdyCarousel`.
the newly created `HdyCarousel`
Gets whether to allow swiping for more than one page at a time.
`TRUE` if long swipes are allowed
a carousel
Sets whether @self can be dragged with mouse pointer.
`TRUE` if @self can be dragged with mouse
a carousel
Gets whether @self will respond to scroll wheel events.
`TRUE` if @self will respond to scroll wheel events
a carousel
Gets animation duration used by [method@Carousel.scroll_to].
animation duration, in milliseconds
a carousel
Gets whether @self can be navigated.
`TRUE` if @self can be swiped
a carousel
Gets the number of pages in @self.
the number of pages in @self
a carousel
Gets current scroll position in @self. It's unitless, 1 matches 1 page.
the scroll position
a carousel
Gets duration of the animation used when adding or removing pages, in
milliseconds.
the duration
a carousel
Gets spacing between pages in pixels.
spacing between pages
a carousel
Inserts @child into @self at position @position.
If position is -1, or larger than the number of pages, @child will be
appended to the end.
a carousel
a widget to add
the position to insert @child in
Prepends @child to @self.
a carousel
a widget to add
Moves @child into position @position.
If position is -1, or larger than the number of pages, @child will be moved
to the end.
a carousel
a widget to add
the position to move @child to
Scrolls to @widget position with an animation.
[property@Carousel:animation-duration] property can be used for controlling
the duration.
a carousel
a child of @self
Scrolls to @widget position with an animation.
a carousel
a child of @self
animation duration, in milliseconds
Sets whether to allow swiping for more than one page at a time.
a carousel
whether to allow long swipes
Sets whether @self can be dragged with mouse pointer.
If @allow_mouse_drag is `FALSE`, dragging is only available on touch.
a carousel
whether @self can be dragged with mouse pointer
Sets whether @self will respond to scroll wheel events.
a carousel
whether @self will respond to scroll wheel events
Sets animation duration used by [method@Carousel.scroll_to].
a carousel
animation duration, in milliseconds
Sets whether @self can be navigated.
This can be used to temporarily disable a [class@Carousel] to only allow
swiping in a certain state.
a carousel
whether @self can be swiped
Sets duration of the animation used when adding or removing pages, in
milliseconds.
a carousel
the new reveal duration value
Sets spacing between pages in pixels.
a carousel
the new spacing value
Whether to allow swiping for more than one page at a time.
If the value is `FALSE`, each swipe can only move to the adjacent pages.
Sets whether the [class@Carousel] can be dragged with mouse pointer.
If the value is `FALSE`, dragging is only available on touch.
Whether the widget will respond to scroll wheel events.
If the value is `FALSE`, wheel events will be ignored.
Animation duration used by [method@Carousel.scroll_to], in milliseconds.
Whether the carousel can be navigated.
This can be used to temporarily disable a `HdyCarousel` to only allow
navigating it in a certain state.
The number of pages in a [class@Carousel].
Current scrolling position, unitless.
1 matches 1 page. Use [method@Carousel.scroll_to] for changing it.
Page reveal duration, in milliseconds.
Spacing between pages in pixels.
This signal is emitted after a page has been changed.
It can be used to implement "infinite scrolling" by amending the pages
after every scroll.
the current page
A dots indicator for [class@Carousel].
The `HdyCarouselIndicatorDots` widget shows a set of dots for each page of a
given [class@Carousel]. The dot representing the carousel's active page is
larger and more opaque than the others, the transition to the active and
inactive state is gradual to match the carousel's position.
See also [class@CarouselIndicatorLines].
## CSS nodes
`HdyCarouselIndicatorDots` has a single CSS node with name
`carouselindicatordots`.
Creates a new `HdyCarouselIndicatorDots`.
The newly created `HdyCarouselIndicatorDots`
Get the [class@Carousel] the indicator uses.
the [class@Carousel]
an indicator
Sets the [class@Carousel] to use.
an indicator
a carousel
The [class@Carousel] the indicator uses.
A lines indicator for [class@Carousel].
The `HdyCarouselIndicatorLines` widget shows a set of lines for each page of
a given [class@Carousel]. The carousel's active page is shown as another line
that moves between them to match the carousel's position.
See also [class@CarouselIndicatorDots].
## CSS nodes
`HdyCarouselIndicatorLines` has a single CSS node with name
`carouselindicatorlines`.
Creates a new `HdyCarouselIndicatorLines`.
the newly created `HdyCarouselIndicatorLines`
Gets the displayed carousel.
the displayed carousel
an indicator
Sets the [class@Carousel] to use.
an indicator
a carousel
The displayed carousel.
Describes title centering behavior of a [class@HeaderBar] widget.
Keep the title centered when possible
Keep the title centered at all cost
A widget constraining its child to a given size.
The `HdyClamp` widget constrains the size of the widget it contains to a
given maximum size. It will constrain the width if it is horizontal, or the
height if it is vertical. The expansion of the child from its minimum to its
maximum size is eased out for a smooth transition.
If the child requires more than the requested maximum size, it will be
allocated the minimum size it can fit in instead.
## CSS nodes
`HdyClamp` has a single CSS node with name `clamp`.
The node will get the style classes `.large` when its child reached its
maximum size, `.small` when the clamp allocates its full size to its child,
`.medium` in-between, or none if it didn't compute its size yet.
Creates a new `HdyClamp`.
the newly created `HdyClamp`
Gets the maximum size allocated to the children.
the maximum size to allocate to the children
a clamp
Gets the size above which the children are clamped.
the size above which the children are clamped
a clamp
Sets the maximum size allocated to the children.
a clamp
the maximum size
Sets the size above which the children are clamped.
a clamp
the tightening threshold
The maximum size to allocate the children.
It is the width if the clamp is horizontal, or the height if it is
vertical.
The size above which the child is clamped.
Starting from this size, the layout will tighten its grip on the children,
slowly allocating less and less of the available size up to the maximum
allocated size. Below that threshold and below the maximum size, the
children will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the
children, they will be allocated the whole size up to the maximum. If the
threshold is lower than the minimum size to allocate to the children, that
size will be used as the tightening threshold.
Effectively, tightening the grip on a child before it reaches its maximum
size makes transitions to and from the maximum size smoother when resizing.
Application color schemes for [property@StyleManager:color-scheme].
Inherit the parent color-scheme. When set on the
[class@StyleManager] returned by [func@StyleManager.get_default], it's
equivalent to `HDY_COLOR_SCHEME_FORCE_LIGHT`.
Always use light appearance.
Use light appearance unless the system
prefers dark colors.
Use dark appearance unless the system prefers
light colors.
Always use dark appearance.
A [class@Gtk.ListBoxRow] used to choose from a list of items.
The `HdyComboRow` widget allows the user to choose from a list of valid
choices. The row displays the selected choice. When activated, the row
displays a popover which allows the user to make a new choice.
The [class@ComboRow] uses the model-view pattern; the list of valid choices
is specified in the form of a [iface@Gio.ListModel], and the display of the
choices can be adapted to the data in the model via widget creation
functions.
`HdyComboRow` is [property@Gtk.ListBoxRow:activatable] if a model is set.
## CSS nodes
`HdyComboRow` has a main CSS node with name `row`.
Its popover has the node name popover with the `.combo` style class, it
contains a [class@Gtk.ScrolledWindow], which in turn contains a
[class@Gtk.ListBox], both are accessible via their regular nodes.
A checkmark of node and style class `image.checkmark` in the popover denotes
the current item.
Creates a new `HdyComboRow`.
the newly created `HdyComboRow`
Binds @model to @self.
If @self was already bound to a model, that previous binding is destroyed.
The contents of @self are cleared and then filled with widgets that represent
items from @model. @self is updated whenever @model changes. If @model is
`NULL`, @self is left empty.
a combo row
the [iface@Gio.ListModel] to be bound to @self
a function that creates
widgets for items to display in the list, or `NULL` in case you also passed
`NULL` as @model
a function that creates
widgets for items to display as the selected item, or `NULL` in case you
also passed `NULL` as @model
user data passed to @create_list_widget_func and
@create_current_widget_func
function for freeing @user_data
Binds @model to @self.
If @self was already bound to a model, that previous binding is destroyed.
The contents of @self are cleared and then filled with widgets that represent
items from @model. @self is updated whenever @model changes. If @model is
`NULL`, @self is left empty.
This is more convenient to use than [method@ComboRow.bind_model] if you want
to represent items of the model with names.
a combo row
the [iface@Gio.ListModel] to be bound to @self
a function that creates names for items, or
`NULL` in case you also passed `NULL` as @model
user data passed to @get_name_func
function for freeing @user_data
Gets the model bound to @self.
the [iface@Gio.ListModel] bound to @self
a combo row
Gets the index of the selected item in its [iface@Gio.ListModel].
the index of the selected item, or -1 if no item is selected
a combo row
Gets whether the current value of @self should be displayed as its subtitle.
whether the current value of @self should be displayed as its
subtitle
a combo row
Creates a model for @enum_type and binds it to @self.
The items of the model will be [class@EnumValueObject] objects.
If @self was already bound to a model, that previous binding is destroyed.
The contents of @self are cleared and then filled with widgets that represent
items from @model. @self is updated whenever @model changes. If @model is
`NULL`, @self is left empty.
This is more convenient to use than [method@ComboRow.bind_name_model] if you
want to represent values of an enumeration with names.
See [func@enum_value_row_name].
a combo row
the enumeration [alias@GLib.Type] to be bound to @self
a function that creates names for items, or
`NULL` in case you also passed `NULL` as @model
user data passed to @get_name_func
function for freeing @user_data
Sets a closure to convert items into names.
See [property@ComboRow:use-subtitle].
a combo row
a function that creates names for items, or
`NULL` in case you also passed `NULL` as @model
user data passed to @get_name_func
function for freeing @user_data
Sets the index of the selected item in its [iface@Gio.ListModel].
a combo row
the index of the selected item
Sets whether the current value of @self should be displayed as its subtitle.
If `TRUE`, you should not access [property@ActionRow:subtitle].
a combo row
`TRUE` to set the current value as the subtitle
The index of the selected item in its [iface@Gio.ListModel].
Whether to use the current value as the subtitle.
If you use a custom widget creation function, you will need to give the row
a name conversion closure with [method@ComboRow.set_get_name_func].
If `TRUE`, you should not access [property@ActionRow:subtitle].
the parent class
Callback for getting the name of a row from an enum.
Called for combo rows that are bound to an enumeration with
[method@ComboRow.set_for_enum] for each value from that enumeration.
See also: [func@enum_value_row_name].
a displayable name that represents @value
the value from the enum from which to get a name
user data
Callback for getting the name of a row.
Called for combo rows that are bound to a [iface@Gio.ListModel] with
[method@ComboRow.bind_name_model] for each item that gets added to the model.
a displayable name that represents @item
the item from the model from which to get a name
user data
A swipeable widget showing one of the visible children at a time.
The `HdyDeck` widget displays one of the visible children, similar to a
[class@Gtk.Stack]. The children are strictly ordered and can be navigated
using swipe gestures.
The “over” and “under” stack the children one on top of the other, while the
“slide” transition puts the children side by side. While navigating to a
child on the side or below can be performed by swiping the current child
away, navigating to an upper child requires dragging it from the edge where
it resides. This doesn't affect non-dragging swipes.
The “over” and “under” transitions can draw their shadow on top of the
window's transparent areas, like the rounded corners. This is a side-effect
of allowing shadows to be drawn on top of OpenGL areas. It can be mitigated
by using [class@Window] or [class@ApplicationWindow] as they will crop
anything drawn beyond the rounded corners.
## CSS nodes
`HdyDeck` has a single CSS node with name `deck`.
Creates a new `HdyDeck`.
the newly created `HdyDeck`
Finds the previous or next navigatable child.
Gets the previous or next child. This will be the same widget
[method@Deck.navigate] will navigate to.
If there's no child to navigate to, `NULL` will be returned instead.
the previous or next child
a deck
the direction
Gets whether swipe gestures for navigating backward are enabled.
Whether swipe gestures are enabled.
a deck
Gets whether swipe gestures for navigating forward enabled.
Whether swipe gestures are enabled.
a deck
Finds the child of @self with @name.
Returns `NULL` if there is no child with this name.
the requested child of @self
a deck
the name of the child to find
Gets whether @self is homogeneous for the given orientation.
whether @self is homogeneous for the given orientation
a deck
the orientation
Gets whether @self will interpolate its size when changing the visible child.
whether child sizes are interpolated
a deck
Gets the mode transition animation duration for @self.
the mode transition duration, in milliseconds.
a deck
Gets whether a transition is currently running for @self.
whether a transition is currently running
a deck
Gets the type of animation used for transitions between children.
the current transition type of @self
a deck
Gets the visible child widget.
the visible child widget
a deck
Gets the name of the currently visible child widget.
the name of the visible child
a deck
Inserts @child in the position after @sibling in the list of children.
If @sibling is `NULL`, inserts @child at the first position.
a deck
the widget to insert
the sibling after which to insert @child
Navigates to the previous or next child.
The switch is similar to performing a swipe gesture to go in @direction.
whether the visible child was changed
a deck
the direction
Inserts @child at the first position in @self.
a deck
the widget to prepend
Moves @child to the position after @sibling in the list of children.
If @sibling is `NULL`, move @child to the first position.
a deck
the widget to move, must be a child of @self
the sibling to move @child after
Sets whether swipe gestures for navigating backward are enabled.
a deck
the new value
Sets whether swipe gestures for navigating forward are enabled.
a deck
the new value
Sets whether @self is homogeneous for a given orientation.
If set to `FALSE`, different children can have different size along the
opposite orientation.
a deck
the orientation
`TRUE` to make @self homogeneous
Sets whether @self will interpolate its size when changing the visible child.
@self will interpolate its size between the current one and the one it'll
take after changing the visible child, according to the set transition
duration.
a deck
the new value
Sets the mode transition animation duration for @self.
a deck
the new duration, in milliseconds
Sets the type of animation used for transitions between children.
The transition type can be changed without problems at runtime, so it is
possible to change the animation based on the child that is about to become
current.
a deck
the new transition type
Sets the currently visible widget.
a deck
the new child
Makes the child with the name @name visible.
See [method@Deck.set_visible_child] for more details.
a deck
the name of a child
Whether swipe gestures allow switching to the previous child.
Whether swipe gestures allow switching to the next child.
Horizontally homogeneous sizing.
Whether or not the size should smoothly change when changing between
differently sized children.
The transition animation duration, in milliseconds.
Whether or not the transition is currently running.
The type of animation that will be used for transitions between children.
The transition type can be changed without problems at runtime, so it is
possible to change the animation based on the child that is about to become
current.
Vertically homogeneous sizing.
The widget currently visible.
The transition is determined by [property@Deck:transition-type] and
[property@Deck:transition-duration]. The transition can be cancelled by the
user, in which case visible child will change back to the previously
visible child.
The name of the widget currently visible.
the parent class
Describes the possible transitions in a [class@Deck] widget.
New values may be added to this enumeration over time.
Cover the old page or uncover the new page,
sliding from or towards the end according to orientation, text direction
and children order
Uncover the new page or cover the old page,
sliding from or towards the start according to orientation, text direction
and children order
Slide from left, right, up or down according
to the orientation, text direction and the children order
An object representing an [struct@GObject.EnumValue].
The `HdyEnumValueObject` object represents a [struct@GObject.EnumValue],
allowing it to be used with [iface@Gio.ListModel].
Creates a new `HdyEnumValueObject`.
the newly created `HdyEnumValueObject`
Gets the name of @self.
the name of @self
an enum value object
Gets the nick of @self.
the nick of @self
an enum value object
Gets the value of @self.
the value of @self
an enum value object
A [class@Gtk.ListBoxRow] used to reveal widgets.
The `HdyExpanderRow` widget allows the user to reveal or hide widgets below
it. It also allows the user to enable the expansion of the row, allowing to
disable all that the row contains.
## HdyExpanderRow as GtkBuildable
The `HdyExpanderRow` implementation of the [iface@Gtk.Buildable] interface
supports adding a child as an action widget by specifying “action” as the
“type” attribute of a <child> element.
It also supports adding it as a prefix widget by specifying “prefix” as the
“type” attribute of a <child> element.
## CSS nodes
`HdyExpanderRow` has a main CSS node with name `row`, and the `.expander`
style class. It has the `.empty` style class when it contains no children.
It contains the subnodes `row.header` for its main embedded row,
`list.nested` for the list it can expand, and `image.expander-row-arrow` for
its arrow.
When expanded, `HdyExpanderRow` will add the
`.checked-expander-row-previous-sibling` style class to its previous sibling,
and remove it when retracted.
Creates a new `HdyExpanderRow`.
the newly created `HdyExpanderRow`
Adds an action widget to @self.
a expander row
the action widget
Adds a prefix widget to @self.
a expander row
the prefix widget
Gets whether the expansion of @self is enabled.
whether the expansion of @self is enabled
a expander row
Gets the icon name for @self.
the icon name for @self
a expander row
Gets whether the switch enabling the expansion of @self is visible.
whether the switch enabling the expansion of @self is visible
a expander row
Gets the subtitle for @self.
the subtitle for @self
a expander row
Gets whether an embedded underline in the title or subtitle labels indicates
a mnemonic.
whether an embedded underlines indicates a mnemonic
a expander row
Sets whether the expansion of @self is enabled.
a expander row
`TRUE` to enable the expansion
Sets the icon name for @self.
a expander row
the icon name
Sets whether the switch enabling the expansion of @self is visible.
a expander row
`TRUE` to show the switch enabling the expansion
Sets the subtitle for @self.
a expander row
the subtitle
Sets whether an embedded underline in the title or subtitle labels indicates
a mnemonic.
a expander row
`TRUE` if underlines in the text indicate mnemonics
Whether expansion is enabled.
Whether the row is expanded.
The icon name for this row.
Whether the switch enabling the expansion is visible.
The subtitle for this row.
Whether an embedded underline in the title or subtitle labels indicates a
mnemonic.
the parent class
An adaptive container acting like a box or an overlay.
The `HdyFlap` widget can display its children like a [class@Gtk.Box] does or
like a [class@Gtk.Overlay] does, according to the
[property@Flap:fold-policy] value.
`HdyFlap` has at most three children: [property@Flap:content],
[property@Flap:flap] and [property@Flap:separator]. Content is the primary
child, flap is displayed next to it when unfolded, or overlays it when
folded. Flap can be shown or hidden by changing the
[property@Flap:reveal-flap] value, as well as via swipe gestures if
[property@Flap:swipe-to-open] and/or [property@Flap:swipe-to-close] are set
to `TRUE`.
Optionally, a separator can be provided, which would be displayed between the
content and the flap when there's no shadow to separate them, depending on
the transition type.
[property@Flap:flap] is transparent by default; add the `.background` style
class to it if this is unwanted.
If [property@Flap:modal] is set to `TRUE`, content becomes completely
inaccessible when the flap is revealed while folded.
The position of the flap and separator children relative to the content is
determined by orientation, as well as the [property@Flap:flap-position]
value.
Folding the flap will automatically hide the flap widget, and unfolding it
will automatically reveal it. If this behavior is not desired, the
[property@Flap:locked] property can be used to override it.
Common use cases include sidebars, header bars that need to be able to
overlap the window content (for example, in fullscreen mode) and bottom
sheets.
## HdyFlap as GtkBuildable
The `HdyFlap` implementation of the [iface@Gtk.Buildable] interface supports
setting the flap child by specifying “flap” as the “type” attribute of a
<child> element, and separator by specifying “separator”. Specifying
“content” child type or omitting it results in setting the content child.
## CSS nodes
`HdyFlap` has a single CSS node with name `flap`. The node will get the style
classes `.folded` when it is folded, and `.unfolded` when it's not.
Creates a new `HdyFlap`.
the newly created `HdyFlap`
Gets the content widget for @self
the content widget for @self
a flap
Gets the flap widget for @self
the flap widget for @self
a flap
Gets the flap position for @self.
the flap position for @self
a flap
Gets the amount of time that fold transitions will take.
the fold transition duration, in milliseconds
a flap
Gets the current fold policy of @self.
the current fold policy of @self
a flap
Gets whether @self is currently folded.
`TRUE` if @self is currently folded
a flap
Gets whether @self is locked.
whether @self is locked
a flap
Gets whether the @self is modal.
whether @self is modal
a flap
Gets the amount of time that reveal transitions will take.
the reveal transition duration, in milliseconds
a flap
Gets whether the flap widget is revealed for @self.
whether flap widget is revealed
a flap
Gets the current reveal transition progress for @self.
the current reveal progress for @self
a flap
Gets the separator widget for @self.
the separator widget for @self
a flap
Gets whether @self can be closed with a swipe gesture.
`TRUE` if @self can be closed with a swipe gesture
a flap
Gets whether @self can be opened with a swipe gesture.
`TRUE` if @self can be opened with a swipe gesture
a flap
Gets the type of animation used for reveal and fold transitions in @self.
the current transition type of @self
a flap
Sets the content widget for @self.
It is always displayed when unfolded, and partially visible when folded.
a flap
the content widget
Sets the flap widget for @self.
a flap
the flap widget
Sets the flap position for @self.
a flap
the new value
Sets the duration that fold transitions will take.
a flap
the new duration, in milliseconds
Sets the current fold policy for @self.
a flap
a fold policy
Sets whether @self is locked.
If `FALSE`, folding @self when the flap is revealed automatically closes it,
and unfolding it when the flap is not revealed opens it. If `TRUE`,
[property@Flap:reveal-flap] value never changes on its own.
a flap
the new value
Sets whether the @self can be closed with a click.
If @modal is `TRUE`, clicking the content widget while flap is revealed, or
pressing the <kbd>Esc</kbd> key, will close the flap. If `FALSE`, clicks are
passed through to the content widget.
a flap
whether @self can be closed with a click
Sets the duration that reveal transitions in @self will take.
a flap
the new duration, in milliseconds
Sets whether the flap widget is revealed for @self.
a flap
`TRUE` to reveal the flap widget, `FALSE` otherwise
Sets the separator widget for @self.
a flap
the separator widget
Sets whether @self can be closed with a swipe gesture.
The area that can be swiped depends on the [property@Flap:transition-type] value.
a flap
whether @self can be closed with a swipe gesture
Sets whether @self can be opened with a swipe gesture.
The area that can be swiped depends on the [property@Flap:transition-type]
value.
a flap
whether @self can be opened with a swipe gesture
Sets the type of animation used for reveal and fold transitions in @self.
a flap
the new transition type
The content widget.
It's always displayed when unfolded, and partially visible
when folded.
The flap widget.
It's only visible when [property@Flap:reveal-progress] is greater than 0.
The flap position.
If `GTK_PACK_START`, the flap is displayed before the content, if
`GTK_PACK_END`, it's displayed after the content.
The fold transition animation duration, in milliseconds.
The current fold policy.
See [enum@FlapFoldPolicy] for available policies.
Whether the flap is currently folded.
See [property@Flap:fold-policy].
Whether the flap is locked.
If `FALSE`, folding when the flap is revealed automatically closes it, and
unfolding it when the flap is not revealed opens it. If `TRUE`,
[property@Flap:reveal-flap] value never changes on its own.
Whether the flap is modal.
If `TRUE`, clicking the content widget while flap is revealed, as well as
pressing the <kbd>Esc</kbd> key, will close the flap. If `FALSE`, clicks
are passed through to the content widget.
The reveal transition animation duration, in milliseconds.
Whether the flap widget is revealed.
The current reveal transition progress.
0 means fully hidden, 1 means fully revealed. See
[property@Flap:reveal-flap].
The separator widget.
It's displayed between content and flap when there's no shadow to display.
When exactly it's visible depends on the [property@Flap:transition-type]
value. If `NULL`, no separator will be used.
Whether the flap can be closed with a swipe gesture.
The area that can be swiped depends on the [property@Flap:transition-type]
value.
Whether the flap can be opened with a swipe gesture.
The area that can be swiped depends on the [property@Flap:transition-type]
value.
the type of animation used for reveal and fold transitions.
[property@Flap:flap] is transparent by default, which means the content
will be seen through it with `HDY_FLAP_TRANSITION_TYPE_OVER` transitions;
add the `.background` style class to it if this is unwanted.
Describes the possible folding behavior of a [class@Flap] widget.
Disable folding, the flap cannot reach narrow
sizes.
Keep the flap always folded.
Fold and unfold the flap based on available
space.
Describes transitions types of a [class@Flap] widget.
These enumeration values describe the possible transitions between children
in a [class@Flap] widget, as well as which areas can be swiped via
[property@Flap:swipe-to-open] and [property@Flap:swipe-to-close].
New values may be added to this enum over time.
The flap slides over the content, which is
dimmed. When folded, only the flap can be swiped.
The content slides over the flap. Only the
content can be swiped.
The flap slides offscreen when hidden,
neither the flap nor content overlap each other. Both widgets can be
swiped.
A title bar widget.
`HdyHeaderBar` is similar to [class@Gtk.HeaderBar] but is designed to fix
some of its shortcomings for adaptive applications.
`HdyHeaderBar` doesn't force the custom title widget to be vertically
centered, hence allowing it to fill up the whole height, which is e.g. needed
for [class@ViewSwitcher].
When used in a mobile dialog, `HdyHeaderBar` will replace its window
decorations by a back button allowing to close it. It doesn't have to be its
direct child and you can use any complex contraption you like as the dialog's
titlebar.
`HdyHeaderBar` can be used in window's content area rather than titlebar, and
will still be draggable and will handle right click, middle click and double
click as expected from a titlebar. This is particularly useful with
[class@Window] or [class@ApplicationWindow].
## CSS nodes
`HdyHeaderBar` has a single CSS node with name `headerbar`.
Creates a new `HdyHeaderBar`.
the newly created `HdyHeaderBar`.
Gets the policy @self follows to horizontally align its center widget.
the centering policy
a header bar
Retrieves the custom title widget of the header.
the custom title widget of the header
a header bar
Gets the decoration layout.
the decoration layout
a header bar
Gets whether space is reserved for a subtitle, regardless if one is currently
set or not.
`TRUE` if the header bar reserves space for a subtitle
a header bar
Gets whether @self should interpolate its size on visible child change.
whether @self interpolates its size on visible child change
a header bar
Gets whether this header bar shows the standard window decorations.
whether decorations are shown
a header bar
Gets the subtitle of the header.
the subtitle of the header
a header bar
Retrieves the title of the header.
the title of the header.
a header bar
Gets the amount of time that transitions between pages will take.
the transition duration, in milliseconds
a header bar
Gets whether the @self is currently in a transition from one page to another.
whether the transition is currently running
a header bar
Adds @child to @self, packed with reference to the end of the @self.
a header bar
the widget to be added to @self
Adds @child to @self, packed with reference to the start of the @self.
a header bar
the widget to be added to @self
Sets the policy @self must follow to horizontally align its center widget.
a header bar
the centering policy
Sets a custom title for the header bar.
The title should help a user identify the current view. This supersedes any
title set by [method@HeaderBar.set_title] or [method@HeaderBar.set_subtitle].
To achieve the same style as the builtin title and subtitle, use the `.title`
and `.subtitle` style classes.
You should set the custom title to `NULL`, for the header title label to be
visible again.
a header bar
a custom widget to use for a title
Sets the decoration layout for this header bar.
a header bar
a decoration layout
Sets whether space is reserved for a subtitle, even if none is currently set.
a header bar
`TRUE` to reserve space for a subtitle
Sets whether @self should interpolate its size on visible child change.
a header bar
`TRUE` to interpolate the size
Sets whether this header bar shows the standard window decorations.
a header bar
`TRUE` to show standard window decorations
Sets the subtitle of the header bar.
The title should give a user an additional detail to help them identify the
current view.
Note that [class@HeaderBar] by default reserves room for the subtitle, even
if none is currently set. If this is not desired, set the
[property@HeaderBar:has-subtitle] property to `FALSE`.
a header bar
a subtitle
Sets the title of the [class@HeaderBar].
The title should help a user identify the current view. A good title should
not include the application name.
a header bar
a title
Sets the duration that transitions between pages will take.
a header bar
the new duration, in milliseconds
The policy for aligning the center widget.
Custom title widget to display.
The decoration layout for buttons.
If this property is not set, the
[property@Gtk.Settings:gtk-decoration-layout] setting is used.
There can be valid reasons for overriding the setting, such as a header bar
design that does not allow for buttons to take room on the right, or only
offers room for a single close button. Split header bars are another example
for overriding the setting.
The format of the string is button names, separated by commas. A colon
separates the buttons that should appear on the start from those on the
end. Recognized button names are minimize, maximize, close, icon (the
window icon) and menu (a menu button for the fallback app menu).
For example, “menu:minimize,maximize,close” specifies a menu on the left, and
minimize, maximize and close buttons on the right.
Whether [property@HeaderBar:decoration-layout] is set.
Whether to reserve space for a subtitle, even if none is currently set.
Whether the size should smoothly change when changing between children.
If `TRUE`, the header bar will interpolate its size between the one of the
previous visible child and the one of the new visible child, according to
the set transition duration and the orientation, e.g. if the orientation is
horizontal, it will interpolate the its height.
Whether to show window decorations.
Which buttons are actually shown and where is determined by the
[property@HeaderBar:decoration-layout] property, and by the state of the
window (e.g. a close button will not be shown if the window can't be
closed).
The amount of space between children.
The subtitle to display.
The title to display.
The transition duration, in milliseconds.
Whether or not the transition is currently running.
the parent class
An object handling composite title bars.
The `HdyHeaderGroup` object handles the header bars of a composite title bar.
It splits the window decoration across the header bars, giving the left side
of the decorations to the leftmost header bar, and the right side of the
decorations to the rightmost header bar. See
[method@HeaderBar.set_decoration_layout].
The [property@HeaderGroup:decorate-all] property can be used in conjunction
with [property@Leaflet:folded] when the title bar is split across the pages
of a [class@Leaflet] to automatically display the decorations on all the
pages when the leaflet is folded.
You can nest header groups, which is convenient when you nest leaflets too:
```xml
<object class="HdyHeaderGroup" id="inner_header_group">
<property name="decorate-all" bind-source="inner_leaflet" bind-property="folded" bind-flags="sync-create"/>
<headerbars>
<headerbar name="inner_header_bar_1"/>
<headerbar name="inner_header_bar_2"/>
</headerbars>
</object>
<object class="HdyHeaderGroup" id="outer_header_group">
<property name="decorate-all" bind-source="outer_leaflet" bind-property="folded" bind-flags="sync-create"/>
<headerbars>
<headerbar name="inner_header_group"/>
<headerbar name="outer_header_bar"/>
</headerbars>
</object>
```
Creates a new `HdyHeaderGroup`.
the newly created `HdyHeaderGroup`
Adds @header_bar to @self.
When the widget is destroyed or no longer referenced elsewhere, it will be
removed from the header group.
a header group
the header bar to add
Adds @header_bar to @self.
When the widget is destroyed or no longer referenced elsewhere, it will be
removed from the header group.
a header group
the header bar to add
Adds @header_group to @self.
When the nested group is no longer referenced elsewhere, it will be removed
from the header group.
a header group
the header group to add
Returns the list of children associated with @self.
the list of
children
a header group
Gets whether the elements of the group should all receive the full
decoration.
whether the elements of the group should all receive the full
decoration
a header group
Removes @child from @self.
a header group
the header group child to remove
Removes @header_bar from @self.
a header group
the header bar to remove
Removes @header_bar from @self.
a header group
the header bar to remove
Removes a nested `HdyHeaderGroup` from @self.
a header group
the header group to remove
Sets whether the elements of the group should all receive the full
decoration.
a header group
whether the elements of the group should all receive the full
decoration
Whether the elements of the group should all receive the full decoration.
This is useful in conjunction with [property@Leaflet:folded] when the
leaflet contains the header bars of the group, as you want them all to
display the complete decoration when the leaflet is folded.
This signal is emitted before updating the decoration layouts.
A child object for [class@HeaderGroup].
Gets the child type.
the child type
a header group child
Gets the child [class@Gtk.HeaderBar].
Use [method@HeaderGroupChild.get_child_type] to check the child type.
the child header bar
a header group child
Gets the child [class@HeaderBar].
Use [method@HeaderGroupChild.get_child_type] to check the child type.
the child headerbar
a header group child
Gets the child [class@HeaderGroup].
Use [method@HeaderGroupChild.get_child_type] to check the child type.
the child header bar
a header group child
Describes the child types handled by [class@HeaderGroup].
New values may be added to this enumeration over time.
The child is a [class@HeaderBar]
The child is a
[class@Gtk.HeaderBar]
The child is a
[class@HeaderGroup]
A keypad for dialing numbers
The `HdyKeypad` widget is a keypad for entering numbers such as phone numbers
or PIN codes.
## CSS nodes
`HdyKeypad` has a single CSS node with name `keypad`.
Creates a new `HdyKeypad`.
the newly created `HdyKeypad`
whether the hash, plus, and asterisk symbols should be visible
whether the letters below the digits should be visible
Returns the amount of space between the columns of @self.
the column spacing of @self
a keypad
Gets the widget for the lower right corner (or left, in RTL locales).
the end action widget
a keypad
Gets the connected entry.
the entry set
a keypad
Gets whether standard letters are displayed below the digits on the buttons.
whether the letters below the digits should be visible
a keypad
Returns the amount of space between the rows of @self.
the row spacing of @self
a keypad
Gets the widget for the lower left corner (or right, in RTL locales).
the start action widget
a keypad
Gets whether symbols are displayed.
whether symboles are visible
a keypad
Sets the amount of space between columns of @self.
a keypad
the amount of space to insert between columns
Sets the widget for the lower right corner (or left, in RTL locales).
a keypad
the end action widget
Binds @entry to @self.
a keypad
an entry
Sets whether standard letters are displayed below the digits on the buttons.
a keypad
whether the letters below the digits should be visible
Sets the amount of space between rows of @self.
a keypad
the amount of space to insert between rows
Sets the widget for the lower left corner (or right, in RTL locales).
a keypad
the start action widget
Sets whether standard letters are displayed below the digits on the buttons.
a keypad
whether the hash, plus, and asterisk symbols should be visible
The amount of space between two consecutive columns.
The widget for the lower end corner of @self.
The entry widget connected to the keypad.
The entry will block any input not possible to type with the keypad.
Whether standard letters should be displayed below the digits on the
buttons.
The amount of space between two consecutive rows.
The widget for the lower start corner of @self.
Whether to display symbols.
This includes hash and asterisk buttons, and the plus symbol at the bottom
of its 0 button.
the parent class
An adaptive container acting like a box or a stack.
The `HdyLeaflet` widget can display its children like a [class@Gtk.Box] does
or like a [class@Gtk.Stack] does, adapting to size changes by switching
between the two modes.
When there is enough space the children are displayed side by side, otherwise
only one is displayed and the leaflet is said to be “folded”. The threshold
is dictated by the preferred minimum sizes of the children. When a leaflet is
folded, the children can be navigated using swipe gestures.
The “over” and “under” transition types stack the children one on top of the
other, while the “slide” transition puts the children side by side. While
navigating to a child on the side or below can be performed by swiping the
current child away, navigating to an upper child requires dragging it from
the edge where it resides. This doesn't affect non-dragging swipes.
The “over” and “under” transitions can draw their shadow on top of the
window's transparent areas, like the rounded corners. This is a side-effect
of allowing shadows to be drawn on top of OpenGL areas. It can be mitigated
by using [class@Window] or [class@ApplicationWindow] as they will crop
anything drawn beyond the rounded corners.
The child property `navigatable` can be set on `HdyLeaflet` children to
determine whether they can be navigated to when folded. If `FALSE`, the child
will be ignored by [method@Leaflet.get_adjacent_child],
[method@Leaflet.navigate], and swipe gestures. This can be used used to
prevent switching to widgets like separators.
## CSS nodes
`HdyLeaflet` has a single CSS node with name `leaflet`. The node will get the
style classes `.folded` when it is folded, `.unfolded` when it's not, or none
if it didn't compute its fold yet.
Creates a new `HdyLeaflet`.
the newly created `HdyLeaflet`
Finds the previous or next navigatable child.
This will be the same widget [method@Leaflet.navigate] will navigate to.
If there's no child to navigate to, `NULL` will be returned instead.
the previous or next child
a leaflet
the direction
Gets whether swipe gestures switch to the previous navigatable child.
`TRUE` if back swipe is enabled
a leaflet
Gets whether swipe gestures switch to the next navigatable child.
`TRUE` if forward swipe is enabled
a leaflet
Finds the child of @self with the name given as the argument.
Returns `NULL` if there is no child with this name.
the requested child of @self
a leaflet
the name of the child to find
Gets the amount of time that transitions between children will take.
the child transition duration, in milliseconds
a leaflet
Returns whether @self is currently in a transition from one page to another.
whether a transition is currently running
a leaflet
Gets whether @self is folded.
whether @self is folded
a leaflet
Gets whether @self is homogeneous for the given fold and orientation.
whether @self is homogeneous for the given fold and orientation
a leaflet
the fold
the orientation
Gets whether to interpolate between the sizes of children on page switches.
`TRUE` if child sizes are interpolated
a leaflet
Gets the amount of time that transitions between modes in @self will take.
the mode transition duration, in milliseconds
a leaflet
Gets the animation type that will be used for transitions between modes and
children.
the current transition type of @self
a leaflet
Gets the visible child widget.
the visible child widget
a leaflet
Gets the name of the currently visible child widget.
the name of the visible child
a leaflet
Inserts @child in the position after @sibling in the list of children.
If @sibling is `NULL`, inserts @child at the first position.
a leaflet
the widget to insert
the sibling after which to insert @child
Navigates to the previous or next navigatable child.
The switch is similar to performing a swipe gesture to go in @direction.
whether the visible child was changed
a leaflet
the direction
Inserts @child at the first position in @self.
a leaflet
the widget to prepend
Moves @child to the position after @sibling in the list of children.
If @sibling is `NULL`, move @child to the first position.
a leaflet
the widget to move, must be a child of @self
the sibling to move @child after
Sets whether swipe gestures switch to the previous navigatable child.
a leaflet
the new value
Sets whether swipe gestures switch to the next navigatable child.
a leaflet
the new value
Sets the duration that transitions between children in @self will take.
a leaflet
the new duration, in milliseconds
Sets whether to be homogeneous for the given fold and orientation.
If it is homogeneous, the [class@Leaflet] will request the same
width or height for all its children depending on the orientation. If it
isn't and it is folded, the leaflet may change width or height when a
different child becomes visible.
a leaflet
the fold
the orientation
`TRUE` to make @self homogeneous
Sets whether @self will interpolate its size when changing the visible child.
If the [property@Leaflet:interpolate-size] property is set to `TRUE`, @self
will interpolate its size between the current one and the one it'll take
after changing the visible child, according to the set transition duration.
a leaflet
the new value
Sets the duration that transitions between modes in @self will take.
a leaflet
the new duration, in milliseconds
Sets the animation type that will be used for transitions between modes and
children.
The transition type can be changed without problems at runtime, so it is
possible to change the animation based on the mode or child that is about to
become current.
a leaflet
the new transition type
Sets the currently visible widget when the leaflet is folded.
a leaflet
the new child
Makes the child with the name @name visible.
See [method@Leaflet.set_visible_child] for more details.
a leaflet
the name of a child
Whether swipe gestures allow switching to the previous navigatable child.
Whether swipe gestures allow switching to the next navigatable child.
The child transition animation duration, in milliseconds.
Whether a child transition is currently running.
Whether the leaflet is folded.
The leaflet will be folded if the size allocated to it is smaller than the
sum of the natural size of its children, it will be unfolded otherwise.
Whether to allocate the same width for all children when folded.
Whether to allocate the same width for all children when unfolded.
Whether the size should smoothly change when changing between children.
The mode transition animation duration, in milliseconds.
The animation type used for transitions between modes and children.
The transition type can be changed without problems at runtime, so it is
possible to change the animation based on the mode or child that is about
to become current.
Whether to allocates the same height for all children when folded.
Whether to allocate the same height for all children when unfolded.
The widget currently visible when the leaflet is folded.
The transition is determined by [property@Leaflet:transition-type] and
[property@Leaflet:child-transition-duration]. The transition can be
cancelled by the user, in which case visible child will change back to the
previously visible child.
The name of the widget currently visible when the leaflet is folded.
See [property@Leaflet:visible-child].
the parent class
Describes the possible transitions in a [class@Leaflet] widget.
New values may be added to this enumeration over time.
Cover the old page or uncover the new
page, sliding from or towards the end according to orientation, text
direction and children order
Uncover the new page or cover the old
page, sliding from or towards the start according to orientation, text
direction and children order
Slide from left, right, up or down
according to the orientation, text direction and the children order
Describes the direction of a swipe navigation gesture.
Corresponds to start or top, depending on
orientation and text direction
Corresponds to end or bottom, depending on
orientation and text direction
A group of preference rows.
A `HdyPreferencesGroup` represents a group or tightly related preferences,
which in turn are represented by [class@PreferencesRow].
To summarize the role of the preferences it gathers, a group can have both a
title and a description. The title will be used by [class@PreferencesWindow]
to let the user look for a preference.
## CSS nodes
`HdyPreferencesGroup` has a single CSS node with name `preferencesgroup`.
Creates a new `HdyPreferencesGroup`.
the newly created `HdyPreferencesGroup`
the description of @self
a preferences group
Gets the title of @self.
the title of @self
a preferences group
Gets whether @self uses markup for the title and description.
whether @self uses markup for its labels
a preferences group
Sets the description for @self.
a preferences group
the description
Sets the title for @self.
a preferences group
the title
Sets whether @self uses markup for the title and description.
a preferences group
whether to use markup
The description for this group of preferences.
The title for this group of preferences.
Whether to use markup for the title and description.
the parent class
A page from [class@PreferencesWindow].
The `HdyPreferencesPage` widget gathers preferences groups into a single page
of a preferences window.
## CSS nodes
`HdyPreferencesPage` has a single CSS node with name `preferencespage`.
Creates a new `HdyPreferencesPage`.
the newly created `HdyPreferencesPage`
Gets the icon name for @self.
the icon name for @self
a preferences page
Gets the title of @self.
the title of the @self
a preferences page
Sets the icon name for @self.
a preferences page
the icon name
Sets the title of @self.
a preferences page
the title of the page
The icon name for this page of preferences.
The title for this page of preferences.
the parent class
A [class@Gtk.ListBoxRow] used to present preferences.
The `HdyPreferencesRow` widget has a title that [class@PreferencesWindow]
will use to let the user look for a preference. It doesn't present the title
in any way and lets you present the preference as you please.
[class@ActionRow] and its derivatives are convenient to use as preference
rows as they take care of presenting the preference's title while letting you
compose the inputs of the preference around it.
Creates a new `HdyPreferencesRow`.
the newly created `HdyPreferencesRow`
Gets the title of the preference represented by @self.
the title of the preference represented
by @self
a preferences row
Gets whether an embedded underline in the title indicates a mnemonic.
whether an embedded underline in the title indicates a mnemonic
a preferences row
Sets the title of the preference represented by @self.
a preferences row
the title
Sets whether an embedded underline in the title indicates a mnemonic.
a preferences row
`TRUE` if underlines in the text indicate mnemonics
The title of the preference represented by this row.
Whether an embedded underline in the title indicates a mnemonic.
the parent class
A window to present an application's preferences.
The `HdyPreferencesWindow` widget presents an application's preferences
gathered into pages and groups. The preferences are searchable by the user.
## CSS nodes
`HdyPreferencesWindow` has a main CSS node with the name `window` and the
style class `.preferences`.
Creates a new `HdyPreferencesWindow`.
the newly created `HdyPreferencesWindow`
Closes the current subpage.
If there is no presented subpage, this does nothing.
a preferences window
Gets whether swipe gestures allow switching from a subpage to the
preferences.
`TRUE` if back swipe is enabled
a preferences window
Gets whether search is enabled for @self.
whether search is enabled for @self
a preferences window
Sets @subpage as the window's subpage and opens it.
The transition can be cancelled by the user, in which case visible child will
change back to the previously visible child.
a preferences window
the subpage
Sets whether swipe gestures allow switching from a subpage to the
preferences.
a preferences window
the new value
Sets whether search is enabled for @self.
a preferences window
`TRUE` to enable search, `FALSE` to disable it
Whether the window allows closing the subpage via a swipe gesture.
Whether search is enabled.
the parent class
A toolbar to integrate a search entry with.
`HdySearchBar` is a container made to have a search entry (possibly with
additional connex widgets, such as drop-down menus, or buttons) built-in. The
search bar would appear when a search is started through typing on the
keyboard, or the application’s search mode is toggled on.
For keyboard presses to start a search, events will need to be forwarded from
the top-level window that contains the search bar. See
[method@SearchBar.handle_event] for example code. Common shortcuts such as
<kbd>Ctrl</kbd>+<kbd>F</kbd> should be handled as an application action, or
through the menu items.
You will also need to tell the search bar about which entry you are using as
your search entry using [method@SearchBar.connect_entry]. The following
example shows you how to create a more complex search entry.
`HdySearchBar` is very similar to [class@Gtk.SearchBar], the main difference
being that it allows the search entry to fill all the available space. This
allows you to control your search entry's width with a [class@Clamp].
## CSS nodes
`HdySearchBar` has a single CSS node with name `searchbar`.
Creates a new `HdySearchBar.
You will need to tell it about which widget is going to be your text entry
using [method@SearchBar.connect_entry].
the newly created `HdySearchBar`
Sets the entry widget passed as the one to be used in this search bar.
The entry should be a descendant of the search bar. This is only required if
the entry isn’t the direct child of the search bar (as in our main example).
a search bar
an entry
Gets whether the search mode is on.
whether search mode is toggled on
a search bar
Gets whether the close button is shown.
whether the close button is shown
a search bar
Handles key press events.
This function should be called when the top-level window which contains the
search bar received a key event.
If the key event is handled by the search bar, the bar will be shown, the
entry populated with the entered text and `GDK_EVENT_STOP` will be returned.
The caller should ensure that events are not propagated further.
If no entry has been connected to the search bar, using
[method@SearchBar.connect_entry], this function will return immediately with
a warning.
## Showing the search bar on key presses
```c
static gboolean
on_key_press_event (GtkWidget *widget,
GdkEvent *event,
gpointer user_data)
{
HdySearchBar *bar = HDY_SEARCH_BAR (user_data);
return hdy_search_bar_handle_event (self, event);
}
static void
create_toplevel (void)
{
GtkWidget *window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
GtkWindow *search_bar = hdy_search_bar_new ();
// Add more widgets to the window...
g_signal_connect (window,
"key-press-event",
G_CALLBACK (on_key_press_event),
search_bar);
}
```
`GDK_EVENT_STOP` if the key press event resulted in text being
entered in the search entry (and revealing the search bar if necessary),
`GDK_EVENT_PROPAGATE` otherwise.
a search bar
a [struct@Gdk.Event] containing key press events
Switches the search mode on or off.
a search bar
the new state of the search mode
Shows or hides the close button.
Applications that already have a “search” toggle button should not show a
close button in their search bar, as it duplicates the role of the toggle
button.
a search bar
whether the close button will be shown or not
Whether the search mode is on and the search bar shown.
Whether to show the close button in the toolbar.
A best fit container.
The `HdySqueezer` widget is a container which only shows the first of its
children that fits in the available size. It is convenient to offer different
widgets to represent the same data with different levels of detail, making
the widget seem to squeeze itself to fit in the available space.
Transitions between children can be animated as fades. This can be controlled
with [method@Squeezer.set_transition_type].
## CSS nodes
`HdySqueezer` has a single CSS node with name `squeezer`.
Creates a new `HdySqueezer`.
the newly created `HdySqueezer`
Gets whether @child is enabled.
See [method@Squeezer.set_child_enabled].
whether @child is enabled
a squeezer
a child of @self
Gets whether @self is homogeneous.
whether @self is homogeneous
a squeezer
Gets whether @self should interpolate its size on visible child change.
whether @self interpolates its size on visible child change
a squeezer
Gets the amount of time that transitions between children will take.
the transition duration, in milliseconds
a squeezer
Gets whether a transition is currently running for @self.
whether a transition is currently running
a squeezer
Gets the animation type that will be used for transitions between children.
the current transition type of @self
a squeezer
Gets the currently visible child of @self.
the visible child
a squeezer
Gets the horizontal alignment.
the xalign property
a squeezer
Gets the vertical alignment.
the yalign property
a squeezer
Sets whether @child is enabled.
If a child is disabled, it will be ignored when looking for the child fitting
the available size best. This allows to programmatically and prematurely hide
a child of @self even if it fits in the available space.
This can be used e.g. to ensure a certain child is hidden below a certain
window width, or any other constraint you find suitable.
a squeezer
a child of @self
whether to enable the child
Sets whether all children have the same size for the opposite orientation.
a squeezer
`TRUE` to make @self homogeneous
Sets whether @self should interpolate its size on visible child change.
a squeezer
`TRUE` to interpolate the size
Sets the duration that transitions between children in @self will take.
a squeezer
the new duration, in milliseconds
Sets the animation type that will be used for transitions between children.
a squeezer
the new transition type
Sets the horizontal alignment.
a squeezer
the new xalign value, between 0 and 1
Sets the vertical alignment.
a squeezer
the new yalign value, between 0 and 1
Whether all children have the same size for the opposite orientation.
For example, if a squeezer is horizontal and is homogeneous, it will request
the same height for all its children. If it isn't, the squeezer may change
size when a different child becomes visible.
Whether the squeezer interpolates its size when changing the visible child.
If `TRUE`, the squeezer will interpolate its size between the one of the
previous visible child and the one of the new visible child, according to
the set transition duration and the orientation, e.g. if the squeezer is
horizontal, it will interpolate the its height.
The animation duration, in milliseconds.
Whether a transition is currently running.
The type of animation used for transitions between children.
Available types include various kinds of fades and slides.
The transition type can be changed without problems at runtime, so it is
possible to change the animation based on the child that is about to become
current.
The currently visible child.
The horizontal alignment, from 0 (start) to 1 (end).
The xalign property determines the horizontal alignment of the children
inside the squeezer's size allocation. Compare this to
[property@Gtk.Widget:halign], which determines how the squeezer's size
allocation is positioned in the space available for the squeezer.
This will affect the position of children too wide to fit in the squeezer
as they are fading out.
The vertical alignment, from 0 (start) to 1 (end).
The yalign property determines the vertical alignment of the children
inside the squeezer's size allocation. Compare this to
[property@Gtk.Widget:valign], which determines how the squeezer's size
allocation is positioned in the space available for the squeezer.
This will affect the position of children too tall to fit in the squeezer
as they are fading out.
Describes the possible transitions in a [class@Squeezer] widget.
No transition
A cross-fade
A page used for empty/error states and similar use-cases.
The `HdyStatusPage` widget can have an icon, a title, a description and a
custom widget which is displayed below them.
## CSS nodes
`HdyStatusPage` has a main CSS node with name `statuspage`.
Creates a new `HdyStatusPage`.
the newly created `HdyStatusPage`
Gets the description for @self.
the description for @self
a status page
Gets the icon name for @self.
the icon name for @self
a status page
Gets the title for @self.
the title for @self
a status page
Sets the description for @self.
a status page
the description
Sets the icon name for @self.
a status page
the icon name
Sets the title for @self.
a status page
the title
The description to be displayed below the title.
The name of the icon to be used.
The title to be displayed below the icon.
A class for managing application-wide styling.
`HdyStyleManager` provides a way to query and influence the application
styles, such as whether to use dark or high contrast appearance.
It allows to set the color scheme via the
[property@StyleManager:color-scheme] property, and to query the current
appearance, as well as whether a system-wide color scheme preference exists.
Important: [property@Gtk.Settings:gtk-application-prefer-dark-theme] should
not be used together with `HdyStyleManager` and will result in a warning.
Color schemes should be used instead.
Gets the default [class@StyleManager] instance.
It manages all [class@Gdk.Display] instances unless the style manager for
that display has an override.
See [func@StyleManager.get_for_display].
the default style manager
Gets the [class@StyleManager] instance managing @display.
It can be used to override styles for that specific display instead of the
whole application.
Most applications should use [func@StyleManager.get_default] instead.
the style manager for @display
a display
Gets the requested application color scheme.
the color scheme
a style manager
Gets whether the application is using dark appearance.
whether the application is using dark appearance
a style manager
Gets the display the style manager is associated with.
The display will be `NULL` for the style manager returned by
[func@StyleManager.get_default].
(nullable): the display
a style manager
Gets whether the application is using high contrast appearance.
whether the application is using high contrast appearance
a style manager
Gets whether the system supports color schemes.
whether the system supports color schemes
a style manager
Sets the requested application color scheme.
The effective appearance will be decided based on the application color
scheme and the system preferred color scheme. The
[property@StyleManager:dark] property can be used to query the current
effective appearance.
a style manager
the color scheme
The requested application color scheme.
The effective appearance will be decided based on the application color
scheme and the system preferred color scheme. The
[property@StyleManager:dark] property can be used to query the current
effective appearance.
The `HDY_COLOR_SCHEME_PREFER_LIGHT` color scheme results in the application
using light appearance unless the system prefers dark colors. This is the
default value.
The `HDY_COLOR_SCHEME_PREFER_DARK` color scheme results in the application
using dark appearance, but can still switch to the light appearance if the
system can prefers it, for example, when the high contrast preference is
enabled.
The `HDY_COLOR_SCHEME_FORCE_LIGHT` and `HDY_COLOR_SCHEME_FORCE_DARK` values
ignore the system preference entirely, they are useful if the application
wants to match its UI to its content or to provide a separate color scheme
switcher.
If a per-[class@Gdk.Display] style manager has its color scheme set to
`HDY_COLOR_SCHEME_DEFAULT`, it will inherit the color scheme from the
default style manager.
For the default style manager, `HDY_COLOR_SCHEME_DEFAULT` is equivalent to
`HDY_COLOR_SCHEME_FORCE_LIGHT`.
The [property@StyleManager:system-supports-color-schemes] property can be
used to check if the current environment provides a color scheme
preference.
Whether the application is using dark appearance.
This property can be used to query the current appearance, as requested via
[property@StyleManager:color-scheme].
The display the style manager is associated with.
The display will be `NULL` for the style manager returned by
[func@StyleManager.get_default].
Whether the application is using high contrast appearance.
This cannot be overridden by applications.
Whether the system supports color schemes.
This property can be used to check if the current environment provides a
color scheme preference. For example, applications might want to show a
separate appearance switcher if it's set to `FALSE`.
It's only set at startup and cannot change its value later.
See [property@StyleManager:color-scheme].
An object for syncing swipeable widgets.
The `HdySwipeGroup` object can be used to sync multiple swipeable widgets
that implement the [iface@Swipeable] interface, such as [class@Carousel], so
that animating one of them also animates all the other widgets in the group.
This can be useful for syncing widgets between a window's titlebar and
content area.
## HdySwipeGroup as GtkBuildable
`HdySwipeGroup` can be created in an UI definition. The list of swipeable
widgets is specified with a <swipeables> element containing multiple
<swipeable> elements with their ”name” attribute specifying the id of
the widgets.
```xml
<object class="HdySwipeGroup">
<swipeables>
<swipeable name="carousel1"/>
<swipeable name="carousel2"/>
</swipeables>
</object>
```
`HdySwipeGroup` has been deprecated, [class@Window] and
[class@ApplicationWindow] allow using a single leaflet for both content and
header bar, without the need to sync them.
Creates a new `HdySwipeGroup`.
the newly created `HdySwipeGroup`
Adds a swipeable to @self.
When the widget is destroyed or no longer referenced elsewhere, it will be
removed from the swipe group.
a swipe group
the [iface@Swipeable] to add
Gets the list of swipeables associated with @self.
a list of swipeables
a swipe group
Removes a widget from a [class@SwipeGroup].
a swipe group
the [iface@Swipeable] to remove
Swipe tracker used in [class@Carousel] and [class@Leaflet].
The `HdySwipeTracker` object can be used for implementing widgets with swipe
gestures. It supports touch-based swipes, pointer dragging, and touchpad
scrolling.
The widgets will probably want to expose [property@SwipeTracker:enabled]
property. If they expect to use horizontal orientation,
[property@SwipeTracker:reversed] property can be used for supporting RTL text
direction.
Creates a new `HdySwipeTracker` object on @widget.
the newly created `HdySwipeTracker`
a swipeable to add the tracker on
Whether to allow swiping for more than one snap point at a time.
If the value is `FALSE`, each swipe can only move to the adjacent snap
points.
whether long swipes are allowed
a swipe tracker
Get whether @self can be dragged with mouse pointer.
`TRUE` is mouse dragging is allowed
a swipe tracker
Get whether @self is enabled.
`TRUE` if @self is enabled
a swipe tracker
Get whether @self is reversing the swipe direction.
`TRUE` is the direction is reversed
a swipe tracker
Get @self's swipeable widget.
the swipeable widget
a swipe tracker
Sets whether to allow swiping for more than one snap point at a time.
If the value is `FALSE`, each swipe can only move to the adjacent snap
points.
a swipe tracker
whether to allow long swipes
Set whether @self can be dragged with mouse pointer.
This should usually be `FALSE`.
a swipe tracker
whether to allow mouse dragging
Set whether @self is enabled.
a swipe tracker
whether to enable to swipe tracker
Set whether to reverse the swipe direction.
If @self is horizontal, can be used for supporting RTL text direction.
a swipe tracker
whether to reverse the swipe direction
Move the current progress value by @delta.
This can be used to adjust the current position if snap points move during
the gesture.
a swipe tracker
the position delta
Whether to allow swiping for more than one snap point at a time.
If the value is `FALSE`, each swipe can only move to the adjacent snap
points.
Whether to allow dragging with mouse pointer.
This should usually be `FALSE`.
Whether the swipe tracker is enabled.
When it's not enabled, no events will be processed. Usually widgets will
want to expose this via a property.
Whether to reverse the swipe direction.
If the swipe tracker is horizontal, it can be used for supporting RTL text
direction.
The widget the swipe tracker is attached to. Must not be `NULL`.
This signal is emitted when a possible swipe is detected.
The @direction value can be used to restrict the swipe to a certain
direction.
the direction of the swipe
`TRUE` if the swipe is directly triggered by a gesture,
`FALSE` if it's triggered via a [class@SwipeGroup]
This signal is emitted as soon as the gesture has stopped.
snap-back animation duration, in milliseconds
the progress value to animate to
This signal is emitted every time the progress value changes.
the current animation progress value
An interface for swipeable widgets.
The `HdySwipeable` interface is implemented by all swipeable widgets. They
can be synced using [class@SwipeGroup].
See [class@SwipeTracker] for details about implementing it.
Gets the progress @self will snap back to after the gesture is canceled.
the cancel progress, unitless
a swipeable
Gets the swipe distance of @self.
This corresponds to how many pixels 1 unit represents.
the swipe distance in pixels
a swipeable
Gets the current progress of @self.
the current progress, unitless
a swipeable
Gets the snap points of @self.
Each snap point represents a progress value that is considered acceptable to
end the swipe on.
the snap points
a swipeable
location to return the number of the snap points
Gets the area @self can start a swipe from for the given direction and
gesture type.
This can be used to restrict swipes to only be possible from a certain area,
for example, to only allow edge swipes, or to have a draggable element and
ignore swipes elsewhere.
Swipe area is only considered for direct swipes (as in, not initiated by
[class@SwipeGroup]).
If not implemented, the default implementation returns the allocation of
@self, allowing swipes from anywhere.
a swipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a rectangle to store the swipe area
Gets the [class@SwipeTracker] used by this swipeable widget.
the swipe tracker
a swipeable
Switches to child with index @index.
See [signal@Swipeable::child-switched].
a swipeable
the index of the child to switch to
animation duration, in milliseconds
Emits [signal@Swipeable::child-switched] signal.
This should be called when the widget switches visible child widget.
@duration can be 0 if the child is switched without animation.
a swipeable
the index of the child to switch to
animation duration, in milliseconds
Gets the progress @self will snap back to after the gesture is canceled.
the cancel progress, unitless
a swipeable
Gets the swipe distance of @self.
This corresponds to how many pixels 1 unit represents.
the swipe distance in pixels
a swipeable
Gets the current progress of @self.
the current progress, unitless
a swipeable
Gets the snap points of @self.
Each snap point represents a progress value that is considered acceptable to
end the swipe on.
the snap points
a swipeable
location to return the number of the snap points
Gets the area @self can start a swipe from for the given direction and
gesture type.
This can be used to restrict swipes to only be possible from a certain area,
for example, to only allow edge swipes, or to have a draggable element and
ignore swipes elsewhere.
Swipe area is only considered for direct swipes (as in, not initiated by
[class@SwipeGroup]).
If not implemented, the default implementation returns the allocation of
@self, allowing swipes from anywhere.
a swipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a rectangle to store the swipe area
Gets the [class@SwipeTracker] used by this swipeable widget.
the swipe tracker
a swipeable
Switches to child with index @index.
See [signal@Swipeable::child-switched].
a swipeable
the index of the child to switch to
animation duration, in milliseconds
Emitted when the widget's visible child is changed.
@duration can be 0 if the child is switched without animation.
This is used by [class@SwipeGroup], applications should not connect to it.
the index of the child to switch to
animation duration, in milliseconds
An interface for swipeable widgets.
the parent interface
switches visible child
a swipeable
the index of the child to switch to
animation duration, in milliseconds
gets the swipe tracker
the swipe tracker
a swipeable
gets the swipe distance
the swipe distance in pixels
a swipeable
gets the snap points
the snap points
a swipeable
location to return the number of the snap points
gets the current progress
the current progress, unitless
a swipeable
gets the cancel progress
the cancel progress, unitless
a swipeable
gets the swipeable rectangle
a swipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a rectangle to store the swipe area
A tab bar for [class@TabView].
The `HdyTabBar` widget is a tab bar that can be used with conjunction with
[class@TabView].
`HdyTabBar` can autohide and can optionally contain action widgets on both
sides of the tabs.
When there's not enough space to show all the tabs, `HdyTabBar` will scroll
them. Pinned tabs always stay visible and aren't a part of the scrollable
area.
## CSS nodes
`HdyTabBar` has a single CSS node with name `tabbar`.
Creates a new `HdyTabBar` widget.
a new `HdyTabBar`
Gets whether the tabs automatically hide.
whether the tabs automatically hide
a tab bar
Gets the widget shown after the tabs.
the widget shown after the tabs
a tab bar
Gets whether tabs should expand.
whether tabs should expand
a tab bar
Gets extra drag destination targets.
extra drag targets
a tab bar
Gets whether tabs use inverted layout.
whether tabs use inverted layout
a tab bar
Gets whether @self is overflowing.
whether @self is overflowing
a tab bar
Gets the widget shown before the tabs.
the widget shown before the tabs
a tab bar
Gets the value of the [property@TabBar:tabs-revealed] property.
whether the tabs are current revealed
a tab bar
Gets the [class@TabView] @self controls.
the [class@TabView] @self controls
a tab bar
Sets whether the tabs automatically hide.
If @autohide is `TRUE`, the tab bar disappears when the associated
[class@TabView] has 0 or 1 tab, no pinned tabs, and no tab is being
transferred.
Autohide is enabled by default.
See [property@TabBar:tabs-revealed].
a tab bar
whether the tabs automatically hide
Sets the widget to show after the tabs.
a tab bar
the widget to show after the tabs
Sets whether tabs should expand.
If @expand_tabs is `TRUE`, the tabs will always vary width filling the whole
width when possible, otherwise tabs will always have the minimum possible
size.
Expand is enabled by default.
a tab bar
whether to expand tabs
Sets extra drag destination targets.
This allows to drag arbitrary content onto tabs, for example URLs in a web
browser.
If a tab is hovered for a certain period of time while dragging the content,
it will be automatically selected.
After content is dropped, the [signal@TabBar::extra-drag-data-received]
signal can be used to retrieve and process the drag data.
a tab bar
extra drag targets
Sets whether tabs tabs use inverted layout.
If @inverted is `TRUE`, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
a tab bar
whether tabs use inverted layout
Sets the widget to show before the tabs.
a tab bar
the widget to show before the tabs
Sets the [class@TabView] @self controls.
a tab bar
a tab view
Whether tabs automatically hide.
If set to `TRUE`, the tab bar disappears when the associated
[class@TabView] has 0 or 1 tab, no pinned tabs, and no tab is being
transferred.
See [property@TabBar:tabs-revealed].
The widget shown after the tabs.
Whether tabs should expand.
If set to `TRUE`, the tabs will always vary width filling the whole width
when possible, otherwise tabs will always have the minimum possible size.
Extra drag destination targets.
Allows to drag arbitrary content onto tabs, for example URLs in a web
browser.
If a tab is hovered for a certain period of time while dragging the
content, it will be automatically selected.
After content is dropped, the [signal@TabBar::extra-drag-data-received]
signal can be used to retrieve and process the drag data.
Whether tabs use inverted layout.
If set to `TRUE`, non-pinned tabs will have the close button at the
beginning and the indicator at the end rather than the opposite.
Whether the tab bar is overflowing.
If set to `TRUE`, all tabs cannot be displayed at once and require
scrolling.
The widget shown before the tabs.
Whether tabs are currently revealed.
See [property@TabBar:autohide].
The [class@TabView] the tab bar controls.
Emitted when content allowed via [property@TabBar:extra-drag-dest-targets]
is dropped onto a tab.
See [signal@Gtk.Widget::drag-data-received].
the tab page matching the tab the content was dropped onto
the drag context
the received data
the info that has been registered with the target in the
[struct@Gtk.TargetList]
the timestamp at which the data was received
An auxiliary class used by [class@TabView].
Gets the child of @self.
the child of @self
a tab page
Gets the icon of @self.
the icon of @self
a tab page
Gets whether the indicator of @self is activatable.
whether the indicator is activatable
a tab page
Gets the indicator icon of @self.
the indicator icon of @self
a tab page
Gets whether @self is loading.
whether @self is loading
a tab page
Gets whether @self needs attention.
whether @self needs attention
a tab page
Gets the parent page of @self.
the parent page of @self
a tab page
Gets whether @self is pinned.
whether @self is pinned
a tab page
Gets whether @self is selected.
whether @self is selected
a tab page
Gets the title of @self.
the title of @self
a tab page
Gets the tooltip of @self.
the tooltip of @self
a tab page
Sets the icon of @self.
a tab page
the icon of @self
Sets whether the indicator of @self is activatable.
a tab page
whether the indicator is activatable
Sets the indicator icon of @self.
a tab page
the indicator icon of @self
Sets whether @self is loading.
a tab page
whether @self is loading
Sets whether @self needs attention.
a tab page
whether @self needs attention
Sets the title of @self.
a tab page
the title of @self
Sets the tooltip of @self.
a tab page
the tooltip of @self
The child of the page.
The icon of the page.
[class@TabBar] displays the icon next to the title.
It will not show the icon if [property@TabPage:loading] is set to `TRUE`,
or if the page is pinned and [propertyTabPage:indicator-icon] is set.
Whether the indicator icon is activatable.
If set to `TRUE`, [signal@TabView::indicator-activated] will be emitted
when the indicator icon is clicked.
If [property@TabPage:indicator-icon] is not set, does nothing.
An indicator icon for the page.
A common use case is an audio or camera indicator in a web browser.
[class@TabPage] will show it at the beginning of the tab, alongside icon
representing [property@TabPage:icon] or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or
spinner.
If [property@TabPage:indicator-activatable] is set to `TRUE`, the indicator
icon can act as a button.
Whether the page is loading.
If set to `TRUE`, [class@TabBar] will display a spinner in place of icon.
If the page is pinned and [property@TabPage:indicator-icon] is set, the
loading status will not be visible.
Whether the page needs attention.
[class@TabBar] will display a glow under the tab representing the page if
set to `TRUE`. If the tab is not visible, the corresponding edge of the tab
bar will be highlighted.
The parent page of the page.
See [method@TabView.add_page] and [method@TabView.close_page].
Whether the page is pinned.
See [method@TabView.set_page_pinned].
Whether the page is selected.
The title of the page.
[class@TabBar] will display it in the center of the tab unless it's pinned,
and will use it as a tooltip unless [property@TabPage:tooltip] is set.
The tooltip of the page.
The tooltip can be marked up with the Pango text markup language.
If not set, [class@TabBar] will use [property@TabPage:title] as a tooltip
instead.
A dynamic tabbed container.
`HdyTabView` is a container which shows one child at a time. While it
provides keyboard shortcuts for switching between pages, it does not provide
a visible tab bar and relies on external widgets for that, such as
[class@TabBar].
`HdyTabView` maintains a [class@TabPage] object for each page,which holds
additional per-page properties. You can obtain the [class@TabPage] for a page
with [method@TabView.get_page], and as return value for
[method@TabView.append] and other functions for adding children.
`HdyTabView` only aims to be useful for dynamic tabs in multi-window
document-based applications, such as web browsers, file managers, text
editors or terminals. It does not aim to replace [class@Gtk.Notebook] for use
cases such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching, or
adding children via [iface@Gtk.Buildable].
## CSS nodes
`HdyTabView` has a main CSS node with the name `tabview`.
It contains the subnode overlay, which contains subnodes stack and widget.
The stack subnode contains the added pages.
```
tabview
╰── overlay
├── stack
│ ╰── [ Children ]
╰── widget
```
Creates a new `HdyTabView`.
the newly created `HdyTabView`
Adds @child to @self with @parent as the parent.
This function can be used to automatically position new pages, and to select
the correct page when this page is closed while being selected (see
[method@TabView.close_page].
If @parent is `NULL`, this function is equivalent to [method@TabView.append].
the page object representing @child
a tab view
a widget to add
a parent page for @child
Inserts @child as the last non-pinned page.
the page object representing @child
a tab view
a widget to add
Inserts @child as the last pinned page.
the page object representing @child
a tab view
a widget to add
Requests to close all pages other than @page.
a tab view
a page of @self
Requests to close @page.
Calling this function will result in [signal@TabView::close-page] signal
being emitted for @page. Closing the page can then be confirmed or denied via
[method@TabView.close_page_finish].
If the page is waiting for a [method@TabView.close_page_finish] call, this
function will do nothing.
The default handler for [signal@TabView::close-page] will immediately confirm
closing the page if it's non-pinned, or reject it if it's pinned. This
behavior can be changed by registering your own handler for that signal.
If @page was selected, another page will be selected instead:
If the [property@TabPage:parent] value is `NULL`, the next page will be
selected when possible, or if the page was already last, the previous page
will be selected instead.
If it's not `NULL`, the previous page will be selected if it's a descendant
(possibly indirect) of the parent. If both the previous page and the parent
are pinned, the parent will be selected instead.
a tab view
a page of @self
Completes a [method@TabView.close_page] call for @page.
If @confirm is `TRUE`, @page will be closed. If it's `FALSE`, ite will be
reverted to its previous state and [method@TabView.close_page] can be called
for it again.
This function should not be called unless a custom handler for
[signal@TabView::close-page] is used.
a tab view
a page of @self
whether to confirm or deny closing @page
Requests to close all pages after @page.
a tab view
a page of @self
Requests to close all pages before @page.
a tab view
a page of @self
Gets default icon of @self.
the default icon of @self
a tab view
Whether a page is being transferred.
Gets the value of [property@TabView:is-transferring-page] property.
whether a page is being transferred
a tab view
Gets the tab context menu model for @self.
the tab context menu model for @self
a tab view
Gets the number of pages in @self.
the number of pages in @self
a tab view
Gets the number of pinned pages in @self.
See [method@TabView.set_page_pinned].
the number of pinned pages in @self
a tab view
Gets the [class@TabPage] representing the child at @position.
the page object at @position
a tab view
the index of the page in @self, starting from 0
Gets the [class@TabPage] object representing @child.
the [class@TabPage] representing @child
a tab view
a child in @self
Finds the position of @page in @self, starting from 0.
the position of @page in @self
a tab view
a page of @self
Returns a [iface@Gio.ListModel] containing the pages of @self.
This model can be used to keep an up to date view of the pages.
the model containing pages of @self
a tab view
Gets the currently selected page in @self.
the selected page in @self
a tab view
Gets the shortcut widget for @self.
the shortcut widget for @self
a tab view
Inserts a non-pinned page at @position.
It's an error to try to insert a page before a pinned page, in that case
[method@TabView.insert_pinned] should be used instead.
the page object representing @child
a tab view
a widget to add
the position to add @child at, starting from 0
Inserts a pinned page at @position.
It's an error to try to insert a pinned page after a non-pinned page, in that
case [method@TabView.insert] should be used instead.
the page object representing @child
a tab view
a widget to add
the position to add @child at, starting from 0
Inserts @child as the first non-pinned page.
the page object representing @child
a tab view
a widget to add
Inserts @child as the first pinned page.
the page object representing @child
a tab view
a widget to add
Reorders @page to before its previous page if possible.
whether @page was moved
a tab view
a page of @self
Reorders @page to the first possible position.
whether @page was moved
a tab view
a page of @self
Reorders @page to after its next page if possible.
whether @page was moved
a tab view
a page of @self
Reorders @page to the last possible position.
whether @page was moved
a tab view
a page of @self
Reorders @page to @position.
It's a programmer error to try to reorder a pinned page after a non-pinned
one, or a non-pinned page before a pinned one.
whether @page was moved
a tab view
a page of @self
the position to insert the page at, starting at 0
Selects the page after the currently selected page.
If the last page was already selected, this function does nothing.
whether the selected page was changed
a tab view
Selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
whether the selected page was changed
a tab view
Sets default page icon for @self.
If a page doesn't provide its own icon via [property@TabPage:icon], default
icon may be used instead for contexts where having an icon is necessary.
[class@TabBar] will use default icon for pinned tabs in case the page is not
loading, doesn't have an icon and an indicator. Default icon is never used
for tabs that aren't pinned.
By default, `hdy-tab-icon-missing-symbolic` icon is used.
a tab view
the default icon
Sets the tab context menu model for @self.
When a context menu is shown for a tab, it will be constructed from the
provided menu model. Use [signal@TabView::setup-menu] signal to set up the
menu actions for the particular tab.
a tab view
a menu model
Pins or unpins @page.
Pinned pages are guaranteed to be placed before all non-pinned pages; at any
given moment the first [property@TabView:n-pinned-pages] pages in @self are
guaranteed to be pinned.
When a page is pinned or unpinned, it's automatically reordered: pinning a
page moves it after other pinned pages; unpinning a page moves it before
other non-pinned pages.
Pinned pages can still be reordered between each other.
[class@TabBar] will display pinned pages in a compact form, never showing the
title or close button, and only showing a single icon, selected in the
following order:
1. [property@TabPage:indicator-icon]
2. A spinner if [property@TabPage:loading] is `TRUE`
3. [property@TabPage:icon]
4. [property@TabView:default-icon]
Pinned pages cannot be closed by default, see [signal@TabView::close-page]
for how to override that behavior.
a tab view
a page of @self
whether @page should be pinned
Sets the currently selected page in @self.
a tab view
a page in @self
Sets the shortcut widget for @self.
a tab view
a shortcut widget
Transfers @page from @self to @other_view.
The @page object will be reused.
It's a programmer error to try to insert a pinned page after a non-pinned
one, or a non-pinned page before a pinned one.
a tab view
a page of @self
the tab view to transfer the page to
the position to insert the page at, starting at 0
Default page icon.
If a page doesn't provide its own icon via [property@TabPage:icon], default
icon may be used instead for contexts where having an icon is necessary.
[class@TabBar] will use default icon for pinned tabs in case the page is
not loading, doesn't have an icon and an indicator. Default icon is never
used for tabs that aren't pinned.
Whether a page is being transferred.
This property will be set to `TRUE` when a drag-n-drop tab transfer starts
on any [class@TabView], and to `FALSE` after it ends.
During the transfer, children cannot receive pointer input and a tab can be
safely dropped on the tab view.
Tab context menu model.
When a context menu is shown for a tab, it will be constructed from the
provided menu model. Use [signal@TabView::setup-menu] signal to set up the
menu actions for the particular tab.
The number of pages in the tab view.
The number of pinned pages in the tab view.
See [method@TabView.set_page_pinned].
The currently selected page.
Tab shortcut widget.
Has the following shortcuts:
* <kbd>Ctrl</kbd>+<kbd>Page Up</kbd> - switch to the previous page
* <kbd>Ctrl</kbd>+<kbd>Page Down</kbd> - switch to the next page
* <kbd>Ctrl</kbd>+<kbd>Home</kbd> - switch to the first page
* <kbd>Ctrl</kbd>+<kbd>End</kbd> - switch to the last page
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Up</kbd> - move the current page
backward
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Page Down</kbd> - move the current
page forward
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Home</kbd> - move the current page at
the start
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>End</kbd> - move the current page at
the end
* <kbd>Ctrl</kbd>+<kbd>Tab</kbd> - switch to the next page, with looping
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd> - switch to the previous
page, with looping
* <kbd>Alt</kbd>+<kbd>1</kbd>⋯<kbd>9</kbd> - switch to pages 1-9
* <kbd>Alt</kbd>+<kbd>0</kbd> - switch to page 10
These shortcuts are always available on @self, this property is useful if
they should be available globally.
Emitted after [method@TabView.close_page] has been called for @page.
The handler is expected to call [method@TabView.close_page_finish] to
confirm or reject the closing.
The default handler will immediately confirm closing for non-pinned pages,
or reject it for pinned pages, equivalent to the following example:
```c
static gboolean
close_page_cb (HdyTabView *view,
HdyTabPage *page,
gpointer user_data)
{
hdy_tab_view_close_page_finish (view, page, !hdy_tab_page_get_pinned (page));
return GDK_EVENT_STOP;
}
```
The [method@TabView.close_page_finish] doesn't have to happen during the
handler, so can be used to do asynchronous checks before confirming the
closing.
A typical reason to connect to this signal is to show a confirmation dialog
for closing a tab.
a page of the view
Emitted when a tab should be transferred into a new window.
This can happen after a tab has been dropped on desktop.
The signal handler is expected to create a new window, position it as
needed and return its `HdyTabView`that the page will be transferred into.
the [class@TabView] from the new
window
Emitted after the indicator icon on @page has been activated.
See [property@TabPage:indicator-icon] and
[property@TabPage:indicator-activatable].
a page of the view
Emitted when a page has been created or transferred to the view.
A typical reason to connect to this signal would be to connect to page
signals for things such as updating window title.
a page of the view
the position of the page, starting from 0
Emitted when a page has been removed or transferred to another view.
A typical reason to connect to this signal would be to disconnect signal
handlers connected in the [signal@TabView::page-attached] handler.
It is important not to try and destroy the page child in the handler of
this function as the child might merely be moved to another window; use
child dispose handler for that or do it in sync with your
[method@TabView.close_page_finish] calls.
a page of the view
the position of the removed page, starting from 0
This signal is emitted after @page has been reordered to @position.
a page of the view
the position @page was moved to, starting at 0
Emitted when a context menu is opened or closed for @page.
If the menu has been closed, @page will be set to `NULL`.
It can be used to set up menu actions before showing the menu, for example
disable actions not applicable to @page.
a page of @self
A simple title bar container.
`HdyTitleBar` is meant to be used as the top-level widget of your window's
title bar. It will be drawn with the same style as a [class@Gtk.HeaderBar]
but it won't force a widget layout on you: you can put whatever widget you
want in it, including a [class@Gtk.HeaderBar].
`HdyTitleBar` becomes really useful when you want to animate header bars,
like an adaptive application using [class@Leaflet] would do.
`HdyTitleBar` has been deprecated, header bars can be animated without it
when placed inside [class@Window] or [class@ApplicationWindow].
## CSS nodes
`HdyTitleBar` has a single CSS node with name `headerbar`.
Creates a new `HdyTitleBar`.
a new `HdyTitleBar`
Returns whether whether @self is in selection mode.
`TRUE` if the title bar is in selection mode
a title bar
Sets whether @self is in selection mode.
a title bar
`TRUE` to enable the selection mode
Whether or not the title bar is in selection mode.
An object representing a [struct@GObject.Value].
The `HdyValueObject` object represents a [struct@GObject.Value], allowing it
to be used with [iface@Gio.ListModel].
Creates a new `HdyValueObject`.
a new `HdyValueObject`
the value to store
Creates a new `HdyValueObject`.
This is a convenience method which uses the `G_VALUE_COLLECT` macro
internally.
a new `HdyValueObject`
the type of the value
the value to store
Creates a new `HdyValueObject`.
This is a convenience method to create a [class@ValueObject] that stores a
string.
a new `HdyValueObject`
the string to store
Creates a new `HdyValueObject`.
This is a convenience method to create a [class@ValueObject] that stores a
string taking ownership of it.
a new `HdyValueObject`
the string to store
Copy data from the contained [struct@GObject.Value] into @dest.
the value
value with correct type to copy into
Gets a copy of the contained string if the value is of type `G_TYPE_STRING`.
a copy of the contained string
the value
Returns the contained string if the value is of type `G_TYPE_STRING`.
the contained string
the value
Return the contained value.
the contained [struct@GObject.Value]
the value
The contained value.
An adaptive view switcher.
An adaptive view switcher, designed to switch between multiple views in a
similar fashion than a [class@Gtk.StackSwitcher].
Depending on the available width, the view switcher can adapt from a wide
mode showing the view's icon and title side by side, to a narrow mode showing
the view's icon and title one on top of the other, in a more compact way.
This can be controlled via the policy property.
To look good in a header bar, an `HdyViewSwitcher` requires to fill its full
height. Contrary to [class@Gtk.HeaderBar], [class@HeaderBar] doesn't force a
vertical alignment on its title widget, so we recommend it over
[class@Gtk.HeaderBar].
## CSS nodes
`HdyViewSwitcher` has a single CSS node with name `viewswitcher`.
Creates a new `HdyViewSwitcher`.
the newly created `HdyViewSwitcher`
Get the ellipsizing position of the narrow mode label.
a [enum@Pango.EllipsizeMode]
a view switcher
Gets the policy of @self.
the policy of @self
a view switcher
Gets the stack controlled by @self.
the stack
a view switcher
Sets the mode used to ellipsize the text in narrow mode.
a view switcher
a [enum@Pango.EllipsizeMode]
Sets the policy of @self.
a view switcher
the new policy
Sets the [class@Gtk.Stack] to control.
a view switcher
a stack
The preferred place to ellipsize the string.
If the narrow mode label does not have enough room to display the entire
string, specified as a [enum@Pango.EllipsizeMode].
Note that setting this property to a value other than
`PANGO_ELLIPSIZE_NONE` has the side-effect that the label requests only
enough space to display the ellipsis.
The policy to determine which mode to use.
The [class@Gtk.Stack] the view switcher controls.
A view switcher action bar.
An action bar letting you switch between multiple views offered by a
[class@Gtk.Stack], via an [class@ViewSwitcher]. It is designed to be put at
the bottom of a window and to be revealed only on really narrow windows e.g.
on mobile phones. It can't be revealed if there are less than two pages.
`HdyViewSwitcherBar` is intended to be used together with
[class@ViewSwitcherTitle].
A common use case is to bind the [property@ViewSwitcherBar:reveal] property
to [property@ViewSwitcherTitle:title-visible] to automatically reveal the
view switcher bar when the title label is displayed in place of the view
switcher, as follows:
```xml
<object class="GtkWindow"/>
<child type="titlebar">
<object class="HdyHeaderBar">
<property name="centering-policy">strict</property>
<child type="title">
<object class="HdyViewSwitcherTitle"
id="view_switcher_title">
<property name="stack">stack</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<child>
<object class="GtkStack" id="stack"/>
</child>
<child>
<object class="HdyViewSwitcherBar">
<property name="stack">stack</property>
<property name="reveal"
bind-source="view_switcher_title"
bind-property="title-visible"
bind-flags="sync-create"/>
</object>
</child>
</object>
</child>
</object>
```
## CSS nodes
`HdyViewSwitcherBar` has a single CSS node with name `viewswitcherbar`.
Creates a new `HdyViewSwitcherBar`.
the newly created `HdyViewSwitcherBar`
Gets the policy of @self.
the policy of @self
a view switcher bar
Gets whether @self should be revealed or hidden.
whether @self is revealed
a view switcher bar
Get the [class@Gtk.Stack] being controlled by the [class@ViewSwitcher].
the stack
a view switcher bar
Sets the policy of @self.
a view switcher bar
the new policy
Sets whether @self should be revealed or not.
a view switcher bar
`TRUE` to reveal @self
Sets the [class@Gtk.Stack] to control.
a view switcher bar
a stack
The policy used to determine which mode to use.
Whether the bar should be revealed or hidden.
The [class@Gtk.Stack] the [class@ViewSwitcher] controls.
Describes the adaptive modes of [class@ViewSwitcher].
Automatically adapt to the best fitting mode
Force the narrow mode
Force the wide mode
A view switcher title.
A widget letting you switch between multiple views contained by a
[class@Gtk.Stack], via an [class@ViewSwitcher].
It is designed to be used as the title widget of a [class@HeaderBar], and
will display the window's title when the window is too narrow to fit the view
switcher e.g. on mobile phones, or if there are less than two views.
`HdyViewSwitcherTitle` is intended to be used together with
[class@ViewSwitcherBar].
A common use case is to bind the [property@ViewSwitcherBar:reveal] property
to [property@ViewSwitcherTitle:title-visible] to automatically reveal the
view switcher bar when the title label is displayed in place of the view
switcher, as follows:
```xml
<object class="GtkWindow"/>
<child type="titlebar">
<object class="HdyHeaderBar">
<property name="centering-policy">strict</property>
<child type="title">
<object class="HdyViewSwitcherTitle"
id="view_switcher_title">
<property name="stack">stack</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox">
<child>
<object class="GtkStack" id="stack"/>
</child>
<child>
<object class="HdyViewSwitcherBar">
<property name="stack">stack</property>
<property name="reveal"
bind-source="view_switcher_title"
bind-property="title-visible"
bind-flags="sync-create"/>
</object>
</child>
</object>
</child>
</object>
```
## CSS nodes
`HdyViewSwitcherTitle` has a single CSS node with name `viewswitchertitle`.
Creates a new `HdyViewSwitcherTitle`.
the newly created `HdyViewSwitcherTitle`
Gets the policy of @self.
the policy of @self
a view switcher title
Gets the stack controlled by @self.
the stack
a view switcher title
Gets the subtitle of @self.
the subtitle of @self
a view switcher title
Gets the title of @self.
the title of @self
a view switcher title
Gets whether the title of @self is currently visible.
whether the title of @self is currently visible
a view switcher title
Gets whether @self's view switcher is enabled.
whether the view switcher is enabled
a view switcher title
Sets the policy of @self.
a view switcher title
the new policy
Sets the [class@Gtk.Stack] to control.
a view switcher title
a stack
Sets the subtitle of @self.
a view switcher title
a subtitle
Sets the title of @self.
a view switcher title
a title
Sets whether @self's view switcher is enabled.
a view switcher title
`TRUE` to enable the view switcher, `FALSE` to disable it
The policy used to determine which mode to use.
The [class@Gtk.Stack] the [class@ViewSwitcher] controls.
The subtitle of the [class@ViewSwitcher].
The subtitle should give a user additional details.
The title of the [class@ViewSwitcher].
The title should give a user additional details. A good title should not
include the application name.
Whether the bar should be revealed or hidden.
Whether the bar should be revealed or hidden.
If it is disabled, the title will be displayed instead. This allows to
programmatically hide the view switcher even if it fits in the available
space.
This can be used e.g. to ensure the view switcher is hidden below a certain
window width, or any other constraint you find suitable.
A freeform window.
The `HdyWindow` widget is a subclass of [class@Gtk.Window] which has no
titlebar area and provides rounded corners on all sides, ensuring they can
never be overlapped by the content. This makes it safe to use headerbars in
the content area as follows:
```xml
<object class="HdyWindow"/>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<child>
<object class="HdyHeaderBar">
<property name="visible">True</property>
<property name="show-close-button">True</property>
</object>
</child>
<child>
<!-- ... -->
</child>
</object>
</child>
</object>
```
It's recommended to use [class@HeaderBar] with `HdyWindow`, as unlike
[class@Gtk.HeaderBar] it remains draggable inside the window. Otherwise,
[class@WindowHandle] can be used.
`HdyWindow` allows to easily implement titlebar autohiding by putting the
headerbar inside a [class@Gtk.Revealer], and to show titlebar above content
by putting it into a [class@Gtk.Overlay] instead of [class@Gtk.Box].
If the window has a [class@Gtk.GLArea], it may bring a slight performance
regression when the window is not fullscreen, tiled or maximized.
Using [method@Gtk.Window.get_titlebar] and [method@Gtk.Window.set_titlebar]
is not supported and will result in a crash.
## CSS nodes
`HdyWindow` has a main CSS node with the name `window` and style classes
`.background`, `.csd` and `.unified`.
The `.solid-csd` style class on the main node is used for client-side
decorations without invisible borders.
`HdyWindow` also represents window states with the following style classes on
the main node: `.tiled`, `.maximized`, `.fullscreen`.
It contains the subnodes decoration for window shadow and/or border,
decoration-overlay for the sheen on top of the window, `widget.titlebar`, and
deck, which contains the child inside the window.
Creates a new `HdyWindow`.
the newly created `HdyWindow`
A bin that acts like a titlebar.
`HdyWindowHandle` is a [class@Gtk.Bin] subclass that can be dragged to move
its [class@Gtk.Window], and handles right click, middle click and double
click as expected from a titlebar. This is particularly useful with
[class@Window] or [class@ApplicationWindow].
It isn't necessary to use `HdyWindowHandle` if you use [class@HeaderBar].
It can be safely nested or used in the actual window titlebar.
## CSS nodes
`HdyWindowHandle` has a single CSS node with name `windowhandle`.
Creates a new `HdyWindowHandle`.
the newly created `HdyWindowHandle`
Computes the ease out for a value.
the ease out for @t
the term
Returns the name of a [class@EnumValueObject].
This is a default implementation of [callback@ComboRowGetEnumValueNameFunc]
to be used with [method@ComboRow.set_for_enum]. If the enumeration has a
nickname, it will return it, otherwise it will return its name.
a displayable name that represents @value
the value from the enum from which to get a name
unused user data
Checks whether animations are enabled for @widget.
This should be used when implementing an animated widget to know whether to
animate it or not.
whether animations are enabled for @widget
a widget
Initializes Libhandy.
Call this function just after initializing GTK, if you are using
[class@Gtk.Application] it means it must be called when the
[signal@Gio.Application::startup] signal is emitted.
If Libhandy has already been initialized, the function will simply return.
This makes sure translations, types, themes, and icons for the Handy library
are set up properly.