profile
viewpoint
Larry Clapp theclapp @Kentik Wesley Chapel, FL & Walland, TN http://theclapp.org/mt-blog/

HuckRidgeSW/hvue 49

A GopherJS & go/wasm binding for Vue.js

theclapp/gio-mirror 44

A read-only mirror of https://git.sr.ht/~eliasnaur/gio. Please do not file issues or make PRs.

theclapp/go-life 13

Conway's Game of Life in Go

theclapp/js 1

thin wrapper of JavaScript API for gopherjs

theclapp/2015-talks 0

Slides from 2015 Talks

theclapp/about 0

Sourcegraph blog, feature announcements, and website (about.sourcegraph.com)

theclapp/angular-hotkeys 0

Configuration-centric keyboard shortcuts for your Angular apps.

theclapp/angular-resizable 0

A lightweight directive for creating resizable containers.

theclapp/cef2go 0

CEF2go is an HTML 5 based GUI toolkit for the Go language.      :speech_balloon: Forum:

theclapp/gae-ng-seed 0

Google App Engine / Angular JS Seed Project

issue commentpointlander/peg

Feasible to port grammar file from peg.js? Any caveats?

So ... I just realized that the file I linked you to is the file you were already looking at. Sorry about that. But maybe with the rest of my comment, you can make sense of it.

victorhooi

comment created time in 12 days

issue commentpointlander/peg

Feasible to port grammar file from peg.js? Any caveats?

peg.peg looks like it makes heavy use of <...> and text to build the Peg tree.

In my example above, identifier is parsed ("matched"?) first, and thus p.id is assigned, and then value is parsed, and thus p.value is assigned, and then the assignment rule is matched, and so p.AddAssignment(...) runs.

