diff options
author | Antti Hölttä <AHoelttae@luxoft.com> | 2018-07-23 14:53:11 +0200 |
---|---|---|
committer | Antti Hölttä <AHoelttae@luxoft.com> | 2019-03-18 16:29:30 +0100 |
commit | ffd151ecf3971fd8601d8b1d4e2f04fb5793e364 (patch) | |
tree | cd3b947f04781d59bc61306dd34ef15f8c3a24fd /plugin/inputtypes.h |
Initial commit, demoable poc
Sort of working with 4 dir navigation, check demoapp
Diffstat (limited to 'plugin/inputtypes.h')
-rw-r--r-- | plugin/inputtypes.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/plugin/inputtypes.h b/plugin/inputtypes.h new file mode 100644 index 0000000..bf7e82e --- /dev/null +++ b/plugin/inputtypes.h @@ -0,0 +1,33 @@ +#ifndef INPUTTYPES_H +#define INPUTTYPES_H + +struct CursorNavigationCommand +{ + enum Action + { + NoAction, + Forward, //tab + Back, //ctrl-tab + Activate, //enter/click on item + Escape //leave scope + }; + + CursorNavigationCommand(); + + CursorNavigationCommand(float magnitude, int angle); + + //test if this commands angle is between given angles. clockwise from begin to end + bool angleIsBetween(int begin, int end) const; + + float magnitude; //0.0 to 1.0 + int angle; //0 to 359 + Action action; + + static const CursorNavigationCommand Up; + static const CursorNavigationCommand Down; + static const CursorNavigationCommand Left; + static const CursorNavigationCommand Right; + +}; + +#endif // INPUTTYPES_H |