|
|
1.1 ! root 1: #ifndef _FILEPICK_H_ ! 2: #define _FILEPICK_H_ ! 3: ! 4: #include "dirwrap.h" ! 5: #include "uifc.h" ! 6: ! 7: #define UIFC_FP_MSKNOCHG (1<<0) /* Don't allow user to change the file mask */ ! 8: #define UIFC_FP_MSKCASE (1<<1) /* Make the mask case-sensitive */ ! 9: #define UIFC_FP_UNIXSORT (1<<2) /* ToDo: Sort upper-case first, then lower-case */ ! 10: #define UIFC_FP_DIRSEL (1<<3) /* ToDo: Select directory, not file */ ! 11: #define UIFC_FP_PATHEXIST (1<<4) /* Do not allow selection of non-existant paths */ ! 12: #define UIFC_FP_FILEEXIST (1<<5) /* File must exist */ ! 13: #define UIFC_FP_SHOWHIDDEN (1<<6) /* Show hidden files */ ! 14: #define UIFC_FP_MULTI ((1<<7)|UIFC_FP_PATHEXIST|UIFC_FP_FILEEXIST) ! 15: /* ToDo: Allow multiple files to be chosen */ ! 16: ! 17: /* The following can NOT be used with multi selects (Returns an error) */ ! 18: #define UIFC_FP_ALLOWENTRY (1<<8) /* Allow user to type a file/path name */ ! 19: #define UIFC_FP_OVERPROMPT (1<<9) /* Prompt "Overwrite?" if file exists */ ! 20: #define UIFC_FP_CREATPROMPT (1<<10) /* Prompt "Create?" if file does not exist */ ! 21: ! 22: struct file_pick { ! 23: int files; ! 24: char **selected; ! 25: }; ! 26: ! 27: int filepick(uifcapi_t *api, char *title, struct file_pick *, char *initial_dir, char *default_mask, int opts); ! 28: int filepick_free(struct file_pick *); ! 29: ! 30: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.