summaryrefslogtreecommitdiff
path: root/apps/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/tree.h')
-rw-r--r--apps/tree.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/apps/tree.h b/apps/tree.h
index f76df90463..87e0361e50 100644
--- a/apps/tree.h
+++ b/apps/tree.h
@@ -20,6 +20,8 @@
20#define _TREE_H_ 20#define _TREE_H_
21 21
22#include <stdbool.h> 22#include <stdbool.h>
23#include <applimits.h>
24#include <file.h>
23 25
24#if CONFIG_KEYPAD == IRIVER_H100_PAD 26#if CONFIG_KEYPAD == IRIVER_H100_PAD
25#define TREE_NEXT BUTTON_DOWN 27#define TREE_NEXT BUTTON_DOWN
@@ -95,6 +97,12 @@
95 97
96#endif 98#endif
97 99
100#ifdef HAVE_LCD_BITMAP
101#define BOOTFILE "ajbrec.ajz"
102#else
103#define BOOTFILE "archos.mod"
104#endif
105
98struct entry { 106struct entry {
99 short attr; /* FAT attributes + file type flags */ 107 short attr; /* FAT attributes + file type flags */
100 unsigned long time_write; /* Last write time */ 108 unsigned long time_write; /* Last write time */
@@ -108,6 +116,28 @@ struct filetype {
108 int voiceclip; 116 int voiceclip;
109}; 117};
110 118
119/* browser context for file or db */
120struct tree_context {
121 int dirlevel;
122 int dircursor;
123 int dirstart;
124 int dirpos[MAX_DIR_LEVELS];
125 int cursorpos[MAX_DIR_LEVELS];
126 char currdir[MAX_PATH]; /* file use */
127 int *dirfilter; /* file use */
128 int filesindir;
129 int dirsindir; /* file use */
130 int table_history[MAX_DIR_LEVELS]; /* db use */
131 int extra_history[MAX_DIR_LEVELS]; /* db use */
132 int currtable; /* db use */
133 int currextra; /* db use */
134
135 void* dircache;
136 int dircache_size;
137 char* name_buffer;
138 int name_buffer_size;
139 int dentry_size;
140};
111 141
112/* using attribute bits not used by FAT (FAT uses lower 7) */ 142/* using attribute bits not used by FAT (FAT uses lower 7) */
113 143
@@ -134,8 +164,7 @@ bool create_playlist(void);
134void resume_directory(const char *dir); 164void resume_directory(const char *dir);
135char *getcwd(char *buf, int size); 165char *getcwd(char *buf, int size);
136void reload_directory(void); 166void reload_directory(void);
137struct entry* load_and_sort_directory(const char *dirname, const int *dirfilter,
138 int *num_files, bool *buffer_full);
139bool check_rockboxdir(void); 167bool check_rockboxdir(void);
168struct tree_context* tree_get_context(void);
140 169
141#endif 170#endif