Re: Referencing enums in other protocols

2018-05-01 Thread Auke Booij
On Mon, Apr 23, 2018 at 9:08 AM, Pekka Paalanen wrote: > On Mon, 23 Apr 2018 03:42:31 -0400 > Simon Ser wrote: > >> Hi all, >> >> While writing a protocol, I've been trying to reference symbols from another >> protocol. While it seems to work fine for

Re: Skylane - implementation of Wayland in Rust

2017-05-05 Thread Auke Booij
On 5 May 2017 at 09:53, Pekka Paalanen wrote: > What could you do then, if you don't want to wrap the C implementation > of libwayland... > > Borrowing the idea from Daniel Stone from whom I heard it first, the > only other option is to reimplement libwayland *including* its

[RFC wayland] move away from C

2017-04-01 Thread Auke Booij
The C programming language was developed in the early '70s. It was always considered a proof of concept, as it was clear to everyone involved that any serious programming lanugage should have a garbage collector. Indeed, Dennis Ritchie is widely known to have said: "What I would really like is to

Re: array and enum attributes (Was: [PATCH] xdg-shell: add draw states for xdg_surface)

2016-06-02 Thread Auke Booij
On 1 June 2016 at 20:16, Yong Bakos wrote: > On May 30, 2016, at 3:54 AM, Pekka Paalanen wrote: >> >> On Sat, 28 May 2016 08:39:59 -0500 >> Yong Bakos wrote: >> >>> Hi Mike, >>> Regarding the combination of type="array"

Re: [PATCH wayland v3] protocol: add support for cross-interface enum attributes

2016-05-03 Thread Auke Booij
On 3 May 2016 at 13:04, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Sat, 5 Dec 2015 12:39:12 +0000 > Auke Booij <a...@tulcod.com> wrote: > >> The enum attribute, for which scanner support was introduced in >> 1771299, can be used to link message arguments

Re: Recursive dispatch (Re: [PATCH v2] server: Calculate remaining data size after a closure is processed)

2016-02-03 Thread Auke Booij
On 3 February 2016 at 09:34, Jonas Ådahl wrote: > On Wed, Feb 03, 2016 at 11:14:54AM +0200, Pekka Paalanen wrote: >> On Wed, 3 Feb 2016 09:56:20 +0900 >> "Jaeyoon Jung" wrote: >> >> > > -Original Message- >> > > From: Derek Foreman

Re: [PATCH wayland v2] client: Fully flush during blocking dispatch

2016-01-14 Thread Auke Booij
On 12 January 2016 at 04:31, Jonas Ådahl wrote: > wl_display_flush() may fail with EAGAIN which means that not all data > waiting in the buffer has been flushed. We later block until there + is > data to read, which could mean that we block on input from the > compositor

Re: [PATCH wayland v3] protocol: add support for cross-interface enum attributes

2015-12-14 Thread Auke Booij
Bill, any chance you could review this? Or would you prefer it if this were based on your patch (which I do still support)? On 5 December 2015 at 13:39, Auke Booij <a...@tulcod.com> wrote: > The enum attribute, for which scanner support was introduced in > 1771299, can be used to

Re: RFC: idle protocol

2015-12-09 Thread Auke Booij
On 9 December 2015 at 07:43, Peter Hutterer wrote: > On Wed, Dec 09, 2015 at 08:17:40AM +0100, Martin Graesslin wrote: >> On Wednesday, December 9, 2015 4:19:12 PM CET Peter Hutterer wrote: >> > On Tue, Dec 08, 2015 at 02:12:01PM +0100, Martin Graesslin wrote: >> > > Hi

[PATCH wayland v3] protocol: add support for cross-interface enum attributes

2015-12-05 Thread Auke Booij
in the documentation - fix whitespace in scanner.c - minor code fixup to return early and avoid casts in scanner.c Changes since v1: - several implementation bugs fixed Signed-off-by: Auke Booij <a...@tulcod.com> --- doc/publican/protocol-to-docbook.xsl | 19 +-- protocol/wayla

Re: [PATCH v2 wayland] protocol: add support for cross-interface enum attributes

2015-12-02 Thread Auke Booij
st the cross-object ones. > > On Sun, Nov 29, 2015 at 5:54 AM, Auke Booij <a...@tulcod.com> wrote: >> >> The enum attribute, for which scanner support was introduced in >> 1771299, can be used to link message arguments to s. However, >> some arguments

