Documentation
¶
Index ¶
- Variables
- func DataDir() (string, error)
- func Events(yield func(event.Event) bool)
- func Main()
- func NewContext(ops *op.Ops, e FrameEvent) layout.Context
- type Config
- type ConfigEvent
- type DestroyEvent
- type DragFilesEvent
- type DropFilesEvent
- type FrameEvent
- type Insets
- type Option
- type Orientation
- type URLEvent
- type ViewEvent
- type WaylandViewEvent
- type Window
- type WindowMode
- type X11ViewEvent
Constants ¶
This section is empty.
Variables ¶
var ID = ""
Functions ¶
func NewContext ¶
func NewContext(ops *op.Ops, e FrameEvent) layout.Context
Types ¶
type ConfigEvent ¶
type ConfigEvent struct {
Config Config
}
func (ConfigEvent) ImplementsEvent ¶
func (ConfigEvent) ImplementsEvent()
type DestroyEvent ¶
type DestroyEvent struct {
Err error
}
func (DestroyEvent) ImplementsEvent ¶
func (DestroyEvent) ImplementsEvent()
type DragFilesEvent ¶ added in v1.2.16
DragFilesEvent is delivered while the user drags files over the window, before any drop. Active is true on drag-enter / drag-over (Position is the current cursor point in window-client coordinates) and false on drag-leave (Position is meaningless). It lets the application highlight the drop zone the cursor is currently over, like a modern editor. Emitted only on Windows.
func (DragFilesEvent) DraggedFiles ¶ added in v1.2.16
func (e DragFilesEvent) DraggedFiles() (x, y float32, active bool)
DraggedFiles exposes the drag state structurally (cursor point in client coordinates plus whether the drag is currently over the window) so apps can consume it via an interface assertion without importing this package.
func (DragFilesEvent) ImplementsEvent ¶ added in v1.2.16
func (DragFilesEvent) ImplementsEvent()
type DropFilesEvent ¶ added in v1.2.15
DropFilesEvent is delivered when the user drops one or more files from the OS file manager onto the window. It is currently emitted only on Windows (see the OLE IDropTarget handling in dnd_windows.go). Position carries the drop point in window-client coordinates (the same space as pointer events), so the application can route the drop to whatever zone it landed on.
func (DropFilesEvent) DroppedPaths ¶ added in v1.2.15
func (e DropFilesEvent) DroppedPaths() []string
DroppedPaths returns the dropped file paths. Exposing it as a method lets applications consume the event via an interface assertion, without a compile-time dependency on this concrete type.
func (DropFilesEvent) DroppedPosition ¶ added in v1.2.16
func (e DropFilesEvent) DroppedPosition() (x, y float32)
DroppedPosition returns the drop point in window-client coordinates. Like DroppedPaths, it is exposed as a method so applications can consume it structurally (via an interface assertion) without importing this package.
func (DropFilesEvent) ImplementsEvent ¶ added in v1.2.15
func (DropFilesEvent) ImplementsEvent()
type FrameEvent ¶
type FrameEvent struct {
Now time.Time
Metric unit.Metric
Size image.Point
Insets Insets
Frame func(frame *op.Ops)
Source input.Source
}
func (FrameEvent) ImplementsEvent ¶
func (FrameEvent) ImplementsEvent()
type Orientation ¶
type Orientation uint8
const ( AnyOrientation Orientation = iota LandscapeOrientation PortraitOrientation )
func (Orientation) Option ¶
func (o Orientation) Option() Option
func (Orientation) String ¶
func (o Orientation) String() string
type URLEvent ¶
func (URLEvent) ImplementsEvent ¶
func (URLEvent) ImplementsEvent()
type ViewEvent ¶
type ViewEvent interface {
ImplementsEvent()
Valid() bool
// contains filtered or unexported methods
}
type WaylandViewEvent ¶
func (WaylandViewEvent) ImplementsEvent ¶
func (WaylandViewEvent) ImplementsEvent()
func (WaylandViewEvent) Valid ¶
func (w WaylandViewEvent) Valid() bool
type Window ¶
type Window struct {
// contains filtered or unexported fields
}
func (*Window) Invalidate ¶
func (w *Window) Invalidate()
type WindowMode ¶
type WindowMode uint8
const ( Windowed WindowMode = iota Fullscreen Minimized Maximized )
func (WindowMode) Option ¶
func (m WindowMode) Option() Option
func (WindowMode) String ¶
func (m WindowMode) String() string
type X11ViewEvent ¶
func (X11ViewEvent) ImplementsEvent ¶
func (X11ViewEvent) ImplementsEvent()
func (X11ViewEvent) Valid ¶
func (x X11ViewEvent) Valid() bool
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
internal
|
|
|
windows
Win32 syscall .Call() returns non-nil errno on success; struct fields mirror Win32 ABI; (*T)(unsafe.Pointer(lParam)) is the standard window-message pattern.
|
Win32 syscall .Call() returns non-nil errno on success; struct fields mirror Win32 ABI; (*T)(unsafe.Pointer(lParam)) is the standard window-message pattern. |