MirEvent::action is currently effectively an opaque value, as Mir headers do not specify its meaning.
So event.h must either define counterparts to the android AMOTION_EVENT_ACTION_* values below or split up the action and pointer index into separate variables.
"""
/* Bit shift for the action bits holding the pointer index as
* defined by AMOTION_EVENT_ACTION_POINTER_INDEX_MASK.
*/
#define AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT 8
enum {
/* Bit mask of the parts of the action code that are the action itself.
*/
AMOTION_EVENT_ACTION_MASK = 0xff,
/* Bits in the action code that represent a pointer index, used with
* AMOTION_EVENT_ACTION_POINTER_DOWN and AMOTION_EVENT_ACTION_POINTER_UP. Shifting
* down by AMOTION_EVENT_ACTION_POINTER_INDEX_SHIFT provides the actual pointer
* index where the data for the pointer going up or down can be found.
*/
AMOTION_EVENT_ACTION_POINTER_INDEX_MASK = 0xff00,
"""
Right now in the "Qt compositor" code I had to resort to locally defining those values, which is a hack:
""
// from android-input AMOTION_EVENT_ACTION_*, hidden inside mir bowels
// mir headers should define them
const int QtEventFeeder::MirEventActionMask = 0xff;
const int QtEventFeeder::MirEventActionPointerIndexMask = 0xff00;
const int QtEventFeeder::MirEventActionPointerIndexShift = 8;
""
MirEvent::action is currently effectively an opaque value, as Mir headers do not specify its meaning.
So event.h must either define counterparts to the android AMOTION_ EVENT_ACTION_ * values below or split up the action and pointer index into separate variables.
""" EVENT_ACTION_ POINTER_ INDEX_MASK. EVENT_ACTION_ POINTER_ INDEX_SHIFT 8
/* Bit shift for the action bits holding the pointer index as
* defined by AMOTION_
*/
#define AMOTION_
enum { EVENT_ACTION_ MASK = 0xff,
/* Bit mask of the parts of the action code that are the action itself.
*/
AMOTION_
/* Bits in the action code that represent a pointer index, used with EVENT_ACTION_ POINTER_ DOWN and AMOTION_ EVENT_ACTION_ POINTER_ UP. Shifting EVENT_ACTION_ POINTER_ INDEX_SHIFT provides the actual pointer EVENT_ACTION_ POINTER_ INDEX_MASK = 0xff00,
* AMOTION_
* down by AMOTION_
* index where the data for the pointer going up or down can be found.
*/
AMOTION_
"""
Right now in the "Qt compositor" code I had to resort to locally defining those values, which is a hack:
"" EVENT_ACTION_ *, hidden inside mir bowels :MirEventAction Mask = 0xff; :MirEventAction PointerIndexMas k = 0xff00; :MirEventAction PointerIndexShi ft = 8;
// from android-input AMOTION_
// mir headers should define them
const int QtEventFeeder:
const int QtEventFeeder:
const int QtEventFeeder:
""