handy

package
v0.0.0-...-bcb4c3b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2022 License: MPL-2.0 Imports: 16 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	GTypeCenteringPolicy    = externglib.Type(C.hdy_centering_policy_get_type())
	GTypeViewSwitcherPolicy = externglib.Type(C.hdy_view_switcher_policy_get_type())
)

glib.Type values for handy.go.

View Source
var (
	GTypeDeckTransitionType = externglib.Type(C.hdy_deck_transition_type_get_type())
	GTypeDeck               = externglib.Type(C.hdy_deck_get_type())
)

glib.Type values for hdy-deck.go.

View Source
var (
	GTypeFlapFoldPolicy     = externglib.Type(C.hdy_flap_fold_policy_get_type())
	GTypeFlapTransitionType = externglib.Type(C.hdy_flap_transition_type_get_type())
	GTypeFlap               = externglib.Type(C.hdy_flap_get_type())
)

glib.Type values for hdy-flap.go.

View Source
var (
	GTypeHeaderGroupChildType = externglib.Type(C.hdy_header_group_child_type_get_type())
	GTypeHeaderGroup          = externglib.Type(C.hdy_header_group_get_type())
	GTypeHeaderGroupChild     = externglib.Type(C.hdy_header_group_child_get_type())
)

glib.Type values for hdy-header-group.go.

View Source
var (
	GTypeLeafletTransitionType = externglib.Type(C.hdy_leaflet_transition_type_get_type())
	GTypeLeaflet               = externglib.Type(C.hdy_leaflet_get_type())
)

glib.Type values for hdy-leaflet.go.

View Source
var (
	GTypeSqueezerTransitionType = externglib.Type(C.hdy_squeezer_transition_type_get_type())
	GTypeSqueezer               = externglib.Type(C.hdy_squeezer_get_type())
)

glib.Type values for hdy-squeezer.go.

glib.Type values for hdy-tab-view.go.

glib.Type values for hdy-action-row.go.

View Source
var GTypeApplicationWindow = externglib.Type(C.hdy_application_window_get_type())

glib.Type values for hdy-application-window.go.

glib.Type values for hdy-avatar.go.

glib.Type values for hdy-carousel.go.

View Source
var GTypeCarouselIndicatorDots = externglib.Type(C.hdy_carousel_indicator_dots_get_type())

glib.Type values for hdy-carousel-indicator-dots.go.

View Source
var GTypeCarouselIndicatorLines = externglib.Type(C.hdy_carousel_indicator_lines_get_type())

glib.Type values for hdy-carousel-indicator-lines.go.

glib.Type values for hdy-clamp.go.

glib.Type values for hdy-combo-row.go.

glib.Type values for hdy-enum-value-object.go.

glib.Type values for hdy-expander-row.go.

glib.Type values for hdy-header-bar.go.

glib.Type values for hdy-keypad.go.

View Source
var GTypeNavigationDirection = externglib.Type(C.hdy_navigation_direction_get_type())

glib.Type values for hdy-navigation-direction.go.

glib.Type values for hdy-preferences-group.go.

glib.Type values for hdy-preferences-page.go.

glib.Type values for hdy-preferences-row.go.

View Source
var GTypePreferencesWindow = externglib.Type(C.hdy_preferences_window_get_type())

glib.Type values for hdy-preferences-window.go.

glib.Type values for hdy-search-bar.go.

glib.Type values for hdy-status-page.go.

glib.Type values for hdy-swipe-group.go.

glib.Type values for hdy-swipe-tracker.go.

glib.Type values for hdy-swipeable.go.

glib.Type values for hdy-tab-bar.go.

glib.Type values for hdy-title-bar.go.

glib.Type values for hdy-value-object.go.

glib.Type values for hdy-view-switcher.go.

glib.Type values for hdy-view-switcher-bar.go.

glib.Type values for hdy-view-switcher-title.go.

glib.Type values for hdy-window.go.

glib.Type values for hdy-window-handle.go.

Functions

func EaseOutCubic

func EaseOutCubic(t float64) float64

EaseOutCubic computes the ease out for t.

The function takes the following parameters:

  • t: term.

The function returns the following values:

  • gdouble: ease out for t.

func EnumValueRowName

func EnumValueRowName(value *EnumValueObject, userData cgo.Handle) string

EnumValueRowName: this is a default implementation of ComboRowGetEnumValueNameFunc 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.

The function takes the following parameters:

  • value from the enum from which to get a name.
  • userData (optional): unused user data.

The function returns the following values:

  • utf8: newly allocated displayable name that represents value.

func GetEnableAnimations

func GetEnableAnimations(widget gtk.Widgetter) bool

GetEnableAnimations 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.

The function takes the following parameters:

  • widget: Widget.

The function returns the following values:

  • ok: TRUE if animations are enabled for widget.

func Init

func Init()

Init: call this function just after initializing GTK, if you are using Application 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.

Types

type ActionRow

type ActionRow struct {
	PreferencesRow
	// contains filtered or unexported fields
}

func NewActionRow

func NewActionRow() *ActionRow

NewActionRow creates a new ActionRow.

The function returns the following values:

  • actionRow: new ActionRow.

func (*ActionRow) ActivatableWidget

func (self *ActionRow) ActivatableWidget() gtk.Widgetter

ActivatableWidget gets the widget activated when self is activated.

The function returns the following values:

  • widget (optional) activated when self is activated, or NULL if none has been set.

func (*ActionRow) Activate

func (self *ActionRow) Activate()

func (*ActionRow) AddPrefix

func (self *ActionRow) AddPrefix(widget gtk.Widgetter)

AddPrefix adds a prefix widget to self.

The function takes the following parameters:

  • widget: prefix widget.

func (*ActionRow) ConnectActivated

func (self *ActionRow) ConnectActivated(f func()) externglib.SignalHandle

ConnectActivated: this signal is emitted after the row has been activated.

func (*ActionRow) IconName

func (self *ActionRow) IconName() string

IconName gets the icon name for self.

The function returns the following values:

  • utf8: icon name for self. The returned string is owned by the ActionRow and should not be freed.

func (*ActionRow) SetActivatableWidget

func (self *ActionRow) SetActivatableWidget(widget gtk.Widgetter)

SetActivatableWidget 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.

The function takes the following parameters:

  • widget (optional): target Widget, or NULL to unset.

func (*ActionRow) SetIconName

func (self *ActionRow) SetIconName(iconName string)

SetIconName sets the icon name for self.

The function takes the following parameters:

  • iconName: icon name.

func (*ActionRow) SetSubtitle

func (self *ActionRow) SetSubtitle(subtitle string)

SetSubtitle sets the subtitle for self.

The function takes the following parameters:

  • subtitle (optional): subtitle.

func (*ActionRow) SetSubtitleLines

func (self *ActionRow) SetSubtitleLines(subtitleLines int)

SetSubtitleLines 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.

The function takes the following parameters:

  • subtitleLines: number of lines at the end of which the subtitle label will be ellipsized.

func (*ActionRow) SetTitleLines

func (self *ActionRow) SetTitleLines(titleLines int)

SetTitleLines 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.

The function takes the following parameters:

  • titleLines: number of lines at the end of which the title label will be ellipsized.

func (*ActionRow) SetUseUnderline

func (self *ActionRow) SetUseUnderline(useUnderline bool)

SetUseUnderline: 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.

The function takes the following parameters:

  • useUnderline: TRUE if underlines in the text indicate mnemonics.

func (*ActionRow) Subtitle

func (self *ActionRow) Subtitle() string

Subtitle gets the subtitle for self.

The function returns the following values:

  • utf8 (optional): subtitle for self, or NULL.

func (*ActionRow) SubtitleLines

func (self *ActionRow) SubtitleLines() int

SubtitleLines 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 function returns the following values:

  • gint: number of lines at the end of which the subtitle label will be ellipsized.

func (*ActionRow) TitleLines

func (self *ActionRow) TitleLines() int

TitleLines 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 function returns the following values:

  • gint: number of lines at the end of which the title label will be ellipsized.

func (*ActionRow) UseUnderline

func (self *ActionRow) UseUnderline() bool

UseUnderline gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See hdy_action_row_set_use_underline().

The function returns the following values:

  • ok: TRUE if an embedded underline in the title and subtitle labels indicates the mnemonic accelerator keys.

type ActionRowOverrider

type ActionRowOverrider interface {
	Activate()
}

ActionRowOverrider contains methods that are overridable.

type ApplicationWindow

type ApplicationWindow struct {
	gtk.ApplicationWindow
	// contains filtered or unexported fields
}

func NewApplicationWindow

func NewApplicationWindow() *ApplicationWindow

NewApplicationWindow creates a new ApplicationWindow.

The function returns the following values:

  • applicationWindow: newly created ApplicationWindow.

type ApplicationWindowOverrider

type ApplicationWindowOverrider interface {
}

ApplicationWindowOverrider contains methods that are overridable.

type Avatar

type Avatar struct {
	gtk.DrawingArea
	// contains filtered or unexported fields
}

func NewAvatar

func NewAvatar(size int, text string, showInitials bool) *Avatar

NewAvatar creates a new Avatar.

The function takes the following parameters:

  • size of the avatar.
  • text (optional) used to generate the color and initials if show_initials is TRUE. The color is selected at random if text is empty.
  • showInitials: whether to show the initials or the fallback icon on top of the color generated based on text.

The function returns the following values:

  • avatar: newly created Avatar.

func (*Avatar) DrawToPixbuf

func (self *Avatar) DrawToPixbuf(size, scaleFactor int) *gdkpixbuf.Pixbuf

DrawToPixbuf renders self into a pixbuf at size and scale_factor. This can be used to export the fallback avatar.

The function takes the following parameters:

  • size of the pixbuf.
  • scaleFactor: scale factor.

The function returns the following values:

  • pixbuf: pixbuf.

func (*Avatar) DrawToPixbufAsync

func (self *Avatar) DrawToPixbufAsync(ctx context.Context, size, scaleFactor int, callback gio.AsyncReadyCallback)

DrawToPixbufAsync renders asynchronously self into a pixbuf at size and scale_factor. This can be used to export the fallback avatar.

The function takes the following parameters:

  • ctx (optional): optional #GCancellable object, NULL to ignore.
  • size of the pixbuf.
  • scaleFactor: scale factor.
  • callback (optional) to call when the avatar is generated.

func (*Avatar) DrawToPixbufFinish

func (self *Avatar) DrawToPixbufFinish(asyncResult gio.AsyncResulter) *gdkpixbuf.Pixbuf

DrawToPixbufFinish finishes an asynchronous draw of an avatar to a pixbuf.

The function takes the following parameters:

  • asyncResult: Result.

The function returns the following values:

  • pixbuf: Pixbuf.

func (*Avatar) IconName

func (self *Avatar) IconName() string

IconName gets the name of the icon in the icon theme to use when the icon should be displayed.

The function returns the following values:

  • utf8 (optional): name of the icon from the icon theme.

func (*Avatar) LoadableIcon

func (self *Avatar) LoadableIcon() *gio.LoadableIcon

LoadableIcon gets the Icon set via hdy_avatar_set_loadable_icon().

The function returns the following values:

  • loadableIcon (optional): Icon.

func (*Avatar) SetIconName

func (self *Avatar) SetIconName(iconName string)

SetIconName 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.

The function takes the following parameters:

  • iconName (optional): name of the icon from the icon theme.

func (*Avatar) SetImageLoadFunc deprecated

func (self *Avatar) SetImageLoadFunc(loadImage AvatarImageLoadFunc)

SetImageLoadFunc: callback which is called when the custom image need to be reloaded for some reason (e.g. scale-factor changes).

Deprecated: use hdy_avatar_set_loadable_icon() instead.

The function takes the following parameters:

  • loadImage (optional): callback to set a custom image.

func (*Avatar) SetLoadableIcon

func (self *Avatar) SetLoadableIcon(icon gio.LoadableIconner)

SetLoadableIcon sets the Icon 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 Icon set via this function is prefered over a set AvatarImageLoadFunc.

The function takes the following parameters:

  • icon (optional): Icon.

func (*Avatar) SetShowInitials

func (self *Avatar) SetShowInitials(showInitials bool)

SetShowInitials sets whether the initials should be shown on the fallback avatar or the icon.

The function takes the following parameters:

  • showInitials: whether the initials should be shown on the fallback avatar or the icon.

func (*Avatar) SetSize

func (self *Avatar) SetSize(size int)

SetSize sets the size of the avatar.

The function takes the following parameters:

  • size to be used for the avatar.

func (*Avatar) SetText

func (self *Avatar) SetText(text string)

SetText: set the text used to generate the fallback initials color.

The function takes the following parameters:

  • text (optional) used to get the initials and color.

func (*Avatar) ShowInitials

func (self *Avatar) ShowInitials() bool

ShowInitials returns whether initials are used for the fallback or the icon.

The function returns the following values:

  • ok: TRUE if the initials are used for the fallback.

func (*Avatar) Size

func (self *Avatar) Size() int

Size returns the size of the avatar.

The function returns the following values:

  • gint: size of the avatar.

func (*Avatar) Text

func (self *Avatar) Text() string

Text: get the text used to generate the fallback initials and color.

The function returns the following values:

  • utf8 (optional) returns the text used to generate the fallback initials. This is the internal string used by the Avatar, and must not be modified.

type AvatarImageLoadFunc deprecated

type AvatarImageLoadFunc func(size int) (pixbuf *gdkpixbuf.Pixbuf)

AvatarImageLoadFunc: returned Pixbuf is expected to be square with width and height set to size. The image is cropped to a circle without any scaling or transformation.

Deprecated: use hdy_avatar_set_loadable_icon() instead.

type AvatarOverrider

type AvatarOverrider interface {
}

AvatarOverrider contains methods that are overridable.

type Carousel struct {
	gtk.EventBox

	*externglib.Object
	gtk.Orientable
	Swipeable
	// contains filtered or unexported fields
}

func NewCarousel

func NewCarousel() *Carousel

NewCarousel: create a new Carousel widget.

The function returns the following values:

  • carousel: newly created Carousel widget.

func (*Carousel) AllowLongSwipes

func (self *Carousel) AllowLongSwipes() bool

AllowLongSwipes: 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.

The function returns the following values:

  • ok: TRUE if long swipes are allowed, FALSE otherwise.

func (*Carousel) AllowMouseDrag

func (self *Carousel) AllowMouseDrag() bool

AllowMouseDrag sets whether self can be dragged with mouse pointer.

The function returns the following values:

  • ok: TRUE if self can be dragged with mouse.

func (*Carousel) AnimationDuration

func (self *Carousel) AnimationDuration() uint

AnimationDuration gets animation duration used by hdy_carousel_scroll_to().

The function returns the following values:

  • guint: animation duration in milliseconds.

func (*Carousel) ConnectPageChanged

func (self *Carousel) ConnectPageChanged(f func(index uint)) externglib.SignalHandle

ConnectPageChanged: 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.

func (*Carousel) Insert

func (self *Carousel) Insert(child gtk.Widgetter, position int)

Insert 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.

The function takes the following parameters:

  • child: widget to add.
  • position to insert child in.

func (*Carousel) Interactive

func (self *Carousel) Interactive() bool

Interactive gets whether self can be navigated.

The function returns the following values:

  • ok: TRUE if self can be swiped.

func (*Carousel) NPages

func (self *Carousel) NPages() uint

NPages gets the number of pages in self.

The function returns the following values:

  • guint: number of pages in self.

func (*Carousel) Position

func (self *Carousel) Position() float64

Position gets current scroll position in self. It's unitless, 1 matches 1 page.

The function returns the following values:

  • gdouble: scroll position.

func (*Carousel) Prepend

func (self *Carousel) Prepend(child gtk.Widgetter)

Prepend prepends child to self.

The function takes the following parameters:

  • child: widget to add.

func (*Carousel) Reorder

