data-browser: Gwyddion Application Library Reference Manual

## data-browser data-browser — Data browser |

## Functions

void | (*GwyAppDataForeachFunc) ()
void | (*GwyAppDataWatchFunc) ()
void | gwy_app_data_browser_add ()
void | gwy_app_data_browser_remove ()
void | gwy_app_data_browser_merge ()
GwyContainer * | gwy_app_data_browser_get ()
gint | gwy_app_data_browser_get_number ()
gboolean | gwy_app_data_browser_reset_visibility ()
void | gwy_app_data_browser_set_keep_invisible ()
gboolean | gwy_app_data_browser_get_keep_invisible ()
void | gwy_app_data_browser_block_switching ()
void | gwy_app_data_browser_unblock_switching ()
void | gwy_app_data_browser_select_data_view ()
void | gwy_app_data_browser_select_graph ()
void | gwy_app_data_browser_select_spectra ()
void | gwy_app_data_browser_select_volume ()
void | gwy_app_data_browser_select_xyz ()
void | gwy_app_data_browser_select_curve_map ()
gint | gwy_app_data_browser_add_data_field ()
gint | gwy_app_data_browser_add_graph_model ()
gint | gwy_app_data_browser_add_spectra ()
gint | gwy_app_data_browser_add_brick ()
gint | gwy_app_data_browser_add_surface ()
gint | gwy_app_data_browser_add_lawn ()
void | gwy_app_data_browser_get_current ()
gint * | gwy_app_data_browser_get_data_ids ()
gint * | gwy_app_data_browser_get_graph_ids ()
gint * | gwy_app_data_browser_get_spectra_ids ()
gint * | gwy_app_data_browser_get_volume_ids ()
gint * | gwy_app_data_browser_get_xyz_ids ()
gint * | gwy_app_data_browser_get_curve_map_ids ()
gint * | gwy_app_data_browser_find_data_by_title ()
gint * | gwy_app_data_browser_find_graphs_by_title ()
gint * | gwy_app_data_browser_find_spectra_by_title ()
gint * | gwy_app_data_browser_find_volume_by_title ()
gint * | gwy_app_data_browser_find_xyz_by_title ()
gint * | gwy_app_data_browser_find_curve_map_by_title ()
void | gwy_app_data_clear_selections ()
void | gwy_app_data_browser_foreach ()
gulong | gwy_app_data_browser_add_channel_watch ()
void | gwy_app_data_browser_remove_channel_watch ()
gulong | gwy_app_data_browser_add_graph_watch ()
void | gwy_app_data_browser_remove_graph_watch ()
gulong | gwy_app_data_browser_add_volume_watch ()
void | gwy_app_data_browser_remove_volume_watch ()
gulong | gwy_app_data_browser_add_xyz_watch ()
void | gwy_app_data_browser_remove_xyz_watch ()
gulong | gwy_app_data_browser_add_curve_map_watch ()
void | gwy_app_data_browser_remove_curve_map_watch ()
void | gwy_app_sync_data_items ()
void | gwy_app_sync_data_itemsv ()
void | gwy_app_sync_volume_items ()
void | gwy_app_sync_volume_itemsv ()
void | gwy_app_sync_xyz_items ()
void | gwy_app_sync_xyz_itemsv ()
void | gwy_app_sync_curve_map_items ()
void | gwy_app_sync_curve_map_itemsv ()
gint | gwy_app_data_browser_copy_channel ()
gint | gwy_app_data_browser_copy_volume ()
gint | gwy_app_data_browser_copy_xyz ()
gint | gwy_app_data_browser_copy_curve_map ()
GQuark | gwy_app_get_data_key_for_id ()
GQuark | gwy_app_get_mask_key_for_id ()
GQuark | gwy_app_get_show_key_for_id ()
GQuark | gwy_app_get_graph_key_for_id ()
GQuark | gwy_app_get_spectra_key_for_id ()
GQuark | gwy_app_get_brick_key_for_id ()
GQuark | gwy_app_get_surface_key_for_id ()
GQuark | gwy_app_get_lawn_key_for_id ()
GQuark | gwy_app_get_data_title_key_for_id ()
GQuark | gwy_app_get_data_base_key_for_id ()
GQuark | gwy_app_get_data_range_type_key_for_id ()
GQuark | gwy_app_get_data_range_min_key_for_id ()
GQuark | gwy_app_get_data_range_max_key_for_id ()
GQuark | gwy_app_get_data_palette_key_for_id ()
GQuark | gwy_app_get_data_meta_key_for_id ()
GQuark | gwy_app_get_data_real_square_key_for_id ()
GQuark | gwy_app_get_brick_title_key_for_id ()
GQuark | gwy_app_get_brick_preview_key_for_id ()
GQuark | gwy_app_get_brick_palette_key_for_id ()
GQuark | gwy_app_get_brick_meta_key_for_id ()
GQuark | gwy_app_get_surface_title_key_for_id ()
GQuark | gwy_app_get_surface_palette_key_for_id ()
GQuark | gwy_app_get_surface_meta_key_for_id ()
GQuark | gwy_app_get_surface_preview_key_for_id ()
GQuark | gwy_app_get_lawn_title_key_for_id ()
GQuark | gwy_app_get_lawn_palette_key_for_id ()
GQuark | gwy_app_get_lawn_meta_key_for_id ()
GQuark | gwy_app_get_lawn_preview_key_for_id ()
GQuark | gwy_app_get_lawn_real_square_key_for_id ()
void | gwy_app_set_data_field_title ()
gchar * | gwy_app_get_data_field_title ()
void | gwy_app_set_brick_title ()
gchar * | gwy_app_get_brick_title ()
void | gwy_app_set_surface_title ()
gchar * | gwy_app_get_surface_title ()
void | gwy_app_set_lawn_title ()
gchar * | gwy_app_get_lawn_title ()
void | gwy_app_data_browser_show ()
void | gwy_app_data_browser_restore ()
void | gwy_app_data_browser_shut_down ()
GdkPixbuf * | gwy_app_get_channel_thumbnail ()
GdkPixbuf * | gwy_app_get_graph_thumbnail ()
GdkPixbuf * | gwy_app_get_volume_thumbnail ()
GdkPixbuf * | gwy_app_get_xyz_thumbnail ()
GdkPixbuf * | gwy_app_get_curve_map_thumbnail ()
void | gwy_app_data_browser_select_data_field ()
void | gwy_app_data_browser_select_graph_model ()
void | gwy_app_data_browser_select_surface ()
void | gwy_app_data_browser_select_brick ()
void | gwy_app_data_browser_select_lawn ()
void | gwy_app_data_browser_show_3d ()
GtkWindow * | gwy_app_find_window_for_channel ()
GtkWindow * | gwy_app_find_window_for_graph ()
GtkWindow * | gwy_app_find_window_for_volume ()
GtkWindow * | gwy_app_find_window_for_xyz ()
GtkWindow * | gwy_app_find_window_for_curve_map ()
gboolean | gwy_app_data_browser_get_gui_enabled ()
void | gwy_app_data_browser_set_gui_enabled ()

## Types and Values

enum | GwyAppWhat
enum | GwyAppPage
enum | GwyDataItem
enum | GwyVisibilityResetType
enum | GwyDataWatchEventType

## Includes

    #include <app/gwyapp.h>

