Fix #27849: 3D manipulator widget lost on mesh in edge mode.
[blender.git] / source / blender / editors / space_file / filelist.h
1 /*
2  * $Id$
3  *
4  * ***** BEGIN GPL LICENSE BLOCK *****
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 2
9  * of the License, or (at your option) any later version. The Blender
10  * Foundation also sells licenses for use in proprietary software under
11  * the Blender License.  See http://www.blender.org/BL/ for information
12  * about this.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22  *
23  * The Original Code is Copyright (C) 2007 Blender Foundation.
24  * All rights reserved.
25  *
26  * The Original Code is: all of this file.
27  *
28  * Contributor(s): none yet.
29  *
30  * ***** END GPL LICENSE BLOCK *****
31  */
32
33 /** \file blender/editors/space_file/filelist.h
34  *  \ingroup spfile
35  */
36
37
38 #ifndef FILELIST_H
39 #define FILELIST_H
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 struct FileList;
46 struct FolderList;
47 struct direntry;
48 struct BlendHandle;
49 struct Scene;
50 struct Main;
51 struct rcti;
52 struct ReportList;
53 struct FileSelection;
54
55 typedef enum FileSelType {
56         FILE_SEL_REMOVE = 0,
57         FILE_SEL_ADD =  1,
58         FILE_SEL_TOGGLE  = 2
59 } FileSelType;
60
61 typedef enum FileCheckType
62 {
63         CHECK_DIRS = 1,
64         CHECK_FILES = 2,
65         CHECK_ALL = 3
66 } FileCheckType;
67
68 struct FileList *       filelist_new(short type);
69 void                            filelist_init_icons(void);
70 void                            filelist_free_icons(void);
71 int                                     filelist_find(struct FileList* filelist, char *file);
72 void                            filelist_free(struct FileList* filelist);
73 void                            filelist_sort(struct FileList* filelist, short sort);
74 int                                     filelist_numfiles(struct FileList* filelist);
75 const char *            filelist_dir(struct FileList* filelist);
76 void                            filelist_setdir(struct FileList* filelist, const char *dir);
77 struct direntry *       filelist_file(struct FileList* filelist, int index);
78 void                            filelist_select(struct FileList* filelist, FileSelection* sel, FileSelType select, unsigned int flag, FileCheckType check);
79 void                            filelist_select_file(struct FileList* filelist, int index, FileSelType select, unsigned int flag, FileCheckType check);
80 int                                     filelist_is_selected(struct FileList* filelist, int index, FileCheckType check);
81 void                            filelist_hidedot(struct FileList* filelist, short hide);
82 void                            filelist_setfilter(struct FileList* filelist, unsigned int filter);
83 void                            filelist_setfilter_types(struct FileList* filelist, const char *filter_glob);
84 void                            filelist_filter(struct FileList* filelist);
85 void                            filelist_imgsize(struct FileList* filelist, short w, short h);
86 struct ImBuf *          filelist_getimage(struct FileList* filelist, int index);
87 struct ImBuf *          filelist_geticon(struct FileList* filelist, int index);
88 short                           filelist_changed(struct FileList* filelist);
89 void                            filelist_readdir(struct FileList* filelist);
90
91 int                                     filelist_empty(struct FileList* filelist);
92 void                            filelist_parent(struct FileList* filelist);
93
94 struct BlendHandle *filelist_lib(struct FileList* filelist);
95 int                                     filelist_islibrary (struct FileList* filelist, char* dir, char* group);
96 void                            filelist_from_main(struct FileList* filelist);
97 void                            filelist_from_library(struct FileList* filelist);
98 void                            filelist_freelib(struct FileList* filelist);
99 void                            filelist_hideparent(struct FileList* filelist, short hide);
100
101 struct ListBase *       folderlist_new(void);
102 void                            folderlist_free(struct ListBase* folderlist);
103 struct ListBase *       folderlist_duplicate(ListBase* folderlist);
104 void                            folderlist_popdir(struct ListBase* folderlist, char *dir);
105 void                            folderlist_pushdir(struct ListBase* folderlist, const char *dir);
106 int                                     folderlist_clear_next(struct SpaceFile* sfile);
107
108 void                            thumbnails_stop(struct FileList* filelist, const struct bContext* C);
109 void                            thumbnails_start(struct FileList* filelist, const struct bContext* C);
110 int                                     thumbnails_running(struct FileList* filelist, const struct bContext* C);
111
112 #ifdef __cplusplus
113 }
114 #endif
115
116 #endif
117