gtkutils

package
v0.0.5-0...-0379fef Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2021 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

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

func Bold

func Bold(str string) string

func Connect

func Connect(connector Connector, event string, cb 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

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

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

func OpenURI

func OpenURI(uri string)

func TransferMargin

func TransferMargin(dst, src Marginator)

func TraverseWidget

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

fn() == true => break

func WindowSetEvents

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

func WrapBox

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

Types

type Connector

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

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

type Object

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

type ScrollablePolicy

type ScrollablePolicy int

type SizeRequester

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