summaryrefslogtreecommitdiffstats
path: root/gui/resources.hpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gui: move retainaspect handling to the resource ctorsthat2015-06-011-2/+2
| | | | | | | LoadResources should only decide on the resource type, everything else is handled by the resources themselves. Change-Id: I30f68293960c23560979f650efc4393992cf5824
* gui: support string resourcesthat2015-03-111-1/+7
| | | | | | | | | | | | | | | storing strings in a map (for fast lookup) in resource manager To define a string resource in <resources>: <string name="foo">Hello</string> To use a string, e.g.: <text>%@foo%</text> Not yet done: language-specific resources (should be solved not only for strings, but for all kinds of resources - e.g. for localized images) Change-Id: I3ba5cf5298c09e0d28a83973e9662f179271b33f
* gui: type safe resources part 2that2015-03-111-9/+7
| | | | | | | | | - 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: make resources type safethat2015-02-151-7/+17
| | | | | | | | | | | - 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
* Scale the GUI to fit the screenEthan Yonker2015-02-101-2/+4
| | | | | | | | | | | | 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
* gui: fix hardware keyboardthat2015-02-011-0/+4
| | | | | | | | | | - Power+voldown works again for taking screenshots - Right shift key isn't stuck until users presses "s" - Don't use DataManager for local variables - Simplify handling of Shift keys - Clean up #includes a bit Change-Id: Iff0453107beaa336a9c04422b43e92225fdbe069
* gui: simplify blanktimerthat2015-01-111-8/+0
| | | | | | | | | - 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
* Thanks to _that, return null if vector is emptybigbiff2014-11-161-2/+2
| | | | Change-Id: Idc44455dd0c971c876ae283528c4367a82e145bd
* Add support for TrueType fontsVojtech Bocek2014-10-141-0/+9
| | | | | | | | | | | | | * Keeps original font system in place * Uses the same API as original font system: - You can render only one line at a time - You can only use one font and color for one gr_text* call * Caches all rendered text, with a string cache limited to 400 entries, then it trucates to 250, which results in memory usage hovering around 5-10MB Change-Id: I36107b9dcd8d57bae4486fce8b8f64e49ef3d906 Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* Allow ui.xml to include additional xml files to readEthan Yonker2014-07-281-0/+1
| | | | | | | Use common portrait and landscape xml files based on resolution defined by the device. Change-Id: Iec528f9d846d49857ff98de1ac201e25dbb60339
* Whitespace and minor code cleanupMatt Mower2014-06-041-1/+1
| | | | | | This is by no means comprehensive, but is quite a bit better already. Change-Id: Ibc8654a5dfb0eec39cbd0b64bdb52bb4fbfe2f7e
* 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-28/+27
| | | | Signed-off-by: Vojtech Bocek <vbocek@gmail.com>
* TWRP-ify AOSP codeDees_Troy2012-09-051-0/+87
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