Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-05-17 18:31:26 +0300
committerJacques Lucke <mail@jlucke.com>2019-05-17 18:43:36 +0300
commit5ce3f69da438bf2bd58d5039f8a4165f31262e1e (patch)
tree4cc3347c85afe33a7d1a7fa761046eeafd9cdd92 /source/blender/windowmanager/wm_files.h
parent56cdb0cf15ac83852f8db5ca3f816dbed67add9c (diff)
UI: File Close Dialog
This adds a new dialog that is shown whenever a file is closed. So, either when a new file is opened, or when Blender quits. The dialog allows to save unsaved changes. Furthermore it also allows saving images that have been modified in Blender, but are not saved yet. Known limitations: * Images that have no file path and have not been packed before, are not saved. * On MacOS the old dialog is shown when Blender quits. Reviewers: brecht, billreynish Differential Revision: https://developer.blender.org/D4860
Diffstat (limited to 'source/blender/windowmanager/wm_files.h')
-rw-r--r--source/blender/windowmanager/wm_files.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/wm_files.h b/source/blender/windowmanager/wm_files.h
index 24209504a07..8b3f1ead215 100644
--- a/source/blender/windowmanager/wm_files.h
+++ b/source/blender/windowmanager/wm_files.h
@@ -40,6 +40,17 @@ void wm_homefile_read(struct bContext *C,
bool *r_is_factory_startup);
void wm_file_read_report(bContext *C, struct Main *bmain);
+typedef struct GenericCallback {
+ void (*exec)(bContext *C, void *user_data);
+ void *user_data;
+ void (*free_user_data)(void *user_data);
+} GenericCallback;
+
+GenericCallback *wm_generic_callback_steal(GenericCallback *callback);
+void wm_generic_callback_free(GenericCallback *callback);
+void wm_close_file_dialog(bContext *C, GenericCallback *post_action);
+bool wm_file_or_image_is_modified(const struct bContext *C);
+
void WM_OT_save_homefile(struct wmOperatorType *ot);
void WM_OT_userpref_autoexec_path_add(struct wmOperatorType *ot);
void WM_OT_userpref_autoexec_path_remove(struct wmOperatorType *ot);