func (self *Carousel) Reorder(child gtk.Widgetter, position int)

Reorder moves child into position position.

If position is -1, or larger than the number of pages, child will be moved to the end.

The function takes the following parameters:

  • child: widget to add.
  • position to move child to.

func (*Carousel) RevealDuration

func (self *Carousel) RevealDuration() uint

RevealDuration gets duration of the animation used when adding or removing pages in milliseconds.

The function returns the following values:

  • guint: page reveal duration.

func (*Carousel) ScrollTo

func (self *Carousel) ScrollTo(widget gtk.Widgetter)

ScrollTo scrolls to widget position with an animation. Carousel:animation-duration property can be used for controlling the duration.

The function takes the following parameters:

  • widget: child of self.

func (*Carousel) ScrollToFull

func (self *Carousel) ScrollToFull(widget gtk.Widgetter, duration int64)

ScrollToFull scrolls to widget position with an animation.

The function takes the following parameters:

  • widget: child of self.
  • duration: animation duration in milliseconds.

func (*Carousel) SetAllowLongSwipes

func (self *Carousel) SetAllowLongSwipes(allowLongSwipes bool)

SetAllowLongSwipes 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.

The function takes the following parameters:

  • allowLongSwipes: whether to allow long swipes.

func (*Carousel) SetAllowMouseDrag

func (self *Carousel) SetAllowMouseDrag(allowMouseDrag bool)

SetAllowMouseDrag sets whether self can be dragged with mouse pointer. If allow_mouse_drag is FALSE, dragging is only available on touch.

The function takes the following parameters:

  • allowMouseDrag: whether self can be dragged with mouse pointer.

func (*Carousel) SetAnimationDuration

func (self *Carousel) SetAnimationDuration(duration uint)

SetAnimationDuration sets animation duration used by hdy_carousel_scroll_to().

The function takes the following parameters:

  • duration: animation duration in milliseconds.

func (*Carousel) SetInteractive

func (self *Carousel) SetInteractive(interactive bool)

SetInteractive sets whether self can be navigated. This can be used to temporarily disable a Carousel to only allow swiping in a certain state.

The function takes the following parameters:

  • interactive: whether self can be swiped.

func (*Carousel) SetRevealDuration

func (self *Carousel) SetRevealDuration(revealDuration uint)

SetRevealDuration sets duration of the animation used when adding or removing pages in milliseconds.

The function takes the following parameters:

  • revealDuration: new reveal duration value.

func (*Carousel) SetSpacing

func (self *Carousel) SetSpacing(spacing uint)

SetSpacing sets spacing between pages in pixels.

The function takes the following parameters:

  • spacing: new spacing value.

func (*Carousel) Spacing

func (self *Carousel) Spacing() uint

Spacing gets spacing between pages in pixels.

The function returns the following values:

  • guint: spacing between pages.

type CarouselIndicatorDots

type CarouselIndicatorDots struct {
	gtk.DrawingArea

	*externglib.Object
	gtk.Orientable
	// contains filtered or unexported fields
}

func NewCarouselIndicatorDots

func NewCarouselIndicatorDots() *CarouselIndicatorDots

NewCarouselIndicatorDots: create a new CarouselIndicatorDots widget.

The function returns the following values:

  • carouselIndicatorDots: newly created CarouselIndicatorDots widget.

func (*CarouselIndicatorDots) Carousel

func (self *CarouselIndicatorDots) Carousel() *Carousel

Carousel: get the Carousel the indicator uses.

See: hdy_carousel_indicator_dots_set_carousel().

The function returns the following values:

  • carousel (optional) or NULL if none has been set.

func (*CarouselIndicatorDots) SetCarousel

func (self *CarouselIndicatorDots) SetCarousel(carousel *Carousel)

SetCarousel sets the Carousel to use.

The function takes the following parameters:

  • carousel (optional): Carousel.

type CarouselIndicatorDotsOverrider

type CarouselIndicatorDotsOverrider interface {
}

CarouselIndicatorDotsOverrider contains methods that are overridable.

type CarouselIndicatorLines

type CarouselIndicatorLines struct {
	gtk.DrawingArea

	*externglib.Object
	gtk.Orientable
	// contains filtered or unexported fields
}

func NewCarouselIndicatorLines

func NewCarouselIndicatorLines() *CarouselIndicatorLines

NewCarouselIndicatorLines: create a new CarouselIndicatorLines widget.

The function returns the following values:

  • carouselIndicatorLines: newly created CarouselIndicatorLines widget.

func (*CarouselIndicatorLines) Carousel

func (self *CarouselIndicatorLines) Carousel() *Carousel

Carousel: get the Carousel the indicator uses.

See: hdy_carousel_indicator_lines_set_carousel().

The function returns the following values:

  • carousel (optional) or NULL if none has been set.

func (*CarouselIndicatorLines) SetCarousel

func (self *CarouselIndicatorLines) SetCarousel(carousel *Carousel)

SetCarousel sets the Carousel to use.

The function takes the following parameters:

  • carousel (optional): Carousel.

type CarouselIndicatorLinesOverrider

type CarouselIndicatorLinesOverrider interface {
}

CarouselIndicatorLinesOverrider contains methods that are overridable.

type CarouselOverrider

type CarouselOverrider interface {
}

CarouselOverrider contains methods that are overridable.

type CenteringPolicy

type CenteringPolicy C.gint
const (
	// CenteringPolicyLoose: keep the title centered when possible.
	CenteringPolicyLoose CenteringPolicy = iota
	// CenteringPolicyStrict: keep the title centered at all cost.
	CenteringPolicyStrict
)

func (CenteringPolicy) String

func (c CenteringPolicy) String() string

String returns the name in string for CenteringPolicy.

type Clamp

type Clamp struct {
	gtk.Bin

	*externglib.Object
	gtk.Orientable
	// contains filtered or unexported fields
}

func NewClamp

func NewClamp() *Clamp

NewClamp creates a new Clamp.

The function returns the following values:

  • clamp: new Clamp.

func (*Clamp) MaximumSize

func (self *Clamp) MaximumSize() int

MaximumSize 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 function returns the following values:

  • gint: maximum size to allocate to the contained child.

func (*Clamp) SetMaximumSize

func (self *Clamp) SetMaximumSize(maximumSize int)

SetMaximumSize 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.

The function takes the following parameters:

  • maximumSize: maximum size.

func (*Clamp) SetTighteningThreshold

func (self *Clamp) SetTighteningThreshold(tighteningThreshold int)

SetTighteningThreshold sets the size starting from which the clamp will tighten its grip on the child.

The function takes the following parameters:

  • tighteningThreshold: tightening threshold.

func (*Clamp) TighteningThreshold

func (self *Clamp) TighteningThreshold() int

TighteningThreshold gets the size starting from which the clamp will tighten its grip on the child.

The function returns the following values:

  • gint: size starting from which the clamp will tighten its grip on the child.

type ClampOverrider

type ClampOverrider interface {
}

ClampOverrider contains methods that are overridable.

type ComboRow

type ComboRow struct {
	ActionRow
	// contains filtered or unexported fields
}

func NewComboRow

func NewComboRow() *ComboRow

NewComboRow creates a new ComboRow.

The function returns the following values:

  • comboRow: new ComboRow.

func (*ComboRow) BindModel

func (self *ComboRow) BindModel(model gio.ListModeller, createListWidgetFunc, createCurrentWidgetFunc gtk.ListBoxCreateWidgetFunc)

BindModel 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.

The function takes the following parameters:

  • model (optional) to be bound to self.
  • createListWidgetFunc (optional): function that creates widgets for items to display in the list, or NULL in case you also passed NULL as model.
  • createCurrentWidgetFunc (optional): function that creates widgets for items to display as the selected item, or NULL in case you also passed NULL as model.

func (*ComboRow) BindNameModel

func (self *ComboRow) BindNameModel(model gio.ListModeller, getNameFunc ComboRowGetNameFunc)

BindNameModel 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.

The function takes the following parameters:

  • model (optional) to be bound to self.
  • getNameFunc (optional): function that creates names for items, or NULL in case you also passed NULL as model.

func (*ComboRow) Model

func (self *ComboRow) Model() *gio.ListModel

Model gets the model bound to self, or NULL if none is bound.

The function returns the following values:

  • listModel (optional) bound to self or NULL.

func (*ComboRow) SelectedIndex

func (self *ComboRow) SelectedIndex() int

SelectedIndex gets the index of the selected item in its Model.

The function returns the following values:

  • gint: index of the selected item, or -1 if no item is selected.

func (*ComboRow) SetForEnum

func (self *ComboRow) SetForEnum(enumType externglib.Type, getNameFunc ComboRowGetEnumValueNameFunc)

SetForEnum creates a model for enum_type and binds it to self. The items of the model will be EnumValueObject objects.

If self was already bound to a model, that previous binding is destroyed.

The contents of self are cleared and then filled with widgets that represent items from model. self is updated whenever model changes. If model is NULL, self is left empty.

This is more convenient to use than hdy_combo_row_bind_name_model() if you want to represent values of an enumeration with names.

See hdy_enum_value_row_name().

The function takes the following parameters:

  • enumType: enumeration #GType to be bound to self.
  • getNameFunc (optional): function that creates names for items, or NULL in case you also passed NULL as model.

func (*ComboRow) SetGetNameFunc

func (self *ComboRow) SetGetNameFunc(getNameFunc ComboRowGetNameFunc)

SetGetNameFunc sets a closure to convert items into names. See HdyComboRow:use-subtitle.

The function takes the following parameters:

  • getNameFunc (optional): function that creates names for items, or NULL in case you also passed NULL as model.

func (*ComboRow) SetSelectedIndex

func (self *ComboRow) SetSelectedIndex(selectedIndex int)

SetSelectedIndex sets the index of the selected item in its Model.

The function takes the following parameters:

  • selectedIndex: index of the selected item.

func (*ComboRow) SetUseSubtitle

func (self *ComboRow) SetUseSubtitle(useSubtitle bool)

SetUseSubtitle sets whether the current value of self should be displayed as its subtitle.

If TRUE, you should not access HdyActionRow:subtitle.

The function takes the following parameters:

  • useSubtitle: TRUE to set the current value as the subtitle.

func (*ComboRow) UseSubtitle

func (self *ComboRow) UseSubtitle() bool

UseSubtitle gets whether the current value of self should be displayed as its subtitle.

The function returns the following values:

  • ok: whether the current value of self should be displayed as its subtitle.

type ComboRowGetEnumValueNameFunc

type ComboRowGetEnumValueNameFunc func(value *EnumValueObject) (utf8 string)

ComboRowGetEnumValueNameFunc: called for combo rows that are bound to an enumeration with hdy_combo_row_set_for_enum() for each value from that enumeration.

type ComboRowGetNameFunc

type ComboRowGetNameFunc func(item *externglib.Object) (utf8 string)

ComboRowGetNameFunc: called for combo rows that are bound to a Model with hdy_combo_row_bind_name_model() for each item that gets added to the model.

type ComboRowOverrider

type ComboRowOverrider interface {
}

ComboRowOverrider contains methods that are overridable.

type Deck

type Deck struct {
	gtk.Container

	*externglib.Object
	atk.ImplementorIface
	externglib.InitiallyUnowned
	gtk.Buildable
	gtk.Orientable
	gtk.Widget
	Swipeable
	// contains filtered or unexported fields
}

func NewDeck

func NewDeck() *Deck

The function returns the following values:

func (*Deck) AdjacentChild

func (self *Deck) AdjacentChild(direction NavigationDirection) gtk.Widgetter

AdjacentChild 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 function takes the following parameters:

  • direction: direction.

The function returns the following values:

  • widget (optional) previous or next child, or NULL if it doesn't exist.

func (*Deck) CanSwipeBack

func (self *Deck) CanSwipeBack() bool

CanSwipeBack returns whether the Deck allows swiping to the previous child.

The function returns the following values:

  • ok: TRUE if back swipe is enabled.

func (*Deck) CanSwipeForward

func (self *Deck) CanSwipeForward() bool

CanSwipeForward returns whether the Deck allows swiping to the next child.

The function returns the following values:

  • ok: TRUE if forward swipe is enabled.

func (*Deck) ChildByName

func (self *Deck) ChildByName(name string) gtk.Widgetter

ChildByName finds the child of self with the name given as the argument. Returns NULL if there is no child with this name.

The function takes the following parameters:

  • name of the child to find.

The function returns the following values:

  • widget (optional): requested child of self.

func (*Deck) Homogeneous

func (self *Deck) Homogeneous(orientation gtk.Orientation) bool

Homogeneous gets whether self is homogeneous for the given orientation. See hdy_deck_set_homogeneous().

The function takes the following parameters:

  • orientation: orientation.

The function returns the following values:

  • ok: whether self is homogeneous for the given orientation.

func (*Deck) InsertChildAfter

func (self *Deck) InsertChildAfter(child, sibling gtk.Widgetter)

InsertChildAfter inserts child in the position after sibling in the list of children. If sibling is NULL, insert child at the first position.

The function takes the following parameters:

  • child to insert.
  • sibling (optional) after which to insert child.

func (*Deck) InterpolateSize

func (self *Deck) InterpolateSize() bool

InterpolateSize returns whether the Deck is set up to interpolate between the sizes of children on page switch.

The function returns the following values:

  • ok: TRUE if child sizes are interpolated.

func (*Deck) Navigate

func (self *Deck) Navigate(direction NavigationDirection) bool

Navigate switches to the previous or next child, similar to performing a swipe gesture to go in direction.

The function takes the following parameters:

  • direction: direction.

The function returns the following values:

  • ok: TRUE if visible child was changed, FALSE otherwise.

func (*Deck) Prepend

func (self *Deck) Prepend(child gtk.Widgetter)

Prepend inserts child at the first position in self.

The function takes the following parameters:

  • child to prepend.

func (*Deck) ReorderChildAfter

func (self *Deck) ReorderChildAfter(child, sibling gtk.Widgetter)

ReorderChildAfter moves child to the position after sibling in the list of children. If sibling is NULL, move child to the first position.

The function takes the following parameters:

  • child to move, must be a child of self.
  • sibling (optional) to move child after, or NULL.

func (*Deck) SetCanSwipeBack

func (self *Deck) SetCanSwipeBack(canSwipeBack bool)

SetCanSwipeBack sets whether or not self allows switching to the previous child via a swipe gesture.

The function takes the following parameters:

  • canSwipeBack: new value.

func (*Deck) SetCanSwipeForward

func (self *Deck) SetCanSwipeForward(canSwipeForward bool)

SetCanSwipeForward sets whether or not self allows switching to the next child via a swipe gesture.

The function takes the following parameters:

  • canSwipeForward: new value.

func (*Deck) SetHomogeneous

func (self *Deck) SetHomogeneous(orientation gtk.Orientation, homogeneous bool)

SetHomogeneous sets the Deck to be homogeneous or not for the given orientation. If it is homogeneous, the Deck 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.

The function takes the following parameters:

  • orientation: orientation.
  • homogeneous: TRUE to make self homogeneous.

func (*Deck) SetInterpolateSize

func (self *Deck) SetInterpolateSize(interpolateSize bool)

SetInterpolateSize sets whether or not self will interpolate its size when changing the visible child. If the Deck: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.

The function takes the following parameters:

  • interpolateSize: new value.

func (*Deck) SetTransitionDuration

func (self *Deck) SetTransitionDuration(duration uint)

SetTransitionDuration sets the duration that transitions between children in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Deck) SetTransitionType

func (self *Deck) SetTransitionType(transition DeckTransitionType)

SetTransitionType 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.

The function takes the following parameters:

  • transition: new transition type.

func (*Deck) SetVisibleChild

func (self *Deck) SetVisibleChild(visibleChild gtk.Widgetter)

SetVisibleChild 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.

The function takes the following parameters:

  • visibleChild: new child.