(Also, since AddAssignment's two parameters are also fields of p, you could just drop them and have AddAssignment reference p.id and p.value directly.)

Does that make sense? Printf is your friend, and the generated Go state machine is also useful in figuring out what gets called where and how. For example this line in peg.peg matches up directly to this line in peg.peg.go.

HTH.

victorhooi

comment created time in 12 days

issue commentpointlander/peg

Feasible to port grammar file from peg.js? Any caveats?

Split it up into multiple rules?

(untested)

type Example Peg {
 id, value string
}

assignment = identifier "=" value { p.AddAssignment(p.id, p.value) }
identifier = < .+ > { p.id = text }
value = < .+ > { p.value = text }
victorhooi

comment created time in 13 days

CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent
CommitCommentEvent

push eventtheclapp/gio-mirror

Larry Clapp

commit sha a54b4605954036d8724d2419b96e8161f165208d

layout: refactor List.Layout and related functions I found the interplay of List's Layout/init/next/more/end methods somewhat confusing and hard to reason about, so I refactored them. Signed-off-by: Larry Clapp <larry@theclapp.org>

view details

Elias Naur

commit sha e48b85f8d92eac4061cb650dba8e9331e5d5e544

app/internal/window,app/internal/egl: replace deprecated MESA_EGL_NO_X11_HEADERS Fixes gio#147 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha f958f9512e716e31bdb9fa2b1f4876e00339d7b7

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

view details

Elias Naur

commit sha 47efa26cfc058d87e532f18373008e7eb6c7a02a

gpu: limit atlas textures to 8k x 8k Fixes gio#131 Fixes gio#133 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 40141e29f5d2bd3bd01a0356511cb2eb8fc753b7

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

view details

Chris Waldon

commit sha ae07c5f470cbea2aed8cfbfdb2060b65b50dfeb4

widget/material: handle elliptical icon buttons This commit changes the ink-drawing code so that IconButtons that are not perfectly circular will still ink fully. Previously, an elliptical icon would only animate a circular sub-region. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Elias Naur

commit sha 39fd161bea1f0198f6dc427e6ece050280a6e314

app/internal/window: use GetDpiForWindow if available Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6ab43aba3ea5a7d76450f0636ef535cd2b906a45

all: implement staticcheck suggestions Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 25 days

push eventtheclapp/gio-mirror

Elias Naur

commit sha 773939fe1dd10b3ac5f937a7f9993045a91e23a7

widget/material: avoid excessive trigonometry in Loader.Layout Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in a month

push eventtheclapp/gio-mirror

Elias Naur

commit sha 851255f7a67b14d5dc0199375241270346e70b53

widget: tolerate nil shader in Editor movement methods Fixes gio#142 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 958b19ae220efa03a52a5520da4cb0b8a6038fa6

app/internal/window: [macOS] ignore result from CVDisplayLinkStart Larry Clapp reported a panic from failing to start the display link. Ignore the error and hope the error is transient. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6ef1ff7cfbfb68fe48d0b35fa4079bc27d47f489

widget/material: remove Inset from ButtonLayoutStyle ButtonLayout is for custom button content; insets belong to the custom content, not the button. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 223f8fd40ae44216f4941e1f4b7fa7131518fc71

example/kitchen: bump gio version Add explicit inset to ButtonLayout. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha dff037a84ea7c2d3ab3199e7e4283ccd09def493

internal/rendertest: release GPU resources after test completion Updates gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8bd0e85f2ee689630670e5ac94ce0b79e17266f9

internal/rendertest: dump bad images immediately Updates gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1513348bf69e9cec0bcf912e91ecfc12ca77bc44

app/internal/egl: don't call eglTerminate A single EGL display may be shared among several contexts. Don't eglTerminate a context display when destroying the context. Updates gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d53c92791f34892c82751e48fc71566af2a777d5

app/headless: don't release context while it's current Updates gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 30ad63283b96c1f066e1c859d27a989daa07a6ab

app/headless,internal/rendertest: report errors from headless renders Updates gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e2278b64c112545803b9471a0416268aef2b4c52

app/headless: avoid race between ReleaseCurrent and MakeCurrent Release context on MakeCurrent failure paths as well. Fixes gio#144 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 7bbe0da0c75fdb26954540a0827dfce7017c0cab

text,font/opentype: make text layout and shaping safe for concurrent use Implementations of text.Face are reused across multiple windows for efficiency. Make the opentype implementation safe for concurrent use and document it. Updates gio#104 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

tainted-bit

commit sha a6afa86d853e3dfe7da320e87dea823d271b790c

font/opentype: support using Collection as a Face This change allows font collection files (extensions .ttc or .otc) to be used as a text.Face. These files contain an ordered list of SFNT fonts, each supporting a maximum of 2^16 glyphs. When used as a text.Face, each rune in the string to layout or render will be assigned to the first font with a glyph for that rune, or to the replacement character from the first font in the file otherwise. With this change, it is possible to support multiple unicode planes in a single text.Face by using a Collection with more than one internal SFNT file. For example, it is now possible to display characters from the basic multilingual plane and emoji in a single widget.Label by loading an appropriate OTC file. Fixes gio#104 Signed-off-by: tainted-bit <sourcehut@taintedbit.com>

view details

tainted-bit

commit sha 6c8dcbdb4b5a9f4331f79b260a872aab2748b9af

font/opentype: add tests for Collection as a Face Added tests to make sure that opentype.Collection can be used as a text.Face, and that it correctly implements fallback behavior for glyph lookups. Signed-off-by: tainted-bit <sourcehut@taintedbit.com>

view details

Elias Naur

commit sha 96da6945a7e929f6941a64c559971ab5123fd656

app/internal/window: [Wayland] initialize touchFoci map Fixes gio#145 (I hope) Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 659849bb82028a76e7dd34fda5d002a53c4f77c1

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

view details

Elias Naur

commit sha a97fa3f1ac8f079a6ad64e4eb1b15ea6f633075a

example: don't os.Exit unconditionally, hiding panics Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 692d6ab2219fa2e52061290f7ae5bffd18b6be26

widget/material: add Loader for indeterminate progress widget Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha de66aae15279e2cd8ba25e63c6125cf4d512198d

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

view details

Elias Naur

commit sha 29f820caaac97eb0d5db5df8310d9ff8808e6152

widhet/material: change minimum Loader size to be a default Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4818538ef8f18371ef2b2e4d7407f41b81bcb761

op/clip: unexport Rect.Op It wasn't used anywhere outside Rect.Add. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in a month

issue commentpointlander/peg

more doc?

Is there a - operator as with leg?

Not sure exactly what this means. Checking the manual for peg/leg, I see - used in two contexts: one is as the dash in a range

range =         char '-' char | char

which this package supports (see here), and one is as a regular part of the grammar

- =             ( space | comment )*

which just defines - as zero-or-more spaces-or-comments.

So I think the answer is: yes, Peg supports the - operator as with leg. Except of course that if you want - to mean (space / comment)* (using Peg syntax), you'll have to define it that way.

kpixley

comment created time in a month

issue commentpointlander/peg

more doc?

I am not the author, but I can help with a few of these.

Notably, buffer[begin:end] doesn't work

Use text in your Go code to refer to the text captured between < and >. See peg.peg for examples.

Is the parser guaranteed to be "p"?

Yes. In the template in tree/peg.go, p is hardcoded as the method receiver in all functions.

I don't know about the rest, sorry.

kpixley

comment created time in a month

push eventtheclapp/gio-mirror

Viktor Ogeman

commit sha 7ff17453dd5fa7d865aadb7e548a4bef0b1c7aeb

gpu: fix negative intersections Fixes a bug due to that f32.Rect.Intersect will not return the empty rectangle for non intersecting rectangles - but instead a swapped rectangle. By removing the .Canon() call in gpu.go we ensure that non overlapping clipping rects and paint rects will lead to no painting. The Canon() call is not needed since boundsForTransformedRect() was previously updated to always return a canonical rectangle. Test case added. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Elias Naur

commit sha db03b0898d51659b073523007c63733fce22321a

app/internal/window: run main on main thread on Android and iOS Before this change, Android and iOS were special for two reasons: app.Main would return immediately, and the program main was invoked from a goroutine. We can reduce that to one special case by either - run the program main from the main thread, - or make app.Main block. Choose to run main on the main thread. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 913a780d64618ff12fb0e1da1857ff10d40defcb

text: remove Metrics from Face interface It's not used in text shaping, so let's not require it. Note that the concrete opentype package still retains the Metrics implementation. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 79014a81d5e782a6a311e845e71addf51b82e7ca

app/internal/window: [iOS] move logic out of GioAppDelegate We'd like to remove GioAppDelegate when Gio is embedded with gogio's -buildmode=archive. Minimize the code in GioAppDelegate. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d97f7f909350620f1631e5c636f7218aeaca472f

app/internal/window,cmd/gogio: [iOS] export GioViewController The Gio GioAppDelegate created the GioViewController programmatically. When using gogio's -buildmode=archive users may want to use a different method (for example storyboards) but there can only be one app delegate. Move the GioAppDelegate to gogio's exe buildmode, and export the GioViewController for embedding use. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha acc0424dd7d7e0687360a8a0cc70af5fabeeb70c

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

view details

Elias Naur

commit sha 31e8339e1bf874e2a1f15ee9b284513065d955b4

app/internal/window: [Windows] fix min/max size Fixes gio#141 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha facf5cbb9d089ee770502572ecfa9d8929803f5f

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

view details

Sebastien Binet

commit sha 6a9a87046221602d1a323887cd619e75c81cc24e

app{,/internal/window}: make app.Main blocking on desktop platforms This CL implements the app.Main function as a blocking-forever function for JS, Wayland, Windows and X11. This works better for applications that can now programmatically close windows.

view details

Elias Naur

commit sha f5985b5e7dea0446a3d094de47fade8aa31872ef

cmd,example: bump gio version Add os.Exit to examples now that app.Main never returns. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2f8833d985df8be444b4a8968b59448c538ec3cc

app/internal/window: [X11] avoid -d=checkptr check failures Casting a *XClientMessageEvent or *XSelectionEvent to *XEvent is technically incorrect because the union XEvent is the larger structure. Use an XEvent variable as the backing storage for the specialized event types instead. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha 2e8901941e593922976869cb57b24b64a58eac93

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha ed1908105667686268350bcd29da597116fbe4e9

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha 6b593553c6f55788de033d298b3a3534e60f3ced

material: allow checkboxes without labels

view details

Larry Clapp

commit sha 005acc67ec0a72d339891e554c74583681e454b7

wip

view details

Larry Clapp

commit sha 472adc4912726e6247e0725160eac41be1d53675

wip

view details

Larry Clapp

commit sha f25f10b0e9a630bb806563a25bc12271e72f62b4

wip

view details

Larry Clapp

commit sha 1917d79cc4c281ee307ae29f751717cb90be830f

wip

view details

Larry Clapp

commit sha 40c70adec1cee9ddf2552ebcc12f0fd65101a37a

More on ScrollTo - Move most of the ScrollTo functionality out of List.init and into ScrollTo itself - General cleanup

view details

push time in 2 months

push eventtheclapp/gio-mirror

Viktor Ogeman

commit sha 7ff17453dd5fa7d865aadb7e548a4bef0b1c7aeb

gpu: fix negative intersections Fixes a bug due to that f32.Rect.Intersect will not return the empty rectangle for non intersecting rectangles - but instead a swapped rectangle. By removing the .Canon() call in gpu.go we ensure that non overlapping clipping rects and paint rects will lead to no painting. The Canon() call is not needed since boundsForTransformedRect() was previously updated to always return a canonical rectangle. Test case added. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Elias Naur

commit sha db03b0898d51659b073523007c63733fce22321a

app/internal/window: run main on main thread on Android and iOS Before this change, Android and iOS were special for two reasons: app.Main would return immediately, and the program main was invoked from a goroutine. We can reduce that to one special case by either - run the program main from the main thread, - or make app.Main block. Choose to run main on the main thread. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 913a780d64618ff12fb0e1da1857ff10d40defcb

text: remove Metrics from Face interface It's not used in text shaping, so let's not require it. Note that the concrete opentype package still retains the Metrics implementation. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 79014a81d5e782a6a311e845e71addf51b82e7ca

app/internal/window: [iOS] move logic out of GioAppDelegate We'd like to remove GioAppDelegate when Gio is embedded with gogio's -buildmode=archive. Minimize the code in GioAppDelegate. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d97f7f909350620f1631e5c636f7218aeaca472f

app/internal/window,cmd/gogio: [iOS] export GioViewController The Gio GioAppDelegate created the GioViewController programmatically. When using gogio's -buildmode=archive users may want to use a different method (for example storyboards) but there can only be one app delegate. Move the GioAppDelegate to gogio's exe buildmode, and export the GioViewController for embedding use. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha acc0424dd7d7e0687360a8a0cc70af5fabeeb70c

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

view details

Elias Naur

commit sha 31e8339e1bf874e2a1f15ee9b284513065d955b4

app/internal/window: [Windows] fix min/max size Fixes gio#141 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha facf5cbb9d089ee770502572ecfa9d8929803f5f

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

view details

Sebastien Binet

commit sha 6a9a87046221602d1a323887cd619e75c81cc24e

app{,/internal/window}: make app.Main blocking on desktop platforms This CL implements the app.Main function as a blocking-forever function for JS, Wayland, Windows and X11. This works better for applications that can now programmatically close windows.

view details

Elias Naur

commit sha f5985b5e7dea0446a3d094de47fade8aa31872ef

cmd,example: bump gio version Add os.Exit to examples now that app.Main never returns. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2f8833d985df8be444b4a8968b59448c538ec3cc

app/internal/window: [X11] avoid -d=checkptr check failures Casting a *XClientMessageEvent or *XSelectionEvent to *XEvent is technically incorrect because the union XEvent is the larger structure. Use an XEvent variable as the backing storage for the specialized event types instead. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Sebastien Binet

commit sha 59f07023d489bee32764a12c6e9af1a182c6aa70

app/internal: [X11] implement Window.Close Signed-off-by: Sebastien Binet <s@sbinet.org>

view details

Elias Naur

commit sha b664d68a7c0f446aaf5a26c83e9e1aed522cb187

internal/rendertest: tolerate lack of headless suppport Fixes the builders. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Greg Pomerantz

commit sha 3a542cc80cee6674ced961eddcae49408aa06fdd

cmd/gogio: [Android] check $ANDROID_NDK_ROOT If the Android NDK is not found in a standard location (e.g. you are on an F-Droid build server), check the $ANDROID_NDK_ROOT environment variable. Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>

view details

Elias Naur

commit sha 2f984673a2395930c1a3693f374bcab5780d3b7a

cmd/gogio: [Android] use correct android.hardware.type.pc feature Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 342c0da320bdea57ab6bf0f916941cab84b296c8

cmd/gogio: add ldflags flag for extra flags Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 5bd0ecea5e437deda7848584d92acd9af95912ff

cmd/gogio: add -tags flag for supplying extra tags to the build Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha aaec664b1d162f09c3520d45816ac90fa8f84fe2

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha ce6c7bcfdd32a5859152e998cf7fa51d5d389a95

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha 60365b0235276720a3c56ea43ddcb8b1b566ac0a

material: allow checkboxes without labels

view details

Larry Clapp

commit sha c6900af6c7c3faf6fc4eb688e27684c4e9574819

wip

view details

Larry Clapp

commit sha 4066c80d8405fd274a2acea20eec72563e83deb3

wip

view details

Larry Clapp

commit sha 567c0c57ff048a69de66bfb371ce0d6118f181f1

wip

view details

Larry Clapp

commit sha c3957acac59965f20d0e0d78e17857a57c5e1434

wip

view details

Larry Clapp

commit sha 2997d2f5abfa98654faf51c73f4dfcba5a51dbc9

More on ScrollTo - Move most of the ScrollTo functionality out of List.init and into ScrollTo itself - General cleanup

view details

push time in 2 months

push eventtheclapp/gio-mirror

Sebastien Binet

commit sha 59f07023d489bee32764a12c6e9af1a182c6aa70

app/internal: [X11] implement Window.Close Signed-off-by: Sebastien Binet <s@sbinet.org>

view details

Elias Naur

commit sha b664d68a7c0f446aaf5a26c83e9e1aed522cb187

internal/rendertest: tolerate lack of headless suppport Fixes the builders. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Greg Pomerantz

commit sha 3a542cc80cee6674ced961eddcae49408aa06fdd

cmd/gogio: [Android] check $ANDROID_NDK_ROOT If the Android NDK is not found in a standard location (e.g. you are on an F-Droid build server), check the $ANDROID_NDK_ROOT environment variable. Signed-off-by: Greg Pomerantz <gmp.gio@wow.st>

view details

Elias Naur

commit sha 2f984673a2395930c1a3693f374bcab5780d3b7a

cmd/gogio: [Android] use correct android.hardware.type.pc feature Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 342c0da320bdea57ab6bf0f916941cab84b296c8

cmd/gogio: add ldflags flag for extra flags Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 5bd0ecea5e437deda7848584d92acd9af95912ff

cmd/gogio: add -tags flag for supplying extra tags to the build Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha b9f6543cf5aff2b2e140d749f19d4e243b06eee6

gesture: always drag scroll on Android Mice drags scroll on Android by convention. Further, ChromeOS converts two-finger touchpad scroll gestures to press-drag with Source == Mouse. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e2f3bbdfc36707fbaff274aea031277ca0d5c459

cmd/gogio: [Android] disable ChromeOS input emulation Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 810be77412f473ac014848b91b22125eea44b67a

widget: remove unused parameter from Editor.moveCoord Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2f23a326b8addca92b0f0b7eebb902432bac90d8

widget: return float32 coordinates from Editor.CaretCoords Don't leak the implementation details of the caret coordinates. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e316f42964a164062f4be6f878f59a8b0af0b7ea

widget: reset Editor x offset on mouse initiated caret movement The caret x-offset tracks residual horizontal offset for arrow key movements. Caret movement by the mouse should reset the residual. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4eb66d27079788cf1198eb71569fc21d7140eb13

widget: fix caret comparison in editBuffer.move Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8f31f8da2c7c0a9d88ba86e9c8a5d04cbfd9f709

widget: move Editor caret information to sub-struct In preparation for maintaining the caret position. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ef21a7ace14e1e334a2b67486f6aaa01c3d9098e

widget: maintain Editor caret position Only call layoutCaret when the text layout changes, adjust position for caret movement. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha dcbbcbb5434333e935a475339e0802435100b7bb

widget: introduce Editor.moveLines Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ffec83a001be70c169726b56cc293a839366c51f

widget: add Editor tests Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha a21aefa8b73ce282d5de64b62e45094b0505a1de

widget: remove Editor references to text.Line.Len and text.Glyph.Rune In preparation for adding editor masking, Editor can't rely on the Rune and Len fields of the laid out text. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

tainted-bit

commit sha 5c0f190849584e9a2de315457916393e72dea388

widget: add optional password masking to Editor This change adds optional password masking to the Editor. To enable this feature, set the new Mask field to a non-zero rune. Every rune in the Editor's contents will be replaced by the mask rune in the visual display, except for newlines. The actual contents of the editor can still be accessed with Len, Text, and SetText. Fixes gio#80 Signed-off-by: tainted-bit <sourcehut@taintedbit.com>

view details

Viktor

commit sha ef70b9252eb50444ec4e16d97a7943b655443568

internal/rendertest: create new standard benchmark Create a standard, representative set of benchmarks for the rendering pipeline to allow for measurement of performance improvement/regressions due to changes. The benchmarks are intended to be representative of the types of drawing different gio uses should encounter. BenchmarkDrawUI: Draw text, instanced shaped and unique shapes in a mix that is reasonable for a simple UI. BenchmarkDrawUICached: Same as BenchmarkDrawUI but not reset between iterations to benchmark the rendering pipeline when using maximum caching. Benchmark1000Circles: Draw 1000 circles individually to benchmark the rendering performance with no caching. Represents usages such as animating shapes or drawing complex shapes. Benchmark1000CirclesInstanced: Draw 1000 circles by calling a Macro op, each one with an offset transform. Represents cases such as drawing spirits etc. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 5b277757cfd0fe69a6088534ced81aa845b115d5

op/clip, gpu: split complex curves in package gpu instead This is a first step towards supporting affine drawing transforms. The rendering algorithm relies on quadratic curves that do not cross x = 0 more than once, thus curves must be split after any rotation/shear transforms. Move this logic and the generation of vertices to package gpu. Also close all curves and draw zero-width edges as preparation for transform since the will no longer implicitly be vertical with no effect. This commit will severely affect performance since vertexes are now transformed also for cached items, using cpu resources. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha e7bc1a45533b01655d5b7d6a8aca7aeb226d1cef

f32: implement 2D affine transformations Implements 2D affine transformations. This commit is a step towards full affine transformations for drawing operations. Heavily based on the work by Péter Szilágyi in patch 9212 Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha b247395c6259163cd0ca910cd55401d0e31919c4

gpu, io/router, op: use f32.Affine2D instead of op.TransformOp for transforms Encode TransformOp as an Affince2D matrix instead and use that in gpu and io transform handling. There are no changes to user facing API and so far only the offset part of the matrix is used. This patch is a step towards full affine transformations. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 24951a7ee7f79b5ec38850148b7b18db07a48f08

gpu, op, internal/ops: add affine transformations Add support for affine transformations. The key changes are outlined below. - Painting/clipping with rectangles is handled by, for complex transforms, creating clipping paths representing the transformed rectangle and using a larger bounding box. Cover/Blit shaders updated correspondingly to correctly map texture cordinates from the new bounding boxes. - Since path splitting must happen on CPU the transforms must happen CPU side as well - offsets removed from shaders. - Complex transforms will lead to different path splitting which means that GPU arrays can no longer be cached if the transform has changed. Thus the current transform is added as a key to the cache. - Add a public API to op for setting Affine transformations. There are a number of optimizations that could be explored further but which are left out now: - Caching also of CPU operations (e.g path splitting & transforms) and not only caching the GPU arrays. - Allow for re-use of cached GPU vertices if the transformation change is a pure offset / scaling since the splitting is then the same. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha e3bb94ebb08aa70d5a0c93228c88b0eee444a0f6

internal/rendertest: create test suit for drawing operations Uses app/headless to create a set of test cases for drawing operations, including clipping textures and transforms. This commit tests for approximate pixel matches, if future changes affect local drawing operations it will be easy to change the reference images, it thus becomes and should be an intentional operation if changes lead to local changes in drawn results. Ideally we should be able to make the tests check for exact pixel matches down the line to ensure consistent results between platforms. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 380938c6023ab6db464751c108b7928a02f35b42

gpu: cache quad splitting and transform Cache also CPU operations by moving pathCache into drawOps and use it in collectOps to avoid splitting and transformation of quads if in cache. In order to support this use a concrete type in opCache instead of interface. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha cfb9565895dc495157a4b5a08f519ec799337070

gpu: reintroduce reuse of offset-only stenciling Reintroduce support for offset in stencil vertex so we can reuse cached values if the only difference in transform is offset. Split current transform into a pure-offset part and the rest and use only the complex part as cache key. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Gordon Klaus

commit sha 5368743478e0f3be301e003f59da9109845176d6

widget,widget/material: add Float and Slider Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Gordon Klaus

commit sha 20cf570709374a078ed8bf71ae38ebb4005e4a3d

example/kitchen: add Float/Slider Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Jason

commit sha 9cfbdafe145bd9f37f173fa58c40c26deafe50d1

app/window,app/internal/window: allow min/max window size The app.MinSize and app.MaxSize options restricts the window size: w := app.NewWindow( app.Size(unit.Dp(600), unit.Dp(596)), app.MinSize(unit.Dp(600), unit.Dp(596)), app.MaxSize(unit.Dp(600), unit.Dp(596)), app.Title(APPNAME), ) Signed-off-by: Jason <sourcehut@sweatyballs.es>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 424a7289882b9116933d44c9d666ec7ec44bd2d5

text: fix typo Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9e3d3b6f58237c0af13e0b8a256677ae5d8801da

text,font/gofont: replace text.Collection with slice of FontFaces A slice of FontFace pairs are simpler, and thread safe in case a client wants to append or modify the font collection. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 878131189b10c23417aee9cc81aaa45e604ebe9a

all: remove redundant op.TransformOp.Offset Use op.Offset instead, or create and manipulate a f32.Affine2D. API change. Update your code with a gofmt rule: gofmt -r 'op.TransformOp{}.Offset -> op.Offset' Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 817e0fa9c32f4fa240e74105bb08b03a0065dc68

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

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha b9f6543cf5aff2b2e140d749f19d4e243b06eee6

gesture: always drag scroll on Android Mice drags scroll on Android by convention. Further, ChromeOS converts two-finger touchpad scroll gestures to press-drag with Source == Mouse. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e2f3bbdfc36707fbaff274aea031277ca0d5c459

cmd/gogio: [Android] disable ChromeOS input emulation Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 810be77412f473ac014848b91b22125eea44b67a

widget: remove unused parameter from Editor.moveCoord Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2f23a326b8addca92b0f0b7eebb902432bac90d8

widget: return float32 coordinates from Editor.CaretCoords Don't leak the implementation details of the caret coordinates. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e316f42964a164062f4be6f878f59a8b0af0b7ea

widget: reset Editor x offset on mouse initiated caret movement The caret x-offset tracks residual horizontal offset for arrow key movements. Caret movement by the mouse should reset the residual. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4eb66d27079788cf1198eb71569fc21d7140eb13

widget: fix caret comparison in editBuffer.move Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8f31f8da2c7c0a9d88ba86e9c8a5d04cbfd9f709

widget: move Editor caret information to sub-struct In preparation for maintaining the caret position. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ef21a7ace14e1e334a2b67486f6aaa01c3d9098e

widget: maintain Editor caret position Only call layoutCaret when the text layout changes, adjust position for caret movement. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha dcbbcbb5434333e935a475339e0802435100b7bb

widget: introduce Editor.moveLines Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ffec83a001be70c169726b56cc293a839366c51f

widget: add Editor tests Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha a21aefa8b73ce282d5de64b62e45094b0505a1de

widget: remove Editor references to text.Line.Len and text.Glyph.Rune In preparation for adding editor masking, Editor can't rely on the Rune and Len fields of the laid out text. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

tainted-bit

commit sha 5c0f190849584e9a2de315457916393e72dea388

widget: add optional password masking to Editor This change adds optional password masking to the Editor. To enable this feature, set the new Mask field to a non-zero rune. Every rune in the Editor's contents will be replaced by the mask rune in the visual display, except for newlines. The actual contents of the editor can still be accessed with Len, Text, and SetText. Fixes gio#80 Signed-off-by: tainted-bit <sourcehut@taintedbit.com>

view details

Viktor

commit sha ef70b9252eb50444ec4e16d97a7943b655443568

internal/rendertest: create new standard benchmark Create a standard, representative set of benchmarks for the rendering pipeline to allow for measurement of performance improvement/regressions due to changes. The benchmarks are intended to be representative of the types of drawing different gio uses should encounter. BenchmarkDrawUI: Draw text, instanced shaped and unique shapes in a mix that is reasonable for a simple UI. BenchmarkDrawUICached: Same as BenchmarkDrawUI but not reset between iterations to benchmark the rendering pipeline when using maximum caching. Benchmark1000Circles: Draw 1000 circles individually to benchmark the rendering performance with no caching. Represents usages such as animating shapes or drawing complex shapes. Benchmark1000CirclesInstanced: Draw 1000 circles by calling a Macro op, each one with an offset transform. Represents cases such as drawing spirits etc. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 5b277757cfd0fe69a6088534ced81aa845b115d5

op/clip, gpu: split complex curves in package gpu instead This is a first step towards supporting affine drawing transforms. The rendering algorithm relies on quadratic curves that do not cross x = 0 more than once, thus curves must be split after any rotation/shear transforms. Move this logic and the generation of vertices to package gpu. Also close all curves and draw zero-width edges as preparation for transform since the will no longer implicitly be vertical with no effect. This commit will severely affect performance since vertexes are now transformed also for cached items, using cpu resources. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha e7bc1a45533b01655d5b7d6a8aca7aeb226d1cef

f32: implement 2D affine transformations Implements 2D affine transformations. This commit is a step towards full affine transformations for drawing operations. Heavily based on the work by Péter Szilágyi in patch 9212 Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha b247395c6259163cd0ca910cd55401d0e31919c4

gpu, io/router, op: use f32.Affine2D instead of op.TransformOp for transforms Encode TransformOp as an Affince2D matrix instead and use that in gpu and io transform handling. There are no changes to user facing API and so far only the offset part of the matrix is used. This patch is a step towards full affine transformations. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 24951a7ee7f79b5ec38850148b7b18db07a48f08

gpu, op, internal/ops: add affine transformations Add support for affine transformations. The key changes are outlined below. - Painting/clipping with rectangles is handled by, for complex transforms, creating clipping paths representing the transformed rectangle and using a larger bounding box. Cover/Blit shaders updated correspondingly to correctly map texture cordinates from the new bounding boxes. - Since path splitting must happen on CPU the transforms must happen CPU side as well - offsets removed from shaders. - Complex transforms will lead to different path splitting which means that GPU arrays can no longer be cached if the transform has changed. Thus the current transform is added as a key to the cache. - Add a public API to op for setting Affine transformations. There are a number of optimizations that could be explored further but which are left out now: - Caching also of CPU operations (e.g path splitting & transforms) and not only caching the GPU arrays. - Allow for re-use of cached GPU vertices if the transformation change is a pure offset / scaling since the splitting is then the same. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha e3bb94ebb08aa70d5a0c93228c88b0eee444a0f6

internal/rendertest: create test suit for drawing operations Uses app/headless to create a set of test cases for drawing operations, including clipping textures and transforms. This commit tests for approximate pixel matches, if future changes affect local drawing operations it will be easy to change the reference images, it thus becomes and should be an intentional operation if changes lead to local changes in drawn results. Ideally we should be able to make the tests check for exact pixel matches down the line to ensure consistent results between platforms. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha 380938c6023ab6db464751c108b7928a02f35b42

gpu: cache quad splitting and transform Cache also CPU operations by moving pathCache into drawOps and use it in collectOps to avoid splitting and transformation of quads if in cache. In order to support this use a concrete type in opCache instead of interface. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

Viktor

commit sha cfb9565895dc495157a4b5a08f519ec799337070

gpu: reintroduce reuse of offset-only stenciling Reintroduce support for offset in stencil vertex so we can reuse cached values if the only difference in transform is offset. Split current transform into a pure-offset part and the rest and use only the complex part as cache key. Signed-off-by: Viktor <viktor.ogeman@gmail.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 7f836fa627b1a0cc50a7d767b8d038700925d0a4

go.*: update golang.org/x/image For the font fix: https://go-review.googlesource.com/c/image/+/237900 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha 602d54dc5ef72ff66eba2b2a38da2ba7c9be4d17

app,app/internal/window: [macOS] add app.Window.Close for closing a window Recently support was added for multiple top-level windows. Add support for closing those windows. macOS only; all others stubbed out. Signed-off-by: Larry Clapp <larry@theclapp.org>

view details

Elias Naur

commit sha c35d81e828b096fea6cbb372ffbe2e6fe812c051

cmd/gogio: mention that Android builds include jar class files Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Egon Elbre

commit sha 0b713032fbff7d5fbcb5398bea6a369071646c35

app/internal: [Windows] support Window.Close Signed-off-by: Egon Elbre <egonelbre@gmail.com>

view details

Egon Elbre

commit sha 7c98e679efa34a0e553f881ddccf404243adea3f

example,cmd: bump gio version Signed-off-by: Egon Elbre <egonelbre@gmail.com>

view details

Egon Elbre

commit sha 88ced59dad93f4d8a51a1f5f04a6db3fcd2f9da6

example/windows: add Window.Close example

view details

Larry Clapp

commit sha e7960fe7974e231864ba7e3726bab04f65ce120a

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha 11b0e98a51cc5580eb6781bba661cf87652d5084

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha 263f7b1bd657db1013b665f59a9c4e6c46229923

material: allow checkboxes without labels

view details

Larry Clapp

commit sha ae88b351a569a4b84180904070ccb87beb8d56ef

wip

view details

Larry Clapp

commit sha 6fd15b235519be2c8281086294e8e2e22537da6f

wip

view details

Larry Clapp

commit sha 562c097febaf94800ec5a7072788a4fc71c82259

wip

view details

Larry Clapp

commit sha 1f151835b1233f1818aac56c45f56b9e892753da

wip

view details

Larry Clapp

commit sha deaa4ea13c9e5c5d025c3e8fcd775e76c56b6316

More on ScrollTo - Move most of the ScrollTo functionality out of List.init and into ScrollTo itself - General cleanup

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 7f836fa627b1a0cc50a7d767b8d038700925d0a4

go.*: update golang.org/x/image For the font fix: https://go-review.googlesource.com/c/image/+/237900 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha 602d54dc5ef72ff66eba2b2a38da2ba7c9be4d17

app,app/internal/window: [macOS] add app.Window.Close for closing a window Recently support was added for multiple top-level windows. Add support for closing those windows. macOS only; all others stubbed out. Signed-off-by: Larry Clapp <larry@theclapp.org>

view details

Elias Naur

commit sha c35d81e828b096fea6cbb372ffbe2e6fe812c051

cmd/gogio: mention that Android builds include jar class files Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Egon Elbre

commit sha 0b713032fbff7d5fbcb5398bea6a369071646c35

app/internal: [Windows] support Window.Close Signed-off-by: Egon Elbre <egonelbre@gmail.com>

view details

Egon Elbre

commit sha 7c98e679efa34a0e553f881ddccf404243adea3f

example,cmd: bump gio version Signed-off-by: Egon Elbre <egonelbre@gmail.com>

view details

Egon Elbre

commit sha 88ced59dad93f4d8a51a1f5f04a6db3fcd2f9da6

example/windows: add Window.Close example

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 34c212d152ba00ffd73fa6212caefa9e0422109e

app/internal/window: [macOS] split out gio_createWindow Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 7c22a888b1d654d1ca3c1b982ad9be2925577c24

app/internal/window: [macOS] make GioDelegate window-independent Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9efdc3409ccae18630a98d26b2800e1a95c9b8a0

app/internal/window: [macOS] remove window reference from app delegate Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 476bf8d263b8459ab2b58af34af0de2d3a0c4147

app/internal/window: [macOS] only terminate app when last window closes Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4408c2a6957093e6cc0ccd4130d47e49a4d54fa1

app/internal/window: [macOS] support more than one window Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 144a5a9cf52d12dedd28aa873a371259b9ad7099

app/internal/window: [macOS] introduce serious cascading This time without arbitrary offsets and with support for multiple windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0749afc13c32017836c5f462ad8cbdd0d5549ef0

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

view details

Elias Naur

commit sha 483084f4becdc919d2258fb9f2087d9c5babb3a6

app/internal/window: [macOS] delay window creation until ready Fixes #128 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 78565c92329941704cc15a3c06e017cb946aad7b

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

view details

Elias Naur

commit sha 65078cdece5ce63e3d1f015c91ee87635eacdd59

app/internal/window: [macOS] simplify NewWindow Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c2c31a4d003eb28fb816ecc356699321ca99cccd

app/internal/window: [Windows] support multiple windows Updates gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha b07d34354ea323f223f87b772c40e84f4ec9fc8e

text,widget/material: make font collections explicit Before this change, package font implemented a global font registry, with the usual problems of package global state. This change deletes the global registry and introduces the text.Collection type for representing a list of fonts and their faces. Collection exports Lookup that finds the closest match and its face. The existing FontRegistry is renamed to Cache to reflect its new limited functionality: a cache of shapes and measurements on top of a Collection. Then, material.NewTheme is changed to take a Collection and initialize a Cache. Updates gio#19 because multiple windows require a separate (writable) Cache per window, while (read-only) Collections may be shared. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha f710bdf8e8f17d8d18bc7164e7991685cdf5ca6f

app: update NewWindow docs to reflect multi-window support Fixes gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 352856fc24f6765e2a65587a293fc3d3c4932bfb

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

view details

Elias Naur

commit sha b3d14d2dd4c0a3e5571b48192acfcd27c91e3a26

example/windows: add example that demonstrates multiple windows Updates gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8761550839a6aa18c89c04a9a3d7cac1d2279188

widget: fix Enum.Changed to reset changed status Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d86f96503f6c71695b5c6e7a4df7df28e95e7c02

app/internal/window: [macOS] fix window sizes for unit.Px values Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d280d438c7b8632aaf2d79c0072a50319125262f

io/router: don't clear event queue before cancel events There may be unrelated events in the queue, so it's not appropriate to clear the queue just because an input Cancel event occurs. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Chris Waldon

commit sha 3a31045dc9a82ec9e1b1ce24d5e389b3e2c56225

layout: add Disabled method to Context This adds a simple method that returns a copy of the Context with no event queue. Widgets laid out with this Context will never receive events, and can check whether the event queue is nil as a hint for whether or not to draw themselves as disabled. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Chris Waldon

commit sha cc5f8fcffe5e57c0f17b5475d5129ac5cd23572a

widget/material: add support for disabled buttons This leverages the new semantics of a disabled layout.Context to draw all of the button types in a disabled state. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

push time in 2 months

create barnchtheclapp/gio-mirror

branch : close-window

created branch time in 2 months

push eventtheclapp/gio-mirror

Chris Waldon

commit sha 9f6e09317d8040f4e77bbf9abe6b682f06465ac9

widget/material: add disabled state support to all widgets This commit configures all remaining widgets to draw themselves in a disabled state when their layout.Context is disabled. A description of the strategy employed by each follows: - Checkbox and RadioButton: Draws the icon component in a lighter color. Currently the label text is left in its default color. - ProgressBar: The "progress" color is lightened, but not as much as the background color. This makes the current progress value still readable. - Editor: The cursor is no longer drawn and the text is lightened. - Switch: The track is unchanged, but the circular "thumb" component is lightened. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Chris Waldon

commit sha 5214b26731a66d936229e11112bc2b3df872be5c

example/kitchen: add flag to draw all widgets disabled This adds a --disable flag to the kitchen example so that it's easy to preview what all widgets look like when they are disabled. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Elias Naur

commit sha 04e605c1b263ac4a121392002bc7b1c9eebdb25b

app/internal/window: [Android] implement scroll factor fallback for < API 26 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c2f99fb0e99c2fc1b4fd099b66552e7d0b01006b

app/internal/egl: [Android] fix sRGB on Samsung S9 At least one Samsung S9 device ignores the sRGB setting if the context wasn't created with alpha in its attributes. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1eedd19231a9a21334ec73122570b935475639b1

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

view details

Jason

commit sha a3f7eaae0857a6d5093f9f851a8d1b81d1ad4dda

app/internal/window: set WM_CLASS to binary name WM_CLASS is used by Linux desktops to provide hints for window grouping, icons to show and startup notifications. https://specifications.freedesktop.org/desktop-entry-spec/latest/ar01s06.html This patch set the WM_CLASS to the binary name. Signed-off-by: Jason <sourcehut@sweatyballs.es>

view details

Elias Naur

commit sha 3b54c665ca4dea212b8f639023e22915738f4a94

layout: add WeightSum to Flex for overriding the Flexed total weight Updates gio#139 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1603a6f3eef36931395538ae58d93646877347fe

op: add note that Ops.Reset invalidates recorded macros. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 596e32161041eb3b4b064942a0be5cb728a3793a

all: make unit.Converter concrete and rename to Metric An interface for scaling dp and sp is overkill, at least for all current uses. Make it a concrete struct type, and rename it to the shorter and more precise Metric. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha dd225d5d07f0aaaae77b4562466af66ce8ce3ec3

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

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 34c212d152ba00ffd73fa6212caefa9e0422109e

app/internal/window: [macOS] split out gio_createWindow Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 7c22a888b1d654d1ca3c1b982ad9be2925577c24

app/internal/window: [macOS] make GioDelegate window-independent Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9efdc3409ccae18630a98d26b2800e1a95c9b8a0

app/internal/window: [macOS] remove window reference from app delegate Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 476bf8d263b8459ab2b58af34af0de2d3a0c4147

app/internal/window: [macOS] only terminate app when last window closes Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4408c2a6957093e6cc0ccd4130d47e49a4d54fa1

app/internal/window: [macOS] support more than one window Updates #19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 144a5a9cf52d12dedd28aa873a371259b9ad7099

app/internal/window: [macOS] introduce serious cascading This time without arbitrary offsets and with support for multiple windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0749afc13c32017836c5f462ad8cbdd0d5549ef0

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

view details

Elias Naur

commit sha 483084f4becdc919d2258fb9f2087d9c5babb3a6

app/internal/window: [macOS] delay window creation until ready Fixes #128 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 78565c92329941704cc15a3c06e017cb946aad7b

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

view details

Elias Naur

commit sha 65078cdece5ce63e3d1f015c91ee87635eacdd59

app/internal/window: [macOS] simplify NewWindow Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c2c31a4d003eb28fb816ecc356699321ca99cccd

app/internal/window: [Windows] support multiple windows Updates gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha b07d34354ea323f223f87b772c40e84f4ec9fc8e

text,widget/material: make font collections explicit Before this change, package font implemented a global font registry, with the usual problems of package global state. This change deletes the global registry and introduces the text.Collection type for representing a list of fonts and their faces. Collection exports Lookup that finds the closest match and its face. The existing FontRegistry is renamed to Cache to reflect its new limited functionality: a cache of shapes and measurements on top of a Collection. Then, material.NewTheme is changed to take a Collection and initialize a Cache. Updates gio#19 because multiple windows require a separate (writable) Cache per window, while (read-only) Collections may be shared. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha f710bdf8e8f17d8d18bc7164e7991685cdf5ca6f

app: update NewWindow docs to reflect multi-window support Fixes gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 352856fc24f6765e2a65587a293fc3d3c4932bfb

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

view details

Elias Naur

commit sha b3d14d2dd4c0a3e5571b48192acfcd27c91e3a26

example/windows: add example that demonstrates multiple windows Updates gio#19 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8761550839a6aa18c89c04a9a3d7cac1d2279188

widget: fix Enum.Changed to reset changed status Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d86f96503f6c71695b5c6e7a4df7df28e95e7c02

app/internal/window: [macOS] fix window sizes for unit.Px values Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d280d438c7b8632aaf2d79c0072a50319125262f

io/router: don't clear event queue before cancel events There may be unrelated events in the queue, so it's not appropriate to clear the queue just because an input Cancel event occurs. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Chris Waldon

commit sha 3a31045dc9a82ec9e1b1ce24d5e389b3e2c56225

layout: add Disabled method to Context This adds a simple method that returns a copy of the Context with no event queue. Widgets laid out with this Context will never receive events, and can check whether the event queue is nil as a hint for whether or not to draw themselves as disabled. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Chris Waldon

commit sha cc5f8fcffe5e57c0f17b5475d5129ac5cd23572a

widget/material: add support for disabled buttons This leverages the new semantics of a disabled layout.Context to draw all of the button types in a disabled state. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 4cb96ccad9105f32b5cb7e0d9d68bd522097642d

app/internal/window: [macOS] always draw synchronously Asynchronous draws introduces flickering on resizes. Fixes #123 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha fc290f34571a15fc12844a6a3df52bba4f448deb

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

view details

Elias Naur

commit sha d489c20b842132724faff70b45dc835692b8c385

io/pointer: update documentation examples Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 275a91f26adda57c10be3a56a037f5d90112c5de

io/router: remove countPointerEvents assertEventSequence is shorter and clearer and more precise. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha e188d0e6ffb269ccbc83bcee16c3786c3503d349

io/pointer,gesture,app/internal/window: add pointer.Scroll event type Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha 4484674ab1d796816345875c4cb6e3b751a1e187

layout: don't run alloc tests with -race The race runtime allocates where the non-race runtime doesn't. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha 9d2a6c48d88f709575c1660a04893945c6d0df08

io/pointer: add InputOp.Types to specify which types of events to receive Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Gordon Klaus

commit sha 33a87ac61c387c39a2b53f1d25dfae5ff9a8986a

io/router: deliver scroll events only to the foremost scroll handler Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha cb5cc0256027bf9475a791f007c4b4f983d00ce5

app/internal/window: [macOS] remove frivolous cascadeTopLeftFromPoint call Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha 1a070a36b677363bbcd3b437b3fd35b3361ec08d

io/pointer: add Drag event type This eliminates needless redraws for handlers that care about drag events and not move events, like gesture.Scroll. Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha c225daa8458768b5dd89d24dc561bbbfa0f987b4

app/internal/window: [macOS] use regular map for view-to-window lookups All accesses to the view map now happens on the main thread, so there is no need for a sync.Map anymore. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 278e9bc334005f3612a4a8479ae0a89e252bc04a

app/internal/window: [macOS] remove useless retain/release The window and its view is guaranteed to outlast the display link. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2accb8838128906494f7a48c9b729c09c4ca805d

app/internal/window: [macOS] fix zero-length clipboard reads Fixes #126 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 65d4707e3e47a7015f009723a42c5833d076bcd0

io/pointer,io/router,gesture: add pointer.Foremost priority Replace the pointer.Scroll special case with a new priority that indicates the foremost handler, checked in gesture.Scroll. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha a4e572d0e31e12997d5a7e317306601386d0a92f

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

view details

Elias Naur

commit sha 4f64ac17368f997ef5d6437442bcaab175b06f4d

io/pointer: remove special case note Scroll events are no longer special after gioui.org/commit/65d4707e3. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha df4f3a1ba29ce30625ad2eba0389c16c3c398f07

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha d798dcfb4eedb9f4b35164612945ce2d7dff37a8

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha 3db141581e68b2d6a3d6c5b3933b603883bce246

material: allow checkboxes without labels

view details

Larry Clapp

commit sha cd45163e4152603a4383efe262625f9ea912e209

wip

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 4cb96ccad9105f32b5cb7e0d9d68bd522097642d

app/internal/window: [macOS] always draw synchronously Asynchronous draws introduces flickering on resizes. Fixes #123 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha fc290f34571a15fc12844a6a3df52bba4f448deb

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

view details

Elias Naur

commit sha d489c20b842132724faff70b45dc835692b8c385

io/pointer: update documentation examples Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 275a91f26adda57c10be3a56a037f5d90112c5de

io/router: remove countPointerEvents assertEventSequence is shorter and clearer and more precise. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha e188d0e6ffb269ccbc83bcee16c3786c3503d349

io/pointer,gesture,app/internal/window: add pointer.Scroll event type Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha 4484674ab1d796816345875c4cb6e3b751a1e187

layout: don't run alloc tests with -race The race runtime allocates where the non-race runtime doesn't. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha 9d2a6c48d88f709575c1660a04893945c6d0df08

io/pointer: add InputOp.Types to specify which types of events to receive Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Gordon Klaus

commit sha 33a87ac61c387c39a2b53f1d25dfae5ff9a8986a

io/router: deliver scroll events only to the foremost scroll handler Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha cb5cc0256027bf9475a791f007c4b4f983d00ce5

app/internal/window: [macOS] remove frivolous cascadeTopLeftFromPoint call Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Gordon Klaus

commit sha 1a070a36b677363bbcd3b437b3fd35b3361ec08d

io/pointer: add Drag event type This eliminates needless redraws for handlers that care about drag events and not move events, like gesture.Scroll. Signed-off-by: Gordon Klaus <gordon.klaus@gmail.com>

view details

Elias Naur

commit sha c225daa8458768b5dd89d24dc561bbbfa0f987b4

app/internal/window: [macOS] use regular map for view-to-window lookups All accesses to the view map now happens on the main thread, so there is no need for a sync.Map anymore. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 278e9bc334005f3612a4a8479ae0a89e252bc04a

app/internal/window: [macOS] remove useless retain/release The window and its view is guaranteed to outlast the display link. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2accb8838128906494f7a48c9b729c09c4ca805d

app/internal/window: [macOS] fix zero-length clipboard reads Fixes #126 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 65d4707e3e47a7015f009723a42c5833d076bcd0

io/pointer,io/router,gesture: add pointer.Foremost priority Replace the pointer.Scroll special case with a new priority that indicates the foremost handler, checked in gesture.Scroll. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha a4e572d0e31e12997d5a7e317306601386d0a92f

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

view details

Elias Naur

commit sha 4f64ac17368f997ef5d6437442bcaab175b06f4d

io/pointer: remove special case note Scroll events are no longer special after gioui.org/commit/65d4707e3. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 2 months

startedajstarks/giocanvas

started time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha d2c67cdf8039364d730942131ce8c068f6252eec

app/internal/egl: use nilEGLConfig to guard against int vs pointer-typed EGLConfig Updates #121 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4bf043eb5b2f8c56593ce7947b52e43fb9abf2d8

app/internal/window,app/internal/xkb: silence string(int) conversion warnings Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2487842aaef7f927eb49a81dfa174087a5a1b02f

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

view details

Elias Naur

commit sha 23c2d44b8cfe36792785ce3fb4a3cc671ad10f58

io/router: add addPointerHandler convenience function Remove a redundant call and shorten image.Rectangle literals while here. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3b28c5d06738183e360e841d5d3df2c50a02ec58

io/router: simplify pointer event routing - Drop pointer.Event.Hit in favour of Enter/Leave events. - Track enter/leaves for each pointer.ID (updates #122). Add test. - Resolve grabs once. - Get rid of scratch slice. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6fbcae07cb769471a89b1d07f4c132e8b12bb0bc

app/internal/window: fix multitouch action on Android Fixes #122 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 28bf9e200143817f229eb2a72118ffa05549a16f

layout: create input group for List Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha eafe09967f5bdabb90e7eedfb09e40b12c995269

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

view details

Elias Naur

commit sha f86e1a6421986ca33ee10a10a544eb37e78e6cf8

app/internal/window: [wayland] move listener registration to Go In turns out that only the listener declarations need to be in C, not the listener registration calls. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3ef841bd07fb0e21ea2e33f0e31d36608c54b623

widget: make Clickable.Clicked use a pointer receiver Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Pierre.Curto

commit sha bade2778763168193c9b56ea93005d6c0b7a88d2

widget: Clickable: added support for NumClicks Clickable.Clicks() now returns the number of clicks. Signed-off-by: Pierre.Curto <pierre.curto@gmail.com>

view details

Thomas Bruyelle

commit sha ae8a377cda62204d4c3fdfe0e5b481e1cbeadc41

op: add op.Push and op.Record funcs The funcs replace stack.Push and macro.Record, which become private. This makes stack and macro faster to write, in particular for stacks where you can just write the following line to save and restore the state : defer op.Push(ops).Pop() This usage requires Push to return a pointer (since Pop has a pointer receiver), or else the code doesn't compile. For consistancy, I tried to do the same for op.Record, but this implied to turn all the MacroOp fields into pointers, and this caused some panics. As a result, op.Record doesn't return a pointer. An other side effect pointed by Larry Clapp: StackOp and MacroOp are not re-usable any more, you have to allocate a new one for each usage, using the described funcs above. Signed-off-by: Thomas Bruyelle <thomas.bruyelle@gmail.com>

view details

Elias Naur

commit sha 3e8c502550bc87762753ecb03ebaea460fb5e852

op: return value StackOp from Push and make Pop use a value receiver To match Record, we'd like Push to return a value. To do that and support the one-line defer op.Push(ops).Pop() Pop needs to use a value receiver as well. Drop the active field and make it so. The field was only a sanity check, a check which is already done by Ops.stackStack, albeit with a less specific panic. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha acc23a5b3e200abde43794a69a83153792214b5d

op: make MacroOp methods take value receivers The only mutable field is "recording", which is used for a sanity check. THat check is performed (less generally) by Ops.macroStack. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2bdf8c38515c255e55cb0b6128e1375d2f58497a

layout: add test that Stack doesn't allocate Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ce0cc706adf1c8af9d1e58103f647d04ee522e49

layout: add test that Flex doesn't allocate Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c19ed053429731010493c8a1515ee5dd5c0ac5ec

op: change CallOp to be a return value from MacroOp.Stop Converting macro := op.Record(ops) ... macro.Stop() macro.Add() to macro := op.Record(ops) ... call := macro.Stop() call.Add(ops) Which is more general (call.Add can take a different ops than the op.Record that started it), and enforced the order between Stop and the subsequent Add. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9196ce0369bc03920862ccd57b559224117d8c9e

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

view details

Elias Naur

commit sha ff71d0c518e31b2f151f85bd7c1d796195142466

io/router: fix typo Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Larry Clapp

commit sha e451a8be73e78d7a98b3df6985a5fd0ebbd2831e

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha f86e1a6421986ca33ee10a10a544eb37e78e6cf8

app/internal/window: [wayland] move listener registration to Go In turns out that only the listener declarations need to be in C, not the listener registration calls. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3ef841bd07fb0e21ea2e33f0e31d36608c54b623

widget: make Clickable.Clicked use a pointer receiver Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Pierre.Curto

commit sha bade2778763168193c9b56ea93005d6c0b7a88d2

widget: Clickable: added support for NumClicks Clickable.Clicks() now returns the number of clicks. Signed-off-by: Pierre.Curto <pierre.curto@gmail.com>

view details

Thomas Bruyelle

commit sha ae8a377cda62204d4c3fdfe0e5b481e1cbeadc41

op: add op.Push and op.Record funcs The funcs replace stack.Push and macro.Record, which become private. This makes stack and macro faster to write, in particular for stacks where you can just write the following line to save and restore the state : defer op.Push(ops).Pop() This usage requires Push to return a pointer (since Pop has a pointer receiver), or else the code doesn't compile. For consistancy, I tried to do the same for op.Record, but this implied to turn all the MacroOp fields into pointers, and this caused some panics. As a result, op.Record doesn't return a pointer. An other side effect pointed by Larry Clapp: StackOp and MacroOp are not re-usable any more, you have to allocate a new one for each usage, using the described funcs above. Signed-off-by: Thomas Bruyelle <thomas.bruyelle@gmail.com>

view details

Elias Naur

commit sha 3e8c502550bc87762753ecb03ebaea460fb5e852

op: return value StackOp from Push and make Pop use a value receiver To match Record, we'd like Push to return a value. To do that and support the one-line defer op.Push(ops).Pop() Pop needs to use a value receiver as well. Drop the active field and make it so. The field was only a sanity check, a check which is already done by Ops.stackStack, albeit with a less specific panic. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha acc23a5b3e200abde43794a69a83153792214b5d

op: make MacroOp methods take value receivers The only mutable field is "recording", which is used for a sanity check. THat check is performed (less generally) by Ops.macroStack. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2bdf8c38515c255e55cb0b6128e1375d2f58497a

layout: add test that Stack doesn't allocate Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha ce0cc706adf1c8af9d1e58103f647d04ee522e49

layout: add test that Flex doesn't allocate Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c19ed053429731010493c8a1515ee5dd5c0ac5ec

op: change CallOp to be a return value from MacroOp.Stop Converting macro := op.Record(ops) ... macro.Stop() macro.Add() to macro := op.Record(ops) ... call := macro.Stop() call.Add(ops) Which is more general (call.Add can take a different ops than the op.Record that started it), and enforced the order between Stop and the subsequent Add. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9196ce0369bc03920862ccd57b559224117d8c9e

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

view details

Elias Naur

commit sha ff71d0c518e31b2f151f85bd7c1d796195142466

io/router: fix typo Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha d2c67cdf8039364d730942131ce8c068f6252eec

app/internal/egl: use nilEGLConfig to guard against int vs pointer-typed EGLConfig Updates #121 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4bf043eb5b2f8c56593ce7947b52e43fb9abf2d8

app/internal/window,app/internal/xkb: silence string(int) conversion warnings Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2487842aaef7f927eb49a81dfa174087a5a1b02f

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

view details

Elias Naur

commit sha 23c2d44b8cfe36792785ce3fb4a3cc671ad10f58

io/router: add addPointerHandler convenience function Remove a redundant call and shorten image.Rectangle literals while here. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3b28c5d06738183e360e841d5d3df2c50a02ec58

io/router: simplify pointer event routing - Drop pointer.Event.Hit in favour of Enter/Leave events. - Track enter/leaves for each pointer.ID (updates #122). Add test. - Resolve grabs once. - Get rid of scratch slice. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6fbcae07cb769471a89b1d07f4c132e8b12bb0bc

app/internal/window: fix multitouch action on Android Fixes #122 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 28bf9e200143817f229eb2a72118ffa05549a16f

layout: create input group for List Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha eafe09967f5bdabb90e7eedfb09e40b12c995269

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

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha f6dff2fd1c92ce78229a6262a1f221d7ec93fa7f

app/internal/window,app/internal/xkb: [Wayland] report modifiers for pointer events Updates #120 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9da54eac61b525f3c67886549983cec31bf5dcb9

app/internal/window: [X11] report key modifiers for pointer events Fixes #120 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6a0da04598aaec3cbb6f0fa030235c8b61594634

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

view details

Elias Naur

commit sha 266b01bb5d54ef1d6d5e4cb30920d7ad5e7b9b3e

app/internal/window: [wasm] report key modifiers for pointer events Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 38179411754c64e1eef3b79199de63c643d9df1c

app/internal/window: [iOS] move redraw logic to Go We're about to move the display link to common Go code. To do that, we need the redraw logic in Go as well. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1377bea3cdc596ae0b458d6906bc1ffa9990329d

app/internal/window: [macOS,iOS] reduce display link starting and stopping Recent changes to the macOS threading exposed a problem where a window's display link may fail to start after being started and stopped in rapid succession. Introduce a displayLink type that waits a while after the last stop request before stopping its display link. That seems to be the way other projects are using display links. As a bonus, the new implementation avoids the potentially expensive overhead of frequent starting and stopping the underlying OS thread. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e9500f5f4c2f4596be6069674a92cfbb3e2c60e3

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

view details

Larry Clapp

commit sha 8a42d577ac905580f53137312316cfeba8d54ce9

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha dc5cc1fa4c1355d349dc89008190603dd6dbcd92

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha f6d766ecad4c055594cca6d0ca6540df56f270be

material: allow checkboxes without labels

view details

Larry Clapp

commit sha c454adb705fb117f6caf6557e5b619c5cfb3b39f

wip

view details

Larry Clapp

commit sha 1182f0f0eefe6fe4f60386d56b0d3416abeaa9a8

wip

view details

Larry Clapp

commit sha 70d37f8e9718ceda87d023ba8b0e5c8c8be5b155

wip

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 38179411754c64e1eef3b79199de63c643d9df1c

app/internal/window: [iOS] move redraw logic to Go We're about to move the display link to common Go code. To do that, we need the redraw logic in Go as well. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1377bea3cdc596ae0b458d6906bc1ffa9990329d

app/internal/window: [macOS,iOS] reduce display link starting and stopping Recent changes to the macOS threading exposed a problem where a window's display link may fail to start after being started and stopped in rapid succession. Introduce a displayLink type that waits a while after the last stop request before stopping its display link. That seems to be the way other projects are using display links. As a bonus, the new implementation avoids the potentially expensive overhead of frequent starting and stopping the underlying OS thread. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e9500f5f4c2f4596be6069674a92cfbb3e2c60e3

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

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha f6dff2fd1c92ce78229a6262a1f221d7ec93fa7f

app/internal/window,app/internal/xkb: [Wayland] report modifiers for pointer events Updates #120 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9da54eac61b525f3c67886549983cec31bf5dcb9

app/internal/window: [X11] report key modifiers for pointer events Fixes #120 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 6a0da04598aaec3cbb6f0fa030235c8b61594634

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

view details

Elias Naur

commit sha 266b01bb5d54ef1d6d5e4cb30920d7ad5e7b9b3e

app/internal/window: [wasm] report key modifiers for pointer events Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 2 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 5c6ff659bf38c89da48bb344ba51d5b9d09c4788

app/internal/window: [macOS] don't call Cococa from non-main thread Only the synchronous draws from the main thread may involve changing width, height and scale. Introduce cached window.width and window.height fields and limits updates to main-thread draws. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 33146961f4355fe5d1daad8241936bbcf81022cb

app/internal/window: [macOS] avoid racy access to window width, height, scale The macOS redraw callback is not invoked on the main thread, so its access to window fields must be synchronized. An alternative would be to schedule the asynchronous redraws on the main thread, but I believe frame callbacks are performance-sensitive enough to warrant the extra locking complexity. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 7b6eafcb591a8d85c25e9b175b650ab7fb7f8b59

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

view details

Larry Clapp

commit sha 6236db242941ae64974f48a24bf44ed30c8d3330

layout: add List.ScrollTo, PageUp, and PageDown ScrollTo: Scroll a list so the given index is visible. PageUp & PageDown: Scroll up and down by the list height.

view details

Larry Clapp

commit sha 6785ceaaa977a1e6ba7c86e8a9b2f8777f590a82

layout: export First/LastDrawn; fix scrollto bug - Export FirstDrawn and LastDrawn, so that client code can know which children were drawn. - Fix a bug that sometimes set scrollTo (and thus Position.First) to -1.

view details

Larry Clapp

commit sha 92c49c75ffd01aee028d975b0e7ad4f72b8fc2e8

material: allow checkboxes without labels

view details

Larry Clapp

commit sha 2c7e7a7637bfa3fea462a5b7c2110a3fb1fd67e0

wip

view details

Larry Clapp

commit sha f0e09c57d6bd784cd011513e688dba7084c663ae

wip

view details

Larry Clapp

commit sha a98c092e2b670e543615cbf4f98feee7a230bc5c

wip

view details

push time in 3 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 05dfceb7e7c56858f4d1144fc378a63ff3e49ed2

app/clipboard: implement clipboard for Android Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 2e25a28a5496c6ecea81ec05cd91ba9c30d25b26

app: fix typo in Main documentation Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha f16e8fd122e35769f03667839bec640f6ef5f802

app: update package documentation Reflect the move of Queue from Window to FrameEvent. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 391b89d11d410ea9ba01a3b45e2549735af35a06

example/glfw: add package documentation and link to installation Fixes #114 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 81f474f5d73672a1855e6d7efab77055aa6718e3

op/paint,io/system: document ImageOp lifetime Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha b7ba80951798496f25abec01eee99356a003e61d

op/paint: rename material to brush The "material" name clashes with the theme of the same name. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 29c9b06dabc26a6bdb4048e9d5b9b3c95caa8021

op/paint: document ImageOp gotcha Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 31acd5451e035caa38bcf475eefc67c1bac6d5e3

op/paint: further clarify PaintOp documentation Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha db0af521d0c1931b9e6a2ee62f21a8bf5aedfc62

app/internal/window: move Wayland callback structs into function scope Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 56dbaf326a927adb9c770e6a6debd90e656f6a56

app: move frame waiting code out of Window.run to a separate method Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha fd6f6c448510ab14e06735fa333908b924f194f9

app: move GPU context validation and retry logic to separate method Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha bc645c3ca448efaa717a4609f1834d0bae5a1c6a

app/internal/window: [Wayland] introduce wlSeat for seat-specific state Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3e648715db454d28f7fe77f0a97124059be3e5a6

app/internal/window: rename wlConn to wlDisplay Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha bf129ca989ff59ba3ed376ffe492974f24e30221

app/internal/window: get rid of the global Wayland display Instead, create a display for each window. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 1a48b5c33c8b228df098394cb48d8e7aac91b866

app/internal/window: [Wayland] use a single callback entry for each object The callbackMap is used to look up Go references in event callbacks. Instead of registering one entry for each possible callback type, use a single handle for each Go reference. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0aa7d4ab3fa78a7d95c46d7761b0d75b18bc1aed

app/internal/window: [Wayland] move outputMap and outputConfig to wlDisplay Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha cf72e684b62dac59051d3022698c7b57b78c0e49

app/internal/window: use a sync.Map for callback references Multiple Wayland windows are now separate, except for the global callback reference map. Use a sync.Map to support multiple concurrent windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0181f22d0138eb8e346fee70726b3f8962bf644a

app/internal/window: block Main until all windows are closed With this change, the Wayland backend now supports multiple windows. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 28a3de6e32c9ba77491a4d4cd964abe9f6336544

app/internal/window: [Wayland] delete unused field Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 55881fc09c185a6f0693a0d6c0583e0b18028e10

app/internal/window: [Wayland] remove redundant event dispatch Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 3 months

issue commentgopherjs/gopherjs

fmt.Println("Hello World") seems to give garbage output

Yeah, if you want console.log, use print or println, not fmt.Println.

Merith-TK

comment created time in 3 months

push eventtheclapp/gio-mirror

Elias Naur

commit sha 1062d4e79d4198f84beda8ffb3528e6fa8d0a7ff

gpu/shaders: avoid first-class arrays Safari's WebGL1 implementation (rightly) complains that first-class array types are not supported as function result types. Define and use a struct type instead. While we're here, use const variables instead of functions. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9842cbd30bfbb39774b506206339c789a38a03a4

gpu/gl: detect float FBO support under Safari's WebGL1 implementation Safari's WebGL does not advertise support for EXT_color_buffer_half_float, but does support rendering to float FBOs. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 9218df1db76799ee3b14303765c61b260197b3a0

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

view details

Elias Naur

commit sha 51e4df77070974a962ee62646533ce48f870fe56

app/internal/log: fix typo Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 4bde9fbcaa2d809bb734f04f207d513b44c82323

app/internal/log: add synchronized logger on Android By default, the standard library log package outputs to stderr. However, stderr is redirected through a pipe to the Android logger, so recent writes may be not have been sent when os.Exit is called. The log.Fatal family of functions does just that: write to the log and call os.Exit. To ensure all messages are sent, register a synchronized logger at startup. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 133fa45258fc5f4cb40a4ae6958d77e3a85cc7f7

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

view details

Elias Naur

commit sha 0e70fbc1262920a69c60409285795b6bb8701b09

app: add note about the safe use of Window.Queue. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Fabian Geiselhart

commit sha b862f4f1745e250ff785856aca4485295ac35d27

example/kitchen: Use the button passed to iconAndTextButton.Layout The global iconTextButton variable was used instead of the passed button. Signed-off-by: Fabian Geiselhart <me@f4814n.de>

view details

Pierre.Curto

commit sha 4db3cb2afbcf56af42bc6718f7dbbd6f0283b304

gesture: support multiple click actions Double click or tap actions are common in user interfaces and this commit adds support for it in the gesture package. ClickEvent has now a new field NumClicks that contains the number of successive clicks that occurred within 200ms. Fixes gio#101 Signed-off-by: Pierre.Curto <pierre.curto@gmail.com>

view details

Elias Naur

commit sha fa7f9d3ba897ef0e4221c3cb1ceb50e98c99e28a

widget/material: report icons dimensions after running Icon.Layout Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha e460e4f4bfa052e4d53a8cc7d4d1f8ef58e6a176

widget,widget/material: move Image and Icon to widget package There is nothing theme-specific about displaying images and icons, so move the types from the material package to the generic widget package. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 060cff257f1ddbbe20030fb8408bba33760f0522

material: make theme constructors stand-alone functions The multitude of widget methods on Theme is unnecessary coupling in that all possible widgets either have to be included in package material, or be different than 3rd party widgets: var th *Theme // Core widget, calling a method on Theme. th.Button(...).Layout(...) // 3rd party widget, calling a function taking a Theme. datepicker.New(th, ...).Layout(...) Another reason for the Theme methods was to enable a poor man's theme replacement, so that you could use the same code for compatible themes. For example, mat.Button(...).Layout(...) would not need to change if the type of mat changed, as long as the new type had a compatible method Button. However, that point misses the fact that the mat variable had to be declared somewhere, naming the theme package: var mat *material.Theme (or, say, *cocoa.Theme) A better and complete way to replace a theme is to use import renaming. For example, to replace the material theme with a hypothetical Windows theme, replace import theme "gioui.org/widget/material" with import theme "github.com/somebody/windows This change moves all Theme widget methods to be standalone functions, and renames the widget style types accordingly. For example, instead of the method func (t *Theme) Button(...) Button there is now a function func Button(t *Theme, ...) ButtonStyle Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha d474b5b16a81d11e6012950c1d7bf47f2d8cd85a

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

view details

Elias Naur

commit sha d350f820113e57716d9fea3f8270d414c3e03130

layout: fix typo Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 289fe02b90a986253fd80a2538f50c7c9607c007

layout: replace NewContext with a Queue argument to Context.Reset We're about to reduce the scope of the Window.Queue by moving it to FrameEvent. As a consequence, Context can no longer rely on a Queue constant over its lifetime. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 8d9612f9aa462cb5ef571518694a3def64bc9e50

layout,app,io/system: move Queue from app.Window to FrameEvent Change gioui.org/commit/0e70fbc1262920a69c60409285795b6bb8701b09 added a note that app.Window.Queue must only be used during the processing of a FrameEvent. The change was added because a Gio user took the existence of app.Window.Queue to mean it was always available. This change reduces the scope of window Queues by moving it from Window to FrameEvent, and minimizes the risk of misuse by not offering Window.Queue at all. Note that the gioui.org/commit/a937a7653439333b8c6fc30c7a6039b717339766 change moved Window's Frame method (named Update) to FrameEvent for the same reason. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha a1166e66521a982db2aabccc0c88595d86be88b9

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

view details

Elias Naur

commit sha f1e266a9e70f49385dd56666cd8a3ca53a48fcc7

widget,widget/material: export Enum.Value The Value method both updated the enum value and returned it. In order to access the current value withoutm, expose the Value field of the enum and rename the method to Update. As a bonus we can get rid of the SetValue method as well. Updates gio#96 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 52d8a8867d7208e8cb57cd1540fe470777eac132

widget,widget/material: export CheckBox.Checked Similar to the previous change to Enum, expose the current state of the CheckBox. Rename the Checked method to just Update and get rid of the SetChecked method. Fixes gio#100 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Chris Waldon

commit sha 6501ecf2a0d52a985fc82fe0d06f7ab0a671727d

io/pointer: define new Enter/Leave pointer events Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

push time in 3 months

startedaarzilli/nucular

started time in 3 months

issue commentmvdan/sh

Enhancement: Better messages for non-formattable languages

This seems problematic. Suppose someone gives you a script starting with #!/bin/zsh. Should you refuse to format it? But they asked you to format it! Should you try to format it? But you know you very possibly can't! Should you try to format it and just drop all warnings? But then what's the point?

In any case: are you aware of the -f option?

  -f        recursively find all shell files and print the paths

I ran shfmt -f against my $HOME/bin which has some zsh scripts and it successfully skipped them (based on the #!/bin/zsh and #! env zsh in them, I assume).

mcandre

comment created time in 3 months

issue commentmvdan/sh

interp: Invoking bash seems to consume a function's stdin

Thanks for the detailed commit message! Interesting indeed!

I'm fine using master.

Thanks for the quick fix!

theclapp

comment created time in 3 months

issue openedmvdan/sh

interp: Invoking bash seems to consume a function's stdin

Given a file:

function f {
  bash -c "echo foo"
  echo "f cat output"
  cat
  echo "f cat done"
}

function g {
  bash -c "echo foo" < /dev/null
  echo "g cat output"
  cat
  echo "g cat done"
}

echo bar | f
echo
echo bar | g

I expect the output of f and g to be the same (more or less), and in bash they are:

% bash < file
foo
f cat output
bar
f cat done

foo
g cat output
bar
g cat done

but in gosh they're not:

% gosh < file
foo
f cat output
f cat done

foo
g cat output
bar
g cat done

In gosh, calling bash -c seems to consume (or redirect or misdirect?) f's stdin. In any case it's not available to the cat afterwards.

In the actual code, it's "sudo bash ...", but it turns out sudo is not part of the problem, so I left it out. But that's why it's bash -c "do stuff" instead of just do stuff.

I doubt that this problem is specific to invoking bash, but that's the real code on my end, so that's what I'm reporting.

There doesn't seem to be any magic with bash calling bash, vs. gosh calling bash. If I say zsh < f then it also works.

created time in 3 months

push eventtheclapp/gio-mirror

Chris Waldon

commit sha 6501ecf2a0d52a985fc82fe0d06f7ab0a671727d

io/pointer: define new Enter/Leave pointer events Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Chris Waldon

commit sha 1c113f19c67363660b0a80f1602207e7da8aff0a

io/router: send pointer Enter/Leave events This commit introduces a naive system for sending events when a pointer enters or leaves a pointer hit area. Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Chris Waldon

commit sha 13941c9f1b3c5894ef6c2c0f34f60c6462302808

io/router: add tests for Enter/Leave pointer events Signed-off-by: Chris Waldon <christopher.waldon.dev@gmail.com>

view details

Elias Naur

commit sha 6b4eb710b328b66e7165fb9d41990d6f81d447af

widget: rename CheckBox to Bool We're about to introduce the Switch widget that re-uses the same state type as CheckBox. The Bool name covers both uses. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 26da49e145f37590f6927328653560af338d8534

widget/material: add Switch widget Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 05efb9b5f4529fa3d6446d238f461a84792f3644

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

view details

Elias Naur

commit sha f08568a6dfc3890dcc8ea76c11f1a4cd436a57c1

widget: report whether Value changed after Enum.Update and Bool.Update Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 7301ebe0ef43a297f1c0fa1296fd463eca31f872

app/internal/window: removed unused function Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha c7c5b8726414f40aa46ff1e99bb24cd5f7dfc4bd

app/internal/window: remove unused #includes Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0c0a22bee73cd552c6c6c861d2a92edabea7ab6d

app/internal/window: don't rely on JNI_OnCreate for getting the JavaVM We're about to remove the global JNI_OnLoad constructor, and the JavaVM singleton is just as easily fetched from a Java JNI callback. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha cde651db60e1d9ae88e820a4d51391e23e640274

app/internal/window: [Android] remove JNI_OnLoad JNI callback There can only be one JNI_OnLoad callback per JNI library, and the Gio program may need it for its own purposes. Gio only used JNI_OnLoad for explicitly registering native methods. Switch to implicit name based registration and get rid of JNI_OnLoad. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 33493501a63fc70a433f063c11b7a7be163a24d8

app/internal/headless: [Android] expose Java initialization method Android apps may want to run Go code independent of the Gio Android Activity. Expose a Gio.init Java method public for early loading and initialization of the Go library. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Daniel Martí

commit sha ec34eb4919f01879b180418df5b0364bf47456b2

cmd: add a go.local.mod for development It's essentially a copy of go.mod, but with the gioui.org module replaed with the parent directory. Useful when wanting to try a change in the root module as part of a gogio invocation or end-to-end test, such as either of the following: $ cd cmd; go test -modfile=go.local.mod ./... $ cd cmd/gogio; go build -modfile=../go.local.mod Since go.sum can essentially be shared, and since it seems to work with the go tool, use a symlink. The way the -modfile flag works, if given foo.mod, it will use the sum file at foo.sum. The only caveat is that 'go mod tidy -modfile=go.mod.local' will try to remove gioui.org lines, since that module is replaced. So tidy shouldn't be used with -modfile. In the future, the only upkeep needed for go.local.mod is to update the external dependencies to mirror changes in go.mod. This is not automated nor checked by CI, but it could be in the future if it becomes repetitive or error-prone. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>

view details

Daniel Martí

commit sha e97adeedd9186530b84a40ebd0ebb7af66eb0e07

app/internal/log: use the app ID as the Android log tag This way, a Gio app's logs can be filtered uniquely, which wasn't possible before since the tag "gio" would be the same between gio apps. Since the app ID is supplied at build time, inject it via a variable with the linker's help. The variable is only used on Android for now, but that's OK. It might be useful for other platforms or other internal packages in the future. Fixes #84. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>

view details

Elias Naur

commit sha 2395659be373b319821ed4c04c674edb5f12e22d

app: [Android] set XDG_CACHE_HOME to make os.UserCacheDir work os.UserCacheDir can't work on Android because it doesn't have access to the Java app context. Gio programs do have access, so set up UserCacheDir's fallback, the XDG_CACHE_HOME environment variable. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 3957be37c82124c3eea881ce1e4b5b9af56026f4

app: [Android] tweak environment for os.UserHomeDir and os.UserConfigDir Set the fallback environment variables XDG_CONFIG_HOME and HOME to make os.UserConfigDir and os.UserHomeDir report useful paths. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 681bafce08b5493408908e6b2289e3ebda1ed536

cmd/gogio: use filepath for Windows compatibility Fixes gio#112 Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 630e0b494d27bd5dc0a92aed56079df302167ae3

app/internal/windows: remove extra empty line Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha bcbea7e65371e81e2351467dd9a7aa8d8cec117b

cmd/gogio: fix ldflags overwriting Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

Elias Naur

commit sha 0ad8f85c05e77782f4aa2b8926101d54413c553f

cmd/gogio: add -linkmode flags For experimenting with https://github.com/golang/go/issues/38918. Signed-off-by: Elias Naur <mail@eliasnaur.com>

view details

push time in 3 months

more