## Description

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.

An GwyContainer that represents an SPM file is managed by functions such as `gwy_app_data_browser_add()` or `gwy_app_data_browser_remove()`. Note that the high-level libgwyapp functions (with app in their name) such as `gwy_app_file_load()` already call the data browser functions as appropriate.

If a file-like GwyContainer has not been added to the data browser it is unmanaged and cannot be used with most of the data browser functions. The exceptions are GQuark constructors such as `gwy_app_get_mask_key_for_id()`, copying functions such as `gwy_app_data_browser_copy_channel()`, title management functions such as `gwy_app_set_surface_title()`, thumbnail creation helpers such as `gwy_app_get_graph_thumbnail()`, and functions for listing the ids of various data types such as `gwy_app_data_browser_get_data_ids()`.

Individual data pieces can be added to managed GwyContainers with functions such as `gwy_app_data_browser_add_data_field()` that can take care of creating the window showing the new data. Removal is generally done by directly removing the corresponding data object(s) from the GwyContainer.

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_app_data_browser_get_current()`. Making a data item currently selected is accomplished either using function such as `gwy_app_data_browser_select_data_view()`, which corresponds to the user switching to the data window, or `gwy_app_data_browser_select_data_field()` which just selects the data item as current in the browser. The latter is less safe and can result in strange behaviour because for some purposes only data actually displayed can be ‘current’.

## Functions

### GwyAppDataForeachFunc ()

    void
    (*GwyAppDataForeachFunc) (GwyContainer *data,
                              gpointer user_data);

Type of function passed to `gwy_app_data_browser_foreach()`.

#### Parameters

data | A data container managed by the data-browser. |
user_data | User data passed to `gwy_app_data_browser_foreach()`. |

### GwyAppDataWatchFunc ()

    void
    (*GwyAppDataWatchFunc) (GwyContainer *data,
                            gint id,
                            GwyDataWatchEventType event,
                            gpointer user_data);

Type of function passed to `gwy_app_data_browser_add_channel_watch()`.

#### Parameters

data | A data container managed by the data-browser. |
id | Object (channel) id in the container. |
user_data | User data passed to `gwy_app_data_browser_add_channel_watch()`. |

Since: 2.21

### gwy_app_data_browser_add ()

    void
    gwy_app_data_browser_add (GwyContainer *data);

Adds a data container to the application data browser.

The data browser takes a reference on the container so you can release yours.

#### Parameters

data | A data container. |

### gwy_app_data_browser_remove ()

    void
    gwy_app_data_browser_remove (GwyContainer *data);

Removed a data container from the application data browser.

#### Parameters

data | A data container. |

### gwy_app_data_browser_merge ()

    void
    gwy_app_data_browser_merge (GwyContainer *data);

Merges the data from a data container to the current one.

#### Parameters

data | A data container, not managed by the data browser. |

Since: 2.7

### gwy_app_data_browser_get ()

    GwyContainer *
    gwy_app_data_browser_get (gint number);

Gets the data corresponding to a numerical identifier.

The identifier can be obtained with `gwy_app_data_browser_get_number()`. See its documentation for discussion.

#### Parameters

number | Numerical identifier of open data managed by the data browser, or zero. |

#### Returns

The corresponding data container. `NULL` is returned if `number` does not identify any existing data.

Since: 2.41

### gwy_app_data_browser_get_number ()

    gint
    gwy_app_data_browser_get_number (GwyContainer *data);

Gets the numerical identifier of data.

Each time a data container is added with `gwy_app_data_browser_add()` it is assigned a new unique numerical identifier. This number can be used in multi-data modules to remember and restore secondary data.

Note, however, that the number is only guaranteed to be unique within one process. It does not persist across different program invocations and it does not make sense to store it to the settings or other kinds of permanent storage.

#### Parameters

data | A data container managed by the data browser. For convenience, `NULL` is also permitted. |

#### Returns

A positive numerical identifier of `data` . Zero is returned if `data` is `NULL`.

Since: 2.41

### gwy_app_data_browser_reset_visibility ()

    gboolean
    gwy_app_data_browser_reset_visibility (GwyContainer *data,
                                           GwyVisibilityResetType reset_type);

Resets visibility of all data objects in a container.

#### Parameters

data | A data container. |
reset_type | Type of visibility reset. |

#### Returns

`TRUE` if anything is visible after the reset.

### gwy_app_data_browser_set_keep_invisible ()

    void
    gwy_app_data_browser_set_keep_invisible
                                   (GwyContainer *data,
                                    gboolean keep_invisible);

Sets data browser behaviour for inaccessible data.

Normally, when all visual objects belonging to a file are closed the container is removed from the data browser and dereferenced, leading to its finalization. By setting `keep_invisible` to `TRUE` the container can be made to sit in the browser indefinitely.

#### Parameters

data | A data container. |
keep_invisible | `TRUE` to retain `data` in the browser even when it becomes inaccessible, `FALSE` to dispose of it. |

### gwy_app_data_browser_get_keep_invisible ()

    gboolean
    gwy_app_data_browser_get_keep_invisible
                                   (GwyContainer *data);

Gets data browser behaviour for inaccessible data.

#### Parameters

data | A data container. |

#### Returns

See `gwy_app_data_browser_set_keep_invisible()`.

### gwy_app_data_browser_block_switching ()

    void
    gwy_app_data_browser_block_switching (void);

Temporarily blocks data switching 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.

Use `gwy_app_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 cannot be blocked permanently because it would get the data browser out of sync.

Since: 2.67

### gwy_app_data_browser_unblock_switching ()

    void
    gwy_app_data_browser_unblock_switching
                                   (void);

Stops temporarily blocking data switching according to the active window.

The blocking is started by `gwy_app_data_browser_block_switching()`. See its description for details.

Since: 2.67

### gwy_app_data_browser_select_data_view ()

    void
    gwy_app_data_browser_select_data_view (GwyDataView *data_view);

Switches application data browser to display container of `data_view` 's data and selects `data_view` 's data in the channel list.

#### Parameters

data_view | A data view widget. |

### gwy_app_data_browser_select_graph ()

    void
    gwy_app_data_browser_select_graph (GwyGraph *graph);

Switches application data browser to display container of `graph` 's data and selects `graph` 's data in the graph list.

#### Parameters

graph | A graph widget. |

### gwy_app_data_browser_select_spectra ()

    void
    gwy_app_data_browser_select_spectra (GwySpectra *spectra);

Switches application data browser to display container of `spectra` 's data and selects `spectra` 's data in the graph list.

However, it is not actually supposed to work with spectra from a different container than those of the currently active channel, so do not try that for now.

#### Parameters

spectra | A spectra object. |

Since: 2.7

### gwy_app_data_browser_select_volume ()

    void
    gwy_app_data_browser_select_volume (GwyDataView *data_view);

Switches application data browser to display container of data and selects `data_view` 's volume data in the graph list.

#### Parameters

data_view | A data view widget showing a preview of volume data. |

Since: 2.32

### gwy_app_data_browser_select_xyz ()

    void
    gwy_app_data_browser_select_xyz (GwyDataView *data_view);

Switches application data browser to display container of data and selects `data_view` 's XYZ data in the graph list.

#### Parameters

data_view | A data view widget showing a preview of XYZ data. |

Since: 2.45

