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

@@ -28,6 +28,7 @@
#define LOADING_H
#include "common.h"
#include <jansson.h>
enum ICON_IDS_OFFSET {
ICONS_ABOVE = 0,
@@ -62,6 +63,8 @@ typedef struct {
bool in_shuffle;
bool installed;
json_int_t tp_download_id;
} Entry_s;
typedef struct {
@@ -69,7 +72,7 @@ typedef struct {
int entries_count;
ssize_t texture_id_offset;
ssize_t icons_ids[ICONS_OFFSET_AMOUNT][ENTRIES_PER_SCREEN];
ssize_t * icons_ids;
int previous_scroll;
int scroll;
@@ -80,6 +83,14 @@ typedef struct {
int shuffle_count;
EntryMode mode;
int entries_per_screen_v;
int entries_per_screen_h;
int entries_loaded;
int entry_size;
json_int_t tp_current_page;
json_int_t tp_page_count;
char * tp_search;
} Entry_List_s;
typedef struct {
@@ -87,8 +98,8 @@ typedef struct {
volatile bool run_thread;
} Thread_Arg_s;
void delete_entry(Entry_s entry);
Result load_entries(const char * loading_path, Entry_List_s * list, EntryMode mode);
void delete_entry(Entry_s * entry, bool is_file);
Result load_entries(const char * loading_path, Entry_List_s * list);
bool load_preview(Entry_List_s list, int * preview_offset);
void load_icons_first(Entry_List_s * current_list, bool silent);
void handle_scrolling(Entry_List_s * list);