func (*Deck) SetVisibleChildName

func (self *Deck) SetVisibleChildName(name string)

SetVisibleChildName makes the child with the name name visible.

See hdy_deck_set_visible_child() for more details.

The function takes the following parameters:

  • name of a child.

func (*Deck) TransitionDuration

func (self *Deck) TransitionDuration() uint

TransitionDuration returns the amount of time (in milliseconds) that transitions between children in self will take.

The function returns the following values:

  • guint: child transition duration.

func (*Deck) TransitionRunning

func (self *Deck) TransitionRunning() bool

TransitionRunning returns whether self is currently in a transition from one page to another.

The function returns the following values:

  • ok: TRUE if the transition is currently running, FALSE otherwise.

func (*Deck) TransitionType

func (self *Deck) TransitionType() DeckTransitionType

TransitionType gets the type of animation that will be used for transitions between children in self.

The function returns the following values:

  • deckTransitionType: current transition type of self.

func (*Deck) VisibleChild

func (self *Deck) VisibleChild() gtk.Widgetter

VisibleChild gets the visible child widget.

The function returns the following values:

  • widget: visible child widget.

func (*Deck) VisibleChildName

func (self *Deck) VisibleChildName() string

VisibleChildName gets the name of the currently visible child widget.

The function returns the following values:

  • utf8: name of the visible child.

type DeckOverrider

type DeckOverrider interface {
}

DeckOverrider contains methods that are overridable.

type DeckTransitionType

type DeckTransitionType C.gint

DeckTransitionType: this enumeration value describes the possible transitions between children in a Deck widget.

New values may be added to this enumeration over time.

const (
	// DeckTransitionTypeOver: cover the old page or uncover the new page,
	// sliding from or towards the end according to orientation, text direction
	// and children order.
	DeckTransitionTypeOver DeckTransitionType = iota
	// DeckTransitionTypeUnder: uncover the new page or cover the old page,
	// sliding from or towards the start according to orientation, text
	// direction and children order.
	DeckTransitionTypeUnder
	// DeckTransitionTypeSlide: slide from left, right, up or down according to
	// the orientation, text direction and the children order.
	DeckTransitionTypeSlide
)

func (DeckTransitionType) String

func (d DeckTransitionType) String() string

String returns the name in string for DeckTransitionType.

type EnumValueObject

type EnumValueObject struct {
	*externglib.Object
	// contains filtered or unexported fields
}

func (*EnumValueObject) Name

func (self *EnumValueObject) Name() string

The function returns the following values:

func (*EnumValueObject) Nick

func (self *EnumValueObject) Nick() string

The function returns the following values:

func (*EnumValueObject) Value

func (self *EnumValueObject) Value() int

The function returns the following values:

type EnumValueObjectOverrider

type EnumValueObjectOverrider interface {
}

EnumValueObjectOverrider contains methods that are overridable.

type ExpanderRow

type ExpanderRow struct {
	PreferencesRow
	// contains filtered or unexported fields
}

func NewExpanderRow

func NewExpanderRow() *ExpanderRow

NewExpanderRow creates a new ExpanderRow.

The function returns the following values:

  • expanderRow: new ExpanderRow.

func (*ExpanderRow) AddAction

func (self *ExpanderRow) AddAction(widget gtk.Widgetter)

AddAction adds an action widget to self.

The function takes the following parameters:

  • widget: action widget.

func (*ExpanderRow) AddPrefix

func (self *ExpanderRow) AddPrefix(widget gtk.Widgetter)

AddPrefix adds a prefix widget to self.

The function takes the following parameters:

  • widget: prefix widget.

func (*ExpanderRow) EnableExpansion

func (self *ExpanderRow) EnableExpansion() bool

EnableExpansion gets whether the expansion of self is enabled.

The function returns the following values:

  • ok: whether the expansion of self is enabled.

func (*ExpanderRow) Expanded

func (self *ExpanderRow) Expanded() bool

The function returns the following values:

func (*ExpanderRow) IconName

func (self *ExpanderRow) IconName() string

IconName gets the icon name for self.

The function returns the following values:

  • utf8: icon name for self.

func (*ExpanderRow) SetEnableExpansion

func (self *ExpanderRow) SetEnableExpansion(enableExpansion bool)

SetEnableExpansion sets whether the expansion of self is enabled.

The function takes the following parameters:

  • enableExpansion: TRUE to enable the expansion.

func (*ExpanderRow) SetExpanded

func (self *ExpanderRow) SetExpanded(expanded bool)

The function takes the following parameters:

func (*ExpanderRow) SetIconName

func (self *ExpanderRow) SetIconName(iconName string)

SetIconName sets the icon name for self.

The function takes the following parameters:

  • iconName: icon name.

func (*ExpanderRow) SetShowEnableSwitch

func (self *ExpanderRow) SetShowEnableSwitch(showEnableSwitch bool)

SetShowEnableSwitch sets whether the switch enabling the expansion of self is visible.

The function takes the following parameters:

  • showEnableSwitch: TRUE to show the switch enabling the expansion.

func (*ExpanderRow) SetSubtitle

func (self *ExpanderRow) SetSubtitle(subtitle string)

SetSubtitle sets the subtitle for self.

The function takes the following parameters:

  • subtitle (optional): subtitle.

func (*ExpanderRow) SetUseUnderline

func (self *ExpanderRow) SetUseUnderline(useUnderline bool)

SetUseUnderline: 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.

The function takes the following parameters:

  • useUnderline: TRUE if underlines in the text indicate mnemonics.

func (*ExpanderRow) ShowEnableSwitch

func (self *ExpanderRow) ShowEnableSwitch() bool

ShowEnableSwitch gets whether the switch enabling the expansion of self is visible.

The function returns the following values:

  • ok: whether the switch enabling the expansion of self is visible.

func (*ExpanderRow) Subtitle

func (self *ExpanderRow) Subtitle() string

Subtitle gets the subtitle for self.

The function returns the following values:

  • utf8 (optional): subtitle for self, or NULL.

func (*ExpanderRow) UseUnderline

func (self *ExpanderRow) UseUnderline() bool

UseUnderline gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See hdy_expander_row_set_use_underline().

The function returns the following values:

  • ok: TRUE if an embedded underline in the title and subtitle labels indicates the mnemonic accelerator keys.

type ExpanderRowOverrider

type ExpanderRowOverrider interface {
}

ExpanderRowOverrider contains methods that are overridable.

type Flap

type Flap struct {
	gtk.Container

	*externglib.Object
	atk.ImplementorIface
	externglib.InitiallyUnowned
	gtk.Buildable
	gtk.Orientable
	gtk.Widget
	Swipeable
	// contains filtered or unexported fields
}

func NewFlap

func NewFlap() *Flap

NewFlap creates a new Flap.

The function returns the following values:

  • flap: new Flap.

func (*Flap) Content

func (self *Flap) Content() gtk.Widgetter

Content gets the content widget for self.

The function returns the following values:

  • widget (optional): content widget for self.

func (*Flap) Flap

func (self *Flap) Flap() gtk.Widgetter

Flap gets the flap widget for self.

The function returns the following values:

  • widget (optional): flap widget for self.

func (*Flap) FlapPosition

func (self *Flap) FlapPosition() gtk.PackType

FlapPosition gets the flap position for self.

The function returns the following values:

  • packType: flap position for self.

func (*Flap) FoldDuration

func (self *Flap) FoldDuration() uint

FoldDuration returns the amount of time (in milliseconds) that fold transitions in self will take.

The function returns the following values:

  • guint: fold transition duration.

func (*Flap) FoldPolicy

func (self *Flap) FoldPolicy() FlapFoldPolicy

FoldPolicy gets the current fold policy of self. See hdy_flap_set_fold_policy().

The function returns the following values:

  • flapFoldPolicy: current fold policy of self.

func (*Flap) Folded

func (self *Flap) Folded() bool

Folded gets whether self is currently folded.

See Flap:fold-policy.

The function returns the following values:

  • ok: TRUE if self is currently folded, FALSE otherwise.

func (*Flap) Locked

func (self *Flap) Locked() bool

Locked gets whether self is locked.

The function returns the following values:

  • ok: TRUE if self is locked, FALSE otherwise.

func (*Flap) Modal

func (self *Flap) Modal() bool

Modal gets whether the self is modal. See hdy_flap_set_modal().

The function returns the following values:

  • ok: TRUE if self is modal.

func (*Flap) RevealDuration

func (self *Flap) RevealDuration() uint

RevealDuration returns the amount of time (in milliseconds) that reveal transitions in self will take.

The function returns the following values:

  • guint: reveal transition duration.

func (*Flap) RevealFlap

func (self *Flap) RevealFlap() bool

RevealFlap gets whether the flap widget is revealed for self.

The function returns the following values:

  • ok: TRUE if the flap widget is revealed, FALSE otherwise.

func (*Flap) RevealProgress

func (self *Flap) RevealProgress() float64

RevealProgress gets the current reveal transition progress for self. 0 means fully hidden, 1 means fully revealed. See Flap:reveal-flap.

The function returns the following values:

  • gdouble: current reveal progress for self.

func (*Flap) Separator

func (self *Flap) Separator() gtk.Widgetter

Separator gets the separator widget for self.

The function returns the following values:

  • widget (optional): separator widget for self.

func (*Flap) SetContent

func (self *Flap) SetContent(content gtk.Widgetter)

SetContent sets the content widget for self, always displayed when unfolded, and partially visible when folded.

The function takes the following parameters:

  • content (optional) widget, or NULL.

func (*Flap) SetFlap

func (self *Flap) SetFlap(flap gtk.Widgetter)

SetFlap sets the flap widget for self, only visible when Flap:reveal-progress is greater than 0.

The function takes the following parameters:

  • flap (optional) widget, or NULL.

func (*Flap) SetFlapPosition

func (self *Flap) SetFlapPosition(position gtk.PackType)

SetFlapPosition 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.

The function takes the following parameters:

  • position: new value.

func (*Flap) SetFoldDuration

func (self *Flap) SetFoldDuration(duration uint)

SetFoldDuration sets the duration that fold transitions in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Flap) SetFoldPolicy

func (self *Flap) SetFoldPolicy(policy FlapFoldPolicy)

SetFoldPolicy sets the current fold policy for self. See FlapFoldPolicy for available policies.

The function takes the following parameters:

  • policy: fold policy.

func (*Flap) SetLocked

func (self *Flap) SetLocked(locked bool)

SetLocked 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, Flap:reveal-flap value never changes on its own.

The function takes the following parameters:

  • locked: new value.

func (*Flap) SetModal

func (self *Flap) SetModal(modal bool)

SetModal 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.

The function takes the following parameters:

  • modal: whether self can be closed with a click.

func (*Flap) SetRevealDuration

func (self *Flap) SetRevealDuration(duration uint)

SetRevealDuration sets the duration that reveal transitions in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Flap) SetRevealFlap

func (self *Flap) SetRevealFlap(revealFlap bool)

SetRevealFlap sets whether the flap widget is revealed for self.

The function takes the following parameters:

  • revealFlap: TRUE to reveal the flap widget, FALSE otherwise.

func (*Flap) SetSeparator

func (self *Flap) SetSeparator(separator gtk.Widgetter)

SetSeparator 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 Flap:transition-type value. If NULL, no separator will be used.

The function takes the following parameters:

  • separator (optional) widget, or NULL.

func (*Flap) SetSwipeToClose

func (self *Flap) SetSwipeToClose(swipeToClose bool)

SetSwipeToClose sets whether self can be closed with a swipe gesture.

The area that can be swiped depends on the Flap:transition-type value.

The function takes the following parameters:

  • swipeToClose: whether self can be closed with a swipe gesture.

func (*Flap) SetSwipeToOpen

func (self *Flap) SetSwipeToOpen(swipeToOpen bool)

SetSwipeToOpen sets whether self can be opened with a swipe gesture.

The area that can be swiped depends on the Flap:transition-type value.

The function takes the following parameters:

  • swipeToOpen: whether self can be opened with a swipe gesture.

func (*Flap) SetTransitionType

func (self *Flap) SetTransitionType(transitionType FlapTransitionType)

SetTransitionType sets the type of animation that will be used for reveal and fold transitions in self.

Flap:flap is transparent by default, which means the content will be seen through it with HDY_FLAP_TRANSITION_TYPE_OVER transitions; add the .background style class to it if this is unwanted.

The function takes the following parameters:

  • transitionType: new transition type.

func (*Flap) SwipeToClose

func (self *Flap) SwipeToClose() bool

SwipeToClose gets whether self can be closed with a swipe gesture.

The function returns the following values:

  • ok: TRUE if self can be closed with a swipe gesture.

func (*Flap) SwipeToOpen

func (self *Flap) SwipeToOpen() bool

SwipeToOpen gets whether self can be opened with a swipe gesture.

The function returns the following values:

  • ok: TRUE if self can be opened with a swipe gesture.

func (*Flap) TransitionType

func (self *Flap) TransitionType() FlapTransitionType

TransitionType gets the type of animation that will be used for reveal and fold transitions in self.

The function returns the following values:

  • flapTransitionType: current transition type of self.

type FlapFoldPolicy

type FlapFoldPolicy C.gint

FlapFoldPolicy: these enumeration values describe the possible folding behavior in a Flap widget.

const (
	// FlapFoldPolicyNever: disable folding, the flap cannot reach narrow sizes.
	FlapFoldPolicyNever FlapFoldPolicy = iota
	// FlapFoldPolicyAlways: keep the flap always folded.
	FlapFoldPolicyAlways
	// FlapFoldPolicyAuto: fold and unfold the flap based on available space.
	FlapFoldPolicyAuto
)

func (FlapFoldPolicy) String

func (f FlapFoldPolicy) String() string

String returns the name in string for FlapFoldPolicy.

type FlapOverrider

type FlapOverrider interface {
}

FlapOverrider contains methods that are overridable.

type FlapTransitionType

type FlapTransitionType C.gint

FlapTransitionType: these enumeration values describe the possible transitions between children in a Flap widget, as well as which areas can be swiped via Flap:swipe-to-open and Flap:swipe-to-close.

New values may be added to this enum over time.

const (
	// FlapTransitionTypeOver: flap slides over the content, which is dimmed.
	// When folded, only the flap can be swiped.
	FlapTransitionTypeOver FlapTransitionType = iota
	// FlapTransitionTypeUnder: content slides over the flap. Only the content
	// can be swiped.
	FlapTransitionTypeUnder
	// FlapTransitionTypeSlide: flap slides offscreen when hidden, neither the
	// flap nor content overlap each other. Both widgets can be swiped.
	FlapTransitionTypeSlide
)

func (FlapTransitionType) String

func (f FlapTransitionType) String() string

String returns the name in string for FlapTransitionType.

type HeaderBar

type HeaderBar struct {
	gtk.Container
	// contains filtered or unexported fields
}

func NewHeaderBar

func NewHeaderBar() *HeaderBar

NewHeaderBar creates a new HeaderBar widget.

The function returns the following values:

  • headerBar: new HeaderBar.

func (*HeaderBar) CenteringPolicy

func (self *HeaderBar) CenteringPolicy() CenteringPolicy

CenteringPolicy gets the policy self follows to horizontally align its center widget.

The function returns the following values:

  • centeringPolicy: centering policy.

func (*HeaderBar) CustomTitle

func (self *HeaderBar) CustomTitle() gtk.Widgetter

CustomTitle retrieves the custom title widget of the header. See hdy_header_bar_set_custom_title().

The function returns the following values:

  • widget (optional): custom title widget of the header, or NULL if none has been set explicitly.

func (*HeaderBar) DecorationLayout

func (self *HeaderBar) DecorationLayout() string

DecorationLayout gets the decoration layout set with hdy_header_bar_set_decoration_layout().

The function returns the following values:

  • utf8: decoration layout.

func (*HeaderBar) HasSubtitle

