Creates a new #HdyActionRow.
a new #HdyActionRow
Adds a prefix widget to @self.
a #HdyActionRow
the prefix widget
Gets the widget activated when @self is activated.
the widget activated when @self is
activated, or %NULL if none has been set.
a #HdyActionRow
Gets the icon name for @self.
the icon name for @self.
The returned string is owned by the #HdyActionRow and should not be freed.
a #HdyActionRow
Gets the subtitle for @self.
the subtitle for @self, or %NULL.
a #HdyActionRow
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.
a #HdyActionRow
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.
a #HdyActionRow
Gets whether an embedded underline in the text of the title and subtitle
labels indicates a mnemonic. See hdy_action_row_set_use_underline().
%TRUE if an embedded underline in the title and subtitle labels
indicates the mnemonic accelerator keys.
a #HdyActionRow
Sets the widget to activate when @self is activated, either by clicking
on it, by calling hdy_action_row_activate(), or via mnemonics in the title or
the subtitle. See the “use_underline” property to enable mnemonics.
The target widget will be activated by emitting the
GtkWidget::mnemonic-activate signal on it.
a #HdyActionRow
the target #GtkWidget, or %NULL to unset
Sets the icon name for @self.
a #HdyActionRow
the icon name
Sets the subtitle for @self.
a #HdyActionRow
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.
a #HdyActionRow
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.
a #HdyActionRow
the number of lines at the end of which the title label will be ellipsized
If true, an underline in the text of the title and subtitle labels indicates
the next character should be used for the mnemonic accelerator key.
a #HdyActionRow
%TRUE if underlines in the text indicate mnemonics
The activatable widget for this row.
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.
Set this property to 0 if you don't want to limit the number of lines.
The number of lines at the end of which the title label will be ellipsized.
Set this property to 0 if you don't want to limit the number of lines.
Whether an embedded underline in the text of the title and subtitle labels
indicates a mnemonic.
This signal is emitted after the row has been activated.
The parent class
Creates a new #HdyApplicationWindow.
a newly created #HdyApplicationWindow
Creates a new #HdyAvatar.
the newly created #HdyAvatar
The size of the avatar
The text used to generate the color and initials if
@show_initials is %TRUE. The color is selected at random if @text is empty.
whether to show the initials or the fallback icon on
top of the color generated based on @text.
Renders @self into a pixbuf at @size and @scale_factor. This can be used to export the fallback avatar.
the pixbuf.
a #HdyAvatar
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.
a #HdyAvatar
The size of the pixbuf
The scale factor
optional #GCancellable object, %NULL to ignore
a #GAsyncReadyCallback to call when the avatar is generated
the data to pass to callback function
Finishes an asynchronous draw of an avatar to a pixbuf.
a #GdkPixbuf
a #HdyAvatar
a #GAsyncResult
Gets the name of the icon in the icon theme to use when the icon should be
displayed.
the name of the icon from the icon theme.
a #HdyAvatar
Gets the #GLoadableIcon set via hdy_avatar_set_loadable_icon().
the #GLoadableIcon
a #HdyAvatar
Returns whether initials are used for the fallback or the icon.
%TRUE if the initials are used for the fallback.
a #HdyAvatar
Returns the size of the avatar.
the size of the avatar.
a #HdyAvatar
Get the text used to generate the fallback initials and color
returns the text used to generate
the fallback initials. This is the internal string used by
the #HdyAvatar, and must not be modified.
a #HdyAvatar
Sets the name of the icon in the icon theme to use when the icon should be
displayed.
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 #HdyAvatar
the name of the icon from the icon theme
A callback which is called when the custom image need to be reloaded for some
reason (e.g. scale-factor changes).
use hdy_avatar_set_loadable_icon() instead.
a #HdyAvatar
callback to set a custom image
user data passed to @load_image
destroy notifier for @user_data
Sets the #GLoadableIcon 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 #GLoadableIcon set via this function is prefered over a set #HdyAvatarImageLoadFunc.
a #HdyAvatar
a #GLoadableIcon
Sets whether the initials should be shown on the fallback avatar or the icon.
a #HdyAvatar
whether the initials should be shown on the fallback avatar
or the icon.
Sets the size of the avatar.
a #HdyAvatar
The size to be used for the avatar
Set the text used to generate the fallback initials color
a #HdyAvatar
the text used to get the initials and color
The name of the icon in the icon theme to use when the icon should be
displayed.
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 #GLoadableIcon used to load the avatar.
The avatar size of the avatar.
The text used for the initials and for generating the color.
If #HdyAvatar:show-initials is %FALSE it's only used to generate the color.
The returned #GdkPixbuf 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 hdy_avatar_set_loadable_icon() instead.
the #GdkPixbuf to use as a custom avatar
or %NULL to fallback to the generated avatar.
the required size of the avatar
user data
Create a new #HdyCarousel widget.
The newly created #HdyCarousel widget
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.
%TRUE if long swipes are allowed, %FALSE otherwise
a #HdyCarousel
Sets whether @self can be dragged with mouse pointer
%TRUE if @self can be dragged with mouse
a #HdyCarousel
Gets animation duration used by hdy_carousel_scroll_to().
Animation duration in milliseconds
a #HdyCarousel
Gets whether @self can be navigated.
%TRUE if @self can be swiped
a #HdyCarousel
Gets the number of pages in @self.
The number of pages in @self
a #HdyCarousel
Gets current scroll position in @self. It's unitless, 1 matches 1 page.
The scroll position
a #HdyCarousel
Gets duration of the animation used when adding or removing pages in
milliseconds.
Page reveal duration
a #HdyCarousel
Gets spacing between pages in pixels.
Spacing between pages
a #HdyCarousel
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 #HdyCarousel
a widget to add
the position to insert @child in.
Prepends @child to @self
a #HdyCarousel
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 #HdyCarousel
a widget to add
the position to move @child to.
Scrolls to @widget position with an animation.
#HdyCarousel:animation-duration property can be used for controlling the
duration.
a #HdyCarousel
a child of @self
Scrolls to @widget position with an animation.
a #HdyCarousel
a child of @self
animation duration in milliseconds
Sets 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.
a #HdyCarousel
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 #HdyCarousel
whether @self can be dragged with mouse pointer
Sets animation duration used by hdy_carousel_scroll_to().
a #HdyCarousel
animation duration in milliseconds
Sets whether @self can be navigated. This can be used to temporarily disable
a #HdyCarousel to only allow swiping in a certain state.
a #HdyCarousel
whether @self can be swiped.
Sets duration of the animation used when adding or removing pages in
milliseconds.
a #HdyCarousel
the new reveal duration value
Sets spacing between pages in pixels.
a #HdyCarousel
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 #HdyCarousel can be dragged with mouse pointer. If the
value is %FALSE, dragging is only available on touch.
Animation duration in milliseconds, used by hdy_carousel_scroll_to().
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 #HdyCarousel
Current scrolling position, unitless. 1 matches 1 page. Use
hdy_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. This can be used to
implement "infinite scrolling" by connecting to this signal and amending
the pages.
Current page
Create a new #HdyCarouselIndicatorDots widget.
The newly created #HdyCarouselIndicatorDots widget
Get the #HdyCarousel the indicator uses.
See: hdy_carousel_indicator_dots_set_carousel()
the #HdyCarousel, or %NULL if none has been set
a #HdyCarouselIndicatorDots
Sets the #HdyCarousel to use.
a #HdyCarouselIndicatorDots
a #HdyCarousel
The #HdyCarousel the indicator uses.
Create a new #HdyCarouselIndicatorLines widget.
The newly created #HdyCarouselIndicatorLines widget
Get the #HdyCarousel the indicator uses.
See: hdy_carousel_indicator_lines_set_carousel()
the #HdyCarousel, or %NULL if none has been set
a #HdyCarouselIndicatorLines
Sets the #HdyCarousel to use.
a #HdyCarouselIndicatorLines
a #HdyCarousel
The #HdyCarousel the indicator uses.
Keep the title centered when possible
Keep the title centered at all cost
Creates a new #HdyClamp.
a new #HdyClamp
Gets the maximum size to allocate to the contained child. It is the width if
@self is horizontal, or the height if it is vertical.
the maximum width to allocate to the contained child.
a #HdyClamp
Gets the size starting from which the clamp will tighten its grip on the
child.
the size starting from which the clamp will tighten its grip on the
child.
a #HdyClamp
Sets the maximum size to allocate to the contained child. It is the width if
@self is horizontal, or the height if it is vertical.
a #HdyClamp
the maximum size
Sets the size starting from which the clamp will tighten its grip on the
child.
a #HdyClamp
the tightening threshold
The maximum size to allocate to the child. It is the width if the clamp is
horizontal, or the height if it is vertical.
The size starting from which the clamp will tighten its grip on the child,
slowly allocating less and less of the available size up to the maximum
allocated size. Below that threshold and below the maximum width, the child
will be allocated all the available size.
If the threshold is greater than the maximum size to allocate to the child,
the child will be allocated all the width up to the maximum.
If the threshold is lower than the minimum size to allocate to the child,
that size will be used as the tightening threshold.
Effectively, tightening the grip on the child before it reaches its maximum
size makes transitions to and from the maximum size smoother when resizing.
Creates a new #HdyComboRow.
a new #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 #HdyComboRow
the #GListModel 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 hdy_combo_row_bind_model() if you want to
represent items of the model with names.
a #HdyComboRow
the #GListModel 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, or %NULL if none is bound.
the #GListModel bound to @self or %NULL
a #HdyComboRow
Gets the index of the selected item in its #GListModel.
the index of the selected item, or -1 if no item is selected
a #GtkListBoxRow
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 #GtkListBoxRow
Creates a model for @enum_type and binds it to @self. The items of the model
will be #HdyEnumValueObject 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 hdy_combo_row_bind_name_model() if you
want to represent values of an enumeration with names.
See hdy_enum_value_row_name().
a #HdyComboRow
the enumeration #GType 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 HdyComboRow:use-subtitle.
a #HdyComboRow
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 #GListModel.
a #HdyComboRow
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 HdyActionRow:subtitle.
a #HdyComboRow
%TRUE to set the current value as the subtitle
The index of the selected item in its #GListModel.
%TRUE to set 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 hdy_combo_row_set_get_name_func().
If %TRUE, you should not access HdyActionRow:subtitle.
The parent class
Called for combo rows that are bound to an enumeration with
hdy_combo_row_set_for_enum() for each value from that enumeration.
a newly allocated displayable name that represents @value
the value from the enum from which to get a name
user data
Called for combo rows that are bound to a #GListModel with
hdy_combo_row_bind_name_model() for each item that gets added to the model.
a newly allocated displayable name that represents @item
the item from the model from which to get a name
user data
Gets the previous or next child, or %NULL if it doesn't exist. This will be
the same widget hdy_deck_navigate() will navigate to.
the previous or next child, or
%NULL if it doesn't exist.
a #HdyDeck
the direction
Returns whether the #HdyDeck allows swiping to the previous child.
%TRUE if back swipe is enabled.
a #HdyDeck
Returns whether the #HdyDeck allows swiping to the next child.
%TRUE if forward swipe is enabled.
a #HdyDeck
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 #HdyDeck
the name of the child to find
Gets whether @self is homogeneous for the given orientation.
See hdy_deck_set_homogeneous().
whether @self is homogeneous for the given orientation.
a #HdyDeck
the orientation
Returns whether the #HdyDeck is set up to interpolate between
the sizes of children on page switch.
%TRUE if child sizes are interpolated
a #HdyDeck
Returns the amount of time (in milliseconds) that
transitions between children in @self will take.
the child transition duration
a #HdyDeck
Returns whether @self is currently in a transition from one page to
another.
%TRUE if the transition is currently running, %FALSE otherwise.
a #HdyDeck
Gets the type of animation that will be used
for transitions between children in @self.
the current transition type of @self
a #HdyDeck
Gets the visible child widget.
the visible child widget
a #HdyDeck
Gets the name of the currently visible child widget.
the name of the visible child
a #HdyDeck
Inserts @child in the position after @sibling in the list of children.
If @sibling is %NULL, insert @child at the first position.
a #HdyDeck
the #GtkWidget to insert
the sibling after which to insert @child
Switches to the previous or next child, similar to performing a swipe
gesture to go in @direction.
%TRUE if visible child was changed, %FALSE otherwise.
a #HdyDeck
the direction
Inserts @child at the first position in @self.
a #HdyDeck
the #GtkWidget 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 #HdyDeck
the #GtkWidget to move, must be a child of @self
the sibling to move @child after, or %NULL
Sets whether or not @self allows switching to the previous child via a swipe
gesture.
a #HdyDeck
the new value
Sets whether or not @self allows switching to the next child via a swipe
gesture.
a #HdyDeck
the new value
Sets the #HdyDeck to be homogeneous or not for the given orientation.
If it is homogeneous, the #HdyDeck will request the same
width or height for all its children depending on the orientation.
If it isn't, the deck may change width or height when a different child
becomes visible.
a #HdyDeck
the orientation
%TRUE to make @self homogeneous
Sets whether or not @self will interpolate its size when
changing the visible child. If the #HdyDeck: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 #HdyDeck
the new value
Sets the duration that transitions between children in @self
will take.
a #HdyDeck
the new duration, in milliseconds
Sets the type of animation that will be used for transitions between children
in @self.
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 #HdyDeck
the new transition type
Makes @visible_child visible using a transition determined by
HdyDeck:transition-type and HdyDeck:transition-duration. The transition can
be cancelled by the user, in which case visible child will change back to
the previously visible child.
a #HdyDeck
the new child
Makes the child with the name @name visible.
See hdy_deck_set_visible_child() for more details.
a #HdyDeck
the name of a child
Whether or not the deck allows switching to the previous child via a swipe
gesture.
Whether or not the deck allows switching to the next child via a swipe
gesture.
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 name of the widget currently visible.
The parent class
This enumeration value describes the possible transitions between children
in a #HdyDeck 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
Creates a new #HdyExpanderRow.
a new #HdyExpanderRow
Adds an action widget to @self.
a #HdyExpanderRow
the action widget
Adds a prefix widget to @self.
a #HdyExpanderRow
the prefix widget
Gets whether the expansion of @self is enabled.
whether the expansion of @self is enabled.
a #HdyExpanderRow
Gets the icon name for @self.
the icon name for @self.
a #HdyExpanderRow
Gets whether the switch enabling the expansion of @self is visible.
whether the switch enabling the expansion of @self is visible.
a #HdyExpanderRow
Gets the subtitle for @self.
the subtitle for @self, or %NULL.
a #HdyExpanderRow
Gets whether an embedded underline in the text of the title and subtitle
labels indicates a mnemonic. See hdy_expander_row_set_use_underline().
%TRUE if an embedded underline in the title and subtitle labels
indicates the mnemonic accelerator keys.
a #HdyExpanderRow
Sets whether the expansion of @self is enabled.
a #HdyExpanderRow
%TRUE to enable the expansion
Sets the icon name for @self.
a #HdyExpanderRow
the icon name
Sets whether the switch enabling the expansion of @self is visible.
a #HdyExpanderRow
%TRUE to show the switch enabling the expansion
Sets the subtitle for @self.
a #HdyExpanderRow
the subtitle
If true, an underline in the text of the title and subtitle labels indicates
the next character should be used for the mnemonic accelerator key.
a #HdyExpanderRow
%TRUE if underlines in the text indicate mnemonics
%TRUE if the expansion is enabled.
%TRUE if the row is expanded.
The icon name for this row.
%TRUE if the switch enabling the expansion is visible.
The subtitle for this row.
Whether an embedded underline in the text of the title and subtitle labels
indicates a mnemonic.
The parent class
Creates a new #HdyFlap.
a new #HdyFlap
Gets the content widget for @self
the content widget for @self
a #HdyFlap
Gets the flap widget for @self
the flap widget for @self
a #HdyFlap
Gets the flap position for @self.
the flap position for @self
a #HdyFlap
Returns the amount of time (in milliseconds) that fold transitions in @self
will take.
the fold transition duration
a #HdyFlap
Gets the current fold policy of @self. See hdy_flap_set_fold_policy().
the current fold policy of @self
a #HdyFlap
Gets whether @self is currently folded.
See #HdyFlap:fold-policy.
%TRUE if @self is currently folded, %FALSE otherwise
a #HdyFlap
Gets whether @self is locked.
%TRUE if @self is locked, %FALSE otherwise
a #HdyFlap
Gets whether the @self is modal. See hdy_flap_set_modal().
%TRUE if @self is modal
a #HdyFlap
Returns the amount of time (in milliseconds) that reveal transitions in @self
will take.
the reveal transition duration
a #HdyFlap
Gets whether the flap widget is revealed for @self.
%TRUE if the flap widget is revealed, %FALSE otherwise.
a #HdyFlap
Gets the current reveal transition progress for @self. 0 means fully hidden,
1 means fully revealed. See #HdyFlap:reveal-flap.
the current reveal progress for @self
a #HdyFlap
Gets the separator widget for @self.
the separator widget for @self
a #HdyFlap
Gets whether @self can be closed with a swipe gesture.
%TRUE if @self can be closed with a swipe gesture
a #HdyFlap
Gets whether @self can be opened with a swipe gesture.
%TRUE if @self can be opened with a swipe gesture
a #HdyFlap
Gets the type of animation that will be used for reveal and fold transitions
in @self.
the current transition type of @self
a #HdyFlap
Sets the content widget for @self, always displayed when unfolded, and
partially visible when folded.
a #HdyFlap
the content widget, or %NULL
Sets the flap widget for @self, only visible when #HdyFlap:reveal-progress is
greater than 0.
a #HdyFlap
the flap widget, or %NULL
Sets the flap position for @self. If @GTK_PACK_START, the flap is displayed
before the content, if @GTK_PACK_END, it's displayed after the content.
a #HdyFlap
the new value
Sets the duration that fold transitions in @self will take.
a #HdyFlap
the new duration, in milliseconds
Sets the current fold policy for @self. See #HdyFlapFoldPolicy for available
policies.
a #HdyFlap
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,
#HdyFlap:reveal-flap value never changes on its own.
a #HdyFlap
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 Escape key, will close the flap. If %FALSE, clicks are passed
through to the content widget.
a #HdyFlap
Whether @self can be closed with a click
Sets the duration that reveal transitions in @self will take.
a #HdyFlap
the new duration, in milliseconds
Sets whether the flap widget is revealed for @self.
a #HdyFlap
%TRUE to reveal the flap widget, %FALSE otherwise
Sets the separator widget for @self, displayed between content and flap when
there's no shadow to display. When exactly it's visible depends on the
#HdyFlap:transition-type value. If %NULL, no separator will be used.
a #HdyFlap
the separator widget, or %NULL
Sets whether @self can be closed with a swipe gesture.
The area that can be swiped depends on the #HdyFlap:transition-type value.
a #HdyFlap
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 #HdyFlap:transition-type value.
a #HdyFlap
Whether @self can be opened with a swipe gesture
Sets the type of animation that will be used for reveal and fold transitions
in @self.
#HdyFlap: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.
a #HdyFlap
the new transition type
The content widget, always displayed when unfolded, and partially visible
when folded.
The flap widget, only visible when #HdyFlap:reveal-progress is greater than
0.
The flap position for @self. 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 #HdyFlapFoldPolicy for available
policies.
Whether the flap is currently folded.
See #HdyFlap: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,
#HdyFlap: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 Escape 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 #HdyFlap:reveal-flap.
The separator widget, displayed between content and flap when there's no
shadow to display. When exactly it's visible depends on the
#HdyFlap: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 #HdyFlap:transition-type value.
Whether the flap can be opened with a swipe gesture.
The area that can be swiped depends on the #HdyFlap:transition-type value.
The type of animation that will be used for reveal and fold transitions
in @self.
#HdyFlap: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.
These enumeration values describe the possible folding behavior in a #HdyFlap
widget.
Disable folding, the flap cannot reach narrow
sizes.
Keep the flap always folded.
Fold and unfold the flap based on available
space.
These enumeration values describe the possible transitions between children
in a #HdyFlap widget, as well as which areas can be swiped via
#HdyFlap:swipe-to-open and #HdyFlap: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.
Creates a new #HdyHeaderBar widget.
a new #HdyHeaderBar
Gets the policy @self follows to horizontally align its center widget.
the centering policy
a #HdyHeaderBar
Retrieves the custom title widget of the header. See
hdy_header_bar_set_custom_title().
the custom title widget
of the header, or %NULL if none has been set explicitly.
a #HdyHeaderBar
Gets the decoration layout set with
hdy_header_bar_set_decoration_layout().
the decoration layout
a #HdyHeaderBar
Retrieves whether the header bar reserves space for
a subtitle, regardless if one is currently set or not.
%TRUE if the header bar reserves space
for a subtitle
a #HdyHeaderBar
Gets whether @self should interpolate its size on visible child change.
See hdy_header_bar_set_interpolate_size().
%TRUE if @self interpolates its size on visible child change, %FALSE if not
A #HdyHeaderBar
Returns whether this header bar shows the standard window
decorations.
%TRUE if the decorations are shown
a #HdyHeaderBar
Retrieves the subtitle of the header. See hdy_header_bar_set_subtitle().
the subtitle of the header, or %NULL if none has
been set explicitly. The returned string is owned by the widget
and must not be modified or freed.
a #HdyHeaderBar
Retrieves the title of the header. See hdy_header_bar_set_title().
the title of the header, or %NULL if none has
been set explicitly. The returned string is owned by the widget
and must not be modified or freed.
a #HdyHeaderBar
Returns the amount of time (in milliseconds) that
transitions between pages in @self will take.
the transition duration
a #HdyHeaderBar
Returns whether the @self is currently in a transition from one page to
another.
%TRUE if the transition is currently running, %FALSE otherwise.
a #HdyHeaderBar
Adds @child to @self:, packed with reference to the
end of the @self:.
A #HdyHeaderBar
the #GtkWidget to be added to @self:
Adds @child to @self:, packed with reference to the
start of the @self:.
A #HdyHeaderBar
the #GtkWidget to be added to @self:
Sets the policy @self must follow to horizontally align its center widget.
a #HdyHeaderBar
the centering policy
Sets a custom title for the #HdyHeaderBar.
The title should help a user identify the current view. This
supersedes any title set by hdy_header_bar_set_title() or
hdy_header_bar_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 #HdyHeaderBar
a custom widget to use for a title
Sets the decoration layout for this header bar, overriding
the #GtkSettings:gtk-decoration-layout setting.
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 left
from those on the right. 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.
a #HdyHeaderBar
a decoration layout, or %NULL to unset the layout
Sets whether the header bar should reserve space
for a subtitle, even if none is currently set.
a #HdyHeaderBar
%TRUE to reserve space for a subtitle
Sets whether or not @self will interpolate the size of its opposing
orientation when changing the visible child. If %TRUE, @self 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 @self is horizontal, it will interpolate the its height.
A #HdyHeaderBar
%TRUE to interpolate the size
Sets whether this header bar shows the standard window decorations,
including close, maximize, and minimize.
a #HdyHeaderBar
%TRUE to show standard window decorations
Sets the subtitle of the #HdyHeaderBar. The title should give a user
an additional detail to help them identify the current view.
Note that HdyHeaderBar by default reserves room for the subtitle,
even if none is currently set. If this is not desired, set the
#HdyHeaderBar:has-subtitle property to %FALSE.
a #HdyHeaderBar
a subtitle, or %NULL
Sets the title of the #HdyHeaderBar. The title should help a user
identify the current view. A good title should not include the
application name.
a #HdyHeaderBar
a title, or %NULL
Sets the duration that transitions between pages in @self
will take.
a #HdyHeaderBar
the new duration, in milliseconds
The decoration layout for buttons. If this property is
not set, the #GtkSettings:gtk-decoration-layout setting
is used.
See hdy_header_bar_set_decoration_layout() for information
about the format of this string.
Set to %TRUE if #HdyHeaderBar:decoration-layout is set.
If %TRUE, reserve space for a subtitle, even if none
is currently set.
Whether to show window decorations.
Which buttons are actually shown and where is determined
by the #HdyHeaderBar: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 parent class
Adds @header_bar to @self.
When the widget is destroyed or no longer referenced elsewhere, it will
be removed from the header group.
a #HdyHeaderGroup
the #GtkHeaderBar 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 #HdyHeaderGroup
the #HdyHeaderBar 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 #HdyHeaderGroup
the #HdyHeaderGroup to add
Returns the list of children associated with @self.
the #GSList of
children. The list is owned by libhandy and should not be modified.
a #HdyHeaderGroup
Gets whether the elements of the group should all receive the full decoration.
%TRUE if the elements of the group should all receive the full
decoration, %FALSE otherwise.
a #HdyHeaderGroup
Removes @child from @self.
a #HdyHeaderGroup
the #HdyHeaderGroupChild to remove
Removes @header_bar from @self.
a #HdyHeaderGroup
the #GtkHeaderBar to remove
Removes @header_bar from @self.
a #HdyHeaderGroup
the #HdyHeaderBar to remove
Removes a nested #HdyHeaderGroup from a #HdyHeaderGroup
a #HdyHeaderGroup
the #HdyHeaderGroup to remove
Sets whether the elements of the group should all receive the full decoration.
a #HdyHeaderGroup
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 #HdyLeaflet: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.
Gets the child type.
the child type.
a #HdyHeaderGroupChild
Gets the child #GtkHeaderBar.
Use hdy_header_group_child_get_child_type() to check the child type.
the child #GtkHeaderBar, or %NULL in case of error.
a #HdyHeaderGroupChild
Gets the child #HdyHeaderBar.
Use hdy_header_group_child_get_child_type() to check the child type.
the child #HdyHeaderBar, or %NULL in case of error.
a #HdyHeaderGroupChild
Gets the child #HdyHeaderGroup.
Use hdy_header_group_child_get_child_type() to check the child type.
the child #HdyHeaderGroup, or %NULL in case of error.
a #HdyHeaderGroupChild
This enumeration value describes the child types handled by #HdyHeaderGroup.
New values may be added to this enumeration over time.
The child is a #HdyHeaderBar
The child is a #GtkHeaderBar
The child is a #HdyHeaderGroup
Create a new #HdyKeypad widget.
the newly created #HdyKeypad widget
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 #HdyKeypad
Returns the widget for the lower right corner (or left, in RTL locales) of
@self.
the end action widget
a #HdyKeypad
Get the connected entry. See hdy_keypad_set_entry() for details.
the set #GtkEntry or %NULL if no widget was set
a #HdyKeypad
Returns whether @self should display the standard letters below the digits on
its buttons.
whether the letters below the digits should be visible
a #HdyKeypad
Returns the amount of space between the rows of @self.
the row spacing of @self
a #HdyKeypad
Returns the widget for the lower left corner (or right, in RTL locales) of
@self.
the start action widget
a #HdyKeypad
Returns whether @self should display the standard letters below the digits on
its buttons.
Returns Whether @self should display the hash and asterisk buttons, and
should display the plus symbol at the bottom of its 0 button.
whether the hash, plus, and asterisk symbols should be visible
a #HdyKeypad
Sets the amount of space between columns of @self.
a #HdyKeypad
the amount of space to insert between columns
Sets the widget for the lower right corner (or left, in RTL locales) of
@self.
a #HdyKeypad
the end action widget
Binds @entry to @self and blocks any input which wouldn't be possible to type
with with the keypad.
a #HdyKeypad
a #GtkEntry
Sets whether @self should display the standard letters below the digits on
its buttons.
a #HdyKeypad
whether the letters below the digits should be visible
Sets the amount of space between rows of @self.
a #HdyKeypad
the amount of space to insert between rows
Sets the widget for the lower left corner (or right, in RTL locales) of
@self.
a #HdyKeypad
the start action widget
Sets whether @self should display the hash and asterisk buttons, and should
display the plus symbol at the bottom of its 0 button.
a #HdyKeypad
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. See hdy_keypad_set_entry() for
details.
Whether the keypad should display the standard letters below the digits on
its buttons.
The amount of space between two consecutive rows.
The widget for the lower start corner of @self.
Whether the keypad should display the hash and asterisk buttons, and should
display the plus symbol at the bottom of its 0 button.
The parent class
Gets the previous or next child that doesn't have 'navigatable' child
property set to %FALSE, or %NULL if it doesn't exist. This will be the same
widget hdy_leaflet_navigate() will navigate to.
the previous or next child, or
%NULL if it doesn't exist.
a #HdyLeaflet
the direction
Returns whether the #HdyLeaflet allows swiping to the previous child.
%TRUE if back swipe is enabled.
a #HdyLeaflet
Returns whether the #HdyLeaflet allows swiping to the next child.
%TRUE if forward swipe is enabled.
a #HdyLeaflet
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 #HdyLeaflet
the name of the child to find
Returns the amount of time (in milliseconds) that
transitions between children in @self will take.
the child transition duration
a #HdyLeaflet
Returns whether @self is currently in a transition from one page to
another.
%TRUE if the transition is currently running, %FALSE otherwise.
a #HdyLeaflet
Gets whether @self is folded.
whether @self is folded.
a #HdyLeaflet
Gets whether @self is homogeneous for the given fold and orientation.
See hdy_leaflet_set_homogeneous().
whether @self is homogeneous for the given fold and orientation.
a #HdyLeaflet
the fold
the orientation
Returns whether the #HdyLeaflet is set up to interpolate between
the sizes of children on page switch.
%TRUE if child sizes are interpolated
a #HdyLeaflet
Returns the amount of time (in milliseconds) that
transitions between modes in @self will take.
the mode transition duration
a #HdyLeaflet
Gets the type of animation that will be used
for transitions between modes and children in @self.
the current transition type of @self
a #HdyLeaflet
Gets the visible child widget.
the visible child widget
a #HdyLeaflet
Gets the name of the currently visible child widget.
the name of the visible child
a #HdyLeaflet
Inserts @child in the position after @sibling in the list of children.
If @sibling is %NULL, insert @child at the first position.
a #HdyLeaflet
the #GtkWidget to insert
the sibling after which to insert @child
Switches to the previous or next child that doesn't have 'navigatable' child
property set to %FALSE, similar to performing a swipe gesture to go in
@direction.
%TRUE if visible child was changed, %FALSE otherwise.
a #HdyLeaflet
the direction
Inserts @child at the first position in @self.
a #HdyLeaflet
the #GtkWidget 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 #HdyLeaflet
the #GtkWidget to move, must be a child of @self
the sibling to move @child after, or %NULL
Sets whether or not @self allows switching to the previous child that has
'navigatable' child property set to %TRUE via a swipe gesture
a #HdyLeaflet
the new value
Sets whether or not @self allows switching to the next child that has
'navigatable' child property set to %TRUE via a swipe gesture.
a #HdyLeaflet
the new value
Sets the duration that transitions between children in @self
will take.
a #HdyLeaflet
the new duration, in milliseconds
Sets the #HdyLeaflet to be homogeneous or not for the given fold and orientation.
If it is homogeneous, the #HdyLeaflet 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 #HdyLeaflet
the fold
the orientation
%TRUE to make @self homogeneous
Sets whether or not @self will interpolate its size when
changing the visible child. If the #HdyLeaflet: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 #HdyLeaflet
the new value
Sets the duration that transitions between modes in @self
will take.
a #HdyLeaflet
the new duration, in milliseconds
Sets the type of animation that will be used for transitions between modes
and children in @self.
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 #HdyLeaflet
the new transition type
Makes @visible_child visible using a transition determined by
HdyLeaflet:transition-type and HdyLeaflet:child-transition-duration. The
transition can be cancelled by the user, in which case visible child will
change back to the previously visible child.
a #HdyLeaflet
the new child
Makes the child with the name @name visible.
See hdy_leaflet_set_visible_child() for more details.
a #HdyLeaflet
the name of a child
Whether or not the leaflet allows switching to the previous child that has
'navigatable' child property set to %TRUE via a swipe gesture.
Whether or not the leaflet allows switching to the next child that has
'navigatable' child property set to %TRUE via a swipe gesture.
%TRUE if 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.
The type of animation 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.
The parent class
This enumeration value describes the possible transitions between modes and
children in a #HdyLeaflet 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
Represents direction of a swipe navigation gesture in #HdyDeck and
#HdyLeaflet.
Corresponds to start or top, depending on orientation and text direction
Corresponds to end or bottom, depending on orientation and text direction
Creates a new #HdyPreferencesGroup.
a new #HdyPreferencesGroup
the description of @self.
a #HdyPreferencesGroup
Gets the title of @self.
the title of @self.
a #HdyPreferencesGroup
Sets the description for @self.
a #HdyPreferencesGroup
the description
Sets the title for @self.
a #HdyPreferencesGroup
the title
The description for this group of preferences.
The title for this group of preferences.
The parent class
Creates a new #HdyPreferencesPage.
a new #HdyPreferencesPage
Gets the icon name for @self, or %NULL.
the icon name for @self, or %NULL.
a #HdyPreferencesPage
Gets the title of @self, or %NULL.
the title of the @self, or %NULL.
a #HdyPreferencesPage
Sets the icon name for @self.
a #HdyPreferencesPage
the icon name, or %NULL
Sets the title of @self.
a #HdyPreferencesPage
the title of the page, or %NULL
The icon name for this page of preferences.
The title for this page of preferences.
The parent class
Creates a new #HdyPreferencesRow.
a new #HdyPreferencesRow
Gets the title of the preference represented by @self.
the title of the preference represented
by @self, or %NULL.
a #HdyPreferencesRow
Gets whether an embedded underline in the text of the title indicates a
mnemonic. See hdy_preferences_row_set_use_underline().
%TRUE if an embedded underline in the title indicates the mnemonic
accelerator keys.
a #HdyPreferencesRow
Sets the title of the preference represented by @self.
a #HdyPreferencesRow
the title, or %NULL.
If true, an underline in the text of the title indicates the next character
should be used for the mnemonic accelerator key.
a #HdyPreferencesRow
%TRUE if underlines in the text indicate mnemonics
The title of the preference represented by this row.
Whether an embedded underline in the text of the title indicates a
mnemonic.
The parent class
Creates a new #HdyPreferencesWindow.
a new #HdyPreferencesWindow
Closes the current subpage to return back to the preferences, if there is no
presented subpage, this does nothing.
a #HdyPreferencesWindow
Returns whether or not @self allows switching from a subpage to the
preferences via a swipe gesture.
%TRUE if back swipe is enabled.
a #HdyPreferencesWindow
Gets whether search is enabled for @self.
whether search is enabled for @self.
a #HdyPreferencesWindow
Sets @subpage as the window's subpage and present it.
The transition can be cancelled by the user, in which case visible child will
change back to the previously visible child.
a #HdyPreferencesWindow
the subpage
Sets whether or not @self allows switching from a subpage to the preferences
via a swipe gesture.
a #HdyPreferencesWindow
the new value
Sets whether search is enabled for @self.
a #HdyPreferencesWindow
%TRUE to enable search, %FALSE to disable it
Whether or not the window allows closing the subpage via a swipe gesture.
Whether search is enabled.
The parent class
Creates a #HdySearchBar. You will need to tell it about
which widget is going to be your text entry using
hdy_search_bar_connect_entry().
a new #HdySearchBar
Connects the #GtkEntry 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 #HdySearchBar
a #GtkEntry
Returns whether the search mode is on or off.
whether search mode is toggled on
a #HdySearchBar
Returns whether the close button is shown.
whether the close button is shown
a #HdySearchBar
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
hdy_search_bar_connect_entry(), this function will return
immediately with a warning.
## Showing the search bar on key presses
|[<!-- language="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 #HdySearchBar
a #GdkEvent containing key press events
Switches the search mode on or off.
a #HdySearchBar
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 #HdySearchBar
whether the close button will be shown or not
Whether the search mode is on and the search bar shown.
See hdy_search_bar_set_search_mode() for details.
Whether to show the close button in the toolbar.
Creates a new #HdySqueezer container.
a new #HdySqueezer
Gets whether @child is enabled.
See hdy_squeezer_set_child_enabled().
%TRUE if @child is enabled, %FALSE otherwise.
a #HdySqueezer
a child of @self
Gets whether @self is homogeneous.
See hdy_squeezer_set_homogeneous().
%TRUE if @self is homogeneous, %FALSE is not
a #HdySqueezer
Gets whether @self should interpolate its size on visible child change.
See hdy_squeezer_set_interpolate_size().
%TRUE if @self interpolates its size on visible child change, %FALSE if not
A #HdySqueezer
Gets the amount of time (in milliseconds) that transitions between children
in @self will take.
the transition duration
a #HdySqueezer
Gets whether @self is currently in a transition from one child to another.
%TRUE if the transition is currently running, %FALSE otherwise.
a #HdySqueezer
Gets the type of animation that will be used for transitions between children
in @self.
the current transition type of @self
a #HdySqueezer
Gets the currently visible child of @self, or %NULL if there are no visible
children.
the visible child of the #HdySqueezer
a #HdySqueezer
Gets the #HdySqueezer:xalign property for @self.
the xalign property
a #HdySqueezer
Gets the #HdySqueezer:yalign property for @self.
the yalign property
a #HdySqueezer
Make @self enable or disable @child. 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 #HdySqueezer
a child of @self
%TRUE to enable the child, %FALSE to disable it
Sets @self to be homogeneous or not. If it is homogeneous, @self will request
the same size for all its children for its opposite orientation, e.g. if
@self is oriented horizontally and is homogeneous, it will request the same
height for all its children. If it isn't, @self may change size when a
different child becomes visible.
a #HdySqueezer
%TRUE to make @self homogeneous
Sets whether or not @self will interpolate the size of its opposing
orientation when changing the visible child. If %TRUE, @self 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 @self is horizontal, it will interpolate the its height.
A #HdySqueezer
%TRUE to interpolate the size
Sets the duration that transitions between children in @self will take.
a #HdySqueezer
the new duration, in milliseconds
Sets the type of animation that will be used for transitions between children
in @self. 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.
a #HdySqueezer
the new transition type
Sets the #HdySqueezer:xalign property for @self.
a #HdySqueezer
the new xalign value, between 0 and 1
Sets the #HdySqueezer:yalign property for @self.
a #HdySqueezer
the new yalign value, between 0 and 1
The xalign property determines the horizontal alignment of the children
inside the squeezer's size allocation.
Compare this to #GtkWidget:halign, which determines how the squeezer's size
allocation is positioned in the space available for the squeezer.
The range goes from 0 (start) to 1 (end).
This will affect the position of children too wide to fit in the squeezer
as they are fading out.
The yalign property determines the vertical alignment of the children inside
the squeezer's size allocation.
Compare this to #GtkWidget:valign, which determines how the squeezer's size
allocation is positioned in the space available for the squeezer.
The range goes from 0 (top) to 1 (bottom).
This will affect the position of children too tall to fit in the squeezer
as they are fading out.
These enumeration values describe the possible transitions between children
in a #HdySqueezer widget.
No transition
A cross-fade
Creates a new #HdyStatusPage.
a new #HdyStatusPage
Gets the description for @self.
the description for @self, or %NULL.
a #HdyStatusPage
Gets the icon name for @self.
the icon name for @self.
a #HdyStatusPage
Gets the title for @self.
the title for @self, or %NULL.
a #HdyStatusPage
Sets the description for @self.
a #HdyStatusPage
the description
Sets the icon name for @self.
a #HdyStatusPage
the icon name
Sets the title for @self.
a #HdyStatusPage
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.
Create a new #HdySwipeGroup object.
The newly created #HdySwipeGroup object
When the widget is destroyed or no longer referenced elsewhere, it will
be removed from the swipe group.
a #HdySwipeGroup
the #HdySwipeable to add
Returns the list of swipeables associated with @self.
a #GSList of
swipeables. The list is owned by libhandy and should not be modified.
a #HdySwipeGroup
Removes a widget from a #HdySwipeGroup.
a #HdySwipeGroup
the #HdySwipeable to remove
Create a new #HdySwipeTracker object on @widget.
the newly created #HdySwipeTracker object
a #GtkWidget 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.
%TRUE if long swipes are allowed, %FALSE otherwise
a #HdySwipeTracker
Get whether @self can be dragged with mouse pointer.
%TRUE is mouse dragging is allowed
a #HdySwipeTracker
Get whether @self is enabled. When it's not enabled, no events will be
processed. Generally widgets will want to expose this via a property.
%TRUE if @self is enabled
a #HdySwipeTracker
Get whether @self is reversing the swipe direction.
%TRUE is the direction is reversed
a #HdySwipeTracker
Get @self's swipeable widget.
the swipeable widget
a #HdySwipeTracker
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 #HdySwipeTracker
whether to allow long swipes
Set whether @self can be dragged with mouse pointer. This should usually be
%FALSE.
a #HdySwipeTracker
whether to allow mouse dragging
Set whether @self is enabled. When it's not enabled, no events will be
processed. Usually widgets will want to expose this via a property.
a #HdySwipeTracker
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 #HdySwipeTracker
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 #HdySwipeTracker
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 #HdySwipeGroup
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
Gets the progress @self will snap back to after the gesture is canceled.
the cancel progress, unitless
a #HdySwipeable
Gets the swipe distance of @self. This corresponds to how many pixels
1 unit represents.
the swipe distance in pixels
a #HdySwipeable
Gets the current progress of @self
the current progress, unitless
a #HdySwipeable
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 of
@self. The array must be freed with g_free().
a #HdySwipeable
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
#HdySwipeGroup).
If not implemented, the default implementation returns the allocation of
@self, allowing swipes from anywhere.
a #HdySwipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a #GdkRectangle to store the swipe area
Gets the #HdySwipeTracker used by this swipeable widget.
the swipe tracker
a #HdySwipeable
See HdySwipeable::child-switched.
a #HdySwipeable
the index of the child to switch to
Animation duration in milliseconds
Emits HdySwipeable::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 #HdySwipeable
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 #HdySwipeable
Gets the swipe distance of @self. This corresponds to how many pixels
1 unit represents.
the swipe distance in pixels
a #HdySwipeable
Gets the current progress of @self
the current progress, unitless
a #HdySwipeable
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 of
@self. The array must be freed with g_free().
a #HdySwipeable
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
#HdySwipeGroup).
If not implemented, the default implementation returns the allocation of
@self, allowing swipes from anywhere.
a #HdySwipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a #GdkRectangle to store the swipe area
Gets the #HdySwipeTracker used by this swipeable widget.
the swipe tracker
a #HdySwipeable
See HdySwipeable::child-switched.
a #HdySwipeable
the index of the child to switch to
Animation duration in milliseconds
This signal should be emitted when the widget's visible child is changed.
@duration can be 0 if the child is switched without animation.
This is used by #HdySwipeGroup, 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.
a #HdySwipeable
the index of the child to switch to
Animation duration in milliseconds
the swipe tracker
a #HdySwipeable
the swipe distance in pixels
a #HdySwipeable
the snap points of
@self. The array must be freed with g_free().
a #HdySwipeable
location to return the number of the snap points
the current progress, unitless
a #HdySwipeable
the cancel progress, unitless
a #HdySwipeable
a #HdySwipeable
the direction of the swipe
whether the swipe is caused by a dragging gesture
a pointer to a #GdkRectangle to store the swipe area
Creates a new #HdyTabBar widget.
a new #HdyTabBar
Gets whether the tabs automatically hide, see hdy_tab_bar_set_autohide().
whether the tabs automatically hide
a #HdyTabBar
Gets the widget shown after the tabs.
the widget shown after the tabs, or %NULL
a #HdyTabBar
Gets whether tabs should expand, see hdy_tab_bar_set_expand_tabs().
whether tabs should expand
a #HdyTabBar
Gets extra drag destination targets, see
hdy_tab_bar_set_extra_drag_dest_targets().
extra drag targets, or %NULL
a #HdyTabBar
Gets whether tabs use inverted layout, see hdy_tab_bar_set_inverted().
whether tabs use inverted layout
a #HdyTabBar
Gets whether @self is overflowing.
whether @self is overflowing
a #HdyTabBar
Gets the widget shown before the tabs.
the widget shown before the tabs, or %NULL
a #HdyTabBar
Gets the value of the #HdyTabBar:tabs-revealed property.
whether the tabs are current revealed
a #HdyTabBar
Gets the #HdyTabView @self controls.
the #HdyTabView @self controls
a #HdyTabBar
Sets whether the tabs automatically hide.
If @autohide is %TRUE, the tab bar disappears when the associated #HdyTabView
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
Autohide is enabled by default.
See #HdyTabBar:tabs-revealed.
a #HdyTabBar
whether the tabs automatically hide
Sets the widget to show after the tabs.
a #HdyTabBar
the widget to show after the tabs, or %NULL
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 #HdyTabBar
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 #HdyTabBar::extra-drag-data-received signal can
be used to retrieve and process the drag data.
a #HdyTabBar
extra drag targets, or %NULL
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 #HdyTabBar
whether tabs use inverted layout
Sets the widget to show before the tabs.
a #HdyTabBar
the widget to show before the tabs, or %NULL
Sets the #HdyTabView @self controls.
a #HdyTabBar
a #HdyTabView
Whether tabs automatically hide.
If set to %TRUE, the tab bar disappears when the associated #HdyTabView
has 0 or 1 tab, no pinned tabs, and no tab is being transferred.
See #HdyTabBar: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 #HdyTabBar::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 HdyTabBar:autohide.
The #HdyTabView the tab bar controls.
This signal is emitted when content allowed via
#HdyTabBar:extra-drag-dest-targets is dropped onto a tab.
See #GtkWidget::drag-data-received.
the #HdyTabPage 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 #GtkTargetList
the timestamp at which the data was received
Gets the child of @self.
the child of @self
a #HdyTabPage
Gets the icon of @self, see hdy_tab_page_set_icon().
the icon of @self
a #HdyTabPage
Gets whether the indicator of @self is activatable, see
hdy_tab_page_set_indicator_activatable().
whether the indicator is activatable
a #HdyTabPage
Gets the indicator icon of @self, see hdy_tab_page_set_indicator_icon().
the indicator icon of @self
a #HdyTabPage
Gets whether @self is loading, see hdy_tab_page_set_loading().
whether @self is loading
a #HdyTabPage
Gets whether @self needs attention, see hdy_tab_page_set_needs_attention().
whether @self needs attention
a #HdyTabPage
Gets the parent page of @self, or %NULL if the @self does not have a parent.
See hdy_tab_view_add_page() and hdy_tab_view_close_page().
the parent page of @self, or %NULL
a #HdyTabPage
Gets whether @self is pinned. See hdy_tab_view_set_page_pinned().
whether @self is pinned
a #HdyTabPage
Gets whether @self is selected. See hdy_tab_view_set_selected_page().
whether @self is selected
a #HdyTabPage
Gets the title of @self, see hdy_tab_page_set_title().
the title of @self
a #HdyTabPage
Gets the tooltip of @self, see hdy_tab_page_set_tooltip().
the tooltip of @self
a #HdyTabPage
Sets the icon of @self, displayed next to the title.
#HdyTabBar will not show the icon if #HdyTabPage:loading is set to %TRUE,
or if @self is pinned and #HdyTabPage:indicator-icon is set.
a #HdyTabPage
the icon of @self
sets whether the indicator of @self is activatable.
If set to %TRUE, #HdyTabView::indicator-activated will be emitted when
the indicator is clicked.
If #HdyTabPage:indicator-icon is not set, does nothing.
a #HdyTabPage
whether the indicator is activatable
Sets the indicator icon of @self.
A common use case is an audio or camera indicator in a web browser.
#HdyTabPage will show it at the beginning of the tab, alongside icon
representing #HdyTabPage:icon or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or spinner.
If #HdyTabPage:indicator-activatable is set to %TRUE, indicator icon
can act as a button.
a #HdyTabPage
the indicator icon of @self
Sets wether @self is loading.
If set to %TRUE, #HdyTabBar will display a spinner in place of icon.
If @self is pinned and #HdyTabPage:indicator-icon is set, the loading status
will not be visible.
a #HdyTabPage
whether @self is loading
Sets whether @self needs attention.
#HdyTabBar will display a glow under the tab representing @self if set to
%TRUE. If the tab is not visible, the corresponding edge of the tab bar will
be highlighted.
a #HdyTabPage
whether @self needs attention
Sets the title of @self.
#HdyTabBar will display it in the center of the tab representing @self
unless it's pinned, and will use it as a tooltip unless #HdyTabPage:tooltip
is set.
a #HdyTabPage
the title of @self
Sets the tooltip of @self, marked up with the Pango text markup language.
If not set, #HdyTabBar will use #HdyTabPage:title as a tooltip instead.
a #HdyTabPage
the tooltip of @self
The child of the page.
The icon of the page, displayed next to the title.
#HdyTabBar will not show the icon if #HdyTabPage:loading is set to %TRUE,
or if the page is pinned and #HdyTabPage:indicator-icon is set.
Whether the indicator icon is activatable.
If set to %TRUE, #HdyTabView::indicator-activated will be emitted when
the indicator icon is clicked.
If #HdyTabPage: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.
#HdyTabPage will show it at the beginning of the tab, alongside icon
representing #HdyTabPage:icon or loading spinner.
If the page is pinned, the indicator will be shown instead of icon or
spinner.
If #HdyTabPage:indicator-activatable is set to %TRUE, the indicator icon
can act as a button.
Whether the page is loading.
If set to %TRUE, #HdyTabBar will display a spinner in place of icon.
If the page is pinned and #HdyTabPage:indicator-icon is set, the loading
status will not be visible.
Whether the page needs attention.
#HdyTabBar 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 hdy_tab_view_add_page() and hdy_tab_view_close_page().
Whether the page is pinned. See hdy_tab_view_set_page_pinned().
Whether the page is selected.
The title of the page.
#HdyTabBar will display it in the center of the tab unless it's pinned,
and will use it as a tooltip unless #HdyTabPage:tooltip is set.
The tooltip of the page, marked up with the Pango text markup language.
If not set, #HdyTabBar will use #HdyTabPage:title as a tooltip instead.
Creates a new #HdyTabView widget.
a new #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
hdy_tab_view_close_page()).
If @parent is %NULL, this function is equivalent to hdy_tab_view_append().
the page object representing @child
a #HdyTabView
a widget to add
a parent page for @child, or %NULL
Inserts @child as the last non-pinned page.
the page object representing @child
a #HdyTabView
a widget to add
Inserts @child as the last pinned page.
the page object representing @child
a #HdyTabView
a widget to add
Requests to close all pages other than @page.
a #HdyTabView
a page of @self
Requests to close @page.
Calling this function will result in #HdyTabView::close-page signal being
emitted for @page. Closing the page can then be confirmed or denied via
hdy_tab_view_close_page_finish().
If the page is waiting for a hdy_tab_view_close_page_finish() call, this
function will do nothing.
The default handler for #HdyTabView::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 #HdyTabPage: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 #HdyTabView
a page of @self
Completes a hdy_tab_view_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 hdy_tab_view_close_page() can be called
for it again.
This function should not be called unless a custom handler for
#HdyTabView::close-page is used.
a #HdyTabView
a page of @self
whether to confirm or deny closing @page
Requests to close all pages after @page.
a #HdyTabView
a page of @self
Requests to close all pages before @page.
a #HdyTabView
a page of @self
Gets default icon of @self, see hdy_tab_view_set_default_icon().
the default icon of @self.
a #HdyTabView
Whether a page is being transferred.
Gets the value of #HdyTabView:is-transferring-page property.
whether a page is being transferred
a #HdyTabView
Gets the tab context menu model for @self, see hdy_tab_view_set_menu_model().
the tab context menu model for @self
a #HdyTabView
Gets the number of pages in @self.
the number of pages in @self
a #HdyTabView
Gets the number of pinned pages in @self.
See hdy_tab_view_set_page_pinned().
the number of pinned pages in @self
a #HdyTabView
Gets the #HdyTabPage representing the child at @position.
the page object at @position
a #HdyTabView
the index of the page in @self, starting from 0
Gets the #HdyTabPage object representing @child.
the #HdyTabPage representing @child
a #HdyTabView
a child in @self
Finds the position of @page in @self, starting from 0.
the position of @page in @self
a #HdyTabView
a page of @self
Returns a #GListModel 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 #HdyTabView
Gets the currently selected page in @self.
the selected page in @self
a #HdyTabView
Gets the shortcut widget for @self, see hdy_tab_view_set_shortcut_widget().
the shortcut widget for @self
a #HdyTabView
Inserts a non-pinned page at @position.
It's an error to try to insert a page before a pinned page, in that case
hdy_tab_view_insert_pinned() should be used instead.
the page object representing @child
a #HdyTabView
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 hdy_tab_view_insert() should be used instead.
the page object representing @child
a #HdyTabView
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 #HdyTabView
a widget to add
Inserts @child as the first pinned page.
the page object representing @child
a #HdyTabView
a widget to add
Reorders @page to before its previous page if possible.
%TRUE if @page was moved, %FALSE otherwise
a #HdyTabView
a page of @self
Reorders @page to the first possible position.
%TRUE if @page was moved, %FALSE otherwise
a #HdyTabView
a page of @self
Reorders @page to after its next page if possible.
%TRUE if @page was moved, %FALSE otherwise
a #HdyTabView
a page of @self
Reorders @page to the last possible position.
%TRUE if @page was moved, %FALSE otherwise
a #HdyTabView
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.
%TRUE if @page was moved, %FALSE otherwise
a #HdyTabView
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.
%TRUE if the selected page was changed, %FALSE otherwise
a #HdyTabView
Selects the page before the currently selected page.
If the first page was already selected, this function does nothing.
%TRUE if the selected page was changed, %FALSE otherwise
a #HdyTabView
Sets default page icon for @self.
If a page doesn't provide its own icon via #HdyTabPage:icon, default icon
may be used instead for contexts where having an icon is necessary.
#HdyTabBar 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 #HdyTabView
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 #HdyTabView::setup-menu signal to set up the menu
actions for the particular tab.
a #HdyTabView
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 #HdyTabView: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.
#HdyTabBar 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. #HdyTabPage:indicator-icon
2. A spinner if #HdyTabPage:loading is %TRUE
3. #HdyTabPage:icon
4. #HdyTabView:default-icon
Pinned pages cannot be closed by default, see #HdyTabView::close-page for how
to override that behavior.
a #HdyTabView
a page of @self
whether @page should be pinned
Sets the currently selected page in @self.
a #HdyTabView
a page in @self
Sets the shortcut widget for @self.
Registers the following shortcuts on @widget:
* Ctrl+Page Up - switch to the previous page
* Ctrl+Page Down - switch to the next page
* Ctrl+Home - switch to the first page
* Ctrl+End - switch to the last page
* Ctrl+Shift+Page Up - move the current page backward
* Ctrl+Shift+Page Down - move the current page forward
* Ctrl+Shift+Home - move the current page at the start
* Ctrl+Shift+End - move the current page at the end
* Ctrl+Tab - switch to the next page, with looping
* Ctrl+Shift+Tab - switch to the previous page, with looping
* Alt+1-9 - switch to pages 1-9
* Alt+0 - switch to page 10
These shortcuts are always available on @self, this function is useful if
they should be available globally.
a #HdyTabView
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 #HdyTabView
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 #HdyTabPage:icon, default icon
may be used instead for contexts where having an icon is necessary.
#HdyTabBar 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 #HdyTabView, 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 #HdyTabView::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 hdy_tab_view_set_page_pinned().
The currently selected page.
Tab shortcut widget, has the following shortcuts:
* Ctrl+Page Up - switch to the previous page
* Ctrl+Page Down - switch to the next page
* Ctrl+Home - switch to the first page
* Ctrl+End - switch to the last page
* Ctrl+Shift+Page Up - move the current page backward
* Ctrl+Shift+Page Down - move the current page forward
* Ctrl+Shift+Home - move the current page at the start
* Ctrl+Shift+End - move the current page at the end
* Ctrl+Tab - switch to the next page, with looping
* Ctrl+Shift+Tab - switch to the previous page, with looping
* Alt+1-9 - switch to pages 1-9
* Alt+0 - switch to page 10
These shortcuts are always available on @self, this property is useful if
they should be available globally.
This signal is emitted after hdy_tab_view_close_page() has been called for
@page.
The handler is expected to call hdy_tab_view_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:
|[<!-- language="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 hdy_tab_view_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 @self
This signal is emitted when a tab is dropped onto desktop and should be
transferred into a new window.
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 #HdyTabView from the new window
This signal is emitted after the indicator icon on @page has been activated.
See #HdyTabPage:indicator-icon and #HdyTabPage:indicator-activatable.
a page of @self
This signal is emitted when a page has been created or transferred to
@self.
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 @self
the position of the page, starting from 0
This signal is 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 #HdyTabView::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
hdy_tab_view_close_page_finish() calls.
a page of @self
the position of the removed page, starting from 0
This signal is emitted after @page has been reordered to @position.
a page of @self
the position @page was moved to, starting at 0
This signal is emitted before a context menu is opened for @page, and after
it's closed, in the latter case the @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, or %NULL
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 #HdyTitleBar
Sets whether @self is in selection mode.
a #HdyTitleBar
%TRUE to enable the selection mode
Create a new #HdyValueObject.
a new #HdyValueObject
the #GValue to store
Creates a new #HdyValueObject. This is a convenience method which uses
the G_VALUE_COLLECT() macro internally.
a new #HdyValueObject
the #GType of the value
the value to store
Creates a new #HdyValueObject. This is a convenience method to create a
#HdyValueObject that stores a string.
a new #HdyValueObject
the string to store
Creates a new #HdyValueObject. This is a convenience method to create a
#HdyValueObject that stores a string taking ownership of it.
a new #HdyValueObject
the string to store
Copy data from the contained #GValue into @dest.
the #HdyValueObject
#GValue with correct type to copy into
Returns a copy of the contained string if the value is of type
#G_TYPE_STRING.
a copy of the contained string
the #HdyValueObject
Returns the contained string if the value is of type #G_TYPE_STRING.
the contained string
the #HdyValueObject
Return the contained value.
the contained #GValue
the #HdyValueObject
Creates a new #HdyViewSwitcher widget.
a new #HdyViewSwitcher
Get the ellipsizing position of the narrow mode label. See
hdy_view_switcher_set_narrow_ellipsize().
#PangoEllipsizeMode
a #HdyViewSwitcher
Gets the policy of @self.
the policy of @self
a #HdyViewSwitcher
Get the #GtkStack being controlled by the #HdyViewSwitcher.
See: hdy_view_switcher_set_stack()
the #GtkStack, or %NULL if none has been set
a #HdyViewSwitcher
Set the mode used to ellipsize the text in narrow mode if there is not
enough space to render the entire string.
a #HdyViewSwitcher
a #PangoEllipsizeMode
Sets the policy of @self.
a #HdyViewSwitcher
the new policy
Sets the #GtkStack to control.
a #HdyViewSwitcher
a #GtkStack
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
#PangoEllipsizeMode.
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 #HdyViewSwitcherPolicy the view switcher should use to determine which
mode to use.
The #GtkStack the view switcher controls.
Creates a new #HdyViewSwitcherBar widget.
a new #HdyViewSwitcherBar
Gets the policy of @self.
the policy of @self
a #HdyViewSwitcherBar
Gets whether @self should be revealed or not.
%TRUE if @self is revealed, %FALSE if not.
a #HdyViewSwitcherBar
Get the #GtkStack being controlled by the #HdyViewSwitcher.
the #GtkStack, or %NULL if none has been set
a #HdyViewSwitcherBar
Sets the policy of @self.
a #HdyViewSwitcherBar
the new policy
Sets whether @self should be revealed or not.
a #HdyViewSwitcherBar
%TRUE to reveal @self
Sets the #GtkStack to control.
a #HdyViewSwitcherBar
a #GtkStack
The #HdyViewSwitcherPolicy the #HdyViewSwitcher should use to determine
which mode to use.
Whether the bar should be revealed or hidden.
The #GtkStack the #HdyViewSwitcher controls.
Automatically adapt to the best fitting mode
Force the narrow mode
Force the wide mode
Creates a new #HdyViewSwitcherTitle widget.
a new #HdyViewSwitcherTitle
Gets the policy of @self.
the policy of @self
a #HdyViewSwitcherTitle
Get the #GtkStack being controlled by the #HdyViewSwitcher.
the #GtkStack, or %NULL if none has been set
a #HdyViewSwitcherTitle
Gets the subtitle of @self. See hdy_view_switcher_title_set_subtitle().
the subtitle of @self, or %NULL.
a #HdyViewSwitcherTitle
Gets the title of @self. See hdy_view_switcher_title_set_title().
the title of @self, or %NULL.
a #HdyViewSwitcherTitle
Get whether the title label of @self is visible.
%TRUE if the title label of @self is visible, %FALSE if not.
a #HdyViewSwitcherTitle
Gets whether @self's view switcher is enabled.
See hdy_view_switcher_title_set_view_switcher_enabled().
%TRUE if the view switcher is enabled, %FALSE otherwise.
a #HdyViewSwitcherTitle
Sets the policy of @self.
a #HdyViewSwitcherTitle
the new policy
Sets the #GtkStack to control.
a #HdyViewSwitcherTitle
a #GtkStack
Sets the subtitle of @self. The subtitle should give a user additional
details.
a #HdyViewSwitcherTitle
a subtitle, or %NULL
Sets the title of @self. The title should give a user additional details. A
good title should not include the application name.
a #HdyViewSwitcherTitle
a title, or %NULL
Make @self enable or disable its view switcher. If it is disabled, the title
will be displayed instead. This allows to programmatically and prematurely
hide the view switcher of @self 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 #HdyViewSwitcherTitle
%TRUE to enable the view switcher, %FALSE to disable it
The #HdyViewSwitcherPolicy the #HdyViewSwitcher should use to determine
which mode to use.
The #GtkStack the #HdyViewSwitcher controls.
The subtitle of the #HdyViewSwitcher.
The title of the #HdyViewSwitcher.
Whether the bar should be revealed or hidden.
Whether the bar should be revealed or hidden.
Creates a new #HdyWindow.
a newly created #HdyWindow
Creates a new #HdyWindowHandle.
a newly created #HdyWindowHandle
Computes the ease out for @t.
the ease out for @t.
the term
This is a default implementation of #HdyComboRowGetEnumValueNameFunc to be
used with hdy_combo_row_set_for_enum(). If the enumeration has a nickname, it
will return it, otherwise it will return its name.
a newly allocated displayable name that represents @value
the value from the enum from which to get a name
unused user data
Returns whether animations are enabled for that widget. This should be used
when implementing an animated widget to know whether to animate it or not.
%TRUE if animations are enabled for @widget.
a #GtkWidget
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 GtkWindow implementation of the GtkBuildable interface supports setting a
child at its end by omitting the “type” attribute of a <child> element.
It also supports setting 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.
Animation helpers.
HdyApplicationWindow is a #GtkApplicationWindow subclass providing the same
features as #HdyWindow.
See #HdyWindow for details.
Using gtk_application_set_app_menu() and gtk_application_set_menubar() is
not supported and may result in visual glitches.
#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 #HdyAvatar:text
on top of a colord background.
The color is picked based on the hash of the #HdyAvatar:text.
If #HdyAvatar:show-initials is set to %FALSE, `avatar-default-symbolic` is
shown in place of the initials.
Use hdy_avatar_set_loadable_icon() or #HdyAvatar:loadable-icon to set a
custom image.
# CSS nodes
#HdyAvatar has a single CSS node with name avatar.
The #HdyCarousel widget can be used to display a set of pages with
swipe-based navigation between them.
# CSS nodes
#HdyCarousel has a single CSS node with name carousel.
The #HdyCarouselIndicatorDots widget can be used to show a set of dots for each
page of a given #HdyCarousel. 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.
# CSS nodes
#HdyCarouselIndicatorDots has a single CSS node with name carouselindicatordots.
The #HdyCarouselIndicatorLines widget can be used to show a set of thin and long
rectangles for each page of a given #HdyCarousel. The carousel's active page
is shown with another rectangle that moves between them to match the
carousel's position.
# CSS nodes
#HdyCarouselIndicatorLines has a single CSS node with name carouselindicatorlines.
The #HdyClamp widget constraints 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.
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 #HdyComboRow uses the model-view pattern; the list of valid choices
is specified in the form of a #GListModel, and the display of the choices can
be adapted to the data in the model via widget creation functions.
#HdyComboRow is #GtkListBoxRow: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 #GtkScrolledWindow, which in turn contains a #GtkListBox, both are
accessible via their regular nodes.
A checkmark of node and style class image.checkmark in the popover denotes
the current item.
The #HdyDeck widget displays one of the visible children, similar to a
#GtkStack. 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 #HdyWindow or #HdyApplicationWindow as they will crop anything drawn
beyond the rounded corners.
# CSS nodes
#HdyDeck has a single CSS node with name deck.
The #HdyEnumValueObject object represents a #GEnumValue, allowing it to be
used with #GListModel.
The #HdyExpanderRow 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.
It also supports adding a child as an action widget by specifying “action” as
the “type” attribute of a <child> element. It also supports setting a
child 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.
The #HdyFlap widget can display its children like a #GtkBox does or like a
#GtkOverlay does, according to the #HdyFlap:fold-policy value.
#HdyFlap has at most three children: #HdyFlap:content, #HdyFlap:flap and
#HdyFlap: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 #HdyFlap:reveal-flap value, as well as via swipe gestures if
#HdyFlap:swipe-to-open and/or #HdyFlap: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.
#HdyFlap:flap is transparent by default; add the .background style class to
it if this is unwanted.
If #HdyFlap:modal is set to %TRUE, content becomes completely inaccessible
when the flap is revealed when folded.
The position of the flap and separator children relative to the content is
determined by orientation, as well as #HdyFlap: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
#HdyFlap: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 #GtkBuildable 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.
HdyHeaderBar is similar to #GtkHeaderBar 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
#HdyViewSwitcher.
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
#HdyWindow or #HdyApplicationWindow.
# CSS nodes
#HdyHeaderBar has a single CSS node with name headerbar.
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 hdy_header_bar_set_decoration_layout().
The #HdyHeaderGroup:decorate-all property can be used in conjunction with
#HdyLeaflet:folded when the title bar is split across the pages of a
#HdyLeaflet 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:
|[
<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>
]|
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.
The #HdyLeaflet widget can display its children like a #GtkBox does or
like a #GtkStack 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” 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 #HdyWindow or #HdyApplicationWindow as they will crop anything drawn
beyond the rounded corners.
# 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.
Before using the Handy library you should initialize it by calling the
hdy_init() function.
This makes sure translations, types, themes, and icons for the Handy library
are set up properly.
A #HdyPreferencesGroup represents a group or tightly related preferences,
which in turn are represented by HdyPreferencesRow.
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 #HdyPreferencesWindow to
let the user look for a preference.
# CSS nodes
#HdyPreferencesGroup has a single CSS node with name preferencesgroup.
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.
The #HdyPreferencesRow widget has a title that #HdyPreferencesWindow will use
to let the user look for a preference. It doesn't present the title in any
way and it lets you present the preference as you please.
#HdyActionRow 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.
The #HdyPreferencesWindow widget presents an application's preferences
gathered into pages and groups. The preferences are searchable by the user.
#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 hdy_search_bar_handle_event() for example code. Common shortcuts
such as Ctrl+F 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 hdy_search_bar_connect_entry().
The following example shows you how to create a more complex search
entry.
HdySearchBar is very similar to #GtkSearchBar, 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 #HdyClamp.
# CSS nodes
#HdySearchBar has a single CSS node with name searchbar.
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 hdy_squeezer_set_transition_type().
# CSS nodes
#HdySqueezer has a single CSS node with name squeezer.
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.
The #HdySwipeGroup object can be used to sync multiple swipeable widgets
that implement the #HdySwipeable interface, such as #HdyCarousel, 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.
|[
<object class="HdySwipeGroup">
<swipeables>
<swipeable name="carousel1"/>
<swipeable name="carousel2"/>
</swipeables>
</object>
]|
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 #HdySwipeTracker:enabled property.
If they expect to use horizontal orientation, #HdySwipeTracker:reversed
property can be used for supporting RTL text direction.
The #HdySwipeable interface is implemented by all swipeable widgets. They
can be synced using #HdySwipeGroup.
See #HdySwipeTracker for details about implementing it.
The #HdyTabBar widget is a tab bar that can be used with conjunction with
#HdyTabView.
#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.
#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 #HdyTabBar.
#HdyTabView maintains a #HdyTabPage object for each page,which holds
additional per-page properties. You can obtain the #HdyTabPage for a page
with hdy_tab_view_get_page(), and as return value for hdy_tab_view_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 #GtkNotebook for use cases
such as tabbed dialogs.
As such, it does not support disabling page reordering or detaching, or
adding children via #GtkBuilder.
# 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.
|[<!-- language="plain" -->
tabview
╰── overlay
├── stack
│ ╰── [ Children ]
╰── widget
]|
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 GtkHeaderBar but it
won't force a widget layout on you: you can put whatever widget you want in
it, including a GtkHeaderBar.
HdyTitleBar becomes really useful when you want to animate header bars, like
an adaptive application using #HdyLeaflet would do.
# CSS nodes
#HdyTitleBar has a single CSS node with name headerbar.
The #HdyValueObject object represents a #GValue, allowing it to be
used with #GListModel.
An adaptive view switcher, designed to switch between multiple views in a
similar fashion than a #GtkStackSwitcher.
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 #GtkHeaderBar, #HdyHeaderBar doesn't force a vertical
alignment on its title widget, so we recommend it over #GtkHeaderBar.
# CSS nodes
#HdyViewSwitcher has a single CSS node with name viewswitcher.
An action bar letting you switch between multiple views offered by a
#GtkStack, via an #HdyViewSwitcher. 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.
You can conveniently bind the #HdyViewSwitcherBar:reveal property to
#HdyViewSwitcherTitle:title-visible to automatically reveal the view switcher
bar when the title label is displayed in place of the view switcher.
An example of the UI definition for a common use case:
|[
<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.
A widget letting you switch between multiple views offered by a #GtkStack,
via an #HdyViewSwitcher. It is designed to be used as the title widget of a
#HdyHeaderBar, 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.
You can conveniently bind the #HdyViewSwitcherBar:reveal property to
#HdyViewSwitcherTitle:title-visible to automatically reveal the view switcher
bar when the title label is displayed in place of the view switcher.
An example of the UI definition for a common use case:
|[
<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.
The HdyWindow widget is a subclass of #GtkWindow 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:
|[
<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 #HdyHeaderBar with #HdyWindow, as unlike
#GtkHeaderBar it remains draggable inside the window. Otherwise,
#HdyWindowHandle can be used.
#HdyWindow allows to easily implement titlebar autohiding by putting the
headerbar inside a #GtkRevealer, and to show titlebar above content by
putting it into a #GtkOverlay instead of #GtkBox.
if the window has a #GtkGLArea, it may bring a slight performance regression
when the window is not fullscreen, tiled or maximized.
Using gtk_window_get_titlebar() and 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.
HdyWindowHandle is a #GtkBin subclass that can be dragged to move its
#GtkWindow, and handles right click, middle click and double click as
expected from a titlebar. This is particularly useful with #HdyWindow or
#HdyApplicationWindow.
It isn't necessary to use #HdyWindowHandle if you use #HdyHeaderBar.
It can be safely nested or used in the actual window titlebar.
# CSS nodes
#HdyWindowHandle has a single CSS node with name windowhandle.
Call this function just after initializing GTK, if you are using
#GtkApplication it means it must be called when the #GApplication::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.