### gwy_app_data_browser_select_curve_map ()

    void
    gwy_app_data_browser_select_curve_map (GwyDataView *data_view);

Switches application data browser to display container of data and selects `data_view` 's curve_map data in the graph list.

#### Parameters

data_view | A data view widget showing a preview of curve_map data. |

Since: 2.60

### gwy_app_data_browser_add_data_field ()

    gint
    gwy_app_data_browser_add_data_field (GwyDataField *dfield,
                                         GwyContainer *data,
                                         gboolean showit);

Adds a data field to a data container.

The data browser takes a reference to `dfield` so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

dfield | A data field to add. |
data | A data container to add `dfield` to. It can be `NULL` to add the data field to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the data field in the container.

### gwy_app_data_browser_add_graph_model ()

    gint
    gwy_app_data_browser_add_graph_model (GwyGraphModel *gmodel,
                                          GwyContainer *data,
                                          gboolean showit);

Adds a graph model to a data container.

The data browser takes a reference to `gmodel` so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

gmodel | A graph model to add. |
data | A data container to add `gmodel` to. It can be `NULL` to add the graph model to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the graph model in the container.

### gwy_app_data_browser_add_spectra ()

    gint
    gwy_app_data_browser_add_spectra (GwySpectra *spectra,
                                      GwyContainer *data,
                                      gboolean showit);

Adds a spectra object to a data container.

The data browser takes a reference to `spectra` so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

spectra | A spectra object to add. |
data | A data container to add `gmodel` to. It can be `NULL` to add the spectra to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the spectra object in the container.

Since: 2.7

### gwy_app_data_browser_add_brick ()

    gint
    gwy_app_data_browser_add_brick (GwyBrick *brick,
                                    GwyDataField *preview,
                                    GwyContainer *data,
                                    gboolean showit);

Adds a volume data brick to a data container.

The data browser takes a reference to `brick` (and `preview` if given) so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

brick | A data brick to add. |
preview | Preview data field. It may be `NULL` to create a preview automatically. If non-`NULL`, its dimensions should match those of brick planes. You must not pass a field which already represents a channel. If you want a to show the same field as an existing channel you must create a copy with `gwy_data_field_duplicate()`. |
data | A data container to add `brick` to. It can be `NULL` to add the data field to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the data brick in the container.

Since: 2.32

### gwy_app_data_browser_add_surface ()

    gint
    gwy_app_data_browser_add_surface (GwySurface *surface,
                                      GwyContainer *data,
                                      gboolean showit);

Adds XYZ surface data to a data container.

The data browser takes a reference to `surface` so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

surface | XYZ surface data to add. |
data | A data container to add `surface` to. It can be `NULL` to add the data field to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the data surface in the container.

Since: 2.45

### gwy_app_data_browser_add_lawn ()

    gint
    gwy_app_data_browser_add_lawn (GwyLawn *lawn,
                                   GwyDataField *preview,
                                   GwyContainer *data,
                                   gboolean showit);

Adds GwyLawn curve map data to a data container.

The data browser takes a reference to `lawn` so usually you will want to release your reference, especially when done as the ‘create output’ step of a module function.

#### Parameters

lawn | GwyLawn to add. |
preview | Preview data field. It may be `NULL` to create a preview automatically. If non-`NULL`, its dimensions should match those of lawn planes. You must not pass a field which already represents a channel. If you want a to show the same field as an existing channel you must create a copy with `gwy_data_field_duplicate()`. |
data | A data container to add `lawn` to. It can be `NULL` to add the data field to current data container. |
showit | `TRUE` to display it immediately, `FALSE` to just add it. |

#### Returns

The id of the data lawn in the container.

Since: 2.60

### gwy_app_data_browser_get_current ()

    void
    gwy_app_data_browser_get_current (GwyAppWhat what,
                                      ...);

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.

#### Parameters

what | 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. |

### gwy_app_data_browser_get_data_ids ()

    gint *
    gwy_app_data_browser_get_data_ids (GwyContainer *data);

Gets the list of all channels in a data container.

The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with channel ids, -1 terminated.

### gwy_app_data_browser_get_graph_ids ()

    gint *
    gwy_app_data_browser_get_graph_ids (GwyContainer *data);

Gets the list of all graphs in a data container.

The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with graph ids, -1 terminated.

### gwy_app_data_browser_get_spectra_ids ()

    gint *
    gwy_app_data_browser_get_spectra_ids (GwyContainer *data);

Gets the list of all spectra in a data container.

The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with spectrum ids, -1 terminated.

Since: 2.7

### gwy_app_data_browser_get_volume_ids ()

    gint *
    gwy_app_data_browser_get_volume_ids (GwyContainer *data);

Gets the list of all volume data in a data container.

The function originally could be used only for data containers managed by the data browser. Since version 2.45 it can be used for all file-like data containers.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with volume data ids, -1 terminated.

Since: 2.33

### gwy_app_data_browser_get_xyz_ids ()

    gint *
    gwy_app_data_browser_get_xyz_ids (GwyContainer *data);

Gets the list of all XYZ data in a data container.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with XYZ data ids, -1 terminated.

Since: 2.45

### gwy_app_data_browser_get_curve_map_ids ()

    gint *
    gwy_app_data_browser_get_curve_map_ids
                                   (GwyContainer *data);

Gets the list of all GwyLawn curve map data in a data container.

#### Parameters

data | A data container. |

#### Returns

A newly allocated array with GwyLawn curve map data ids, -1 terminated.

Since: 2.60

### gwy_app_data_browser_find_data_by_title ()

    gint *
    gwy_app_data_browser_find_data_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all channels in a data container whose titles match the specified pattern.

The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the channel titles against. |

#### Returns

A newly allocated array with channel ids, -1 terminated.

Since: 2.21

### gwy_app_data_browser_find_graphs_by_title ()

    gint *
    gwy_app_data_browser_find_graphs_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all graphs in a data container whose titles match the specified pattern.

The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the graph titles against. |

#### Returns

A newly allocated array with graph ids, -1 terminated.

Since: 2.21

### gwy_app_data_browser_find_spectra_by_title ()

    gint *
    gwy_app_data_browser_find_spectra_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all spectra in a data container whose titles match the specified pattern.

The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the spectra titles against. |

#### Returns

A newly allocated array with spectra ids, -1 terminated.

Since: 2.21

### gwy_app_data_browser_find_volume_by_title ()

    gint *
    gwy_app_data_browser_find_volume_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all volume data in a data container whose titles match the specified pattern.

The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the volume data titles against. |

#### Returns

A newly allocated array with volume data ids, -1 terminated.

Since: 2.45

### gwy_app_data_browser_find_xyz_by_title ()

    gint *
    gwy_app_data_browser_find_xyz_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all XYZ data in a data container whose titles match the specified pattern.

The function originally could be used only for data containers managed by the data browser. Since version 2.49 it can be used for all file-like data containers.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the XYZ data titles against. |

#### Returns

A newly allocated array with XYZ data ids, -1 terminated.

Since: 2.45

### gwy_app_data_browser_find_curve_map_by_title ()

    gint *
    gwy_app_data_browser_find_curve_map_by_title
                                   (GwyContainer *data,
                                    const gchar *titleglob);

Gets the list of all curve_map data in a data container whose titles match the specified pattern.

#### Parameters

