gtk

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GdkButton

func GdkButton(event *GdkEventButton) (int, int, int, int)

func GdkConfigure

func GdkConfigure(top *WindowWidget, layout *FrameWidget) (int, int, int, int)

func GdkKey

func GdkKey(event *GdkEventKey) (rune, bool, bool, bool, bool, string)

func GdkMotion

func GdkMotion(event *GdkEventMotion) (int, int, bool, bool, bool, bool)

func GdkScroll

func GdkScroll(event *GdkEventScroll) (int, int, int)

func NotifyWeakRef

func NotifyWeakRef(object *C.GObject, callback func(data uintptr), data uintptr)

func RequestClipboardText

func RequestClipboardText(callback func(text string))

func SetClipboardText

func SetClipboardText(text string)

func SignalDrawCallback

func SignalDrawCallback(callback func(cr *Cairo, h *cgo.Handle))

func SignalMenuItemActivateCallback

func SignalMenuItemActivateCallback(callback func(h *cgo.Handle))

Types

type Application

type Application struct {
	// contains filtered or unexported fields
}

func NewApplication

func NewApplication() *Application

func (*Application) GActionMap

func (app *Application) GActionMap() *C.GActionMap

func (*Application) GApplication

func (app *Application) GApplication() *C.GApplication

func (*Application) GObject

func (app *Application) GObject() *C.GObject

func (*Application) GPointer

func (app *Application) GPointer() C.gpointer

func (*Application) GtkApplication

func (app *Application) GtkApplication() *C.GtkApplication

func (*Application) NewMenu

func (app *Application) NewMenu() *Menu

func (*Application) NewMenuAction

func (app *Application) NewMenuAction(action string) *MenuAction

func (*Application) NewWindow

func (app *Application) NewWindow() *WindowWidget

func (*Application) Quit

func (app *Application) Quit()

func (*Application) Run

func (app *Application) Run()

func (*Application) SetName

func (app *Application) SetName(name string)

func (*Application) SignalActivate

func (app *Application) SignalActivate(callback func())

func (*Application) SignalShutdown

func (app *Application) SignalShutdown(callback func())

type Cairo

type Cairo C.cairo_t

type CairoBitmap

type CairoBitmap struct {
	// contains filtered or unexported fields
}

func NewCairoBitmap

func NewCairoBitmap(data []byte, width, height int) *CairoBitmap

func (*CairoBitmap) Destroy

func (e *CairoBitmap) Destroy()

type CairoFillPaint

type CairoFillPaint struct {
	// contains filtered or unexported fields
}

func NewCairoFillPaint

func NewCairoFillPaint(x, y, width, height int, r, g, b, a uint16) *CairoFillPaint

func (*CairoFillPaint) Paint

func (e *CairoFillPaint) Paint(c *Cairo)

type CairoImagePaint

type CairoImagePaint struct {
	// contains filtered or unexported fields
}

func NewCairoImagePaint

func NewCairoImagePaint(x, y, width, height int, image *CairoBitmap) *CairoImagePaint

func (*CairoImagePaint) Paint

func (e *CairoImagePaint) Paint(c *Cairo)

type CairoLinePaint

type CairoLinePaint struct {
	// contains filtered or unexported fields
}

func NewCairoLinePaint

func NewCairoLinePaint(x0, y0, x1, y1 int, r, g, b, a uint16) *CairoLinePaint

func (*CairoLinePaint) Paint

func (e *CairoLinePaint) Paint(c *Cairo)

type CairoTextPaint

type CairoTextPaint struct {
	// contains filtered or unexported fields
}

func NewCairoTextPaint

func NewCairoTextPaint(x, y int, r, g, b, a uint16, font *FontSelection, text string) *CairoTextPaint

func (*CairoTextPaint) Destroy

func (e *CairoTextPaint) Destroy()

func (*CairoTextPaint) Paint

func (e *CairoTextPaint) Paint(c *Cairo)

type FontSelection

type FontSelection struct {
	// contains filtered or unexported fields
}

func NewFontSelection

func NewFontSelection(height int, family string, style int, variant int, weight int, stretch int) *FontSelection

func (*FontSelection) Free

func (f *FontSelection) Free()

func (*FontSelection) Metrics

func (f *FontSelection) Metrics(top *Widget) (int, int, int, int)

func (*FontSelection) Size

