[xproto] Xmd: Add FP3232 to the core proto

Peter Hutterer peter.hutterer at who-t.net
Sun Oct 28 22:45:09 PDT 2012


On Fri, Oct 26, 2012 at 08:42:21AM -0400, Jasper St. Pierre wrote:
> On Fri, Oct 26, 2012 at 1:32 AM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > On Thu, Oct 25, 2012 at 06:46:18PM -0400, Jasper St. Pierre wrote:
> >> From: "Jasper St. Pierre" <jstpierre at mecheye.net>
> >>
> >> So that these can be shared between other extensions besides
> >> XInput2.
> >
> > I don't have a problem with this per se, other than that stdint.h may be an
> > issue for some? (but really, XI2 needs stdint, it's mandatory and no-one
> > has complained loud enough about that yet)
> >
> > What I do wonder though here is the wider context. From the IRC discussion
> > this is for the BarrierNotify events which are part of XFixes. That event
> > should use the same coordinate resolution as XI2 events.
> 
> Technically, because dix gives us back ints, I just fill integral in,
> and leave frac as 0. At some point, if we have this sort of
> resolution, it would be useful, so I left it this way for now.
> 
> > Is there any reason we can't require XI2proto.h from xfixes to get these
> > defines?
> 
> Simply because I didn't know if it was allowed because of politics. I
> asked a little while in the IRC channel and somebody suggested to just
> move it into Xmd.h.

Again, this was partially answered on IRC but to keep it for the archives:
there is no real politics in extension development, it's a relatively
unstructured process.

Importing XI2.h from xfixes does not seem to be a political issue here.

Cheers,
   Peter

> >> ---
> >>  Xmd.h | 9 +++++++++
> >>  1 file changed, 9 insertions(+)
> >>
> >> diff --git a/Xmd.h b/Xmd.h
> >> index 96cc08f..6947fcc 100644
> >> --- a/Xmd.h
> >> +++ b/Xmd.h
> >> @@ -44,6 +44,9 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
> >>  SOFTWARE.
> >>
> >>  ******************************************************************/
> >> +
> >> +#include <stdint.h>
> >> +
> >>  #ifndef XMD_H
> >>  # define XMD_H 1
> >>  /*
> >> @@ -144,6 +147,12 @@ typedef CARD16           BITS16;
> >>  typedef CARD8                BYTE;
> >>  typedef CARD8                BOOL;
> >>
> >> +typedef int32_t FP1616;
> >> +typedef struct _FP3232 {
> >> +    int32_t     integral;
> >> +    uint32_t    frac;
> >> +} FP3232;
> >> +
> >>  /*
> >>   * definitions for sign-extending bitfields on 64-bit architectures
> >>   */
> >> --
> >> 1.7.12.1
> >>
> >> _______________________________________________


More information about the xorg-devel mailing list