data | A data container. |
titleglob | Pattern, as used by GPatternSpec, to match the curve map data titles against. |

#### Returns

A newly allocated array with curve map data ids, -1 terminated.

Since: 2.60

### gwy_app_data_clear_selections ()

    void
    gwy_app_data_clear_selections (GwyContainer *data,
                                   gint id);

Clears all selections associated with a data channel.

This is the preferred selection handling after changes in data geometry as they have generally unpredictable effects on selections. Selection should not be removed because this is likely to make the current tool stop working.

#### Parameters

data | A data container. |
id | Data channel id. |

### gwy_app_data_browser_foreach ()

    void
    gwy_app_data_browser_foreach (GwyAppDataForeachFunc function,
                                  gpointer user_data);

Calls a function for each data container managed by data browser.

#### Parameters

function | Function to run on each data container. |
user_data | Data to pass as second argument of `function` . |

### gwy_app_data_browser_add_channel_watch ()

    gulong
    gwy_app_data_browser_add_channel_watch
                                   (GwyAppDataWatchFunc function,
                                    gpointer user_data);

Adds a watch function called when a channel changes.

The function is called whenever a channel is added, removed, its data changes or its metadata such as the title changes. If a channel is removed it may longer exist when the function is called.

#### Parameters

function | Function to call when a channel changes. |
user_data | User data to pass to `function` . |

#### Returns

The id of the added watch func that can be used to remove it later using `gwy_app_data_browser_remove_channel_watch()`.

Since: 2.21

### gwy_app_data_browser_remove_channel_watch ()

    void
    gwy_app_data_browser_remove_channel_watch
                                   (gulong id);

Removes a channel watch function.

#### Parameters

id | Watch function id, as returned by `gwy_app_data_browser_add_channel_watch()`. |

Since: 2.21

### gwy_app_data_browser_add_graph_watch ()

    gulong
    gwy_app_data_browser_add_graph_watch (GwyAppDataWatchFunc function,
                                          gpointer user_data);

Adds a watch function called when a graph changes.

The function is called whenever a graph is added, removed or its properties change. If a graph is removed it may longer exist when the function is called.

#### Parameters

function | Function to call when a graph changes. |
user_data | User data to pass to `function` . |

#### Returns

The id of the added watch func that can be used to remove it later using `gwy_app_data_browser_remove_graph_watch()`.

Since: 2.41

### gwy_app_data_browser_remove_graph_watch ()

    void
    gwy_app_data_browser_remove_graph_watch
                                   (gulong id);

Removes a graph watch function.

#### Parameters

id | Watch function id, as returned by `gwy_app_data_browser_add_graph_watch()`. |

Since: 2.41

### gwy_app_data_browser_add_volume_watch ()

    gulong
    gwy_app_data_browser_add_volume_watch (GwyAppDataWatchFunc function,
                                           gpointer user_data);

Adds a watch function called when volume data change.

The function is called whenever a volume is added, removed, its data changes or its metadata such as the title changes. If a volume is removed it may longer exist when the function is called.

#### Parameters

function | Function to call when volume data change. |
user_data | User data to pass to `function` . |

#### Returns

The id of the added watch func that can be used to remove it later using `gwy_app_data_browser_remove_volume_watch()`.

Since: 2.60

### gwy_app_data_browser_remove_volume_watch ()

    void
    gwy_app_data_browser_remove_volume_watch
                                   (gulong id);

Removes a volume data watch function.

#### Parameters

id | Watch function id, as returned by `gwy_app_data_browser_add_volume_watch()`. |

Since: 2.60

### gwy_app_data_browser_add_xyz_watch ()

    gulong
    gwy_app_data_browser_add_xyz_watch (GwyAppDataWatchFunc function,
                                        gpointer user_data);

Adds a watch function called when XYZ data change.

The function is called whenever an XYZ surface is added, removed, its data changes or its metadata such as the title changes. If an XYZ is removed it may longer exist when the function is called.

#### Parameters

function | Function to call when XYZ data change. |
user_data | User data to pass to `function` . |

#### Returns

The id of the added watch func that can be used to remove it later using `gwy_app_data_browser_remove_xyz_watch()`.

Since: 2.60

### gwy_app_data_browser_remove_xyz_watch ()

    void
    gwy_app_data_browser_remove_xyz_watch (gulong id);

Removes an XYZ data watch function.

#### Parameters

id | Watch function id, as returned by `gwy_app_data_browser_add_xyz_watch()`. |

Since: 2.60

### gwy_app_data_browser_add_curve_map_watch ()

    gulong
    gwy_app_data_browser_add_curve_map_watch
                                   (GwyAppDataWatchFunc function,
                                    gpointer user_data);

Adds a watch function called when curve map data change.

The function is called whenever a curve map is added, removed, its data changes or its metadata such as the title changes. If a curve map is removed it may longer exist when the function is called.

#### Parameters

function | Function to call when curve map data change. |
user_data | User data to pass to `function` . |

#### Returns

The id of the added watch func that can be used to remove it later using `gwy_app_data_browser_remove_curve_map_watch()`.

Since: 2.60

### gwy_app_data_browser_remove_curve_map_watch ()

    void
    gwy_app_data_browser_remove_curve_map_watch
                                   (gulong id);

Removes a curve map data watch function.

#### Parameters

id | Watch function id, as returned by `gwy_app_data_browser_add_curve_map_watch()`. |

Since: 2.60

### gwy_app_sync_data_items ()

    void
    gwy_app_sync_data_items (GwyContainer *source,
                             GwyContainer *dest,
                             gint from_id,
                             gint to_id,
                             gboolean delete_too,
                             ...);

Synchronizes auxiliary image data items between data containers.

All items except `GWY_DATA_ITEM_PREVIEW` are valid for image data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
... | 0-terminated list of GwyDataItem values defining the items to copy. |

### gwy_app_sync_data_itemsv ()

    void
    gwy_app_sync_data_itemsv (GwyContainer *source,
                              GwyContainer *dest,
                              gint from_id,
                              gint to_id,
                              gboolean delete_too,
                              const GwyDataItem *items,
                              guint nitems);

Synchronizes auxiliary image data items between data containers.

All items except `GWY_DATA_ITEM_PREVIEW` are valid for image data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
items | List of GwyDataItem values defining the items to copy. |
nitems | Number of items in `items` . |

Since: 2.48

### gwy_app_sync_volume_items ()

    void
    gwy_app_sync_volume_items (GwyContainer *source,
                               GwyContainer *dest,
                               gint from_id,
                               gint to_id,
                               gboolean delete_too,
                               ...);

Synchronizes auxiliary volume data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META` and `GWY_DATA_ITEM_PREVIEW` are valid items for volume data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
... | 0-terminated list of GwyDataItem values defining the items to copy. |

Since: 2.51

### gwy_app_sync_volume_itemsv ()

    void
    gwy_app_sync_volume_itemsv (GwyContainer *source,
                                GwyContainer *dest,
                                gint from_id,
                                gint to_id,
                                gboolean delete_too,
                                const GwyDataItem *items,
                                guint nitems);

Synchronizes auxiliary volume data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META` and `GWY_DATA_ITEM_PREVIEW` are valid items for volume data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
items | List of GwyDataItem values defining the items to copy. |
nitems | Number of items in `items` . |

Since: 2.51

