Themeplaza browser (#140)

* builds at least

* meh, multithreading will come later. or never

* movement added, and correct grid mode

* switching splash/themes when in browser mode

* closer to the actual themeplaza menu

* bring back downloading from qr

* show a download screen when downloading from browser

* fix selecting with touchscreen in browser mode

* update readme for jansson

* fix quitting with start in browser mode

* add jump menu for browser mode

* rotate is broken, add working touchscreen page changing

* allow quitting preview mode with B in browser mode

* proper way to have portlibs

* add searching

* show error when search has no results

* always free entries and icon ids
This commit is contained in:
LiquidFenrir
2018-04-01 02:31:46 +02:00
committed by Alex Taber
parent 5090da114f
commit a2b5788fe8
18 changed files with 1212 additions and 350 deletions

View File

@@ -33,8 +33,6 @@
#include <stdlib.h>
#include <string.h>
#define ENTRIES_PER_SCREEN 4
#define DEBUG(...) fprintf(stderr, __VA_ARGS__)
#define POS() DEBUG("%s (line %d)...\n", __func__, __LINE__)
@@ -42,6 +40,8 @@
POS(); \
DEBUG(__VA_ARGS__)
#define FASTSCROLL_WAIT 1.5e8
typedef enum {
MODE_THEMES = 0,
MODE_SPLASHES,
@@ -50,15 +50,22 @@ typedef enum {
} EntryMode;
extern const char * main_paths[MODE_AMOUNT];
extern const int entries_per_screen_v[MODE_AMOUNT];
extern const int entries_per_screen_h[MODE_AMOUNT];
extern const int entry_size[MODE_AMOUNT];
extern bool quit;
enum TextureID {
TEXTURE_FONT_RESERVED = 0, // used by pp2d for the font
TEXTURE_ARROW,
TEXTURE_ARROW_SIDE,
TEXTURE_SHUFFLE,
TEXTURE_INSTALLED,
TEXTURE_PREVIEW_ICON,
TEXTURE_DOWNLOAD,
TEXTURE_RELOAD,
TEXTURE_BROWSE,
TEXTURE_LIST,
TEXTURE_EXIT,
TEXTURE_BATTERY_0,
TEXTURE_BATTERY_1,
TEXTURE_BATTERY_2,
@@ -68,10 +75,13 @@ enum TextureID {
TEXTURE_BATTERY_CHARGE,
TEXTURE_QR,
TEXTURE_PREVIEW,
TEXTURE_REMOTE_PREVIEW,
TEXTURE_SELECT_BUTTON,
TEXTURE_START_BUTTON,
TEXTURE_ICON, // always the last
// always the last
TEXTURE_REMOTE_ICONS,
TEXTURE_ICON = TEXTURE_REMOTE_ICONS + 24,
};
#endif