diff options
Diffstat (limited to 'source/blender/editors/include/ED_fileselect.h')
-rw-r--r-- | source/blender/editors/include/ED_fileselect.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_fileselect.h b/source/blender/editors/include/ED_fileselect.h index 68b6e44371c..460de58bdb2 100644 --- a/source/blender/editors/include/ED_fileselect.h +++ b/source/blender/editors/include/ED_fileselect.h @@ -105,12 +105,26 @@ typedef struct FileSelection { struct View2D; struct rcti; +/** + * If needed, create and return the file select parameters for the active browse mode. + */ struct FileSelectParams *ED_fileselect_ensure_active_params(struct SpaceFile *sfile); +/** + * Get the file select parameters for the active browse mode. + */ struct FileSelectParams *ED_fileselect_get_active_params(const struct SpaceFile *sfile); struct FileSelectParams *ED_fileselect_get_file_params(const struct SpaceFile *sfile); struct FileAssetSelectParams *ED_fileselect_get_asset_params(const struct SpaceFile *sfile); +bool ED_fileselect_is_local_asset_library(const struct SpaceFile *sfile); void ED_fileselect_set_params_from_userdef(struct SpaceFile *sfile); +/** + * Update the user-preference data for the file space. In fact, this also contains some + * non-FileSelectParams data, but we can safely ignore this. + * + * \param temp_win_size: If the browser was opened in a temporary window, + * pass its size here so we can store that in the preferences. Otherwise NULL. + */ void ED_fileselect_params_to_userdef(struct SpaceFile *sfile, const int temp_win_size[2], const bool is_maximized); @@ -123,6 +137,10 @@ int ED_fileselect_layout_numfiles(FileLayout *layout, struct ARegion *region); int ED_fileselect_layout_offset(FileLayout *layout, int x, int y); FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const struct rcti *rect); +/** + * Get the currently visible bounds of the layout in screen space. Matches View2D.mask minus the + * top column-header row. + */ void ED_fileselect_layout_maskrect(const FileLayout *layout, const struct View2D *v2d, struct rcti *r_rect); @@ -149,8 +167,10 @@ struct ID *ED_fileselect_active_asset_get(const struct SpaceFile *sfile); void ED_fileselect_activate_asset_catalog(const struct SpaceFile *sfile, bUUID catalog_id); -/* Activate and select the file that corresponds to the given ID. - * Pass deferred=true to wait for the next refresh before activating. */ +/** + * Activate and select the file that corresponds to the given ID. + * Pass deferred=true to wait for the next refresh before activating. + */ void ED_fileselect_activate_by_id(struct SpaceFile *sfile, struct ID *asset_id, const bool deferred); @@ -165,12 +185,18 @@ void ED_fileselect_window_params_get(const struct wmWindow *win, struct ScrArea *ED_fileselect_handler_area_find(const struct wmWindow *win, const struct wmOperator *file_operator); +/* TODO: Maybe we should move this to BLI? + * On the other hand, it's using defines from space-file area, so not sure... */ int ED_path_extension_type(const char *path); int ED_file_extension_icon(const char *path); int ED_file_icon(const struct FileDirEntry *file); void ED_file_read_bookmarks(void); +/** + * Support updating the directory even when this isn't the active space + * needed so RNA properties update function isn't context sensitive, see T70255. + */ void ED_file_change_dir_ex(struct bContext *C, struct ScrArea *area); void ED_file_change_dir(struct bContext *C); |