### gwy_app_sync_xyz_items ()

    void
    gwy_app_sync_xyz_items (GwyContainer *source,
                            GwyContainer *dest,
                            gint from_id,
                            gint to_id,
                            gboolean delete_too,
                            ...);

Synchronizes auxiliary XYZ data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META` and `GWY_DATA_ITEM_PREVIEW` are valid items for XYZ data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
... | 0-terminated list of GwyDataItem values defining the items to copy. |

Since: 2.60

### gwy_app_sync_xyz_itemsv ()

    void
    gwy_app_sync_xyz_itemsv (GwyContainer *source,
                             GwyContainer *dest,
                             gint from_id,
                             gint to_id,
                             gboolean delete_too,
                             const GwyDataItem *items,
                             guint nitems);

Synchronizes auxiliary XYZ data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META` and `GWY_DATA_ITEM_PREVIEW` are valid items for XYZ data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
items | List of GwyDataItem values defining the items to copy. |
nitems | Number of items in `items` . |

Since: 2.60

### gwy_app_sync_curve_map_items ()

    void
    gwy_app_sync_curve_map_items (GwyContainer *source,
                                  GwyContainer *dest,
                                  gint from_id,
                                  gint to_id,
                                  gboolean delete_too,
                                  ...);

Synchronizes auxiliary curve map data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META`, `GWY_DATA_ITEM_REAL_SQUARE` and `GWY_DATA_ITEM_PREVIEW` are valid items for curve map data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
... | 0-terminated list of GwyDataItem values defining the items to copy. |

Since: 2.60

### gwy_app_sync_curve_map_itemsv ()

    void
    gwy_app_sync_curve_map_itemsv (GwyContainer *source,
                                   GwyContainer *dest,
                                   gint from_id,
                                   gint to_id,
                                   gboolean delete_too,
                                   const GwyDataItem *items,
                                   guint nitems);

Synchronizes auxiliary curve map data items between data containers.

Only `GWY_DATA_ITEM_GRADIENT`, `GWY_DATA_ITEM_TITLE`, `GWY_DATA_ITEM_META`, `GWY_DATA_ITEM_REAL_SQUARE` and `GWY_DATA_ITEM_PREVIEW` are valid items for curve map data.

#### Parameters

source | Source container. |
dest | Target container (may be identical to source). |
from_id | Data number to copy items from. |
to_id | Data number to copy items to. |
delete_too | `TRUE` to delete items in target if source does not contain them, `FALSE` to copy only. |
items | List of GwyDataItem values defining the items to copy. |
nitems | Number of items in `items` . |

Since: 2.60

### gwy_app_data_browser_copy_channel ()

    gint
    gwy_app_data_browser_copy_channel (GwyContainer *source,
                                       gint id,
                                       GwyContainer *dest);

Copies a channel including all auxiliary data.

#### Parameters

source | Source container. |
id | Data channel id. |
dest | Target container (may be identical to source). |

#### Returns

The id of the copy.

### gwy_app_data_browser_copy_volume ()

    gint
    gwy_app_data_browser_copy_volume (GwyContainer *source,
                                      gint id,
                                      GwyContainer *dest);

Copies volume brick data including all auxiliary data.

#### Parameters

source | Source container. |
id | Volume data brick id. |
dest | Target container (may be identical to source). |

#### Returns

The id of the copy.

Since: 2.32

### gwy_app_data_browser_copy_xyz ()

    gint
    gwy_app_data_browser_copy_xyz (GwyContainer *source,
                                   gint id,
                                   GwyContainer *dest);

Copies XYZ surface data including all auxiliary data.

#### Parameters

source | Source container. |
id | XYZ surface data id. |
dest | Target container (may be identical to source). |

#### Returns

The id of the copy.

Since: 2.45

### gwy_app_data_browser_copy_curve_map ()

    gint
    gwy_app_data_browser_copy_curve_map (GwyContainer *source,
                                         gint id,
                                         GwyContainer *dest);

Copies GwyLawn curve map data including all auxiliary data.

#### Parameters

source | Source container. |
id | GwyLawn curve map data id. |
dest | Target container (may be identical to source). |

#### Returns

The id of the copy.

Since: 2.60

### gwy_app_get_data_key_for_id ()

    GQuark
    gwy_app_get_data_key_for_id (gint id);

Calculates data field quark identifier from its id.

#### Parameters

id | Numerical id of a channel in file (container). |

#### Returns

The quark key identifying channel data field with number `id` .

### gwy_app_get_mask_key_for_id ()

    GQuark
    gwy_app_get_mask_key_for_id (gint id);

Calculates mask field quark identifier from its id.

#### Parameters

id | Numerical id of a channel in file (container). |

#### Returns

The quark key identifying mask data field with number `id` .

### gwy_app_get_show_key_for_id ()

    GQuark
    gwy_app_get_show_key_for_id (gint id);

Calculates presentation field quark identifier from its id.

#### Parameters

id | Numerical id of a channel in file (container). |

#### Returns

The quark key identifying presentation data field with number `id` .

### gwy_app_get_graph_key_for_id ()

    GQuark
    gwy_app_get_graph_key_for_id (gint id);

Calculates graph model quark identifier from its id.

#### Parameters

id | Numerical id of a graph in file (container). |

#### Returns

The quark key identifying graph model with number `id` .

Since: 2.7

### gwy_app_get_spectra_key_for_id ()

    GQuark
    gwy_app_get_spectra_key_for_id (gint id);

Calculates spectra quark identifier from its id.

#### Parameters

id | Numerical id of a spectra set in file (container). |

#### Returns

The quark key identifying spectra with number `id` .

Since: 2.7

### gwy_app_get_brick_key_for_id ()

    GQuark
    gwy_app_get_brick_key_for_id (gint id);

Calculates data brick quark identifier from its id.

#### Parameters

id | Numerical id of a data brick in file (container). |

#### Returns

The quark key identifying data brick with number `id` .

Since: 2.32

### gwy_app_get_surface_key_for_id ()

    GQuark
    gwy_app_get_surface_key_for_id (gint id);

Calculates XYZ surface quark identifier from its id.

#### Parameters

id | Numerical id of an XYZ surface in file (container). |

#### Returns

The quark key identifying XYZ surface with number `id` .

Since: 2.45

### gwy_app_get_lawn_key_for_id ()

    GQuark
    gwy_app_get_lawn_key_for_id (gint id);

Calculates GwyLawn curve map quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_get_data_title_key_for_id ()

    GQuark
    gwy_app_get_data_title_key_for_id (gint id);

Calculates data field title quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying string title of image with number `id` .

Since: 2.43

### gwy_app_get_data_base_key_for_id ()

    GQuark
    gwy_app_get_data_base_key_for_id (gint id);

Calculates data field base visualisation quark identifier from its id.

This is the common prefix for range and palette key. It is not useful alone because it is only prefix.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying base string prefix of image with number `id` .

Since: 2.59

### gwy_app_get_data_range_type_key_for_id ()

    GQuark
    gwy_app_get_data_range_type_key_for_id
                                   (gint id);

Calculates data field range type quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying GwyLayerBasicRangeType false colour mapping type of image with number `id` .

Since: 2.43

### gwy_app_get_data_range_min_key_for_id ()

    GQuark
    gwy_app_get_data_range_min_key_for_id (gint id);

Calculates data field fixed range minimum quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying floating fixed false colour range minimum of image with number `id` .

Since: 2.43

### gwy_app_get_data_range_max_key_for_id ()

    GQuark
    gwy_app_get_data_range_max_key_for_id (gint id);

Calculates data field fixed range maximum quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying floating fixed false colour range maximum of image with number `id` .

Since: 2.43

### gwy_app_get_data_palette_key_for_id ()

    GQuark
    gwy_app_get_data_palette_key_for_id (gint id);

Calculates data field palette quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying string name palette of image with number `id` .

Since: 2.43

### gwy_app_get_data_meta_key_for_id ()

    GQuark
    gwy_app_get_data_meta_key_for_id (gint id);

Calculates data field metadata quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying metadata container of image with number `id` .

Since: 2.43

### gwy_app_get_data_real_square_key_for_id ()

    GQuark
    gwy_app_get_data_real_square_key_for_id
                                   (gint id);

Calculates data field real-square quark identifier from its id.

#### Parameters

id | Numerical id of a image in file (container). |

#### Returns

The quark key identifying boolean controlling real-square setting of image with number `id` .

Since: 2.60

### gwy_app_get_brick_title_key_for_id ()

    GQuark
    gwy_app_get_brick_title_key_for_id (gint id);

Calculates data brick title quark identifier from its id.

#### Parameters

id | Numerical id of a data brick in file (container). |

#### Returns

The quark key identifying string title of data brick with number `id` .

Since: 2.43

### gwy_app_get_brick_preview_key_for_id ()

    GQuark
    gwy_app_get_brick_preview_key_for_id (gint id);

Calculates data brick preview quark identifier from its id.

#### Parameters

id | Numerical id of a data brick in file (container). |

#### Returns

The quark key identifying preview data field of data brick with number `id` .

Since: 2.43

### gwy_app_get_brick_palette_key_for_id ()

    GQuark
    gwy_app_get_brick_palette_key_for_id (gint id);

Calculates data brick palette quark identifier from its id.

#### Parameters

id | Numerical id of a data brick in file (container). |

#### Returns

The quark key identifying string name palette of data brick with number `id` .

Since: 2.43

### gwy_app_get_brick_meta_key_for_id ()

    GQuark
    gwy_app_get_brick_meta_key_for_id (gint id);

Calculates data brick title quark identifier from its id.

#### Parameters

id | Numerical id of a data brick in file (container). |

#### Returns

The quark key identifying metadata container of data brick with number `id` .

Since: 2.43

### gwy_app_get_surface_title_key_for_id ()

    GQuark
    gwy_app_get_surface_title_key_for_id (gint id);

Calculates data surface title quark identifier from its id.

#### Parameters

id | Numerical id of a data surface in file (container). |

#### Returns

The quark key identifying string title of data surface with number `id` .

Since: 2.45

### gwy_app_get_surface_palette_key_for_id ()

    GQuark
    gwy_app_get_surface_palette_key_for_id
                                   (gint id);

Calculates XYZ surface palette quark identifier from its id.

#### Parameters

id | Numerical id of an XYZ surface in file (container). |

#### Returns

The quark key identifying string name palette of XYZ surface with number `id` .

Since: 2.45

### gwy_app_get_surface_meta_key_for_id ()

    GQuark
    gwy_app_get_surface_meta_key_for_id (gint id);

Calculates XYZ surface title quark identifier from its id.

#### Parameters

id | Numerical id of an XYZ surface in file (container). |

#### Returns

The quark key identifying metadata container of XYZ surface with number `id` .

Since: 2.45

### gwy_app_get_surface_preview_key_for_id ()

    GQuark
    gwy_app_get_surface_preview_key_for_id
                                   (gint id);

Calculates XYZ surface preview quark identifier from its id.

#### Parameters

id | Numerical id of an XYZ surface in file (container). |

#### Returns

The quark key identifying preview data field of XYZ surface with number `id` .

Since: 2.46

### gwy_app_get_lawn_title_key_for_id ()

    GQuark
    gwy_app_get_lawn_title_key_for_id (gint id);

Calculates GwyLawn curve map title quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying string title of GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_get_lawn_palette_key_for_id ()

    GQuark
    gwy_app_get_lawn_palette_key_for_id (gint id);

Calculates GwyLawn curve map palette quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying string name palette of GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_get_lawn_meta_key_for_id ()

    GQuark
    gwy_app_get_lawn_meta_key_for_id (gint id);

Calculates GwyLawn curve map title quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying metadata container of GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_get_lawn_preview_key_for_id ()

    GQuark
    gwy_app_get_lawn_preview_key_for_id (gint id);

Calculates GwyLawn curve map preview quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying preview data field of GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_get_lawn_real_square_key_for_id ()

    GQuark
    gwy_app_get_lawn_real_square_key_for_id
                                   (gint id);

Calculates GwyLawn curve map real-square quark identifier from its id.

#### Parameters

id | Numerical id of a GwyLawn curve map in file (container). |

#### Returns

The quark key identifying boolean controlling real-square setting of GwyLawn curve map with number `id` .

Since: 2.60

### gwy_app_set_data_field_title ()

    void
    gwy_app_set_data_field_title (GwyContainer *data,
                                  gint id,
                                  const gchar *name);

Sets channel title.

#### Parameters

data | A data container. |
id | The data channel id. |
name | The title to set. It can be `NULL` to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). |

### gwy_app_get_data_field_title ()

    gchar *
    gwy_app_get_data_field_title (GwyContainer *data,
                                  gint id);

Gets a data channel title.

This function should return a reasonable title for untitled channels, channels with old titles, channels with and without a file, etc.

#### Parameters

data | A data container. |
id | Data channel id. |

#### Returns

The channel title as a newly allocated string.

### gwy_app_set_brick_title ()

    void
    gwy_app_set_brick_title (GwyContainer *data,
                             gint id,
                             const gchar *name);

Sets volume data title.

#### Parameters

data | A data container. |
id | The volume data brick id. |
name | The title to set. It can be `NULL` to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). |

Since: 2.32

### gwy_app_get_brick_title ()

    gchar *
    gwy_app_get_brick_title (GwyContainer *data,
                             gint id);

Gets a volume data brick title.

#### Parameters

data | A data container. |
id | Volume data brick id. |

#### Returns

The brick title as a newly allocated string.

Since: 2.32

### gwy_app_set_surface_title ()

    void
    gwy_app_set_surface_title (GwyContainer *data,
                               gint id,
                               const gchar *name);

Sets XYZ surface data title.

#### Parameters

data | A data container. |
id | The XYZ surface data channel id. |
name | The title to set. It can be `NULL` to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). |

Since: 2.45

### gwy_app_get_surface_title ()

    gchar *
    gwy_app_get_surface_title (GwyContainer *data,
                               gint id);

Gets an XYZ surface data title.

#### Parameters

data | A data container. |
id | XYZ data surface id. |

#### Returns

The surface title as a newly allocated string.

Since: 2.45

### gwy_app_set_lawn_title ()

    void
    gwy_app_set_lawn_title (GwyContainer *data,
                            gint id,
                            const gchar *name);

Sets GwyLawn curve map data title.

#### Parameters

data | A data container. |
id | The GwyLawn curve map data channel id. |
name | The title to set. It can be `NULL` to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). |

Since: 2.60

### gwy_app_get_lawn_title ()

    gchar *
    gwy_app_get_lawn_title (GwyContainer *data,
                            gint id);

Gets a GwyLawn curve map data title.

#### Parameters

data | A data container. |
id | XYZ data lawn id. |

#### Returns

The lawn title as a newly allocated string.

Since: 2.60

### gwy_app_data_browser_show ()

    void
    gwy_app_data_browser_show (void);

Shows the data browser window.

If the window does not exist, it is created.

### gwy_app_data_browser_restore ()

    void
    gwy_app_data_browser_restore (void);

Restores the data browser window.

The data browser window is always created (if it does not exist). If it should be visible according to settings, is shown at the saved position. Otherwise it is kept hidden until `gwy_app_data_browser_show()`.

### gwy_app_data_browser_shut_down ()

    void
    gwy_app_data_browser_shut_down (void);

Releases data browser resources and saves its state.

### gwy_app_get_channel_thumbnail ()

    GdkPixbuf *
    gwy_app_get_channel_thumbnail (GwyContainer *data,
                                   gint id,
                                   gint max_width,
                                   gint max_height);

Creates a channel thumbnail.

#### Parameters

data | A data container. |
id | Data channel id. |
max_width | Maximum width of the created pixbuf, it must be at least 2. |
max_height | Maximum height of the created pixbuf, it must be at least 2. |

#### Returns

A newly created pixbuf with channel thumbnail. It keeps the aspect ratio of the data field while not exceeding `max_width` and `max_height` .

### gwy_app_get_graph_thumbnail ()

    GdkPixbuf *
    gwy_app_get_graph_thumbnail (GwyContainer *data,
                                 gint id,
                                 gint max_width,
                                 gint max_height);

Creates a graph thumbnail.

Note this function needs the GUI running (unlike the other thumbnail functions). It cannot be used in a console program.

#### Parameters

data | A data container. |
id | Graph model data id. |
max_width | Maximum width of the created pixbuf, it must be at least 2. |
max_height | Maximum height of the created pixbuf, it must be at least 2. |

#### Returns

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` .

