Dialogs
API for obtaining file capabilities through open/save dialogs.
Types
oc_file_open_with_dialog_elt
typedef struct oc_file_open_with_dialog_elt
{
oc_list_elt listElt;
oc_file file;
} oc_file_open_with_dialog_elt;
An element of a list of file handles acquired through a file dialog.
oc_file_open_with_dialog_result
typedef struct oc_file_open_with_dialog_result
{
oc_file_dialog_button button;
oc_file file;
oc_list selection;
} oc_file_open_with_dialog_result;
A structure describing the result of a call to oc_file_open_with_dialog().
Fields
buttonThe button of the file dialog clicked by the user.fileThe file that was opened through the dialog. If the dialog had theOC_FILE_DIALOG_MULTIPLEflag set, this is equal to the first handle in theselectionlist.selectionIf the dialog had theOC_FILE_DIALOG_MULTIPLEflag set, this list ofoc_file_open_with_dialog_eltcontains the handles of the opened files.
Functions
oc_file_open_with_dialog
oc_file_open_with_dialog_result oc_file_open_with_dialog(oc_arena* arena, oc_file_access rights, oc_file_open_flags flags, oc_file_dialog_desc* desc);
Open files through a file dialog. This allows the user to select files outside the root directories currently accessible to the applications, giving them a way to provide new file capabilities to the application.
Parameters
arenaA memory arena on which to allocate elements of the result.rightsThe access rights requested on the files to open.flagsFlags controlling various options of the open operation. Seeoc_file_open_flags.descA structure controlling the options of the file dialog window.
Return
The result of the open operation.