gtkutils

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SCROLL_MINIMUM = C.GTK_SCROLL_MINIMUM
	SCROLL_NATURAL = C.GTK_SCROLL_NATURAL
)

Variables

This section is empty.

Functions

func AddCSSUnsafe

func AddCSSUnsafe(style *gtk.StyleContext, CSS string)

func AsContainer added in v0.0.4

func AsContainer(w gtk.IWidget) *gtk.Container

func Bold

func Bold(str string) string

func Connect

func Connect(connector Connector, event string, cb interface{}, data ...interface{})

func DiffClass

func DiffClass(old *string, new string, style *gtk.StyleContext)

func DiffClassUnsafe

func DiffClassUnsafe(old *string, new string, style *gtk.StyleContext)

func Escape

func Escape(str string) string

func EventIsLeftClick

func EventIsLeftClick(ev *gdk.Event) bool

func EventIsRightClick

func EventIsRightClick(ev *gdk.Event) bool

func HandyDialog

func HandyDialog(dialog Dialoger, transientFor gtk.IWindow) *handy.Dialog

func HasProperty added in v0.0.4

func HasProperty(obj Object, name string) bool

func ImageSetIcon

func ImageSetIcon(img *gtk.Image, icon string, px int)

func InjectCSS

func InjectCSS(g StyleContextGetter, class, CSS string)

func InjectCSSUnsafe

func InjectCSSUnsafe(g StyleContextGetter, class, CSS string)

func KeyIsASCII

func KeyIsASCII(key uint) bool

func Margin

func Margin(w Marginator, sz int)

func Margin2

func Margin2(w Marginator, top, left int)

func Margin4

func Margin4(w Marginator, top, bottom, left, right int)

func NAddButtonWithTargetValue

func NAddButtonWithTargetValue(n *glib.Notification, label, action string, target *glib.Variant)

func NSetDefaultActionAndTargetValue

func NSetDefaultActionAndTargetValue(n *glib.Notification, action string, target *glib.Variant)

func NthChildren added in v0.0.4

func NthChildren(container Container, i int) *gtk.Widget

func OpenURI added in v0.0.4

func OpenURI(uri string)

func TransferMargin added in v0.0.4

func TransferMargin(dst, src Marginator)

func TraverseWidget added in v0.0.4

func TraverseWidget(container Container, fn func(*gtk.Widget))

fn() == true => break

func WindowSetEvents added in v0.0.4

func WindowSetEvents(w *gdk.Window, events gdk.EventMask)

func WrapBox added in v0.0.4

func WrapBox(orient gtk.Orientation, widgets ...gtk.IWidget) *gtk.Box

Types

type Connector added in v0.0.4

type Connector interface {
	Connect(string, interface{}, ...interface{}) (glib.SignalHandle, error)
}

type Container

type Container interface {
	gtk.IWidget
	Add(gtk.IWidget)
	Remove(gtk.IWidget)
	GetChildren() *glib.List
}

type Dialoger

type Dialoger interface {
	GetContentArea() (*gtk.Box, error)
	GetHeaderBar() (gtk.IWidget, error)
	Remove(gtk.IWidget)
}

type ExtendedWidget

type ExtendedWidget interface {
	gtk.IWidget
	StyleContextGetter

	SetSensitive(bool)
	GetSensitive() bool
	SetOpacity(float64)
	Hide()
	Show()
	ShowAll()
	Destroy()
	GrabFocus()
	SetSizeRequest(w, h int)
}

type Marginator

type Marginator interface {
	SetMarginStart(int)
	SetMarginEnd(int)
	SetMarginTop(int)
	SetMarginBottom(int)

	GetMarginStart() int
	GetMarginEnd() int
	GetMarginTop() int
	GetMarginBottom() int
}

type Namer added in v0.0.4

type Namer interface {
	GetName() (string, error)
	SetName(string)
}

type Object added in v0.0.4

type Object interface {
	GetProperty(string) (interface{}, error)
	GetPropertyType(string) (glib.Type, error)
	SetProperty(string, interface{}) error
}

type ScrollablePolicy

type ScrollablePolicy int

type SizeRequester added in v0.0.4

type SizeRequester interface {
	SetSizeRequest(w, h int)
}

type StyleContextGetter

type StyleContextGetter interface {
	GetStyleContext() (*gtk.StyleContext, error)
}

type WidgetConnector

type WidgetConnector interface {
	gtk.IWidget
	Connect(string, interface{}, ...interface{}) (glib.SignalHandle, error)
}

type WidgetDestroyer

type WidgetDestroyer interface {
	gtk.IWidget
	Destroy()
}

type WidgetSizeRequester

type WidgetSizeRequester interface {
	gtk.IWidget
	SetSizeRequest(w, h int)
	SetVExpand(bool)
	SetHExpand(bool)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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