summaryrefslogtreecommitdiffstats
path: root/gui/pages.hpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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