func (self *HeaderBar) HasSubtitle() bool

HasSubtitle retrieves whether the header bar reserves space for a subtitle, regardless if one is currently set or not.

The function returns the following values:

  • ok: TRUE if the header bar reserves space for a subtitle.

func (*HeaderBar) InterpolateSize

func (self *HeaderBar) InterpolateSize() bool

InterpolateSize gets whether self should interpolate its size on visible child change.

See hdy_header_bar_set_interpolate_size().

The function returns the following values:

  • ok: TRUE if self interpolates its size on visible child change, FALSE if not.

func (*HeaderBar) PackEnd

func (self *HeaderBar) PackEnd(child gtk.Widgetter)

PackEnd adds child to self:, packed with reference to the end of the self:.

The function takes the following parameters:

  • child to be added to self:.

func (*HeaderBar) PackStart

func (self *HeaderBar) PackStart(child gtk.Widgetter)

PackStart adds child to self:, packed with reference to the start of the self:.

The function takes the following parameters:

  • child to be added to self:.

func (*HeaderBar) SetCenteringPolicy

func (self *HeaderBar) SetCenteringPolicy(centeringPolicy CenteringPolicy)

SetCenteringPolicy sets the policy self must follow to horizontally align its center widget.

The function takes the following parameters:

  • centeringPolicy: centering policy.

func (*HeaderBar) SetCustomTitle

func (self *HeaderBar) SetCustomTitle(titleWidget gtk.Widgetter)

SetCustomTitle sets a custom title for the HeaderBar.

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.

The function takes the following parameters:

  • titleWidget (optional): custom widget to use for a title.

func (*HeaderBar) SetDecorationLayout

func (self *HeaderBar) SetDecorationLayout(layout string)

SetDecorationLayout sets the decoration layout for this header bar, overriding the Settings: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.

The function takes the following parameters:

  • layout (optional): decoration layout, or NULL to unset the layout.

func (*HeaderBar) SetHasSubtitle

func (self *HeaderBar) SetHasSubtitle(setting bool)

SetHasSubtitle sets whether the header bar should reserve space for a subtitle, even if none is currently set.

The function takes the following parameters:

  • setting: TRUE to reserve space for a subtitle.

func (*HeaderBar) SetInterpolateSize

func (self *HeaderBar) SetInterpolateSize(interpolateSize bool)

SetInterpolateSize 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.

The function takes the following parameters:

  • interpolateSize: TRUE to interpolate the size.

func (*HeaderBar) SetShowCloseButton

func (self *HeaderBar) SetShowCloseButton(setting bool)

SetShowCloseButton sets whether this header bar shows the standard window decorations, including close, maximize, and minimize.

The function takes the following parameters:

  • setting: TRUE to show standard window decorations.

func (*HeaderBar) SetSubtitle

func (self *HeaderBar) SetSubtitle(subtitle string)

SetSubtitle sets the subtitle of the HeaderBar. 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 HeaderBar:has-subtitle property to FALSE.

The function takes the following parameters:

  • subtitle (optional): subtitle, or NULL.

func (*HeaderBar) SetTitle

func (self *HeaderBar) SetTitle(title string)

SetTitle sets the title of the HeaderBar. The title should help a user identify the current view. A good title should not include the application name.

The function takes the following parameters:

  • title (optional): title, or NULL.

func (*HeaderBar) SetTransitionDuration

func (self *HeaderBar) SetTransitionDuration(duration uint)

SetTransitionDuration sets the duration that transitions between pages in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*HeaderBar) ShowCloseButton

func (self *HeaderBar) ShowCloseButton() bool

ShowCloseButton returns whether this header bar shows the standard window decorations.

The function returns the following values:

  • ok: TRUE if the decorations are shown.

func (*HeaderBar) Subtitle

func (self *HeaderBar) Subtitle() string

Subtitle retrieves the subtitle of the header. See hdy_header_bar_set_subtitle().

The function returns the following values:

  • utf8 (optional): 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.

func (*HeaderBar) Title

func (self *HeaderBar) Title() string

Title retrieves the title of the header. See hdy_header_bar_set_title().

The function returns the following values:

  • utf8 (optional): 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.

func (*HeaderBar) TransitionDuration

func (self *HeaderBar) TransitionDuration() uint

TransitionDuration returns the amount of time (in milliseconds) that transitions between pages in self will take.

The function returns the following values:

  • guint: transition duration.

func (*HeaderBar) TransitionRunning

func (self *HeaderBar) TransitionRunning() bool

TransitionRunning returns whether the self is currently in a transition from one page to another.

The function returns the following values:

  • ok: TRUE if the transition is currently running, FALSE otherwise.

type HeaderBarOverrider

type HeaderBarOverrider interface {
}

HeaderBarOverrider contains methods that are overridable.

type HeaderGroup

type HeaderGroup struct {
	*externglib.Object

	gtk.Buildable
	// contains filtered or unexported fields
}

func NewHeaderGroup

func NewHeaderGroup() *HeaderGroup

The function returns the following values:

func (*HeaderGroup) AddGTKHeaderBar

func (self *HeaderGroup) AddGTKHeaderBar(headerBar *gtk.HeaderBar)

AddGTKHeaderBar adds header_bar to self. When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.

The function takes the following parameters:

  • headerBar to add.

func (*HeaderGroup) AddHeaderBar

func (self *HeaderGroup) AddHeaderBar(headerBar *HeaderBar)

AddHeaderBar adds header_bar to self. When the widget is destroyed or no longer referenced elsewhere, it will be removed from the header group.

The function takes the following parameters:

  • headerBar to add.

func (*HeaderGroup) AddHeaderGroup

func (self *HeaderGroup) AddHeaderGroup(headerGroup *HeaderGroup)

AddHeaderGroup adds header_group to self. When the nested group is no longer referenced elsewhere, it will be removed from the header group.

The function takes the following parameters:

  • headerGroup to add.

func (*HeaderGroup) Children

func (self *HeaderGroup) Children() []*HeaderGroupChild

Children returns the list of children associated with self.

The function returns the following values:

  • sList of children. The list is owned by libhandy and should not be modified.

func (*HeaderGroup) ConnectUpdateDecorationLayouts

func (self *HeaderGroup) ConnectUpdateDecorationLayouts(f func()) externglib.SignalHandle

ConnectUpdateDecorationLayouts: this signal is emitted before updating the decoration layouts.

func (*HeaderGroup) DecorateAll

func (self *HeaderGroup) DecorateAll() bool

DecorateAll gets whether the elements of the group should all receive the full decoration.

The function returns the following values:

  • ok: TRUE if the elements of the group should all receive the full decoration, FALSE otherwise.

func (*HeaderGroup) RemoveChild

func (self *HeaderGroup) RemoveChild(child *HeaderGroupChild)

RemoveChild removes child from self.

The function takes the following parameters:

  • child to remove.

func (*HeaderGroup) RemoveGTKHeaderBar

func (self *HeaderGroup) RemoveGTKHeaderBar(headerBar *gtk.HeaderBar)

RemoveGTKHeaderBar removes header_bar from self.

The function takes the following parameters:

  • headerBar to remove.

func (*HeaderGroup) RemoveHeaderBar

func (self *HeaderGroup) RemoveHeaderBar(headerBar *HeaderBar)

RemoveHeaderBar removes header_bar from self.

The function takes the following parameters:

  • headerBar to remove.

func (*HeaderGroup) RemoveHeaderGroup

func (self *HeaderGroup) RemoveHeaderGroup(headerGroup *HeaderGroup)

RemoveHeaderGroup removes a nested HeaderGroup from a HeaderGroup.

The function takes the following parameters:

  • headerGroup to remove.

func (*HeaderGroup) SetDecorateAll

func (self *HeaderGroup) SetDecorateAll(decorateAll bool)

SetDecorateAll sets whether the elements of the group should all receive the full decoration.

The function takes the following parameters:

  • decorateAll: whether the elements of the group should all receive the full decoration.

type HeaderGroupChild

type HeaderGroupChild struct {
	*externglib.Object
	// contains filtered or unexported fields
}

func (*HeaderGroupChild) ChildType

func (self *HeaderGroupChild) ChildType() HeaderGroupChildType

ChildType gets the child type.

The function returns the following values:

  • headerGroupChildType: child type.

func (*HeaderGroupChild) GTKHeaderBar

func (self *HeaderGroupChild) GTKHeaderBar() *gtk.HeaderBar

GTKHeaderBar gets the child HeaderBar. Use hdy_header_group_child_get_child_type() to check the child type.

The function returns the following values:

  • headerBar: child HeaderBar, or NULL in case of error.

func (*HeaderGroupChild) HeaderBar

func (self *HeaderGroupChild) HeaderBar() *HeaderBar

HeaderBar gets the child HeaderBar. Use hdy_header_group_child_get_child_type() to check the child type.

The function returns the following values:

  • headerBar: child HeaderBar, or NULL in case of error.

func (*HeaderGroupChild) HeaderGroup

func (self *HeaderGroupChild) HeaderGroup() *HeaderGroup

HeaderGroup gets the child HeaderGroup. Use hdy_header_group_child_get_child_type() to check the child type.

The function returns the following values:

  • headerGroup: child HeaderGroup, or NULL in case of error.

type HeaderGroupChildOverrider

type HeaderGroupChildOverrider interface {
}

HeaderGroupChildOverrider contains methods that are overridable.

type HeaderGroupChildType

type HeaderGroupChildType C.gint

HeaderGroupChildType: this enumeration value describes the child types handled by HeaderGroup.

New values may be added to this enumeration over time.

const (
	// HeaderGroupChildTypeHeaderBar: child is a HeaderBar.
	HeaderGroupChildTypeHeaderBar HeaderGroupChildType = iota
	// HeaderGroupChildTypeGTKHeaderBar: child is a HeaderBar.
	HeaderGroupChildTypeGTKHeaderBar
	// HeaderGroupChildTypeHeaderGroup: child is a HeaderGroup.
	HeaderGroupChildTypeHeaderGroup
)

func (HeaderGroupChildType) String

func (h HeaderGroupChildType) String() string

String returns the name in string for HeaderGroupChildType.

type HeaderGroupOverrider

type HeaderGroupOverrider interface {
}

HeaderGroupOverrider contains methods that are overridable.

type Keypad

type Keypad struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewKeypad

func NewKeypad(symbolsVisible, lettersVisible bool) *Keypad

NewKeypad: create a new Keypad widget.

The function takes the following parameters:

  • symbolsVisible: whether the hash, plus, and asterisk symbols should be visible.
  • lettersVisible: whether the letters below the digits should be visible.

The function returns the following values:

  • keypad: newly created Keypad widget.

func (*Keypad) ColumnSpacing

func (self *Keypad) ColumnSpacing() uint

ColumnSpacing returns the amount of space between the columns of self.

The function returns the following values:

  • guint: column spacing of self.

func (*Keypad) EndAction

func (self *Keypad) EndAction() gtk.Widgetter

EndAction returns the widget for the lower right corner (or left, in RTL locales) of self.

The function returns the following values:

  • widget (optional): end action widget.

func (*Keypad) Entry

func (self *Keypad) Entry() *gtk.Entry

Entry: get the connected entry. See hdy_keypad_set_entry() for details.

The function returns the following values:

  • entry: set Entry or NULL if no widget was set.

func (*Keypad) LettersVisible

func (self *Keypad) LettersVisible() bool

LettersVisible returns whether self should display the standard letters below the digits on its buttons.

The function returns the following values:

  • ok: whether the letters below the digits should be visible.

func (*Keypad) RowSpacing

func (self *Keypad) RowSpacing() uint

RowSpacing returns the amount of space between the rows of self.

The function returns the following values:

  • guint: row spacing of self.

func (*Keypad) SetColumnSpacing

func (self *Keypad) SetColumnSpacing(spacing uint)

SetColumnSpacing sets the amount of space between columns of self.

The function takes the following parameters:

  • spacing: amount of space to insert between columns.

func (*Keypad) SetEndAction

func (self *Keypad) SetEndAction(endAction gtk.Widgetter)

SetEndAction sets the widget for the lower right corner (or left, in RTL locales) of self.

The function takes the following parameters:

  • endAction (optional): end action widget.

func (*Keypad) SetEntry

func (self *Keypad) SetEntry(entry *gtk.Entry)

SetEntry binds entry to self and blocks any input which wouldn't be possible to type with with the keypad.

The function takes the following parameters:

  • entry (optional): Entry.

func (*Keypad) SetLettersVisible

func (self *Keypad) SetLettersVisible(lettersVisible bool)

SetLettersVisible sets whether self should display the standard letters below the digits on its buttons.

The function takes the following parameters:

  • lettersVisible: whether the letters below the digits should be visible.

func (*Keypad) SetRowSpacing

func (self *Keypad) SetRowSpacing(spacing uint)

SetRowSpacing sets the amount of space between rows of self.

The function takes the following parameters:

  • spacing: amount of space to insert between rows.

func (*Keypad) SetStartAction

func (self *Keypad) SetStartAction(startAction gtk.Widgetter)

SetStartAction sets the widget for the lower left corner (or right, in RTL locales) of self.

The function takes the following parameters:

  • startAction (optional): start action widget.

func (*Keypad) SetSymbolsVisible

func (self *Keypad) SetSymbolsVisible(symbolsVisible bool)

SetSymbolsVisible sets whether self should display the hash and asterisk buttons, and should display the plus symbol at the bottom of its 0 button.

The function takes the following parameters:

  • symbolsVisible: whether the hash, plus, and asterisk symbols should be visible.

func (*Keypad) StartAction

func (self *Keypad) StartAction() gtk.Widgetter

StartAction returns the widget for the lower left corner (or right, in RTL locales) of self.

The function returns the following values:

  • widget (optional): start action widget.

func (*Keypad) SymbolsVisible

func (self *Keypad) SymbolsVisible() bool

SymbolsVisible 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.

The function returns the following values:

  • ok: whether the hash, plus, and asterisk symbols should be visible.

type KeypadOverrider

type KeypadOverrider interface {
}

KeypadOverrider contains methods that are overridable.

type Leaflet

type Leaflet struct {
	gtk.Container

	*externglib.Object
	atk.ImplementorIface
	externglib.InitiallyUnowned
	gtk.Buildable
	gtk.Orientable
	gtk.Widget
	Swipeable
	// contains filtered or unexported fields
}

func NewLeaflet

func NewLeaflet() *Leaflet

The function returns the following values:

func (*Leaflet) AdjacentChild

func (self *Leaflet) AdjacentChild(direction NavigationDirection) gtk.Widgetter

AdjacentChild 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 function takes the following parameters:

  • direction: direction.

The function returns the following values:

  • widget (optional) previous or next child, or NULL if it doesn't exist.

func (*Leaflet) CanSwipeBack

func (self *Leaflet) CanSwipeBack() bool

CanSwipeBack returns whether the Leaflet allows swiping to the previous child.

The function returns the following values:

  • ok: TRUE if back swipe is enabled.

func (*Leaflet) CanSwipeForward

func (self *Leaflet) CanSwipeForward() bool

CanSwipeForward returns whether the Leaflet allows swiping to the next child.

The function returns the following values:

  • ok: TRUE if forward swipe is enabled.

func (*Leaflet) ChildByName

func (self *Leaflet) ChildByName(name string) gtk.Widgetter

ChildByName finds the child of self with the name given as the argument. Returns NULL if there is no child with this name.

The function takes the following parameters:

  • name of the child to find.

The function returns the following values:

  • widget (optional): requested child of self.

func (*Leaflet) ChildTransitionDuration

func (self *Leaflet) ChildTransitionDuration() uint

ChildTransitionDuration returns the amount of time (in milliseconds) that transitions between children in self will take.

The function returns the following values:

  • guint: child transition duration.

func (*Leaflet) ChildTransitionRunning

func (self *Leaflet) ChildTransitionRunning() bool