[PATCH v2 wayland] protocol: add support for cross-interface enum attributes

2015-11-29 Thread Auke Booij
-by: Auke Booij <a...@tulcod.com> --- doc/publican/protocol-to-docbook.xsl | 17 +-- protocol/wayland.xml | 4 +-- src/scanner.c| 59 +++- 3 files changed, 61 insertions(+), 19 deletions(-) diff --git a/doc/publican/pr

Re: [PATCH wayland] Add support for cross-interface enum attributes

2015-11-29 Thread Auke Booij
On 29 November 2015 at 01:27, Auke Booij <a...@tulcod.com> wrote: > Signed-off-by: Auke Booij <a...@tulcod.com> I realized this is the wrong search algorithm. I will fix it later today. ___ wayland-devel mailing list wayland-devel@lists.

[PATCH wayland] Add support for cross-interface enum attributes

2015-11-28 Thread Auke Booij
Signed-off-by: Auke Booij <a...@tulcod.com> --- doc/publican/protocol-to-docbook.xsl | 17 +--- protocol/wayland.xml | 4 +-- src/scanner.c| 51 +++- 3 files changed, 55 insertions(+), 17 deletions(-) diff

Re: [RFC] Declare enumeration wl_output.transform as bitfield.

2015-11-25 Thread Auke Booij
On 25 November 2015 at 13:43, Daniel Stone wrote: > Hi, > > On 25 November 2015 at 12:08, Nils Christopher Brause > wrote: >> 3. The API change is negligible. Every request that accepts this bitfield >>expects a number in the range of zero to

Re: Changing wl_output.transform type to unsigned?

2015-11-24 Thread Auke Booij
On 24 November 2015 at 12:41, Nils Chr. Brause <nilschrbra...@gmail.com> wrote: > On Mon, Nov 16, 2015 at 11:46 AM, Pekka Paalanen <ppaala...@gmail.com> wrote: >> On Sun, 15 Nov 2015 22:17:38 +0100 >> "Nils Chr. Brause" <nilschrbra...@gmail.com> wrote: &

Re: [PATCH v5 wayland] protocol: add wl_pointer.frame, axis_source, axis_stop, and axis_discrete

2015-11-16 Thread Auke Booij
On 28 October 2015 at 05:34, Peter Hutterer wrote: > The frame event groups separate pointer events together. The primary use-case > for this at the moment is diagonal scrolling - a vertical/horizontal scroll > event can be grouped together to calculate the correct

Re: [PATCH] Declare enumeration wl_output.transform as bitfield.

2015-11-15 Thread Auke Booij
On 9 November 2015 at 18:17, Bill Spitzak wrote: > Making the transform into a bitfield allows bitfield tests for useful facts: > it can see if it is a mirror image by testing the flip bit, and check for > transposition of the axes by checking the 90 degree bit. I believe this

Re: [PATCH wayland-protocols] Add the tablet protocol

