Versions in this module Expand all Collapse all v0 v0.5.0 Apr 26, 2024 v0.4.0 Jul 4, 2023 Changes in this version + type Options struct + ContextMenuDisabled bool + EnabledEvents []Event + Height int + MouseCursorHidden bool + PageBackground color.Color + ReconnectInterval time.Duration + ScaleToPageHeight bool + ScaleToPageWidth bool + Title string + Width int v0.3.0 Apr 4, 2021 Changes in this version type Option + func ScaleFullPage(fullWidth, fullHeight bool) Option v0.2.0 Apr 3, 2021 Changes in this version type KeyboardEvent + Mod ModifierKeys + type ModifierKeys byte + func (m ModifierKeys) AltKey() bool + func (m ModifierKeys) CtrlKey() bool + func (m ModifierKeys) MetaKey() bool + func (m ModifierKeys) ShiftKey() bool type MouseEvent + Mod ModifierKeys type TouchEvent + Mod ModifierKeys v0.1.0 Mar 13, 2021 Changes in this version + func ListenAndServe(addr string, run func(*Context), options ...Option) error + func ListenAndServeTLS(addr, certFile, keyFile string, run func(*Context), options ...Option) error + func NewServeMux(run func(*Context), options ...Option) *http.ServeMux + type AuxClickEvent struct + func (m AuxClickEvent) AltKey() bool + func (m AuxClickEvent) CtrlKey() bool + func (m AuxClickEvent) MetaKey() bool + func (m AuxClickEvent) ShiftKey() bool + type ClickEvent struct + func (m ClickEvent) AltKey() bool + func (m ClickEvent) CtrlKey() bool + func (m ClickEvent) MetaKey() bool + func (m ClickEvent) ShiftKey() bool + type CloseEvent struct + type CompositeOperation byte + const OpColor + const OpColorBurn + const OpColorDodge + const OpCopy + const OpDarken + const OpDestinationAtop + const OpDestinationIn + const OpDestinationOut + const OpDestinationOver + const OpDifference + const OpExclusion + const OpHardLight + const OpHue + const OpLighten + const OpLighter + const OpLuminosity + const OpMultiply + const OpOverlay + const OpSaturation + const OpScreen + const OpSoftLight + const OpSourceAtop + const OpSourceIn + const OpSourceOut + const OpSourceOver + const OpXOR + type Context struct + func (ctx *Context) Arc(x, y, radius, startAngle, endAngle float64, anticlockwise bool) + func (ctx *Context) ArcTo(x1, y1, x2, y2, radius float64) + func (ctx *Context) BeginPath() + func (ctx *Context) BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y float64) + func (ctx *Context) CanvasHeight() int + func (ctx *Context) CanvasWidth() int + func (ctx *Context) ClearRect(x, y, width, height float64) + func (ctx *Context) Clip() + func (ctx *Context) ClosePath() + func (ctx *Context) CreateImageData(m image.Image) *ImageData + func (ctx *Context) CreateLinearGradient(x0, y0, x1, y1 float64) *Gradient + func (ctx *Context) CreatePattern(src *ImageData, repetition PatternRepetition) *Pattern + func (ctx *Context) CreateRadialGradient(x0, y0, r0, x1, y1, r1 float64) *Gradient + func (ctx *Context) DrawImage(src *ImageData, dx, dy float64) + func (ctx *Context) DrawImageScaled(src *ImageData, dx, dy, dWidth, dHeight float64) + func (ctx *Context) DrawImageSubRectangle(src *ImageData, sx, sy, sWidth, sHeight, dx, dy, dWidth, dHeight float64) + func (ctx *Context) Ellipse(x, y, radiusX, radiusY, rotation, startAngle, endAngle float64, ...) + func (ctx *Context) Events() <-chan Event + func (ctx *Context) Fill() + func (ctx *Context) FillRect(x, y, width, height float64) + func (ctx *Context) FillText(text string, x, y float64) + func (ctx *Context) FillTextMaxWidth(text string, x, y, maxWidth float64) + func (ctx *Context) Flush() + func (ctx *Context) GetImageData(sx, sy, sw, sh float64) *ImageData + func (ctx *Context) LineTo(x, y float64) + func (ctx *Context) MoveTo(x, y float64) + func (ctx *Context) PutImageData(src *ImageData, dx, dy float64) + func (ctx *Context) PutImageDataDirty(src *ImageData, dx, dy, dirtyX, dirtyY, dirtyWidth, dirtyHeight float64) + func (ctx *Context) QuadraticCurveTo(cpx, cpy, x, y float64) + func (ctx *Context) Rect(x, y, width, height float64) + func (ctx *Context) Restore() + func (ctx *Context) Rotate(angle float64) + func (ctx *Context) Save() + func (ctx *Context) Scale(x, y float64) + func (ctx *Context) SetFillStyle(c color.Color) + func (ctx *Context) SetFillStyleGradient(g *Gradient) + func (ctx *Context) SetFillStylePattern(p *Pattern) + func (ctx *Context) SetFillStyleString(color string) + func (ctx *Context) SetFont(font string) + func (ctx *Context) SetGlobalAlpha(alpha float64) + func (ctx *Context) SetGlobalCompositeOperation(mode CompositeOperation) + func (ctx *Context) SetImageSmoothingEnabled(enabled bool) + func (ctx *Context) SetLineCap(cap LineCap) + func (ctx *Context) SetLineDash(segments []float64) + func (ctx *Context) SetLineDashOffset(offset float64) + func (ctx *Context) SetLineJoin(join LineJoin) + func (ctx *Context) SetLineWidth(width float64) + func (ctx *Context) SetMiterLimit(value float64) + func (ctx *Context) SetShadowBlur(level float64) + func (ctx *Context) SetShadowColor(c color.Color) + func (ctx *Context) SetShadowColorString(color string) + func (ctx *Context) SetShadowOffsetX(offset float64) + func (ctx *Context) SetShadowOffsetY(offset float64) + func (ctx *Context) SetStrokeStyle(c color.Color) + func (ctx *Context) SetStrokeStyleGradient(g *Gradient) + func (ctx *Context) SetStrokeStylePattern(p *Pattern) + func (ctx *Context) SetStrokeStyleString(color string) + func (ctx *Context) SetTextAlign(align TextAlign) + func (ctx *Context) SetTextBaseline(baseline TextBaseline) + func (ctx *Context) SetTransform(a, b, c, d, e, f float64) + func (ctx *Context) Stroke() + func (ctx *Context) StrokeRect(x, y, width, height float64) + func (ctx *Context) StrokeText(text string, x, y float64) + func (ctx *Context) StrokeTextMaxWidth(text string, x, y, maxWidth float64) + func (ctx *Context) Transform(a, b, c, d, e, f float64) + func (ctx *Context) Translate(x, y float64) + type DblClickEvent struct + func (m DblClickEvent) AltKey() bool + func (m DblClickEvent) CtrlKey() bool + func (m DblClickEvent) MetaKey() bool + func (m DblClickEvent) ShiftKey() bool + type DeltaMode byte + const DeltaLine + const DeltaPage + const DeltaPixel + type Event interface + type Gradient struct + func (g *Gradient) AddColorStop(offset float64, c color.Color) + func (g *Gradient) AddColorStopString(offset float64, color string) + func (g *Gradient) Release() + type ImageData struct + func (m *ImageData) Height() int + func (m *ImageData) Release() + func (m *ImageData) Width() int + type KeyDownEvent struct + func (m KeyDownEvent) AltKey() bool + func (m KeyDownEvent) CtrlKey() bool + func (m KeyDownEvent) MetaKey() bool + func (m KeyDownEvent) ShiftKey() bool + type KeyUpEvent struct + func (m KeyUpEvent) AltKey() bool + func (m KeyUpEvent) CtrlKey() bool + func (m KeyUpEvent) MetaKey() bool + func (m KeyUpEvent) ShiftKey() bool + type KeyboardEvent struct + Key string + func (m KeyboardEvent) AltKey() bool + func (m KeyboardEvent) CtrlKey() bool + func (m KeyboardEvent) MetaKey() bool + func (m KeyboardEvent) ShiftKey() bool + type LineCap byte + const CapButt + const CapRound + const CapSquare + type LineJoin byte + const JoinBevel + const JoinMiter + const JoinRound + type MouseButtons int + const Button4th + const Button5th + const ButtonAuxiliary + const ButtonNone + const ButtonPrimary + const ButtonSecondary + type MouseDownEvent struct + func (m MouseDownEvent) AltKey() bool + func (m MouseDownEvent) CtrlKey() bool + func (m MouseDownEvent) MetaKey() bool + func (m MouseDownEvent) ShiftKey() bool + type MouseEvent struct + Buttons MouseButtons + X int + Y int + func (m MouseEvent) AltKey() bool + func (m MouseEvent) CtrlKey() bool + func (m MouseEvent) MetaKey() bool + func (m MouseEvent) ShiftKey() bool + type MouseMoveEvent struct + func (m MouseMoveEvent) AltKey() bool + func (m MouseMoveEvent) CtrlKey() bool + func (m MouseMoveEvent) MetaKey() bool + func (m MouseMoveEvent) ShiftKey() bool + type MouseUpEvent struct + func (m MouseUpEvent) AltKey() bool + func (m MouseUpEvent) CtrlKey() bool + func (m MouseUpEvent) MetaKey() bool + func (m MouseUpEvent) ShiftKey() bool + type Option func(c *config) + func BackgroundColor(c color.Color) Option + func DisableContextMenu() Option + func DisableCursor() Option + func EnableEvents(events ...Event) Option + func FullPage() Option + func Reconnect(interval time.Duration) Option + func Size(width, height int) Option + func Title(text string) Option + type Pattern struct + func (p *Pattern) Release() + type PatternRepetition byte + const PatternNoRepeat + const PatternRepeat + const PatternRepeatX + const PatternRepeatY + type TextAlign byte + const AlignCenter + const AlignEnd + const AlignLeft + const AlignRight + const AlignStart + type TextBaseline byte + const BaselineAlphabetic + const BaselineBottom + const BaselineHanging + const BaselineIdeographic + const BaselineMiddle + const BaselineTop + type Touch struct + Identifier uint32 + X int + Y int + type TouchCancelEvent struct + func (m TouchCancelEvent) AltKey() bool + func (m TouchCancelEvent) CtrlKey() bool + func (m TouchCancelEvent) MetaKey() bool + func (m TouchCancelEvent) ShiftKey() bool + type TouchEndEvent struct + func (m TouchEndEvent) AltKey() bool + func (m TouchEndEvent) CtrlKey() bool + func (m TouchEndEvent) MetaKey() bool + func (m TouchEndEvent) ShiftKey() bool + type TouchEvent struct + ChangedTouches TouchList + TargetTouches TouchList + Touches TouchList + func (m TouchEvent) AltKey() bool + func (m TouchEvent) CtrlKey() bool + func (m TouchEvent) MetaKey() bool + func (m TouchEvent) ShiftKey() bool + type TouchList []Touch + type TouchMoveEvent struct + func (m TouchMoveEvent) AltKey() bool + func (m TouchMoveEvent) CtrlKey() bool + func (m TouchMoveEvent) MetaKey() bool + func (m TouchMoveEvent) ShiftKey() bool + type TouchStartEvent struct + func (m TouchStartEvent) AltKey() bool + func (m TouchStartEvent) CtrlKey() bool + func (m TouchStartEvent) MetaKey() bool + func (m TouchStartEvent) ShiftKey() bool + type WheelEvent struct + DeltaMode DeltaMode + DeltaX float64 + DeltaY float64 + DeltaZ float64 + func (m WheelEvent) AltKey() bool + func (m WheelEvent) CtrlKey() bool + func (m WheelEvent) MetaKey() bool + func (m WheelEvent) ShiftKey() bool