ChildTransitionRunning returns whether self is currently in a transition from one page to another.

The function returns the following values:

  • ok: TRUE if the transition is currently running, FALSE otherwise.

func (*Leaflet) Folded

func (self *Leaflet) Folded() bool

Folded gets whether self is folded.

The function returns the following values:

  • ok: whether self is folded.

func (*Leaflet) Homogeneous

func (self *Leaflet) Homogeneous(folded bool, orientation gtk.Orientation) bool

Homogeneous gets whether self is homogeneous for the given fold and orientation. See hdy_leaflet_set_homogeneous().

The function takes the following parameters:

  • folded: fold.
  • orientation: orientation.

The function returns the following values:

  • ok: whether self is homogeneous for the given fold and orientation.

func (*Leaflet) InsertChildAfter

func (self *Leaflet) InsertChildAfter(child, sibling gtk.Widgetter)

InsertChildAfter inserts child in the position after sibling in the list of children. If sibling is NULL, insert child at the first position.

The function takes the following parameters:

  • child to insert.
  • sibling (optional) after which to insert child.

func (*Leaflet) InterpolateSize

func (self *Leaflet) InterpolateSize() bool

InterpolateSize returns whether the Leaflet is set up to interpolate between the sizes of children on page switch.

The function returns the following values:

  • ok: TRUE if child sizes are interpolated.

func (*Leaflet) ModeTransitionDuration

func (self *Leaflet) ModeTransitionDuration() uint

ModeTransitionDuration returns the amount of time (in milliseconds) that transitions between modes in self will take.

The function returns the following values:

  • guint: mode transition duration.

func (*Leaflet) Navigate

func (self *Leaflet) Navigate(direction NavigationDirection) bool

Navigate 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.

The function takes the following parameters:

  • direction: direction.

The function returns the following values:

  • ok: TRUE if visible child was changed, FALSE otherwise.

func (*Leaflet) Prepend

func (self *Leaflet) Prepend(child gtk.Widgetter)

Prepend inserts child at the first position in self.

The function takes the following parameters:

  • child to prepend.

func (*Leaflet) ReorderChildAfter

func (self *Leaflet) ReorderChildAfter(child, sibling gtk.Widgetter)

ReorderChildAfter moves child to the position after sibling in the list of children. If sibling is NULL, move child to the first position.

The function takes the following parameters:

  • child to move, must be a child of self.
  • sibling (optional) to move child after, or NULL.

func (*Leaflet) SetCanSwipeBack

func (self *Leaflet) SetCanSwipeBack(canSwipeBack bool)

SetCanSwipeBack sets whether or not self allows switching to the previous child that has 'navigatable' child property set to TRUE via a swipe gesture.

The function takes the following parameters:

  • canSwipeBack: new value.

func (*Leaflet) SetCanSwipeForward

func (self *Leaflet) SetCanSwipeForward(canSwipeForward bool)

SetCanSwipeForward sets whether or not self allows switching to the next child that has 'navigatable' child property set to TRUE via a swipe gesture.

The function takes the following parameters:

  • canSwipeForward: new value.

func (*Leaflet) SetChildTransitionDuration

func (self *Leaflet) SetChildTransitionDuration(duration uint)

SetChildTransitionDuration sets the duration that transitions between children in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Leaflet) SetHomogeneous

func (self *Leaflet) SetHomogeneous(folded bool, orientation gtk.Orientation, homogeneous bool)

SetHomogeneous sets the Leaflet to be homogeneous or not for the given fold and orientation. If it is homogeneous, the Leaflet will request the same width or height for all its children depending on the orientation. If it isn't and it is folded, the leaflet may change width or height when a different child becomes visible.

The function takes the following parameters:

  • folded: fold.
  • orientation: orientation.
  • homogeneous: TRUE to make self homogeneous.

func (*Leaflet) SetInterpolateSize

func (self *Leaflet) SetInterpolateSize(interpolateSize bool)

SetInterpolateSize sets whether or not self will interpolate its size when changing the visible child. If the Leaflet:interpolate-size property is set to TRUE, self will interpolate its size between the current one and the one it'll take after changing the visible child, according to the set transition duration.

The function takes the following parameters:

  • interpolateSize: new value.

func (*Leaflet) SetModeTransitionDuration

func (self *Leaflet) SetModeTransitionDuration(duration uint)

SetModeTransitionDuration sets the duration that transitions between modes in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Leaflet) SetTransitionType

func (self *Leaflet) SetTransitionType(transition LeafletTransitionType)

SetTransitionType 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.

The function takes the following parameters:

  • transition: new transition type.

func (*Leaflet) SetVisibleChild

func (self *Leaflet) SetVisibleChild(visibleChild gtk.Widgetter)

SetVisibleChild 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.

The function takes the following parameters:

  • visibleChild: new child.

func (*Leaflet) SetVisibleChildName

func (self *Leaflet) SetVisibleChildName(name string)

SetVisibleChildName makes the child with the name name visible.

See hdy_leaflet_set_visible_child() for more details.

The function takes the following parameters:

  • name of a child.

func (*Leaflet) TransitionType

func (self *Leaflet) TransitionType() LeafletTransitionType

TransitionType gets the type of animation that will be used for transitions between modes and children in self.

The function returns the following values:

  • leafletTransitionType: current transition type of self.

func (*Leaflet) VisibleChild

func (self *Leaflet) VisibleChild() gtk.Widgetter

VisibleChild gets the visible child widget.

The function returns the following values:

  • widget: visible child widget.

func (*Leaflet) VisibleChildName

func (self *Leaflet) VisibleChildName() string

VisibleChildName gets the name of the currently visible child widget.

The function returns the following values:

  • utf8: name of the visible child.

type LeafletOverrider

type LeafletOverrider interface {
}

LeafletOverrider contains methods that are overridable.

type LeafletTransitionType

type LeafletTransitionType C.gint

LeafletTransitionType: this enumeration value describes the possible transitions between modes and children in a Leaflet widget.

New values may be added to this enumeration over time.

const (
	// LeafletTransitionTypeOver: cover the old page or uncover the new page,
	// sliding from or towards the end according to orientation, text direction
	// and children order.
	LeafletTransitionTypeOver LeafletTransitionType = iota
	// LeafletTransitionTypeUnder: uncover the new page or cover the old page,
	// sliding from or towards the start according to orientation, text
	// direction and children order.
	LeafletTransitionTypeUnder
	// LeafletTransitionTypeSlide: slide from left, right, up or down according
	// to the orientation, text direction and the children order.
	LeafletTransitionTypeSlide
)

func (LeafletTransitionType) String

func (l LeafletTransitionType) String() string

String returns the name in string for LeafletTransitionType.

type NavigationDirection C.gint

NavigationDirection represents direction of a swipe navigation gesture in Deck and Leaflet.

const (
	// NavigationDirectionBack corresponds to start or top, depending on
	// orientation and text direction.
	NavigationDirectionBack NavigationDirection = iota
	// NavigationDirectionForward corresponds to end or bottom, depending on
	// orientation and text direction.
	NavigationDirectionForward
)
func (n NavigationDirection) String() string

String returns the name in string for NavigationDirection.

type PreferencesGroup

type PreferencesGroup struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewPreferencesGroup

func NewPreferencesGroup() *PreferencesGroup

NewPreferencesGroup creates a new PreferencesGroup.

The function returns the following values:

  • preferencesGroup: new PreferencesGroup.

func (*PreferencesGroup) Description

func (self *PreferencesGroup) Description() string

The function returns the following values:

  • utf8: description of self.

func (*PreferencesGroup) SetDescription

func (self *PreferencesGroup) SetDescription(description string)

SetDescription sets the description for self.

The function takes the following parameters:

  • description: description.

func (*PreferencesGroup) SetTitle

func (self *PreferencesGroup) SetTitle(title string)

SetTitle sets the title for self.

The function takes the following parameters:

  • title: title.

func (*PreferencesGroup) Title

func (self *PreferencesGroup) Title() string

Title gets the title of self.

The function returns the following values:

  • utf8: title of self.

type PreferencesGroupOverrider

type PreferencesGroupOverrider interface {
}

PreferencesGroupOverrider contains methods that are overridable.

type PreferencesPage

type PreferencesPage struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewPreferencesPage

func NewPreferencesPage() *PreferencesPage

NewPreferencesPage creates a new PreferencesPage.

The function returns the following values:

  • preferencesPage: new PreferencesPage.

func (*PreferencesPage) IconName

func (self *PreferencesPage) IconName() string

IconName gets the icon name for self, or NULL.

The function returns the following values:

  • utf8 (optional): icon name for self, or NULL.

func (*PreferencesPage) SetIconName

func (self *PreferencesPage) SetIconName(iconName string)

SetIconName sets the icon name for self.

The function takes the following parameters:

  • iconName (optional): icon name, or NULL.

func (*PreferencesPage) SetTitle

func (self *PreferencesPage) SetTitle(title string)

SetTitle sets the title of self.

The function takes the following parameters:

  • title (optional) of the page, or NULL.

func (*PreferencesPage) Title

func (self *PreferencesPage) Title() string

Title gets the title of self, or NULL.

The function returns the following values:

  • utf8 (optional): title of the self, or NULL.

type PreferencesPageOverrider

type PreferencesPageOverrider interface {
}

PreferencesPageOverrider contains methods that are overridable.

type PreferencesRow

type PreferencesRow struct {
	gtk.ListBoxRow
	// contains filtered or unexported fields
}

func NewPreferencesRow

func NewPreferencesRow() *PreferencesRow

NewPreferencesRow creates a new PreferencesRow.

The function returns the following values:

  • preferencesRow: new PreferencesRow.

func (*PreferencesRow) SetTitle

func (self *PreferencesRow) SetTitle(title string)

SetTitle sets the title of the preference represented by self.

The function takes the following parameters:

  • title (optional): title, or NULL.

func (*PreferencesRow) SetUseUnderline

func (self *PreferencesRow) SetUseUnderline(useUnderline bool)

SetUseUnderline: if true, an underline in the text of the title indicates the next character should be used for the mnemonic accelerator key.

The function takes the following parameters:

  • useUnderline: TRUE if underlines in the text indicate mnemonics.

func (*PreferencesRow) Title

func (self *PreferencesRow) Title() string

Title gets the title of the preference represented by self.

The function returns the following values:

  • utf8 (optional): title of the preference represented by self, or NULL.

func (*PreferencesRow) UseUnderline

func (self *PreferencesRow) UseUnderline() bool

UseUnderline gets whether an embedded underline in the text of the title indicates a mnemonic. See hdy_preferences_row_set_use_underline().

The function returns the following values:

  • ok: TRUE if an embedded underline in the title indicates the mnemonic accelerator keys.

type PreferencesRowOverrider

type PreferencesRowOverrider interface {
}

PreferencesRowOverrider contains methods that are overridable.

type PreferencesWindow

type PreferencesWindow struct {
	Window
	// contains filtered or unexported fields
}

func NewPreferencesWindow

func NewPreferencesWindow() *PreferencesWindow

NewPreferencesWindow creates a new PreferencesWindow.

The function returns the following values:

  • preferencesWindow: new PreferencesWindow.

func (*PreferencesWindow) CanSwipeBack

func (self *PreferencesWindow) CanSwipeBack() bool

CanSwipeBack returns whether or not self allows switching from a subpage to the preferences via a swipe gesture.

The function returns the following values:

  • ok: TRUE if back swipe is enabled.

func (*PreferencesWindow) CloseSubpage

func (self *PreferencesWindow) CloseSubpage()

CloseSubpage closes the current subpage to return back to the preferences, if there is no presented subpage, this does nothing.

func (*PreferencesWindow) PresentSubpage

func (self *PreferencesWindow) PresentSubpage(subpage gtk.Widgetter)

PresentSubpage 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.

The function takes the following parameters:

  • subpage: subpage.

func (*PreferencesWindow) SearchEnabled

func (self *PreferencesWindow) SearchEnabled() bool

SearchEnabled gets whether search is enabled for self.

The function returns the following values:

  • ok: whether search is enabled for self.

func (*PreferencesWindow) SetCanSwipeBack

func (self *PreferencesWindow) SetCanSwipeBack(canSwipeBack bool)

SetCanSwipeBack sets whether or not self allows switching from a subpage to the preferences via a swipe gesture.

The function takes the following parameters:

  • canSwipeBack: new value.

func (*PreferencesWindow) SetSearchEnabled

func (self *PreferencesWindow) SetSearchEnabled(searchEnabled bool)

SetSearchEnabled sets whether search is enabled for self.

The function takes the following parameters:

  • searchEnabled: TRUE to enable search, FALSE to disable it.

type PreferencesWindowOverrider

type PreferencesWindowOverrider interface {
}

PreferencesWindowOverrider contains methods that are overridable.

type SearchBar struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewSearchBar

func NewSearchBar() *SearchBar

NewSearchBar creates a SearchBar. You will need to tell it about which widget is going to be your text entry using hdy_search_bar_connect_entry().

The function returns the following values:

  • searchBar: new SearchBar.

func (*SearchBar) ConnectEntry

func (self *SearchBar) ConnectEntry(entry *gtk.Entry)

ConnectEntry connects the Entry widget passed as the one to be used in this search bar. The entry should be a descendant of the search bar. This is only required if the entry isn’t the direct child of the search bar (as in our main example).

The function takes the following parameters:

  • entry: Entry.

func (*SearchBar) HandleEvent

func (self *SearchBar) HandleEvent(event *gdk.Event) bool

HandleEvent: 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

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);
}.

The function takes the following parameters:

  • event containing key press events.

The function returns the following values:

  • ok: 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.

func (*SearchBar) SearchMode

func (self *SearchBar) SearchMode() bool

SearchMode returns whether the search mode is on or off.

The function returns the following values:

  • ok: whether search mode is toggled on.

func (*SearchBar) SetSearchMode

func (self *SearchBar) SetSearchMode(searchMode bool)

SetSearchMode switches the search mode on or off.

The function takes the following parameters:

  • searchMode: new state of the search mode.

func (*SearchBar) SetShowCloseButton

func (self *SearchBar) SetShowCloseButton(visible bool)

SetShowCloseButton 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.

The function takes the following parameters:

  • visible: whether the close button will be shown or not.

func (*SearchBar) ShowCloseButton

func (self *SearchBar) ShowCloseButton() bool

ShowCloseButton returns whether the close button is shown.

The function returns the following values:

  • ok: whether the close button is shown.

type SearchBarOverrider

type SearchBarOverrider interface {
}

SearchBarOverrider contains methods that are overridable.

type Squeezer

type Squeezer struct {
	gtk.Container

	*externglib.Object
	gtk.Orientable
	// contains filtered or unexported fields
}

func NewSqueezer

func NewSqueezer() *Squeezer

NewSqueezer creates a new Squeezer container.

The function returns the following values:

  • squeezer: new Squeezer.

func (*Squeezer) ChildEnabled

func (self *Squeezer) ChildEnabled(child gtk.Widgetter) bool

ChildEnabled gets whether child is enabled.

See hdy_squeezer_set_child_enabled().

The function takes the following parameters:

  • child of self.

The function returns the following values:

  • ok: TRUE if child is enabled, FALSE otherwise.

func (*Squeezer) Homogeneous

func (self *Squeezer) Homogeneous() bool

Homogeneous gets whether self is homogeneous.

See hdy_squeezer_set_homogeneous().

The function returns the following values:

  • ok: TRUE if self is homogeneous, FALSE is not.

func (*Squeezer) InterpolateSize

func (self *Squeezer) InterpolateSize() bool

InterpolateSize gets whether self should interpolate its size on visible child change.

See hdy_squeezer_set_interpolate_size().

The function returns the following values:

  • ok: TRUE if self interpolates its size on visible child change, FALSE if not.

func (*Squeezer) SetChildEnabled