func (f *FontSelection) Size(top *Widget, text string) (int, int)

func (*FontSelection) Split

func (f *FontSelection) Split(top *Widget, text string, edge, indent int) []int

type FrameWidget

type FrameWidget struct {
	*Widget
	// contains filtered or unexported fields
}

type FrameWidget contain GtkLayout, GtkFixed or DrawingArea widget

func (*FrameWidget) Move

func (frame *FrameWidget) Move(x, y int)

func (*FrameWidget) NewDrawingArea

func (parent *FrameWidget) NewDrawingArea() *FrameWidget

func (*FrameWidget) QueueDraw

func (frame *FrameWidget) QueueDraw()

func (*FrameWidget) Raise

func (frame *FrameWidget) Raise()

func (*FrameWidget) Size

func (frame *FrameWidget) Size(width, height int)

type GdkEventButton

type GdkEventButton C.GdkEventButton

type GdkEventConfigure

type GdkEventConfigure C.GdkEventConfigure

type GdkEventKey

type GdkEventKey C.GdkEventKey

type GdkEventMotion

type GdkEventMotion C.GdkEventMotion

type GdkEventScroll

type GdkEventScroll C.GdkEventScroll
type Menu struct {
	// contains filtered or unexported fields
}
func (menu *Menu) Destroy()
func (parent *Menu) NewNode(label string) *MenuNode
type MenuAction struct {
	// contains filtered or unexported fields
}
func (action *MenuAction) Destroy()
func (action *MenuAction) GObject() *C.GObject
func (action *MenuAction) SignalMenuItemActivate(h *cgo.Handle)
type MenuItem struct {
	// contains filtered or unexported fields
}
func (item *MenuItem) Destroy()
type MenuNode struct {
	*Menu
	// contains filtered or unexported fields
}
func (node *MenuNode) NewItem(label string, action string) *MenuItem

type WatchIO

type WatchIO struct {
	// contains filtered or unexported fields
}

func NewRequestIO

func NewRequestIO(syncFile fder, readFn func()) (*WatchIO, error)

func NewStreamIO

func NewStreamIO(streamFile fder, readFn func()) (*WatchIO, error)

func (*WatchIO) Done

func (w *WatchIO) Done()

type Widget

type Widget struct {
	// contains filtered or unexported fields
}

func (*Widget) Destroy

func (widget *Widget) Destroy()

func (*Widget) GObject

func (widget *Widget) GObject() *C.GObject

func (*Widget) GPointer

func (widget *Widget) GPointer() C.gpointer

func (*Widget) NewFixed

func (parent *Widget) NewFixed() *FrameWidget

func (*Widget) NewLayout

func (parent *Widget) NewLayout() *FrameWidget

func (*Widget) Show

func (widget *Widget) Show()

func (*Widget) ShowAll

func (widget *Widget) ShowAll()

func (*Widget) SignalButtonPress

func (widget *Widget) SignalButtonPress(callback func(event *GdkEventButton))

func (*Widget) SignalButtonRelease

func (widget *Widget) SignalButtonRelease(callback func(event *GdkEventButton))

func (*Widget) SignalConfigure

func (widget *Widget) SignalConfigure(callback func())

func (*Widget) SignalDelete

func (widget *Widget) SignalDelete(callback func())

func (*Widget) SignalDraw

func (widget *Widget) SignalDraw(h *cgo.Handle)

func (*Widget) SignalKeyPress

func (widget *Widget) SignalKeyPress(callback func(event *GdkEventKey))

func (*Widget) SignalMotionNotify

func (widget *Widget) SignalMotionNotify(callback func(event *GdkEventMotion))

func (*Widget) SignalScroll

func (widget *Widget) SignalScroll(callback func(event *GdkEventScroll))

func (*Widget) SignalSizeAllocate

func (widget *Widget) SignalSizeAllocate(callback func())

func (*Widget) Widget

func (widget *Widget) Widget() *C.GtkWidget

type WindowWidget

type WindowWidget struct {
	*Widget
}

type WindowWidget contain GtkApplicationWindow widget

func (*WindowWidget) GtkWindow

func (widget *WindowWidget) GtkWindow() *C.GtkWindow

func (*WindowWidget) Size

func (widget *WindowWidget) Size(x, y, width, height int)

Jump to

Keyboard shortcuts

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