Documentation ¶
Index ¶
- Variables
- func Register(d driver.Driver)
- type Application
- func (app *Application) Chan() <-chan event.Eventer
- func (app *Application) ClipboardGet(typeID int)
- func (app *Application) ClipboardPut(c clipboard.Clipboarder)
- func (app *Application) Close()
- func (app *Application) NewFont(height int, attributes map[string]string) *Font
- func (app *Application) NewFrame(rect image.Rectangle) *Frame
- func (app *Application) NewImage(img image.Image) *Image
- func (app *Application) NewMenu(label string) *Menu
- func (app *Application) NewWindow(rect image.Rectangle, background color.Color) *Window
- func (app *Application) Size(rect image.Rectangle)
- func (app *Application) Sync()
- func (app *Application) Title(title string)
- type Font
- type Frame
- type Image
- type Menu
- type Window
- func (w *Window) Clear()
- func (w *Window) Drop()
- func (w *Window) Fill(rect image.Rectangle, foreground color.Color)
- func (w *Window) Image(rect image.Rectangle, img *Image)
- func (w *Window) Line(from image.Point, to image.Point, foreground color.Color)
- func (w *Window) Raise()
- func (w *Window) Show()
- func (w *Window) Size(rect image.Rectangle)
- func (w *Window) Text(text string, font *Font, from image.Point, foreground color.Color)
Constants ¶
This section is empty.
Variables ¶
var NewApplication = func(rect image.Rectangle, title string) *Application { log.Fatalf("GUI driver must be registered. Add GTK driver to use by default:\nimport _ \"github.com/codeation/impress/duo\"") return nil }
NewApplication creates main application window for default GUI driver. Consider using MakeApplication func instead
var NewFont func(height int, attributes map[string]string) *Font
NewFont return a font selection struct for default GUI driver.
Deprecated: Use *Application.NewFont func instead.
var NewImage func(img image.Image) *Image
NewImage returns a image resources struct for default GUI driver.
Deprecated: Use *Application.NewImage func instead.
Functions ¶
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application represents application top level window
func MakeApplication ¶ added in v0.5.0
MakeApplication creates a top application window for specified GUI driver
func (*Application) Chan ¶ added in v0.1.10
func (app *Application) Chan() <-chan event.Eventer
Chan returns event channel
func (*Application) ClipboardGet ¶ added in v0.4.0
func (app *Application) ClipboardGet(typeID int)
ClipboardGet requests event with clipboard content
func (*Application) ClipboardPut ¶ added in v0.4.0
func (app *Application) ClipboardPut(c clipboard.Clipboarder)
ClipboardPut set content to OS clipboard
func (*Application) NewFont ¶ added in v0.5.0
func (app *Application) NewFont(height int, attributes map[string]string) *Font
NewFont return a font selection struct. Note than "family" and other attributes are driver specific. Open duo/font.go for details.
func (*Application) NewFrame ¶ added in v0.2.4
func (app *Application) NewFrame(rect image.Rectangle) *Frame
NewFrame create new inner frame with a specified size
func (*Application) NewImage ¶ added in v0.5.0
func (app *Application) NewImage(img image.Image) *Image
NewImage returns a image resources struct
func (*Application) NewMenu ¶ added in v0.1.7
func (app *Application) NewMenu(label string) *Menu
NewMenu returns a new top-level menu node
func (*Application) NewWindow ¶
NewWindow creates new inner window with a specified size and background color
func (*Application) Size ¶
func (app *Application) Size(rect image.Rectangle)
Size sets application window size
func (*Application) Sync ¶ added in v0.2.3
func (app *Application) Sync()
Sync flushes graphics content to screen driver
func (*Application) Title ¶
func (app *Application) Title(title string)
Title sets application window title
type Font ¶
type Font struct { Height int LineHeight int Baseline int Ascent int Descent int Attributes map[string]string // contains filtered or unexported fields }
Font represents a font selection
type Frame ¶ added in v0.2.4
type Frame struct {
// contains filtered or unexported fields
}
func (*Frame) Drop ¶ added in v0.2.4
func (f *Frame) Drop()
Drop deletes frame. Note that a dropped frame can no longer be used
func (*Frame) NewWindow ¶ added in v0.2.4
NewWindow creates new frame window with a specified size and background color
type Menu ¶ added in v0.1.7
type Menu struct {
// contains filtered or unexported fields
}
Menu represents any menu node
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
Window represents inner window
func (*Window) Drop ¶
func (w *Window) Drop()
Drop deletes window. Note that a dropped window can no longer be used
func (*Window) Image ¶
Image draws a image into specified rectangle. Specify a different rectangle size to scale the image
func (*Window) Raise ¶ added in v0.1.7
func (w *Window) Raise()
Raise brings the window to the forefront
func (*Window) Show ¶
func (w *Window) Show()
Show sends the contents of the window to the screen. Note that a drawings are not visible until Show
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package to register WebAssembly driver as default impress driver
|
Package to register WebAssembly driver as default impress driver |
canvasdriver
Package to connect to WebAssembly driver
|
Package to connect to WebAssembly driver |
Package to register GTK driver as default impress driver
|
Package to register GTK driver as default impress driver |
duodriver
Package to connect to GTK driver
|
Package to connect to GTK driver |
examples
|
|
joint
|
|
bus
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
domain
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
drawrecv
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
drawsend
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
drawwait
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
eventchan
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
eventrecv
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
eventsend
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
iface
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
lazy
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
rpc
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |
serversocket
Package implements an internal mechanism to communicate with an impress terminal.
|
Package implements an internal mechanism to communicate with an impress terminal. |