func (self *Squeezer) SetChildEnabled(child gtk.Widgetter, enabled bool)

SetChildEnabled: 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.

The function takes the following parameters:

  • child of self.
  • enabled: TRUE to enable the child, FALSE to disable it.

func (*Squeezer) SetHomogeneous

func (self *Squeezer) SetHomogeneous(homogeneous bool)

SetHomogeneous 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.

The function takes the following parameters:

  • homogeneous: TRUE to make self homogeneous.

func (*Squeezer) SetInterpolateSize

func (self *Squeezer) SetInterpolateSize(interpolateSize bool)

SetInterpolateSize 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.

The function takes the following parameters:

  • interpolateSize: TRUE to interpolate the size.

func (*Squeezer) SetTransitionDuration

func (self *Squeezer) SetTransitionDuration(duration uint)

SetTransitionDuration sets the duration that transitions between children in self will take.

The function takes the following parameters:

  • duration: new duration, in milliseconds.

func (*Squeezer) SetTransitionType

func (self *Squeezer) SetTransitionType(transition SqueezerTransitionType)

SetTransitionType 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.

The function takes the following parameters:

  • transition: new transition type.

func (*Squeezer) SetXAlign

func (self *Squeezer) SetXAlign(xalign float32)

SetXAlign sets the Squeezer:xalign property for self.

The function takes the following parameters:

  • xalign: new xalign value, between 0 and 1.

func (*Squeezer) SetYAlign

func (self *Squeezer) SetYAlign(yalign float32)

SetYAlign sets the Squeezer:yalign property for self.

The function takes the following parameters:

  • yalign: new yalign value, between 0 and 1.

func (*Squeezer) TransitionDuration

func (self *Squeezer) TransitionDuration() uint

TransitionDuration gets the amount of time (in milliseconds) that transitions between children in self will take.

The function returns the following values:

  • guint: transition duration.

func (*Squeezer) TransitionRunning

func (self *Squeezer) TransitionRunning() bool

TransitionRunning gets whether self is currently in a transition from one child to another.

The function returns the following values:

  • ok: TRUE if the transition is currently running, FALSE otherwise.

func (*Squeezer) TransitionType

func (self *Squeezer) TransitionType() SqueezerTransitionType

TransitionType gets the type of animation that will be used for transitions between children in self.

The function returns the following values:

  • squeezerTransitionType: current transition type of self.

func (*Squeezer) VisibleChild

func (self *Squeezer) VisibleChild() gtk.Widgetter

VisibleChild gets the currently visible child of self, or NULL if there are no visible children.

The function returns the following values:

  • widget (optional): visible child of the Squeezer.

func (*Squeezer) XAlign

func (self *Squeezer) XAlign() float32

XAlign gets the Squeezer:xalign property for self.

The function returns the following values:

  • gfloat: xalign property.

func (*Squeezer) YAlign

func (self *Squeezer) YAlign() float32

YAlign gets the Squeezer:yalign property for self.

The function returns the following values:

  • gfloat: yalign property.

type SqueezerOverrider

type SqueezerOverrider interface {
}

SqueezerOverrider contains methods that are overridable.

type SqueezerTransitionType

type SqueezerTransitionType C.gint

SqueezerTransitionType: these enumeration values describe the possible transitions between children in a Squeezer widget.

const (
	// SqueezerTransitionTypeNone: no transition.
	SqueezerTransitionTypeNone SqueezerTransitionType = iota
	// SqueezerTransitionTypeCrossfade: cross-fade.
	SqueezerTransitionTypeCrossfade
)

func (SqueezerTransitionType) String

func (s SqueezerTransitionType) String() string

String returns the name in string for SqueezerTransitionType.

type StatusPage

type StatusPage struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewStatusPage

func NewStatusPage() *StatusPage

NewStatusPage creates a new StatusPage.

The function returns the following values:

  • statusPage: new StatusPage.

func (*StatusPage) Description

func (self *StatusPage) Description() string

Description gets the description for self.

The function returns the following values:

  • utf8 (optional): description for self, or NULL.

func (*StatusPage) IconName

func (self *StatusPage) IconName() string

IconName gets the icon name for self.

The function returns the following values:

  • utf8 (optional): icon name for self.

func (*StatusPage) SetDescription

func (self *StatusPage) SetDescription(description string)

SetDescription sets the description for self.

The function takes the following parameters:

  • description (optional): description.

func (*StatusPage) SetIconName

func (self *StatusPage) SetIconName(iconName string)

SetIconName sets the icon name for self.

The function takes the following parameters:

  • iconName (optional): icon name.

func (*StatusPage) SetTitle

func (self *StatusPage) SetTitle(title string)

SetTitle sets the title for self.

The function takes the following parameters:

  • title (optional): title.

func (*StatusPage) Title

func (self *StatusPage) Title() string

Title gets the title for self.

The function returns the following values:

  • utf8 (optional): title for self, or NULL.

type StatusPageOverrider

type StatusPageOverrider interface {
}

StatusPageOverrider contains methods that are overridable.

type SwipeGroup

type SwipeGroup struct {
	*externglib.Object

	gtk.Buildable
	// contains filtered or unexported fields
}

func NewSwipeGroup

func NewSwipeGroup() *SwipeGroup

NewSwipeGroup: create a new SwipeGroup object.

The function returns the following values:

  • swipeGroup: newly created SwipeGroup object.

func (*SwipeGroup) AddSwipeable

func (self *SwipeGroup) AddSwipeable(swipeable Swipeabler)

AddSwipeable: when the widget is destroyed or no longer referenced elsewhere, it will be removed from the swipe group.

The function takes the following parameters:

  • swipeable to add.

func (*SwipeGroup) RemoveSwipeable

func (self *SwipeGroup) RemoveSwipeable(swipeable Swipeabler)

RemoveSwipeable removes a widget from a SwipeGroup.

The function takes the following parameters:

  • swipeable to remove.

func (*SwipeGroup) Swipeables

func (self *SwipeGroup) Swipeables() []*Swipeable

Swipeables returns the list of swipeables associated with self.

The function returns the following values:

  • sList of swipeables. The list is owned by libhandy and should not be modified.

type SwipeGroupOverrider

type SwipeGroupOverrider interface {
}

SwipeGroupOverrider contains methods that are overridable.

type SwipeTracker

type SwipeTracker struct {
	*externglib.Object

	gtk.Orientable
	// contains filtered or unexported fields
}

func NewSwipeTracker

func NewSwipeTracker(swipeable Swipeabler) *SwipeTracker

NewSwipeTracker: create a new SwipeTracker object on widget.

The function takes the following parameters:

  • swipeable to add the tracker on.

The function returns the following values:

  • swipeTracker: newly created SwipeTracker object.

func (*SwipeTracker) AllowLongSwipes

func (self *SwipeTracker) AllowLongSwipes() bool

AllowLongSwipes: 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.

The function returns the following values:

  • ok: TRUE if long swipes are allowed, FALSE otherwise.

func (*SwipeTracker) AllowMouseDrag

func (self *SwipeTracker) AllowMouseDrag() bool

AllowMouseDrag: get whether self can be dragged with mouse pointer.

The function returns the following values:

  • ok: TRUE is mouse dragging is allowed.

func (*SwipeTracker) ConnectBeginSwipe

func (self *SwipeTracker) ConnectBeginSwipe(f func(direction NavigationDirection, direct bool)) externglib.SignalHandle

ConnectBeginSwipe: this signal is emitted when a possible swipe is detected.

The direction value can be used to restrict the swipe to a certain direction.

func (*SwipeTracker) ConnectEndSwipe

func (self *SwipeTracker) ConnectEndSwipe(f func(duration int64, to float64)) externglib.SignalHandle

ConnectEndSwipe: this signal is emitted as soon as the gesture has stopped.

func (*SwipeTracker) ConnectUpdateSwipe

func (self *SwipeTracker) ConnectUpdateSwipe(f func(progress float64)) externglib.SignalHandle

ConnectUpdateSwipe: this signal is emitted every time the progress value changes.

func (*SwipeTracker) Enabled

func (self *SwipeTracker) Enabled() bool

Enabled: 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.

The function returns the following values:

  • ok: TRUE if self is enabled.

func (*SwipeTracker) Reversed

func (self *SwipeTracker) Reversed() bool

Reversed: get whether self is reversing the swipe direction.

The function returns the following values:

  • ok: TRUE is the direction is reversed.

func (*SwipeTracker) SetAllowLongSwipes

func (self *SwipeTracker) SetAllowLongSwipes(allowLongSwipes bool)

SetAllowLongSwipes 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.

The function takes the following parameters:

  • allowLongSwipes: whether to allow long swipes.

func (*SwipeTracker) SetAllowMouseDrag

func (self *SwipeTracker) SetAllowMouseDrag(allowMouseDrag bool)

SetAllowMouseDrag: set whether self can be dragged with mouse pointer. This should usually be FALSE.

The function takes the following parameters:

  • allowMouseDrag: whether to allow mouse dragging.

func (*SwipeTracker) SetEnabled

func (self *SwipeTracker) SetEnabled(enabled bool)

SetEnabled: 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.

The function takes the following parameters:

  • enabled: whether to enable to swipe tracker.

func (*SwipeTracker) SetReversed

func (self *SwipeTracker) SetReversed(reversed bool)

SetReversed: set whether to reverse the swipe direction. If self is horizontal, can be used for supporting RTL text direction.

The function takes the following parameters:

  • reversed: whether to reverse the swipe direction.

func (*SwipeTracker) ShiftPosition

func (self *SwipeTracker) ShiftPosition(delta float64)

ShiftPosition: move the current progress value by delta. This can be used to adjust the current position if snap points move during the gesture.

The function takes the following parameters:

  • delta: position delta.

func (*SwipeTracker) Swipeable

func (self *SwipeTracker) Swipeable() *Swipeable

Swipeable: get self's swipeable widget.

The function returns the following values:

  • swipeable widget.

type SwipeTrackerOverrider

type SwipeTrackerOverrider interface {
}

SwipeTrackerOverrider contains methods that are overridable.

type Swipeable

type Swipeable struct {
	gtk.Widget
	// contains filtered or unexported fields
}

Swipeable wraps an interface. This means the user can get the underlying type by calling Cast().

func (*Swipeable) CancelProgress

func (self *Swipeable) CancelProgress() float64

CancelProgress gets the progress self will snap back to after the gesture is canceled.

The function returns the following values:

  • gdouble: cancel progress, unitless.

func (*Swipeable) ConnectChildSwitched

func (self *Swipeable) ConnectChildSwitched(f func(index uint, duration int64)) externglib.SignalHandle

ConnectChildSwitched: 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 SwipeGroup, applications should not connect to it.

func (*Swipeable) Distance

func (self *Swipeable) Distance() float64

Distance gets the swipe distance of self. This corresponds to how many pixels 1 unit represents.

The function returns the following values:

  • gdouble: swipe distance in pixels.

func (*Swipeable) EmitChildSwitched

func (self *Swipeable) EmitChildSwitched(index uint, duration int64)

EmitChildSwitched 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.

The function takes the following parameters:

  • index of the child to switch to.
  • duration: animation duration in milliseconds.

func (*Swipeable) Progress

func (self *Swipeable) Progress() float64

Progress gets the current progress of self.

The function returns the following values:

  • gdouble: current progress, unitless.

func (*Swipeable) SnapPoints

func (self *Swipeable) SnapPoints() []float64

SnapPoints gets the snap points of self. Each snap point represents a progress value that is considered acceptable to end the swipe on.

The function returns the following values:

  • gdoubles: snap points of self. The array must be freed with g_free().

func (*Swipeable) SwipeArea

func (self *Swipeable) SwipeArea(navigationDirection NavigationDirection, isDrag bool) *gdk.Rectangle

SwipeArea 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 SwipeGroup).

If not implemented, the default implementation returns the allocation of self, allowing swipes from anywhere.

The function takes the following parameters:

  • navigationDirection: direction of the swipe.
  • isDrag: whether the swipe is caused by a dragging gesture.

The function returns the following values:

  • rect: pointer to a Rectangle to store the swipe area.

func (*Swipeable) SwipeTracker

func (self *Swipeable) SwipeTracker() *SwipeTracker

SwipeTracker gets the SwipeTracker used by this swipeable widget.

The function returns the following values:

  • swipeTracker: swipe tracker.

func (*Swipeable) SwitchChild

func (self *Swipeable) SwitchChild(index uint, duration int64)

SwitchChild: see HdySwipeable::child-switched.

The function takes the following parameters:

  • index of the child to switch to.
  • duration: animation duration in milliseconds.

type SwipeableOverrider

type SwipeableOverrider interface {
	// CancelProgress gets the progress self will snap back to after the gesture
	// is canceled.
	//
	// The function returns the following values:
	//
	//    - gdouble: cancel progress, unitless.
	//
	CancelProgress() float64
	// Distance gets the swipe distance of self. This corresponds to how many
	// pixels 1 unit represents.
	//
	// The function returns the following values:
	//
	//    - gdouble: swipe distance in pixels.
	//
	Distance() float64
	// Progress gets the current progress of self.
	//
	// The function returns the following values:
	//
	//    - gdouble: current progress, unitless.
	//
	Progress() float64
	// SnapPoints gets the snap points of self. Each snap point represents a
	// progress value that is considered acceptable to end the swipe on.
	//
	// The function returns the following values:
	//
	//    - gdoubles: snap points of self. The array must be freed with g_free().
	//
	SnapPoints() []float64
	// SwipeArea 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
	// SwipeGroup).
	//
	// If not implemented, the default implementation returns the allocation of
	// self, allowing swipes from anywhere.
	//
	// The function takes the following parameters:
	//
	//    - navigationDirection: direction of the swipe.
	//    - isDrag: whether the swipe is caused by a dragging gesture.
	//
	// The function returns the following values:
	//
	//    - rect: pointer to a Rectangle to store the swipe area.
	//
	SwipeArea(navigationDirection NavigationDirection, isDrag bool) *gdk.Rectangle
	// SwipeTracker gets the SwipeTracker used by this swipeable widget.
	//
	// The function returns the following values:
	//
	//    - swipeTracker: swipe tracker.
	//
	SwipeTracker() *SwipeTracker
	// SwitchChild: see HdySwipeable::child-switched.
	//
	// The function takes the following parameters:
	//
	//    - index of the child to switch to.
	//    - duration: animation duration in milliseconds.
	//
	SwitchChild(index uint, duration int64)
}

SwipeableOverrider contains methods that are overridable.

type Swipeabler

type Swipeabler interface {
	externglib.Objector

	// EmitChildSwitched emits HdySwipeable::child-switched signal.
	EmitChildSwitched(index uint, duration int64)
	// CancelProgress gets the progress self will snap back to after the gesture
	// is canceled.
	CancelProgress() float64
	// Distance gets the swipe distance of self.
	Distance() float64
	// Progress gets the current progress of self.
	Progress() float64
	// SnapPoints gets the snap points of self.
	SnapPoints() []float64
	// SwipeArea gets the area self can start a swipe from for the given
	// direction and gesture type.
	SwipeArea(navigationDirection NavigationDirection, isDrag bool) *gdk.Rectangle
	// SwipeTracker gets the SwipeTracker used by this swipeable widget.
	SwipeTracker() *SwipeTracker
	// SwitchChild: see HdySwipeable::child-switched.
	SwitchChild(index uint, duration int64)

	// Child-switched: this signal should be emitted when the widget's visible
	// child is changed.
	ConnectChildSwitched(func(index uint, duration int64)) externglib.SignalHandle
}

Swipeabler describes Swipeable's interface methods.

type TabBar

type TabBar struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewTabBar

func NewTabBar() *TabBar

NewTabBar creates a new TabBar widget.

The function returns the following values:

  • tabBar: new TabBar.

func (*TabBar) Autohide

func (self *TabBar) Autohide() bool

