18#ifndef __VSF_INPUT_MOUSE_H__
19#define __VSF_INPUT_MOUSE_H__
22#include "../vsf_input_cfg.h"
24#include "../vsf_input_get_type.h"
33#define vsf_input_mouse_evt_move_set(__evt,__x, __y) \
35 (__evt)->id = VSF_INPUT_MOUSE_EVT_MOVE; \
36 (__evt)->cur.valu32 = ((__x) | ((__y) << 16)); \
39#define vsf_input_mouse_evt_wheel_set(__evt, __x, __y) \
41 (__evt)->id = VSF_INPUT_MOUSE_EVT_WHEEL; \
42 (__evt)->cur.valu32 = ((__x) | ((__y) << 16)); \
45#define vsf_input_mouse_evt_button_set(__evt, __button, __is_down, __x, __y) \
47 (__evt)->id = VSF_INPUT_MOUSE_EVT_BUTTON | ((__button) << 8) | ((__is_down) << 12);\
48 (__evt)->cur.valu32 = ((__x) | ((__y) << 16)); \
52#define vsf_input_mouse_evt_get(__evt) \
56#define vsf_input_mouse_evt_button_get(__evt) \
57 (int)(((__evt)->id >> 8) & 0x03)
58#define vsf_input_mouse_evt_button_is_down(__evt) \
59 (!!(((__evt)->id >> 12) & 1))
62#define vsf_input_mouse_evt_get_x(__evt) \
63 ((int16_t)(((__evt)->cur.valu32 >> 0) & 0xFFFF))
64#define vsf_input_mouse_evt_get_y(__evt) \
65 ((int16_t)(((__evt)->cur.valu32 >> 16) & 0xFFFF))
Definition vsf_input_mouse.h:85