Blender V2.61 - r43446

filelist.h

Go to the documentation of this file.
00001 /*
00002  * ***** BEGIN GPL LICENSE BLOCK *****
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software Foundation,
00016  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  *
00018  * The Original Code is Copyright (C) 2007 Blender Foundation.
00019  * All rights reserved.
00020  *
00021  * The Original Code is: all of this file.
00022  *
00023  * Contributor(s): none yet.
00024  *
00025  * ***** END GPL LICENSE BLOCK *****
00026  */
00027 
00033 #ifndef FILELIST_H
00034 #define FILELIST_H
00035 
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039 
00040 struct FileList;
00041 struct FolderList;
00042 struct direntry;
00043 struct BlendHandle;
00044 struct Scene;
00045 struct Main;
00046 struct rcti;
00047 struct ReportList;
00048 struct FileSelection;
00049 
00050 typedef enum FileSelType {
00051     FILE_SEL_REMOVE = 0,
00052     FILE_SEL_ADD =  1,
00053     FILE_SEL_TOGGLE  = 2
00054 } FileSelType;
00055 
00056 typedef enum FileCheckType
00057 {
00058     CHECK_DIRS = 1,
00059     CHECK_FILES = 2,
00060     CHECK_ALL = 3
00061 } FileCheckType;
00062 
00063 struct FileList *   filelist_new(short type);
00064 void                filelist_init_icons(void);
00065 void                filelist_free_icons(void);
00066 int                 filelist_find(struct FileList* filelist, const char *file);
00067 void                filelist_free(struct FileList* filelist);
00068 void                filelist_sort(struct FileList* filelist, short sort);
00069 int                 filelist_numfiles(struct FileList* filelist);
00070 const char *        filelist_dir(struct FileList* filelist);
00071 void                filelist_setdir(struct FileList* filelist, const char *dir);
00072 struct direntry *   filelist_file(struct FileList* filelist, int index);
00073 void                filelist_select(struct FileList* filelist, FileSelection* sel, FileSelType select, unsigned int flag, FileCheckType check);
00074 void                filelist_select_file(struct FileList* filelist, int index, FileSelType select, unsigned int flag, FileCheckType check);
00075 int                 filelist_is_selected(struct FileList* filelist, int index, FileCheckType check);
00076 void                filelist_hidedot(struct FileList* filelist, short hide);
00077 void                filelist_setfilter(struct FileList* filelist, unsigned int filter);
00078 void                filelist_setfilter_types(struct FileList* filelist, const char *filter_glob);
00079 void                filelist_filter(struct FileList* filelist);
00080 void                filelist_imgsize(struct FileList* filelist, short w, short h);
00081 struct ImBuf *      filelist_getimage(struct FileList* filelist, int index);
00082 struct ImBuf *      filelist_geticon(struct FileList* filelist, int index);
00083 short               filelist_changed(struct FileList* filelist);
00084 void                filelist_readdir(struct FileList* filelist);
00085 
00086 int                 filelist_empty(struct FileList* filelist);
00087 void                filelist_parent(struct FileList* filelist);
00088 
00089 struct BlendHandle *filelist_lib(struct FileList* filelist);
00090 int                 filelist_islibrary (struct FileList* filelist, char* dir, char* group);
00091 void                filelist_from_main(struct FileList* filelist);
00092 void                filelist_from_library(struct FileList* filelist);
00093 void                filelist_freelib(struct FileList* filelist);
00094 void                filelist_hideparent(struct FileList* filelist, short hide);
00095 
00096 struct ListBase *   folderlist_new(void);
00097 void                folderlist_free(struct ListBase* folderlist);
00098 struct ListBase *   folderlist_duplicate(ListBase* folderlist);
00099 void                folderlist_popdir(struct ListBase* folderlist, char *dir);
00100 void                folderlist_pushdir(struct ListBase* folderlist, const char *dir);
00101 int                 folderlist_clear_next(struct SpaceFile* sfile);
00102 
00103 void                thumbnails_stop(struct FileList* filelist, const struct bContext* C);
00104 void                thumbnails_start(struct FileList* filelist, const struct bContext* C);
00105 int                 thumbnails_running(struct FileList* filelist, const struct bContext* C);
00106 
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110 
00111 #endif
00112