~thomas-voss/platform-api/add-package-config

« back to all changes in this revision

Viewing changes to include/ubuntu/application/ui/input/event.h

  • Committer: Thomas Voß
  • Date: 2013-06-20 12:26:40 UTC
  • mfrom: (67.1.1 fix-cmake-setup)
  • Revision ID: thomas.voss@canonical.com-20130620122640-ytzwepxb9qiijzgq
[ Gerry Boland ]
* Add mir suport.
[ Robert Carr ]
* Add mir suport.
[ Ubuntu daily release ]
* Automatic snapshot from revision 69
[ Ricardo Mendoza ]
* Allow remote App Manager to take care of signalling processes.
[ Ubuntu daily release ]
* Automatic snapshot from revision 67

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
extern "C" {
26
26
#endif
27
27
 
 
28
// TODO<papi>: Perhaps we should update the struct to use these enum types. But then we need to move action/flags
 
29
// in to the internal typed event structs.
 
30
 
 
31
typedef enum {
 
32
    U_KEY_ACTION_DOWN     = 0,
 
33
    U_KEY_ACTION_UP       = 1,
 
34
    U_KEY_ACTION_MULTIPLE = 2
 
35
} UKeyAction;
 
36
 
 
37
typedef enum {
 
38
    U_KEY_FLAG_WOKE_HERE           = 0x1,
 
39
    U_KEY_FLAG_SOFT_KEYBOARD       = 0x2,
 
40
    U_KEY_FLAG_KEEP_TOUCH_MODE     = 0x4,
 
41
    U_KEY_FLAG_FROM_SYSTEM         = 0x8,
 
42
    U_KEY_FLAG_EDITOR_ACTION       = 0x10,
 
43
    U_KEY_FLAG_CANCELED            = 0x20,
 
44
    U_KEY_FLAG_VIRTUAL_HARD_KEY    = 0x40,
 
45
    U_KEY_FLAG_LONG_PRESS          = 0x80,
 
46
    U_KEY_FLAG_CANCELED_LONG_PRESS = 0x100,
 
47
    U_KEY_FLAG_TRACKING            = 0x200,
 
48
    U_KEY_FLAG_FALLBACK            = 0x400
 
49
} UKeyFlag;
 
50
 
 
51
typedef enum {
 
52
    U_KEY_MODIFIER_NONE        = 0,
 
53
    U_KEY_MODIFIER_ALT         = 0x02,
 
54
    U_KEY_MODIFIER_ALT_LEFT    = 0x10,
 
55
    U_KEY_MODIFIER_ALT_RIGHT   = 0x20,
 
56
    U_KEY_MODIFIER_SHIFT       = 0x01,
 
57
    U_KEY_MODIFIER_SHIFT_LEFT  = 0x40,
 
58
    U_KEY_MODIFIER_SHIFT_RIGHT = 0x80,
 
59
    U_KEY_MODIFIER_SYM         = 0x04,
 
60
    U_KEY_MODIFIER_FUNCTION    = 0x08,
 
61
    U_KEY_MODIFIER_CTRL        = 0x1000,
 
62
    U_KEY_MODIFIER_CTRL_LEFT   = 0x2000,
 
63
    U_KEY_MODIFIER_CTRL_RIGHT  = 0x4000,
 
64
    U_KEY_MODIFIER_META        = 0x10000,
 
65
    U_KEY_MODIFIER_META_LEFT   = 0x20000,
 
66
    U_KEY_MODIFIER_META_RIGHT  = 0x40000,
 
67
    U_KEY_MODIFIER_CAPS_LOCK   = 0x100000,
 
68
    U_KEY_MODIFIER_NUM_LOCK    = 0x200000,
 
69
    U_KEY_MODIFIER_SCROLL_LOCK = 0x400000
 
70
} UKeyModifierMask;
 
71
 
 
72
#define U_MOTION_ACTION_POINTER_INDEX_SHIFT 8
 
73
#define U_MOTION_ACTION_MASK 0xff
 
74
#define U_MOTION_ACTION_POINTER_INDEX_MASK 0xff00
 
75
 
 
76
typedef enum {
 
77
    U_MOTION_ACTION_DOWN         = 0,
 
78
    U_MOTION_ACTION_UP           = 1,
 
79
    U_MOTION_ACTION_MOVE         = 2,
 
80
    U_MOTION_ACTION_CANCEL       = 3,
 
81
    U_MOTION_ACTION_OUTSIDE      = 4,
 
82
    U_MOTION_ACTION_POINTER_DOWN = 5,
 
83
    U_MOTION_ACTION_POINTER_UP   = 6,
 
84
    U_MOTION_ACTION_HOVER_MOVE   = 7,
 
85
    U_MOTION_ACTION_SCROLL       = 8,
 
86
    U_MOTION_ACTION_HOVER_ENTER  = 9,
 
87
    U_MOTION_ACTION_HOVER_EXIT   = 10
 
88
} UMotionAction;
 
89
 
 
90
typedef enum {
 
91
    U_MOTION_FLAG_WINDOW_IS_OBSCURED = 0x1
 
92
} UMotionFlag;
 
93
 
 
94
typedef enum {
 
95
    U_MOTION_BUTTON_PRIMARY   = 1 << 0,
 
96
    U_MOTION_BUTTON_SECONDARY = 1 << 1,
 
97
    U_MOTION_BUTTON_TERTIARY  = 1 << 2,
 
98
    U_MOTION_BUTTON_BACK      = 1 << 3,
 
99
    U_MOTION_BUTTON_FORWARD   = 1 << 4
 
100
} UMotionButtonMask;
 
101
 
 
102
 
28
103
    /** Maximum number of pointers reported within one input event. */
29
104
#define UBUNTU_APPLICATION_UI_INPUT_EVENT_MAX_POINTER_COUNT (16)
30
105