// Example of X-macros for automatic serialization in C. See file // `binary-serialization.md` in pavnotes2 and binmsg.py. #include #include #include "binmsg_cpp.h" #define KeyEvent_fields(field, padding) \ field(u8, down_flag) \ padding(u8) \ padding(u8) \ field(u32, keysym) MESSAGE_TYPE(KeyEvent)