diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-11 12:30:16 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-03-12 11:44:20 +1000 |
commit | c9ebfba4a128f0d0eda920a02af013b795adfec5 (patch) | |
tree | e23914dac1fb4d55d08127c8d16467e84f3bab9e | |
parent | 2339bc5b0eea89e676ac58a38ac5eb6a8ae6e6f9 (diff) |
Define FP1616 as one int16_t, one uint16_t.
-rw-r--r-- | XI2proto.h | 8 | ||||
-rw-r--r-- | XI2proto.txt | 6 |
2 files changed, 10 insertions, 4 deletions
@@ -44,7 +44,6 @@ #define KeyCode CARD8 #define Mask CARD32 #define Atom CARD32 -#define FP1616 INT32 /* 16.16 packed fixed point */ /* Request opcodes */ #define X_XIQueryDevicePointer 40 @@ -65,6 +64,13 @@ * COMMON STRUCTS * * * *************************************************************************************/ +/* Fixed point 16.16 */ +typedef struct +{ + int16_t integral; + uint16_t frac; +} FP1616; + /* Fixed point 32.32 */ typedef struct { int32_t integral; diff --git a/XI2proto.txt b/XI2proto.txt index a3edcb9..b99d14e 100644 --- a/XI2proto.txt +++ b/XI2proto.txt @@ -130,9 +130,9 @@ EVENTMASK A SETofEVENTMASK is a binary OR of zero or more EVENTMASK. FP1616 - Fixed point decimal in 16.16 format as 32 bit integer in the form of - (value * 10e15). The client is required to convert to 16.16 decimal - format. + Fixed point decimal in 16.16 format as one INT16 and one CARD16. + The INT16 contains the integral part, the CARD32 the decimal fraction + shifted by 16. FP3232 Fixed point decimal in 32.32 format as one INT32 and one CARD32. |