Gets the application data window interface for an object implementing this interface.
You can use the interface to call the interface's methods for the object. However, all are available as
gwy_app_data_window_get_data_kind() and similar function.
An object.
Auxiliary structure representing one data item in an open file.
The file data container number can be obtained with gwy_data_browser_get() and used to look up the data with
gwy_data_browser_get_number().
Numeric identifier of data data. Zero is used for none.
Numeric identifier of a specific data item, such as channel or graph number. Value -1 is used for none.
Creates a new data identifier on heap.
This is mostly useful for language bindings.
Newly allocated data id. It must be freed with gwy_app_data_id_free().
Numeric identifier of data data. Zero is used for none.
Numeric identifier of a specific data item, such as channel or graph number. Value -1 is used for none.
Creates a copy of data identifier.
This is mostly useful for language bindings.
Newly allocated data id. It must be freed with gwy_app_data_id_free().
Data identifier.
Frees a data identifier.
This is mostly useful for language bindings.
Data identifier.
Checks if numerical channel identifiers correspond to an existing channel.
If either the data contained referenced in @id or the channel does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents an existing channel it is kept intact and
the function returns %TRUE.
Whether @id refers to an existing channel now.
Numerical identifiers of a channel in data managed by the data browser.
Checks if numerical curve map data identifiers correspond to existing curve map data.
If either the data contained referenced in @id or the curve map data does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents existing curve map data it is kept intact
and the function returns %TRUE.
Whether @id refers to existing curve map data now.
Numerical identifiers of curve map data in data managed by the data browser.
Checks if numerical graph identifiers correspond to an existing graph.
If either the data contained referenced in @id or the graph model does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents an existing graph it is kept intact and
the function returns %TRUE.
Whether @id refers to an existing graph now.
Numerical identifiers of a graph in data managed by the data browser.
Checks if numerical spectra identifiers correspond to existing spectra.
If either the data contained referenced in @id or the spectra does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents existing spectra it is kept intact and the
function return %TRUE.
Whether @id refers to existing spectra now.
Numerical identifiers of spectra in data managed by the data browser.
Checks if numerical volume data identifiers correspond to existing volume data.
If either the data contained referenced in @id or the volume data does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents existing volume data it is kept intact and
the function returns %TRUE.
Whether @id refers to existing volume data now.
Numerical identifiers of volume data in data managed by the data browser.
Checks if numerical XYZ data identifiers correspond to existing XYZ data.
If either the data contained referenced in @id or the XYZ data does not exist the structure is cleared to
%GWY_APP_DATA_ID_NONE and the function returns %FALSE. If it represents existing XYZ data it is kept intact and
the function returns %TRUE.
Whether @id refers to existing XYZ data now.
Numerical identifiers of XYZ data in data managed by the data browser.
Formal type of application data windows.
Gets root of accelerator map entries for a window displaying some data.
The returned string is the "<WINDOWTYPE>" part of the accelerator path for the particular window, which GTK+
defines as a unique application-specific identifier that corresponds to the kind of window the accelerator is being
used in. Many data windows of the same kind can exist simultaneously and they all have the same prefix, for example
all volume data windows have the prefix "<volume>".
The accelerator map root.
Gets the kind of data displayed in a window.
The data kind.
Gets the file containing the data displayed in a window.
The file data container.
Gets the numerical id of data item displayed in a window.
The numerical id in the file.
Gets root of accelerator map entries for a window displaying some data.
The returned string is the "<WINDOWTYPE>" part of the accelerator path for the particular window, which GTK+
defines as a unique application-specific identifier that corresponds to the kind of window the accelerator is being
used in. Many data windows of the same kind can exist simultaneously and they all have the same prefix, for example
all volume data windows have the prefix "<volume>".
The accelerator map root.
A window showing some data.
Gets the kind of data displayed in a window.
The data kind.
A window showing some data.
Gets the file containing the data displayed in a window.
The file data container.
A window showing some data.
Gets the numerical id of data item displayed in a window.
The numerical id in the file.
A window showing some data.
The file data container.
The data kind.
The numerical id in the file.
The accelerator map root.
Creates a new app image data window.
The arguments must correspond to a valid data object in @file which can be visualised as a graph. Possible data
kinds include @GWY_FILE_GRAPH and @GWY_FILE_SPECTRA.
Use #GwyAppDataWindow methods to query the parameters later.
A newly created window.
A data file container.
Type of the data object.
Data item id.
Creates a new app image data window.
The arguments must correspond to a valid data object in @file which can be visualised as an image. Possible data
kinds include @GWY_FILE_IMAGE, @GWY_FILE_VOLUME, @GWY_FILE_XYZ and @GWY_FILE_CMAP.
Use #GwyAppDataWindow methods to query the parameters later.
A newly created window.
A data file container.
Type of the data object.
Data item id.
Flags controlling where program messages are written.
Messages go to a log file, either gwyddion.log or given by environment variable
GWYDDION_LOGFILE.
Messages go to standard output and standard error depending on message type (emulating
where GLib sends them).
Error codes returned by application settings functions.
Settings file is not readable or writable.
Settings file contents is corrupt.
User configuration directory is not readable or writable or it does not exist and
its creation failed.
Settings file is empty. Unlike corrupt files, which may contain valuable
information, empty settings files can be overwritten without losing anything.
Returns error domain for application settings operations.
See and use %GWY_APP_SETTINGS_ERROR.
The error domain.
Type of function constructing a string.
A new string.
The data passed when the function was set up.
Type of function constructing a widget.
A new widget.
The data passed when the function was set up.
Type of data file for-each function.
Such function is passed to gwy_data_browser_foreach().
A data container managed by the data-browser.
User data passed to gwy_data_browser_foreach().
Creates a data chooser for a given kind of data.
A new data chooser. Nothing may be assumed about the type and properties of the returned widget as
they can change in the future.
Data kind the chooser should display.
Gets the selected item in a data chooser.
The data selected data lies in, %NULL if nothing is selected or `none' item is selected.
A data chooser.
Location to store selected data id to (may be %NULL).
Gets the selected item in a data chooser as numerical identifiers.
%TRUE if any actual data item is selected. %FALSE is nothing is selected or the ‘none’ item is selected.
A data chooser.
Location for the id selected data item.
Reports the type of data a chooser was created for.
The data kind of the chooser.
A data chooser.
Gets the tree model filter used in a data chooser.
In general, you should not access the filter directly. An exception being gtk_tree_model_filter_refilter() when
the filtering functions given in gwy_data_chooser_set_filter() depends on external state and that state changes.
However, gwy_data_chooser_refilter() is usually more useful.
The #GtkTreeModelFilter object used by the chooser.
A data chooser.
Gets the label of the item corresponding to no data.
The label corresponding to no data, an empty string for the default label and %NULL if the chooser does
not display the no-data item.
A data chooser.
Reruns the filter function of a data chooser.
This function is useful when the filtering functions given in gwy_data_chooser_set_filter() depends on external
state and that state changes.
If the currently selected item becomes filtered out the chooser selects the no-data item if enabled. If the
no-data item is disabled but the list contains some items then an arbitrary item is selected. At present, this
means the first item in the list.
A data chooser.
Selects a data in a data chooser.
%TRUE if selected item was set.
A data chooser.
Container to select, %NULL to select none (if the chooser contains `none' item).
Id of particular data to select in @data.
Selects a data in a data chooser using numerical identifiers.
Passing %NULL as @id is permitted as a request to select the ‘none’ item.
%TRUE if selected item was set.
A data chooser.
Data item to select.
Sets the filter applied to a data chooser.
The display of an item corresponding to no data is controlled by gwy_data_chooser_set_none(), @filter function is
only called for real data.
Use gwy_data_chooser_refilter() to update the list if the filter depends on external state and that changes.
A data chooser.
The filter function.
The data passed to @filter.
Destroy notifier of @user_data or %NULL.
Sets the label of the item corresponding to no data.
A data chooser.
Label to use for item corresponding to no data. Passing %NULL, disables such an item, an empty string
enables it with the default label.
The type of data chooser filter function.
%TRUE to display this data in the chooser, %FALSE to omit it.
Data data.
Id of particular data in @data.
Data passed to gwy_data_chooser_set_filter().
Basic kind of data which can be found in Gwyddion data files.
No data. Often meaning an error, sometimes also special data keys not related to any specific
data.
An image, primarily represented as #GwyField.
A graph, primarily represented as #GwyGraphModel.
Single point spectra, primarily represented as #GwySpectra.
Volume data, primarily represented as #GwyBrick.
XYZ data, primarily represented as #GwyScatter.
A curve map, primarily represented as #GwyLawn.
Type of event reported to #GwyDataWatchFunc watcher functions.
A new data object has appeared.
A data object has changed.
A data object has been removed.
Type of data watch function.
Such function is passed to gwy_data_browser_add_watch().
A data container managed by the data-browser.
Object (channel) id in the container.
The type of data change event reported.
User data passed to gwy_data_browser_add_watch().
Object representing a set of parameter definitions.
The #GwyDialog struct contains no public fields.
Creates a new data processing module dialog window.
The dialog is modal by default.
A new data processing module dialog window.
Title of the dialog window or %NULL.
Adds a widget to the data processing module dialog window content area.
By tradition, the dialog content is in a vertical #GtkBox. Parameters @expand, @fill and @padding have the same
meaning as in gtk_box_pack_start().
A data processing module dialog window.
Child widget to add.
%TRUE if the @child is to be given extra space allocated to the content area.
%TRUE if space given by @expand option is actually allocated to @child, rather than just padding it
Extra space to put between @child and its neighbours, including outer edges.
Adds stock buttons to data processing module dialog window.
Several items are handled by the dialog itself, although you can still respond to them in your own handler (which
is most useful custom resetting actions).
%GWY_STOCK_OK creates an OK button which finishes the dialog with result %GWY_DIALOG_PROCEED or
%GWY_DIALOG_HAVE_RESULT, depending on whether the result has been calculated. If an OK button is present, it
becomes the default dialog response.
%GWY_STOCK_CANCEL creates a Cancel button and %GWY_STOCK_CLOSE a Close button. Either finishes the dialog with
result %GWY_DIALOG_CANCEL. The Close button should be used when no further action exist that could be executed and
there would be no meaningful difference between OK and Cancel. In such case, it should be the only final-response
button. If a Close button is present (and no OK), it becomes the default dialog response.
%GWY_STOCK_UPDATE creates an Update button. It runs the preview function if updates are manual or instant updates
are disabled.
%GWY_STOCK_RESET creates a Reset button. It resets all the parameter tables in the dialog.
A data processing module dialog window.
Predefined button type.
List of more item identifiers, terminated by GWY_STOCK_NONE (or zero).
Notifies a data processing module dialog preview that results are available.
Modules may not have any other means of preview than the full computation of the final result. It is then useful
to keep track whether it has been already computed to prevent unnecessary work.
Calling this function makes gwy_dialog_run() return %GWY_DIALOG_HAVE_RESULT instead of the usual OK response
%GWY_DIALOG_PROCEED. This indicates the result do not need to be recalculated (presumably you stored them in
a safe place). The state is reset back to no results by gwy_dialog_invalidate().
A data processing module dialog window.
Notifies a data processing module that dialog preview is no longer valid.
This function should be called from #GwyParamTable::param-changed when a parameter influencing the result has
changed. This means most parameter changes. Some parameter do not require invalidation, for instance target
graphs or mask colours.
The function can have multiple effects. In all cases it resets the outcome state back to having no results
(nullifying any previous gwy_dialog_have_result()). Furthermore, if the preview style is %GWY_PREVIEW_IMMEDIATE
and instant updates are enabled it queues up a preview recomputation. The preview is added as an idle source to
the GTK+ main loop. Therefore, the computation is rerun after a short delay and gwy_dialog_invalidate() can be
safely called multiple times in succession without triggering multiple recomputations.
A data processing module dialog window.
Runs a data processing module dialog window.
This function does not return until the dialog finishes with a final outcome. The final outcome is usually either
cancellation or an OK response, as indicated by the return value. Other response types – preview, parameter reset
or help – are generally handled inside and do not cause this function to return. Furthermore, the dialog is always
destroyed when the function returns. These are the main differences from gtk_dialog_run().
The final outcome of the dialog.
A data processing module dialog window.
Sets the id of instant updates parameter for a data processing module dialog window.
The parameter must be a boolean. When it is %TRUE previews are immediate and the dialog button corresponding to
%GWY_RESPONSE_UPDATE is insensitive. When it is %FALSE previews are manual, on pressing the dialog button which
is now sensitive.
Setting the instant updates parameter makes the sensitivity of update dialog button automatic. If you need more
control over it do not use this function.
A data processing module dialog window.
Parameter identifier.
Sets the preview function for a data processing module dialog.
The preview function is called automatically when the dialog receives %GWY_RESPONSE_UPDATE response and/or after
gwy_dialog_invalidate(). Use gwy_dialog_set_instant_updates_param() if you have a parameter controlling instant
updates.
A data processing module dialog window.
Preview style to use.
Function which performs the preview (or %NULL for %GWY_PREVIEW_NONE).
User data to pass to @preview.
Function to call to free @user_data (or %NULL).
Reports whether preview was explicitly requested by the user.
If the dialog has both immediate (partial) previews and an Update button to run a slower computation, the preview
function usually needs to distinguish between invocations from invalidation and pressing Update button. It can be
done using this function. If the preview is invoked by user pressing button with %GWY_RESPONSE_UPDATE response id
then it returns %TRUE, otherwise %FALSE.
%TRUE if the Update button has been pressed since the last preview; %FALSE if it has not been pressed.
A data processing module dialog window.
Class of parameter definition sets.
Type of conclusion from a data processing module dialog.
The dialog was cancelled or destroyed. The module should save changed parameters but no data
should be modified. This response is also returned for Close buttons used when there is no
action to execute.
The computation should proceed. Normally this means the user pressed the OK button. If the
results are already available %GWY_DIALOG_HAVE_RESULT is used instead.
The computation has already been done. This response is used when
gwy_dialog_have_result() has been called since the last gwy_dialog_invalidate().
Protoype of #GwyDialog preview functions.
User data to passed to gwy_dialog_set_preview_func().
Type of enum filtering function.
%TRUE to include this value; %FALSE to exclude it.
Pointer to an enumerated value, represented as #GwyEnum.
The data passed to the driver function.
The size of #GwyFileDetectInfo buffer for initial part of file. It should be enough for any normal kind of magic
header test.
This is the maximum size. If the file is tiny the buffer contains less data. Always use @buffer_len in the info
structure for the actual size.
Invalid file id value indicating an unmanaged file.
Only files managed by the data browser have an id. A free-standing file object does not have any. Using
gwy_file_get_id() on such file gives this value. The value can also represent an error.
False colour mapping type. Predefined item synchonisation flag.
Image mask. Predefined item synchonisation flag.
Mask colour. Predefined item synchonisation flag.
Data item metadata. Predefined item synchonisation flag.
False colour mapping gradient. Predefined item synchonisation flag.
Object representing the visualisation or preview of the data. Predefined item synchonisation flag.
False colour mapping range. Predefined item synchonisation flag.
Pixel/real aspect ratio. Predefined item synchonisation flag.
Image selections. Predefined item synchonisation flag.
Data item title. Predefined item synchonisation flag.
Window size or scaling. Predefined item synchonisation flag.
Prefix of curve map string keys in Gwyddion data files.
Prefix of graph string keys in Gwyddion data files.
Prefix of image string keys in Gwyddion data files.
Prefix of single point spectra string keys in Gwyddion data files.
Prefix of volume data string keys in Gwyddion data files.
Prefix of XYZ data string keys in Gwyddion data files.
The #GwyFile struct contains private data only and should be accessed using the functions below.
Creates a new #GwyFile.
A new data file container.
Creates a new #GwyFile and marks is as being in construction.
This is a convenience function calling gwy_dict_start_construction() on the newly created file.
A new data file container.
Detects the type of a file and gives the score.
The score is normally between 0 and 100. When an I/O error occurs or the file simply does not exist, the score is
set to a negative value.
The type name (i.e., the same name as passed to e.g. gwy_file_func_run_load()) of most probable type of
@filename, or %NULL if there's no probable one.
A file name to detect type of.
Whether to use only file name for a guess, or try to actually access the file.
The file operations the file type must support (it must support all of them to be considered).
Location to store the maximum score (corresponding to the returned type) to, or %NULL.
Obtains the name of currently running file type function.
All file functions are taken into account: detect, load, save and export.
If no file type function is currently running, %NULL is returned.
If multiple nested file functions are running (which is not usual but technically possible), the innermost function
name is returned. If nested function of different types are running (which is not usual but technically possible)
the other types do not affect the returned value; only file functions are taken into account.
The name of the currently running file type function or %NULL.
Checks whether a file type function exists.
%TRUE if function @name exists, %FALSE otherwise.
File type function name.
Calls a function for each file function.
Function to run for each file function. It will get function name (constant string owned by module
system) as its first argument, @user_data as the second argument.
Data to pass to @function.
Gets file function description.
That is, the @description argument of gwy_file_func_register() .
File function description, as a string owned by module loader.
File type function name.
Reports if the file format is reasonably detectable.
This is %TRUE for all file types that define a detection method unless they explicitly call
gwy_file_func_set_is_detectable() to set the file format non-detectable in spite of providing a detection method.
If files that can be actually loaded as a given type form a subset of files that are detected as this format, which
is normaly the case, it makes no sense to let the user explicitly choose between these formats. Hence, detectable
formats normally are not explicitly offered.
If the file format is detectable.
File type function name.
Reports if the file format implementation is unfinished.
%TRUE if the file format is considered unfinished.
File type function name.
Returns operations supported by a file type function.
The file operation bit mask, zero if @name does not exist.
File type function name.
Registers a file format and defines which file operations it supports.
At least one of @load_file, @save_file, and @export_file must be non-%NULL. See #GwyFileOperationType for
differences between save and export.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get chance to clean-up.
It is possible to register the same routines such as @load_file for multiple file types (as distinguished by
@name). In such case they must use gwy_file_func_current() to see under which name they are called. It may be
easier to register different routines which then call the same function within the module with some
distinguishing argument.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
File type description (will be used in file type selectors).
Detection function. It may be %NULL, files of such a type can can be then loaded and saved only on
explict user request.
File load/import function.
File save function.
File export function.
Runs a file type detection function identified by @name.
Value of @only_name should be %TRUE if the file doesn't exist (is to be written) so its contents can't be used for
file type detection.
This is a low-level function, consider using gwy_file_detect() if you simply want to detect a file type.
An integer score expressing the likelyhood of the file being loadable as this type. See #GwyFileDetectFunc
for more details.
A file type function name.
A file name to detect.
Whether to use only file name for a guess, or try to actually access the file.
Runs a file export function identified by @name.
It guarantees the container lifetime spans through the actual file saving, so the module function doesn't have to
care about it.
This is a low-level function, consider using gwy_file_save() if you simply want to save a file.
%TRUE if file save succeeded, %FALSE otherwise.
A file save function name.
A #GwyFile to save.
A file name to save @file as.
Run mode.
Runs a file load function identified by @name.
This is a low-level function, consider using gwy_file_load() if you simply want to load a file.
The returned object is never marked as in construction; it is always already finished.
A new #GwyFile with data from @filename, or %NULL.
A file load function name.
A file name to load data from.
Run mode.
Runs a file save function identified by @name.
It guarantees the container lifetime spans through the actual file saving, so the module function doesn't have to
care about it.
This is a low-level function, consider using gwy_file_save() if you simply want to save a file.
%TRUE if file save succeeded, %FALSE otherwise.
A file save function name.
A #GwyFile to save.
A file name to save @file as.
Run mode.
Sets the detectability status of a file format.
See gwy_file_func_get_is_detectable() for details. The only rare case when it makes sense to call this function is
when a detection function is provided for some reason, however, this function is not really able to detect the
format. For instance, the fallback detection method of the Gwyddion rawfile module.
File type function name.
%TRUE to define format as detectable, %FALSE as non-detectable.
Sets the unfinished status of a file format.
Marking a file format as unfinished is informative.
It should be done under two conditions. The file module can actually read the files and create some images (or
other data); if it cannot it should not register the file loading function. But the data it creates are wrong and
possibly misleading. For example it is known the conversion from raw to physical values just does not work. It
should not be marked when the support for some features is simply missing or the import mostly works fine, but it
might not in some specific cases due to the file format complexity.
Gwyddion can then warn when users are opening such files.
File type function name.
%TRUE if the file format implementation should be considered unfinished.
Constructs #GwyLawn curve map quark identifier from its id.
The quark key identifying #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs #GwyLawn curve map title quark identifier from its id.
The quark key identifying metadata container of #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs #GwyLawn curve map palette quark identifier from its id.
The quark key identifying string name palette of #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs #GwyLawn curve map preview quark identifier from its id.
The quark key identifying preview data field of #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs #GwyLawn curve map real-square quark identifier from its id.
The quark key identifying boolean controlling real-square setting of #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs #GwyLawn curve map title quark identifier from its id.
The quark key identifying string title of #GwyLawn curve map with number @id.
Numerical id of a #GwyLawn curve map in file.
Constructs the quark identifier for a data kind and numerical id.
The quark key identifying the data.
Type of data item.
Numerical id of a data item in file.
Returns the file name quark identifier.
The quark key identifying the file name.
Constructs graph model quark identifier from its id.
The quark key identifying graph model with number @id.
Numerical id of a graph in file.
Constructs image data quark identifier from its id.
The quark key identifying image data with number @id.
Numerical id of an image in file.
Constructs data field color mapping quark identifier from its id.
The quark key identifying #GwyColorMappingType false colour mapping type of image with number @id.
Numerical id of a image in file.
Constructs image mask data quark identifier from its id.
The quark key identifying image mask data with number @id.
Numerical id of an image mask in file.
Constructs image mask color quark identifier from its id.
The quark key identifying string color of image mask with number @id.
Numerical id of an image in file.
Constructs data field metadata quark identifier from its id.
The quark key identifying metadata container of image with number @id.
Numerical id of a image in file.
Constructs data field palette quark identifier from its id.
The quark key identifying string name palette of image with number @id.
Numerical id of a image in file.
Constructs image presentation data quark identifier from its id.
The quark key identifying image presentation data with number @id.
Numerical id of an image in file.
Constructs data field fixed range maximum quark identifier from its id.
The quark key identifying floating fixed false colour range maximum of image with number @id.
Numerical id of a image in file.
Constructs data field fixed range minimum quark identifier from its id.
The quark key identifying floating fixed false colour range minimum of image with number @id.
Numerical id of a image in file.
Constructs data field real-square quark identifier from its id.
The quark key identifying boolean controlling real-square setting of image with number @id.
Numerical id of a image in file.
Constructs data field selection quark identifier from its id and selection name.
If @name is %NULL or empty the base selections key is constructed, with no suffix for a specific selection.
The quark key identifying a #GwySelection for image with number @id.
Numerical id of a image in file.
Selection name (suffix of the string key).
Constructs data field title quark identifier from its id.
The quark key identifying string title of image with number @id.
Numerical id of a image in file.
Constructs spectra quark identifier from its id.
The quark key identifying spectra with number @id.
Numerical id of a spectra set in file.
Constructs data brick quark identifier from its id.
The quark key identifying data brick with number @id.
Numerical id of a data brick in file.
Constructs volume mask data quark identifier from its id.
The quark key identifying volume mask data with number @id.
Numerical id of a volume data in file.
Constructs volume mask color quark identifier from its id.
The quark key identifying string color of volume mask with number @id.
Numerical id of a volume data in file.
Constructs data brick title quark identifier from its id.
The quark key identifying metadata container of data brick with number @id.
Numerical id of a data brick in file.
Constructs data brick palette quark identifier from its id.
The quark key identifying string name palette of data brick with number @id.
Numerical id of a data brick in file.
Constructs data brick preview quark identifier from its id.
The quark key identifying preview data field of data brick with number @id.
Numerical id of a data brick in file.
Constructs data brick title quark identifier from its id.
The quark key identifying string title of data brick with number @id.
Numerical id of a data brick in file.
Constructs XYZ scattered data quark identifier from its id.
The quark key identifying XYZ scattered data with number @id.
Numerical id of an XYZ scattered data in file.
Constructs XYZ scattered data title quark identifier from its id.
The quark key identifying metadata container of XYZ scattered data with number @id.
Numerical id of an XYZ scattered data in file.
Constructs XYZ scattered data palette quark identifier from its id.
The quark key identifying string name palette of XYZ scattered data with number @id.
Numerical id of an XYZ scattered data in file.
Constructs XYZ scattered data preview quark identifier from its id.
The quark key identifying preview data field of XYZ scattered data with number @id.
Numerical id of an XYZ scattered data in file.
Constructs XYZ scattered data title quark identifier from its id.
The quark key identifying string title of XYZ scattered data with number @id.
Numerical id of a XYZ scattered data in file.
Loads a data file, autodetecting its type.
The returned object is never marked as in construction; it is always already finished.
A new #GwyFile with data from @filename, or %NULL.
A file name to load data from, in GLib encoding.
Run mode.
Loads a data file, autodetecting its type.
The returned object is never marked as in construction; it is always already finished.
A new #GwyFile with data from @filename, or %NULL.
A file name to load data from, in GLib encoding.
Run mode.
Location to store the name of file load function used to load the file, or %NULL. If an error occurs
outside the module, e.g. failure to recognise the file type, %NULL is stored to @name.
Adds a data lawn representing an curve map data to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_cmap().
A new unused id is assigned to the curve map data and returned. Generally, it is the lowest integer larger than any
existing curve map data id (however, there are no specific guarantees).
The curve map data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
The id of the newly added curve map data in the file.
A data file container to add @lawn to.
Data lawn to add.
Data field to use as the preview. You can also pass %NULL to create a preview automatically.
Adds a graph model representing a graph to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_graph().
A new unused id is assigned to the graph and returned. Generally, it is the lowest integer larger than any existing
graph id (however, there are no specific guarantees).
The graph is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising other settings.
The id of the newly added graph in the file.
A data file container to add @graph to.
Graph model to add.
Adds a data field representing an image to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_image().
A new unused id is assigned to the image and returned. Generally, it is the lowest integer larger than any existing
image id (however, there are no specific guarantees).
The image is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising visualisation settings like the colour mapping.
The id of the newly added image in the file.
A data file container to add @field to.
Data field representing an image to add.
Adds a spectra representing a single point spectra to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_spectra().
A new unused id is assigned to the spectra and returned. Generally, it is the lowest integer larger than any
existing spectra id (however, there are no specific guarantees).
The spectra are not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to show it,
preferrably after setting or synchronising other settings.
The id of the newly added spectra in the file.
A data file container to add @spectra to.
Single point spectra to add.
Adds a data brick representing an volume data to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_volume().
A new unused id is assigned to the volume data and returned. Generally, it is the lowest integer larger than any
existing volume data id (however, there are no specific guarantees).
The volume data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
The id of the newly added volume data in the file.
A data file container to add @brick to.
Data brick to add.
Data field to use as the preview. You can also pass %NULL to create a preview automatically.
Adds a data scatter representing an XYZ data to a file data container.
The file cannot be in construction (see gwy_dict_start_construction()). In particular, this function is not
suitable for the import of data from third party file formats, use gwy_file_pass_xyz().
A new unused id is assigned to the XYZ data and returned. Generally, it is the lowest integer larger than any
existing XYZ data id (however, there are no specific guarantees).
The XYZ data is not immediately shown in a new window when the GUI is running. Use gwy_file_set_visible() to
show it, preferrably after setting or synchronising visualisation settings like the colour mapping.
The id of the newly added XYZ data in the file.
A data file container to add @scatter to.
XYZ data scatter to add.
Create a new data file as a copy of an existing one.
This function is a convenience gwy_serializable_copy() wrapper.
A copy of the data file.
A data file to duplicate.
Completely duplicates data in a data file container including all auxiliary information.
The source and destination files may be the same file. Visibility is not copied; the new data object is created as
not visible. The log is not copied either. See also gwy_data_browser_copy_data() for somewhat a more high-level
function for copying data in managed files.
The id of the newly added data in file @destination.
Source data file container.
Type of data object.
Source numerical id of data object.
Destination data file container.
Gets the list of all data objects in a data file container whose titles match the specified pattern.
If titleglob is %NULL the function is identical to gwy_file_get_ids().
For data objects with no title the synthetic title produced by gwy_file_get_display_title() is used.
A newly allocated, −1-terminated list of all the ids.
A data file container.
Type of data object.
Pattern, as used by #GPatternSpec, to match the data titles against.
Gets a data lawn representing a curve map in a data file container.
It is not an error to ask for a curve map which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Data lawn representing a curve map, or %NULL.
A data file container.
Numerical id of a curve map in @file.
Gets the colour mapping type for data visualisation in a data file container.
If no mapping is set, the current default mapping type from user settings is returned.
The colour mapping type.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets the primary data object of specified type and id.
The type of the returned object is whatever is appropriate for given data kind. This function is mainly useful
when you need to check generically a data object for some data management purpose. For data processing, usually
functions such as gwy_file_get_image() or gwy_file_get_volume() are preferred as they return a specific type.
It is not an error to ask for an object which does not exist in the file. The function returns %NULL in such case.
However, @data_kind and @id must be valid in principle.
The main data object in the file corresponding to @data_kind and @id, or %NULL if it does not exist.
A data file container.
Type of data object.
Numerical id of data in file.
Gets a suitable title of a data object in a file data container.
The function returns a non-%NULL string even if no data title has been set or is empty. It is something like
‘Untitled 123’ in such case. It makes it useful for having at least some identifying label for all data objects,
regardless if they have any title set. However, if you really need to know whether a title has been set use
gwy_file_get_title().
The title as a newly allocated string.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets the file name corresponding to a data file container.
The file name is set on two ocasions: file load and successful file save. File export does not set it.
File name of @data (in GLib encoding), or %NULL. The returned string is owned by @file and is valid only
until it is destroyed or saved again.
A data file
Gets the fixed colour mapping range for data visualisation in a data file container.
It is possible (although unusual) to request just one of the values, or even none.
%TRUE if all requested values were retrieved, %FALSE otherwise.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Location to store fixed range minimum.
Location to store fixed range maximum.
Gets the file format name for a data file container.
The file format name is the name of file import function used to import the data.
The file format name, possibly %NULL.
A data file container.
Gets a graph model representing a graph in a data file container.
It is not an error to ask for a graph which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Graph model representing a graph, or %NULL.
A data file container.
Numerical id of a graph in @file.
Gets the numerical identifier of a file.
Only files managed by the data browser have an id. %GWY_FILE_ID_NONE is returned for free-standing files. You can
check whether a file is managed by calling this function and comparing the returned id to %GWY_FILE_ID_NONE.
The identifier is not reused and does not change during program's lifetime. See also gwy_data_browser_get_file().
For convenience, %NULL can be also passed. The function then returns a negative value (%GWY_FILE_ID_NONE).
The id (a nonnegative integer), possibly %GWY_FILE_ID_NONE.
A data file container.
Gets the list of ids of all objects of given kind in a file.
When there are no data objects of given kind, a non-%NULL array is still returned. It contains the single value -1.
The file must not be in construction.
A newly allocated, −1-terminated list of all the ids.
A data file container.
Type of data object.
Gets the list of ids of all objects of given kind in a file.
The returned pointer remains valid only as long as @file exists and data objects of kind @data_kind are not added
or removed. The array is not −1-terminated so unless you obtain the number of data objects by other means you need
to get @n.
The file must not be in construction.
A newly allocated list of all the ids with @n elements.
A data file container.
Type of data object.
Location to store the number of returned ids.
Gets a data field representing an image in a data file container.
It is not an error to ask for an image which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Data field representing an image, or %NULL.
A data file container.
Numerical id of an image in @file.
Gets a number field representing the image mask in a data file container.
It is not an error to ask for a mask which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Data field representing the mask, or %NULL.
A data file container.
Numerical id of an image mask in @file.
Gets the metadata for a data object in a data file container.
A data container holding data object's metadata.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets the number of data objects of a given kind in a file.
This is the preferred function for checking whether there are any data of given kind at all.
The file must not be in construction.
The number of data items.
A data file container.
Type of data object.
Gets the gradient name for data visualisation in a data file container.
The gradient name as a string owned by the file. It can be %NULL if no gradient is set.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets a spectra object representing single point spectra in a data file container.
It is not an error to ask for single point spectra which does not exist in the file. The function returns %NULL in
such case. However, @id must be valid (non-negative).
Spectra object representing single point spectra, or %NULL.
A data file container.
Numerical id of single point spectra in @file.
Gets the title of a data object in a file data container.
If no title is set this function can return %NULL. Use gwy_file_get_display_title() if you want to always get
some useful identifying string.
The title as a string owned by the corresponding data object.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets the visivility status of a data object in a data file container.
The function returning %TRUE does not mean the data object is actually displayed in some window. It simply returns
the value of the flag and can be used with standalone files with no GUI running.
%TRUE if the object is marked visible, %FALSE otherwise.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gets a data brick representing volume data in a data file container.
It is not an error to ask for volume data which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Data brick representing volume data, or %NULL.
A data file container.
Numerical id of volume data in @file.
Gets a scatter object representing XYZ data in a data file container.
It is not an error to ask for XYZ data which does not exist in the file. The function returns %NULL in such case.
However, @id must be valid (non-negative).
Scatter object representing XYZ data, or %NULL.
A data file container.
Numerical id of XYZ data in @file.
Merges a data file container into another.
The caller passes its reference on @otherfile to the function. The function releases the reference when it is
finished. The underlying assumption is that @otherfile is then destroyed. This enables an efficient merge as
objects in @otherfile can simply be added to @file and expensive copying is avoided. Keeping @otherfile around
after merging is not recommended. Use gwy_file_copy() on @otherfile beforhand if you want to add a copy of all its
data to @file.
This is a low-level function and does not handle logs. The caller can use the @merge callback to copy logs and
add new log entries for the merge operation if appropriate.
If @merged is given, it is called for each transferred item after the transfer is completely done, but before
visibility is set (i.e. before any widgets would be created if @file is displayed in the GUI). Source file will be
@otherfile and destination file @file. Since the transfer is already done, @merge can modify the @file. However,
caution is advised as changes can have cascading effects.
A data file container.
A file to merge into @file. It must not be @file itself and must not be managed by the data browser.
Optional function to call for each copied data item.
Data passed to @merged.
Function to destroy user data when done, possibly %NULL.
Sets a data lawn as the a curve map in a data file container passing the ownership to the file.
A data file container.
Numerical id of a curve map in @file.
Data lawn representing a curve map.
Sets a graph model as the graph in a data file container passing the ownership to the file.
A data file container.
Numerical id of a graph in @file.
Graph model representing a graph.
Sets a data field as the image in a data file container passing the ownership to the file.
A data file container.
Numerical id of an image in @file.
Data field representing an image.
Sets a number field as the image mask in a data file container passing the ownership to the file.
A data file container.
Numerical id of an image mask in @file.
Data field representing a mask.
Sets the metadata for a data object in a data file container.
This is a convenience wrapper for gwy_dict_pass_object() with slightly more checking. It can be used with
files in construction (see gwy_dict_new_in_construction()) and is most useful in file import modules.
If @meta has still the in-construction flag set, the function calls gwy_dict_finish_construction() on it.
Preferably set the metadata after @meta has been filled with values.
Analogous function gwy_file_set_meta() is missing intentionally. It creates too big temptation to use the same
object as metadata for multiple data, which is an error. Use #GwyFile functions to get the key and #GwyDict
functions to set the object if you really need to keep the metadata around after puttng it to the file. The useful
idioms are the following.
With a function which creates metadata:
|[
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id, create_metadata(...));
]|
With the same metadata for many data items:
|[
meta = create_metadata(...);
...
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id1, gwy_dict_copy(meta));
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id2, gwy_dict_copy(meta));
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id3, gwy_dict_copy(meta));
...
g_object_unref(meta);
]|
With optional metadata:
|[
meta = gwy_dict_new();
...
if (gwy_dict_get_n_items(meta))
gwy_file_pass_meta(file, GWY_FILE_IMAGE, id, meta));
else
g_object_unref(meta);
]|
A data file container.
Type of data object.
Numerical id of a data object in @file.
A data container holding data object's metadata. The reference is passed to @file.
Sets a spectra object as the single point spectra in a data file container passing the ownership to the file.
A data file container.
Numerical id of single point spectra in @file.
Spectra object representing single point spectra.
Sets the title of a data object in a file data container, passing string ownership.
This is a convenience wrapper, abstracting setting the title for different data types.
Unlike in gwy_file_set_title(), @name is always used unmodified and may not be %NULL. Uts ownership is passed to
the file (or other object).
The function can be used with files in construction (see gwy_dict_new_in_construction()), provided that the
tiltle is set after the primary data object.
A data file container.
Type of data object.
Numerical id of an existing data object in @file.
Title to set. It may not be %NULL.
Sets a data brick as the volume data in a data file container passing the ownership to the file.
A data file container.
Numerical id of volume data in @file.
Data brick representing volume data.
Sets a scatter object as the XYZ data in a data file container passing the ownership to the file.
A data file container.
Numerical id of XYZ data in @file.
Scatter object representing XYZ data.
Removes a data object from a file data contained together with all auxiliary information.
The function can be used with files in construction (see gwy_dict_new_in_construction()), although usually
there is no reason for it.
A data file container.
Type of data object.
Numerical id of a data in file.
Removes all data processing logs from a file.
A data file container.
Removes all selections associated with image-like data from a file.
This is the preferred selection handling after in-place changes in data geometry as they have generally
unpredictable effects on selections. The currently active tool generally needs a selection and will be forced to
re-create it.
The function can be used with files in construction (see gwy_dict_new_in_construction()), although usually
there is no reason for it.
A data file container.
Type of data object.
Numerical id of image-like data in file.
Saves a data file, deciding to save as what type from the file name.
It tries to find a module implementing %GWY_FILE_OPERATION_SAVE first, when it does not succeed, it falls back to
%GWY_FILE_OPERATION_EXPORT.
The save operation that was actually realized on success, zero on failure.
A #GwyFile to save.
A file name to save the data as, in GLib encoding.
Run mode.
Saves a data file, deciding to save as what type from the file name.
It tries to find a module implementing %GWY_FILE_OPERATION_SAVE first, when it does not succeed, it falls back to
%GWY_FILE_OPERATION_EXPORT.
The save operation that was actually realized on success, zero on failure.
A #GwyFile to save.
A file name to save the data as, in GLib encoding.
Run mode.
Location to store the name of file load function used to save the file, or %NULL. If an error occurs
outside the module, e.g. failure to recognise the file type, %NULL is stored to @name.
Sets a data lawn as the a curve map in a data file container with no ownership transfer.
A data file container.
Numerical id of a curve map in @file.
Data lawn representing a curve map.
Sets the colour mapping type for data visualisation in a data file container.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Mapping type to set.
Sets the fixed colour mapping range for data visualisation in a data file container.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Fixed range minimum.
Fixed range maximum.
Sets a graph model as the graph in a data file container with no ownership transfer.
A data file container.
Numerical id of a graph in @file.
Graph model representing a graph.
Sets a data field as the image in a data file container with no ownership transfer.
A data file container.
Numerical id of an image in @file.
Data field representing an image.
Sets a number field as the image mask in a data file container with no ownership transfer.
If @mask is passed as %NULL, any existing mask object is removed.
A data file container.
Numerical id of an image mask in @file.
Data field representing a mask.
Creates a link in a data file container, specified using string keys.
Link is a string which holds the key of some other data in the file. Its value can be obtained using
gwy_dict_get_string() or gwy_dict_gis_string(). The difference between links and plain strings is that
when data are moved around or merged, they can be automatically updated to point to the new location.
Modifying the value by a #GwyDict function, even to another string, makes it a non-link. Therefore, do not do
it. There are no file items that can be both links and non-links. One of the two options is always invalid.
A data file container.
Link source in @file, as a string.
Link target in @file, as a string.
Creates a link in a data file container, specified using quarks.
The link value is always a string. Use this function instead of gwy_file_set_link() for convenience when
you already have quarks. See its description for remarks.
A data file container.
Link source in @file, as a quark.
Link target in @file, as a quark.
Sets the gradient name for data visualisation in a data file container.
A data file container.
Type of data object.
Numerical id of a data object in @file.
Gradient name. It can be %NULL to unset the gradient (causing the current default gradient to be used).
Sets a spectra object as the single point spectra in a data file container with no ownership transfer.
A data file container.
Numerical id of single point spectra in @file.
Spectra object representing single point spectra.
Sets the title of a data object in a file data container.
This is a convenience wrapper, abstracting setting the title for different data types.
Depending on @numbered, the id is possibly appended to the name. When @name is %NULL, id is always appended,
regardless of @numbered.
Passing @numbered as %TRUE is generally recommended for derived data computed in modules with generic names such as
‘Drift-corrected’. Without numbering there would be lots of data with the same name, making it difficult to
distinguish them.
For channels in imported files, which generally carry file-unique names, it is fine to not append numbers. See also
gwy_file_pass_title() which may be more useful on file import.
The function can be used with files in construction (see gwy_dict_new_in_construction()), provided that the
tiltle is set after the primary data object.
A data file container.
Type of data object.
Numerical id of an existing data object in @file.
New title to set. It can be %NULL to use something like ‘Untitled’.
%TRUE to append the numeric id to the title, %FALSE to set it as-is.
Sets the visibility of a data item in a data file container.
The function can be used to either just mark the visibility status of data objects in files or actually control the
visibility in files open in the GUI. Closing the last window displaying any data of a particular file can close the
file entirely.
The function can be used with files in construction (see gwy_dict_new_in_construction()).
A data file container.
Type of data object.
Numerical id of a data object in @file.
%TRUE to display the data in a window, %FALSE to hide it.
Sets a data brick as the volume data in a data file container with no ownership transfer.
A data file container.
Numerical id of volume data in @file.
Data brick representing volume data.
Sets a scatter object as the XYZ data in a data file container with no ownership transfer.
A data file container.
Numerical id of XYZ data in @file.
Scatter object representing XYZ data.
Synchronizes auxiliary data items between data file containers.
Use a bit mask formed from predefined constants such as %GWY_FILE_ITEM_REAL_SQUARE or unsigned 1 shifted left by
%GWY_FILE_PIECE_REAL_SQUARE for the flags. Note that the 1 may need to be 64bit if you are doing the shifting
yourself.
The most common use is with @dest_data_kind = @src_data_kind. Nevertheless, some items make sense for multiple data
kinds and can be used with @dest_data_kind ≠ @src_data_kind. For example, the false colour gradient can be
synchronised between an image and volume data.
Source data file container.
Type of source data object.
Source numerical id of data object.
Destination data file container.
Type of destination data object.
Destination numerical id of data object.
Flags indicating the items to synchronise.
%TRUE to delete items in target if source does not contain them, %FALSE to copy only.
Checks if a value in a data file container is a link.
It is not an error to call this function with keys which do not corresponds to strings at all. It will return
%FALSE.
%TRUE if @key is a link, %FALSE if it is not.
A data file container.
Key sin @file, as a string.
The type of file type detection function.
When called with %TRUE @only_name it should not try to access the file.
A basic scale for the returned values is:
<itemizedlist>
<listitem>0 for not recognised</listitem>
<listitem>20 for very a basic check or a relatively unique file extension</listitem>
<listitem>60 to 80 in probable but not clear cut cases when the file may be something else or it is a generic
format which may have more specific subformats</listitem>
<listitem>100 is the standard value for a solid check beyond some 4byte magic header; the modue should pretty sure
the file is actually of this type.</listitem>
</itemizedlist>
An integer likelyhood score.
Information about file to detect the filetype of, see #GwyFileDetectInfo.
Whether the type should be guessed only from file name.
File detection data for #GwyFileDetectFunc.
It contains the common information file type detection routines need to obtain. It is shared between file
detection functions and they must not modify its contents. Some fields are set only when the detection routines
are to check the file contents, these are marked `Undefined if @only_name'.
The @head and @tail buffers are always nul-terminated and thus safely usable with string functions. When file is
shorter than @GWY_FILE_DETECT_BUFFER_SIZE bytes, <literal>'\0'</literal> is appended to the end (therefore
@buffer_len = @file_size + 1), otherwise the last byte is overwritten with <literal>'\0'</literal>. In either case
the last byte of @head and @tail cannot be assumed to be identical as in the file (or being a part of the file at
all).
File name, in GLib filename encoding.
File name in lowercase (for eventual case-insensitive name check).
File size in bytes. Undefined if @only_name.
The size of @head and @tail in bytes. Normally it's @GWY_FILE_DETECT_BUFFER_SIZE except when file is
shorter than that. Undefined if @only_name.
Initial part of file. Undefined if @only_name.
Final part of file. Undefined if @only_name.
Error codes returned by scanning of file structure.
Invalid file structure should not result from normal program operation. Therefore, the way you would get this
errors, is the deserialisation of a #GwyFile with incorrect/unrecognised structure. They would be include in the
error list among (possibly) other deserialisation errors.
Error %GWY_FILE_ERROR_SIZE_MISMATCH can occur for example when a mask has different pixel dimensions than the
corresponding image. A similar error can happen with volume or curve map data previews.
For %GWY_FILE_ERROR_HUGE_ID, reasonble depends on the amount of data. For a file with 100 images, reasonable ids
are larger than for a single-image file. If the ids are several times larger the number of data, you are perfectly
fine. If you try to add an image with id %G_MAXINT just to cause trouble, do not do it then.
Malformed or unrecognised item key.
Item has the wrong type for given key.
Secondary item does not correspond to any primary data.
Secondary item does not match its primary data.
Unreasonably large data id.
Gets the error domain for file structure.
See and use %GWY_FILE_ERROR.
The error domain.
Broken down representation of a piece of information in a data file container.
Numerical id of a data in file, -1 for no data item.
Type of the data object, %GWY_FILE_NONE for no data item.
Particular piece related or belonging to the data, %GWY_FILE_PIECE_NONE for the main data object.
Remaning part of the key (pointer to @strkey), or %NULL.
The type of file loading function.
The function can create the file as being in construction with gwy_file_new_in_construction() to avoid signals
being emitted during construction. If the returned object is still marked in construction, it will be finished by
the module system.
A newly created file data container, or %NULL on failure.
A file name to load data from.
Run mode, this is either @GWY_RUN_NONINTERACTIVE or @GWY_RUN_INTERACTIVE.
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 to given file type.
Generally only native file format module implements %GWY_FILE_OPERATION_SAVE, all others implement
%GWY_FILE_OPERATION_EXPORT.
Posibility to detect files are of this file type,
Posibility to load files of this type.
Posibility to save files of this type.
Posibility to export files of this type.
The mask for all the flags.
Type of auxiliary data in a Gwyddion data file.
False colour mapping gradient.
False colour mapping range.
False colour mapping type.
Pixel/real aspect ratio.
Image mask.
Mask colour.
Image selections.
Data item metadata.
Object representing the visualisation or preview of the data.
Window size or scaling.
Data item title.
Log of operations on the data item.
Data item visibility.
Name of the file.
References to other data in the file.
It usually indicates the main data object, but it can indicate an invalid data piece.
The type of file saving function.
%TRUE if file save succeeded, %FALSE otherwise.
A #GwyFile to save.
A file name to save @file as.
Run mode, this is either @GWY_RUN_NONINTERACTIVE or @GWY_RUN_INTERACTIVE.
Type of callback function for file item transfer.
Source file.
Destination file.
Type of the data object.
Numerical id of a data in source file.
Numerical id of a data in destination file.
User data passed to the function.
Creates a new list of program functions
A newly created list of program functions.
Type of functions to display.
Gets the kind of functions list of program functions is currently showing.
The name of the function kind.
A list of program functions.
Gets the name of selected function in a list of program functions.
Combine the function with gwy_function_list_get_kind() to get the complete specification of the function.
The return value may be %NULL if there are no functions. The name of the remaining tools placeholder is returned as
the empty string.
The name of selected function.
A list of program functions.
Reports whether a remaning tools item is shown at the end of a tool list.
%TRUE if the remaning tools item is shown; %FALSE if it is disabled.
A list of program functions.
Refreshes information about a function in a list of program functions.
A list of program functions.
Function name (of the current kind).
Selects a function in a list of program functions.
A list of program functions.
Function name (of the current kind).
%TRUE to scroll to the function to make it visible.
Switches a list of program functions to a different kind of functions.
The kind can be NULL or the empty string for an empty list, "empty" for the no-function placeholder or the name of
function kind like "image", "graph", "volume" or "synth".
A list of program functions.
Type of functions to display.
Sets whether a remaning tools item is shown at the end of a tool list.
The setting only affects lists of tools. The remaning tool item is a useful placeholder when editing the toolbox.
It is not useful otherwise.
A list of program functions.
%TRUE to show the remaning tools item; %FALSE to not show it.
The type of graph function.
Graph (a #GwyGraph) to operate on.
Flags controlling help setup and behaviour.
No flags, the default behaviour.
Do not add a Help button, even to windows that are dialogs.
Flags controlling the selection holding behaviour of tools.
Although any combination of flags is valid, this is mainly so that user's choice is not reset. For any holding to
be done at all the %GWY_HOLD_SELECTION_HOLD flag must be set. If it is unset then %GWY_HOLD_SELECTION_OVERWRITE
and %GWY_HOLD_SELECTION_CLEAR do not matter. Similarly, for %GWY_HOLD_SELECTION_CLEAR has any effect only if
overwriting is enabled by setting %GWY_HOLD_SELECTION_OVERWRITE.
Selections are held (transferred to the new image).
Existing selections on the new image is replaced.
If the current image has no selection the selection on the new image is cleared.
Creates a new data processing operation log browser for a data object in a file.
If there is currently no log for given data, a new empty log is created, unless logging is currently disabled.
A new metadata browser window.
A data file container.
Type of data item.
Id of data item in @data to show the log for.
Gwyddion module ABI version.
To be filled as @abi_version in #GwyModuleInfo.
Value to bitwise combine with %GWY_MODULE_ABI_VERSION to indicate a bundle.
The module query must be the ONLY exported symbol from a module.
This macro does The Right Thing necessary to export module info in a way Gwyddion understands it. Put
%GWY_MODULE_QUERY with the module info (#GwyModuleInfo) of your module as its argument on a line (with NO semicolon
after).
If you write a module in C++ note the module query must have C linkage. This is achieved by marking it
<literal>extern "C"</literal>:
|[
extern "C" {
GWY_MODULE_QUERY(module_info)
}
]|
This has to be done manually in versions up to 2.24; since version 2.25 * GWY_MODULE_QUERY() includes
<literal>extern "C"</literal> automatically if it is compiled using a C++ compiler.
The #GwyModuleInfo structure to return as module info.
The module query must be the ONLY exported symbol from a module.
See %GWY_MODULE_QUERY for discussion.
This macro is intended for modules that can be bundled together to one big shared library for time and space
optimization. This mostly makes sense only for modules included in Gwyddion itself as it contains hundreds of
modules.
However, it safe to use in third party modules because if modules are not bundled the macro behaves exactly as
%GWY_MODULE_QUERY and the @mod_name argument is just ignored. The macro expansion differs only when
%GWY_MODULE_BUNDLING is defined when including the "gwymoduleloader.h" header.
The module name @mod_name is given as a C identifier, not a string. It <emphasis>must</emphasis> be identical to
the file name of the module if it was installed standalone, with extension removed and with non-identifier
characters converted to underscores. For instance module implemented in "nt-mdt.c" and installed as "nt-mdt.so" or
"nt-mdt.dll" (or with other extensions, depending on the operating system) must pass <literal>nt_mdt</literal>. If
it does not match the file name, linking will fail with a confusing message when bundling is enabled.
The #GwyModuleInfo structure to return as module info.
Module name, given as C identifier corresponding to file name withough extension.
Sensitivity flags indicating the availability of various data kinds.
They represent various application states that may be preconditions for widgets to become sensitive.
A file is open, with any type of data.
There is something to undo (for the current window).
There is something to redo (for the current window).
An image window is active on which image functions can be used.
There is a presentation on the image.
There is a mask on the image.
An OpenGL 3D view is present.
A graph window is active on which graph functions can be used.
There current graph window contains at least one curve. This ensures a graph function
will not be run on an empty graph.
A spectra graph window is active on which spectra functions can be used.
A volume image window is active on which volume data functions can be used.
An XYZ image window is active on which XYZ data functions can be used.
A curve map image window is active on which curve map functions can be used.
Creates a new metadata browser for a data object in a file.
If there is currently no metadata for given data, new empty metadata is created.
A new metadata browser window.
A data file container.
Type of data item.
Id of data item in @data to show metadata for.
Module bundle query function type.
It returns an array of module records for all modules in the bundle, terminated by {%NULL, %NULL}.
Type of module loading and registration error.
Module has an invalid name. It is recommended that module names are valid C identifiers,
possibly with dashes instead of underscores, but only really broken names are rejected.
A module of the same name has already been registered.
Calling g_module_open() on the module failed.
Module does not contain any query function.
Module has different ABI version than expected/supported; or required info field are
missing.
Module query function provided %NULL info.
The registration function returned %FALSE; or the module did not register any function.
Nested module bundle found. (Since 2.49)
Returns error domain for module loading.
See and use %GWY_MODULE_ERROR.
The error domain.
Information about a failed module registration.
Name of the file the module was loaded from.
Module name (can be %NULL and contain odd bytes).
Error message from the failed module registration.
#GError domain from the failed module registration.
#GError code from the failed module registration.
Error codes returned by file module operations.
File module functions can return any of these codes, except @GWY_MODULE_FILE_ERROR_UNIMPLEMENTED which is normally
only returned by high-level functions gwy_file_load() and gwy_file_save(). Module functions can return it only
when they are called with a wrong function name.
Interactive operation was cancelled by user.
Alias for %GWY_MODULE_FILE_ERROR_CANCELED.
No module implements requested operation.
Input/output error occured.
Data is corrupted or in an unsupported format.
Operation requires user input, but it was run as %GWY_RUN_NONINTERACTIVE.
Specific module errors that do not fall into any other category (such as the
failure to initialize a library used to read the data). Seldom used.
Returns error domain for file module functions.
See and use %GWY_MODULE_FILE_ERROR.
The error domain.
Module information returned by GWY_MODULE_QUERY().
Gwyddion module ABI version, should be always #GWY_MODULE_ABI_VERSION.
Module registration function (the function run by Gwyddion module system, actually registering
particular module features).
Some module description.
Module author(s).
Module version.
Who has copyright on this module.
Date (year).
Module query function type.
The module query function should be simply declared as GWY_MODULE_QUERY(mod_info), where mod_info is module info
struct for the module.
The module info struct.
Module record returned by bundle query function.
Module query function.
Module name (base file name without extensions).
Module registration function type.
It actually runs particular featrue registration functions, like gwy_file_func_register() and
gwy_image_func_register().
If the module has a complex initialisation it may be safer to simply not register any function but return %TRUE
even if it fails to set up itself correctly. The module feature unregistration is somewhat crude and, generally,
unregisteration may lead to disaster when shared library unloading has unexpected side effects.
Whether the registration succeeded. When it returns %FALSE, the module and its features are unregistered.
Object representing a set of parameter definitions.
The #GwyParamDef struct contains no public fields.
Creates a new empty set of parameter definitions.
Definitions can be added only during construction, i.e. until the first time it is used to create #GwyParams. Then
the definition set must be considered immutable.
A newly create paramete definition set.
Defines a new parameter with integer values representing module dialog active page.
The active page parameter can be connected to a #GtkNotebook using the utility function
gwy_param_active_page_link_to_notebook(). This is also the only function that should be used with such parameter.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL if not stored in settings, but then the active page parameter
would have no reason to exist.
Parameter description, usually %NULL.
Defines a new parameter with floating point values representing angles.
Percentages do not have to be defined using this function. You can also set up the conversion factor and unit
string directly using gwy_param_table_slider_set_factor() and gwy_param_table_set_unitstr() when constructing the
parameter table (this happens automatically for percentage parameters). This function may be somewhat more
convenient and it also ensures correct folding when loading angle from settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
%TRUE for positive angles, %FALSE for angles symmetrical around zero.
Fraction of the range [0,2π] which should be the range.
Default value of the parameter.
Defines a new parameter with enumerated values being the basic grain merge types.
This helper defines an enum parameter with contains the three most useful classic operations %GWY_MERGE_UNION,
%GWY_MERGE_INTERSECTION and possibly %GWY_MERGE_SUBTRACT from #GwyMergeType. The default value must be one of these
three.
Note that the user usually considers the existing mask as the first operand and the created mask the second operand;
the module code tends to have them logically reversed. For the two symmetrical operations there is no difference.
Subtraction may need to be chaned to %GWY_MERGE_REVSUBTRACT when actually calling gwy_nield_merge().
If you need a different subset of operations, you can use gwy_param_def_add_enum_subset() directly to define it.
However, the less useful merge types may not have any icon associated.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. May be %NULL for the default label.
%TRUE to only include operations which makes sense for a set of masks, i.e. commutative and
associative. %FALSE to include subtraction, which only makes sense for an ordered pair of masks.
Default value of the parameter.
Defines a new parameter with boolean values.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Default value of the parameter.
Defines a new parameter with values that are curve map data ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Defines a new colour parameter.
See gwy_param_def_add_mask_color() for the mask colour parameter which is handled specially.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. Usually it is %NULL because the colour is taken from data, not settings.
Parameter description which will be used for a label in GUI. Usually %NULL for the default label.
%TRUE if semi-transparent colours are allowed; %FALSE for fully opaque colours.
Default value of the parameter.
Defines a new parameter with floating point values.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Minimum allowed value (inclusive).
Maximum allowed value (inclusive).
Default value of the parameter.
Defines a new parameter with enumerated values from a standard Gwyddion enum.
Supported enums include #GwyMaskingType, #GwyInterpolationType, #GwyOrientation, #GwyMergeType,
#GwyDistanceTransformType, #GwyWindowingType and GwyGraphCurveType. They have standard labels allowing to pass
%NULL as @desc.
See the introduction for @name and @desc lifetime rules.
See gwy_param_def_add_gwyenum() for enums defined by a #GwyEnum table.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. May be %NULL for the default label.
Type of the enum, for instance %GWY_TYPE_MASKING_TYPE.
Default value of the parameter.
Defines a new parameter with enumerated values from a subset of standard Gwyddion enum.
This function is useful when the function uses a standard enum, but not all values make sense or are supported. The
values in @values must exist in the standard enum and not repeat. See gwy_param_def_add_enum() for supported enums.
A typical example is #GwyMergeType, where a number of operations exists mainly for completeness and usually it is
not useful to offer them to the user. This specific case is so common that a helper gwy_param_def_add_basic_merge()
exists to avoid repetition.
See the introduction for @name and @desc lifetime rules.
See gwy_param_def_add_gwyenum() for enums defined by a #GwyEnum table.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. May be %NULL for the default label.
Type of the enum, for instance %GWY_TYPE_MASKING_TYPE.
Array with enum values to select from the standard enum.
The number of values in @values.
Default value of the parameter.
Defines a new flag parameter with values that are bits corresponding to grain value groups.
Such parameter is usually used to represent the set of expanded grain value groups in a tree view.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which could be used for a label in GUI, but usually %NULL.
Default value of the parameter (bits corresponding to grain value groups).
Defines a new parameter with values that are graph curve numbers.
Curve numbers can be any non-negative integers. The upper bound is determined by #GwyParamTable once the GUI for
choosing a curve from specific graph model is set up. Value -1 is also allowed for empty graph models with no
curves, but this should not normally occur.
Curve parameters are stored in settings as curve labels, even though they are treated integers otherwise. This
helps selecting a curve with the same function/interpretation the next time the module is invoked – or the first
curve if there is none such.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings.
Parameter description which will be used for a label in GUI. It may be %NULL for the default label.
Defines a new parameter with values that are graph ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
See gwy_param_def_add_target_graph() for a specialised parameter for target graphs.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Defines a new parameter with enumerated values defined by a #GwyEnum.
See the introduction for @name and @desc lifetime rules.
See gwy_param_def_add_enum() for predefined enums.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for the list header label in GUI. May be also %NULL for no label.
An array of corresponding string-integer pairs.
The number of @nvalues items. It is possible to pass -1 to count the values automatically if the array
is terminated by %NULL name.
Default value of the parameter.
Defines a new parameter with bit flag values defined by a #GwyEnum.
The values in @values must represent a set of flags, i.e. numbers with exactly one 1-bit in binary.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for the list header label in GUI. May be also %NULL for no label.
An array of corresponding string-integer pairs.
The number of @nvalues items. It is possible to pass -1 to count the values automatically if the array
is terminated by %NULL name.
Default value of the parameter.
Defines a new flags parameter with values that are selection holding flags.
The values are flags from #GwyHoldSelectionFlags. The default is zero.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. Normally pass %NULL for the default label.
Defines a new parameter with values that are image ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Defines a new boolean parameter representing the instant updates option.
Compared to a plain boolean, a parameter defined using this function has a predefined label and is recognised by
#GwyDialog. Therefore, it is not necessary to call gwy_dialog_set_instant_updates_param(). If your module GUI
needs non-standard update settings then define the parameters manually.
Furthermore, it is normally not necessary (in fact, counterproductive) to call gwy_dialog_invalidate() when the
instant updates parameter changes. Recalculation is only necessary when instant updates were just switched on
and the current preview is no longer valid. #GwyDialog handles this case automatically.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. Usually %NULL for the default label.
Default value of the parameter.
Defines a new parameter with integer values.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Minimum allowed value (inclusive).
Maximum allowed value (inclusive).
Default value of the parameter.
Defines a new parameter with values that are lawn curve numbers.
Curve numbers can be any non-negative integers. The upper bound is determined by #GwyParamTable once the GUI for
choosing a curve from specific lawn is set up.
Curve parameters are stored in settings as curve labels, even though they are treated integers otherwise. This
helps selecting a curve with the same function/interpretation the next time the module is invoked – or the first
curve if there is none such.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings.
Parameter description which will be used for a label in GUI. It may be %NULL for the default label.
Defines a new parameter with values that are lawn segment numbers.
The parameter can be set with gwy_params_set_curve().
Segment numbers can be any non-negative integers. The upper bound is determined by #GwyParamTable once the GUI for
choosing a segment from specific lawn is set up. Value -1 is also allowed for empty lawns with no segments.
Segment parameters are stored in settings as segment labels, even though they are treated integers otherwise. This
helps selecting a segment with the same function/interpretation the next time the module is invoked – or the first
segment if there is none such.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings.
Parameter description which will be used for a label in GUI. It may be %NULL for the default label.
Defines a new mask colour parameter.
This is usually a parameter not stored in settings, but handled specially by taking the mask colour from the image
and then setting mask colours on the output. The default value is the default mask colour.
See gwy_param_def_add_color() for a generic colour parameter.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. Usually it is %NULL because the colour is taken from data, not settings.
Parameter description which will be used for a label in GUI. Usually %NULL for the default label.
Defines a new parameter with floating point values representing fraction of some base value.
The value range is [0,1], but it is displayed in percents in the GUI.
Percentages do not have to be defined using this function. You can also set up the conversion factor and unit
string directly using gwy_param_table_slider_set_factor() and gwy_param_table_set_unitstr() when constructing the
parameter table (this happens automatically for percentage parameters). This function may be somewhat more
convenient.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Default value of the parameter.
Defines a new boolean parameter representing the randomize option for a random seed.
See gwy_param_def_add_seed() for random seed parameters.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Identifier of the corresponding random seed parameter. It must already be defined.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. Usually %NULL for the default label.
Default value of the parameter.
Defines a new parameter with values that are report types.
Report type values are neither pure enumerated values nor flags; they are combinations of both. See
#GwyResultsExport for discussion.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. The label, if not %NULL, will be used for the
save dialogue as the export controls carry no label.
Report style, defining allowed report types. See gwy_results_export_set_style() for description.
Default value of the parameter.
Defines a new parameter with values that are string resource names.
Use gwy_params_get_string() to get the string name and gwy_params_get_resource() to get the corresponding resource
object.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Inventory holding the resources to choose from.
Default value of the parameter (resource name).
Defines a new parameter with values that are scattered data value indices.
The parameter can be set with gwy_params_set_curve() (it is really more like a plane index, not a curve index, but
it is still analogous to volume data curves).
Value indices can be any non-negative integers. The upper bound is determined by #GwyParamTable once the GUI for
choosing a value from specific scattered data is set up. Value -1 is also allowed for empty scattered data with
no values.
Value index parameters are stored in settings as value labels, even though they are treated integers otherwise.
This helps selecting a value with the same function/interpretation the next time the module is invoked – or the
first value if there is none such.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings.
Parameter description which will be used for a label in GUI. It may be %NULL for the default label.
Defines a new parameter with values that are random seeds.
Random seeds are integers from the range [1,2³¹-1] which can take random values. They are usually accompanied by
a boolean parameter controlling whether the value is random or fixed (taken from settings), added afterwards using
gwy_param_def_add_randomize().
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. Normally pass %NULL for the default label.
Defines a new parameter with values that are spectra ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Defines a new parameter with values that are strings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Simple treatment of special values. If any are given they are enforced, i.e. they apply both before and
after @rectify in the case both are given.
Function which takes a string which may or may not be valid parameter value and returns a valid one.
Pass %NULL if anything goes (or validation is handled otherwise).
Default value of the parameter.
Defines a new parameter with values that are graph ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
See gwy_param_def_add_target_graph() for a generic graph parameter.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI. May be %NULL for the default label.
Defines a new parameter with values that are strings representing units.
Units parameters are not enforced to parse to meaningful units. However, they are conceptually different from
arbitrary strings and have several special unit-oriented functions.
Units behave as strings with the %GWY_PARAM_STRING_EMPTY_IS_NULL flag.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Default value of the parameter. %NULL is allowed.
Defines a new parameter with values that are volume data ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Defines a new parameter with values that are xyz data ids.
Data identifier parameters are not stored permanently in settings. However, they are remembered until Gwyddion
exits. Hence @name does not actually refer to settings, but it should still uniquely identify the parameter as in
settings.
See the introduction for @name and @desc lifetime rules.
A set of parameter definitions.
Parameter identifier.
Parameter name for settings. It can be %NULL for derived parameters not stored in settings.
Parameter description which will be used for a label in GUI.
Gets the settings function name of a set of parameter definitions.
The functions name (possibly %NULL).
A set of parameter definitions.
Gets the label of an already defined parameter in a set of parameter definitions.
See gwy_param_def_get_param_name() for parameter names (keys).
The parameter name, as a string owned by @pardef. It may be %NULL if the parameter has no label.
A set of parameter definitions.
Parameter identifier.
Gets the name of an already defined parameter in a set of parameter definitions.
See gwy_param_def_get_param_label() for parameter labels.
The parameter name, as a string owned by @pardef. It may be %NULL if the parameter is not stored to
settings.
A set of parameter definitions.
Parameter identifier.
Creates a resource class for holding parameters of given type.
The created resource can be used to handle module presets without having to implement loading and saving the
parameters from and to files.
If @pardef has already set function name with gwy_param_def_set_function_name() (recommended), @resname can be
%NULL to use the @pardef's function name.
A newly registered type id in the GLib type system.
A set of parameter definitions.
Type name in the GLib type system to create, for instance GwyRawFilePreset.
Resource name, used as directory name (@name field in #GwyResourceClass).
Sets the settings function name of a set of parameter definitions.
Usually the function name should be given simply as gwy_image_func_current() (or analogous functions for other
module types). The exception is functions with settings keys different from module function name. If the name is
unset then #GwyParams settings functions like gwy_params_new_from_settings() cannot be used.
The function name can be set freely even after construction. This allows having just a single set of parameter
definitions for multiple related module functions which all have the same parameters.
A set of parameter definitions.
Settings function name, or %NULL.
Class of parameter definition sets.
Abstract object representing a resource holding a set of parameter values.
The #GwyParamResource struct contains no public fields.
Gets the set of parameter values of a parameter resource.
The parameter set.
A resource holding a pararameter set.
Abstract class of resources holding parameter value sets.
Flags that can be used when defining a string parameter.
Fold empty string to %NULL.
Ensure strings are non-empty by replacing %NULL with an empty string.
Preserve whitespace at the beginning and end of the string.
Object managing user interface controls for parameters.
The #GwyParamTable struct contains no public fields.
Creates a new table of parameter value controls.
The parameter table manages a set of widgets but it is not a widget. Obtain the widget using
gwy_param_table_widget().
The created object is initially unowned. Usually you use gwy_dialog_add_param_table() and then #GwyDialog will
assume ownership. However, if you use #GwyParamTable standalone you should take ownership yourself with
g_object_ref_sink() and then release it with g_object_unref() when done.
A newly created set of parameter value controls.
A parameter value set.
Adds checkbox which enables and disables other parameter in a parameter table.
The parameter identified by @id must be a boolean defined by gwy_param_def_add_boolean() or a predefined boolean.
The parameter identified by @other_id must be added as combo box, data chooser, slider or radio button row (text
or image buttons). The check box will then be integrated in the control of that parameter. If you have a generic
enable/disable parameter with its own standalone checkbox use gwy_param_table_append_checkbox() instead (and set
widget sensitivity using gwy_param_table_set_sensitive() in the #GwyParamTable::param-changed signal handler).
Set of parameter value controls.
Parameter identifier.
Identifier of parameter to enable/distable.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data brick.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to horizontal pixel size in the XY plane, as returned by gwy_brick_get_dx().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @brick is used.
Set of parameter value controls.
Parameter identifier.
Data brick definiting the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data brick.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to vertical pixel size in the XY plane, as returned by gwy_brick_get_dy().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @brick is used.
Set of parameter value controls.
Parameter identifier.
Data brick definiting the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data brick.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to depth-wise pixel size (more precisely, voxel size), as returned by
gwy_brick_get_dz().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @brick is used.
See gwy_param_table_alt_set_calibration() which can be used with bricks which have Z-calibration.
Set of parameter value controls.
Parameter identifier.
Data brick definiting the alternative value transformation.
Defines a parameter table alternative value for a fraction slider using to a table given by a data line.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). The range [0,@res-1]
of true parameter values will correspond to the values in @calibration, in order. It has to contain a monotonically
increasing sequence of values.
Modification of @calibration during the existence of @partable is not supported. The data line has to be static.
Set of parameter value controls.
Parameter identifier.
Data line defining the calibration. It will be referenced by the parameter table.
Defines a parameter table alternative value for a fraction slider using to physical values in a data field.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). The range [0,1] of
true parameter values will correspond to the range of values in the data field, as returned by
gwy_field_min_max().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @field is used.
Set of parameter value controls.
Parameter identifier.
Data field defining the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data field.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to horizontal pixel size, as returned by gwy_field_get_dx().
The data field @field is only used by this function to set up the transformation. It can be destroyed afterwards
if no longer needed by the caller. No reference is taken and later changes to its data or properties do not have
any effect on the alternative values. Use gwy_param_table_alt_set_field_pixel_x() again if you need to adjust the
transformation for a modified (or different) data field.
Set of parameter value controls.
Parameter identifier.
Data field defining the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data field.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to vertical pixel size, as returned by gwy_field_get_dy().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @field is used.
Set of parameter value controls.
Parameter identifier.
Data field defining the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data lawn.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to horizontal pixel size, as returned by gwy_lawn_get_dx().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @lawn is used.
Set of parameter value controls.
Parameter identifier.
Data lawn definiting the alternative value transformation.
Defines a parameter table alternative value for a pixel slider using to physical sizes in a data lawn.
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). Unit value of the
true parameter value will correspond to vertical pixel size, as returned by gwy_lawn_get_dy().
See gwy_param_table_alt_set_field_pixel_x() for a discussion how @lawn is used.
Set of parameter value controls.
Parameter identifier.
Data lawn definiting the alternative value transformation.
Defines a parameter table alternative value for a fraction slider using a linear function.
This function enables setting up a general linear transformation for the alternative value. The usual cases are
more conveniently handled by functions like gwy_param_table_alt_set_field_pixel_x() or
gwy_param_table_alt_set_field_frac_z().
The slider needs to have an alternative value set up using gwy_param_table_slider_add_alt(). The displayed value
is calculated from true parameter as @q_to_gui*@value + @off_to_gui.
The factor and offset include any power-of-10 factors corresponding to the units @unitstr. If @unitstr comes from
a #GwyValueFormat, then @q_to_gui and @off_to_gui need to be divided by @magnitude.
Set of parameter value controls.
Parameter identifier.
Conversion factor for transforming true values to displayed values.
Offset for transforming true values to displayed values.
Units for the alternative value (with Pango markup).
Adds a button to a parameter table.
Action buttons occasionally appear inside parameter tables when they do not represent a global action but act on
a specific control. For instance they can be used to run an automatic estimation of one specific parameter.
Each button must have its own unique @id, different from all parameter identifiers. This is best achieved by
taking them all from the same enum. However, pressing the button does not change any parameter. It emits
GtkDialog::response signal on the parent dialog, with response id given by @response. Connect to this signal to
actually perform the action.
A row with multiple buttons can be created by passing -1 as @sibling_id for the first button and then ids of some
of the previous buttons for the other buttons.
Set of parameter value controls.
Parameter identifier.
Identifier of another button in the same row, or -1 for a new button row.
Dialog response to emit.
Text on the button.
Adds a checkbox to a parameter table.
The parameter identified by @id must be a boolean defined by gwy_param_def_add_boolean() or a predefined boolean.
The parameter must have a description which will be used as the label.
See also gwy_param_table_add_enabler() for a checkbox integrated into another control and
gwy_param_table_append_checkboxes() for a set of flags presented as checkboxes.
Set of parameter value controls.
Parameter identifier.
Adds a set of checkboxes to a parameter table as a compact horizontal list.
The parameter identified by @id must be a generic flag set defined by gwy_param_def_add_gwyflags().
This function is only suitable for a small set of choices, each with a rather short label. Use
gwy_param_table_append_checkboxes() for a vertical checkbox group.
Set of parameter value controls.
Parameter identifier.
Adds a set of checkboxes to a parameter table as a vertical list.
The parameter identified by @id must be a generic flag set defined by gwy_param_def_add_gwyflags().
If the parameter has a description it will be used as the checkbox list header. Otherwise the checkboxes will be
free-standing.
Use gwy_param_table_append_checkbox() for individual boolean variables and gwy_param_table_append_checkbox_row()
for checkboxes in a single row.
Set of parameter value controls.
Parameter identifier.
Adds a curve map data chooser to a parameter table.
The parameter identified by @id must be a curve map id defined by gwy_param_def_add_cmap_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Adds a generic colour button to a parameter table.
The parameter identified by @id must be a colour parameter defined by gwy_param_def_add_color(). See
gwy_param_table_append_image_mask_color() for a convenient function mask colours.
Set of parameter value controls.
Parameter identifier.
Adds a combo box to a parameter table.
The parameter identified by @id must be either an enum or a resource. Custom enums are defined by
gwy_param_def_add_gwyenum(); predefined enum are set up by gwy_param_def_add_enum(). Resource names are defined by
gwy_param_def_add_resource().
Set of parameter value controls.
Parameter identifier.
Adds an entry to a parameter table.
The parameter identified by @id must be a string, integer or double. Other types may be supported in future.
Set of parameter value controls.
Parameter identifier.
Adds a widget that is not supported natively to a parameter table.
This function takes a function instead of the widget itself. If the table widget is destroyed and recreated then
@create_widget can be called multiple times. Typically, however, it will just be called once. The destroy notifier
will only be called when @partable itself is destroyed.
The created widget must not be indepdendently destroyed while the table widget exists. If the widget is
a container, like #GtkBox, it will give you considerable freedom to change its contents later.
The identifier @id may be passed as -1 if you are not interested in referring to the widget using #GwyParamTable
functions. A real identifier enables some rudimentary functionality such as gwy_param_table_exists() and
gwy_param_table_set_sensitive().
Set of parameter value controls.
Parameter identifier.
Function to create the widget.
The data passed to @create_widget.
Destroy notifier of @user_data or %NULL.
Adds a curve data chooser for a graph model to a parameter table.
The parameter identified by @id must be an curve number defined by gwy_param_def_add_graph_curve() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Graph model to choose the curve from.
Adds an graph data chooser to a parameter table.
The parameter identified by @id must be an graph id defined by gwy_param_def_add_graph_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Adds a control group header to a parameter table.
Headers can be used to visually separate parameters into groups. They are typeset to stand out and have extra
space before them.
If @id is supplied it must be unique, different from all parameter identifiers. This is best achieved by taking
them all from the same enum. It is only useful for changing the header text or sensitivity later.
A parameter table.
Parameter identifier, but usually -1.
Header text. It should be in Header Capitalisation Style.
Adds a selection holding parameter to a parameter table.
The parameter identified by @id must be a selection holding flags parameter defined by
gwy_param_def_add_hold_selection().
Set of parameter value controls.
Parameter identifier.
Adds an image data chooser to a parameter table.
The parameter identified by @id must be an image id defined by gwy_param_def_add_image_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Adds a preview mask colour button to a parameter table.
Usually the mask colour should be initialised from the file using gwy_setup_data_view(). When the dialog is
finished it the mask colour should be set on the output again using gwy_app_sync_data_items(). If @data and @i are
supplied then this is done automatically, which is suitable for typical mask-creating modules.
If @dataview is passed, its mask colour will be kept updated with the parameter's colour. If @data and @id are not
give but @dataviw is, it is used to initialise the colour.
The parameter identified by @id must be a colour parameter defined by gwy_param_def_add_mask_color(). By default,
mask colour are not reset (see gwy_param_table_set_no_reset()) because the colour is normally external to the
module's own settings.
Set of parameter value controls.
Parameter identifier.
Data view whose mask colour should be kept updated to this colour (or %NULL).
File data container with the mask (or %NULL).
Id of the data field in @data (or -1).
Add a structured informational value label to a parameter table.
Informational values not modifiable by the users often appear in parameter tables. Each must have its own unique
@id, different from all parameter identifiers, if you need to refer to it later. This is best achieved by taking
them all from the same enum. For static texts you can also pass -1 as @id; you will not be able to refer to them
later.
Use gwy_param_table_info_set_valuestr() to set the value part of the information; use gwy_param_table_set_unitstr()
to set the unit part.
This function is suitable for one-off labels. For larger sets of values consider using #GwyResults and
gwy_param_table_append_results(). See also gwy_param_table_append_message() for unstructured texts.
Set of parameter value controls.
Parameter identifier.
Information label text.
Adds a curve data chooser for a lawn to a parameter table.
The parameter identified by @id must be an curve number defined by gwy_param_def_add_lawn_curve() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Lawn curve map object to choose the curve from.
Adds a segment data chooser for a lawn to a parameter table.
The parameter identified by @id must be an segment number defined by gwy_param_def_add_lawn_segment() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Lawn curve map object to choose the segment from.
Adds a simple message to a parameter table.
Messages are not actual user modifiable settings. Yet they often appear in parameter tables. Each message must
have its own unique @id, different from all parameter identifiers, if you need to refer to it later. This is best
achieved by taking them all from the same enum. For static texts you can also pass -1 as @id; you will not be
able to refer to them later.
Use gwy_param_table_set_label() to change the text later. Use gwy_param_table_message_set_type() to set the
message type.
This function is intended for unstructured and potentially long, even multiline texts. They can take the full
width but cannot have unit text. Use gwy_param_table_append_info() instead for information labels with the common
label-value-unit structure.
Set of parameter value controls.
Parameter identifier (possibly -1).
Message text (may be %NULL for initially empty message).
Adds a set of radio buttons to a parameter table as a vertical list.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum
set up by gwy_param_def_add_enum().
If the parameter has a description it will be used as the radio button list header. Otherwise the buttons will be
free-standing.
Use gwy_param_table_append_radio_header() and gwy_param_table_append_radio_item() if you need to construct the list
piecewise, for instance interspersing the radio buttons with other controls. Use
gwy_param_table_append_radio_row() for a compact one-row list and gwy_param_table_append_radio_buttons() for a
one-row list of image buttons.
Set of parameter value controls.
Parameter identifier.
Adds a set of radio buttons to a parameter table as a row of image buttons.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum set
up by gwy_param_def_add_enum().
Button order is determined by parameter definition. Icon names @icon_names do not influence it and can be given in
any order.
The enum names from parameter definition will be used for button tooltips. Use gwy_param_table_append_radio() for
a vertical list and gwy_param_table_append_radio_row() for a compact one-row list with text labels.
Set of parameter value controls.
Parameter identifier.
Symbolic icon names corresponding to the enum values. It may be %NULL for standard enums for which
icons are predefined.
Adds a list header for radio buttons to a parameter table.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum
set up by gwy_param_def_add_enum().
The parameter must have a description which will be used as the radio button list header.
Use gwy_param_table_append_radio_item() to add individual radio buttons.
Use gwy_param_table_append_radio() instead to add an entire set of radio buttons at once.
Set of parameter value controls.
Parameter identifier.
Adds a single radio button to a parameter table.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum set
up by gwy_param_def_add_enum(). The value must belong to the enum.
Use gwy_param_table_append_radio_header() to add the header for a radio button list.
Use gwy_param_table_append_radio() instead to add an entire set of radio buttons at once.
Set of parameter value controls.
Parameter identifier.
Enumerated value for a particular radio button.
Adds a set of radio buttons to a parameter table as a compact horizontal list.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum set
up by gwy_param_def_add_enum().
This function is only suitable for a small set of choices, each with a rather short label. Use
gwy_param_table_append_radio() for a vertical list and gwy_param_table_append_radio_buttons() for a one-row list of
image buttons.
Set of parameter value controls.
Parameter identifier.
Adds a pair of numerical entries representing a range to a parameter table.
This is mostly useful for entering graph or value ranges numerically. For image coordinate ranges separate origin
and size controls are preferred as they allow pixel plus alternative real values.
The two parameters identified by @id_from and @id_to must be doubles and distinct. Parameter @id_from is considered
primary and should be used for referring to the control as a whole (for instance to make it insensitive), even
though for convenience both are passed directly to this function.
Use gwy_param_table_entry_set_value_format() to set the value format.
Set of parameter value controls.
Parameter identifier for the beginning.
Parameter identifier for the end.
Adds controls for report formatting to a parameter table.
The parameter identified by @id must be a report type defined by gwy_param_def_add_report_type().
You also need to provide means of report creation by gwy_param_table_report_set_results() or
gwy_param_table_report_set_formatter(). Otherwise the controls allow changing the format type parameter, but the
action buttons cannot do anything.
Set of parameter value controls.
Parameter identifier.
Adds a set of reported scalar variables to a parameter table.
Results are not actual user modifiable settings. Yet they often appear in parameter tables. This function
integrates them to the parameter table. It appends a single contiguous block of results. Use it multiple times,
perhaps interspersed with gwy_param_table_append_header(), to create multiple blocks for the same @results object.
Multiple result blocks can share one @id. Functions such as gwy_param_table_results_fill() and
gwy_param_table_results_clear() then act on all blocks with given id.
Set of parameter value controls.
Parameter identifier.
A set of reported scalar values.
String identifier of the first result in @result to add.
%NULL-terminated list of more result identifiers.
Adds a set of reported scalar variables to a parameter table.
See gwy_param_table_append_results() for details.
Set of parameter value controls.
Parameter identifier.
A set of reported scalar values.
Array of string result identifiers in @results.
Number of items in @result_ids. You can pass -1 if the array is %NULL-terminated.
Adds a value chooser for a scattered data to a parameter table.
The parameter identified by @id must be a value number defined by gwy_param_def_add_scatter_data() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Scattered data object to choose the value from.
Adds a random seed parameter to a parameter table.
The parameter identified by @id must be a random seed parameter defined by gwy_param_def_add_seed().
Usually there is an associated boolean parameter controlling randomization which should be added just below using
gwy_param_table_append_checkbox().
Set of parameter value controls.
Parameter identifier.
Adds a separator to a parameter table.
Separator adds some extra space between parameters and can be used for visual grouping. Control group headers
added by gwy_param_table_append_header() have extra space before them added automatically.
A parameter table.
Adds a numerical slider to a parameter table.
The parameter identified by @id must be an integer or floating point numerical parameter defined by
gwy_param_def_add_int(), gwy_param_def_add_double() or a predefined parameter of one of these types.
The parameter must have a description which will be used as the label.
Set of parameter value controls.
Parameter identifier.
Adds an spectra data chooser to a parameter table.
The parameter identified by @id must be a spectra data id defined by gwy_param_def_add_spectra_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Adds a target graph chooser to a parameter table.
The parameter identified by @id must be a graph id defined by gwy_param_def_add_target_graph().
If @gmodel is not %NULL it will be used for filtering. Only graphs with units matching @gmodel will be allowed in
the chooser. Filtering is only done upon construction and when explicitly requested using
gwy_param_table_data_id_refilter(). Therefore, @gmodel can be changed piecewise without invoking reflitering in
the intermediate states.
Set of parameter value controls.
Parameter identifier.
Graph model to use as template for filtering (or %NULL).
Adds a unit chooser to a parameter table.
The parameter identified by @id must be a unit parameter defined by gwy_param_def_add_unit().
Set of parameter value controls.
Parameter identifier.
Adds an volume data chooser to a parameter table.
The parameter identified by @id must be a volume data id defined by gwy_param_def_add_volume_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Adds an XYZ data chooser to a parameter table.
The parameter identified by @id must be an XYZ data id defined by gwy_param_def_add_xyz_id() or possibly
a predefined parameter of this type.
Set of parameter value controls.
Parameter identifier.
Sets an icon for a button in a parameter table.
Set of parameter value controls.
Button identifier.
Icon name, or %NULL.
Sets the sensitivity of a subgroup of flag checkboxes in a parameter table.
This function sets the sensitivity of a checkboxes corresponding to specific values. It works with any kind of
checkbox group controls. Use gwy_param_table_set_sensitive() to set the sensitivity of an enitre group of
checkboxes.
A parameter table.
Parameter identifier.
Flag values for a particular radio button. It can have multiple bits set – all corresponding checkboxes
are made sensitive/insensitive accordingly.
%TRUE to make the control sensitive, %FALSE to make it insensitive.
Adds a preset colour to a generic colour button in a parameter table.
Although @name may be %NULL, unlabelled presets look too similar to the colour button. So it is recommended to
label the colours.
Set of parameter value controls.
Parameter identifier.
The predefined colour.
Label to display alongside, possibly %NULL.
Requests refiltering of choices in a resource combo in a parameter table.
The parameter identified by @id must be a resource defined gwy_param_def_add_resource().
It is possible to call this function when the table widget does not exist yet.
Set of parameter value controls.
Parameter identifier.
The parameter identified by @id must be a resource defined by a function such as gwy_param_def_add_resource().
Setting the filter to a different one automatically refilters the data chooser.
Set of parameter value controls.
Parameter identifier.
The filter function.
The data passed to @filter.
Destroy notifier of @user_data or %NULL.
Requests refiltering of choices in a data chooser in a parameter table.
The parameter identified by @id must be a data id defined by a function such as gwy_param_def_add_image_id()
or a predefined parameter of this type, for instance defined by gwy_param_def_add_target_graph().
It is possible to call this function when the table widget does not exist yet.
Set of parameter value controls.
Parameter identifier.
The parameter identified by @id must be a data id defined by a function such as gwy_param_def_add_image_id()
or a predefined parameter of this type, for instance defined by gwy_param_def_add_target_graph().
The arguments have the same meaning as in gwy_data_chooser_set_filter(). Setting the filter to a different one
automatically refilters the data chooser.
Set of parameter value controls.
Parameter identifier.
The filter function.
The data passed to @filter.
Destroy notifier of @user_data or %NULL.
Enables or disables instant change signals of a parameter table entriy.
With instant changes any edit causes a change of the parameter and emission of GwyParamTable::param-changed. By
default, both only occur only when the entry loses focus or upon entry activation (pressing Enter).
Instant changes are not suitable for parameters with rectifiers because it can lead to the user and rectification
function fighting over the entry content.
Set of parameter value controls.
Parameter identifier.
%TRUE to enable instant changes; %FALSE to disable them.
Sets the parsing and formatting for a numeric entry to a given value format.
The parameter must be a double defined by gwy_param_def_add_double() or a predefined parameter of one of these
types.
Setting the value format also sets the unit label accordingly. If you want a different unit label you can override
it by using gwy_param_table_set_unitstr() after this function.
Set of parameter value controls.
Parameter identifier.
Value format to use. The parameter table makes its own copy of the format.
Sets the width of an entry in a parameter table.
For numeric formats the automatic width should be sufficient.
Set of parameter value controls.
Parameter identifier.
Entry width in characters.
Tests if a parameter table has controls for a parameter.
%TRUE if the table has controls for parameter @id, %FALSE if it does not.
A parameter table.
Parameter identifier.
Refreshes a curve data chooser after graph model changes.
The chooser must be created by gwy_param_table_append_graph_curve(). When @preserve_index is %FALSE, the update
tries to preserve the selected curve by finding one with the same name. When it is %TRUE, it tries to keep the
curve index in the graph model, which is useful for renaming.
Set of parameter value controls.
Parameter identifier.
%TRUE to keep a curve with the same index selected (when possible).
Changes the graph model for a curve data chooser.
The chooser must be created by gwy_param_table_append_graph_curve().
Set of parameter value controls.
Parameter identifier.
Graph model to choose the curve from.
Sets whether standard punctuation is added to an informational value label in a parameter table.
The default behaviour is to add the same punctuation as to parameter labels. Use this function to disable it.
Set of parameter value controls.
Parameter identifier of the informational value label (not a new identifier).
%TRUE to add punctuation (usually a colon), %FALSE to keep the label intact.
Sets the value text of a informational value label in a parameter table.
The value text is right-aligned and placed to the right part of the row. This can be used to create simple
structured label-value-units messages.
Set of parameter value controls.
Parameter identifier of the informational value label (not a new identifier).
Value text (may be %NULL for empty value).
Refreshes a curve data chooser after lawn curve map changes.
The chooser must be created by gwy_param_table_append_lawn_curve(). When @preserve_index is %FALSE, the update
tries to preserve the selected curve by finding one with the same name. When it is %TRUE, it tries to keep the
curve index in the curve map, which is useful for renaming.
Set of parameter value controls.
Parameter identifier.
%TRUE to keep a curve with the same index selected (when possible).
Changes the lawn curve object for a curve data chooser.
The chooser must be created by gwy_param_table_append_lawn_curve().
Set of parameter value controls.
Parameter identifier.
Lawn curve map object to choose the curve from.
Sets the type of a message in a parameter table.
This function modifies the visual style of the text according to the given type, the default %GTK_MESSAGE_INFO
corresponding to a neutral presentation. Not all types are equally meaningful in a parameter table. Do not use
%GTK_MESSAGE_QUESTION and %GTK_MESSAGE_OTHER.
If the message has a value text set by gwy_param_table_message_set_value_text() both are styled the same.
Set of parameter value controls.
Parameter identifier of the message.
Message type.
Emits the param-changed signal for a parameter table.
This function is rarely needed because the parameter table emits this signal itself. It can be occassionally
useful for parameters which are not managed by @partable and it cannot tell that they have changed. If you want to
integrate them, i.e. treat more or less as if they were managed by @partable, you should probably use this function
when they change.
Signal recursion is prevented. If this function is called from within a #GwyParamTable::param-changed handler it
just immediately returns. Similarly, if the signal is really emitted and other parameters change as the result,
their changes no longer cause any recursive #GwyParamTable::param-changed.
The value of @id may correspond to a parameter #GwyParamTable has no knowledge of. So it is in effect an arbitrary
integer.
Set of parameter value controls.
Parameter identifier.
Gets the parameter value set for a parameter table.
The parameter value set.
A parameter table.
Sets the sensitivity of a single radio button in a parameter table.
This function sets the sensitivity of a radio button corresponding to a specific value. It works with any kind of
radio button group controls. Use gwy_param_table_set_sensitive() to set the sensitivity of an enitre group of radio
buttons.
A parameter table.
Parameter identifier.
Enumerated value for a particular radio button.
%TRUE to make the control sensitive, %FALSE to make it insensitive.
Sets up report export controls in a parameter table to use a custom function to format the report.
When using a custom formatting function, the report would typically be added just above as a #GtkTreeView or
a similar data display widget.
Set of parameter value controls.
Parameter identifier.
Function which will format the report for Copy and Save actions.
Data passed to @format_report.
Destroy notifier of @user_data or %NULL.
Sets up report export controls in a parameter table to format #GwyResults.
The results would be typically added to the table just above using gwy_param_table_append_results(). However, you
can use aribtrary #GwyResults object.
Set of parameter value controls.
Parameter identifier.
A set of reported scalar values.
Resets all parameters in a parameter table to defaults.
Foreign controls are not reset; this has to be done extra. Controls with the no-reset flag set with
gwy_param_table_set_no_reset() are not reset either.
The parameters are reset in the order they were added to the table. In a #GwyDialog with multiple tables they are
reset in the order they were added to the dialog. In complex tables when valid values of one parameter depend on
the value of another this may not be sufficient for a well-defined reset. See the introductory section of
#GwyDialog for discussion.
The entire update will emit at most one signal (with id equal to -1).
A parameter table.
Clears all displayed values in a set of reported scalar variables in a parameter table.
The identifier @id must correspond to a results block added by gwy_param_table_append_results() or a similar
function.
Set of parameter value controls.
Parameter identifier.
Fills displayed values in a set of reported scalar variables in a parameter table.
The identifier @id must correspond to a results block added by gwy_param_table_append_results() or a similar
function.
Set of parameter value controls.
Parameter identifier.
Refreshes a value chooser after scattered data changes.
The chooser must be created by gwy_param_table_append_scatter_data(). When @preserve_index is %FALSE, the update
tries to preserve the selected value by finding one with the same name. When it is %TRUE, it tries to keep the
value index in the scattered data, which is useful for renaming.
Set of parameter value controls.
Parameter identifier.
%TRUE to keep a value with the same index selected (when possible).
Changes the scattered data object for a value chooser.
The chooser must be created by gwy_param_table_append_scatter_data().
Set of parameter value controls.
Parameter identifier.
Scattered data object to choose the curve from.
Sets the value of a boolean parameter in a parameter table.
The parameter identified by @id must be a boolean defined by gwy_param_def_add_boolean() or a predefined boolean.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the value of a curve number parameter in a parameter table.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the value of a data identifier parameter in a parameter table.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the value of a double parameter in a parameter table.
The parameter identified by @id must be an floating point parameter defined by gwy_param_def_add_double() or
a predefined floating point parameter.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the value of an enum parameter in a parameter table.
The parameter identified by @id must be a custom enum defined by gwy_param_def_add_gwyenum() or predefined enum set
up by gwy_param_def_add_enum().
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the value of an flags parameter in a parameter table.
Set of parameter value controls.
Parameter identifier.
The new value.
Set all parameters in a parameter table to values from a parameter set.
The parameter value set must be compatible with the table's one, including ids, names and types. It can be
a subset.
Unlike gwy_param_table_reset(), this function sets also parameters with the no-reset flag. In the typical case,
they would not be included in @params anyway. If they are, update them to the current values beforehand.
The parameters are set in the order they were added to the table. In the case of complex inter-parameter
dependencies some parameter may have to be set manually beforehand for the entire process to work as intended.
The entire update will emit at most one signal (with id equal to -1).
A parameter table.
A parameter value set.
Sets the value of an integer parameter in a parameter table.
The parameter identified by @id must be an integer parameter defined by gwy_param_def_add_int() or a predefined
integer parameter.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets the label text of a control in a parameter table.
Usually label texts are taken from parameter definitions. This function modifies them dynamically. It can also be
used to set the text of messages created by gwy_param_table_append_message(). Only controls which naturally have
labels can have the label set. Some do not, for instance separators, results or foreign widgets.
Set of parameter value controls.
Parameter identifier.
New label text (may be %NULL for the default text).
Sets the no-reset flag for a parameter in a parameter table.
No-reset parameters are untouched by gwy_param_table_reset(). Hence they are not reset by the #GwyDialog reset
response handler either. This can be useful for parameters that do not have static default values and need special
treatment during the reset.
Some parameters are no-reset by default: for instance data ids or mask colour.
Set of parameter value controls.
Parameter identifier.
%TRUE to set the no-reset flag, %FALSE to unset it.
Sets the no-reset flag for multiple parameters in a parameter table.
See gwy_param_table_set_no_reset() for description.
Set of parameter value controls.
Array of parameter identifiers.
Number of items in @ids.
%TRUE to set the no-reset flag, %FALSE to unset it.
Sets the sensitivity of a single control in a parameter table.
If the parameter identified by @id corresponds to multiple widgets all are set sensitive or insensitive as
requested. In most cases this is the right function to enable and disable parameters. However, some may have to
be managed in more detail.
For radio buttons this function enables/disables the entire button group, including any header label. Use
gwy_param_table_radio_set_sensitive() to set sensitivity of individual radio buttons.
A parameter table.
Parameter identifier.
%TRUE to make the control sensitive, %FALSE to make it insensitive.
Sets the value of a string parameter.
The function can be used with string entries, unit choosers and resource combos.
Set of parameter value controls.
Parameter identifier.
The new value.
Sets a fixed units label for a control in a parameter table.
Unit labels are added to the right of the main parameter control. Usually they are used for sliders, although they
can be set for most parameter controls except separators, enablers and vertical radio button lists.
Set of parameter value controls.
Parameter identifier of the control (not a new identifier).
Units for the control (with Pango markup).
Sets up an alternative value for a slider in a parameter table.
The parameter identified by @id must correspond to a slider already added by gwy_param_table_append_slider(). This
functions sets up the alternate representation. It is initally just an identity though. You need to use
a function specify a useful alternative representation afterwards, for instance using
gwy_param_table_alt_set_field_pixel_x() which uses real dimensions in a #GwyField alternative values for
pixels.
Set of parameter value controls.
Parameter identifier.
Sets the parameter range a slider in a parameter table to a subset of the full range.
This function allows restricting the slider range to a smaller range than the one set in the #GwyParamDef. The
range can never be extended (it can be set to be less restricted than previously of course).
If there is a transformation between true and displayed values of parameters (for instance for angles) the minimum
and maximum refer to the true values.
Set of parameter value controls.
Parameter identifier.
Minimum allowed value (inclusive), in true parameter values.
Minimum allowed value (inclusive), in true parameter values.
Sets the numnber of decimal place for a slider in a parameter table.
The parameter table sets automatically a reasonable number decimal places according to the parameter type, range
and steps. This function allows overriding it when more detailed control is needed.
Set of parameter value controls.
Parameter identifier.
The number of decimal places of the numerical value.
Sets a constant factor transformation for a slider in a parameter table.
Set of parameter value controls.
Parameter identifier.
Conversion factor for transforming true values to displayed values.
Sets the mapping type for a slider in a parameter table.
Set of parameter value controls.
Parameter identifier.
Mapping type to use.
Sets the snapping option of a slider in a parameter table.
This function is rarely needed. By default, snapping is enabled for integer sliders as they can only represent the
discrete integers, whereas floating point sliders are free. In some cases you may want to override it. Note that
once you set the snapping option explicitly, you are responsible for it. There is no way to tell the slider to
revert to its default behaviour.
Set of parameter value controls.
Parameter identifier.
%TRUE to enable snapping; %FALSE to disable it.
Sets the step and page step for a slider in a parameter table.
The parameter table sets automatically reasonable steps according to the parameter type and range. This function
allows overriding them when more detailed control is needed.
Set of parameter value controls.
Parameter identifier.
The step (in true parameter values), as in #GtkAdjustment.
The page step (in true parameter values), as in #GtkAdjustment.
Sets the transformation function for a slider in a parameter table.
The functions have to be monotonically increasing in the allowed parameter range.
Note that #GtkSpinButton behaves reasonably for human-sized values. Neither the true nor the transformed value can
be too many orders of magnitude far from unity. For values of physical quantities it is necessary to keep the
base power of 10 separately. See also gwy_param_table_slider_add_alt().
Set of parameter value controls.
Parameter identifier.
Function transforming true values to displayed values.
Function transforming displayed values to true values.
Data passed to @value_to_gui and @gui_to_value.
Destroy notifier of @user_data or %NULL.
Gets and possibly constructs the parameter controls.
If the widget already exists this function returns the existing widget. Otherwise the widget is created.
The returned widget is a table-like widget with implementation-defined type and structure. It can be added as a
child to other widgets, show, hidden, made insensitive or destroyed. However, its individual pieces must not be
manipulated outside the #GwyParamTable functions.
It is more efficient to get the widget after the controls for all parameters were added with functions like
gwy_param_table_append_checkbox() and gwy_param_table_append_combo(). It is also safer with respect to inadvertent
parameter modifications as widgets are created after the setup is done. The opposite order is possible but may not
work as expected in complex cases.
Widget with all the parameter controls. The widget is owned by @partable and you do not receive a new
reference (not even a floating one).
A parameter table.
The ::param-changed signal is emitted when a parameter changes.
The signal is not emitted recursively. In other words, if a signal handler modifies other parameters in
response to a parameter change, it is expected to complete all the dependent udpdates.
Identifier of the changed parameter.
Class of user interface parameter controls manager.
Object representing a set of parameter values.
The #GwyParams struct contains no public fields.
Creates a new empty parameter value set.
The created object is empty (and useless) until parameter definitions are set with gwy_params_set_def(). However,
in modules the parameters are normally instantiated using gwy_params_new_from_settings().
A new empty parameter value set.
Creates a new parameter value set with given definition and loads values from settings.
The definitions @pardef must have function name set.
A new parameter value set.
Set of parameter definitions.
Assigns values to a set of parameter values from another one.
The parameter sets must have compatible definitions. Usually, the #GwyParamDef of @source is the same as the one of
@params, a subset, or a superset. In other words, parameters existing only in one objects are ignored. Usually
a #GwyParamDef superset is created by defining one parameter set, then defining another one exactly the same way
and adding a few more parameters.
Parameters are identified by id. Both parameter ids and names must match. However, a %NULL name is considered to
match any name – if the ids are equal. Of course, parameter types must also match.
A set of parameter values.
A set of parameter values.
Checks if data identifier parameter is set to no-data.
This convenience function can be used with any specific identifier-valued parameter.
%TRUE if the data identifier parameter is no-data and gwy_params_get_data_id() would return
%GWY_APP_DATA_ID_NONE; %FALSE otherwise if some real data object is selected.
A parameter value set.
Parameter identifier.
Creates a duplicate of a set of parameter values.
A new empty parameter value set.
A set of parameter values.
Gets the value of a boolean parameter.
This function can be used with any boolean-valued parameter, even if it is more complex/specific than a plain
boolean.
The boolean parameter value.
A parameter value set.
Parameter identifier.
Gets the default value of a boolean parameter.
This function can be used with any boolean-valued parameter, even if it is more complex/specific than a plain
boolean.
The boolean parameter default value.
A parameter value set.
Parameter identifier.
Gets the lawn object for a curve map data identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The curve map data lawn, or %NULL if the parameter is none (or the curve map data no longer exist).
A parameter value set.
Parameter identifier.
Gets the value of a colour parameter.
The colour parameter value.
A set of parameter values.
Parameter identifier.
Gets the default value of a colour parameter.
The colour parameter default value.
A set of parameter values.
Parameter identifier.
Gets the value of a data identifier parameter.
This function can be used with any specific identifier-valued parameter, even though they have dedicated creators
and setters.
The data identifier parameter value.
A parameter value set.
Parameter identifier.
Gets the definitions object for a parameter set.
The set of parameter definitions.
A parameter value set.
Gets the value of a floating point parameter.
This function can be used with any double-valued parameter, even if it is more complex/specific than a plain
double.
The floating point parameter value.
A parameter value set.
Parameter identifier.
Gets the default value of a floating point parameter.
This function can be used with any double-valued parameter, even if it is more complex/specific than a plain
double.
The floating point parameter default value.
A parameter value set.
Parameter identifier.
Gets the value of a enum parameter.
This function can be used with any enum-valued parameter, even if it is more complex/specific than a plain
enum.
The enum parameter value.
A parameter value set.
Parameter identifier.
Gets the default value of a enum parameter.
This function can be used with any enum-valued parameter, even if it is more complex/specific than a plain
enum.
The enum parameter default value.
A parameter value set.
Parameter identifier.
Gets the value of a flags parameter.
This function can be used with any flags-valued parameter, even if it is more complex/specific than a plain
flag set.
The fags parameter value.
A parameter value set.
Parameter identifier.
Gets the default value of a flags parameter.
This function can be used with any flags-valued parameter, even if it is more complex/specific than a plain
flag set.
The fags parameter default value.
A parameter value set.
Parameter identifier.
Gets the graph model object for a graph identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The graph model of the graph, or %NULL if the parameter is none (or the graph no longer exists).
A parameter value set.
Parameter identifier.
Gets the data field object for an image identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The image data field, or %NULL if the parameter is none (or the image no longer exists).
A parameter value set.
Parameter identifier.
Gets the data field object for a mask identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The mask data field, or %NULL if the parameter is none (or the image no longer exists).
A parameter value set.
Parameter identifier.
Gets the value of a plain integer parameter.
This function can be used with any integer-valued parameter, even if it is more complex/specific than a plain
integer.
It can also be used to get a random seed parameter value. The seed value does not change between calls unless
gwy_params_randomize_seed() has been called.
The integer parameter value.
A parameter value set.
Parameter identifier.
Gets the default value of a plain integer parameter.
This function can be used with any integer-valued parameter, even if it is more complex/specific than a plain
integer. For a number of them, such as data ids or random seeds, it just returns zero as there is no real default
value.
The integer parameter default value.
A parameter value set.
Parameter identifier.
Gets the value of a masking type enum parameter, consistently with a mask field.
If @mask is %NULL the returned value is simply the parameter value.
If @mask is a pointer then @mask and the return value can be modified. The function will set @mask to %NULL if
masking is %GWY_MASK_IGNORE. Conversely, it will return %GWY_MASK_IGNORE if @mask is a pointer to a %NULL number
field. In short, if a @mask argument is passed a non-ignore masking mode is guaranteed to coincide with non-%NULL
mask.
The masking enum parameter value.
A parameter value set.
Parameter identifier.
Pointer to mask number field to update (can also be %NULL).
Gets the value of a report type parameter.
This function can only be used with a parameter defined by gwy_param_def_add_report_type().
The report type parameter value.
A parameter value set.
Parameter identifier.
Gets the resource object of a resource name parameter.
Use gwy_params_get_string() to get the resource name instead of the object.
The resource object corresponding to the parameter value. A default value is returned if the resource
does not exist.
A set of parameter values.
Parameter identifier.
Gets the spectra model object for a spectra identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The spectra model of the spectra, or %NULL if the parameter is none (or the spectra no longer exists).
A parameter value set.
Parameter identifier.
Gets the value of a string parameter.
This function can be used with any string-valued parameter (for instance units and resource names), even if it is
more complex/specific than a plain string. Use functions such as gwy_params_get_resource() to get the specialised
values.
The string parameter value. It is owned by @params and it is only guaranteed to be valid until the
parameter change (or the object is destroyed).
A parameter value set.
Parameter identifier.
Gets the default value of a string parameter.
This function can be used with any string-valued parameter (for instance units and resource names), even if it is
more complex/specific than a plain string. However, it may not be useful for them if the parameter has no real
default; the function the returns an empty string.
The string parameter default value. It is owned by @params and it is only guaranteed to be valid until the
parameter change (or the object is destroyed).
A parameter value set.
Parameter identifier.
Gets an SI unit object for a unit parameter.
Use gwy_params_get_string() if you simply want the unit string.
The returned object is not guaranteed to be updated automatically when the parameter changes. It must not be
assumed it will persist past the destruction of @params. Briefly, do not keep it around.
An SI unit, owned by @params. It must not be modified nor freed.
A set of parameter values.
Parameter identifier.
Location where to store the power of 10 (or %NULL).
Gets the brick object for a volume data identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The volume data brick, or %NULL if the parameter is none (or the volume data no longer exist).
A parameter value set.
Parameter identifier.
Gets the scatter object for an XYZ data identifier parameter.
This is a more convenient alternative to gwy_params_get_data_id() since it fetches and checks the object.
The XYZ scattered data, or %NULL if the parameter is none (or the xyz data no longer exist).
A parameter value set.
Parameter identifier.
Loads a parameter value set from settings.
The corresponding definitions must have function name set. It is usually more convenient to create and load the
parameters at the same time using gwy_params_new_from_settings().
A set of parameter values.
Randomizes the value of a random seed parameter.
You can use gwy_params_get_int() any number of times afterwards and obtain the same value.
This function is seldom needed. See the introduction for discussion. In the usual setup the seed is randomised
when loaded from settings if the controlling randomization boolean is %TRUE. Furthermore, #GwyParamTable knows to
randomize the seed when the randomization button is pressed.
The new random seed value (for convenience).
A set of parameter values.
Parameter identifier.
Resets a single parameter in a parameter value set to the default value.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Resets all parameters in a parameter value set to default values.
This function is seldom needed. See the introduction for discussion.
A parameter value set.
The prefix (leading path component) limiting parameters to reset. Pass empty string or %NULL to reset all
parameters.
Saves a parameter value set to settings.
The associated definitions must have function name set.
A parameter value set.
Sets the value of a plain boolean parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain boolean parameters defined by gwy_param_def_add_boolean(). More
complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Sets the value of a curve map data identifier parameter.
This function is seldom needed. See the introduction for discussion.
If @value is not %GWY_APP_DATA_ID_NONE then the curve map data identified by @value must currently exist.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a colour parameter.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a graph or lawn curve number parameter, or similar parameters such as lawn segment or scattered
data value index.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set (a non-negative integer or -1).
Sets the definitions of parameters a #GwyParams should use.
Once set, the definitions are fixed. One #GwyParams object cannot be used with multiple definitions.
A parameter value set.
Set of parameter definitions.
Sets the value of a plain floating point parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain floating point parameters defined by gwy_param_def_add_double() and
simple transformed parameters such as gwy_param_def_add_angle() or gwy_param_def_add_percentage(). More
complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Sets the value of a generic enum parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain enum parameters defined by gwy_param_def_add_gwyenum() or
gwy_param_def_add_enum(). More complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Modifies the value of a generic flags parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain flags parameters defined by gwy_param_def_add_gwyflags(). More
complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
The flag bit to set or unset (it can be actually a flag combination).
%TRUE to set the flag, %FALSE to unset the flag.
Sets the value of a generic flags parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain flags parameters defined by gwy_param_def_add_gwyflags(). More
complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Sets the value of a graph identifier parameter.
This function is seldom needed. See the introduction for discussion.
If @value is not %GWY_APP_DATA_ID_NONE then the graph identified by @value must currently exist.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of an image identifier parameter.
This function is seldom needed. See the introduction for discussion.
If @value is not %GWY_APP_DATA_ID_NONE then the image identified by @value must currently exist.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a integer parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with plain integer parameters defined by gwy_param_def_add_int() and random seeds
created with gwy_param_def_add_seed(). More complex/specific parameters need to be set using dedicated setters.
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Sets the value of a report type parameter.
This function is seldom needed. See the introduction for discussion.
This function can only be used with parameters defined by gwy_param_def_add_report_type().
%TRUE if parameter value has changed.
A parameter value set.
Parameter identifier.
Value to set.
Sets the value of a resource name parameter.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a spectra data identifier parameter.
If @value is not %GWY_APP_DATA_ID_NONE then the spectra data identified by @value must currently exist.
This function is seldom needed. See the introduction for discussion.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a string parameter.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a unit parameter.
This function is seldom needed. See the introduction for discussion.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of a volume data identifier parameter.
If @value is not %GWY_APP_DATA_ID_NONE then the volume data identified by @value must currently exist.
This function is seldom needed. See the introduction for discussion.
A set of parameter values.
Parameter identifier.
Value to set.
Sets the value of an xyz data identifier parameter.
This function is seldom needed. See the introduction for discussion.
If @value is not %GWY_APP_DATA_ID_NONE then the XYZ data identified by @value must currently exist.
%TRUE if parameter value has changed.
A set of parameter values.
Parameter identifier.
Value to set.
Class of parameter value sets.
Computes average value over a part of data field @dfield.
It is not an error if part of it lies outside the data field borders (it is simply not counted in), however the
intersection have to be nonempty.
The average value.
A data field.
Real X and Y-coordinate of area center in physical units.
Area radius in pixels, 1 means a signle pixel. The actual radius passed to
gwy_field_circular_area_extract() is @radius-0.5.
Adds an `Apply' button to a plain tool.
This is a convenience (and consistency) function. The button is not handled by the plain tool.
It will have response id %GTK_RESPONSE_APPLY and the response will become the default response of the tool's dialog.
The button widget.
A plain tool.
Adds a `Clear' button to a plain tool.
The button works with automatically managed selection (see gwy_plain_tool_connect_selection()). It clears the
selection and its sensitivity depends on whether the selection is non-empty.
The button will have response id %GWY_RESPONSE_CLEAR.
The button widget.
A plain tool.
Registers a parameter table with a data processing module dialog window.
See gwy_dialog_add_param_table() for details.
A plain tool.
Parameter table to add.
Checks for a required layer type.
If the layer exists, its #GType is returned. If it does not exist, zero is returned and a warning message is added
to the tool dialog. In addition, it sets @init_failed to %TRUE.
Therefore, this function should be called early in tool instance initialization and it should not be called again
once it fails.
The type of the layer, or 0 on failure.
A plain tool.
Layer type name (e.g. <literal>"GwyLayerPoint"</literal>).
Sets up a plain tool to automatically manage layer selection.
When @layer_type is 0 and @bname %NULL, plain tool stops automatically managing selection (hopefully).
This method performs gwy_plain_tool_ensure_layer(), connecting to the
selection and making sure the @selection field always points to the correct selection object (or is %NULL).
The @selection_changed method of #GwyPlainToolClass is only invoked for a tool instance once this method was called
to set up the selection tracking.
A plain tool.
Layer type. Use gwy_plain_tool_check_layer_type() in tool instance initialization to check for layer
types.
Selection key base name, for example <literal>"line"</literal>.
Enables deletion of selection objects by presssing Delete in a tree view diplaying them.
A plain tool.
A tree view that displays selection objects in order, each row corresponding to one selection object.
Enables selection holding for a plain tool.
Selection holding means that, if certain conditions are satisfied, upon data switch the tool transfers the current
selection to the new image, replacing whatever selection might be there.
This function should be called from the instance init function.
Holding is currently unsupported for tools which use multiple selection types.
A plain tool.
Makes sure a plain tool's layer is of the correct type.
This is a low-level function, normally you would use gwy_plain_tool_connect_selection().
A plain tool.
Layer type. Use gwy_plain_tool_check_layer_type() in tool instance initialization to check for layer
types.
Possibly transfers the selection to a new image upon plain tool data switch.
This function should be called from data_switched() class method in a tool after setting up the layer and
selection. If the selection should be transferred to the new image according to @hold_flags the previous (held)
selection will replace whatever selection might be there currently. Otherwise the new image's selection is
preserved (and in fact held itself).
Selection holding must be enabled in tool instance init function using gwy_plain_tool_enable_selection_holding().
A plain tool.
Flags controlling when the selection is held (transferred to another image).
Logs a data modification operation of a plain tool.
This is a convenience wrapper for gwy_app_channel_log_add(), setting automatically the container, data id and
function name from the tool. It can only be used for simple data modification operations in which the source and
target ids are the same. In more complex cases you have to use gwy_app_channel_log_add() directly.
A plain tool.
The type of pending changes that accumulated during tool inactivity.
Channel data field was changed.
Mask data field was changed.
Presentation data field was changed.
Selection was changed.
Selection was finished (that is emitted #GwySelection::finished).
Type of behaviour modifying flags that can be passed to gwy_preview_scatter_to_field().
Render a point density map instead of the data.
Make the data field as large as the specified resolutions at least in one dimension (it
can be prevented in the other by different aspect ratio).
Try to suppress outliers in the image. Currently this is applied to the already
rasterised data, which is not the best option and may give mixed results.
Style of preview in a data processing dialog.
There is no preview. This is the default if you do not set any preview function. It does not
make much sense to use it when setting up a preview function.
Preview occurs immediately, either unconditionally or controlled by an instant updates
checkbox. Dialog invalidation queues a preview if instant updates are not disabled.
Preview is only upon request, usually by pressing a button with response
%GWY_RESPONSE_UPDATE. Dialog invalidation does not queue a preview.
The type of data processing function.
This is a temporary type. Module calling will change substantially.
The data container to operate on.
Run mode.
Updates rectangular selection info display.
It is possible to pass %NULL @dfield but non-%NULL @selection. This can lead to %TRUE return value (if the
selection is non-empty), but the labels will be still cleared as there is no way to convert between real and pixel
coordinates.
%TRUE if a selection is present, %FALSE otherwise.
Rectangular selection info table.
A rectangular selection to fill information from. It can be %NULL to clear the labels.
A data field to use for real/pixel coordinate transforms. It can be %NULL to clear the labels.
If not %NULL, must be an array of size at least 4 and will be filled with selection data xmin, ymin,
xmax, ymax in physical units.
If not %NULL, must be an array of size at least 4 and will be filled with selection data xmin, ymin, xmax,
ymax in pixels.
Gets the table widget of a rectangular selection information.
The table as a #GtkWidget.
Rectangular selection information table.
Updates selection data using rectangular selection information table.
Rectangular selection information table.
A rectangular selection to fill information into.
A data field to use for real/pixel coordinate transforms.
Creates a table displaying rectangular selection information.
The returned object will destroy itself when the table is destroyed.
The newly created rectangular selection information, as an opaque pointer. The table widget can be
obtained with gwy_rect_selection_labels_get_table().
%TRUE to treat unselected state as full data selected.
Callback to call when the selection is edited.
Data to pass to @callback (as the first argument).
Type of function returning a valid string, given possibly invalid input.
Either the input and output can be %NULL (if the string definition allows it).
Newly allocated string, presumably corrected.
Input string.
Method called on commit (before resource is written to disk). It should obtain values from the
editor widgets and actually update the resource.
Method to construct editor contents in provided container (the container itself is managed by
#GwyResourceEditor, its contents by a particular editor).
Method to update editor window widgets to display another resource.
Commits pending resource changes, if there are any.
It calls @apply_changes method first (if it exists), then saves resource to disk.
Changes are always immediately committed (if there are any pending): before the editor is destroyed, when
a resource stops being edited, before a resource is deleted, before a resource is renamed. When a resource is newly
created, it is immediately created on disk too.
Always %FALSE (to be usable as #GSourceFunc).
A resource editor.
Gets the currently edited resource.
It is an error to call this method when no resource is being edited.
The currently edited resource.
A resource editor.
Queues commit of resource changes, marking the currently edited resource `dirty'.
Call this method in particular resource editor subclass whenever user changes some editor property.
To flush pending commit, call gwy_resource_editor_commit(). To immediately commit a change, call this method and
then gwy_resource_editor_commit().
A resource editor.
Sets up particular resource editor.
Helper method only intended for resource editor implementation. To be called in particular resource initialization
methods.
A resource editor.
The resource editor class.
The #GType of edited resources. It must be a type derived from #GwyResource.
The name of vanilla, default resource. The `New' button creates a new resource as a copy of this
one.
Resource list window title. It should be already translated.
Editor window title template. It must contain one <literal>%s</literal> that will be replaced with
edited resource name. It should be already translated.
Settings prefix for saved state, filled by gwy_resource_editor_class_setup().
Editor instance. Resource editors are singletons so if an instance exists, pointer to it is kept here.
Method to create the resource list widget, it is of the gwy_gradient_tree_view_new()
signature. There are currently some hardcoded assumptions about the tree view columns, so it
cannot be completely arbitrary.
Method to construct editor contents in provided container (the container itself is managed by
#GwyResourceEditor, its contents by a particular editor).
Method called on commit (before resource is written to disk). It should obtain values from the
editor widgets and actually update the resource.
Method to update editor window widgets to display another resource.
Sets up particular resource editor class.
Helper class method only intended for resource editor implementation. To be called in particular class
initialization methods.
A resource editor class.
Creates new controls for result set export.
A newly created result set export widget.
Format to select.
Gets the selected format in result set export controls.
Currently selected format.
Controls for result set export.
Gets the set of scalar values to save or copy by result set export controls.
The #GwyResults object, or %NULL.
Controls for result set export.
Gets the report style for result set export controls.
See gwy_results_export_set_style() for discussion.
The style of the results export controls.
Controls for result set export.
Makes the action buttons (copy and save) sensitive or insensitive.
This is generally preferred to making the entire widget insensitive as the format can be selected independently on
whether there is already anything to export.
Controls for result set export.
%TRUE to make the action buttons sensitive, %FALSE to make them insensitive.
Sets the selected format in result set export controls.
Controls for result set export.
Format to select.
Sets the report formatting function for result set export controls.
Setting the formatting function allows automated handling of Copy and Save buttons, even when there is not
#GwyResults object. It is intended to be used with %GWY_RESULTS_EXPORT_FIXED_FORMAT. However, it takes precedence
even when a #GwyResults object is set.
Controls for result set export.
The formatting function.
Data passed to @func.
Sets the set of scalar values to save or copy by result set export controls.
If you supply a result set to save or copy @rexport handles the Save and Copy buttons itself. So you do not need
to connect to the "copy" and "save" signals, except if you need to ensure @results are updated.
Controls for result set export.
Set of reported scalar values. May be %NULL to unset.
Sets the report style for result set export controls.
The report style determines which controls will be shown. For %GWY_RESULTS_EXPORT_FIXED_FORMAT only the action
buttons are shown. Tabular data (%GWY_RESULTS_EXPORT_TABULAR_DATA) do not have the %GWY_RESULTS_REPORT_COLON
option. The default style %GWY_RESULTS_EXPORT_PARAMETERS have the full controls.
Controls for result set export.
Report style.
Sets the title of file save dialogue for result set export controls.
Controls for result set export.
File save dialogue title (or %NULL to use the default).
The ::copy signal is emitted when user presses the Copy button.
The ::format-changed signal is emitted when the selected format changes.
The ::save signal is emitted when user presses the Save button.
The type of result formatting function.
Formatted report as a newly allocated string. #GwyResultsExport will free it using g_free() after saving
it to a file or copying to the clipboard.
Data passed to gwy_results_export_set_format_func().
Module function run mode flags.
The values are used as flags when a function declares the supported modes. However, when a function is executed, it
is always in a specific mode. It can simply use equality tests to find out the mode (as opposed to testing which
flags are set).
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.
None.
The function is run non-interactively, it must not present any GUI nor touch application
state.
The function presents a modal user interfaces where parameters can be adjusted, it returns
after finishing all operations.
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
windows, etc.
The type of auxiliary saved data creation function.
The data to save. It must not return %NULL.
The data passed to gwy_save_auxiliary_with_callback() as @user_data.
The length of the returned data in bytes. Leaving it unset has the same effect as setting it to
a negative value. See gwy_save_auxiliary_data() for details.
The type of auxiliary saved data destruction function.
The data returned by the corresponding #GwySaveAuxiliaryCreate function.
The data passed to gwy_save_auxiliary_with_callback() as @user_data.
Possible flags passed to gwy_synth_append_dimensions_to_param_table().
The lateral unit is fixed and cannot be set by the user.
The value unit is fixed and cannot be set by the user.
No units can be set by the uset.
The option to start from the current image is not available.
Ids of parameters created by gwy_synth_define_dimensions_params().
The enum also includes a few GUI elements to satisfy the id uniqueness required by #GwyParamTable.
Horizontal pixel resolution.
Vertical pixel resolution.
Whether the image is square (pixelwise).
Horizontal physical dimension, in base SI units.
Vertical physical dimension, in base SI units.
Whether pixels are physically square.
Unit of lateral dimensions.
Unit of values.
Whether the simulation result should replace the current image.
Whether the simulation should start from the current image.
Button Like Current Image.
Header for the pixel dimensions section.
Header for the physical dimensions section.
Header for the unit section.
Header for the Current Image section.
The type of synthetic data function.
Uniquely, @data may be %NULL for synthetic data functions. They need to create a new file then. Helper functions
such as gwy_synth_add_result_to_file() exist to simplify and unify the implementation.
The file data container to operate on.
Run mode.
Dialog responses for buttons created by gwy_synth_append_dimensions_to_param_table().
Take dimensions and units from the current image.
Set value scale to match the value scale of the current image.
Possible return values from gwy_synth_update_progress().
The computation was cancelled by the user.
Nothing has changed; proceed with computation.
Render a preview of the current computation state.
#GwyTextHeaderContext represents the parsing state. It is an opaque data structure and should be only manipulated
with the functions below.
Gets the current header line.
The current line number, starting from zero.
Header parsing context.
Gets the currently open section.
This function may be called if no sectioning is defined. It simply returns %NULL then.
The name of the currently open section, %NULL if there is none.
Header parsing context.
Error codes returned by text header parsing.
Some errors, in particular %GWY_TEXT_HEADER_ERROR_KEY and %GWY_TEXT_HEADER_ERROR_VALUE are expected to be raised by
user callbacks (they are not restricted to these codes though).
Section name is invalid. It is raised by the parser only for an empty section
name.
Section ended when a different section or no section was open. Note that
gwy_text_header_context_get_section() returns the section being closed at the
time this error is raised.
Section started before the previous ended. This is raised only if
@endsection_template is set.
Line lacks the mandatory prefix.
Line cannot be parsed into a key-value pair.
Key name is invalid, namely empty.
Value is invalid. This is never raised by the parser.
The text header has ended without being terminated by specified terminator.
Returns error domain for expression parsin and evaluation.
See and use %GWY_TEXT_HEADER_ERROR.
The error domain.
Text header parser specification.
Memory considerations: In general, the parser attempts to reuse the contents of @header directly for the hash keys
and values. There are two cases when it cannot: sectioning implies that keys must be constructed dynamically and
the use of @item callback means the parser has no control on what is inserted into the hash table.
This means that the @item callback must free @key if sectioning is used and it is not going to actually use it as
the hash table key. And, of course, suitable @destroy_key and @destroy_value functions must be set.
Prefix denoting comment lines. It is possible to specify multiple prefixes by separating them
with newline ("\n").
Section start template. It must contain the character "\x1a" in the place where the section
name apprears. For example, "[Section \x1a]".
Section end template. It may or may not contain the substitute character "\x1a" depending on
whether the section end markers contain the section name. It is invalid to
set @endsection_template without setting @section_template. Example: "[Section \x1a End]".
Glue to put between the section name and key when constructing hash table keys. It is invalid
to set @section_accessor without setting @section_template. Typically, "::" is used.
Mandatory prefix of each line. Note this applies only to key-value lines. The templates, such
comments, sections and terminators, must still include @line_prefix if they start with it.
The string separating keys and values on each line. Typically, "=" or ":" is used. When left
%NULL, whitespace plays the role of the separator. Of course, keys cannot contain whitespace
then.
Line that marks end of the header. It is mandatory if specified, @GWY_TEXT_HEADER_ERROR_TERMINATOR is
raised when the header ends sooner than @terminator is found.
Callback called when a key-value pair is found. If set it is responsible for inserting the pair to the hash
table with g_hash_table_replace(). It is free to insert a different pair or nothing. It must return %FALSE
if it raises an error.
Callback called when a section starts. It must return %FALSE if it raises an error.
Callback called when a section end. It must return %FALSE if it raises an error.
Callback called when the parsing finishes successfully, @length contains the length of parsed text in bytes.
Callback called when an error occurs, including errors raised by other user callbacks. If it returns %TRUE
the error is considered fatal and the parsing terminates immediately. If it is left unset no errors are
fatal hence no errors are reported to the caller.
Function to destroy keys, passed to g_hash_table_new_full(). It is invalid to set @destroy_key if
@item callback is not set.
Function to destroy values, passed to g_hash_table_new_full(). It is invalid to set @destroy_value
if @item callback is not set.
Calls a function for each tool function.
Function to run for each tool, passed by name.
Data to pass to @function.
Registeres a tool function (tool type).
Normally %TRUE; %FALSE on failure.
Layer type in GObject type system. That is the return value of
gwy_tool_foo_get_type().
Instructs a tool to switch to another data view.
This involves set up of the top layer of @data_view and/or its selection
to the mode appropriate for @tool.
A tool.
A data view. It can be %NULL, too.
Hides a tool's dialog.
A tool.
Dialog response virtual method. Hiding an closing is normally
handled in the base class, particular tools can handle only
responses from their specific buttons.
Shows a tool's dialog.
A tool.
Instructs a tool to switch to another spectra object.
Bad things may happen when the spectra does not belong to the same container
as the currently active channel.
A tool.
A spectra object. It can be %NULL, too.
Adds a Hide button to a tool dialog.
All tools should have a Hide button added by this method. The reason why
it is not added automatically is because the usual placement of the Hide
button is next to the execution button (Apply), which is not present
for informational-only tools. In that case Hide should become the default
dialog button.
A tool.
Whether hide should become the default tool dialog response.
Instructs a tool to switch to another data view.
This involves set up of the top layer of @data_view and/or its selection
to the mode appropriate for @tool.
A tool.
A data view. It can be %NULL, too.
Hides a tool's dialog.
A tool.
Checks whether a tool dialog is visible.
%TRUE if tool dialog is visible, %FALSE if it is hidden.
A tool.
Restores tool's dialog screen and position.
This function must be called when the tool dialog is not mapped yet.
The position is remembered within a session (not in the settings) for each
tool class. In Gwyddion, the program, at most one instance of each tool
exists so there is no abiguity which dialog position should be saved and
restored.
A tool.
Shows a tool's dialog.
A tool.
Instructs a tool to switch to another spectra object.
Bad things may happen when the spectra does not belong to the same container
as the currently active channel.
A tool.
A spectra object. It can be %NULL, too.
Tool class.
The fields @default_width and @default_height should be set only if a tool
dialog requires a different initial size from it would request (due to
shrinkable widgets). Since #GwyTool keeps dialog sizes stored in settings
and restores them automatically, these values essentially apply only to the
first use of a tool.
Tool icon stock id.
Tooltip.
Tool dialog title.
Prefix in settings to store automatically remembered tool state
under, should be of the form <literal>"/module/mytool"</literal>.
Default initial window width, normally unset.
Default initial window height, normally unset.
Tool show virtual method. Most tools do not need to override it,
unless they wish to handle lazy updates themselves.
A tool.
Tool hide virtual method. Most tools do not need to override it.
A tool.
Data switched virtual method.
A tool.
A data view. It can be %NULL, too.
Dialog response virtual method. Hiding an closing is normally
handled in the base class, particular tools can handle only
responses from their specific buttons.
A tool.
A spectra object. It can be %NULL, too.
Gets the icon stock id of a tool class (this is a class method).
The stock id as a string owned by the tool class.
A tool class.
Gets the title of a tool class (this is a class method).
The title is normally used as a tool dialog title.
The title as a string owned by the tool class, untranslated.
A tool class.
Gets the title of a tool class (this is a class method).
The tooltip as a string owned by the tool class, untranslated.
A tool class.
Data object visibility reset type.
The precise behaviour of @GWY_VISIBILITY_RESET_DEFAULT may be subject of further changes. It indicates the wish to
restore saved visibilities and do something reasonable when there are no visibilities to restore.
Restore visibilities from container and if nothing would be visible, make an
arbitrary data object visible.
Restore visibilities from container.
Show all data objects.
Hide all data objects. This normally makes the file inaccessible.
#GwyAppDataWindow is an abstract interface provided by application-level windows showing various data objects, such
as #GwyAppImageWindow and #GwyAppGraphWindow.
#GwyAppGraphWindow wraps #GwyGraphWindow and updates it to changes in the file.
#GwyAppImageWindow wraps #GwyDataWindow and updates it to changes in the file.
Puts the curves of a graph to another graph if possible, or adds the graph as new.
If the units of @gmodel are compatible with the units of the graph identified by @target_graph the curves are
copied to the target graph with gwy_graph_model_append_curves().
In all other cases, including when @target_graph does not refer to any existing graph, the graph model is added to
@data as a new graph.
Either way, the caller usually need to release its own reference afterwards.
This function is useful particularly in modules that create graphs and can be run non-interactively.
The numerical identifier of the newly-created graph of one was created. Value -1 is returned if curves
were added to @target_graph.
A graph model with curves to add.
Data container where the graph would be added.
Graph where curves would be added.
Curve block size as in gwy_graph_model_append_curves().
Constructs the application <guimenu>Curve Maps</guimenu> menu.
The menu is created from curve map data processing functions registered by modules, therefore module registration
has to be done first for this function to make sense.
Newly created curve map data processing menu.
Sensitvity group for the menu.
Creates a recent function menu for a data window.
The menu content is updated automatically when function such as gwy_app_run_volume_func() is used.
New recent function menu as a #GtkWidget.
Data window the menu will be added to. It determines the data kind and thus the menu type.
Acceleration group to be associated with the menu.
Sensitvity group for the menu.
Obtains the currently active tool object.
In some rare circumstances, this function can return %NULL because no tool is active. This includes program
startup and shutdown and during the construction of a new #GwyTool object while switching tools. Also, %NULL is
typically returned outside Gwyddion in programs just using the libraries.
The current tool object.
Obtains the name of currently active tool.
See gwy_app_switch_tool() for the name description.
In some rare circumstances, this function can return %NULL because no tool is active. This includes program
startup and shutdown and during the construction of a new #GwyTool object while switching tools. Also, %NULL is
typically returned outside Gwyddion in programs just using the libraries.
The tool name.
Closes the current file file (very high-level app function).
Asks for file overwrite for a file save chooser.
%TRUE if it is OK to overwrite the file, %FALSE when user cancelled
it or there was other problem.
A file chooser for save action.
Loads a file into application (a high-level function).
At least one of @filename_utf8, @filename_sys must be non-%NULL.
The file is loaded in interactive mode, modules can ask for user input. Upon a successful load all necessary setup
tasks are performed. If the load fails, an error dialog is presented.
Container of the just loaded file on success, %NULL on failure. The caller does not own the reference, the
container is only owned by the data browser.
Name of file to load, in UTF-8.
Name of file to load, in GLib encoding.
File type to open file as, but normally %NULL to automatically detect from file contents.
Merges a user-selected file (very high-level app function).
Opens a user-selected file (very high-level app function).
Saves current data to a file (very high-level app function).
May fall back to gwy_app_file_save_as() when current data has no file name associated with it, or the format it was
loaded from is not saveable.
Saves current data to a user-selected file (very high-level app function).
Writes container to a file (a high-level function).
At least one of @filename_utf8, @filename_sys must be non-%NULL.
The file is saved in interactive mode, modules can ask for user input. If the write fails, an error dialog is
presented.
%TRUE on success.
Data to write.
Name of file to write data to, in UTF-8.
Name of file to write data to, in GLib encoding.
File type to save file as, but normally %NULL to automatically detect from file name.
Returns what the app uses as `current directory'.
Warning: This function is probably temporary.
A string in GLib file name encoding that should not be modified neither freed, valid only until next call
to gwy_app_set_current_directory(). It ends with a %G_DIR_SEPARATOR_S.
Obtains a text buffer with program log messages.
This functions may only be called after gwy_app_setup_logging() and, obviously, after GTK+ was intialised.
The text buffer is owned by the library and must not be modified nor destroyed. It will be already filled with
messages occurring between gwy_app_setup_logging() and this function call. New messages will be appended to the
buffer as they arrive.
Text buffer with the program log messages.
Identifies the kind of tree model.
Receivers of tree model drag data can use this function to see if the source is a known Gwyddion DnD data source.
The known kinds include data browser lists "image", "graph", "spectra", "volume", "xyz" and "cmap". However, these
lists store only to internal data browser structures, making them useful drag sources only within libgwyapp itself.
Graph window curve lists are of "graph-curves" kind and the selection manager tool selection list is
"image-selections".
String identifier of the tree model kind. It may be %NULL if the drag source is not identified
as any standard kind.
A tree model.
Creates or presents color gradient editor.
Gradient editor is singleton, therefore if it doesn't exist, this function creates and displays it. If it already
exists, it simply calls gtk_window_present() on the existing instance. It exists until it's closed by user.
Constructs the application <guimenu>Graph</guimenu> menu.
The menu is created from graph functions registered by modules, therefore module registration has to be done first
for this function to make sense.
Newly created graph data processing menu.
Sensitvity group for the menu.
Constructs the application <guimenu>Data Process</guimenu> menu.
The menu is created from data processing functions registered by modules, therefore module registration has to be
done first for this function to make sense.
Newly created image data processing menu.
Sensitvity group for the menu.
Performs common initialisations useful for programs utilising Gwyddion libraries.
Regardless of the value of @for_gui, the function initialises gwyddion libraries, loads resources, loads settings
and imports modules (see below for pygwy). It also disables undo and GUI for the data browser as they are unlikely
to be useful outside Gwyddion itself.
If @for_gui is %TRUE the function initialises GTK+ as follows
|[
gtk_init(NULL, NULL);
]|
GUI programs which wish to initialise GTK+ differently need to call gtk_init() or some other GTK+ initialisation
function explicitly prior to calling gwy_app_init(), making the default call no-op. It also sets up
Gwyddion-specific widget styles.
If @for_gui is %FALSE the function sets up logging to console (see also below) and does additional setup for for
non-GUI operation. In particular, it disables GUI for waiting.
There are currently the following options:
"enable-threads" with #gboolean value. If %TRUE or %FALSE is passed gwy_threads_set_enabled() will be called with
this settings. By default, the multithread processing state is unchanged.
"enable-pygwy" with #gboolean value. If %TRUE is passed then pygwy will not be prevented from loading. Passing
%FALSE is the same as not setting the option at all and will result in pygwy being prevented from loading using
gwy_module_disable_registration().
"no-logging-setup" with #gboolean value. If %TRUE is passed then logging setup is unchanged. Passing %FALSE is the
same as not setting the option at all and will set up logging to console in non-GUI mode.
So, for instance a program non-GUI wanting to enable multithread processing in Gwyddion functions (provided it is
built in) can run
|[
gwy_app_init(FALSE, "enable-threads", TRUE, NULL);
]|
%TRUE to do initialisation suitable for a GUI program; %FALSE for a non-GUI program.
Name of the first initialisation option, or %NULL if there are no options.
Value of the first option, if any, followed by another option name and value, etc. Terminated by %NULL.
Sets up style properties for special Gwyddion widgets.
Usually it is done as a part of gwy_app_init(). It exists for the case when you need to do the initialisation steps
separately.
Gdk screen to set the styles for.
Obtains the main application accelerator group.
The group includes accelerators for terminating Gwyddion, opening and saving files and similar operations. You
should add it to other windows where these global keyboard shortcuts should work.
If the main accelerator group does not exist yet, it will be created.
The main accelerator group.
Returns the main application window.
In a running Gwyddion GUI, the main window is always the toolbox. Technically, the function returns whatever was
set with gwy_app_set_main_window() during program startup. Including possibly %NULL is nothing has been set.
The main window.
Gets the application recent files menu.
The menu is initially empty and can be updated with gwy_app_menu_recent_files_update(). This function is
essentially useful only for toolbox construction.
The recent files menu (a #GtkMenu).
Updates recent file menu.
If the list of files is longer than the maximum number of recent file menu
items, only the maximum number is shown.
A list of recent file names, in UTF-8.
Quits the application.
This function may present a confirmation dialog to the user and it may let the application to continue running. If
it quits the application, it performs some shutdown actions and then quits the Gtk+ main loop with gtk_main_quit().
Always %TRUE to be usable as an event handler. However, if the application is actually terminated, this
function does not return.
Gets thumbnail of a recently open file.
The thumbnail as a new pixbuf or a pixbuf with a new reference. The caller must unreference it but not
modify it. If a thumbnail can not be obtained, a fully transparent pixbuf is returned.
Name of a recent file, in UTF-8 encoding.
Frees all memory taken by recent file list.
Should not be called while the recent file menu still exists.
Loads list of recently open files from @filename.
Cannot be called more than once (at least not without doing gwy_app_recent_file_list_free() first). Must be called
before any other document history function can be used, even if on a nonexistent file: use %NULL as @filename in
that case.
%TRUE if the file was read successfully, %FALSE otherwise.
Name of file containing list of recently open files.
Creates document history browser.
There should be at most one document history browser, so this function fails if it already exists.
The newly created document history browser window.
Saves list of recently open files to @filename.
%TRUE if the file was written successfully, %FALSE otherwise.
Name of file to save the list of recently open files to.
Moves @filename_utf8 to the first position in document history, possibly adding it if not present yet.
At least one of @filename_utf8, @filename_sys should be set.
A data container corresponding to the file.
A recent file to insert or move to the first position in document history, in UTF-8.
A recent file to insert or move to the first position in document history, in GLib encoding.
Preferred channel id to use for thumbnail, pass 0 if no channel is specificaly preferred.
Restores a window position and/or size from settings.
Unlike gwy_app_save_window_position(), this function has no @position and @size arguments, it simply restores all
attributes that were saved.
Note to restore position (not size) it should be called twice for each window to accommodate sloppy window
managers: once before the window is shown, second time immediately after showing the window.
Some sanity checks are included, therefore if saved window position and/or size is too suspicious, it is not
restored.
A window to restore position of.
Unique prefix in settings to get the information from (the same as
in gwy_app_save_window_position()).
%TRUE to only attempt set the window default size bigger than it
requests, never smaller.
Runs a curve map processing function on the current data.
From the run modes function @name supports, the most interactive one is selected.
The actually used mode (nonzero), or 0 on failure.
A curve map processing function name.
Runs a curve map processing function on current data in specified mode.
A curve map processing function name.
A run mode.
Runs a graph function on the current graph.
A graph function name.
Runs a data processing function on the current data.
From the run modes function @name supports, the most interactive one is
selected.
The actually used mode (nonzero), or 0 on failure.
A data processing function name.
Runs a data processing function on current data in specified mode.
A data processing function name.
A run mode.
Runs a synthetic data function on the current data.
From the run modes function @name supports, the most interactive one is selected.
The actually used mode (nonzero), or 0 on failure.
A synthetic data function name.
Runs a synthetic data function on current data in specified mode.
A synthetic data function name.
A run mode.
Runs a volume data processing function on the current data.
From the run modes function @name supports, the most interactive one is selected.
The actually used mode (nonzero), or 0 on failure.
A volume data processing function name.
Runs a volume data processing function on current data in specified mode.
A volume data processing function name.
A run mode.
Runs a XYZ data processing function on the current data.
From the run modes function @name supports, the most interactive one is selected.
The actually used mode (nonzero), or 0 on failure.
A XYZ data processing function name.
Runs a XYZ data processing function on current data in specified mode.
A XYZ data processing function name.
A run mode.
Saves position and/or size of a window to settings.
Some sanity checks are included, therefore if window position and/or size is too suspicious, it is not saved.
A window to save position of.
Unique prefix in settings to store the information under.
%TRUE to save position information.
%TRUE to save size information.
Adds a widget to the application-wide widget sensitvity group.
The semantics of this function is the same as gwy_sensitivity_group_add_widget() (in fact, it's a simple wrapper
around it).
Widget to add.
Which flags the widget is sensitive to.
Gets the application-wide widget sensitvity group.
The flags to be used with this sensitvity group are defined in #GwyMenuSensFlags.
The global sensitvity group instead. No reference is added, you can add yours, but the returned object
will exist to the end of program anyway.
Sets the state of application-wide widget sensitvity group.
The semantics of this function is the same as gwy_sensitivity_group_set_state() (in fact, it's a simple wrapper
around it).
Which bits in @state to copy to state.
The new state (masked with @affected_mask).
Sets what the app should use as `current directory'.
Warning: This function is probably temporary.
The directory to set, or a filename to take directory part from, it must be an absolute path. In GLib
file name encoding.
Sets basic handling of log messages.
Gwyddion treats log messages in one of two ways. Either it prints them to the console and/or a log file, according
to the command line options, environment variables and OS defaults. Or it discards them. By default, unimportant
third party messages are discarded. Meaning, for instance, that using gwy_debug() outside of Gwyddion itself does
not do anything useful.
This function allows you to change the default handling and either display messages which are normally discarded
or suppress messages which are normally logged.
Log message domain (empty for the default application domain).
Log levels to apply the setting to (a combination of log level flags).
%TRUE to log messages as given levesl, %FALSE to discard them.
Sets the main application window.
This function is probably only useful in Gwyddion itself and should be ignored.
It should to be called exactly once at Gwyddion startup. It makes gwy_app_main_window() work and adds the main
accelerator group to the window. It also restores the main window position and size, so it really makes sense for
the Gwyddion toolbox.
A window, presumably the Gwyddion toolbox.
Sets the kind of a tree model.
You should almost never need this function because all standard tree models usable as drag sources set the kind
themselves. See also gwy_app_get_tree_model_kind().
A tree model.
String identifier of the tree model kind.
Create gwyddion config directory.
Whether it succeeded (also returns %TRUE if the directory already exists).
Returns error domain for application settings operations.
See and use %GWY_APP_SETTINGS_ERROR.
The error domain.
Frees Gwyddion settings.
Should not be called only by main application.
Gets the Gwyddion settings.
The program settings are in a #GwyDict, which is normally loaded at program startup using a function like
gwy_app_init() and saved at exit using a function like gwy_app_settings_save(). If you use settings, you should
load resources beforehand. Or, better, use gwy_app_init().
For storing persistent module data manually you should use <literal>"/module/YOUR_MODULE_NAME/"</literal> prefix.
However, in common cases you should use #GwyParamDef and #GwyParams which can handle the dirty work themselves.
The settings as a #GwyDict.
Gets the current default mask colour.
Normally, the settings contain the default mask colour. If, for whatever reason, the settings do not exist or the
colour it has been deleted, the function fills @color with the initial default mask colour.
Location where to store the colour.
Returns a suitable log file name.
The file name as a newly allocated string.
Returns a list of directories to search modules in.
The list of module directories as a newly allocated array of newly allocated strings, to be freed with
g_strfreev() when not longer needed.
Returns a suitable recent file list file name.
The file name as a newly allocated string.
Returns a suitable human-readable settings file name.
The file name as a newly allocated string.
Initialises settings by loading a settings file.
Any existing settings are discarded. Consider gwy_app_settings_merge_string() for piecewise settings creation.
Whether it succeeded. In either case you can call gwy_app_settings_get() then to obtain either the loaded
settings or the old ones (if failed), or an empty #GwyDict.
A filename to read settings from.
Loads settings from a string and adds them to the global settings.
The contents of string @s should look like a Gwyddion settings file, including the header line "Gwyddion Settings
1.0", even though it is optional.
If no settings exist when this function is called, they are initialised like calling gwy_app_settings_get().
Whether it succeeded.
String contaning a part of Gwyddion settings file.
%TRUE to replace existing settings; %FALSE to only set values which do not exist.
Saves the settings.
Use gwy_app_settings_get_settings_filename() to obtain a suitable default filename.
Whether it succeeded.
A filename to save the settings to.
Sets up Gwyddion GLib log handler.
The log handler sends the messages to a log file or console, as Gwyddion usually does. This function may not be
useful in Gwyddion-based programs unless they try to emulate Gwyddion behaviour closely.
The function should only be called only once, early in the program initialisation. It is not possible to modify the
setup once logging is already in progress. No warning is printed if you call it repeatedly with exactly the same
@flags, but it should not be done anyway.
Flags controlling how messages are handled.
Switches the current tool to given tool.
If the tool is already active it is shown when hidden and hidden when
visible.
Tool name, that is type name of the tool object in the GLib type system. This can be for instance
"GwyToolGrainMeasure".
Constructs the application <guimenu>Curve Maps</guimenu> menu.
The menu is created from curve map data processing functions registered by modules, therefore module registration
has to be done first for this function to make sense.
Newly created curve map data processing menu.
Sensitvity group for the menu.
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpoint() does, this function takes care of updating application controls state.
Undo level id (zero if undo/redo is disabled). Not useful (yet).
A data container.
%NULL-terminated list of container item names to save.
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpointv() does, this function takes care of updating application controls state.
Undo level id. Not useful (yet).
A data container.
The number of strings in @keys.
An array of container string keys to save data.
It can contain holes, that is NUL's, they are ignored. However, it
should contain at least one real key.
Removes undo/redo information for a data container.
In addition to what gwy_undo_dict_remove() does, this function takes
care of updating application controls state.
A data container managed by the data-browser.
Prefix to remove undo/redo information under. Pass %NULL to remove
undo/redo information altogether.
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpoint() does, this function takes care of updating application controls state.
Undo level id. Not useful (yet).
A data container.
0-terminated list of container item quark keys to save.
Create a point in the undo history it is possible to return to.
In addition to what gwy_undo_checkpointv() does, this function takes care of updating application controls state.
Undo level id. Not useful (yet).
A data container.
The number of strings in @keys.
An array of container quark keys to save data.
It can contain holes, that is 0's, they are ignored. However, it
should contain at least one real key.
Performs undo on a data container.
It must have redo available.
In addition to what gwy_undo_redo_dict() does, this function takes care
of updating application controls state.
A data container.
Performs undo on a data container.
It must have undo available.
In addition to what gwy_undo_undo_dict() does, this function takes care
of updating application controls state.
A data container.
Constructs the application <guimenu>Volume Data</guimenu> menu.
The menu is created from volume data processing functions registered by modules, therefore module registration has
to be done first for this function to make sense.
Newly created volume data processing menu.
Sensitvity group for the menu.
Resets the cursor for a window.
This function lets the Gtk+ main loop to run.
If the window cursor was non-default before gwy_app_wait_cursor_start(), it is not restored and has to be set
manually. This limitation is due to the nonexistence of a method to obtain the current cursor.
A window.
Changes the cursor for a window to indicate work.
This function lets the Gtk+ main loop to run.
A window.
Finishes waiting, closing the dialog.
No function like gwy_app_wait_set_message() should be call after that.
This function must be called even if user cancelled the operation.
Reports whether progress reporting is globally enabled.
%TRUE if progress reporting is enabled, %FALSE if it is disabled.
Helper function for progressive animated preview.
This is a wrapper for gwy_app_wait_set_preview_widget() which creates a simple image preview displaying @dfield.
Call gwy_field_data_changed() on it to redraw the preview.
No preview is created if progress bars are disabled, see gwy_app_wait_set_enabled().
The created #GwyDataView with the preview (possibly %NULL if not preview was actually created). Usually
you can ignore it.
A data field used for preview.
Data container with source image (or %NULL).
Source image id (or -1).
Globally enables or disables progress reporting.
This function may not be used when a waiting dialog is currently being shown.
By default, progress reporting is enabled. Non-GUI applications that run module functions may wish to disable it
to avoid GTK+ calls or just showing the progress dialogs.
If progress reporting is disabled then functions such as gwy_app_wait_set_message() and gwy_app_wait_set_fraction()
become no-op and always return %TRUE as nothing can be cancelled by the user. Functions
gwy_app_wait_cursor_start() and gwy_app_wait_cursor_finish() still work but may be called with %NULL arguments.
%TRUE to enable progress reporting, %FALSE to disable it.
Sets the amount of progress the progress bar on the dialog displays.
This function may let the Gtk+ main loop to run, but it performs automated rate-limiting and only does so if
sufficient time has passed since the last main loop invocation. Therefore, you can call it 10000 times per second
without fearing that the program will spend all time updating the GUI and no time in the calculation.
It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions
return %FALSE.
%TRUE if the operation can continue, %FALSE if user cancelled it meanwhile. You must always check the
return value and cancel the operation if it is %FALSE.
The progress of the operation, as a number from 0 to 1.
Sets the message shown on the progress dialog.
See also gwy_app_wait_set_message_prefix() which makes this function more usable directly as a callback.
This function lets the Gtk+ main loop to run.
It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions
return %FALSE.
%TRUE if the operation can continue, %FALSE if user cancelled it meanwhile. You must always check the
return value and cancel the operation if it is %FALSE.
A mesage to show in the progress dialog.
Sets prefix for the messages shown in the progress dialog.
This function lets the Gtk+ main loop to run.
It must not be called again once the operation is cancelled, i.e. after any of the progress reporting functions
return %FALSE.
%TRUE if the operation can continue, %FALSE if user cancelled it meanwhile. You must always check the
return value and cancel the operation if it is %FALSE.
The prefix for new messages.
Sets the preview widget of a wait dialogue.
This function needs to be used before gwy_app_wait_start() to have any effect.
Preview widget, usually something like #GwyDataView.
Starts waiting for a window @window, creating a dialog with a progress bar.
Waiting is global, there can be only one at a time.
Do not forget to call gwy_app_wait_finish() when the computation is finished (or cancelled). You should also call
gwy_app_wait_set_fraction() or gwy_app_wait_set_message() regularly to leave the GUI responsive.
A window.
A message to show in the wait dialog.
Checks if a progress dialog was cancelled.
Calling this function is only meaningful between gwy_app_wait_start() and gwy_app_wait_finish(). It returns %TRUE
if the computation was cancelled by the user. This may be occasionaly useful in complex multi-level calculations.
Usually, the return values of gwy_app_wait_set_fraction() and gwy_app_wait_set_message() are sufficient.
%TRUE if the currently running calculation was cancelled.
Constructs the application <guimenu>XYZ Data</guimenu> menu.
The menu is created from XYZ data processing functions registered by modules, therefore module registration has to
be done first for this function to make sense.
Newly created XYZ data processing menu.
Sensitvity group for the menu.
Sets `realsquare' for a channel highly non-square pixels.
The threshold for highly non-square is somewhat arbitrary. Fortunately, most files encoutered in practice have the
measure ratio either very close to 1, larger or equal than 2.
The file may be still in construction.
%TRUE if the channel was found to have highly non-square pixels and `realsquare' was set (otherwise it was
unset).
A data container.
Data channel id.
Obtains the name of currently running curve map processing function.
If no curve map processing function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name
is returned.
The name of currently running curve map processing function or %NULL.
Checks whether a curve map processing function exists.
%TRUE if function @name exists, %FALSE otherwise.
Curve map data processing function name.
Calls a function for each curve map function.
Function to run for each curve map function. It will get function name (constant string owned by module
system) as its first argument, @user_data as the second argument.
Data to pass to @function.
Gets icon name of a curve map processing function.
The icon name. The returned string is owned by the module.
Curve map data processing function name.
Returns the menu path of a curve map processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Curve Map".
The menu path. The returned string is owned by the module.
Curve map data processing function name.
Returns run modes supported by a curve map processing function.
The run mode bit mask.
Curve map data processing function name.
Gets menu sensititivy mask for a curve map processing function.
The menu item sensitivity mask (a combination of #GwyMenuSensFlags flags).
Curve map data processing function name.
Gets tooltip for a curve map processing function.
The tooltip. The returned string is owned by the module.
Curve map data processing function name.
Registers a curve map data processing function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
The function itself.
Menu path under Curve Map menu. The menu path should be marked translatabe, but passed untranslated
(to allow merging of translated and untranslated submenus).
Stock icon id for toolbar.
Supported run modes. Curve map data processing functions can have two run modes: %GWY_RUN_IMMEDIATE (no
questions asked) and %GWY_RUN_INTERACTIVE (a modal dialog with parameters).
Sensitivity mask (a combination of #GwyMenuSensFlags flags). Usually it contains
#GWY_MENU_FLAG_CMAP, possibly other requirements.
Tooltip for this function.
Runs a curve map processing function identified by @name.
Curve map data processing function name.
Data (a #GwyFile).
How the function should be run.
Moves all nonzero quarks to the beginning of an array.
The number of non-zero values.
Array of quarks, possibly with holes (zeros).
The number of quarks in @quarks.
Creates the typical data processing dialog hbox with a preview.
The box is added to the dialog.
A new #GtkBox widget.
A data processing dialog.
Preview data view, usually created by gwy_create_preview().
%TRUE to pack the data view to the end; %FALSE to pack it to the start.
Creates an expander linked to a boolean parameter.
This is a convenience function for making an expander whose state is remembered in settings. The parameter
identified by @id must be a boolean parameter. The expander initial state will be set from the parameter and,
conversely, the parameter will be updated according to the expander state.
A newly created #GtkExpander widget.
Expander label markup. Usually boldface Options.
A parameter value set.
Parameter identifier.
Sets up a parameter table range row for horizontal graph selection.
A row with the two parameters is added to the table. The graph is set up for %GWY_GRAPH_STATUS_XSEL.
Synchronisation between the parameters and selection is set up.
The caller still needs to run gwy_dialog_invalidate() or use a similar mechanism when the parameter changes.
Usually, any change to the selection will result in two updates, one for each parameter.
Set of parameter value controls.
Parameter identifier for the beginning.
Parameter identifier for the end.
Graph widget where the @x-range will be selected.
Graph model used for determining the @x range. May be %NULL to use @graph's model, although this is not
usually useful.
Creates a tree model filter around an inventory store which hides the default item.
The model can be used to create resource lists without the default item if it is special and should not be shown to
users. Remember you need to translate iters between the models using
gtk_tree_model_filter_convert_child_iter_to_iter() and gtk_tree_model_filter_convert_iter_to_child_iter().
A newly created #GtkTreeModelFilter wrapping @store.
An inventory store.
Creates and sets up a preview widget for use in modules.
This function does not do much any more. You can simply create a #GwyDataView and call gwy_set_data_preview_size()
which is the slightly messy bit.
A new data view widget with the preview.
Data field to display.
Mask field to display, possibly %NULL.
Preview size. Prefrably one of the standard sizes.
Creates and sets up a vector layer for use in module previews.
The selection's key will have the form "/0/select/lcname", where @lcname is the lowercase version of layer type
name, with "GwyLayer" prefix removed. You can query the layer using #GwyDataView functions to obtain the key.
Parameters @max_objects and @editable exist for convenience. The corresponding properties can be modified later.
In typical scenarios this function is also suitable for switching vector layers in the preview. Simply create
a different layer and the current one will be discarded – this assumes you do not keep the old layer object around.
Selections are kept in @dataview's data, so they will be automatically restored when switching back and forth.
The layer's selection. No reference is added; use g_object_ref() if you want to keep the selection
around after the preview is destroyed.
Preview data view, usually created by gwy_create_preview().
Layer type.
Maximum number of objects in the selection.
%TRUE for a user-editable selection, %FALSE to disable editing.
The data browser is both an entity that monitors of various data in Gwyddion and the corresponding user interface
showing the data lists and letting the user deleting or copying them. The public functions are generally related
to the first part.
Data browser functions may only be called from the main thread. Therefore, there is no locking.
An #GwyFile that represents an SPM file is managed by functions such as gwy_data_browser_add() or
gwy_data_browser_remove(). Note that the high-level libgwyapp functions generally call the data browser functions
as appropriate. Low-level functions, e.g. #GwyFile functions, do not. If a #GwyFile has not been added to the data
browser it is unmanaged and cannot be used with data browser functions (there are, however, quite a few data
managing operations #GwyFile itself can do).
An important part of the data browser is keeping track which data item is currently selected (to know what a data
processing method should process, etc.). You can obtain the information about various currently selected objects
using gwy_data_browser_get_current(). Making a data item currently selected is accomplished either using function
such as gwy_data_browser_select_widget(), which corresponds to the user switching windows, or
gwy_data_browser_select_data() which selects a data item as current in the browser. The latter is less safe and can
result in a strange behaviour because for some purposes only data displayed in a window can really be ‘current’.
#GwyDataChooser is an base data object chooser class. Choosers for particular data objects can be created with
gwy_data_chooser_new() and then manipulated through #GwyDataChooser interface.
The widget type used to implement choosers is not a part of the interface and may be subject of future changes. In
any case #GwyDataChooser has a <code>"changed"</code> signal emitted when the selected item changes.
It is possible to offer only data objects matching some criteria. For example to offer only data fields compatible
with another data field, one can use:
<informalexample><programlisting>
GtkWidget *chooser;
GwyField *model;
<!-- Hello, gtk-doc! -->
model = ...;
chooser = gwy_data_chooser_new(GWY_FILE_IMAGE);
gwy_data_chooser_set_filter(GWY_DATA_CHOOSER(chooser), compatible_field_filter, model, NULL);
</programlisting></informalexample>
where the filter function looks like
<informalexample><programlisting>
static gboolean
compatible_field_filter(GwyFile *data,
gint id,
gpointer user_data)
{
GwyField *model, *field;
GQuark quark;
<!-- Hello, gtk-doc! -->
quark = gwy_app_get_data_key_for_id(id);
field = gwy_dict_get_object(data, quark);
model = GWY_FIELD(user_data);
return !gwy_field_is_incompatible(field, model,
GWY_DATA_MISMATCH_RES
| GWY_DATA_MISMATCH_REAL
| GWY_DATA_MISMATCH_LATERAL
| GWY_DATA_MISMATCH_VALUE);
}
</programlisting></informalexample>
Obtains the data browser GUI accelerator group.
The group contains accelerators for actions such as data duplication or deletion, which are generally expected to
work also in various data windows.
The data browser is a singleton; see gwy_data_browser_widget(). When the browser GUI is destroyed, it releases its
own reference on the accelerator group and forgets it.
If browser GUI is disabled or not yet created, the function returns %NULL. Just calling this function does not
force the creation of the accelerator group.
The accelerator group, possibly %NULL.
Adds a data file container to the application data browser.
The file becomes managed by the data browser. Use gwy_data_browser_remove() to remove it. The data browser takes
a reference on the file; you can usually release yours.
If the file is still marked in construction, the construction is finished. If some data objects that need an image
representation (e.g. volume or XYZ data) lack previews, default previews are created for them.
If GUI is running, windows are created, showing @file's data according to visibility flags. If nothing is marked
visible, the first found data are displayed.
A data file container
Adds a function watching a specific kind of data.
Identifier of the watching function to be used with gwy_data_browser_remove_watch().
Function to call when data change, are added or removed.
Data kind to watch.
User data to pass to @function.
Function to destroy user data when done, possibly %NULL.
Temporarily blocks data switching.
Normally, the current data item is switched according to the active window.
This may be necessary during operations which would be derailed by data switching. For instance DnD from tree views
showing the contents of active data does not work correctly if the window manager switches active windows during
the DnD, so at the drop time the tree view content no longer matches the dragged row. While switching is blocked,
functions such as gwy_data_browser_select_data() will only queue the change.
Use gwy_data_browser_unblock_switching() to restore data switching. It will also switch data to the window that
should be currently active, if the active window has changed (but without any intermediate steps if the active
window has changed multiple times).
Switching must not be blocked permanently because it would get the data browser out of sync.
Adds a new data items as a duplicate of existing data including all auxiliary information.
The function differs from gwy_file_copy_data() in two primary aspects: It adds a log entry and it makes the new data
visible. Therefore, it suitable for data duplication in a running GUI, as opposed to mere file manipulation
function.
The id of copied data in @dest.
Source data file container.
Type of data to copy.
Data item id.
Target data file container.
Finds file and the corresponding key for any data object.
The function does not actually scan all open files and is relatively cheap. The behaviour during changes in the
file, such as data replacement, addition or removal, is currently undefined (it may return values corresponding
either to the old or the new state).
The file containing @object, if any. Otherwise %NULL.
Data object, presumably in an data file managed the data browser.
Location to store the key corresponding to @object in returned file. Possibly %NULL.
Calls a function for every file managed by the data browser.
The function must not remove files from the data browser nor add new ones to it.
Function to call for each file.
User data to pass to @function.
Function to destroy user data when done, possibly %NULL.
Gets information about current objects.
All output arguments are always set to some value, even if the requested object does not exist. Object arguments
are set to pointer to the object if it exists (no reference is added), or cleared to %NULL if no such object
exists.
Quark arguments are set to the corresponding key even if no such object is actually present (use object arguments
to check for object presence) but the location where it would be stored is known. This is common with
presentations and masks. They are be set to 0 if no corresponding location exists -- for example, when the current
mask key is requested but the current data contains no channel (or there is no current data at all).
The rules for id arguments are similar to quarks, except they are set to -1 to indicate undefined result.
The current objects can change due to user interaction even during the execution of modal dialogs (typically used
by modules). Therefore to achieve consistency one has to ask for the complete set of current objects at once.
First information about current objects to obtain.
pointer to store the information to (object pointer for objects, #GQuark pointer for keys, #gint pointer for
ids), followed by 0-terminated list of #GwyAppWhat, pointer couples.
Gets the numerical id of the current data of given kind.
Use in conjuction with gwy_data_browser_get_current_data_kind() to get the selected data in the active data list
of the browser.
The numerical id, possible -1 if there are no current data of given kind.
Type of the data object.
Gets the kind of current data.
This is what the active data lists shows, for instance. However, even the inactive lists have their own current
data items which you can get using gwy_data_browser_get_current_data_id().
The data kind, possibly %GWY_FILE_NONE if there are no current data.
Gets the current file.
The current file, possibly %NULL if there is no current file.
Gets the numerical id of the current file.
The numerical id, poissbly %GWY_FILE_ID_NONE if there is no current file.
Identifies the data displayed by a data displaying widget.
The preferred argument for @widget is the top-level window. However, there is some liberty. The function also
identifies the data correctly when given the data displaying widget such as #GwyDataWindow or #GwyGraph.
It is not an error to pass a window not showing any data, although there should not be any reasong for doing so.
If the function return %FALSE, the values of @file, @data_kind and @id are kept intact.
The returned data kind is the primary data kind for that window.
%TRUE if the data displayed by @widget was identified, %FALSE otherwise.
A data displaying widget.
Location to store the corresponding data file.
Location to store the corresponding data kind.
Location to store the corresponding data id.
Finds a file by its numerical id.
Only files managed by the data browser have an id. It is not an error to request a file which does not exist. In
such case, %NULL is returned. See also gwy_file_get_id().
The file identified by @id, or %NULL.
Identifier of a data file container.
Reports whether creation of windows by the data-browser is enabled.
See gwy_data_browser_set_gui_enabled() for discussion.
%TRUE if the data-browser is permitted to create windows, %FALSE if it is not.
Gets the top-level window displaying given data.
It is not an error to ask for nonexistend windows, even windows which could not exist (for example because @data
is not a managed file or @id is negative).
The window displaying data in @data identified by (@data_kind, @id), possibly %NULL.
A data file container.
Type of the data object.
Data item id.
Removes a data file container to the application data browser.
If GUI is running, all windows displaying @file's data are closed. The file ceases being managed by the data
browser. The data browser releases its reference on the file. This often leads to @file's destruction.
The current file may not be removed while switching is blocked with gwy_data_browser_block_switching(). It would
lead to a contradiction: the browser must switch away from @file but it is not allowed to change the current file.
A data file container
Removes a function watching a specific kind of data.
The identifier is obtained when adding such function with gwy_data_browser_add_watch().
Watch function identifier.
Resets visibility of all data objects in a container.
It is possible to perform the reset when GUI is disabled. In such case the visibility flags in the file are set,
but no windows are created or closed. The %GWY_VISIBILITY_RESET_RESTORE mode is a no-op in such case because it
does not change the visibility flags. %GWY_VISIBILITY_RESET_DEFAULT is often also no-op, but it may set the flag
for some data if none are currently marked visible.
This function prevents the file from being closed when all windows are closed. Usually, a GUI caller should close
the file when getting a zero return value.
The number of data objects marked visible in @file after the reset (if GUI is running, it will be also
the number of data objects shown in windows now).
A data file container.
Type of visibility reset.
Selects a file and data item.
A data file container managed by the data-browser.
Type of the data object.
Data item id.
Selects the file and data item corresponding to a data displaying widget as current.
Selecting an image window switches the active tool to this window.
You can pass %NULL to select no data. Usually when some data exist, some data are selected as current. However, it
is possible to have no data selected when data exist.
It is an error to pass non-data-displaying widgets.
A data displaying widget.
Globally enables or disables creation of widgets by the data-browser.
At present, the browser GUI state needs to be decided before any files are added to the data browser. Changing the
GUI state later is not supported. Usually, this function is not called explicitly. The state is set by
gwy_app_init() according to its @for_gui flag. By default, the GUI is enabled.
If GUI is enabled, the data-browser creates windows for data objects automatically, for instance when
reconstructing the view of a loaded file or after a module function creates a new image or graph and marks it
visible. Non-GUI applications that run module functions usually wish to disable such behaviour.
If GUI is disabled the data browser never creates windows showing data objects and also its own GUI becomes
unavailable. This mode has some utility, in particular when processing multiple files, thanks to function such
as gwy_data_browser_foreach(). Nevertheless, #GwyFile already offers a number of data management functions that
are sufficient for many non-GUI use cases.
%TRUE to enable creation of widgets by the data-browser, %FALSE to disable it.
Shuts down the data browser when quitting the application.
The function is meant to avoid spurious signals and notifications in a quick shutdown. It does not go through all
files and remove them from the browser and does not destroy the GUI. It just makes the data browser ignore any
signals and data changes, assuming the program is already terminating.
Stops temporarily blocking of data switching.
If some data switching has been blocked, the most recent will be realised now.
The blocking is started by gwy_data_browser_block_switching(). See its description for details.
Obtains the data browser widget.
The data browser is a singleton. If browser GUI is enabled and the widget already exists, it is simply returned.
It may be newly created as necessary. In any case, the widget is owned by the browser. Destroy it to disable the
shut down the GUI, but keep the data browser itself.
Use gwy_data_browser_shut_down() when tearing down the program in an arbitrary manner.
If browser GUI is disabled, the function returns %NULL.
The browser widget, possibly %NULL.
#GwyDialog is a #GtkDialog suitable for most data processing modules (including volume data, graph, etc.).
It offers simplified construction functions gwy_dialog_new(), gwy_dialog_add_stock_buttons() and
gwy_dialog_add_content().
The main feature is integration with #GwyParamTable. Parameter tables are registered using
gwy_dialog_add_param_table(). The dialog can then perform some simple tasks itself. For instance with
gwy_dialog_set_instant_updates_param() the sensitivity of an Update button is handled automatically together with
a part of the preview redrawing logic if you set up a preview function with gwy_dialog_set_preview_func().
#GwyDialog also handles the state change logic typical for Gwyddion data processing modules. The function
gwy_dialog_run() only exits when the dialog finishes with some kind of conclusion what to do next, see
#GwyDialogOutcome. Other response can either be handled completely automatically, for instance %GWY_RESPONSE_RESET
and %GWY_RESPONSE_UPDATE, or in cooperation with the module which connects to the GtkDialog::response signal.
If you need to prepare the parameter tables before the automatic reset, connect to the signal normally and it will
be run before the #GwyDialog handler. If you need to touch up the tables afterwards connect your handler with
%G_CONNECT_AFTER.
Forces graph curves in entire file to have ascending abscissae.
The function scans the entire file. You can use it in a file import module as a big hammer. However, consider
using individual gwy_graph_curve_model_enforce_order().
The number of modified graph curves.
A file data container.
#GwyFile is a subclass of #GwyDict, assuming a specific organisation of items inside to represent scanning
probe microscopy data, more specifically a Gwyddion GWY file.
The class implements #GwySerializable copy() and assign() methods. A convenience wrapper gwy_file_copy() is
provided only for the first one. Assigning files by value is less efficient than simply destroying the existing
#GwyFile and creating a new data file. It also generates lots of signals about changed items. So, generally, do not
do it.
High-level functions gwy_app_file_load() and gwy_app_file_write() wrap low-level file handling functions from <link
linkend="libgwymodule-gwymodule-file">gwymodule-file</link> and handle registration of loaded containers in data
browser, showing windows, remembering file types, or the differenced between save and export.
They are complemented by application-level functions gwy_app_file_open(), gwy_app_file_save(), and
gwy_app_file_save_as() that perform the corresponding operations of File menu. These are probably not of general
interest.
Beside that, functions to maintain application-level idea of current directory are provided:
gwy_app_get_current_directory(), gwy_app_set_current_directory(). They should be used in place of system chdir()
which has various unwanted side-effect, like change of the directory where core is dumped on segfault.
Gets the error domain for file structure.
See and use %GWY_FILE_ERROR.
The error domain.
Constructs a data file quark key from its broken down representation.
Although the function does not accept complete nonsense, it can form keys corresponding to data type and piece
combinations which do not actually exists. In other words, if @parsed was obtained using gwy_parse_file_key(), this
function can be used to construct the string (quark) key back. However, a key constructed by this function is not
guaranteed to be parseable using gwy_parse_file_key().
See gwy_form_string_file_key() for a string version.
The corresponding key as a quark.
Broken down key in a data file.
Constructs a data file string key from its broken down representation.
See gwy_form_file_key() for a quark version and remarks.
The corresponding key as a static string.
Broken down key in a data file.
Reads a boolean value stored as a signle byte from a binary data buffer, moving the buffer pointer to point just
after the value.
The #gboolean value read from the buffer.
Pointer to a pointer to boolean (stored as a signle byte) in a memory buffer.
Reads a double-precision IEEE float value from a big-endian binary data buffer, moving the buffer pointer to point
just after the value.
The #gdouble value read from the buffer.
Pointer to a pointer to a big-endian double-precision IEEE float in a memory buffer.
Reads a double-precision IEEE float value from a little-endian binary data buffer, moving the buffer pointer to
point just after the value.
The #gdouble value read from the buffer.
Pointer to a pointer to a little-endian double-precision IEEE float in a memory buffer.
Reads a single-precision IEEE float value from a big-endian binary data buffer, moving the buffer pointer to point
just after the value.
The #gfloat value read from the buffer.
Pointer to a pointer to a big-endian single-precision IEEE float in a memory buffer.
Reads a single-precision IEEE float value from a little-endian binary data buffer, moving the buffer pointer to
point just after the value.
The #gfloat value read from the buffer.
Pointer to a pointer to a little-endian single-precision IEEE float in a memory buffer.
Reads a signed 16bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint16 value read from the buffer.
Pointer to a pointer to a big-endian signed 16bit integer in a memory buffer.
Reads a signed 16bit integer value from a little-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint16 value read from the buffer.
Pointer to a pointer to a little-endian signed 16bit integer in a memory buffer.
Reads a signed 32bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint32 value read from the buffer.
Pointer to a pointer to a big-endian signed 32bit integer in a memory buffer.
Reads a signed 32bit integer value from a little-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint32 value read from the buffer.
Pointer to a pointer to a little-endian signed 32bit integer in a memory buffer.
Reads a signed 64bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint64 value read from the buffer.
Pointer to a pointer to a big-endian signed 64bit integer in a memory buffer.
Reads a signed 64bit integer value from a little-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #gint64 value read from the buffer.
Pointer to a pointer to a little-endian signed 64bit integer in a memory buffer.
Reads an unsigned 16bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #guint16 value read from the buffer.
Pointer to a pointer to a big-endian unsigned 16bit integer in a memory buffer.
Reads an unsigned 16bit integer value from a little-endian binary data buffer, moving the buffer pointer to point
just after the value.
The #guint16 value read from the buffer.
Pointer to a pointer to a little-endian unsigned 16bit integer in a memory buffer.
Reads an unsigned 32bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #guint32 value read from the buffer.
Pointer to a pointer to a big-endian unsigned 32bit integer in a memory buffer.
Reads an unsigned 32bit integer value from a little-endian binary data buffer, moving the buffer pointer to point
just after the value.
The #guint32 value read from the buffer.
Pointer to a pointer to a little-endian unsigned 32bit integer in a memory buffer.
Reads an unsigned 64bit integer value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The #guint64 value read from the buffer.
Pointer to a pointer to a big-endian unsigned 64bit integer in a memory buffer.
Reads an unsigned 64bit integer value from a little-endian binary data buffer, moving the buffer pointer to point
just after the value.
The #guint64 value read from the buffer.
Pointer to a pointer to a little-endian unsigned 64bit integer in a memory buffer.
Reads a six-byte Pascale Real value from a big-endian binary data buffer, moving the buffer pointer to point just
after the value.
The floating point value read from the buffer as a #gdouble.
Pointer to a pointer to a big-endian six-byte Pascal Real in a memory buffer.
Reads a six-byte Pascale Real value from a little-endian binary data buffer, moving the buffer pointer to point
just after the value.
The floating point value read from the buffer as a #gdouble.
Pointer to a pointer to a little-endian six-byte Pascal Real in a memory buffer.
#GwyGradientEditor is the application color gradient editor. The interface is currently extremely simple:
gwy_app_gradient_editor() invokes the editor (or brings it forward) and then it's user-controlled.
Obtains the name of currently running graph function.
If no graph function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically
possible), the innermost function name is returned.
The name of currently running graph function or %NULL.
Checks whether a graph function exists.
%TRUE if function @name exists, %FALSE otherwise.
Graph function name.
Calls a function for each graph function.
Function to run for each graph function, passed by name.
Data to pass to @function.
Gets icon name of a graph function.
The icon name. The returned string is owned by the module.
Graph function name.
Gets menu path of a graph function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Graph".
The menu path. The returned string is owned by the module.
Graph function name.
Gets menu sensititivy mask for a graph function.
The menu item sensitivity mask (a combination of #GwyMenuSensFlags flags).
Graph function name.
Gets tooltip for a graph function.
The tooltip. The returned string is owned by the module.
Graph function name.
Registers a graph function.
Note: the string arguments are not copied as modules are not expected to
vanish. If they are constructed (non-constant) strings, do not free them.
Should modules ever become unloadable they will get chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and
if a module registers only one function, module and function names
should be the same.
The function itself.
Menu path under Graph menu. The menu path should be
marked translatabe, but passed untranslated (to allow merging
of translated and untranslated submenus).
Stock icon id for toolbar.
Sensitivity mask (a combination of #GwyMenuSensFlags flags).
Usually it is equal to #GWY_MENU_FLAG_GRAPH, but it's
possible to set other requirements.
Tooltip for this function.
Runs a graph function identified by @name.
Graph function name.
Graph (a #GwyGraph).
Gwyddion classes has to be initialised before they can be safely deserialised. The function gwy_type_init()
performs this initialisation alongside with loading of settings, resources and modules.
Help functions add a Help button to dialogs and install a key press handler responding to Help and F1 keys to all
windows. For built-in modules, invoking the help opens a web browser (using some generic and system-specific
means) pointing to the corresponding location in the user guide. Third-party modules can use
gwy_help_add_to_window_uri() to open a web browser at an arbitrary URI.
Adds help to a curve map data processing function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a curve map data processing function.
Flags allowing to modify the help setup.
Adds help to a file function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a file function.
Flags allowing to modify the help setup.
Adds help to a graph function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a graph function.
Flags allowing to modify the help setup.
Adds help to a data processing function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a data processing function.
Flags allowing to modify the help setup.
Adds help to a synth function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a synth function.
Flags allowing to modify the help setup.
Adds help to a tool dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a tool function.
The tool.
Flags allowing to modify the help setup.
Adds help to a volume data processing function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a volume data processing function.
Flags allowing to modify the help setup.
Adds help to a window pointing to the user guide.
If the window is a #GtkDialog a help button will be added by default (this can be modified with @flags). Normal
windows do not get help buttons. No help may be added if help is not available.
This is a relatively low-level function and should not be necessary in modules. An exception may be modules with
multiple user interfaces described in different parts of the guide – but this should be rare.
It is a suitable functions for adding help to base application windows, such as channel or volume windows.
A window.
Base file name in the user guide without any path or extensions, for instance "statistical-analysis".
Fragment identifier (without "#"), or possibly %NULL.
Flags allowing to modify the help setup.
Adds help to a window pointing to an arbitrary URI.
If the window is a #GtkDialog a help button will be added by default (this can be modified with @flags). Normal
windows do not get help buttons. No help may be added if help is not available.
This function should not be necessary anywhere within Gwyddion itself. Use the functions pointing to the user guide
instead as they can handle language versions or changing the user guide base location.
It may be useful for third-party modules if they wish to add a help facility behaving similarly to built-in
modules.
A window.
Full URI pointing to the help for @window.
Flags allowing to modify the help setup.
Adds help to a XYZ data processing function dialog.
Note the help button will not be added if no help URI is found for the currently running function or help is not
available.
Main dialog for a XYZ data processing function.
Flags allowing to modify the help setup.
Check whether help is available.
This is a weak check that finds if we have any help-showing backend that might work at all, have the user guide
module map, and if the user guide locations is a local directory it checks whether it exists. If it returns %TRUE
it does not guarantee help will work. If it returns %FALSE, however, it means help will not work.
%TRUE if help seems available, %FALSE if it is not.
Immediately shows a specific help location.
This function should be rarely needed. It may fail if help is not available.
Base file name in the user guide without any path or extensions, for instance "statistical-analysis".
Fragment identifier (without "#"), or possibly %NULL.
Obtains the name of currently running data processing function.
If no image processing function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name
is returned.
The name of currently running data processing function or %NULL.
Checks whether a data processing function exists.
%TRUE if function @name exists, %FALSE otherwise.
Data processing function name.
Calls a function for each process function.
Function to run for each image processing function, passed by name.
Data to pass to @function.
Gets icon name of a data processing function.
The icon name. The returned string is owned by the module.
Data processing function name.
Returns the menu path of a data processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Data Process".
The menu path. The returned string is owned by the module.
Data processing function name.
Returns run modes supported by a data processing function.
The run mode bit mask.
Data processing function name.
Gets menu sensititivy mask for a data processing function.
The menu item sensitivity mask (a combination of #GwyMenuSensFlags flags).
Data processing function name.
Gets tooltip for a data processing function.
The tooltip. The returned string is owned by the module.
Data processing function name.
Registers a data processing function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
The function itself.
Menu path under Data Process menu. The menu path should be marked translatabe, but passed untranslated
(to allow merging of translated and untranslated submenus).
Stock icon id for toolbar.
Supported run modes. Data processing functions can have two run modes: %GWY_RUN_IMMEDIATE (no questions
asked) and %GWY_RUN_INTERACTIVE (a modal dialog with parameters).
Sensitivity mask (a combination of #GwyMenuSensFlags flags). Usually it contains #GWY_MENU_FLAG_IMAGE,
possibly other requirements.
Tooltip for this function.
Runs a data processing function identified by @name.
Data processing function name.
Data (a #GwyFile).
How the function should be run.
Adds a channel title based on data field units.
The guess is very simple, but probably better than `Unknown channel' in most cases. If there already is a title it
is left intact, making use of this function as a fall-back easier.
The file may be still in construction.
%TRUE if the title was set (either by this function or before).
A data container.
Data channel id.
The data processing operation log is a linear sequence of operations applied to a image, volume, XYZ or curve map
data. The log is informative and not meant to capture all information necessary to reply the operations, even
though it can be sufficient for this purpose in simple cases.
The log is a linear sequence. This is only an approximation of the actual flow of information in the data
processing, which corresponds to an acyclic directed graph (not necessarily connected as data, masks and
presentations can have distinct sources). The following rules thus apply to make it meaningful and useful.
Each logging function takes two data identifiers: source and target. The source corresponds to the operation input,
the target corresponds to the data whose log is being updated. The target may have already a log only if it is the
same as the source (which corresponds to simple data modification such as levelling or grain marking). In all
other cases the target must not have a log yet – they represent the creation of new data either from scratch or
based on existing data (in the latter case the log of the existing data is replicated to the new one).
Complex multi-data operations are approximated by one of the simple operations. For instance, data arithmetic can
be treated as the construction of a new channel from scratch as it is unclear which input data the output channel
is actually based on, if any at all. Modifications that use data from other channels, such as masking using
another data or tip convolution, should be represented as simple modifications of the primary channel.
Logging functions such as gwy_log_add() take settings values corresponding to the function name and
store them in the log entry. If the settings are stored under a different name, use the "settings-name" logging
option to set the correct name.
Adds an entry to the log of the current data processing operation.
This simplified variant of gwy_log_add_full() takes the currently running data processing function name for the
corresponding data kind and constructs the qualified function name from that. The source and target data kinds
need to be the same and correspond to the function type. If the function creates data of a different kind than
the ‘natural’ kind for this type of function, you need gwy_log_add_full().
Use gwy_log_add_import() to log data import from third party files and gwy_log_add_synth() to log data synthesis.
A file data container.
Type of the data object.
Identifier of the previous (source) data object in the file. Pass -1 for a no-source (or unclear
source) operation.
Identifier of the new (target) data object in the file.
Adds an entry to the log of data processing operations for a channel.
See the introduction for a description of valid @previd and @newid.
It is possible to pass %NULL as @function. In this case the log is just copied from source to target without
adding any entries. This can be useful to prevent duplicate log entries in modules that modify a data field and
then can also create secondary outputs. Note you still need to pass a second %NULL argument as the argument list
terminator.
A data file container.
Type of the data object modified or created.
Identifier of the previous (source) data object of the same type in the container. Pass -1 for a no-source
(or unclear source) operation or operations involving disparate data objects.
Identifier of the new (target) data object in the container.
Quailified name of the function applied as shown by the module browser. For instance
"image::facet-level" or "tool::GwyToolCrop".
Logging options as a %NULL-terminated list of pairs name, value.
Logs the import of a data object from third-party file.
This is a convenience wrapper for gwy_log_add_full(). The source id will be set to -1. The file name will be
added to function arguments.
A data file container.
Type of the data object.
Numerical id of a data in file.
File type, i.e. the name of the function importing the data (without any "file::" prefix).
It is possible to pass %NULL to fill the name of the currently running file type function automatically.
Name of the imported file. If it is not valid UTF-8, it will be converted to UTF-8 using
g_filename_to_utf8(). Failing even that, non-ASCII characters will be escaped.
Adds an entry to the log of the current synthetic data operation.
This simplified variant of gwy_log_add_full() takes the currently running synthetic data function name for the
corresponding data kind and constructs the qualified function name from that.
A file data container.
Type of the data object.
Identifier of the initialisation data object in the file. Pass -1 if the data were generated from scatch,
not by modification of existing data.
Identifier of the new data object in the file.
Reports whether logging of data processing operations is globally enabled.
%TRUE if logging is enabled, %FALSE if it is disabled.
Globally enables or disables logging of data processing operations.
By default, logging is enabled. Non-GUI applications that run module functions may wish to disable it. Of course,
the log will presist only if the data container is saved into a GWY file.
If logging is disabled logging functions such as gwy_log_add() become no-op. It is possible to run the
log viewer with gwy_log_browser() to see log entries created when logging was enabled.
%TRUE to enable logging, %FALSE to disable it.
Creates a mask corresponding to not-a-number and infinite values in a data field.
Abnormal values should always be removed from data upon import. See the discussion in gwy_isnan().
The invalid values can be automatically removed using the same method as gwy_remove_bad_image_data().
A newly created number field with 1 in pixels corresponding to a NaN or infinity in @field. If no such
pixels are present, %NULL is returned.
A data field possibly containing NaNs and infinities.
Automatically remove the invalid values.
Menu and toolbox item sensitivity is updated by main application whenever its state changes. Possible states that
may affect widget sesitivity are defined in #GwyMenuSensFlags.
Curve map data processing modules implement function processing curve map data represented with #GwyLawn. They
reigster functions that get a #GwyFile with data and either modify it or create a new data from it. In this
regard, they are quite similar to regular (two-dimensional) data processing functions but they live in separate
menus, toolbars, etc.
File modules implement file loading, saving and file type detection functions. Not all fuctions has to be
implemented, a file module can be import-only or export-only. If it does not implement file type detection, files
of this type can be read/written only on user's explicite request.
For file module writers, the only useful function here is the registration function gwy_file_func_register() and
the signatures of particular file operations: #GwyFileDetectFunc, #GwyFileLoadFunc, and #GwyFileSaveFunc.
Graph modules implement operations on graphs, e.g., curve fitting.
Data processing modules implement the actual ability to do something useful with data. They reigster functions that
get a #GwyFile with data and either modify it or create a new data from it.
Synthetic data modules implement functions creating new data from scratch. They often query the current data
(generally image data) and can take dimensions and units from or initialise the generator using them. They can also
modify the current data. However, they can always be run without any other data loaded.
Tool modules implement interactive tools that work directly on data
windows.
Functions gwy_check_nonsquare_image() and gwy_image_title_fall_back() perform common tasks improving
the imported of channels from foreign data files. Typically one calls them on all imported channel ids after
storing the data fields the the container, if they are useful for a given file type.
The group of functions gwy_get_gint16_le(), gwy_get_gint16_be(), etc. is intended to portably read packed binary
data structures that are commonly found in SPM files. They all work identically: the binary data value is read
from the buffer, converted if necessary, and the provided buffer pointer is moved to point after the value to
faciliate sequential reading.
As no buffer size is passed, obviously no buffer size checking is performed. The caller has to ensure the buffer is
large enough -- it is expected the caller checks the total buffer size before starting to parse it.
For example to portably read the following packed struct stored in big-endian byte order:
<informalexample><programlisting>
struct {
guint16 xres;
guint16 yres;
gfloat measure;
} header;
</programlisting></informalexample>
one can do (after checking the buffer size):
<informalexample><programlisting>
const guchar *p = buffer;
header.xres = gwy_get_guint16_be(&p);
header.yres = gwy_get_guint16_be(&p);
header.measure = gwy_get_gfloat_be(&p);
</programlisting></informalexample>
and @p will point after @measure in @buffer after this snippet is finished.
The data types used in @header do not matter (provided they are large enough to hold the values), the exact types
are determined by the functions used. Therefore the reading would work identically if @header was defined using
common types:
<informalexample><programlisting>
struct {
gint xres;
gint yres;
gdouble measure;
} header;
</programlisting></informalexample>
Volume data processing modules implement function processing volume data represented with #GwyBrick. They reigster
functions that get a #GwyFile with data and either modify it or create a new data from it. In this regard, they are
quite similar to regular (two-dimensional) data processing functions but they live in separate menus, toolbars,
etc.
XYZ scattered data processing modules implement function processing scattered data represented with #GwyScatter.
They reigster functions that get a #GwyFile with data and either modify it or create a new data from it. In this
regard, they are quite similar to regular (two-dimensional) data processing functions but they live in separate
menus, toolbars, etc.
Shows a simple module browser.
Opens a module data file in the user directory.
The function wraps gwy_fopen(), forming the full file name automatically and handling subdirectory creation.
The error can be from %G_FILE_ERROR domain.
A file handle if the file was opened as requested, %NULL on failure.
Module name (determines the subdirectory).
Name of the file to save. In GLib encoding, but it really should be just ASCII.
File open mode, as in fopen().
Load module data file from the user directory.
The function wraps g_file_get_contents(), forming the full file name automatically.
The error can be from %G_FILE_ERROR domain. Usually, however, you only need the return value and consider the file
simply not existing yet when the function fails.
%TRUE if the file was loaded.
Module name (determines the subdirectory).
Name of the file to load. In GLib encoding, but it really should be just ASCII.
Location to store the allocated file contents. Use g_free() to free it. It is set to %NULL when the
file cannot be loaded.
Location to the length of the contents in bytes, or %NULL.
Saves module data file to the user directory.
The function wraps g_file_set_contents(), forming the full file name automatically and handling subdirectory
creation.
The error can be from %G_FILE_ERROR domain.
%TRUE if the file was saved.
Module name (determines the subdirectory).
Name of the file to save. In GLib encoding, but it really should be just ASCII.
File contents to write.
Length of @contents, or -1 if it is a NUL-terminated string.
Prevents the registration of a module of given name.
This function blocks future module registration using gwy_module_register_modules(). Already loaded modules are
unaffected. The low-level module loading function gwy_module_register_module() always attempts to load the module,
even if blocked.
A module name.
Unblocks the registration of a module of given name.
This function influences future module registration. Already loaded modules are unaffected.
A module name.
Returns error domain for module loading.
See and use %GWY_MODULE_ERROR.
The error domain.
Runs @function for each module that failed to register.
It passes the failure info (#GwyModuleFailureInfo) as the data argument. It should be modified.
A #GFunc run for each module registration failure.
User data.
Returns error domain for file module functions.
See and use %GWY_MODULE_FILE_ERROR.
The error domain.
Runs @function on each registered module.
It passes module name as the key and pointer to module info (#GwyModuleInfo) as the value. Neither should be
modified.
A #GHFunc run for each module.
User data.
Returns full file name of a module.
Module file name as a string that must be modified or freed.
A module name.
Returns list of names of functions a module implements.
List of module function names, as a #GSList that is owned by module loader and must not be modified or
freed.
A module name.
Reports whether the registration of a module is enabled.
If the registration of module @name was prevented using gwy_module_disable_registration() and not subsequently
re-enabled using gwy_module_enabled_registration() this function returns %FALSE.
The reported values only represents the current state of blocking. A module @name could have been loaded when it
was not blocked.
%TRUE if module @name can be registered; %FALSE when it is blocked from registration.
A module name.
Returns information about one module.
The module info, of %NULL if not found. It must be considered constant and never modified or freed.
A module name.
Loads a single module.
This function also works with bundles. The returned module info is for the bundle and thus not of much use.
Module info on success, %NULL on failure.
Module file name to load, including full path and extension.
Registers all modules in a directory, with one level of recursion.
It can be called several times on different directories. Registering the same module multiple times is an error.
The recursion does not follow symlinks to directories. If you registred modules in non-standard directories, it is
not recommended to deviate from the standard one level deep subdirectory scheme with modules organised by type.
An error summary is reported. For specific registration errors, register modules individually with
gwy_module_register_module().
If you need to prevent specific modules from loading use gwy_module_disable_registration() beforehand.
A positive number (the number of successfully registered modules) modules were found and all were
registered successfully. A negative number if there were any errors. Zero if @path is valid but no modules
were found there.
A module directory name.
Location to store the errors occuring, %NULL to ignore.
#GwyParamDef represents a set of module parameter definitions. Once constructed, it is an immutable object which
modules generally keep around (as a static variable) and use it to fetch parameters from settings as #GwyParams.
Parameters are idenfitied by integers which must be unique within one set of definitions. The integers are not
public interface. They only exist within the module and can change between module versions. In fact, you can
assign them run-time (and differently each time Gwyddion is run) if you need. However, the usual way to define the
parameters is using an enum:
|[
enum {
PARAM_DEGREE,
PARAM_MASKING,
PARAM_UPDATE,
};
]|
and the module then refers to the parameters using the enum values. The corresponding parameter definition code
could be as follows. Notice specialised parameter types exists for some common settings, such as instant updates:
|[
static GwyParamDef*
define_module_params()
{
static GwyParamDef *paramdef = NULL;
if (paramdef)
return paramdef;
paramdef = gwy_param_def_new();
gwy_param_def_set_function_name(paramdef, gwy_image_func_current());
gwy_param_def_add_int(paramdef, PARAM_DEGREE, "degree", _("_Degree"), 0, 12, 3);
gwy_param_def_add_gwyenum(paramdef, PARAM_MASKING, "masking", NULL, GWY_TYPE_MASKING_TYPE, GWY_MASK_IGNORE);
gwy_param_def_add_instant_updates(paramdef, PARAM_UPDATE, "update", NULL, FALSE);
return paramdef;
}
]|
Functions such as g_once() and g_once_init_enter() can also be used to ensure a single initialisation, although it
is probably overkill here.
In all the parameter definition constructors strings @name and @desc are not copied. They must exist for the
entire lifetime of the @pardef objects. Usually they are static strings. In uncommon scenarios the caller must
ensure their existence. Alternatively, g_intern_string() can be used to make semantically static versions of the
strings.
#GwyParamResource represents a resource holding a #GwyParams set of module parameter values. It can be useful to
implement parameter presets, stored on disk.
It is an abstract base class. Modules have to create a specific class for their presets using
gwy_param_def_make_resource_type() which constructs, registers and returns a new #Gtype for the specific resource
class.
#GwyParamTable manages the user interface for module parameters. It is not a #GtkWidget itself, but it can create
widgets. Most of what is needed for the parameter controls is already contained in #GwyParamDef. Therefore, the
corresponding user interface can be as simple as:
|[
GwyParamTable *table = gwy_param_table_new(params);
gwy_param_table_append_header(table, -1, _("Detection"));
gwy_param_table_append_combo(table, PARAM_METHOD);
gwy_param_table_append_slider(table, PARAM_DEGREE);
gwy_param_table_append_checkbox(table, PARAM_ADAPTIVE);
gwy_param_table_append_header(table, -1, _("Output"));
gwy_param_table_append_checkbox(table, PARAM_EXTRACT_BACKGROUND);
gwy_param_table_append_checkbox(table, PARAM_CREATE_MASK);
gwy_dialog_add_content(dialog, gwy_param_table_widget(table), FALSE, FALSE, 0);
]|
After creating the table, you append the various elements in the order in which they should appear in the user
interface. Function gwy_param_table_widget() then creates the widget for the entire parameter table, which can be
packed to the dialog. Note that the created widget type is unspecified. It may be #GtkTable, #GtkGrid or
something else.
#GwyParamTable updates parameter values in #GwyParams when the user changes something. Therefore, when there is no
preview and no relations between parameters to manage, no further setup is necessary. If you need to respond to
parameter changes, connect to the #GwyParamTable::param-changed signal.
If you change parameters in response to the user changing other parameters, always use the #GwyParamTable functions
such as gwy_param_table_set_boolean() or gwy_param_table_set_enum(). This ensures the controls are updated
accordingly. Functions such as gwy_params_set_boolean() or gwy_params_set_enum() would only change the value but
not the user interface.
When you add #GwyParamTable's widget to a #GwyDialog, it consumes the table's floating reference with
g_object_ref_sink(), provided it has any. Usually, this is convenient because you only do this once and it causes
the table to be destroyed when the dialog is destroyed. If you want to keep the table around and/or create its
widget multiple times, consume the floating reference yourself with g_object_ref_sink() and release your reference
when you are completely done with the table.
Connects an active page parameter to a notebook.
This function should be called after the notebook was fully constructed. The active notebook page is set according
to the parameter (clamping values that refer to non-existent pages). Future page switches will update the
parameter value, allowing to simply save it to settings when the module dialog is finished.
A parameter value set.
Parameter identifier.
A notebook widget.
#GwyParams represents a set of module parameter values. Usually it is created by loading the values from settings
using gwy_params_new_from_settings(). It can also be created as empty – it is necessary to tie it to a definition
set using gwy_params_set_def() then. In any case, the tie to the definitions is permanent. If you need parameter
value set for different definitions create a new object.
#GwyParams is a “dumb” object, replacing a plain C struct holding the parameter values. Beside making sure
parameter values stay in defined ranges, it does not do much. In particular, it does not emit any singals.
Each parameter type has its own getters and setters, such as gwy_params_get_boolean() and gwy_params_set_boolean().
For a few parameter types there may also be dedicated helper functions such as gwy_params_get_masking() which
encapsulate common logic when dealing with these parameter.
The setters and reset functions should be seldom needed. When running module GUI, parameter values should be set
by #GwyParamTable functions to ensure the updates cascade as expected. #GwyParamTable also has a reset function.
Setters do not cause any GUI response and, hence, has no place in most modules as they would lead to an
inconsistent state. Sometimes, however, setting parameter values directly can be useful in non-GUI paths which
perform extra validation or ensure complex invariants.
Parses a data file container key.
The parsing usually identifies the data kind, id and the specific setting or property for the data (if applicable).
If a specific combination is impossible, for instance mask colour with graphs, the function returns %FALSE even
though the key may seem syntactically valid.
Upon successful parsing all fields are always set (possibly to values meaning ‘none’). There are some special
cases. The piece %GWY_FILE_PIECE_FILENAME is file-global and has neither data kind nor id.
When @parsed.suffix is not set to %NULL will generally point inside @strkey. Since #GwyDict keys are backed by
#GQuark, the corresponding string key is a constant string which always exists. Hence, the pointer will be always
valid. However, if you use gwy_parse_file_key() with an arbitrary string, be aware that modifying or freeing it
invalidates the suffix.
See also gwy_form_file_key() for constructing the key back.
%TRUE if the key was sucessfully parsed; %FALSE if it was not.
String data file container key.
Location to store the parsed information. The contents of @parsed is undefined if the function return
%FALSE.
Renders a preview of a XYZ data scatter to a data field.
A scattered data.
Index of value in @scatter.
A data field to fill with @scatter preview.
Maximum width of the preview, it must be at least 2.
Maximum height of the preview, it must be at least 2.
Flags modifying the behaviour.
Every time a function is used, record it with gwy_recent_funcs_record_use(). You can then use
gwy_recent_funcs_get_head() to obtain a list of the most and/or most recently used functions. The usage weight
slowly fades away over time. Frequently used functions will always come on top. For less used functions, recency
has a larger influence.
Obtains a sorted list of most and/or most recently used functions.
The functions are sorted by usage, in descending order. The output array may not be fully filled with function
names if there are not enough functions in the usage history. Check the return value. The empty elements are set to
NULL.
Normally, only a handful of most recent functions is needed, and the usage recording is designed for that. If you
request a long list, recoding future usage can become somewhat inefficient.
The number of items actually filled in @names.
Function kind.
Array of size at least @n where to put the names of most used functions.
The size of @names.
Loads information about recent function usage from a file.
Any existing information is completely replaced. However, this function should normally be only called once during
program initialisation.
%TRUE if the operation succeeded.
File name to load recently used functions from.
Records one use of a function.
For meaningful statistics, programmatic execution should not be recorded, only user-invoked functions.
Function kind.
Name of function.
Saves information about recent function usage to a file.
%TRUE if the operation succeeded.
File name to save recently used functions to.
Replaces bad data points with some neutral values.
Since Gwyddion has no concept of bad data points, they are usually marked with a mask and replaced with some
neutral values upon import, leaving the user to decide how to proceed further. This helper function performs such
replacement.
When the mask is empty and the function returns %NULL, it also calls g_object_unref() on the mask. Usually, it
means you use the function like
|[
if ((mask = gwy_remove_bad_image_data(field, mask))) {
// Set the the mask on an image, for example.
}
else {
// Just forget mask.
}
]|
For convenient chaining, @mask can also already be %NULL, meaning there are no bad data. The function then simply
returns %NULL too.
Either @mask itself if any data were marked as bad, or %NULL if @mask was empty.
A data field. The values of bad data points are ignored and might be even left uninitialized.
A number field containing positive values in place of bad data points, non-positive in place of good points.
Creates a curve map thumbnail.
A newly created pixbuf with curve map data thumbnail. It keeps the aspect ratio of the lawn preview while
not exceeding @max_width and @max_height.
A file data container.
Curve map data id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Creates a graph thumbnail.
Note this function needs the GUI running (unlike the other thumbnail functions). It cannot be used in a console
program.
A newly created pixbuf with graph thumbnail. Since graphs do not have natural width and height, its size
will normally be exactly @max_width and @max_height.
A file data container.
Graph model data id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Creates a channel thumbnail.
A newly created pixbuf with channel thumbnail. It keeps the aspect ratio of the data field while not
exceeding @max_width and @max_height.
A data container.
Data channel id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Creates a spectra thumbnail.
Note this function needs the GUI running (unlike the other thumbnail functions). It cannot be used in a console
program.
A newly created pixbuf with spectra thumbnail. Since graphs do not have natural width and height, its size
will normally be exactly @max_width and @max_height.
A file data container.
Spectra data id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Creates a volume thumbnail.
A newly created pixbuf with volume data thumbnail. It keeps the aspect ratio of the brick preview while
not exceeding @max_width and @max_height.
A file data container.
Volume data id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Creates an XYZ data thumbnail.
A newly created pixbuf with XYZ data thumbnail. It keeps the aspect ratio of the brick preview while not
exceeding @max_width and @max_height.
A file data container.
XYZ scattered data id.
Maximum width of the created pixbuf, it must be at least 2.
Maximum height of the created pixbuf, it must be at least 2.
Checks if data field has equal lateral and value units, possibly showing error message.
If the data field does not have the same lateral and value units a simple error message dialog is shown for @data
and @id. This is only done if other GUI functions (like progress bars for waiting) are enabled.
%TRUE if the units are the same, %FALSE otherwise.
The data field to check.
Data container with the data field.
The id of @field in @data.
Error message prefix, usually module function name.
Checks if data field has the same horizontal and vertical pixel dimensions, possibly showing error message.
If the data field is not square a simple error message dialog is shown for @data and @id. This is only done if
other GUI functions (like progress bars for waiting) are enabled.
%TRUE if the data field is square, %FALSE otherwise.
The data field to check.
Data container with the data field.
The id of @field in @data.
Error message prefix, usually module function name.
The base class contains all the methods that handle the resource list, set defaults, or sync resource list with
disk. Particular editors (subclasses) have to override (in fact, to fill, because #GwyResourceEditor does not
define them) the methods and class data in their class init methods. Then they generally only need to care about
widgets inside their edit windows.
Fills the name of a data object in a set of reported scalar values.
This is a helper function for #GwyResults to fill names of images or graphs. If the data object has no title, the
associated the value @id is set to N.A.
Set of reported scalar values.
String value identifier.
Data container corresponding to a file.
Type of the data object.
Numerical id of the object.
Fills data file name in a set of reported scalar values.
This is a helper function for #GwyResults. If @file has no file name
associated the value @id is set to N.A.
Set of reported scalar values.
Value identifier.
Data container corresponding to a file.
Fills graph curve description in a set of reported scalar values.
This is a helper function for #GwyResults.
Set of reported scalar values.
String value identifier.
A graph curve model.
Fills lawn curve description in a set of reported scalar values.
This is a helper function for #GwyResults.
Set of reported scalar values.
String value identifier.
Curve map data object.
Curve number in @lawn.
Runs a modal dialog transient for another another dialog, trying to work around bugs.
If both dialogs are modal, bad things can happen in some graphical environments, such as the second being hidden
under the first one and inaccessible. This function attempts to work around this by temporarily setting the parent
dialog (the one @dialog is transient for) non-modal.
If the dialog is not transient for anything or its parent is not modal it is just run normally.
The function returns only after the dialog has been destroyed. Do not destroy it yourself.
The response of @dialog.
A data dialog to be run as modal.
Saves a report or other auxiliary data to a user specified file.
This is a simple gwy_save_auxiliary_with_callback() wrapper, see its description for details.
%TRUE if the data was saved, %FALSE if it was not saved for any reason.
File chooser dialog title.
Parent window for the file chooser dialog (may be %NULL).
The data to save.
The length of @data in bytes. If @data is nul-terminated text, you can pass -1 to determine the length
automatically.
%TRUE to write the data as binary; @data_len must be non-negative in such case.
Saves a report or other auxiliary data to a user specified file.
%TRUE if the data was saved, %FALSE if it was not saved for any reason (I/O error, cancellation, overwrite
cancellation, etc.).
File chooser dialog title.
Parent window for the file chooser dialog (may be %NULL).
Function to create the data (it will not be called if the user cancels the saving).
Function to destroy the data (if will be called iff @create will be called), it may be %NULL.
%TRUE to write the data as binary. Data creation function @create must set non-negative data length in
such case.
User data passed to @create and @destroy.
Selects an item in filtered tree view showing an inventory.
Usually the tree view would show a #GtkTreeModelFilter model created by
gwy_create_inventory_model_without_default(). However, this function works also for other filter models around
a #GwyInventoryStore.
A filtered tree view showing an inventory.
Item name to select.
Sets up data view zoom to not exceed specified size.
Before calling this function, data keys have be set, data fields and layers have to be present and physically
square mode set in the container. Sizing of both pixel-wise square and physically square displays is performed
correctly.
A data view used for module preview.
Maximum allowed @data_view size (width and height).
Sets a false colour gradient suitably for fit residuals.
If the provided @dispmin and @dispmax are set to the mapping minimum and maximum, the resulting gradient will have
neutral light colour for zero, a red gradient for postive values and a blue gradient for negative values. An effort
is made to do something reasonable even when all values are positive or negative.
Usually @fullmin and @fullmax are simply the minimun and maximum, whereas @dispmin and @dispmax come from
a function like gwy_field_autorange(). Although the full range might also be used.
A false colour gradient to modify.
Minimum residual value (presumably negative).
Maximum residual value (presumably positive).
Natural mapping minimum. It will be set to the fixed mapping minimum to actually use.
Natural mapping maximum. It will be set to the fixed mapping maximum to actually use.
All application and module settings are stored in a one big #GwyDict which can be obtained by
gwy_app_settings_get(). Then you can use #GwyDict functions to get and save settings.
The rest of the setting manipulating functions is normally useful only in the main application.
Sets up an image data view to match an image in a file data container.
The function sets values to match to the file, but does not unset values to match the file. Meaning, it will not
destroy your previous setup. On the other hand, if you use it as a data switching helper, you will probably have to
unset any items like gradients first. Otherwise they can keep previous values when they should be unset.
Use a bit mask formed from predefined constants such as %GWY_FILE_ITEM_REAL_SQUARE or unsigned 1 shifted left by
%GWY_FILE_PIECE_REAL_SQUARE for the flags. Note that the 1 may need to be 64bit if you are doing the shifting
yourself.
For covnenience in modules which may or may not be run on existing data, @data can be null and the function is
no-op in such case.
Preview data view, usually created by gwy_create_preview().
File with the data to preview.
Data kind (either image or with image preview).
The id of image in @data.
Flags indicating the items to set up.
Adds the result of data synthesis to a file.
This function takes care of handling correctly the %GWY_DIMS_PARAM_REPLACE and %GWY_DIMS_PARAM_INITIALIZE options
(the latter with regard to logging and sync; actual computation input is handled by the module) in the various
cases such as @data and/or @id existing or not.
The parameter value set must be created for a set of parameters defined with gwy_synth_define_dimensions_params()
and set up with gwy_synth_sanitise_params().
Data id of the result. It can correspond a newly created image or an existing image, depending on the
settings.
Data field with the simulation output.
Data container corresponding to the current file, or %NULL is there is none.
Id or the current image (or -1 if there is none).
The set of parameter values for the synth module.
Appends the standard set of dimension parameters for a data synthesis module to a parameter table.
Usually, this is used to fill the content of a ‘Dimensions’ tab of the dialogue.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params().
Set of parameter value controls.
Set of flags controlling the available parameters.
Defines the standard set of dimension parameters for a data synthesis module.
Parameters with ids starting from @first_id will become #GwySynthDimsParam paramers. For instance
@first_id + %GWY_DIMS_PARAMS_XREAL will be the id of the standard xreal parameter.
A set of parameter definitions.
First free id for the block of dimension parameters.
Obtains the name of currently running synthetic data function.
If no synthetic data function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name
is returned.
The name of currently running synthetic data function or %NULL.
Checks whether a synthetic data function exists.
%TRUE if function @name exists, %FALSE otherwise.
Curve map data processing function name.
Calls a function for each volume function.
Function to run for each synthetic data function, passed by name.
Data to pass to @function.
Gets icon name of a synthetic data function.
The icon name. The returned string is owned by the module.
Curve map data processing function name.
Returns the menu path of a synthetic data function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Curve Map".
The menu path. The returned string is owned by the module.
Curve map data processing function name.
Returns run modes supported by a synthetic data function.
The run mode bit mask.
Curve map data processing function name.
Gets tooltip for a synthetic data function.
The tooltip. The returned string is owned by the module.
Curve map data processing function name.
Registers a synthetic data function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
The function itself.
Menu path under Synthetic menu. The menu path should be marked translatabe, but passed untranslated
(to allow merging of translated and untranslated submenus).
Stock icon id for toolbar.
Supported run modes. Dynthetic data functions can have two run modes: %GWY_RUN_IMMEDIATE (no questions
asked) and %GWY_RUN_INTERACTIVE (a modal dialog with parameters).
Tooltip for this function.
Runs a synthetic data function identified by @name.
Curve map data processing function name.
A file data container, possibly %NULL.
How the function should be run.
Handles changes in a set of standard dimension parameters in a data synthesis module.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params().
%TRUE if the action taken was a mass parameter update. The caller should then proceed as if @id was -1,
whether it was originally or not.
Set of parameter value controls.
Changed parameter id (as obtained in the signal handler).
Creates a suitable data field running a data synthesis module in the preview mode.
The preview data field is created by a combination of cutting the central part of @field (if too large) and
resampling it to higher resolution (if too small). It will always be square, @size by @size.
For some data synthesis modules is can make more sense to run even the preview for the actual image size. Do not
use this function in such case.
A newly created data field.
Data field to be used as template, possibly %NULL.
Pixel size of the result.
Creates a data field for the output of a data synthesis module.
The new data field properties match either @field or values of the dimension and unit parameters, depending
on %GWY_DIMS_PARAM_REPLACE and %GWY_DIMS_PARAM_INITIALIZE (and also @always_use_template).
The parameter value set must be created for a set of parameters defined with gwy_synth_define_dimensions_params()
and set up with gwy_synth_sanitise_params().
A newly created data field.
Data field to be used as template, possibly %NULL.
The set of parameter values for the synth module.
%TRUE to always prefer creating a new data field matching @field, unless it is %NULL.
Ensures a basic consistency the standard set of dimension parameters for a data synthesis module.
This function also remembers @first_id and @template_ for @params. Other helper functions then do not take these
arguments, but you need to call this function to set up the association. If the module has constrains on possible
templates it has to ensure the template is valid; if the template is not valid pass %NULL instead.
A set of parameter values.
First id of the block of dimension parameters.
Template data field. Normally it is the current image, or %NULL if there is no current image.
Updates unit strings of dimension-like parameters in a synth module parameter table.
The parameters should be lateral pixel dimension parameters with alternative real dimensions.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params().
Set of parameter value controls.
Array of parameter ids (controlled by @partable).
The number of items in @ids.
Updates the sensitivity of the standard Like Current Image button in a synth module parameter table.
The buttons is made sensitive if the value units of the template data field match the selected value units. If
there is no template the button is usually now show at all. It is safe to call this function even in this case.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params().
Set of parameter value controls.
Parameter id corresponding to the Like Current Image button.
Manages progress bar updates and preview animation in a data synthesis module.
This helper functions updates the progress bar to @i/@niters and check whether a preview should be done when it is
animated.
What should happen.
A timer started together with the computation. Pass %NULL to forget the last preview time.
Minimum time between previews, in seconds. Pass a non-positive value if previews are not animated.
Current iteration/cycle. A monotonically increasing number.
The total number of iterations/cycles.
Updates unit strings of value-like parameters in a synth module parameter table.
The parameters should be free-form value-like parameters, for instance heights.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params().
Set of parameter value controls.
Array of parameter ids (controlled by @partable).
The number of items in @ids.
Updates a set of dimension parameters for a data synthesis module to match the template.
This will result in invocation of #GwyParamTable::param-changed signal with id -1.
The parameter table must be created for a set of parameters defined with gwy_synth_define_dimensions_params() and
set up with gwy_synth_sanitise_params() – this is where the template to use was defined.
Set of parameter value controls.
Returns error domain for expression parsin and evaluation.
See and use %GWY_TEXT_HEADER_ERROR.
The error domain.
Parses a line-oriented text header into a hash table.
See #GwyTextHeaderParser for details of memory and error handling.
Lines consisting only of whitespace are ignored.
A newly created hash table with values indexed by they keys found in the header.
Text header to parse. It must be %NULL-terminated and writable. Its contents will be modified to directly
embed the hash keys and/or values. It must not be freed while the returned hash table is in use.
Parser specification.
User data passed to parser callbacks.
For a module developer, the only two useful undo/redo functions are probably gwy_app_undo_checkpoint() and
gwy_app_undo_checkpointv() creating a checkpoint in the undo history to which is possible to return to later. You
should use these functions before commiting changes to data.
The other functions actually perform undo or redo, and has little use outside main application, unless it wishes to
implement its local undo.
There are two types of functions app-level and container-level. App-level functions (have `app' in their names)
should be generally used only by the main application as they update menus and toolboxes according to undo and redo
state. Container-level functions only perform the actual undo or redo and can be used for local undo
implementation.
Undo information for a #GwyDict is automatically destroyed when the container is finalized.
Create a point in the undo history it is possible to return to.
Undo level id. Not useful (yet).
A data container.
%NULL-terminated list of container item names to save.
Create a point in the undo history it is possible to return to.
Undo level id. Not useful (yet).
A data container.
The number of strings in @keys.
An array of container string keys to save data.
It can contain holes, that is NUL's, they are ignored. However, it
should contain at least one real key.
Returns whether there is any redo available for a container.
%TRUE if there is redo, %FALSE otherwise.
Data container to get redo infomation of.
Returns whether there is any undo available for a container.
%TRUE if there is undo, %FALSE otherwise.
Data container to get undo infomation of.
Removes undo/redo information for a data container.
A data container.
Prefix to remove undo/redo information under. Pass %NULL to remove undo/redo information altogether.
Reports whether undo/redo is globally enabled.
%TRUE if undo/redo is enabled, %FALSE if it is disabled.
Create a point in the undo history it is possible to return to.
Undo level id. Not useful (yet).
A data container.
0-terminated list of container item quark keys to save.
Create a point in the undo history it is possible to return to.
Undo level id. Not useful (yet).
A data container.
The number of strings in @keys.
An array of container quark keys to save data.
It can contain holes, that is 0's, they are ignored. However, it
should contain at least one real key.
Performs undo on a data container.
It must have redo available.
A data container.
Globally enables or disables undo/redo.
By default, undo/redo is enabled. Non-GUI applications that run module functions may wish to disable it to
conserve resources.
If undo/redo is disabled undo information manipulating functions such as gwy_app_undo_qcheckpoint() become no-op
and gwy_undo_dict_get_modified() always returns zero. Disabling undo also removes saved undo data of all
containers.
%TRUE to enable undo, %FALSE to disable it.
Performs undo on a data container.
It must have undo available.
A data container.
Obtains the name of currently running volume data processing function.
If no volume data processing function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name
is returned.
The name of currently running volume data processing function or %NULL.
Checks whether a volume data processing function exists.
%TRUE if function @name exists, %FALSE otherwise.
Volume data processing function name.
Calls a function for each volume function.
Function to run for each volume data function, passed by name.
Data to pass to @function.
Gets icon name of a volume data processing function.
The icon name. The returned string is owned by the module.
Volume data processing function name.
Returns the menu path of a volume data processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Volume Data".
The menu path. The returned string is owned by the module.
Volume data processing function name.
Returns run modes supported by a volume data processing function.
The run mode bit mask.
Volume data processing function name.
Gets menu sensititivy mask for a volume data processing function.
The menu item sensitivity mask (a combination of #GwyMenuSensFlags flags).
Volume data processing function name.
Gets tooltip for a volume data processing function.
The tooltip. The returned string is owned by the module.
Volume data processing function name.
Registers a volume data processing function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
The function itself.
Menu path under Volume Data menu. The menu path should be marked translatabe, but passed untranslated
(to allow merging of translated and untranslated submenus).
Stock icon id for toolbar.
Supported run modes. Volume data processing functions can have two run modes: %GWY_RUN_IMMEDIATE (no
questions asked) and %GWY_RUN_INTERACTIVE (a modal dialog with parameters).
Sensitivity mask (a combination of #GwyMenuSensFlags flags). Usually it contains #GWY_MENU_FLAG_VOLUME,
possibly other requirements.
Tooltip for this function.
Runs a volume data processing function identified by @name.
Volume data processing function name.
Data (a #GwyFile).
How the function should be run.
The waiting functions implement a simple single-thread approach to performing a long computation while keeping the
GUI responsive.
The typical basic usage is as follows:
|[
gboolean cancelled = FALSE;
gwy_app_wait_start(window, _("Evaluating..."));
for (i = 0; i < n_iters; i++) {
do_one_calculation_iteration();
if (!gwy_app_wait_set_fraction((i + 1.0)/n_iters)) {
cancelled = TRUE;
break;
}
}
gwy_app_wait_finish();
if (cancelled)
handle_cancelled_computation();
else
do_something_with_result();
]|
Obtains the name of currently running scattered data processing function.
If no scattered data processing function is currently running, %NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name
is returned.
The name of currently running scattered data processing function or %NULL.
Checks whether a scattered data processing function exists.
%TRUE if function @name exists, %FALSE otherwise.
XYZ scattered data processing function name.
Calls a function for each XYZ function.
Function to run for each XYZ data function, passed by name.
Data to pass to @function.
Gets icon name of a scattered data processing function.
The icon name. The returned string is owned by the module.
XYZ scattered data processing function name.
Returns the menu path of a scattered data processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/XYZ Data".
The menu path. The returned string is owned by the module.
XYZ scattered data processing function name.
Returns run modes supported by a scattered data processing function.
The run mode bit mask.
XYZ scattered data processing function name.
Gets menu sensititivy mask for a scattered data processing function.
The menu item sensitivity mask (a combination of #GwyMenuSensFlags flags).
XYZ scattered data processing function name.
Gets tooltip for a scattered data processing function.
The tooltip. The returned string is owned by the module.
XYZ scattered data processing function name.
Registers a scattered data processing function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed
(non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
Normally %TRUE; %FALSE on failure.
Name of function to register. It should be a valid identifier and if a module registers only one function,
module and function names should be the same.
The function itself.
Menu path under XYZ Data menu. The menu path should be marked translatabe, but passed untranslated (to
allow merging of translated and untranslated submenus).
Stock icon id for toolbar.
Supported run modes. XYZ scattered data processing functions can have two run modes: %GWY_RUN_IMMEDIATE (no
questions asked) and %GWY_RUN_INTERACTIVE (a modal dialog with parameters).
Sensitivity mask (a combination of #GwyMenuSensFlags flags). Usually it contains #GWY_MENU_FLAG_XYZ,
possibly other requirements.
Tooltip for this function.
Runs a scattered data processing function identified by @name.
XYZ scattered data processing function name.
Data (a #GwyFile).
How the function should be run.
Adds a XYZ scattered data title based on scatter value units.
The guess is very simple, but probably better than `Unknown channel' in most cases. If there already is a title it
is left intact, making use of this function as a fall-back easier.
The file may be still in construction.
%TRUE if the title was set (either by this function or before).
A data container.
XYZ scattered data id.