~inkeliz

Recent activity

Re: Help iterating and building from list 20 days ago

From Lucas Rodrigues to ~eliasnaur/gio

Hi,

I think you need to replace:

```
 for _, v := range Nbox { 
```

By:

```
for _, v := range Nbox { 
v := v
```

Re: keyboard on sailfish OS. 26 days ago

From Lucas Rodrigues to ~eliasnaur/gio

Maybe it's related to https://todo.sr.ht/~eliasnaur/gio/116, https://todo.sr.ht/~eliasnaur/gio/201 and https://todo.sr.ht/~eliasnaur/gio/9.

I never use Sailfish OS, and I don't know what it is. Currently, Gio doesn't support a "smart keyboard". So it will not work if your on-screen keyboard has "word prediction", "grammar correction" or "autocomplete".... Those functionalities (and the keyboard that have those features) uses another type of input engine, which Gio doesn't support.

Generally speaking, Gio tries to disable those features at all costs to make them compatible. However, maybe it's not enough for Sailfish OS, or Sailfish OS doesn't handle the input method used by Gio (which is the "dumb mode"). 

Please, notice if the keyboard has the "smart features" (such as "grammar correction...). Also, if you can, try to change the InputHint (on the widget.Editor) to `key.HintNumeric` to see if it works on that mode (at least if you can type numbers).

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Sun, Jul 4, 2021, at 3:20 PM, Thomas Bellembois wrote:
> Hello Gio community,

Re: pass-through pointer.Press events, or, how to overlay pointer handlers a month ago

From Lucas Rodrigues to ~eliasnaur/gio

Unfurtunelly, it's not open source, but I can share some code. 

What happens is that your pointer.Area is overlaying the Editor, so 
imagine like a Z-Index: 

Z-Index 1: Editor 
Z-Index 2: LongPress (Your custom pointer.Area) 

By default, only one pointer.Area receives the events, which is the last 
one. The pointer.PassOp allows passing the events to the 
next one, in that case: "Z-Index 1". Now, both can receive events.

-------------

Re: pass-through pointer.Press events, or, how to overlay pointer handlers a month ago

From Lucas Rodrigues to ~eliasnaur/gio

I have similar feature on my app. A long-press open a small dialog to "copy" and "paste", into some Editor. You need to use `pointer.PassOp{Pass: true}.Add(gtx.Ops)`.

I think you should do something like:

paste := NewLongPress(a.w.Invalidate, 800*time.Millisecond)

dims := material.Editor(th, c.compose, "").Layout(gtx)

state := op.Save(gtx.Ops)
pointer.PassOp{Pass: true}.Add(gtx.Ops) // << Here
pointer.Rect(image.Rectangle{Max: dims.Size}).Add(gtx.Ops)
paste.Add(gtx.Ops)
state.Load()

Re: Support for "CustomEvents" and "Addons" a month ago

From Lucas Rodrigues to ~eliasnaur/gio

My point against `var hap haptic.State`, `hap.UpdateView(e)`, 
`hap.Frame(gtx.Ops)` (...) is that require more setup than any native 
Gio Op. You don't use `key.UpdateView(e)`, `key.Frame(gtx.Ops)` (...). 

The idea behind the `init()` was based on `image/*` and `hash/*`, for 
instance: 

The image/png register it using `init`: 
https://github.com/golang/go/blob/2ebe77a2fda1ee9ff6fd9a3e08933ad1ebaea0 
39/src/image/png/reader.go#L1033-L1035 The x/crypto/blake2 register 
itself using `init`: 
https://cs.opensource.google/go/x/crypto/+/c07d793c:blake2b/register.go 

In the case of Gio: the addon (haptic, for instance), use the `Register` to obtain

Support for "CustomEvents" and "Addons" a month ago

From Lucas Rodrigues to ~eliasnaur/gio

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. 
That is nice and it is very usufull, since without it we need to travel

Re: combine textures in GPU ? a month ago

From Lucas Rodrigues to ~eliasnaur/gio

Hi,

I think you need to use `op.Save` and then `op.Load`, something like:

```
case system.FrameEvent:
 
ops.Reset()

stack := op.Save(gtx.Ops)
dstop.Add(ops)
paint.PaintOp{}.Add(ops)
stack.Load()

Re: Styled Label 2 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Hi,

I didn't test it yet, but sounds really good. :) 

At first, I think it might need some "meta-information", to store the information about `URL` and so on. Suppose something like:

```
"That is an example, but [url=https://site.com]I think you get the idea[/url]."
```

The `*TextObject` must include the `URL` (`https://site.com`) somehow. In the end, we can do something like:

```
if t := textObjects.Clicked(); t != nil {

Re: buillding on android (on windows) 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

That is what I'm using to build Android apps that runs on Android 5 up to Android 11:

Java SDK 11 (the "javac.exe").
Android 10 (Q) SDK (API Level 29). (the "SDK Plataforms" on Android Studio").
NDK 21. 

When build, simple run: `gogio -target android`.
You can build with the lastest SDK, even targetting lower SDK. What defines the
"unsupported SDK" is the "-minsdk". 

So, you can use a older NDK with newer SDK, even targetting other SDK (-minsdk 21).

Re: buillding on android (on windows) 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

> Maybe you are misinformed. I'm pretty sure I can't run an SDK 25 app on SDK 24 based device.
I have encountered this problem numerous times in the past because I am so often with 2
years old hardware. 'this is not compatible with your device'. Because of SDK version.

Sure. But I'm talking the opposite. You can set the SDK to 26, but using the NDK 21. 
Notice the "SDK" and "NDK". So, you can use the NDK 21 (which works on Gio) and set
the `-minsdk` to 26. That will show "this is not compatible with your device" on 
Android 7 (and lower), but will work on Android 8 (and higher). 

I did a test right now... Run: `go run gio.org/cmd/gogio -minsdk 26 -target android .`
That will compile on Windows (using Java 11 and NDK 21). It will NOT run on Android 7 (
and lower). But will run on Android 8 (and higher). 

That seems to achieve what you want: preventing < Android 8 to install your app.