summaryrefslogtreecommitdiffstats
path: root/gui/pages.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-02-15gui: make resources type safethat1-33/+75
- add string, int, color and resource loading helpers - use typed resource classes, and some cleanup in loading code - remove abstract GetResource() to enforce type safe access - add height and width query methods to resources and use them - minor cleanup - simplify LoadPlacement Change-Id: I9b81785109a80b3806ad6b50cba4d893b87b0db1
2015-02-10Scale the GUI to fit the screenEthan Yonker1-0/+56
With this patch set, if needed, we scale the images during early boot. TTF support is needed to properly scale the font. No font scaling is done on the old style fixed width font used in the console. Special thanks to _that for figuring out the scaling and blending function calls to make this possible. Change-Id: If2f79bef16d6db2e1298bfc3d00c9bcca2bee37a
2015-01-22Use /twres instead of /res for theme resourcesDees Troy1-3/+4
AOSP and other ROM trees now do a rm -rf of the res folder during the ramdisk creation process that removes the TWRP resources. Using /twres instead of /res works around this issue making TWRP more compatible with AOSP and other build trees. Change-Id: I0d4c7e06ca381ac5aa0069b6f2b8c47f7dec49e7
2015-01-12Fix some crashes during theme (re)loadingVojtech Bocek1-11/+25
Change-Id: I01405fbe86a48ae79f2cbe633b89f2dcfb1ef266 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2015-01-11gui: simplify blanktimerthat1-8/+1
- get rid of separate thread, check timer in rendering thread instead - use an enum for the blanking state instead of magic integers - move #ifdefs for TW_NO_SCREEN_TIMEOUT inside blanktimer class - move some #includes and enum TOUCH_STATE to pages.hpp Change-Id: Id4b104e3680dc5db41d8ba85e32d722cf4086299
2015-01-09Allow for X and Y offsets in GUIEthan Yonker1-0/+19
These can be used to center a lower resolution theme onto a higher resolution screen. May be useful for Nexus 9 unless or until we decide to do a 1536x2048 theme or on devices like the Moto 360 and LG G Watch R. The build flags will only affect the stock theme. If a custom theme wishes to apply an offset, it can be done by setting tw_x_offset and / or tw_y_offset in the variables section of the XML. Change-Id: I2390769ed861b96a4a3bb8a0f06d9021ec91b6b9
2014-12-10Use one mizip for allEthan Yonker1-18/+0
The new minzip did not compile in older trees due to needing mmap64. For older trees we will just use mmap instead. Remove all files and code pertaining to minzipold. Updater should now build properly in older trees as well. Eliminate use of PLATFORM_VERSION in favor of PLATFORM_SDK_VERSION which should be more consistent and reliable. Change-Id: I38d2b604a73d1b17a2072c7d60e990b81ece0c10
2014-12-02 Make the android-5.0 branch compile in 4.4 to 4.1Ethan Yonker1-0/+18
Migrate previous minzip to minzipold replacing the existing minzipold. This will break compatibility with trees that do not support selinux (ICS and older). Migrate former verifier files to verifierold. Add fuse.h to recovery source because older trees do not have it. Add LOCAL_MODULE_TAGS where needed for 4.1 tree. Change-Id: Iade57cb2b0115af7fce9f56aa98636b1744a1ef4
2014-11-08Make custom themes work againEthan Yonker1-3/+24
Change-Id: Ib9ad011428603979f7dd8a2708989feb9b13e075
2014-11-07Disable custom theme and fix png loadingEthan Yonker1-1/+1
We will have to update the zip handling later. Now at least TWRP boots up to the GUI. Change-Id: I4182896eb095cab52fb0f1c9c20b6605e35677b9
2014-08-09Add command line capabilitiesEthan Yonker1-0/+10
Allows sending openrecoveryscript commands to TWRP via shell. This may be handy for visually impaired users, for various one click utilities to drive TWRP commands from a computer, for using TWRP when a catastrophic hardware failure like a shattered screen prevents you from being able to use touch, or even on devices like a TV stick where touch and USB mouse input is unavailable. This patch also includes a few minor changes to openrecoveryscript including proper support for rebooting via the script and for decrypting the device via the command line. Change-Id: I796ad168efdd2da9c25334ac93d1079daaa7b0bc
2014-08-07Allow using variables and addition/subtraction in variablesEthan Yonker1-1/+26
Change-Id: I1acba95302e414e1a471d27474508a7c48df0328
2014-07-28Allow ui.xml to include additional xml files to readEthan Yonker1-21/+153
Use common portrait and landscape xml files based on resolution defined by the device. Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
2014-06-04Whitespace and minor code cleanupMatt Mower1-7/+7
This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
2014-04-16Add support for actions triggered by key combinationVojtech Bocek1-12/+21
Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2014-02-12Cache results of GUIObject::isConditionTrue()Vojtech Bocek1-7/+5
Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Ia50f7c365b2dc0a65ee046bb42972e3594264878
2014-02-12Properly delete all GUIObjects and pages on theme reloadVojtech Bocek1-0/+27
Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I8df41877f8f4439a434becfd47a9914b50649b34
2014-02-07Implement mouse cursorVojtech Bocek1-2/+38
Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I66d6db7b3ed9cca50b469d125b36224332e06913
2013-12-07Add support for persistent variables in theme's <variables> sectionVojtech Bocek1-5/+10
* Add support for variables with persist="1", which will cause them saved into settings file and reloaded on next boot. * This is handy for theme makers, who can use this to implement "theme settings". Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I6415979011b38cbb15dec9909c445b02da6eadc0
2013-10-24Update licenses to all matchDees Troy1-0/+1
Change-Id: I3be70a897e563658736b2dec3a9ea2697b69b225
2013-10-22Update licenses to all matchDees Troy1-0/+1
2013-08-25Add a TW_NO_TIMEOUT optionRicardo Gomez1-1/+6
Change-Id: Ifb3a5bd9f1e6c2e9810c90b0aec198e91d5956fc
2013-08-24Unify indentation and little clean-up in TWRP filesVojtech Bocek1-582/+609
Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
2013-06-08Do not render the GUI when the blanktimer turns off the display.gordon13371-0/+5
Normally, when the display has been turned off by blanktimer, the GUI actually still renders the GUI elements (eg. progressbar while doing backup/restore/etc.) This patch will check whenever the display is turned off, and if it is turned off simply dont render. This avoids heating up the device and will save battery.
2013-04-04Add new SliderValue GUI widgetVojtech Bocek1-0/+6
Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: Ic5d44314f501341140dd7059d1cb753341f5844c
2013-04-04Move all AOSP code out of recovery binaryDees_Troy1-27/+26
Improves license compatibility between GPL and Apache Change-Id: I2b165aa575bb6213af6b07936f99610c113443f0
2013-03-30Add partition list GUI elementDees_Troy1-1/+24
Add partition list GUI element and update backup, restore, mount, storage selection, and wipe sections of GUI and partition manager code to reflect the new GUI element. Update ORS engine to handle new backup and restore setup. Fix a bug with decrypt. Add 1080x1920 layout. Change-Id: Iaa2f44cb707167e66f935452f076ba00e68a2aa4
2012-10-20Add keyboard key highlightDees_Troy1-11/+18
2012-09-05TWRP-ify AOSP codeDees_Troy1-0/+892
Pull in most TWRP sources Stub out partition management code Make it compile -- probably will not boot Kind of a mess but have to start somewhere