From 7da9477bc3401cbd90b2984f625f96f451ecaf6b Mon Sep 17 00:00:00 2001 From: Linus Nielsen Feltzing Date: Fri, 28 Oct 2005 00:00:00 +0000 Subject: Initial multi screen support by Kévin Ferrare (Patch #1318081) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7666 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.h | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) (limited to 'apps/tree.h') diff --git a/apps/tree.h b/apps/tree.h index a6c41f2af5..04532c887d 100644 --- a/apps/tree.h +++ b/apps/tree.h @@ -23,6 +23,8 @@ #include #include +/*FIXME: don't forget to remove PGUP, PGDOW, NEXT, PREV + * when everything will be working with gui_list */ #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || \ (CONFIG_KEYPAD == IRIVER_H300_PAD) #define TREE_NEXT BUTTON_DOWN @@ -43,8 +45,11 @@ #define TREE_POWER_BTN BUTTON_ON #define TREE_QUICK (BUTTON_MODE | BUTTON_REPEAT) +/* Remote keys */ #define TREE_RC_NEXT BUTTON_RC_FF #define TREE_RC_PREV BUTTON_RC_REW +#define TREE_RC_PGUP BUTTON_RC_SOURCE +#define TREE_RC_PGDN BUTTON_RC_BITRATE #define TREE_RC_EXIT BUTTON_RC_STOP #define TREE_RC_RUN (BUTTON_RC_MENU | BUTTON_REL) #define TREE_RC_RUN_PRE BUTTON_RC_MENU @@ -137,27 +142,36 @@ struct filetype { int icon; int voiceclip; }; - + /* browser context for file or db */ struct tree_context { + /* The directory we are browsing */ + char currdir[MAX_PATH]; + /* the number of directories we have crossed from / */ int dirlevel; - int dircursor; - int dirstart; + /* The currently selected file/id3dbitem index (old dircursor+dirfile) */ + int selected_item; + /* The selected item in each directory crossed + * (used when we want to return back to a previouws directory)*/ + int selected_item_history[MAX_DIR_LEVELS]; + int firstpos; /* which dir entry is on first position in dir buffer */ int pos_history[MAX_DIR_LEVELS]; - int dirpos[MAX_DIR_LEVELS]; - int cursorpos[MAX_DIR_LEVELS]; - char currdir[MAX_PATH]; /* file use */ + int dirpos[MAX_DIR_LEVELS]; /* the dirstart history */ + int cursorpos[MAX_DIR_LEVELS]; /* the dircursor history */ + int *dirfilter; /* file use */ - int filesindir; + int filesindir; /* The number of files in the dircache */ int dirsindir; /* file use */ int dirlength; /* total number of entries in dir, incl. those not loaded */ int table_history[MAX_DIR_LEVELS]; /* db use */ int extra_history[MAX_DIR_LEVELS]; /* db use */ int currtable; /* db use */ int currextra; /* db use */ - + /* A big buffer with plenty of entry structs, + * contains all files and dirs in the current + * dir (with filters applied) */ void* dircache; int dircache_size; char* name_buffer; @@ -196,4 +210,7 @@ struct tree_context* tree_get_context(void); void tree_flush(void); void tree_restore(void); + +extern struct gui_synclist tree_lists; +extern struct gui_syncstatusbar statusbars; #endif -- cgit v1.2.3