Autohide gets whether the tabs automatically hide, see hdy_tab_bar_set_autohide().

The function returns the following values:

  • ok: whether the tabs automatically hide.

func (*TabBar) ConnectExtraDragDataReceived

func (self *TabBar) ConnectExtraDragDataReceived(f func(page *TabPage, context *gdk.DragContext, data *gtk.SelectionData, info, time uint)) externglib.SignalHandle

ConnectExtraDragDataReceived: this signal is emitted when content allowed via TabBar:extra-drag-dest-targets is dropped onto a tab.

See Widget::drag-data-received.

func (*TabBar) EndActionWidget

func (self *TabBar) EndActionWidget() gtk.Widgetter

EndActionWidget gets the widget shown after the tabs.

The function returns the following values:

  • widget (optional) shown after the tabs, or NULL.

func (*TabBar) ExpandTabs

func (self *TabBar) ExpandTabs() bool

ExpandTabs gets whether tabs should expand, see hdy_tab_bar_set_expand_tabs().

The function returns the following values:

  • ok: whether tabs should expand.

func (*TabBar) ExtraDragDestTargets

func (self *TabBar) ExtraDragDestTargets() *gtk.TargetList

ExtraDragDestTargets gets extra drag destination targets, see hdy_tab_bar_set_extra_drag_dest_targets().

The function returns the following values:

  • targetList (optional): extra drag targets, or NULL.

func (*TabBar) Inverted

func (self *TabBar) Inverted() bool

Inverted gets whether tabs use inverted layout, see hdy_tab_bar_set_inverted().

The function returns the following values:

  • ok: whether tabs use inverted layout.

func (*TabBar) IsOverflowing

func (self *TabBar) IsOverflowing() bool

IsOverflowing gets whether self is overflowing.

The function returns the following values:

  • ok: whether self is overflowing.

func (*TabBar) SetAutohide

func (self *TabBar) SetAutohide(autohide bool)

SetAutohide sets whether the tabs automatically hide.

If autohide is TRUE, the tab bar disappears when the associated TabView has 0 or 1 tab, no pinned tabs, and no tab is being transferred.

Autohide is enabled by default.

See TabBar:tabs-revealed.

The function takes the following parameters:

  • autohide: whether the tabs automatically hide.

func (*TabBar) SetEndActionWidget

func (self *TabBar) SetEndActionWidget(widget gtk.Widgetter)

SetEndActionWidget sets the widget to show after the tabs.

The function takes the following parameters:

  • widget (optional) to show after the tabs, or NULL.

func (*TabBar) SetExpandTabs

func (self *TabBar) SetExpandTabs(expandTabs bool)

SetExpandTabs 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.

The function takes the following parameters:

  • expandTabs: whether to expand tabs.

func (*TabBar) SetExtraDragDestTargets

func (self *TabBar) SetExtraDragDestTargets(extraDragDestTargets *gtk.TargetList)

SetExtraDragDestTargets 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 TabBar::extra-drag-data-received signal can be used to retrieve and process the drag data.

The function takes the following parameters:

  • extraDragDestTargets (optional): extra drag targets, or NULL.

func (*TabBar) SetInverted

func (self *TabBar) SetInverted(inverted bool)

SetInverted 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.

The function takes the following parameters:

  • inverted: whether tabs use inverted layout.

func (*TabBar) SetStartActionWidget

func (self *TabBar) SetStartActionWidget(widget gtk.Widgetter)

SetStartActionWidget sets the widget to show before the tabs.

The function takes the following parameters:

  • widget (optional) to show before the tabs, or NULL.

func (*TabBar) SetView

func (self *TabBar) SetView(view *TabView)

SetView sets the TabView self controls.

The function takes the following parameters:

  • view (optional): TabView.

func (*TabBar) StartActionWidget

func (self *TabBar) StartActionWidget() gtk.Widgetter

StartActionWidget gets the widget shown before the tabs.

The function returns the following values:

  • widget (optional) shown before the tabs, or NULL.

func (*TabBar) TabsRevealed

func (self *TabBar) TabsRevealed() bool

TabsRevealed gets the value of the TabBar:tabs-revealed property.

The function returns the following values:

  • ok: whether the tabs are current revealed.

func (*TabBar) View

func (self *TabBar) View() *TabView

View gets the TabView self controls.

The function returns the following values:

  • tabView (optional) self controls.

type TabBarOverrider

type TabBarOverrider interface {
}

TabBarOverrider contains methods that are overridable.

type TabPage

type TabPage struct {
	*externglib.Object
	// contains filtered or unexported fields
}

func (*TabPage) Child

func (self *TabPage) Child() gtk.Widgetter

Child gets the child of self.

The function returns the following values:

  • widget: child of self.

func (*TabPage) Icon

func (self *TabPage) Icon() *gio.Icon

Icon gets the icon of self, see hdy_tab_page_set_icon().

The function returns the following values:

  • icon (optional) of self.

func (*TabPage) IndicatorActivatable

func (self *TabPage) IndicatorActivatable() bool

IndicatorActivatable gets whether the indicator of self is activatable, see hdy_tab_page_set_indicator_activatable().

The function returns the following values:

  • ok: whether the indicator is activatable.

func (*TabPage) IndicatorIcon

func (self *TabPage) IndicatorIcon() *gio.Icon

IndicatorIcon gets the indicator icon of self, see hdy_tab_page_set_indicator_icon().

The function returns the following values:

  • icon (optional): indicator icon of self.

func (*TabPage) Loading

func (self *TabPage) Loading() bool

Loading gets whether self is loading, see hdy_tab_page_set_loading().

The function returns the following values:

  • ok: whether self is loading.

func (*TabPage) NeedsAttention

func (self *TabPage) NeedsAttention() bool

NeedsAttention gets whether self needs attention, see hdy_tab_page_set_needs_attention().

The function returns the following values:

  • ok: whether self needs attention.

func (*TabPage) Parent

func (self *TabPage) Parent() *TabPage

Parent 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 function returns the following values:

  • tabPage (optional): parent page of self, or NULL.

func (*TabPage) Pinned

func (self *TabPage) Pinned() bool

Pinned gets whether self is pinned. See hdy_tab_view_set_page_pinned().

The function returns the following values:

  • ok: whether self is pinned.

func (*TabPage) Selected

func (self *TabPage) Selected() bool

Selected gets whether self is selected. See hdy_tab_view_set_selected_page().

The function returns the following values:

  • ok: whether self is selected.

func (*TabPage) SetIcon

func (self *TabPage) SetIcon(icon gio.Iconner)

SetIcon sets the icon of self, displayed next to the title.

TabBar will not show the icon if TabPage:loading is set to TRUE, or if self is pinned and TabPage:indicator-icon is set.

The function takes the following parameters:

  • icon (optional) of self.

func (*TabPage) SetIndicatorActivatable

func (self *TabPage) SetIndicatorActivatable(activatable bool)

SetIndicatorActivatable sets whether the indicator of self is activatable.

If set to TRUE, TabView::indicator-activated will be emitted when the indicator is clicked.

If TabPage:indicator-icon is not set, does nothing.

The function takes the following parameters:

  • activatable: whether the indicator is activatable.

func (*TabPage) SetIndicatorIcon

func (self *TabPage) SetIndicatorIcon(indicatorIcon gio.Iconner)

SetIndicatorIcon sets the indicator icon of self.

A common use case is an audio or camera indicator in a web browser.

TabPage will show it at the beginning of the tab, alongside icon representing TabPage:icon or loading spinner.

If the page is pinned, the indicator will be shown instead of icon or spinner.

If TabPage:indicator-activatable is set to TRUE, indicator icon can act as a button.

The function takes the following parameters:

  • indicatorIcon (optional): indicator icon of self.

func (*TabPage) SetLoading

func (self *TabPage) SetLoading(loading bool)

SetLoading sets wether self is loading.

If set to TRUE, TabBar will display a spinner in place of icon.

If self is pinned and TabPage:indicator-icon is set, the loading status will not be visible.

The function takes the following parameters:

  • loading: whether self is loading.

func (*TabPage) SetNeedsAttention

func (self *TabPage) SetNeedsAttention(needsAttention bool)

SetNeedsAttention sets whether self needs attention.

TabBar 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.

The function takes the following parameters:

  • needsAttention: whether self needs attention.

func (*TabPage) SetTitle

func (self *TabPage) SetTitle(title string)

SetTitle sets the title of self.

TabBar will display it in the center of the tab representing self unless it's pinned, and will use it as a tooltip unless TabPage:tooltip is set.

The function takes the following parameters:

  • title (optional) of self.

func (*TabPage) SetTooltip

func (self *TabPage) SetTooltip(tooltip string)

SetTooltip sets the tooltip of self, marked up with the Pango text markup language.

If not set, TabBar will use TabPage:title as a tooltip instead.

The function takes the following parameters:

  • tooltip (optional) of self.

func (*TabPage) Title

func (self *TabPage) Title() string

Title gets the title of self, see hdy_tab_page_set_title().

The function returns the following values:

  • utf8 (optional): title of self.

func (*TabPage) Tooltip

func (self *TabPage) Tooltip() string

Tooltip gets the tooltip of self, see hdy_tab_page_set_tooltip().

The function returns the following values:

  • utf8 (optional): tooltip of self.

type TabPageOverrider

type TabPageOverrider interface {
}

TabPageOverrider contains methods that are overridable.

type TabView

type TabView struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewTabView

func NewTabView() *TabView

NewTabView creates a new TabView widget.

The function returns the following values:

  • tabView: new TabView.

func (*TabView) AddPage

func (self *TabView) AddPage(child gtk.Widgetter, parent *TabPage) *TabPage

AddPage 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 function takes the following parameters:

  • child: widget to add.
  • parent (optional) page for child, or NULL.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) Append

func (self *TabView) Append(child gtk.Widgetter) *TabPage

Append inserts child as the last non-pinned page.

The function takes the following parameters:

  • child: widget to add.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) AppendPinned

func (self *TabView) AppendPinned(child gtk.Widgetter) *TabPage

AppendPinned inserts child as the last pinned page.

The function takes the following parameters:

  • child: widget to add.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) CloseOtherPages

func (self *TabView) CloseOtherPages(page *TabPage)

CloseOtherPages requests to close all pages other than page.

The function takes the following parameters:

  • page of self.

func (*TabView) ClosePage

func (self *TabView) ClosePage(page *TabPage)

ClosePage requests to close page.

Calling this function will result in TabView::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 TabView::close-page will immediately confirm closing the page if it's non-pinned, or reject it if it's pinned. This behavior can be changed by registering your own handler for that signal.

If page was selected, another page will be selected instead:

If the TabPage:parent value is NULL, the next page will be selected when possible, or if the page was already last, the previous page will be selected instead.

If it's not NULL, the previous page will be selected if it's a descendant (possibly indirect) of the parent. If both the previous page and the parent are pinned, the parent will be selected instead.

The function takes the following parameters:

  • page of self.

func (*TabView) ClosePageFinish

func (self *TabView) ClosePageFinish(page *TabPage, confirm bool)

ClosePageFinish 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 TabView::close-page is used.

The function takes the following parameters:

  • page of self.
  • confirm: whether to confirm or deny closing page.

func (*TabView) ClosePagesAfter

func (self *TabView) ClosePagesAfter(page *TabPage)

ClosePagesAfter requests to close all pages after page.

The function takes the following parameters:

  • page of self.

func (*TabView) ClosePagesBefore

func (self *TabView) ClosePagesBefore(page *TabPage)

ClosePagesBefore requests to close all pages before page.

The function takes the following parameters:

  • page of self.

func (*TabView) ConnectClosePage

func (self *TabView) ConnectClosePage(f func(page *TabPage) (ok bool)) externglib.SignalHandle

ConnectClosePage: 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:

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.

func (*TabView) ConnectCreateWindow

func (self *TabView) ConnectCreateWindow(f func() (tabView *TabView)) externglib.SignalHandle

ConnectCreateWindow: 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 TabView that the page will be transferred into.

func (*TabView) ConnectIndicatorActivated

func (self *TabView) ConnectIndicatorActivated(f func(page *TabPage)) externglib.SignalHandle

ConnectIndicatorActivated: this signal is emitted after the indicator icon on page has been activated.

See TabPage:indicator-icon and TabPage:indicator-activatable.

func (*TabView) ConnectPageAttached

func (self *TabView) ConnectPageAttached(f func(page *TabPage, position int)) externglib.SignalHandle

ConnectPageAttached: 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.

func (*TabView) ConnectPageDetached

func (self *TabView) ConnectPageDetached(f func(page *TabPage, position int)) externglib.SignalHandle

ConnectPageDetached: 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 TabView::page-attached handler.

It is important not to try and destroy the page child in the handler of this function as the child might merely be moved to another window; use child dispose handler for that or do it in sync with your hdy_tab_view_close_page_finish() calls.

func (*TabView) ConnectPageReordered

func (self *TabView) ConnectPageReordered(f func(page *TabPage, position int)) externglib.SignalHandle

ConnectPageReordered: this signal is emitted after page has been reordered to position.

func (*TabView) ConnectSetupMenu

func (self *TabView) ConnectSetupMenu(f func(page *TabPage)) externglib.SignalHandle

ConnectSetupMenu: 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.

func (*TabView) DefaultIcon

func (self *TabView) DefaultIcon() *gio.Icon

DefaultIcon gets default icon of self, see hdy_tab_view_set_default_icon().

The function returns the following values:

  • icon: default icon of self.

func (*TabView) Insert

func (self *TabView) Insert(child gtk.Widgetter, position int) *TabPage

Insert 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 function takes the following parameters:

  • child: widget to add.
  • position to add child at, starting from 0.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) InsertPinned

func (self *TabView) InsertPinned(child gtk.Widgetter, position int) *TabPage

InsertPinned 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 function takes the following parameters:

  • child: widget to add.
  • position to add child at, starting from 0.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) IsTransferringPage

func (self *TabView) IsTransferringPage() bool

IsTransferringPage: whether a page is being transferred.

Gets the value of TabView:is-transferring-page property.

The function returns the following values:

  • ok: whether a page is being transferred.

func (*TabView) MenuModel

func (self *TabView) MenuModel() gio.MenuModeller

MenuModel gets the tab context menu model for self, see hdy_tab_view_set_menu_model().

The function returns the following values:

  • menuModel (optional): tab context menu model for self.

func (*TabView) NPages

func (self *TabView) NPages() int

NPages gets the number of pages in self.

The function returns the following values:

  • gint: number of pages in self.

func (*TabView) NPinnedPages

func (self *TabView) NPinnedPages() int

NPinnedPages gets the number of pinned pages in self.

See hdy_tab_view_set_page_pinned().

The function returns the following values:

  • gint: number of pinned pages in self.

func (*TabView) NthPage

func (self *TabView) NthPage(position int) *TabPage

NthPage gets the TabPage representing the child at position.

The function takes the following parameters:

  • position: index of the page in self, starting from 0.

The function returns the following values:

  • tabPage: page object at position.

func (*TabView) Page

func (self *TabView) Page(child gtk.Widgetter) *TabPage

Page gets the TabPage object representing child.

The function takes the following parameters:

  • child in self.

The function returns the following values:

  • tabPage representing child.

func (*TabView) PagePosition

func (self *TabView) PagePosition(page *TabPage) int

PagePosition finds the position of page in self, starting from 0.

The function takes the following parameters:

  • page of self.

The function returns the following values:

  • gint: position of page in self.

func (*TabView) Pages

func (self *TabView) Pages() *gio.ListModel

Pages returns a Model containing the pages of self. This model can be used to keep an up to date view of the pages.

The function returns the following values:

  • listModel: model containing pages of self.

func (*TabView) Prepend

func (self *TabView) Prepend(child gtk.Widgetter) *TabPage

Prepend inserts child as the first non-pinned page.

