1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2007 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 /** \file
21  * \ingroup wm
22  */
23 
24 #pragma once
25 
26 struct Main;
27 struct wmGenericCallback;
28 struct wmOperatorType;
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 /* wm_files.c */
35 void wm_history_file_read(void);
36 void wm_homefile_read(struct bContext *C,
37                       struct ReportList *reports,
38                       bool use_factory_settings,
39                       bool use_empty_data,
40                       bool use_data,
41                       bool use_userdef,
42                       const char *filepath_startup_override,
43                       const char *app_template_override,
44                       bool *r_is_factory_startup);
45 void wm_file_read_report(bContext *C, struct Main *bmain);
46 
47 void wm_close_file_dialog(bContext *C, struct wmGenericCallback *post_action);
48 bool wm_file_or_image_is_modified(const Main *bmain, const wmWindowManager *wm);
49 
50 void WM_OT_save_homefile(struct wmOperatorType *ot);
51 void WM_OT_save_userpref(struct wmOperatorType *ot);
52 void WM_OT_read_userpref(struct wmOperatorType *ot);
53 void WM_OT_read_factory_userpref(struct wmOperatorType *ot);
54 void WM_OT_read_history(struct wmOperatorType *ot);
55 void WM_OT_read_homefile(struct wmOperatorType *ot);
56 void WM_OT_read_factory_settings(struct wmOperatorType *ot);
57 
58 void WM_OT_open_mainfile(struct wmOperatorType *ot);
59 
60 void WM_OT_revert_mainfile(struct wmOperatorType *ot);
61 void WM_OT_recover_last_session(struct wmOperatorType *ot);
62 void WM_OT_recover_auto_save(struct wmOperatorType *ot);
63 
64 void WM_OT_save_as_mainfile(struct wmOperatorType *ot);
65 void WM_OT_save_mainfile(struct wmOperatorType *ot);
66 
67 /* wm_files_link.c */
68 void WM_OT_link(struct wmOperatorType *ot);
69 void WM_OT_append(struct wmOperatorType *ot);
70 
71 void WM_OT_lib_relocate(struct wmOperatorType *ot);
72 void WM_OT_lib_reload(struct wmOperatorType *ot);
73 
74 #ifdef __cplusplus
75 }
76 #endif
77