rockbox/apps/plugins/imageviewer
William Wilgus c62493e98a Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses
Fixes deficiencies with the button system on the X3

  The x3 has an interesting button layout.
  Multiple key presses are NOT supported unless
  [BUTTON_POWER] is one of the combined keys

  As you can imagine this causes problems as the power button takes
  precedence in the button system and initiates a shutdown if the
  key is held too long
  instead of BUTTON_POWER use BUTTON_PWRALT in combination with other keys
  IF using as a prerequsite button then BUTTON_POWER should be used

  Multiple buttons are emulated by button_read_device but there are a few
  caveats to be aware of:

  Button Order Matters!
   different keys have different priorities, higher priority keys 'overide'
   the lower priority keys
  VOLUP[7] VOLDN[6] PREV[5] NEXT[4] PLAY[3] OPTION[2] HOME[1]

  There will be no true release or repeat events, the user can let off the
   button pressed initially and it will still continue to appear to be
   pressed as long as the second key is held

Tree scrolling is PLAY+NEXT or PLAY+PREV

Change-Id: I88dfee1c70a6a99659e8227f5becacc50cc43910
2020-09-13 16:23:24 +00:00
..
bmp imageviewer: gif viewer based on giflib-5.0.2 2012-11-13 18:13:10 +01:00
gif imageviewer: Fix potential null pointer dereference 2020-06-30 21:12:12 +00:00
jpeg [1/4] Remove SH support and all archos targets 2020-07-24 21:20:13 +00:00
png Limit more variables to file scope 2015-01-11 21:40:51 +01:00
ppm lcd-24bit: Introduce a 24-bit mid-level LCD driver 2014-06-21 00:15:53 +02:00
image_decoder.c imageviewer: gif viewer based on giflib-5.0.2 2012-11-13 18:13:10 +01:00
image_decoder.h imageviewer: gif viewer based on giflib-5.0.2 2012-11-13 18:13:10 +01:00
imageviewer.c plugins: More HAVE_BACKLIGHT cleanup 2020-07-24 19:20:15 -04:00
imageviewer.h imageviewer: gif viewer based on giflib-5.0.2 2012-11-13 18:13:10 +01:00
imageviewer.make Refactor and unify objcopy calls in the build system. Also now properly handles DEBUG builds on hosted targets to keep debug symbols if necessary. 2012-04-04 21:48:19 +02:00
imageviewer_button.h Xduoo X3 Add tree scrolling FS#13240, Emulate Multibutton presses 2020-09-13 16:23:24 +00:00
readme.txt image viewer: add quick guide describing how to add image decoder. also improve comments. 2011-01-16 12:45:11 +00:00
SOURCES FS#6321: Universal Image Viewer 2010-11-21 13:47:56 +00:00
SUBDIRS imageviewer: gif viewer based on giflib-5.0.2 2012-11-13 18:13:10 +01:00

this document describes how to add new image decoder.

1. create a directory which name is your image decoder's name and put source files
 under the directory.
'const struct image_decoder image_decoder' and 'IMGDEC_HEADER' must be declared in
 one of your source files.
see imageviewer.h for the detail of struct image_decoder.

2. add the directory name to apps/plugins/imageviewer/SUBDIR so that the decoder
 is built.
if the decoder is supported by particular targets, surround it with #if directive.
e.g. if the decoder supports color LCD targets only,
#ifdef HAVE_LCD_COLOR
bmp
#endif

3. append appropriate entry to enum image_type in image_decoder.h, decoder_names
 and ext_list in image_decoder.c so that the imageviewer plugin can recognize
 the decoder.
if the decoder is supported by particular targets, surround them with same #if
 directive in SUBDIR.

4. add entry to apps/plugins/viewers.config
 (in format: file_extension,viewer/imageviewer) so that the file with specified 
 file extension will be opened by image viewer plugin.
if the decoder is supported by particular targets, surround it with same #if
 directive in SUBDIR.

5. add entry to apps/plugins/CATEGORIES (in format: decoder_name,viewer) so
 that the build file is copied to viewers directory.
DON'T surround this with #if directive.


notes:
if you need to use greylib functions to draw image, add the functions to
 struct imgdec_api just like gray_bitmap_part because GREY_INFO_STRUCT is
 declared in imageviewer and is not available from the decoder.