2012-04-21 23:13:50 +02:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2013-01-01 01:37:37 +01:00
|
|
|
* Copyright (C) 2010-2013 - Hans-Kristian Arntzen
|
|
|
|
* Copyright (C) 2011-2013 - Daniel De Matteis
|
2012-01-10 23:33:44 +01:00
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
2012-01-10 23:33:44 +01:00
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
2012-04-21 23:13:50 +02:00
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
2012-01-10 23:33:44 +01:00
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
2012-04-21 23:31:57 +02:00
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
2012-01-10 23:33:44 +01:00
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef FILEBROWSER_H_
|
|
|
|
#define FILEBROWSER_H_
|
|
|
|
|
2013-10-07 08:45:32 +00:00
|
|
|
#include "../../general.h"
|
2012-03-29 16:09:43 +02:00
|
|
|
|
2012-01-10 23:33:44 +01:00
|
|
|
typedef struct
|
|
|
|
{
|
2013-04-12 12:25:36 +02:00
|
|
|
size_t ptr;
|
2012-08-22 00:21:30 +02:00
|
|
|
char directory_path[PATH_MAX];
|
2012-08-18 13:38:17 +02:00
|
|
|
char extensions[PATH_MAX];
|
2013-04-12 12:25:36 +02:00
|
|
|
char root_dir[PATH_MAX];
|
|
|
|
char path[PATH_MAX];
|
|
|
|
} filebrowser_dir_type_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
struct string_list *list;
|
|
|
|
filebrowser_dir_type_t current_dir;
|
|
|
|
filebrowser_dir_type_t prev_dir;
|
2012-01-10 23:33:44 +01:00
|
|
|
} filebrowser_t;
|
|
|
|
|
2012-06-19 03:44:17 +02:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
FILEBROWSER_ACTION_UP,
|
|
|
|
FILEBROWSER_ACTION_DOWN,
|
|
|
|
FILEBROWSER_ACTION_LEFT,
|
|
|
|
FILEBROWSER_ACTION_RIGHT,
|
|
|
|
FILEBROWSER_ACTION_OK,
|
|
|
|
FILEBROWSER_ACTION_CANCEL,
|
|
|
|
FILEBROWSER_ACTION_SCROLL_UP,
|
|
|
|
FILEBROWSER_ACTION_SCROLL_DOWN,
|
|
|
|
FILEBROWSER_ACTION_RESET,
|
2013-04-12 12:25:36 +02:00
|
|
|
FILEBROWSER_ACTION_RESET_CURRENT_DIR,
|
2013-03-13 02:52:41 +01:00
|
|
|
FILEBROWSER_ACTION_PATH_ISDIR,
|
2012-06-19 03:44:17 +02:00
|
|
|
FILEBROWSER_ACTION_NOOP
|
|
|
|
} filebrowser_action_t;
|
|
|
|
|
2013-04-18 19:05:43 +02:00
|
|
|
void filebrowser_update(void *data, uint64_t input, const char *extensions);
|
2013-01-03 02:32:09 +01:00
|
|
|
void filebrowser_set_root_and_ext(void *data, const char *ext, const char *root_dir);
|
|
|
|
bool filebrowser_iterate(void *data, unsigned action);
|
2013-10-07 08:56:16 +00:00
|
|
|
void filebrowser_free(void *data);
|
2012-01-10 23:33:44 +01:00
|
|
|
|
|
|
|
#endif /* FILEBROWSER_H_ */
|