~eliasnaur

~eliasnaur/gio

Last active 5 hours ago

~eliasnaur/gio-patches

Last active 20 hours ago
View more

Recent activity

Re: [PATCH gio] cmd/gogio: generate boilerplate with init command 20 hours ago

From Elias Naur to ~eliasnaur/gio-patches

On Mon Jun 21, 2021 at 04:39 CEST, Jack Mordaunt wrote:
> 'gogio init' generates simple Gio boilerplate into the current working directory.
> It runs go module commands in order to get the sample app ready to hack on right-away.
>
> Since gogio's scope is specialised to mobile builds, it wasn't clear how to
> integrate arbitrary commands, such as the `init` command implemented in this patch.
>

Windows is also supported by the tool.

> Perhaps gogio's scope should loosen to be a more general purpose tool. In any
> case, this patch makes the minimum changes to to implement the `init` command. 
>
> Signed-off-by: Jack Mordaunt <jackmordaunt@gmail.com>

Re: gio/cmd/gogio: boilerplate generator a day ago

From Elias Naur to ~eliasnaur/gio

On Sat Jun 19, 2021 at 23:37 CEST, Jack Mordaunt wrote:
> Hi Elias, 
>
> I've found myself tediously writing-out or copy-pasting Gio startup code
> when creating experimental / throwaway apps. 
>
> I wonder if it would be useful to include a boilerplate generator in the
> `gogio` or simliar tool. This could be useful for people new to Gio and
> who are unfamiliar with setting up the event loop, and for people who
> are creating lots of small experiments. 
>
> For example:
>
> `gogio init git.sr.ht/~jackmordaunt/demo`

Re: Gio and accessibility 6 days ago

From Elias Naur to ~eliasnaur/gio

On Tue Jun 15, 2021 at 15:15 CEST, Matt Campbell wrote:
> On 6/14/2021 10:17 AM, Elias Naur wrote:
>
> > Not an insurmountable problem. If possible, you may have success in
> > compiling AccessKit to an object file and embed it as a self-contained
> > .syso file in which case you can avoid the extra DLL.
> Would this require the AccessKit Windows library to be compilable with a 
> GNU toolchain (meaning mingw-w64)? Or can the Go linker handle .obj 
> files produced by MSVC?
>

I don't think the Go linker can handle MSVC object files. However,
because AccessKit is meant to be used on other platforms, won't you need
gcc/clang support anyway?

Re: Gio and accessibility 7 days ago

From Elias Naur to ~eliasnaur/gio

On Mon Jun 14, 2021 at 18:14 CEST, Matt Campbell wrote:
> One more question for now: The Gio architecture document briefly 
> mentions that Gio has a "zero allocation" design. How stringent is this 
> requirement? Have you written more about it somewhere else?
>

Zero allocation design refers to the performance-critical FrameEvent
processing, which needs to comfortably hit 60+ Hz without garbage
collector hitches. That's the reason ops (op.InvalidateOp,
paint.PaintOp etc.) are encoded to a byte slice when added to gtx.Ops.

Allocating in AccessKit or in the Gio glue is fine as long as it's
amortized and not per frame.

Re: Gio and accessibility 7 days ago

From Elias Naur to ~eliasnaur/gio

On Mon Jun 14, 2021 at 17:06 CEST, Matt Campbell wrote:
> On 6/14/2021 9:45 AM, Elias Naur wrote:
>
> > Well, beggars can't be choosers :) More seriously, I think your plan
> > sounds great, and support for multiple toolkits will make your project
> > better and spread the maintenance burden. In fact, the issues in
> > accessibility support sound similar to what we face to implement support
> > for complex text scripts. We have the #ui-text-rendering Gopher Slack
> > channel and the beginning of a shared library at
> > https://github.com/go-text/shaping. I encourage you to initiate
> > something similar for accessibility and bring in the Fyne people.
> Thanks. To be clear though, I want my AccessKit project to be 
> language-independent, not just for Go. That's why I propose using a 
> Protobuf schema as the glue between the cross-platform toolkit code (Gio 

Re: Gio and accessibility 7 days ago

From Elias Naur to ~eliasnaur/gio

On Mon Jun 14, 2021 at 16:15 CEST, Matt Campbell wrote:
> On 6/14/2021 7:56 AM, Elias Naur wrote:
>
> > I think you have a better chance arriving at a design that fits the 
> > platforms
> > APIs for acccessibility. I'm happy to review what you come up with.
> Agreed.
>
> One problem we're going to encounter with implementing platform 
> accessibility APIs is that it will require much more cross-language glue 
> than you have had to implement so far. The Windows UI Automation API 
> requires you to not merely consume COM interfaces, but implement them. 
> Likewise for Cocoa with Objective-C, and Android with Java. I'm guessing 
> that doing all of this in a Go project would be quite tedious.

Re: Gio and accessibility 7 days ago

From Elias Naur to ~eliasnaur/gio

On Mon Jun 14, 2021 at 14:08 CEST, Matt Campbell wrote:
> Elias, you mentioned the issue with Tailscale for Android. I mistakenly 
> opened a duplicate of that issue yesterday, and on my issue, someone 
> mentioned that they were planning a UI rewrite, likely using native 
> widgets [1]. Do you know anything about this? Of course, accessibility 
> in Gio is important for more than just Tailscale.
>

This is the first I've heard of it :) I recently resigned my role as
maintainer of the Tailscale Android app, I suppose they chose to rewrite
it rather than keep using Gio.

> Would you rather design Gio's accessibility support yourself and have me 
> review it, or vice versa?

Re: Support for "CustomEvents" and "Addons" 7 days ago

From Elias Naur to ~eliasnaur/gio

On Tue Jun 8, 2021 at 18:55 CEST, Lucas Rodrigues wrote:
> Hi, 
>
> I would like to discuss something related to "Custom Events" and a 
> proper way to register "Addon" (or external packages that integrates 
> with Gio). 
>
> First, I would like to explain what I see as a issue, in that case two 
> problems: 
>
> 1. The "Gio" vs "non-Gio" packages and Ops: 
>
> Currently, we can use `key.InputOp` in order to receive information about 
> keyboard, or even `clipboard.WriteOp` to write something in the clipboard. 

Re: Gio and accessibility 7 days ago

From Elias Naur to ~eliasnaur/gio

On Sun Jun 13, 2021 at 20:23 CEST, Chris Waldon wrote:
> Hi Matt!
>
> > Hi Elias,
>
> I'm (obviously) not Elias, but...
>
> > I wonder if you have any plans to implement accessibility in Gio in the
> > near future. I'll be happy to help, especially with the Windows
> > implementation (BTW, I'm no longer at Microsoft). But this will require
> > some design work, which you'll obviously need to at least approve. I
> > like your earlier idea of emitting accessibility-specific operations
> > during widget layout.
>

Re: Video 21 days ago

From Elias Naur to ~eliasnaur/gio

On Mon May 31, 2021 at 11:12, Chris Waldon wrote:
> Hi David,
>
> > I'd like to display a video stream from an IP camera on the screen
> > (MJPEG or H.264). Can gio do this?
>
> Yes, Gio is able to render frames of video from MJPEG. Essentially,
> you just decode each frame on the CPU as an image.Image, then create
> an op.ImageOp of it and render those with widget.Image.
>
> I actually used to do this in my trideo project, though I switched to
> rendering triangles instead of image.Image.
> https://git.sr.ht/~whereswaldon/trideo
>