Blender  V2.59
fsmenu.h
Go to the documentation of this file.
00001 /*
00002  * $Id: fsmenu.h 35242 2011-02-27 20:29:51Z jesterking $
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.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  * 
00029  */
00030 
00036 #ifndef BSE_FSMENU_H
00037 #define BSE_FSMENU_H
00038 
00039 /* XXX could become UserPref */
00040 #define FSMENU_RECENT_MAX 10
00041 
00042 typedef enum FSMenuCategory {
00043         FS_CATEGORY_SYSTEM,
00044         FS_CATEGORY_BOOKMARKS,
00045         FS_CATEGORY_RECENT
00046 } FSMenuCategory;
00047 
00048 struct FSMenu;
00049 
00050 struct FSMenu* fsmenu_get               (void);
00051 
00053 int             fsmenu_get_nentries             (struct FSMenu* fsmenu, FSMenuCategory category);
00054 
00058 char*   fsmenu_get_entry                (struct FSMenu* fsmenu, FSMenuCategory category, int index);
00059 
00064 void    fsmenu_insert_entry             (struct FSMenu* fsmenu, FSMenuCategory category, const char *path, int sorted, short save);
00065 
00067 short   fsmenu_can_save                 (struct FSMenu* fsmenu, FSMenuCategory category, int index);
00068 
00070 void    fsmenu_remove_entry             (struct FSMenu* fsmenu, FSMenuCategory category, int index);
00071 
00073 void    fsmenu_write_file               (struct FSMenu* fsmenu, const char *filename);
00074         
00076 void    fsmenu_read_bookmarks   (struct FSMenu* fsmenu, const char *filename);
00077 
00079 void    fsmenu_read_system      (struct FSMenu* fsmenu);
00080 
00082 void    fsmenu_free                             (struct FSMenu* fsmenu);
00083 
00084 #endif
00085