summaryrefslogtreecommitdiffstats
path: root/gui/pages.hpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add missing license headersMatt Mower2017-01-181-0/+18
| | | | Change-Id: I7f807a2f140068181524d8e868d029b4d94c70e8
* gui: rewrite theme loading codethat2016-03-291-6/+8
| | | | | | | | - Reduce code duplication for parsing of include files - Fix crash when styles and templates from included files are referenced - Fix bug with path concatenation if more than one file is included Change-Id: I06cd720188df272180fb359097afd73a85952fa8
* sort languages by display valueXuefer2016-02-031-0/+5
| | | | | Change-Id: I79d58fd680dd04161b89d42fed04a86a931defd3 Signed-off-by: Xuefer <xuefer@gmail.com>
* gui: use XML-based page for splash screen instead of a static jpgthat2016-01-251-1/+0
| | | | | | | | | | For devices with an unusual aspect ratio, stretching a bitmap to the screen resolution is sub-optimal. So let's reuse our XML engine that allows assembling the splash screen from individual parts. The splash page is loaded from a separate XML file for quick loading. Change-Id: I2d3dad26e42fcefaf563dacdf0ffa61f209dada1
* Update mStartPage to make language selection work on other pagesEthan Yonker2016-01-231-0/+1
| | | | | | | | | | | We should offer language selection on any start page such as decrypt or system read only. However, if the mStartPage variable was not being updated properly so selecting a different language was dumping the user back on either the decrypt prompt or the system read only page. This patch set fixes the problem and places the user back on the proper page when they choose a new language. Change-Id: I5153d3b9525d8c93d3863f4b17ecf55b5209e3c7
* Ensure that a base language is loaded before custom themeEthan Yonker2016-01-211-1/+1
| | | | | | | | | | Main goal of this patch is to improve error handling when a custom theme does not contain a valid theme version. We were getting a message saying that the theme_ver_err resource did not exist as well as an error saying that the package had failed to load. Now we properly get a single error message about the theme version. Change-Id: I361ef2d139220bbeaf2e856be919dc3a50ae4299
* gui: add keyboard support for Ctrl layer and more special keysthat2016-01-071-3/+3
| | | | | | | | | | | - rename NotifyKeyboard to NotifyCharInput - input: handle arrow keys in NotifyKey with standard KEY_* codes - fix page handler to return 0 from NotifyKey if key was handled - fix GUIAction::NotifyKey to not swallow all keys - change home button code from KEY_HOME to KEY_HOMEPAGE (to avoid collision with Home/End, conforms to Android 3.0+) Change-Id: Ib138afa492df8d0c1975415e8b5334c8778ccc90
* get rid of console thread for OpenRecoveryScriptthat2015-12-291-4/+2
| | | | | | | | | | | - CLI commands run in a threaded action "twcmd" - Console is displayed via "singleaction_page" - move ORS execution code from GUI action to OpenRecoveryScript class - remove unused function gui_changePackage - don't change PageManager package in home action - fix that /tmp/openrecoveryscript was not deleted after execution Change-Id: Ic688c0b04647ce09e9db979b0bc5123f47cf4f70
* Multiple Language SupportEthan Yonker2015-12-191-2/+19
| | | | | | | | | | | | | | | | | | | | | | | This is similar to https://gerrit.omnirom.org/#/c/14014 A lot of the features built in the older patch set have been split out into separate patches, most of which have already been merged. The remaining functionality here should all be directly related to language selection and loading. We always load English as a base before loading other languages over the top of the base. The idea is that if another language is missing a translation, then we will still display the English. Maybe still to do: read the /cache/recovery/last_locale file and load a language based on that. For me, this file contains just: en_US We probably won't bother with region specific translations so we would have to look at either trimming off the _US or using some other method like perhaps a symlink or a combination of the two. Thanks to _that for twmsg.cpp class Change-Id: I9647a22e47883a3ddd2de1da51f64aab7c328f74
* Move reloading of theme outside of the action threadEthan Yonker2015-11-091-5/+6
| | | | | | | | | | | | | | | | | | | | | Reloading the GUI while the GUI is running and rendering is very dangerous as we may be deleting GUI resources before or while we are trying to render those same items. This change will allow us to safely load new resources and delete the old ones. Fixed a double free situation that was causing a crash on every other theme reload. Clear parsed xml documents when we are done loading the theme instead of keeping them in memory for the life of the theme to help save a little memory. Store starting page so that if we request a reload, we can enter the theme at the same starting point, which may come in handy if we allow for language selection on alternate starting pages such as the decrypt prompt or the system read only prompt. Change-Id: I45a7e3fb3daeefac56d70f8d4936938eb1244b99
* Use unified LoadFileToBuffer functionEthan Yonker2015-10-161-0/+1
| | | | | | | Create a single function for loading xml files to a memory buffer to reduce code duplication. Change-Id: I0ff64463072118f61a2eb8052f74019715020253
* gui: allow specifying object type in element namethat2015-07-131-2/+2
| | | | | | | | e.g. '<button ...>' instead of '<object type="button" ...>' Also get rid of default parameters to make things more explicit. Change-Id: Ie4d1231b725aeb6cbf0041622c9780c86cf8e1c1
* Allow multiple overlaysEthan Yonker2015-03-191-1/+1
| | | | | | This effectively allows us to support popup dialogs and the like. Change-Id: Iafb3fa60ed635287cb59dce118f74dc8f2a4e60a
* gui: type safe resources part 2that2015-03-111-3/+2
| | | | | | | | | - separate collections for fonts, images, animations - no more ugly casts - fix crash if main ui.xml did not define any resources but include did - don't stop loading resources if one "type" attribute is missing Change-Id: I70c1c9ca66ca65d9fba1ba3eded34f3d8a07488e
* GUI: Support styles in xml to reduce xml file sizeEthan Yonker2015-02-211-0/+4
| | | | | | | Also allow sliders to have their own text label instead of requiring a whole separate text object for the label in the xml. Change-Id: I6e314efb4bb454d496555ff7e003d743063a1308
* gui: make resources type safethat2015-02-151-2/+5
| | | | | | | | | | | - 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
* Fix some crashes during theme (re)loadingVojtech Bocek2015-01-121-0/+1
| | | | | Change-Id: I01405fbe86a48ae79f2cbe633b89f2dcfb1ef266 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* gui: simplify blanktimerthat2015-01-111-0/+12
| | | | | | | | | - 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
* Use one mizip for allEthan Yonker2014-12-101-4/+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
* Add command line capabilitiesEthan Yonker2014-08-091-1/+2
| | | | | | | | | | | | | | | 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
* Allow ui.xml to include additional xml files to readEthan Yonker2014-07-281-3/+5
| | | | | | | Use common portrait and landscape xml files based on resolution defined by the device. Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
* Add support for actions triggered by key combinationVojtech Bocek2014-04-161-3/+7
| | | | | Change-Id: I9dfa7de40229f00412d63fc9c1eb3a809a6eb2e6 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Properly delete all GUIObjects and pages on theme reloadVojtech Bocek2014-02-121-3/+4
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I8df41877f8f4439a434becfd47a9914b50649b34
* Implement mouse cursorVojtech Bocek2014-02-071-0/+5
| | | | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com> Change-Id: I66d6db7b3ed9cca50b469d125b36224332e06913
* Kang in older minzip for building in CM9 & CM7Dees Troy2013-09-101-0/+6
| | | | CM7 and CM9 do not have libselinux needed in the newer minzip.
* Unify indentation and little clean-up in TWRP filesVojtech Bocek2013-08-241-64/+64
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Fix defines on pages.hpp to not collide with pages.hDees_Troy2012-12-181-4/+3
|
* TWRP-ify AOSP codeDees_Troy2012-09-051-0/+137
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