Commit Graph

21 Commits

Author SHA1 Message Date
Elias Naur 4475bf10bf app: disable darwin SIGPIPE workaround from Go 1.14
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 14:21:02 +02:00
Elias Naur 52fedc27a2 app/internal/xkb: extra XKB interface to internal package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-14 11:50:44 +02:00
Elias Naur e1de1ba591 io/pointer: delete Foremost priority
It wasn't used, and it's not clear that it is useful at all in its current
form. For example, a single control with multiple handler keys (say, one for
scrolling and one for clicking) will only receive priority Foremost for one of
them.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 16:31:23 +02:00
Elias Naur a937a76534 app: rename UpdateEvent to FrameEvent and add Frame field
While "DrawEvent" was too specific (op.Ops contains non-draw events),
"Update" is too vague: it's a common word, and could be misunderstood
to mean update parts of a window, not replace it.

"FrameEvent" is more specific, and is the usual way to refer to immediate
mode drawing.

While we're here, unexport Window.Update and add a Frame function to
FrameEvent, to emphasize that updating the window frame is only
appropriate during the handling of a FrameEvent.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur e49df512f6 app/internal/input: remove event delivery tracking field
The "hadEvents" field of handlerEvents is enough to track event
delivery.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur ff4fa71738 app/internal/input: really reset dropped handlers
First, let the handlers know they're dropping with a cancel event.

Second, reset the grab flag of dropped handlers.

Fixes issues when drag-scrolling and then clicking and another with two nested
drag gestures where the grab flag is kept for the second handler even after it
is pushed out by the first handler grabbing.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-12 14:01:46 +02:00
Elias Naur a184faa50e app: remove two remaining Wayland references from xkb
Noticed by ~db47h.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-11 15:31:15 +02:00
Elias Naur a76de40e9a app: another macOS < 10.12 build fix
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-08 17:30:31 +02:00
Elias Naur da5a83d2b2 app: fix more macOS 10.11 build warnings
Furthermore, add -Wno-deprecated-declarations; it is not worth it.

Updated gio#41

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-08 16:52:29 +02:00
Elias Naur c3a6ab1174 app: fix build on macOS < 10.12
Fixes gio#41

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-08 14:22:41 +02:00
Elias Naur 4864459291 app: rename WindowOption to Option, and leave out "With" from options
While we're here, replace Height and Width options with just a Size; the value
of separate width and height options is not clear to me.

Finally, leave out the wrapping struct from the Option type, the
function is enough.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-07 12:00:17 +02:00
Elias Naur 07a36d71d9 app: (linux,android) merge EGLNative* types and functions
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-02 23:21:48 +02:00
Elias Naur 2dcbf6fe3c app: confine the eglWindow indirection to the Wayland backend
Only the Wayland backend needs an wl_egl_window between the wl_surface
and EGL. Move code dealing with the indirection to Wayland specific
code.

Then, introduce the eglDriver interface instead of referencing the
native window type directly. This will help when multiple backends are
supported at runtime (e.g. Wayland+X11).

Finally, move the eglDriver implementation methods from GOOS-specific
code to separate EGL-specific files, allowing EGL types to be used
directly instead of unsafe.Pointer and uinptr.

The result is simpler generic EGL code, and easier path towards X11
support.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-02 23:07:54 +02:00
Elias Naur 32bda106e7 app: (android,ios) fix build
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-10-02 22:55:28 +02:00
Elias Naur 3784ece6dd all: rename package ui to unit
Package ui is now only about units except for the Config.Now method.
Remove Now and rename Config to Converter. Add layout.Config to
replace the old ui.Config.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur beaec661d2 op/paint: move paint package below the op package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur 8cf35a1f97 op: add package op for operations
Extract operation types from package ui into package op.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 16:55:47 +02:00
Elias Naur eba1b3a95f app,ui: move instructions link to package app documentation
We're about the split up and finally delete package ui. Move the
instructions link to the second most "top-level" package in Gio,
package app.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 15:25:22 +02:00
Elias Naur e7a97bf176 io/event: move event types from package ui to its own package
Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 15:18:08 +02:00
Elias Naur 7a259e68f7 io: give event packages a common prefix
Packages that provide support for external events such as pointer, key and
system are only the beginning. Future packages are expected for clipboard
access, drag and drop, gps positions and so on.

To keep the number of top-level packages under control, move such I/O packages
to the new `io` directory.

The `system` package name was the previous solution to keeping the number of
top-level packages under control: I named it `system` instead of the narrower
`profile` because I expected to put all the less common events into it, turning
`system` into a "package util" smell.

With `io`, package system can be renamed to `profile`.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 14:50:55 +02:00
Elias Naur 22cd88df9f all: rename the gioui.org/ui module to gioui.org
The "ui" is redundant and stutters.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2019-09-30 12:37:06 +02:00