~eliasnaur/gio

cmd,example: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
cmd/gogio: [wasm] pass location.hash (if set) to os.Args

Allow for specifying command line arguments to webassembly programs
through the URI hash (https://example.com/wasm/index.html#args)

Signed-off-by: Elias Naur <mail@eliasnaur.com>
example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/window: [X11] handle zero-length clipboard writes correctly

Fixes gio#118

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app/internal/window: [Android] don't block in runOnMain

Signed-off-by: Elias Naur <mail@eliasnaur.com>
op/clip: add Rect.Add shorthand

Signed-off-by: Elias Naur <mail@eliasnaur.com>
widget/material: correctly apply alpha to ProgressBar color

color.RGBA values are pre-multiplied, so transparency must be applied
to all components.

Fixes gio#117

Signed-off-by: Elias Naur <mail@eliasnaur.com>
layout: expand Constraints documentation

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: use new rectangle and point convenience functions

Signed-off-by: Elias Naur <mail@eliasnaur.com>
layout,f32: add convenience functions for rectangles and points

layout.FRect, layout.FPt for converting from integer to floating point,
useful for drawing operations.

f32.Pt is a shorthand that mirrors image.Pt.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
layout: add Exact for constructing rigid Constraints matching a size

Signed-off-by: Elias Naur <mail@eliasnaur.com>
layout: expand Stack documentation

Signed-off-by: Elias Naur <mail@eliasnaur.com>
layout,widget: transpose Constraints to use image.Points for limits

Instead of

    type Contraints struct {
	    Width, Height Constraint
    }

use

    type Constraints struct {
	    Min, Max image.Point
    }

which leads to simpler use. For example, the Min method is trivally replaced by
the field, and the RigidConstraints constructor is no longer a net win.

API Change. Rewrites:

    gofmt -r 'gtx.Constraints.Min() -> gtx.Constraints.Min'
    gofmt -r 'gtx.Constraints.Width.Min -> gtx.Constraints.Min.X'
    gofmt -r 'gtx.Constraints.Height.Min -> gtx.Constraints.Min.Y'
    gofmt -r 'gtx.Constraints.Height.Max -> gtx.Constraints.Max.Y'
    gofmt -r 'gtx.Constraints.Width.Max -> gtx.Constraints.Max.X'

Signed-off-by: Elias Naur <mail@eliasnaur.com>
io/system: improve FrameEvent documentation

Phrase stolen from Egon's architecture document.

Replace tabs with spaces in the example while here.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
f32: add package Rect shorthand function

Signed-off-by: Wagner Riffel <wgrriffel@gmail.com>
example,cmd: bump gio version

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: rename io/event.Key to Tag

Key had an unfortunate association with keyboard input.

This is an API change. The following rewrites were run to fixup
Gio code:

        $ gofmt -r 'pointer.InputOp{Key:a} -> pointer.InputOp{Tag:a}' -w .
        $ gofmt -r 'pointer.InputOp{Key:a, Grab:b} -> pointer.InputOp{Tag:a, Grab:b}' -w .
        $ gofmt -r 'key.InputOp{Key:a} -> key.InputOp{Tag:a}' -w .
        $ gofmt -r 'key.InputOp{Key:a, Focus:b} -> key.InputOp{Tag:a, Focus:b}' -w .
        $ gofmt -r 'event.Key -> event.Tag' -w .

Signed-off-by: Elias Naur <mail@eliasnaur.com>
example/kitchen: add clipboard example

Updates gio#31

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app,io/system: implement clipboard reading and writing

The app.ReadClipboard and app.WriteClipboard can be used to interact
with the system clipboard. The clipboard may be asynchronous, so
system.ClipboardEvent is introduced to deliver the result of a read.

Updates gio#31

Signed-off-by: Elias Naur <mail@eliasnaur.com>
Next