summaryrefslogtreecommitdiffstats
path: root/gui/objects.hpp
diff options
context:
space:
mode:
authorthat <github@that.at>2015-03-15 00:56:57 +0100
committerthat <github@that.at>2015-03-15 00:56:57 +0100
commitd86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2 (patch)
treecd10c4d37084f3819abb028580fc41331aa2ad1c /gui/objects.hpp
parentgui: keyboard: add HitTestKey method, minor simplifications (diff)
downloadandroid_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar.gz
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar.bz2
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar.lz
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar.xz
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.tar.zst
android_bootable_recovery-d86f49d3f7bc4e9ec6c3ddffa4723ef624eb66b2.zip
Diffstat (limited to 'gui/objects.hpp')
-rw-r--r--gui/objects.hpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/gui/objects.hpp b/gui/objects.hpp
index 6eeefc267..e70053e3b 100644
--- a/gui/objects.hpp
+++ b/gui/objects.hpp
@@ -815,9 +815,6 @@ protected:
int sUpdate;
};
-#define MAX_KEYBOARD_LAYOUTS 5
-#define MAX_KEYBOARD_ROWS 9
-#define MAX_KEYBOARD_KEYS 20
#define KEYBOARD_ACTION 253
#define KEYBOARD_LAYOUT 254
#define KEYBOARD_SWIPE_LEFT 252
@@ -852,23 +849,29 @@ protected:
int layout;
};
int ParseKey(const char* keyinfo, Key& key, int& Xindex, int keyWidth, bool longpress);
- struct capslock_tracking_struct
+
+ enum {
+ MAX_KEYBOARD_LAYOUTS = 5,
+ MAX_KEYBOARD_ROWS = 9,
+ MAX_KEYBOARD_KEYS = 20
+ };
+ struct Layout
{
- int capslock;
- int set_capslock;
+ ImageResource* keyboardImg;
+ struct Key keys[MAX_KEYBOARD_ROWS][MAX_KEYBOARD_KEYS];
+ int row_end_y[MAX_KEYBOARD_ROWS];
+ bool is_caps;
int revert_layout;
};
+ Layout layouts[MAX_KEYBOARD_LAYOUTS];
// Find key at screen coordinates
Key* HitTestKey(int x, int y);
- ImageResource* keyboardImg[MAX_KEYBOARD_LAYOUTS];
- struct Key keyboard_keys[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS][MAX_KEYBOARD_KEYS];
- struct capslock_tracking_struct caps_tracking[MAX_KEYBOARD_LAYOUTS];
bool mRendered;
std::string mVariable;
int currentLayout;
- int row_heights[MAX_KEYBOARD_LAYOUTS][MAX_KEYBOARD_ROWS];
+ bool CapsLockOn;
unsigned int KeyboardWidth, KeyboardHeight;
int rowY, colX, highlightRenderCount;
bool hasHighlight, hasCapsHighlight;