20#ifndef __VSF_INPUT_TOUCHSCREEN_H__
21#define __VSF_INPUT_TOUCHSCREEN_H__
40#define __vsf_input_touchscreen_set6(__evt, __id, __is_down, __pressure, __x, __y) \
41 __vsf_input_touchscreen_set7( \
42 __evt, __id, __is_down, __pressure, __x, __y, true)
43#define __vsf_input_touchscreen_set7(__evt, __id, __is_down, __pressure, __x, __y, __xy_valid) \
45 (__evt)->id = ((__id) | (!!(__is_down) << 8)); \
46 (__evt)->cur.valu64 = (__x) | ((__y) << 16) \
47 | ((uint64_t)(__pressure) << 32) \
48 | ((uint64_t)(!!(__xy_valid)) << 48); \
50#define vsf_input_touchscreen_set(__evt, __id, __is_down, __pressure, __x, __y, ...) \
51 __PLOOC_EVAL(__vsf_input_touchscreen_set, \
52 (__evt), (__id), (__is_down), (__pressure), (__x), (__y), ##__VA_ARGS__) \
53 ((__evt), (__id), (__is_down), (__pressure), (__x), (__y), ##__VA_ARGS__)
55#define vsf_input_touchscreen_get_id(__evt) \
56 ((uint8_t)(((__evt)->id >> 0) & 0xFF))
57#define vsf_input_touchscreen_is_down(__evt) \
58 (!!(((__evt)->id >> 8) & 0xFF))
59#define vsf_input_touchscreen_get_x(__evt) \
60 ((uint16_t)(((__evt)->cur.valu64 >> 0) & 0xFFFF))
61#define vsf_input_touchscreen_get_y(__evt) \
62 ((uint16_t)(((__evt)->cur.valu64 >> 16) & 0xFFFF))
63#define vsf_input_touchscreen_get_pressure(__evt) \
64 ((uint16_t)(((__evt)->cur.valu64 >> 32) & 0xFFFF))
65#define vsf_input_touchscreen_is_xy_valid(__evt) \
66 (!!(((__evt)->cur.valu64 >> 48) & 1))
unsigned short uint16_t
Definition stdint.h:7
Definition vsf_input_touchscreen.h:79
vk_input_evt_t vk_touchscreen_info_t info
Definition vsf_input_touchscreen.h:81
Definition vsf_input_touchscreen.h:74
uint16_t width
Definition vsf_input_touchscreen.h:75
uint16_t height
Definition vsf_input_touchscreen.h:76