![]() |
![]() |
![]() |
Gwyddion Module Library Reference Manual | ![]() |
---|
gwymoduleenumsgwymoduleenums — Common enumerations |
enum GwyFileOperationType; enum GwyToolSwitchEvent; enum GwyRunType;
typedef enum { GWY_FILE_OPERATION_DETECT = 1 << 0, GWY_FILE_OPERATION_LOAD = 1 << 1, GWY_FILE_OPERATION_SAVE = 1 << 2, GWY_FILE_OPERATION_EXPORT = 1 << 3, GWY_FILE_OPERATION_MASK = 0x0f } GwyFileOperationType;
File type function file operations (capabilities).
The difference between save and export is that save is supposed to create a file containing fairly complete representation of the container, while export is the possibility to write some information so given file type. Generally only native file format module implements GWY_FILE_OPERATION_SAVE, all others implement GWY_FILE_OPERATION_EXPORT.
GWY_FILE_OPERATION_DETECT | Posibility to detect files are of this file type, |
GWY_FILE_OPERATION_LOAD | Posibility to load files of this type. |
GWY_FILE_OPERATION_SAVE | Posibility to save files of this type. |
GWY_FILE_OPERATION_EXPORT | Posibility to export files of this type. |
GWY_FILE_OPERATION_MASK | The mask for all the flags. |
typedef enum { GWY_TOOL_SWITCH_WINDOW = 1, GWY_TOOL_SWITCH_TOOL } GwyToolSwitchEvent;
Tool switch events.
GWY_TOOL_SWITCH_WINDOW | The tool should be set for the data window because the user switched windows. |
GWY_TOOL_SWITCH_TOOL | The tool should be set for the data window because the user switched tools. |
typedef enum { GWY_RUN_NONE = 0, GWY_RUN_NONINTERACTIVE = 1 << 0, GWY_RUN_INTERACTIVE = 1 << 1, GWY_RUN_IMMEDIATE = 1 << 2, GWY_RUN_MASK = 0x07 } GwyRunType;
Module function run-modes.
Note GWY_RUN_NONINTERACTIVE is only possible for file functions, processing functions do not have a truly non-interactive interface yet and therefore they should not claim they support it. The closest match for process functions is GWY_RUN_IMMEDIATE.
GWY_RUN_NONE | None. |
GWY_RUN_NONINTERACTIVE | The function is run non-interactively, it must not present any GUI and touch application state. |
GWY_RUN_INTERACTIVE | The function presents a modal user interfaces where parameters can be adjusted, it returns after finishing all operations. |
GWY_RUN_IMMEDIATE | Function is run immediately and uses parameter values stored in the settings to reproduce previous run. It can however present GUI error messages or display progress, create new widndows, etc. |
GWY_RUN_MASK | The mask for all the run modes. |
<< Gwyddion Module Library | gwymoduleloader >> |