summaryrefslogtreecommitdiffstats
path: root/minui/minui.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* minui: Export minui/minui.h.Tao Bao2017-01-171-135/+0
| | | | | | | For libminui static and shared libraries. Test: build Change-Id: Ib30dc5e2ef4a3c8b3ca3a0cec68cb65e229a0c16
* Have gr_init_font alloc memory for the fontDamien Bargiacchi2016-09-131-1/+1
|\ | | | | | | | | | | am: d00f5eb63a Change-Id: Ic5394da1aff31adb7dda5160414a4831204fddc2
| * Have gr_init_font alloc memory for the fontDamien Bargiacchi2016-09-091-1/+1
| | | | | | | | Change-Id: I8ccf369d52011bc5d07d8e041fe558ce734a78fc
* | Support use of custom fonts in miniuiDamien Bargiacchi2016-08-241-3/+13
|\| | | | | | | | | | | am: 35fff61b1c Change-Id: Iac50e95c15c0b4337435d47d3666c2aaf5eb203d
| * Support use of custom fonts in miniuiDamien Bargiacchi2016-08-191-3/+13
| | | | | | | | | | Bug: 29547343 Change-Id: I398160c85daac90ffab2fa9bb2e96795b9e9885a
* | Merge \"Add docs on regeneration background text image\"Tianjie Xu2016-07-291-2/+2
|\ \ | | | | | | | | | | | | | | | am: 5aa2e104c0 Change-Id: I565fa63de18e0c806f2452c009d97c5ad4ebebc3
| * | Add docs on regeneration background text imageTianjie Xu2016-07-291-2/+2
| | | | | | | | | | | | | | | | | | | | | Also add a missing string in the recovery_l10n APP. Bug: 30415666 Change-Id: Ice2a9f7cad4ebe332b427bc0c7a9adccb6cf3af3
* | | Merge \"Fix clang-tidy performance warnings.\"Chih-Hung Hsieh2016-07-271-1/+1
|\| | | |/ |/| | | | | | | am: 2a3b695168 Change-Id: I55cadf517ec612f1b03de71ce7ca5cff69bc80d0
| * Fix clang-tidy performance warnings.Chih-Hung Hsieh2016-07-271-1/+1
| | | | | | | | | | | | | | | | | | | | * Use const reference parameter type to avoid unnecessary copy. * Use more efficient overloaded string methods. Bug: 30407689 Bug: 30411878 Change-Id: Iefab05c077367f272abf545036b853e8a295c8cd Test: build with WITH_TIDY=1
* | Fix matches_locale functionTianjie Xu2016-04-201-0/+2
|/ | | | | | | | | matches_locale was expecting input locale string to have at most one underscore; as a result "zh_CN_#Hans" ignores "zh_CN" and matches into "zh". Fix the match function and add unit tests. Bug: 27837319 Change-Id: I4e8a66f91cae6ac2a46b6bf21f670d5ea564c7c8
* res: Embed FPS into icon_installing.png.Tao Bao2015-12-161-2/+2
| | | | | | | | | | | | | | We allow vendor-specific icon installing image but have defined private animation_fps that can't be overridden. This CL changes the image generator to optionally embed FPS (otherwise use the default value of 20) into the generated image. For wear devices, they are using individual images instead of the interlaced one. Change the animation_fps from private to protected so that it can be customized. Bug: 26009230 Change-Id: I9fbf64ec717029d4c54f72316f6cb079e8dbfb5e
* Don't use typedefs that hide *s.Elliott Hughes2015-04-151-12/+9
| | | | | | gr_surface was causing confusion for no good reason. Change-Id: If7120187f9a00dd16297877fc49352185a4d4ea6
* Move the menu header out of the menu.Elliott Hughes2015-04-141-1/+1
| | | | | | | | | | | This makes it easier for us to deal with arbitrary information at the top, and means that headers added by specific commands don't overwrite the default ones. Add the fingerprint back, but broken up so it fits even on sprout's display. Change-Id: Id71da79ab1aa455a611d72756a3100a97ceb4c1c
* Switch minui over to C++.Elliott Hughes2015-04-101-27/+15
| | | | Change-Id: I59e08a304ae514a3fdb6fab58721f11670bc1b01
* Fix ScreenRecoveryUI to handle devices without power/up/down.Elliott Hughes2015-04-101-2/+7
| | | | | | | | Currently fugu has a custom subclass to handle this. The default code supports devices with trackballs but not all shipping Nexus devices? That's just silly. Change-Id: Id2779c91284899a26b4bb1af41e7033aa889df10
* Add ev_iterate_available_keys to minui.Elliott Hughes2015-04-101-13/+22
| | | | | | | This lets us recognize whether we have up/down/power, say, and tailor the UI accordingly. Change-Id: If94e454f14243b59d2f473ac9a436bd60591da01
* am 80c1a386: resolved conflicts for merge of d90da130 to klp-modular-dev-plus-aospDoug Zongker2014-03-181-4/+34
|\ | | | | | | | | * commit '80c1a386d3f614919708b37986919ecaf74ee738': refactor image resource loading code in minui
| * refactor image resource loading code in minuiDoug Zongker2014-03-171-4/+34
| | | | | | | | | | | | | | | | | | | | Reduce the number of copies of libpng boilerplate. Rename res_create_* functions to be more clear. Make explicit the use of the framebuffer pixel format for images, and handle more combinations of input and output (eg, loading a grayscale image for display rather than use as a text alpha channel). Change-Id: I3d41c800a8f4c22b2f0167967ce6ee4d6b2b8846
| * separate fbdev-specific code out from minuiDoug Zongker2014-03-111-0/+2
| | | | | | | | | | | | | | Isolate the code that interacts with fbdev, in preparation for adding a new backend. Change-Id: I19105e9da1ca6408cebc110f7e2bb5abfb481ee9
| * remove pixelflinger from recoveryDoug Zongker2014-03-111-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recovery now draws directly to the framebuffer by rolling its own graphics code, rather than depending on libpixelflinger. The recovery UI is modified slightly to eliminate operations that are slow with the software implementation: when the text display / menu is turned on, it now appears on a black background instead of a dimmed version of the recovery icon. There's probably substantial room for optimization of the graphics operations. Bug: 12131110 Change-Id: Iab6520e0a7aaec39e2ce39377c10aef82ae0c595 Conflicts: minui/resources.c
| * change how recovery animation is implementedDoug Zongker2014-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of one 'base' installing image and a number of overlay images that are drawn on top of it, we represent the installing animation with one PNG that contains all the animation frames, interlaced by row. The PNG is expected to have a text chunk with the keyword 'Frames' and a value that's the number of frames (as an ascii string). This representation provides better compression, removes the need to subclass ScreenRecoveryUI just to change the position of the overlay or number of frames, and doesn't require gr_blit() to support an alpha channel. We also remove the 'indeterminate' progress bar used when wiping data and/or cache. The main animation serves the same purpose (showing that the device is still alive); the spinning progress bar has been redundant for a while. This changes the default recovery animation to include the antenna-wiggling and gear-turning that's used in the Nexus 5 recovery animation. Change-Id: I51930a76035ac09969a25472f4e572b289418729 Conflicts: screen_ui.cpp screen_ui.h
* | separate fbdev-specific code out from minuiDoug Zongker2014-03-111-0/+2
| | | | | | | | | | | | | | Isolate the code that interacts with fbdev, in preparation for adding a new backend. Change-Id: I19105e9da1ca6408cebc110f7e2bb5abfb481ee9
* | remove pixelflinger from recoveryDoug Zongker2014-03-111-5/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recovery now draws directly to the framebuffer by rolling its own graphics code, rather than depending on libpixelflinger. The recovery UI is modified slightly to eliminate operations that are slow with the software implementation: when the text display / menu is turned on, it now appears on a black background instead of a dimmed version of the recovery icon. There's probably substantial room for optimization of the graphics operations. Bug: 12131110 Change-Id: Iab6520e0a7aaec39e2ce39377c10aef82ae0c595
* | change how recovery animation is implementedDoug Zongker2014-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of one 'base' installing image and a number of overlay images that are drawn on top of it, we represent the installing animation with one PNG that contains all the animation frames, interlaced by row. The PNG is expected to have a text chunk with the keyword 'Frames' and a value that's the number of frames (as an ascii string). This representation provides better compression, removes the need to subclass ScreenRecoveryUI just to change the position of the overlay or number of frames, and doesn't require gr_blit() to support an alpha channel. We also remove the 'indeterminate' progress bar used when wiping data and/or cache. The main animation serves the same purpose (showing that the device is still alive); the spinning progress bar has been redundant for a while. This changes the default recovery animation to include the antenna-wiggling and gear-turning that's used in the Nexus 5 recovery animation. Change-Id: I51930a76035ac09969a25472f4e572b289418729
* | recovery: fix epoll events type to uint32_tTodd Poynor2013-09-171-2/+2
| | | | | | | | Change-Id: I5db9987102201c18821acb45d1f824e9865a1451
* | minui: add ev_get_epollfd() to retrieve epoll file descriptorTodd Poynor2013-09-121-0/+1
| | | | | | | | | | | | To allow use of ev_* functions with an external main loop. Change-Id: If73717b64d7c455ca726b90a815a31c1edf52544
* | minui: convert ev_*() event interface to epollTodd Poynor2013-09-121-2/+2
|/ | | | | | | | | | | Help enable external main loop combined with ev_*() key event processing. Specify EPOLLWAKEUP to hold a wakelock on any event, assuming this is needed (may need to make this optional). Convert callback events parameter to unsigned int. Change-Id: Ib5e09abbd7724ffd830e2cf8e25e7eb59d3aa072
* more font improvements and cleanupDoug Zongker2013-03-071-1/+1
| | | | | | | | | | | | | | | | | Get rid of the notion of a font's "ascent"; the reference point for drawing is the top-left corner of the character box rather than the baseline. Add some more space between the menu entries and make the highlight bar around the text. Replace the default font.png with two images; the build system will include one or the other based on the resolutions of the device. Restore the original compiled-in bitmap font, to fall back on when font.png can't be found (eg, in the charger binary). Add support for bold text (when a font.png image is used). Change-Id: I6d211a486a3636f20208502b1cd2aeae8b9f5b02
* add optional overscan compensation to recovery graphicsDoug Zongker2012-12-191-1/+1
| | | | | | | | | | | If your screen is a TV, it may not actually be displaying the edges of the framebuffer. Allow specifying an overscan percentage, and move each edge of the framebuffer in by that percent of the width/height. (The gr_* layer just lies to the caller about the size of the framebuffer, telling the caller it's smaller than it really is, and offsets all drawing commands to match.) Change-Id: I11bb2feb39ae522bd3e957a14ebdecf3609e0fdc
* add simple text to recovery UIDoug Zongker2012-08-231-0/+2
| | | | | | | | | | | | | | | - recovery takes a --locale argument, which will be passed by the main system - the locale is saved in cache, in case the --locale argument is missing (eg, when recovery is started from fastboot) - we include images that have prerendered text for many locales - we split the background states into four (installing update, erasing, no command, error) so that appropriate text can be shown. Change-Id: I731b8108e83d5ccc09a4aacfc1dbf7e86b397aaf
* turn recovery into a C++ binaryDoug Zongker2011-10-311-0/+8
| | | | Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
* minui: add ability to synchronize current key stateDima Zavin2011-10-131-0/+2
| | | | | | | | | | | If a key is down prior to the time of initialization, we would not get the down event for the key, and thus think that the key is not pressed. Add an interface that allows one to provide a callback to execute on all keys that are currently down. Change-Id: I2a4096c0cb4c7c7a9a80d207835f168a0b418413 Signed-off-by: Dima Zavin <dima@android.com>
* minui: events: add ability to poll on non-input fdsDima Zavin2011-09-021-0/+1
| | | | | Change-Id: Iad52a6f2adcae0068d252d6163586f9d7b93121d Signed-off-by: Dima Zavin <dima@android.com>
* minui: events: refactor event acquisitionDima Zavin2011-09-021-2/+13
| | | | | | | | | | | | | | | | | | | | | | Events are now delivered through a callback mechanism during a call to ev_dispatch(). This will allow us to extend the events code to handle other devices/fds, not just input. One such example is the ability to process uevents. During initialization, we provide an input callback to ev_init that gets called when a new event is encountered during dispatch. ev_get has been removed and replaced with ev_get_input() helper function that can be called from inside the callback to attempt to get an input event. The existing client of ev_get in recovery has been split up such that the input thread just calls ev_wait(); ev_dispatch(); and the input_callback handles individual events by using the ev_get_input() helper. Change-Id: I24d8e71bd1533876b4ab1ae751ba200fea43c049 Signed-off-by: Dima Zavin <dima@android.com>
* minui: graphics: add interface for framebuffer blank/unblankDima Zavin2011-08-301-0/+3
| | | | | Change-Id: I5c3ee61cbf6fadae50f10b9f2e73caceaa5048a7 Signed-off-by: Dima Zavin <dima@android.com>
* minui: graphics: add ability to query font sizeDima Zavin2011-08-301-0/+1
| | | | | Change-Id: I5e8f477b7b205794f2975f12e6b6010c177f6052 Signed-off-by: Dima Zavin <dima@android.com>
* split out device-specific recovery UI code into vendor directoriesDoug Zongker2009-06-111-16/+0
| | | | | | | | | Take some device-specific details of the recovery UI (eg, what keys to press to bring up the interface and perform actions, exact text of the menu, etc.) and split them out into separate C functions. Arrange to take implementations of those functions from the appropriate vendor directory at build time. Provide a default implementation in case no vendor-specific one is available.
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-041-0/+70
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-041-70/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+70