Generic Event extension RFC

Daniel Stone daniel at fooishbar.org
Tue Feb 20 15:43:10 PST 2007


On Wed, Feb 21, 2007 at 09:59:49AM +1030, Peter Hutterer wrote:
> X is running out of event codes, with only 15 or so left for future  
> extensions. (Thanks for keithp for pointing that out at the XDC2007)
> I didn't want to get beaten up for using up the last event code for  
> MPX, so I sat down the last few days and wrote the Generic Event  
> extension.
> 
> The Generic Event extension is a template for future extensions to re- 
> use a single opcode. GE doesn't actually do much but provide headers  
> and a few API calls. The majority of the work is still to be done in  
> the extensions.
> 
> GE defines a single event, to be used by all extensions.
> 
> GenericEvent
>     BYTE    type	/* always GenericEvent type */
>     CARD8   extension  /* extension specific opcode */
>     CARD16  sequenceNumber
>     CARD8   evType; /* real event type */
>     CARD8   pad0;

Go nuts.  Use a CARD16.  Otherwise, looks good to me.

(One thing you might consider, if you're pushing all this into a single
 library which will be demarshalling anyway, is variable-sized events.
 You'll be a hero if you do that, seriously.)

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20070221/c41b5ba5/attachment.pgp>


More information about the xorg mailing list