Since: 2.45

### gwy_app_get_volume_thumbnail ()

    GdkPixbuf *
    gwy_app_get_volume_thumbnail (GwyContainer *data,
                                  gint id,
                                  gint max_width,
                                  gint max_height);

Creates a volume thumbnail.

#### Parameters

data | A data container. |
id | Volume data id. |
max_width | Maximum width of the created pixbuf, it must be at least 2. |
max_height | Maximum height of the created pixbuf, it must be at least 2. |

#### Returns

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` .

Since: 2.33

### gwy_app_get_xyz_thumbnail ()

    GdkPixbuf *
    gwy_app_get_xyz_thumbnail (GwyContainer *data,
                               gint id,
                               gint max_width,
                               gint max_height);

Creates an XYZ data thumbnail.

#### Parameters

data | A data container. |
id | XYZ surface data id. |
max_width | Maximum width of the created pixbuf, it must be at least 2. |
max_height | Maximum height of the created pixbuf, it must be at least 2. |

#### Returns

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` .

Since: 2.45

### gwy_app_get_curve_map_thumbnail ()

    GdkPixbuf *
    gwy_app_get_curve_map_thumbnail (GwyContainer *data,
                                     gint id,
                                     gint max_width,
                                     gint max_height);

Creates a curve map thumbnail.

