Documentation
¶
Index ¶
- func GdkButton(event *GdkEventButton) (int, int, int, int)
- func GdkConfigure(allocation *GtkAllocation, top *TopWindow) (int, int, int, int)
- func GdkKey(event *GdkEventKey) (rune, bool, bool, bool, bool, string)
- func GdkMotion(event *GdkEventMotion) (int, int, bool, bool, bool, bool)
- func GdkScroll(event *GdkEventScroll) (int, int, int)
- func NotifyWeakRef(object *C.GObject, callback func(data uintptr), data uintptr)
- func RequestClipboardText(callback func(text string))
- func SetClipboardText(text string)
- func SignalDrawCallback(callback func(cr *Cairo, h *cgo.Handle))
- func SignalMenuItemActivateCallback(callback func(h *cgo.Handle))
- type Application
- func (app *Application) GActionMap() *C.GActionMap
- func (app *Application) GApplication() *C.GApplication
- func (app *Application) GObject() *C.GObject
- func (app *Application) GPointer() C.gpointer
- func (app *Application) GtkApplication() *C.GtkApplication
- func (app *Application) NewMenu() *Menu
- func (app *Application) NewMenuAction(action string) *MenuAction
- func (app *Application) NewTopWindow() *TopWindow
- func (app *Application) Quit()
- func (app *Application) Run()
- func (app *Application) SetName(name string)
- func (app *Application) SignalActivate(callback func())
- func (app *Application) SignalShutdown(callback func())
- func (app *Application) SignalStartup(callback func())
- type Cairo
- type CairoBitmap
- type CairoFillPaint
- type CairoImagePaint
- type CairoLinePaint
- type CairoTextPaint
- type Drawing
- func (drawing *Drawing) Destroy()
- func (drawing *Drawing) Move(x, y int)
- func (drawing *Drawing) QueueDraw()
- func (drawing *Drawing) Raise()
- func (drawing *Drawing) Show()
- func (drawing *Drawing) SignalDraw(h *cgo.Handle)
- func (drawing *Drawing) Size(width, height int)
- func (drawing *Drawing) Widget() *Widget
- type Fixed
- type FontSelection
- type GdkEventButton
- type GdkEventKey
- type GdkEventMotion
- type GdkEventScroll
- type GtkAllocation
- type Layout
- func (layout *Layout) Destroy()
- func (layout *Layout) Move(x, y int)
- func (layout *Layout) NewDrawingArea() *Drawing
- func (layout *Layout) NewFixed() *Fixed
- func (layout *Layout) Raise()
- func (layout *Layout) Show()
- func (layout *Layout) SignalSizeAllocate(callback func(allocation *GtkAllocation))
- func (layout *Layout) Size(width, height int)
- func (layout *Layout) Widget() *Widget
- type Menu
- type MenuAction
- type MenuItem
- type MenuNode
- type TopWindow
- type WatchIO
- type Widget
- func (widget *Widget) GObject() *C.GObject
- func (widget *Widget) GtkWidget() *C.GtkWidget
- func (widget *Widget) SignalButtonPress(callback func(event *GdkEventButton))
- func (widget *Widget) SignalButtonRelease(callback func(event *GdkEventButton))
- func (widget *Widget) SignalDelete(callback func())
- func (widget *Widget) SignalKeyPress(callback func(event *GdkEventKey))
- func (widget *Widget) SignalMotionNotify(callback func(event *GdkEventMotion))
- func (widget *Widget) SignalScroll(callback func(event *GdkEventScroll))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GdkButton ¶
func GdkButton(event *GdkEventButton) (int, int, int, int)
GdkButton returns mouse button type, button id, x, y of mouse event
func GdkConfigure ¶
GdkConfigure returns application width, height and inner rectange width, height
func GdkScroll ¶
func GdkScroll(event *GdkEventScroll) (int, int, int)
GdkScroll returns scroll direction, deltaX, deltaY of scroll event
func NotifyWeakRef ¶
NotifyWeakRef connects a callback for weak notify
func RequestClipboardText ¶
func RequestClipboardText(callback func(text string))
RequestClipboardText connects a callback for clipboard receiving
func SignalDrawCallback ¶
SignalDrawCallback connects a callback for "draw" event
func SignalMenuItemActivateCallback ¶
SignalMenuItemActivateCallback connects a callback for "activate" event
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is a GtkApplication wrapper
func (*Application) GActionMap ¶
func (app *Application) GActionMap() *C.GActionMap
GActionMap returns C.GActionMap type pointer
func (*Application) GApplication ¶
func (app *Application) GApplication() *C.GApplication
GApplication returns C.GApplication type pointer
func (*Application) GObject ¶
func (app *Application) GObject() *C.GObject
GObject returns C.GObject pointer
func (*Application) GPointer ¶
func (app *Application) GPointer() C.gpointer
GPointer returns C.gpointer address
func (*Application) GtkApplication ¶
func (app *Application) GtkApplication() *C.GtkApplication
GtkApplication returns C.GtkApplication pointer
func (*Application) NewMenu ¶
func (app *Application) NewMenu() *Menu
NewMenu creates application menu
func (*Application) NewMenuAction ¶
func (app *Application) NewMenuAction(action string) *MenuAction
NewMenuAction creates a new menu action
func (*Application) NewTopWindow ¶ added in v0.4.6
func (app *Application) NewTopWindow() *TopWindow
NewTopWindow creates a WindowWidget
func (*Application) SetName ¶
func (app *Application) SetName(name string)
SetName sets application name
func (*Application) SignalActivate ¶
func (app *Application) SignalActivate(callback func())
SignalActivate connects a callback for "activate" event
func (*Application) SignalShutdown ¶
func (app *Application) SignalShutdown(callback func())
SignalShutdown connects a callback for "shutdown" event
func (*Application) SignalStartup ¶ added in v0.4.6
func (app *Application) SignalStartup(callback func())
SignalStartup connects a callback for "startup" event
type CairoBitmap ¶
type CairoBitmap struct {
// contains filtered or unexported fields
}
CairoBitmap is a cairo_surface_t wrapper
func NewCairoBitmap ¶
func NewCairoBitmap(data []byte, width, height int) *CairoBitmap
NewCairoBitmap returns a CairoBitmap from a image bitmap
type CairoFillPaint ¶
type CairoFillPaint struct {
// contains filtered or unexported fields
}
CairoFillPaint is a fill element parameters
func NewCairoFillPaint ¶
func NewCairoFillPaint(x, y, width, height int, r, g, b, a uint16) *CairoFillPaint
NewCairoFillPaint returns a fill element parameters
func (*CairoFillPaint) Paint ¶
func (e *CairoFillPaint) Paint(c *Cairo)
Paint paints current element
type CairoImagePaint ¶
type CairoImagePaint struct {
// contains filtered or unexported fields
}
CairoImagePaint is a image element parameters
func NewCairoImagePaint ¶
func NewCairoImagePaint(x, y, width, height int, image *CairoBitmap) *CairoImagePaint
NewCairoImagePaint returns a image element parameters
func (*CairoImagePaint) Paint ¶
func (e *CairoImagePaint) Paint(c *Cairo)
Paint paints current element
type CairoLinePaint ¶
type CairoLinePaint struct {
// contains filtered or unexported fields
}
CairoLinePaint is a line element parameters
func NewCairoLinePaint ¶
func NewCairoLinePaint(x0, y0, x1, y1 int, r, g, b, a uint16) *CairoLinePaint
NewCairoLinePaint returns a line element parameters
func (*CairoLinePaint) Paint ¶
func (e *CairoLinePaint) Paint(c *Cairo)
Paint paints current element
type CairoTextPaint ¶
type CairoTextPaint struct {
// contains filtered or unexported fields
}
CairoTextPaint is a text element parameters
func NewCairoTextPaint ¶
func NewCairoTextPaint(x, y int, r, g, b, a uint16, font *FontSelection, text string) *CairoTextPaint
NewCairoTextPaint returns a text element parameters
func (*CairoTextPaint) Destroy ¶
func (e *CairoTextPaint) Destroy()
Destroy destroys current element
func (*CairoTextPaint) Paint ¶
func (e *CairoTextPaint) Paint(c *Cairo)
Paint paints current element
type Drawing ¶ added in v0.4.6
type Drawing struct {
// contains filtered or unexported fields
}
Drawing contains DrawingArea widget
func (*Drawing) QueueDraw ¶ added in v0.4.6
func (drawing *Drawing) QueueDraw()
QueueDraw marks a widget to redrawing
func (*Drawing) SignalDraw ¶ added in v0.4.6
SignalDraw connects a callback parameters for "draw" event
type Fixed ¶ added in v0.4.6
type Fixed struct {
// contains filtered or unexported fields
}
type Fixed contains GtkFixed widget
func (*Fixed) NewDrawingArea ¶ added in v0.4.6
NewDrawingArea creates a DrawingWidget child
type FontSelection ¶
type FontSelection struct {
// contains filtered or unexported fields
}
FontSelection is a PangoFontDescription wrapper
func NewFontSelection ¶
func NewFontSelection(height int, family string, style int, variant int, weight int, stretch int) *FontSelection
NewFontSelection creates FontSelection
func (*FontSelection) Metrics ¶
Metrics returns font selection lineheight, baseline, ascent, descent
type GdkEventButton ¶
type GdkEventButton C.GdkEventButton
GdkEventButton is a GdkEventButton wrapper
type GdkEventMotion ¶
type GdkEventMotion C.GdkEventMotion
GdkEventMotion is a GdkEventMotion wrapper
type GdkEventScroll ¶
type GdkEventScroll C.GdkEventScroll
GdkEventScroll is a GdkEventScroll wrapper
type GtkAllocation ¶ added in v0.4.6
type GtkAllocation C.GtkAllocation
GtkAllocation ia a GtkAllocation wrapper
type Layout ¶ added in v0.4.6
type Layout struct {
// contains filtered or unexported fields
}
Layout contains GtkLayout widget
func (*Layout) NewDrawingArea ¶ added in v0.4.6
NewDrawingArea creates a DrawingWidget child
func (*Layout) SignalSizeAllocate ¶ added in v0.4.6
func (layout *Layout) SignalSizeAllocate(callback func(allocation *GtkAllocation))
SignalSizeAllocate connects a callback for "size-allocate" event
type MenuAction ¶
type MenuAction struct {
// contains filtered or unexported fields
}
MenuAction is a GSimpleAction wrapper
func (*MenuAction) GObject ¶
func (action *MenuAction) GObject() *C.GObject
GObject returns C.GObject pointer
func (*MenuAction) SignalMenuItemActivate ¶
func (action *MenuAction) SignalMenuItemActivate(h *cgo.Handle)
SignalMenuItemActivate connects a callback parameters for "activate" event
type MenuItem ¶
type MenuItem struct {
// contains filtered or unexported fields
}
MenuItem is a GMenuItem wrapper
type MenuNode ¶
type MenuNode struct { *Menu // contains filtered or unexported fields }
MenuNode represents menu node
type TopWindow ¶ added in v0.4.6
type TopWindow struct {
// contains filtered or unexported fields
}
type TopWindow contains GtkWindow widget
func (*TopWindow) Destroy ¶ added in v0.4.6
func (window *TopWindow) Destroy()
Destroy destroys widget
func (*TopWindow) ShowAll ¶ added in v0.4.6
func (window *TopWindow) ShowAll()
ShowAll shows a window with all child widgets
type WatchIO ¶
type WatchIO struct {
// contains filtered or unexported fields
}
WatchIO is a channel watch IDs
func NewRequestIO ¶
NewRequestIO returns a watchers for full duplex pipe
func NewStreamIO ¶
NewStreamIO returns a watchers for async pipe
type Widget ¶
type Widget struct {
// contains filtered or unexported fields
}
Widget is a GtkWidget wrapper
func (*Widget) SignalButtonPress ¶
func (widget *Widget) SignalButtonPress(callback func(event *GdkEventButton))
SignalButtonPress connects a callback for "button_press_event" event
func (*Widget) SignalButtonRelease ¶
func (widget *Widget) SignalButtonRelease(callback func(event *GdkEventButton))
SignalButtonRelease connects a callback for "button_release_event" event
func (*Widget) SignalDelete ¶
func (widget *Widget) SignalDelete(callback func())
SignalDelete connects a callback for "delete-event" event
func (*Widget) SignalKeyPress ¶
func (widget *Widget) SignalKeyPress(callback func(event *GdkEventKey))
SignalKeyPress connects a callback for "key_press_event" event
func (*Widget) SignalMotionNotify ¶
func (widget *Widget) SignalMotionNotify(callback func(event *GdkEventMotion))
SignalMotionNotify connects a callback for "motion_notify_event" event
func (*Widget) SignalScroll ¶
func (widget *Widget) SignalScroll(callback func(event *GdkEventScroll))
SignalScroll connects a callback for "scroll-event" event