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