#### Parameters

data | A data container. |
id | Volume data id. |
max_width | Maximum width of the created pixbuf, it must be at least 2. |
max_height | Maximum height of the created pixbuf, it must be at least 2. |

#### Returns

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` .

Since: 2.60

### gwy_app_data_browser_select_data_field ()

    void
    gwy_app_data_browser_select_data_field
                                   (GwyContainer *data,
                                    gint id);

Makes a data field (image) current in the data browser.

This function does not do what you might expect. Selecting a data object which is not displayed in any view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on visible data.

#### Parameters

data | The container to select. |
id | Number (id) of the data field in `data` to select. |

### gwy_app_data_browser_select_graph_model ()

    void
    gwy_app_data_browser_select_graph_model
                                   (GwyContainer *data,
                                    gint id);

Makes a graph model current in the data browser.

This function does not do what you might expect. Selecting a data object which is not displayed in any view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on visible data.

#### Parameters

data | The container to select. |
id | Number (id) of the graph model in `data` to select. |

### gwy_app_data_browser_select_surface ()

    void
    gwy_app_data_browser_select_surface (GwyContainer *data,
                                         gint id);

Makes a surface (XYZ data) current in the data browser.

This function does not do what you might expect. Selecting a data object which is not displayed in any view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on visible data.

#### Parameters

data | The container to select. |
id | Number (id) of the surface in `data` to select. |

Since: 2.61

### gwy_app_data_browser_select_brick ()

    void
    gwy_app_data_browser_select_brick (GwyContainer *data,
                                       gint id);

Makes a brick (volume data) current in the data browser.

This function does not do what you might expect. Selecting a data object which is not displayed in any view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on visible data.

#### Parameters

data | The container to select. |
id | Number (id) of the brick in `data` to select. |

Since: 2.61

### gwy_app_data_browser_select_lawn ()

    void
    gwy_app_data_browser_select_lawn (GwyContainer *data,
                                      gint id);

Makes a lawn (curve map) current in the data browser.

This function does not do what you might expect. Selecting a data object which is not displayed in any view makes it just possible to delete or duplicate in the data browser. Module functions can be only run on visible data.

#### Parameters

data | The container to select. |
id | Number (id) of the lawn in `data` to select. |

Since: 2.61

### gwy_app_data_browser_show_3d ()

    void
    gwy_app_data_browser_show_3d (GwyContainer *data,
                                  gint id);

Shows a 3D window displaying a channel.

If a 3D window of the specified channel already exists, it is just presented to the user. If it does not exist, it is created.

The caller must ensure 3D display is available, for example by checking `gwy_app_gl_is_ok()`.

#### Parameters

data | A data container. |
id | Channel id. |

### gwy_app_find_window_for_channel ()

    GtkWindow *
    gwy_app_find_window_for_channel (GwyContainer *data,
                                     gint id);

Finds the window displaying a data channel.

#### Parameters

data | A data container to find window for. |
id | Data channel id. It can be -1 to find any data window displaying a channel from `data` . |

#### Returns

The window if found, `NULL` if no data window displays the requested channel.

### gwy_app_find_window_for_graph ()

    GtkWindow *
    gwy_app_find_window_for_graph (GwyContainer *data,
                                   gint id);

Finds the window displaying a graph model.

#### Parameters

data | A data container to find window for. |
id | Graph model id. It can be -1 to find any graph window displaying a graph model from `data` . |

#### Returns

The window if found, `NULL` if no graph window displays the requested channel.

Since: 2.45

### gwy_app_find_window_for_volume ()

    GtkWindow *
    gwy_app_find_window_for_volume (GwyContainer *data,
                                    gint id);

Finds the window displaying given volume data.

#### Parameters

data | A data container to find window for. |
id | Volume data id. It can be -1 to find any data window displaying volume data from `data` . |

#### Returns

The window if found, `NULL` if no data window displays the requested volume data.

Since: 2.42

### gwy_app_find_window_for_xyz ()

    GtkWindow *
    gwy_app_find_window_for_xyz (GwyContainer *data,
                                 gint id);

Finds the window displaying given XYZ data.

#### Parameters

data | A data container to find window for. |
id | XYZ data id. It can be -1 to find any data window displaying XYZ data from `data` . |

#### Returns

The window if found, `NULL` if no data window displays the requested XYZ data.

Since: 2.45

### gwy_app_find_window_for_curve_map ()

    GtkWindow *
    gwy_app_find_window_for_curve_map (GwyContainer *data,
                                       gint id);

Finds the window displaying given curve map.

#### Parameters

data | A data container to find window for. |
id | curve map id. It can be -1 to find any data window displaying curve map from `data` . |

#### Returns

The window if found, `NULL` if no data window displays the requested curve map.

Since: 2.60

### gwy_app_data_browser_get_gui_enabled ()

    gboolean
    gwy_app_data_browser_get_gui_enabled (void);

Reports whether creation of windows by the data-browser is enabled.

#### Returns

`TRUE` if the data-browser is permitted to create windows, `FALSE` if it is not.

Since: 2.21

### gwy_app_data_browser_set_gui_enabled ()

    void
    gwy_app_data_browser_set_gui_enabled (gboolean setting);

Globally enables or disables creation of widgets by the data-browser.

By default, the data-browser creates windows for data objects automatically, for instance when reconstructing view of a loaded file, after a module function creates a new channel or graph or when it is explicitly asked so by `gwy_app_data_browser_show_3d()`. Non-GUI applications that run module functions usually wish to disable GUI.

If GUI is disabled the data browser never creates windows showing data objects and also `gwy_app_data_browser_show()` becomes no-op.

Disabling GUI after widgets have been already created is a bad idea. Hence you should do so before loading files or calling module functions.

#### Parameters

setting | `TRUE` to enable creation of widgets by the data-browser, `FALSE` to disable it. |

Since: 2.21

## Types and Values

### enum GwyAppWhat

Types of current objects that can be requested with `gwy_app_data_browser_get_current()`.

#### Members

GWY_APP_CONTAINER | Data container (corresponds to files). |
GWY_APP_DATA_VIEW | Data view widget (shows a channel). |
GWY_APP_GRAPH | Graph widget (shows a graph model). |
GWY_APP_DATA_FIELD | Data field (image). |
GWY_APP_DATA_FIELD_KEY | Quark corresponding to the data field (image). |
GWY_APP_DATA_FIELD_ID | Number (id) of the data field (image) in its container. |
GWY_APP_MASK_FIELD | Mask data field. |
GWY_APP_MASK_FIELD_KEY | Quark corresponding to the mask field. |
GWY_APP_SHOW_FIELD | Presentation data field. |
GWY_APP_SHOW_FIELD_KEY | Quark corresponding to the presentation field. |
GWY_APP_GRAPH_MODEL | Graph model. |
GWY_APP_GRAPH_MODEL_KEY | Quark corresponding to the graph model. |
GWY_APP_GRAPH_MODEL_ID | Number (id) of the graph model in its container. |
GWY_APP_SPECTRA | Single point spectra. (Since 2.7) |
GWY_APP_SPECTRA_KEY | Quark corresponding to the single point spectra. (Since 2.7) |
GWY_APP_SPECTRA_ID | Number (id) of the the single point spectra in its container. (Since 2.7) |
GWY_APP_VOLUME_VIEW | Data view widget (shows preview of volume data) (Since 2.32). |
GWY_APP_BRICK | Data brick (volume data) (Since 2.32). |
GWY_APP_BRICK_KEY | Quark corresponding to the data brick (Since 2.32). |
GWY_APP_BRICK_ID | Number (id) of the the data brick in its container (Since 2.32). |
GWY_APP_CONTAINER_ID | Numeric id of data container (Since 2.41). |
GWY_APP_XYZ_VIEW | Data view widget (shows preview of surface XYZ data) (Since 2.45). |
GWY_APP_SURFACE | Surface data (XYZ) (Since 2.45). |
GWY_APP_SURFACE_KEY | Quark corresponding to the surface data (Since 2.45). |
GWY_APP_SURFACE_ID | Number (id) of the the surface data in its container (Since 2.45). |
GWY_APP_PAGE | Currently selected data browser page as a GwyAppPage (Since 2.45). |
GWY_APP_LAWN | Lawn (curve map) (Since 2.60). |
GWY_APP_LAWN_KEY | Quark corresponding to the curve map (Since 2.60). |
GWY_APP_LAWN_ID | Number (id) of the lawn (curve map) in its container (Since 2.60). |
GWY_APP_CURVE_MAP_VIEW | Data view widget (shows preview of curve map lawn data) (Since 2.60). |

### enum GwyAppPage

Data browser page, corresponding to one of possible data types.

#### Members

GWY_PAGE_NOPAGE | No page. This value is returned when no data are active in the browser. |
GWY_PAGE_CHANNELS | Channel (image data). |
GWY_PAGE_GRAPHS | Graph. |
GWY_PAGE_SPECTRA | Single point spectra. |
GWY_PAGE_VOLUMES | Volume data. |
GWY_PAGE_XYZS | XYZ data. |
GWY_PAGE_CURVE_MAPS | Curve map data. (Since 2.60) |

Since: 2.45

### enum GwyDataItem

Type of auxiliary channel data.

Not all auxiliary data types are valid for all primary data types. See individual functions such as `gwy_app_sync_data_items()` or `gwy_app_sync_volume_items()` for specification which items can be used with them.

#### Members

GWY_DATA_ITEM_GRADIENT | Color gradient. |
GWY_DATA_ITEM_PALETTE | An alias of `GWY_DATA_ITEM_GRADIENT` . |
GWY_DATA_ITEM_MASK_COLOR | Mask color components. |
GWY_DATA_ITEM_TITLE | Channel title. |
GWY_DATA_ITEM_RANGE | Range type and range boundaries. |
GWY_DATA_ITEM_RANGE_TYPE | Range type. |
GWY_DATA_ITEM_REAL_SQUARE | Physical/pixel aspect ratio mode. |
GWY_DATA_ITEM_SELECTIONS | Data selections. |
GWY_DATA_ITEM_META | Metadata. |
GWY_DATA_ITEM_CALDATA | Calibration and uncertainty data. (Since 2.23) |
GWY_DATA_ITEM_PREVIEW | Volume, XYZ or curve map data preview. (Since 2.51) |

### enum GwyVisibilityResetType

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.

#### Members

GWY_VISIBILITY_RESET_DEFAULT | Restore visibilities from container and if nothing would be visible, make an arbitrary data object visible. |
GWY_VISIBILITY_RESET_RESTORE | Restore visibilities from container. |
GWY_VISIBILITY_RESET_SHOW_ALL | Show all data objects. |
GWY_VISIBILITY_RESET_HIDE_ALL | Hide all data objects. This normally makes the file inaccessible. |

### enum GwyDataWatchEventType

Type of event reported to GwyAppDataWatchFunc watcher functions.

#### Members

GWY_DATA_WATCH_EVENT_ADDED | A new data object has appeared. |
GWY_DATA_WATCH_EVENT_CHANGED | A data object has changed. |
GWY_DATA_WATCH_EVENT_REMOVED | A data object has been removed. |

Since: 2.21