Documentation
¶
Overview ¶
Package shotthumb is the floating thumbnail a screenshot leaves in a screen corner: it counts down to its own dismissal, pausing while the pointer is over it; a click opens the markup editor, a drag carries the file and its PNG into another app, its delete button discards the capture, and a sideways swipe or Escape dismisses it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DragContent ¶
func DragContent(s Shot) *widget.DragContent
DragContent is what dragging the shot offers: its file as a uri list, then its PNG, streamed from the saved file.
Types ¶
type Deps ¶
type Deps struct {
// Open maps the layer surface.
Open func(app.LayerConfig) (Window, error)
// KeySym reads a key code through the seat's keymap.
KeySym keys.Translator
// Invoke runs fn on the loop goroutine.
Invoke func(fn func())
Clock clock.Clock
// Edit opens the markup editor on the shot.
Edit func(Shot)
// Delete discards the shot: its file and its clipboard entry.
Delete func(Shot)
// Done runs once the thumbnail no longer shows the shot.
Done func(Shot)
}
Deps are the thumbnail's collaborators.
type Shot ¶
type Shot struct {
Path string
Image render.StillImage
}
Shot is a saved capture: where it is and its pixels.
type Thumbnail ¶
type Thumbnail struct {
// contains filtered or unexported fields
}
Thumbnail shows one shot at a time; its methods run on the loop goroutine.
func (*Thumbnail) Dismiss ¶
func (t *Thumbnail) Dismiss()
Dismiss takes the thumbnail down, leaving the file as it is.