2015-11-15 Thread Auke Booij
On 6 November 2015 at 04:24, Peter Hutterer wrote: > Signed-off-by: Peter Hutterer > --- > This is the revamped version of the tablet protocol for graphics tablets > (e.g. Wacom tablets). Too many changes from the last version (a year ago or >

Re: [PATCH] Declare enumeration wl_output.transform as bitfield.

2015-11-09 Thread Auke Booij
On 9 November 2015 at 14:39, Auke Booij <a...@tulcod.com> wrote: > and it was a mistake Sorry, let me retract this - that was maybe a bit harsh, since I don't know the exact history. ___ wayland-devel mailing list wayland-devel@lists.freede

Re: [PATCH] Declare enumeration wl_output.transform as bitfield.

2015-11-09 Thread Auke Booij
gt; wrote: >> >>> Hi, >>> >>> On Fri, Nov 6, 2015 at 3:48 PM, Auke Booij <a...@tulcod.com> wrote: >>> > On 6 November 2015 at 13:03, Nils Christopher Brause >>> > <nilschrbra...@gmail.com> wrote: >>> >> The enum

Re: [PATCH wayland v2] Remove protocol/wayland.dtd

2015-11-09 Thread Auke Booij
On 9 November 2015 at 11:41, Pekka Paalanen wrote: > I believe comments are enough. I suppose the DTD error message from > wayland-scanner could refer to built-in DTD, that would be a small > change and make it obvious. Just add one word in the warning message. Okay, your

Re: [PATCH wayland v2] Remove protocol/wayland.dtd

2015-11-09 Thread Auke Booij
On 9 November 2015 at 10:54, Peter Hutterer <peter.hutte...@who-t.net> wrote: > On 9/11/2015 20:39 , Auke Booij wrote: >> >> On 6 November 2015 at 11:26, Pekka Paalanen <ppaala...@gmail.com> wrote: >>> >>> On Fri, 6 Nov 2015 09:47:03 +1000 >&g

Re: [PATCH wayland v2] Remove protocol/wayland.dtd

2015-11-09 Thread Auke Booij
On 6 November 2015 at 11:26, Pekka Paalanen wrote: > On Fri, 6 Nov 2015 09:47:03 +1000 > Peter Hutterer wrote: > >> On Thu, Nov 05, 2015 at 04:58:09PM +0200, Pekka Paalanen wrote: >> > On Mon, 19 Oct 2015 11:30:47 +1000 >> > Peter Hutterer

Re: [PATCH wayland 1/3] Revert "Remove protocol/wayland.dtd"

2015-11-09 Thread Auke Booij
On 9 November 2015 at 04:14, Peter Hutterer wrote: > This reverts commit 06fb8bd371403d43bc192577abd6b0a0c8b29c59. > > Having a DTD hooked up gives an indication of what we expect the protocol to > be, which is a clearer documentation than the current "whatever scanner.c

Re: [PATCH 2.5/3 wayland] protocol: add the new bitfields to the dtd

2015-11-09 Thread Auke Booij
On 9 November 2015 at 23:34, Peter Hutterer <peter.hutte...@who-t.net> wrote: > See 851614fa78862499e016c5718e730fefbb8e3b73 > > Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net> Reviewed-by: Auke Booij <a...@tulcod.com> __

Re: [PATCH] Declare enumeration wl_output.transform as bitfield.

2015-11-06 Thread Auke Booij
On 6 November 2015 at 13:03, Nils Christopher Brause wrote: > The enumeration wl_output.transform is clearly a bitfield. > The definition of a bitfield is that each bit has a distinct > meaning. This is clearly the case in the enumeration > wl_output.transform: > > - bit

Re: [PATCH] compositor: Disallow negative geometries in backend output configs

2015-11-06 Thread Auke Booij
On 24 October 2015 at 08:23, Jasper St. Pierre wrote: > I'm struggling to understand the motivation for this patch. > > krh has always said that you need to think of uint and int as two > entirely separate types -- mixing both in math will likely screw up. > You can see

Re: [PATCH] doc: Use enum argument type to make links in protocol documentation

2015-11-06 Thread Auke Booij
On 6 November 2015 at 16:27, <spit...@gmail.com> wrote: > From: Bill Spitzak <spit...@gmail.com> This is good preparation for when we'll get cross-interface enums. Reviewed-by: Auke Booij <a...@tulcod.com> ___ wayland-devel maili

Re: [PATCH wayland v2] Remove protocol/wayland.dtd

2015-11-05 Thread Auke Booij
On 5 November 2015 at 14:58, Pekka Paalanen wrote: > On Mon, 19 Oct 2015 11:30:47 +1000 > Peter Hutterer wrote: > >> On Fri, Oct 16, 2015 at 11:42:21AM +0300, Pekka Paalanen wrote: >> > On Fri, 16 Oct 2015 12:29:11 +1000 >> > Peter Hutterer

[PATCH wayland v3 3/4] scanner: enforce correct argument type for enums

2015-10-26 Thread Auke Booij
allow_null check - Switch to using bool - Clearer message on errorous input - Minor formatting fix Signed-off-by: Auke Booij <a...@tulcod.com> --- src/scanner.c | 69 +++ 1 file changed, 69 insertions(+) diff --git a/src/scanner.c

Re: [PATCH wayland v3 3/4] scanner: enforce correct argument type for enums

2015-10-26 Thread Auke Booij
On 26 October 2015 at 18:07, Bryce Harrington <br...@osg.samsung.com> wrote: > On Sat, Oct 24, 2015 at 12:07:49PM +0100, Auke Booij wrote: >> The scanner now checks whether arguments that have an associated >> have the right type. >> An argument with an enum attribute

[PATCH wayland v3 0/4] Enum and bitfield XML attributes

2015-10-24 Thread Auke Booij
ethod" on wl_shell_surface::set_fullscreen::method Auke Booij (4): doc: document the enum and bitfield attributes protocol: specify enum and bitfield attributes scanner: enforce correct argument type for enums doc: output enum and bitfield attributes in the documentation doc/publica

[PATCH wayland v3 1/4] doc: document the enum and bitfield attributes

2015-10-24 Thread Auke Booij
Introduce the enum and bitfield attributes, which allow you to refer to the enum you are expecting in an argument, and specify which enums are to be thought of as bitfields. Signed-off-by: Auke Booij <a...@tulcod.com> --- doc/publican/sources/Protocol.xm

[PATCH wayland v3 3/4] scanner: enforce correct argument type for enums

2015-10-24 Thread Auke Booij
The scanner now checks whether arguments that have an associated have the right type. An argument with an enum attribute must be of type int or uint, and if the with that name has the bitfield attribute set to true, then the argument must be of type uint. Signed-off-by: Auke Booij

[PATCH wayland v3 2/4] protocol: specify enum and bitfield attributes

2015-10-24 Thread Auke Booij
Signed-off-by: Auke Booij <a...@tulcod.com> --- protocol/wayland.xml | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 59819e9..9c22d45 100644 --- a/protocol/wayland.xml +++ b/pr

Re: [PATCH v2 1/4] doc: document the enum and bitfield attributes

2015-10-22 Thread Auke Booij
t; >>> On Mon, Oct 19, 2015 at 11:21:23PM +0100, Auke Booij wrote: >>>> >>>> Introduce the enum and bitfield attributes, which allow you to refer to >>>> the enum >>>> you are expecting in an argument, and specify which enums are to be >

Re: [PATCH v2 3/4] scanner: enforce correct argument type for enums

2015-10-22 Thread Auke Booij
On 21 October 2015 at 19:13, Bryce Harrington <br...@osg.samsung.com> wrote: > On Wed, Oct 21, 2015 at 02:23:53PM +0100, Auke Booij wrote: >> On 20 October 2015 at 08:57, Bryce Harrington <br...@osg.samsung.com> wrote: >> > On Mon, Oct 19, 2015 at 11:21:25PM +0100,

[PATCH] doc: document the enum and bitfield attributes

2015-10-22 Thread Auke Booij
Introduce the enum and bitfield attributes, which allow you to refer to the enum you are expecting in an argument, and specify which enums are to be thought of as bitfields. Signed-off-by: Auke Booij <a...@tulcod.com> --- doc/publican/sources/Protocol.xm

Re: [PATCH v2 1/4] doc: document the enum and bitfield attributes

2015-10-21 Thread Auke Booij
On 21 October 2015 at 13:13, Nils Chr. Brause <nilschrbra...@gmail.com> wrote: > Hi, > > On Tue, Oct 20, 2015 at 9:38 AM, Bryce Harrington <br...@osg.samsung.com> > wrote: >> On Tue, Oct 20, 2015 at 12:01:14AM -0700, Bryce Harrington wrote: >>> On Mon, Oct 1

Re: [PATCH v2 2/4] protocol: specify enum and bitfield attributes

2015-10-21 Thread Auke Booij
On 21 October 2015 at 18:49, Nils Chr. Brause wrote: > You are missing bitfield="true" for wl_shell_surface::resize and > wl_output::transform. Scanning the weston source code, it seems you would have been right about wl_shell_surface had it not been replaced by

Re: [PATCH v2 3/4] scanner: enforce correct argument type for enums

2015-10-21 Thread Auke Booij
On 20 October 2015 at 08:57, Bryce Harrington <br...@osg.samsung.com> wrote: > On Mon, Oct 19, 2015 at 11:21:25PM +0100, Auke Booij wrote: >> Signed-off-by: Auke Booij <a...@tulcod.com> >> --- >> src/scanner.c | 70 >> +++

Re: [PATCH v2 0/4] Enum and bitfield XML attributes

2015-10-20 Thread Auke Booij
On 19 October 2015 at 23:21, Auke Booij <a...@tulcod.com> wrote: > There has been plenty of discussion regarding the introduction of new XML > attributes. This series of patches improves on my earlier attempt to find > common ground in this. > > Major exclusio

[PATCH v2 1/4] doc: document the enum and bitfield attributes

2015-10-19 Thread Auke Booij
Introduce the enum and bitfield attributes, which allow you to refer to the enum you are expecting in an argument, and specify which enums are to be thought of as bitfields. Signed-off-by: Auke Booij <a...@tulcod.com> --- doc/publican/sources/Protocol.xm

[PATCH v2 0/4] Enum and bitfield XML attributes

2015-10-19 Thread Auke Booij
values might be listed, others might not be, and some might only be legal sometimes. New values may be added (but not changed or removed) to protocol specifications without introducing any compatibility issues. Auke Booij (4): doc: document the enum and bitfield attributes protocol: specify enum

[PATCH v2 2/4] protocol: specify enum and bitfield attributes

2015-10-19 Thread Auke Booij
Signed-off-by: Auke Booij <a...@tulcod.com> --- protocol/wayland.xml | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 59819e9..a3e6900 100644 --- a/protocol/wayland.xml +++ b/pr

[PATCH v2 3/4] scanner: enforce correct argument type for enums

2015-10-19 Thread Auke Booij
The scanner now checks whether arguments that have an associated have the right type. An argument with an enum attribute must be of type int or uint, and if the with that name has the bitfield attribute set to true, then the argument must be of type uint. Signed-off-by: Auke Booij

Re: Enums, bitfields and wl_arrays

2015-10-15 Thread Auke Booij
ot a problem in any language that understands the concept of a variable. On 13 October 2015 at 23:15, Bryce Harrington <br...@osg.samsung.com> wrote: > On Tue, Oct 13, 2015 at 08:27:58PM +0100, Auke Booij wrote: >> But if this is indeed the issue you are discussing, then this mus

Re: Enums, bitfields and wl_arrays

2015-10-13 Thread Auke Booij
On 13 October 2015 at 16:19, Solerman Kaplon wrote: > Em 13-10-2015 11:35, Nils Chr. Brause escreveu: >> >> In C++ the order doesn't matter either, since each entry has a defined >> value. I wonder why this is different in Java? > > > Java Enums doesn't have "value". It just a

Re: [PATCH wayland v2] Remove protocol/wayland.dtd

2015-10-09 Thread Auke Booij
Yeah, that was a pretty embarrassing mistake by me, for such a simple patch. Thanks to Bryce for catching it. On 8 October 2015 at 15:05, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Thu, 8 Oct 2015 14:35:34 +0100 > Auke Booij <a...@tulcod.com> wrote: > >>

Re: [PATCH wayland 0/3] "enum" and "bitfield" attributes for protocol XML files

2015-10-09 Thread Auke Booij
On 5 October 2015 at 14:56, Pekka Paalanen <ppaala...@gmail.com> wrote: > On Fri, 26 Jun 2015 16:02:44 +0200 > Auke Booij <a...@tulcod.com> wrote: > >> As per last April/May's "enum" attribute discussion, these patches >> introduce two new attribu

[PATCH wayland v2] Remove protocol/wayland.dtd

2015-10-08 Thread Auke Booij
The wayland scanner defines the protocol. The DTD specification is not used. --- Makefile.am | 4 ++-- protocol/wayland.dtd | 29 - 2 files changed, 2 insertions(+), 31 deletions(-) delete mode 100644 protocol/wayland.dtd diff --git a/Makefile.am

[PATCH] Remove protocol/wayland.dtd

2015-10-06 Thread Auke Booij
The wayland scanner defines the protocol. The DTD specification is not used. --- protocol/wayland.dtd | 29 - 1 file changed, 29 deletions(-) delete mode 100644 protocol/wayland.dtd diff --git a/protocol/wayland.dtd b/protocol/wayland.dtd deleted file mode 100644

Re: Enums, bitfields and wl_arrays

2015-10-04 Thread Auke Booij
less bugs. It is the "dotless" version that is already supported by my patches. The dotted one requires new code. So apart from a single if statement, this is not really more work. But I guess this is getting into bikeshedding terrain. > Auke Booij wrote: >> The enum and bitfie

Re: Enums, bitfields and wl_arrays

2015-10-02 Thread Auke Booij
On 2 October 2015 at 13:12, Auke Booij <a...@tulcod.com> wrote: > The wayland protocol currently does not specify the enum attribute, > and I see no way how to write an API whose entire purpose is to > *break* when you erroneously mix up enum attribute data, without > breakin

Re: Enums, bitfields and wl_arrays

2015-10-02 Thread Auke Booij
On 1 October 2015 at 20:00, Nils Chr. Brause wrote: >> Since Auke's patchset proposalis the most recent, let's take that one as >> the candidate for landing. Gentlemen, I'd like to ask you to review >> these three patches [5,6,7] and either give your Reviewed-by's or

Re: Enums, bitfields and wl_arrays

2015-10-02 Thread Auke Booij
Thanks for bringing this up again, Bryce. On 1 October 2015 at 18:59, Jasper St. Pierre wrote: > We have a few constraints. First off, not all enums are closed. Some > are intentionally open, like xdg_shell.state. So we definitely need a > distinction between a closed enum

Re: Enums, bitfields and wl_arrays

2015-10-02 Thread Auke Booij
On 2 October 2015 at 12:31, Pekka Paalanen wrote: >> I know that several people have proposed patches on this - Bill, Nils >> and Auke at least. Since there's a definite need for this, and since >> agreement appears to be not far off, I would like to get this landed >> this

Re: Enums, bitfields and wl_arrays

2015-10-02 Thread Auke Booij
On 2 October 2015 at 14:49, Victor Berger <victor.ber...@m4x.org> wrote: > Le 2015-10-02 15:16, Pekka Paalanen a écrit : >> >> On Fri, 2 Oct 2015 13:50:42 +0100 >> Auke Booij <a...@tulcod.com> wrote: >>> >>> >>> [start] >>>

[PATCH wayland 3/3] doc: document new enum attributes and use such data in generated docs

2015-06-26 Thread Auke Booij
The newly introduced enum and bitfield protocol XML attributes give additional semantic information, which we can use when generating the documentation. --- doc/publican/protocol-to-docbook.xsl | 9 + doc/publican/sources/Protocol.xml| 23 +-- 2 files changed, 26

[PATCH wayland 2/3] scanner: enforce correct argument type for enums

2015-06-26 Thread Auke Booij
The scanner now checks whether arguments that have an associated enum have the right type. An argument with an enum attribute must be of type int or uint, and if the enum with that name has the bitfield attribute set to true, then the argument must be of type uint. --- src/scanner.c | 68

[PATCH wayland 0/3] enum and bitfield attributes for protocol XML files

2015-06-26 Thread Auke Booij
the protocol; however such usage will be considered nonstandard. Auke Booij (3): protocol: introduce the enum argument type scanner: enforce correct argument type for enums doc: document new enum attributes and use such data in generated docs doc/publican/protocol-to-docbook.xsl | 9

Re: [PATCH wayland 0/3] enum and bitfield attributes for protocol XML files

2015-06-26 Thread Auke Booij
On 26 June 2015 at 16:02, Auke Booij a...@tulcod.com wrote: Although arguments can only refer to enums in specific cases (see the scanner.c changes), this new protocol data should not break the C bindings. It is thinkable that other bindings *do* use the data in a way that breaks the protocol

[PATCH wayland 1/3] protocol: introduce the enum argument type

2015-06-26 Thread Auke Booij
This improvement to the protocol allows you to refer to the kind of enum you are expecting. It also introduces a distinction between enums that are bitfields, ie that can be OR'ed together. --- protocol/wayland.dtd | 2 ++ protocol/wayland.xml | 32 2 files

Re: [PATCH wayland 0/3] enum and bitfield attributes for protocol XML files

2015-06-26 Thread Auke Booij
to the documentation, and explains the attributes in chapter 4 (Wayland Protocol and Model of Operation). I forgot to add my Signed-off-by to these three patches, but it applies, so here you go: Signed-off-by: Auke Booij a...@tulcod.com ___ wayland-devel

Re: [PATCH wayland] Add enum attribute to arg elements

2015-05-02 Thread Auke Booij
On 19 April 2015 at 14:51, Jeroen Bollen jbin...@gmail.com wrote: Hello, It seems like this discussion died off. Currently there is no way to tell, from the Wayland XML specification whether an argument is a bitfield, or whether the argument takes an enum and what enum this is. I am

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-27 Thread Auke Booij
On 21 Apr 2015 09:18, Pekka Paalanen ppaala...@gmail.com wrote: Two things I came up with in the IRC discussion was that only arg types of int an uint are eligible for enums, and only uint for bitfields. I think wayland-scanner should enforce that. I just realised another aspect of this. Can a

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-27 Thread Auke Booij
On 27 April 2015 at 14:49, Pekka Paalanen ppaala...@gmail.com wrote: On Mon, 27 Apr 2015 13:26:39 +0200 Auke Booij a...@tulcod.com wrote: Apologies for my lack of responses, I have been abroad for a few days. On 23 April 2015 at 10:38, Pekka Paalanen ppaala...@gmail.com wrote

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-27 Thread Auke Booij
Apologies for my lack of responses, I have been abroad for a few days. On 23 April 2015 at 10:38, Pekka Paalanen ppaala...@gmail.com wrote: This is a sort of sanity condition on being a bitfield: it does not require all combinations are valid, but it also distinguishes it from a regular enum.

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-23 Thread Auke Booij
On 23 April 2015 at 08:38, Pekka Paalanen ppaala...@gmail.com wrote: On Wed, 22 Apr 2015 11:47:51 +0200 Auke Booij a...@tulcod.com wrote: On 22 April 2015 at 08:34, Pekka Paalanen ppaala...@gmail.com wrote: I also think this discussion is going off-topic. You wanted to add annotations

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-22 Thread Auke Booij
On 22 April 2015 at 08:34, Pekka Paalanen ppaala...@gmail.com wrote: I also think this discussion is going off-topic. You wanted to add annotations to the XML, so you could find out about enum and bitfield arguments, so let's keep to that. There is value in simplicity. How about this: Add

Re: [PATCH wayland] Add enum attribute to arg elements

2015-04-20 Thread Auke Booij
On 20 April 2015 at 09:03, Pekka Paalanen ppaala...@gmail.com wrote: Hi, Thanks for taking the time to respond. I'll address your issues one by one, but the overarching picture is that such typing information should and would not be interpreted by bindings as a promise, but rather as a hint.

Re: Protocol (scanner) proposals

2014-08-04 Thread Auke Booij
As discussed in IRC, nevermind this. I misread the header files. On 4 August 2014 01:12, Auke Booij a...@tulcod.com wrote: On 30 July 2014 20:27, Pekka Paalanen ppaala...@gmail.com wrote: Actually no. Binding writers are expected to write their own code generator for their language, like

Re: Protocol (scanner) proposals

2014-08-03 Thread Auke Booij
On 3 August 2014 09:08, Pekka Paalanen ppaala...@gmail.com wrote: It was, hidden in a small paragraph in the documentation... I have to apologize, you are right. I guess that this is convention in C? [...] Thanks for your perfectly clear explanation, that does clarify it a lot. Speaking

Re: Protocol (scanner) proposals

2014-08-03 Thread Auke Booij
On 30 July 2014 20:27, Pekka Paalanen ppaala...@gmail.com wrote: Actually no. Binding writers are expected to write their own code generator for their language, like wayland-scanner is for C. You are expected to not use the static inline generated C functions. All the static inline functions

Re: Protocol (scanner) proposals

2014-08-02 Thread Auke Booij
On 30 July 2014 20:27, Pekka Paalanen ppaala...@gmail.com wrote: Actually no. Binding writers are expected to write their own code generator for their language, like wayland-scanner is for C. You are expected to not use the static inline generated C functions. Okay, that makes some amount of

Protocol (scanner) proposals

2014-07-30 Thread Auke Booij
I am in the process of writing bindings to Wayland for Haskell, and have run into some issues which I think you may be interested in solving. They all relate to the protocol files. 1. Haskell is a very richly typed language, which means that if two integers have different meaning (e.g. length of

haskell libxkbcommon bindings (also: wayland bindings help request)

2013-08-13 Thread Auke Booij
I wrote haskell bindings for libxkbcommon. https://github.com/tulcod/haskell-xkbcommon I appreciate *any* feedback Announcement in haskell-cafe: http://www.haskell.org/pipermail/haskell-cafe/2013-August/108333.html Once I am happy with these bindings (I would currently call them alpha) I would