The function takes the following parameters:

  • child: widget to add.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) PrependPinned

func (self *TabView) PrependPinned(child gtk.Widgetter) *TabPage

PrependPinned inserts child as the first pinned page.

The function takes the following parameters:

  • child: widget to add.

The function returns the following values:

  • tabPage: page object representing child.

func (*TabView) ReorderBackward

func (self *TabView) ReorderBackward(page *TabPage) bool

ReorderBackward reorders page to before its previous page if possible.

The function takes the following parameters:

  • page of self.

The function returns the following values:

  • ok: TRUE if page was moved, FALSE otherwise.

func (*TabView) ReorderFirst

func (self *TabView) ReorderFirst(page *TabPage) bool

ReorderFirst reorders page to the first possible position.

The function takes the following parameters:

  • page of self.

The function returns the following values:

  • ok: TRUE if page was moved, FALSE otherwise.

func (*TabView) ReorderForward

func (self *TabView) ReorderForward(page *TabPage) bool

ReorderForward reorders page to after its next page if possible.

The function takes the following parameters:

  • page of self.

The function returns the following values:

  • ok: TRUE if page was moved, FALSE otherwise.

func (*TabView) ReorderLast

func (self *TabView) ReorderLast(page *TabPage) bool

ReorderLast reorders page to the last possible position.

The function takes the following parameters:

  • page of self.

The function returns the following values:

  • ok: TRUE if page was moved, FALSE otherwise.

func (*TabView) ReorderPage

func (self *TabView) ReorderPage(page *TabPage, position int) bool

ReorderPage 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.

The function takes the following parameters:

  • page of self.
  • position to insert the page at, starting at 0.

The function returns the following values:

  • ok: TRUE if page was moved, FALSE otherwise.

func (*TabView) SelectNextPage

func (self *TabView) SelectNextPage() bool

SelectNextPage selects the page after the currently selected page.

If the last page was already selected, this function does nothing.

The function returns the following values:

  • ok: TRUE if the selected page was changed, FALSE otherwise.

func (*TabView) SelectPreviousPage

func (self *TabView) SelectPreviousPage() bool

SelectPreviousPage selects the page before the currently selected page.

If the first page was already selected, this function does nothing.

The function returns the following values:

  • ok: TRUE if the selected page was changed, FALSE otherwise.

func (*TabView) SelectedPage

func (self *TabView) SelectedPage() *TabPage

SelectedPage gets the currently selected page in self.

The function returns the following values:

  • tabPage (optional): selected page in self.

func (*TabView) SetDefaultIcon

func (self *TabView) SetDefaultIcon(defaultIcon gio.Iconner)

SetDefaultIcon sets default page icon for self.

If a page doesn't provide its own icon via TabPage:icon, default icon may be used instead for contexts where having an icon is necessary.

TabBar will use default icon for pinned tabs in case the page is not loading, doesn't have an icon and an indicator. Default icon is never used for tabs that aren't pinned.

By default, 'hdy-tab-icon-missing-symbolic' icon is used.

The function takes the following parameters:

  • defaultIcon: default icon.

func (*TabView) SetMenuModel

func (self *TabView) SetMenuModel(menuModel gio.MenuModeller)

SetMenuModel 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 TabView::setup-menu signal to set up the menu actions for the particular tab.

The function takes the following parameters:

  • menuModel (optional): menu model.

func (*TabView) SetPagePinned

func (self *TabView) SetPagePinned(page *TabPage, pinned bool)

SetPagePinned pins or unpins page.

Pinned pages are guaranteed to be placed before all non-pinned pages; at any given moment the first TabView:n-pinned-pages pages in self are guaranteed to be pinned.

When a page is pinned or unpinned, it's automatically reordered: pinning a page moves it after other pinned pages; unpinning a page moves it before other non-pinned pages.

Pinned pages can still be reordered between each other.

TabBar will display pinned pages in a compact form, never showing the title or close button, and only showing a single icon, selected in the following order:

1. TabPage:indicator-icon 2. A spinner if TabPage:loading is TRUE 3. TabPage:icon 4. TabView:default-icon

Pinned pages cannot be closed by default, see TabView::close-page for how to override that behavior.

The function takes the following parameters:

  • page of self.
  • pinned: whether page should be pinned.

func (*TabView) SetSelectedPage

func (self *TabView) SetSelectedPage(selectedPage *TabPage)

SetSelectedPage sets the currently selected page in self.

The function takes the following parameters:

  • selectedPage: page in self.

func (*TabView) SetShortcutWidget

func (self *TabView) SetShortcutWidget(widget gtk.Widgetter)

SetShortcutWidget 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.

The function takes the following parameters:

  • widget (optional): shortcut widget.

func (*TabView) ShortcutWidget

func (self *TabView) ShortcutWidget() gtk.Widgetter

ShortcutWidget gets the shortcut widget for self, see hdy_tab_view_set_shortcut_widget().

The function returns the following values:

  • widget (optional): shortcut widget for self.

func (*TabView) TransferPage

func (self *TabView) TransferPage(page *TabPage, otherView *TabView, position int)

TransferPage 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.

The function takes the following parameters:

  • page of self.
  • otherView: tab view to transfer the page to.
  • position to insert the page at, starting at 0.

type TabViewOverrider

type TabViewOverrider interface {
}

TabViewOverrider contains methods that are overridable.

type TitleBar

type TitleBar struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewTitleBar

func NewTitleBar() *TitleBar

NewTitleBar creates a new TitleBar.

The function returns the following values:

  • titleBar: new TitleBar.

func (*TitleBar) SelectionMode

func (self *TitleBar) SelectionMode() bool

SelectionMode returns whether whether self is in selection mode.

The function returns the following values:

  • ok: TRUE if the title bar is in selection mode.

func (*TitleBar) SetSelectionMode

func (self *TitleBar) SetSelectionMode(selectionMode bool)

SetSelectionMode sets whether self is in selection mode.

The function takes the following parameters:

  • selectionMode: TRUE to enable the selection mode.

type TitleBarOverrider

type TitleBarOverrider interface {
}

TitleBarOverrider contains methods that are overridable.

type ValueObject

type ValueObject struct {
	*externglib.Object
	// contains filtered or unexported fields
}

func NewValueObject

func NewValueObject(value *externglib.Value) *ValueObject

NewValueObject: create a new ValueObject.

The function takes the following parameters:

  • value to store.

The function returns the following values:

  • valueObject: new ValueObject.

func (*ValueObject) CopyValue

func (value *ValueObject) CopyValue(dest *externglib.Value)

CopyValue: copy data from the contained #GValue into dest.

The function takes the following parameters:

  • dest with correct type to copy into.

func (*ValueObject) DupString

func (value *ValueObject) DupString() string

DupString returns a copy of the contained string if the value is of type TYPE_STRING.

The function returns the following values:

  • utf8: copy of the contained string.

func (*ValueObject) String

func (value *ValueObject) String() string

String returns the contained string if the value is of type TYPE_STRING.

The function returns the following values:

  • utf8: contained string.

func (*ValueObject) Value

func (value *ValueObject) Value() *externglib.Value

Value: return the contained value.

The function returns the following values:

  • ret: contained #GValue.

type ValueObjectOverrider

type ValueObjectOverrider interface {
}

ValueObjectOverrider contains methods that are overridable.

type ViewSwitcher

type ViewSwitcher struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewViewSwitcher

func NewViewSwitcher() *ViewSwitcher

NewViewSwitcher creates a new ViewSwitcher widget.

The function returns the following values:

  • viewSwitcher: new ViewSwitcher.

func (*ViewSwitcher) NarrowEllipsize

func (self *ViewSwitcher) NarrowEllipsize() pango.EllipsizeMode

NarrowEllipsize: get the ellipsizing position of the narrow mode label. See hdy_view_switcher_set_narrow_ellipsize().

The function returns the following values:

  • ellipsizeMode: EllipsizeMode.

func (*ViewSwitcher) Policy

func (self *ViewSwitcher) Policy() ViewSwitcherPolicy

Policy gets the policy of self.

The function returns the following values:

  • viewSwitcherPolicy: policy of self.

func (*ViewSwitcher) SetNarrowEllipsize

func (self *ViewSwitcher) SetNarrowEllipsize(mode pango.EllipsizeMode)

SetNarrowEllipsize: set the mode used to ellipsize the text in narrow mode if there is not enough space to render the entire string.

The function takes the following parameters:

  • mode: EllipsizeMode.

func (*ViewSwitcher) SetPolicy

func (self *ViewSwitcher) SetPolicy(policy ViewSwitcherPolicy)

SetPolicy sets the policy of self.

The function takes the following parameters:

  • policy: new policy.

func (*ViewSwitcher) SetStack

func (self *ViewSwitcher) SetStack(stack *gtk.Stack)

SetStack sets the Stack to control.

The function takes the following parameters:

  • stack (optional): Stack.

func (*ViewSwitcher) Stack

func (self *ViewSwitcher) Stack() *gtk.Stack

Stack: get the Stack being controlled by the ViewSwitcher.

See: hdy_view_switcher_set_stack().

The function returns the following values:

  • stack (optional) or NULL if none has been set.

type ViewSwitcherBar

type ViewSwitcherBar struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewViewSwitcherBar

func NewViewSwitcherBar() *ViewSwitcherBar

NewViewSwitcherBar creates a new ViewSwitcherBar widget.

The function returns the following values:

  • viewSwitcherBar: new ViewSwitcherBar.

func (*ViewSwitcherBar) Policy

func (self *ViewSwitcherBar) Policy() ViewSwitcherPolicy

Policy gets the policy of self.

The function returns the following values:

  • viewSwitcherPolicy: policy of self.

func (*ViewSwitcherBar) Reveal

func (self *ViewSwitcherBar) Reveal() bool

Reveal gets whether self should be revealed or not.

The function returns the following values:

  • ok: TRUE if self is revealed, FALSE if not.

func (*ViewSwitcherBar) SetPolicy

func (self *ViewSwitcherBar) SetPolicy(policy ViewSwitcherPolicy)

SetPolicy sets the policy of self.

The function takes the following parameters:

  • policy: new policy.

func (*ViewSwitcherBar) SetReveal

func (self *ViewSwitcherBar) SetReveal(reveal bool)

SetReveal sets whether self should be revealed or not.

The function takes the following parameters:

  • reveal: TRUE to reveal self.

func (*ViewSwitcherBar) SetStack

func (self *ViewSwitcherBar) SetStack(stack *gtk.Stack)

SetStack sets the Stack to control.

The function takes the following parameters:

  • stack (optional): Stack.

func (*ViewSwitcherBar) Stack

func (self *ViewSwitcherBar) Stack() *gtk.Stack

Stack: get the Stack being controlled by the ViewSwitcher.

The function returns the following values:

  • stack (optional) or NULL if none has been set.

type ViewSwitcherBarOverrider

type ViewSwitcherBarOverrider interface {
}

ViewSwitcherBarOverrider contains methods that are overridable.

type ViewSwitcherOverrider

type ViewSwitcherOverrider interface {
}

ViewSwitcherOverrider contains methods that are overridable.

type ViewSwitcherPolicy

type ViewSwitcherPolicy C.gint
const (
	// ViewSwitcherPolicyAuto: automatically adapt to the best fitting mode.
	ViewSwitcherPolicyAuto ViewSwitcherPolicy = iota
	// ViewSwitcherPolicyNarrow: force the narrow mode.
	ViewSwitcherPolicyNarrow
	// ViewSwitcherPolicyWide: force the wide mode.
	ViewSwitcherPolicyWide
)

func (ViewSwitcherPolicy) String

func (v ViewSwitcherPolicy) String() string

String returns the name in string for ViewSwitcherPolicy.

type ViewSwitcherTitle

type ViewSwitcherTitle struct {
	gtk.Bin
	// contains filtered or unexported fields
}

func NewViewSwitcherTitle

func NewViewSwitcherTitle() *ViewSwitcherTitle

NewViewSwitcherTitle creates a new ViewSwitcherTitle widget.

The function returns the following values:

  • viewSwitcherTitle: new ViewSwitcherTitle.

func (*ViewSwitcherTitle) Policy

func (self *ViewSwitcherTitle) Policy() ViewSwitcherPolicy

Policy gets the policy of self.

The function returns the following values:

  • viewSwitcherPolicy: policy of self.

func (*ViewSwitcherTitle) SetPolicy

func (self *ViewSwitcherTitle) SetPolicy(policy ViewSwitcherPolicy)

SetPolicy sets the policy of self.

The function takes the following parameters:

  • policy: new policy.

func (*ViewSwitcherTitle) SetStack

func (self *ViewSwitcherTitle) SetStack(stack *gtk.Stack)

SetStack sets the Stack to control.

The function takes the following parameters:

  • stack (optional): Stack.

func (*ViewSwitcherTitle) SetSubtitle

func (self *ViewSwitcherTitle) SetSubtitle(subtitle string)

SetSubtitle sets the subtitle of self. The subtitle should give a user additional details.

The function takes the following parameters:

  • subtitle (optional): subtitle, or NULL.

func (*ViewSwitcherTitle) SetTitle

func (self *ViewSwitcherTitle) SetTitle(title string)

SetTitle sets the title of self. The title should give a user additional details. A good title should not include the application name.

The function takes the following parameters:

  • title (optional): title, or NULL.

func (*ViewSwitcherTitle) SetViewSwitcherEnabled

func (self *ViewSwitcherTitle) SetViewSwitcherEnabled(enabled bool)

SetViewSwitcherEnabled: 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.

The function takes the following parameters:

  • enabled: TRUE to enable the view switcher, FALSE to disable it.

func (*ViewSwitcherTitle) Stack

func (self *ViewSwitcherTitle) Stack() *gtk.Stack

Stack: get the Stack being controlled by the ViewSwitcher.

The function returns the following values:

  • stack (optional) or NULL if none has been set.

func (*ViewSwitcherTitle) Subtitle

func (self *ViewSwitcherTitle) Subtitle() string

Subtitle gets the subtitle of self. See hdy_view_switcher_title_set_subtitle().

The function returns the following values:

  • utf8 (optional): subtitle of self, or NULL.

func (*ViewSwitcherTitle) Title

func (self *ViewSwitcherTitle) Title() string

Title gets the title of self. See hdy_view_switcher_title_set_title().

The function returns the following values:

  • utf8 (optional): title of self, or NULL.

func (*ViewSwitcherTitle) TitleVisible

func (self *ViewSwitcherTitle) TitleVisible() bool

TitleVisible: get whether the title label of self is visible.

The function returns the following values:

  • ok: TRUE if the title label of self is visible, FALSE if not.

func (*ViewSwitcherTitle) ViewSwitcherEnabled

func (self *ViewSwitcherTitle) ViewSwitcherEnabled() bool

ViewSwitcherEnabled gets whether self's view switcher is enabled.

See hdy_view_switcher_title_set_view_switcher_enabled().

The function returns the following values:

  • ok: TRUE if the view switcher is enabled, FALSE otherwise.

type ViewSwitcherTitleOverrider

type ViewSwitcherTitleOverrider interface {
}

ViewSwitcherTitleOverrider contains methods that are overridable.

type Window

type Window struct {
	gtk.Window
	// contains filtered or unexported fields
}

func NewWindow

func NewWindow() *Window

NewWindow creates a new Window.

The function returns the following values:

  • window: newly created Window.

type WindowHandle

type WindowHandle struct {
	gtk.EventBox
	// contains filtered or unexported fields
}

func NewWindowHandle

func NewWindowHandle() *WindowHandle

NewWindowHandle creates a new WindowHandle.

The function returns the following values:

  • windowHandle: newly created WindowHandle.

type WindowHandleOverrider

type WindowHandleOverrider interface {
}

WindowHandleOverrider contains methods that are overridable.

type WindowOverrider

type WindowOverrider interface {
}

WindowOverrider contains methods that are overridable.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL