Module gwy
[hide private]
[frames] | no frames]

Module gwy

source code

Classes [hide private]
Axis
Brick
Three-dimensional data representation
ColorAxis
ColorButton
Container
A container with items identified by a GQuark
Curve
DataField
Two-dimensional data representation
DataLine
One-dimensional data representation
DataView
DataViewLayer
DataWindow
Graph
GraphArea
GraphCorner
GraphCurveModel
GraphCurves
GraphData
GraphLabel
GraphModel
GraphWindow
Inventory
Ordered item inventory, indexed by both name and position.
InventoryStore
Lawn
Three-dimensional data representation
MarkerBox
HMarkerBox
NullStore
PixmapLayer
LayerMask
LayerBasic
PlainTool
Resource
Built-in and/or user supplied application resources
NLFitPreset
Gradient
A map from numbers to RGBA colors
GLMaterial
OpenGL material representation
CDLine
ResourceEditor
Ruler
HRuler
SIUnit
SI unit representation, physical quantitiy formatting
SciText
Selection
Data selection base class
SelectionGraphArea
SelectionGraphLine
SelectionGraphPoint
SelectionGraphZoom
SensitivityGroup
Shader
ShapeFitPreset
Spectra
Collection of dataline representing point spectra.
Statusbar
StringList
A string list object wrapper
Surface
General two-dimensional data
VRuler
VectorLayer
XY
Representation of Cartesian coordinates in plane.
XYZ
Representation of Cartesian coordinates in space.
RGBA
Bit depth independet RGBA colors
AppDataId
Auxiliary structure representing one data item in an open file.
SIValueFormat
Physical quantitiy formatting
Peaks
Graph peak analyser
Spline
SIUnitFormatStyle
Physical quantity formatting style.
NLFitParamFlags
Type of fitting parameter properties.
PercentileInterpolationType
Type of interpolation for percentile calculation.
ExprError
Error codes returned by expression parsing and execution.
RawDataType
Types of raw data.
ByteOrder
Type of byte order.
MergeType
Mask merge type (namely used in grain processing).
MaskingType
Mask handling in procedures that can apply masking.
WatershedStateType
PlaneSymmetry
Plane symmetry types for rotation correction.
Orientation
Orientation type.
TransformDirection
Transform (namely integral transform) direction.
DataFieldCached
Cached data field quantity type.
ComputationStateType
Common iterative computation iterator state type.
DWTType
DWTDenoiseType
InterpolationType
Interpolation types.
PlaneFitQuantity
Local plane fitting quantity to request from DataField.area_fit_local_planes() and similar functions.
WindowingType
Frequency windowing type.
TipType
Type of tip shape presets.
TipParamType
Type of tip model preset parameter.
CorrelationType
CorrSearchType
Type of correlation search output.
GrainQuantity
Grain quantity to request from DataField.grains_get_distribution() and similar functions.
DataCompatibilityFlags
Data line, field, brick and lawn compatibility flags.
LineStatQuantity
Line statistical quantities to be requested with DataField.area_get_line_stats().
ExteriorType
Methods to handle pixels outside data.
DistanceTransformType
Type of distance transform.
MinMaxFilterType
Type of operation based on morphological filters with flat structuring elements.
RotateResizeType
Type of rotated data field size determination method.
AffineScalingType
Type of lattice vector scaling in affine transform preparation.
BrickTransposeType
Type of volume data transposition.
MFMProbeType
Type of probe for calculation of force in magnetic field microscopy.
MFMComponentType
Type of field component calculated in magnetic field microscopy.
MFMGradientType
PeakBackgroundType
Type of background available in graph peak analysers.
PeakOrderType
Type of peak ordering by in the graph peak analyser results.
PeakQuantity
Type of characteristics graph peak analysers can provide.
RenderingTarget
Type of target where selections can be rendered.
AxisScaleFormat
Labeled axis tick mark format.
UnitsPlacement
Units placement on a Ruler.
HScaleStyle
Options controlling gwy_table_attach_adjbar() and gwy_table_attach_hscale() behaviour.
GraphStatusType
GraphGridType
GraphPointType
GraphCurveType
Graph curve plotting type.
GraphLabelPosition
GraphModelExportStyle
Graph ASCII export style.
LayerBasicRangeType
Types of color gradient mapping in LayerBasic.
CurveType
Curve drawing type in Curve.
CurveChannel
MarkerOperationType
MarkerBox operation type (for validation).
DataViewLayerType
DataView layer identification.
TicksStyle
Axis ticks style (used in ColorAxis).
FileOperationType
File type function file operations (capabilities).
ToolSwitchEvent
RunType
Module function run-modes.
ModuleFileError
Error codes returned by file module operations.
ModuleError
Type of module loading and registration error.
AppWhat
Types of current objects that can be requested with gwy_app_data_browser_get_current().
AppPage
Data browser page, corresponding to one of possible data types.
DataItem
Type of auxiliary channel data.
VisibilityResetType
Data object visibility reset type.
DataWatchEventType
Type of event reported to AppDataWatchFunc watcher functions.
TextHeaderError
Error codes returned by text header parsing.
PreviewSurfaceFlags
Type of behaviour modifying flags that can be passed to gwy_preview_surface_to_datafield().
PlainToolChanged
The type of pending changes that accumulated during tool inactivity.
HoldSelectionFlags
Flags controlling the selection holding behaviour of tools.
HelpFlags
Flags controlling help setup and behaviour.
AppLoggingFlags
Flags controlling where program messages are written.
MenuSensFlags
Global application sensitivity flags.
AppSettingsError
Error codes returned by application settings functions.
DataError
Type of data validation errors.
DataValidateFlags
Flags controlling gwy_data_validate() behaviour.
CWT2DWaveletType
Functions [hide private]
 
gwy_3d_view_class_disable_axis_drawing(disable)
Globally disables drawing of 3D view axes.
source code
 
gwy_3d_window_class_get_tooltips()
Gets the tooltips object used for adding tooltips to 3D window parts.
source code
 
gwy_3d_window_class_set_tooltips(tips)
Sets the tooltips object to use for adding tooltips to 3D window parts.
source code
 
gwy_app_add_graph_or_curves(gmodel, data, target_graph, colorstep)
Puts the curves of a graph to another graph if possible, or adds the graph as new.
source code
 
gwy_app_add_main_accel_group(window)
Adds main (global) application accelerator group to a window.
source code
 
gwy_app_build_curve_map_menu(accel_group)
Constructs the application Curve Maps menu.
source code
 
gwy_app_build_graph_menu(accel_group)
Constructs the application Graph menu.
source code
 
gwy_app_build_process_menu(accel_group)
Constructs the application Data Process menu.
source code
 
gwy_app_build_volume_menu(accel_group)
Constructs the application Volume Data menu.
source code
 
gwy_app_build_xyz_menu(accel_group)
Constructs the application XYZ Data menu.
source code
 
gwy_app_channel_log_add_proc(data, previd, newid)
Adds an entry to the log of the current data processing operations for a channel.
source code
 
gwy_app_channel_mask_of_nans(dfield, removebad)
Creates a mask corresponding to not-a-number and infinite values in a data field.
source code
 
gwy_app_channel_remove_bad_data(dfield, mfield)
Replaces bad data points with some neutral values.
source code
 
gwy_app_channel_title_fall_back(data, id)
Adds a channel title based on data field units.
source code
 
gwy_app_current_tool()
Obtains the currently active tool object.
source code
 
gwy_app_current_tool_name()
Obtains the name of currently active tool.
source code
 
gwy_app_curve_map_log_add_curve_map(data, previd, newid)
Adds an entry to the log of the current Lawn curve map processing operations for Lawn curve map.
source code
 
gwy_app_data_browser_add(data)
Adds a data container to the application data browser.
source code
 
gwy_app_data_browser_add_brick(brick, preview, data, showit)
Adds a volume data brick to a data container.
source code
 
gwy_app_data_browser_add_data_field(dfield, data, showit)
Adds a data field to a data container.
source code
 
gwy_app_data_browser_add_graph_model(gmodel, data, showit)
Adds a graph model to a data container.
source code
 
gwy_app_data_browser_add_lawn(lawn, preview, data, showit)
Adds Lawn curve map data to a data container.
source code
 
gwy_app_data_browser_add_spectra(spectra, data, showit)
Adds a spectra object to a data container.
source code
 
gwy_app_data_browser_add_surface(surface, data, showit)
Adds XYZ surface data to a data container.
source code
 
gwy_app_data_browser_copy_channel(source, id, dest)
Copies a channel including all auxiliary data.
source code
 
gwy_app_data_browser_copy_curve_map(source, id, dest)
Copies Lawn curve map data including all auxiliary data.
source code
 
gwy_app_data_browser_copy_volume(source, id, dest)
Copies volume brick data including all auxiliary data.
source code
 
gwy_app_data_browser_copy_xyz(source, id, dest)
Copies XYZ surface data including all auxiliary data.
source code
 
gwy_app_data_browser_find_data_by_title(data, titleglob)
Gets the list of all channels in a data container whose titles match the specified pattern.
source code
 
gwy_app_data_browser_find_graphs_by_title(data, titleglob)
Gets the list of all graphs in a data container whose titles match the specified pattern.
source code
 
gwy_app_data_browser_find_spectra_by_title(data, titleglob)
Gets the list of all spectra in a data container whose titles match the specified pattern.
source code
 
gwy_app_data_browser_find_volume_by_title(data, titleglob)
Gets the list of all volume data in a data container whose titles match the specified pattern.
source code
 
gwy_app_data_browser_find_xyz_by_title(data, titleglob)
Gets the list of all XYZ data in a data container whose titles match the specified pattern.
source code
 
gwy_app_data_browser_foreach(function, user_data)
Calls a function for each data container managed by data browser.
source code
 
gwy_app_data_browser_get(number)
Gets the data corresponding to a numerical identifier.
source code
 
gwy_app_data_browser_get_containers()
Get list of containers of current data browser.
source code
 
gwy_app_data_browser_get_current(obj_type)
Get current data item of given type.
source code
 
gwy_app_data_browser_get_data_ids(container)
Gets the list of all channels in a data container (presumably representing a file).
source code
 
gwy_app_data_browser_get_graph_ids(container)
Gets the list of all graphs in a data container (presumably representing a file).
source code
 
gwy_app_data_browser_get_gui_enabled()
Reports whether creation of windows by the data-browser is enabled.
source code
 
gwy_app_data_browser_get_keep_invisible(data)
Gets data browser behaviour for inaccessible data.
source code
 
gwy_app_data_browser_get_number(data)
Gets the numerical identifier of data.
source code
 
gwy_app_data_browser_get_spectra_ids(container)
Gets the list of all spectra in a data container (presumably representing a file).
source code
 
gwy_app_data_browser_get_volume_ids(container)
Gets the list of all volume data in a data container (presumably representing a file).
source code
 
gwy_app_data_browser_get_xyz_ids(container)
Gets the list of all XYZ data in a data container (presumably representing a file).
source code
 
gwy_app_data_browser_merge(data)
Merges the data from a data container to the current one.
source code
 
gwy_app_data_browser_remove(data)
Removed a data container from the application data browser.
source code
 
gwy_app_data_browser_remove_channel_watch(id)
Removes a channel watch function.
source code
 
gwy_app_data_browser_remove_curve_map_watch(id)
Removes a curve map data watch function.
source code
 
gwy_app_data_browser_remove_graph_watch(id)
Removes a graph watch function.
source code
 
gwy_app_data_browser_remove_volume_watch(id)
Removes a volume data watch function.
source code
 
gwy_app_data_browser_remove_xyz_watch(id)
Removes an XYZ data watch function.
source code
 
gwy_app_data_browser_reset_visibility(data, reset_type)
Resets visibility of all data objects in a container.
source code
 
gwy_app_data_browser_restore()
Restores the data browser window.
source code
 
gwy_app_data_browser_select_brick(data, id)
Makes a brick (volume data) current in the data browser.
source code
 
gwy_app_data_browser_select_curve_map(data_view)
Switches application data browser to display container of data and selects data_view's curve_map data in the graph list.
source code
 
gwy_app_data_browser_select_data_field(data, id)
Makes a data field (image) current in the data browser.
source code
 
gwy_app_data_browser_select_data_view(data_view)
Switches application data browser to display container of data_view's data and selects data_view's data in the channel list.
source code
 
gwy_app_data_browser_select_graph(graph)
Switches application data browser to display container of graph's data and selects graph's data in the graph list.
source code
 
gwy_app_data_browser_select_graph_model(data, id)
Makes a graph model current in the data browser.
source code
 
gwy_app_data_browser_select_lawn(data, id)
Makes a lawn (curve map) current in the data browser.
source code
 
gwy_app_data_browser_select_spectra(spectra)
Switches application data browser to display container of spectra's data and selects spectra's data in the graph list.
source code
 
gwy_app_data_browser_select_surface(data, id)
Makes a surface (XYZ data) current in the data browser.
source code
 
gwy_app_data_browser_select_volume(data_view)
Switches application data browser to display container of data and selects data_view's volume data in the graph list.
source code
 
gwy_app_data_browser_select_xyz(data_view)
Switches application data browser to display container of data and selects data_view's XYZ data in the graph list.
source code
 
gwy_app_data_browser_set_gui_enabled(setting)
Globally enables or disables creation of widgets by the data-browser.
source code
 
gwy_app_data_browser_set_keep_invisible(data, keep_invisible)
Sets data browser behaviour for inaccessible data.
source code
 
gwy_app_data_browser_show()
Shows the data browser window.
source code
 
gwy_app_data_browser_show_3d(data, id)
Shows a 3D window displaying a channel.
source code
 
gwy_app_data_browser_shut_down()
Releases data browser resources and saves its state.
source code
 
gwy_app_data_clear_selections(data, id)
Clears all selections associated with a data channel.
source code
 
gwy_app_data_view_change_mask_color(data_view)
Runs mask color selector on a data view.
source code
 
gwy_app_file_close()
Closes the current file file (very high-level app function).
source code
 
gwy_app_file_confirm_overwrite(chooser)
Asks for file overwrite for a file save chooser.
source code
 
gwy_app_file_load(filename_utf8, name)
Loads a file into application (a high-level function).
source code
 
gwy_app_file_merge()
Merges a user-selected file (very high-level app function).
source code
 
gwy_app_file_open()
Opens a user-selected file (very high-level app function).
source code
 
gwy_app_file_save()
Saves current data to a file (very high-level app function).
source code
 
gwy_app_file_save_as()
Saves current data to a user-selected file (very high-level app function).
source code
 
gwy_app_file_write(data, filename_utf8, name)
Writes container to a file (a high-level function).
source code
 
gwy_app_find_window_for_channel(data, id)
Finds the window displaying a data channel.
source code
 
gwy_app_find_window_for_curve_map(data, id)
Finds the window displaying given curve map.
source code
 
gwy_app_find_window_for_graph(data, id)
Finds the window displaying a graph model.
source code
 
gwy_app_find_window_for_volume(data, id)
Finds the window displaying given volume data.
source code
 
gwy_app_find_window_for_xyz(data, id)
Finds the window displaying given XYZ data.
source code
 
gwy_app_get_brick_key_for_id(id)
Calculates data brick quark identifier from its id.
source code
 
gwy_app_get_brick_meta_key_for_id(id)
Calculates data brick title quark identifier from its id.
source code
 
gwy_app_get_brick_palette_key_for_id(id)
Calculates data brick palette quark identifier from its id.
source code
 
gwy_app_get_brick_preview_key_for_id(id)
Calculates data brick preview quark identifier from its id.
source code
 
gwy_app_get_brick_title(data, id)
Gets a volume data brick title.
source code
 
gwy_app_get_brick_title_key_for_id(id)
Calculates data brick title quark identifier from its id.
source code
 
gwy_app_get_channel_thumbnail(data, id, max_width, max_height)
Creates a channel thumbnail.
source code
 
gwy_app_get_current_directory()
Returns what the app uses as `current directory'.
source code
 
gwy_app_get_curve_map_thumbnail(data, id, max_width, max_height)
Creates a curve map thumbnail.
source code
 
gwy_app_get_data_base_key_for_id(id)
Calculates data field base visualisation quark identifier from its id.
source code
 
gwy_app_get_data_field_title(data, id)
Gets a data channel title.
source code
 
gwy_app_get_data_key_for_id(id)
Calculates data field quark identifier from its id.
source code
 
gwy_app_get_data_meta_key_for_id(id)
Calculates data field metadata quark identifier from its id.
source code
 
gwy_app_get_data_palette_key_for_id(id)
Calculates data field palette quark identifier from its id.
source code
 
gwy_app_get_data_range_max_key_for_id(id)
Calculates data field fixed range maximum quark identifier from its id.
source code
 
gwy_app_get_data_range_min_key_for_id(id)
Calculates data field fixed range minimum quark identifier from its id.
source code
 
gwy_app_get_data_range_type_key_for_id(id)
Calculates data field range type quark identifier from its id.
source code
 
gwy_app_get_data_real_square_key_for_id(id)
Calculates data field real-square quark identifier from its id.
source code
 
gwy_app_get_data_title_key_for_id(id)
Calculates data field title quark identifier from its id.
source code
 
gwy_app_get_graph_key_for_id(id)
Calculates graph model quark identifier from its id.
source code
 
gwy_app_get_graph_thumbnail(data, id, max_width, max_height)
Creates a graph thumbnail.
source code
 
gwy_app_get_lawn_key_for_id(id)
Calculates Lawn curve map quark identifier from its id.
source code
 
gwy_app_get_lawn_meta_key_for_id(id)
Calculates Lawn curve map title quark identifier from its id.
source code
 
gwy_app_get_lawn_palette_key_for_id(id)
Calculates Lawn curve map palette quark identifier from its id.
source code
 
gwy_app_get_lawn_preview_key_for_id(id)
Calculates Lawn curve map preview quark identifier from its id.
source code
 
gwy_app_get_lawn_real_square_key_for_id(id)
Calculates Lawn curve map real-square quark identifier from its id.
source code
 
gwy_app_get_lawn_title(data, id)
Gets a Lawn curve map data title.
source code
 
gwy_app_get_lawn_title_key_for_id(id)
Calculates Lawn curve map title quark identifier from its id.
source code
 
gwy_app_get_log_text_buffer()
Obtains a text buffer with program log messages.
source code
 
gwy_app_get_mask_key_for_id(id)
Calculates mask field quark identifier from its id.
source code
 
gwy_app_get_show_key_for_id(id)
Calculates presentation field quark identifier from its id.
source code
 
gwy_app_get_spectra_key_for_id(id)
Calculates spectra quark identifier from its id.
source code
 
gwy_app_get_surface_key_for_id(id)
Calculates XYZ surface quark identifier from its id.
source code
 
gwy_app_get_surface_meta_key_for_id(id)
Calculates XYZ surface title quark identifier from its id.
source code
 
gwy_app_get_surface_palette_key_for_id(id)
Calculates XYZ surface palette quark identifier from its id.
source code
 
gwy_app_get_surface_preview_key_for_id(id)
Calculates XYZ surface preview quark identifier from its id.
source code
 
gwy_app_get_surface_title(data, id)
Gets an XYZ surface data title.
source code
 
gwy_app_get_surface_title_key_for_id(id)
Calculates data surface title quark identifier from its id.
source code
 
gwy_app_get_tooltips()
Gets the application-wide tooltips instance.
source code
 
gwy_app_get_volume_thumbnail(data, id, max_width, max_height)
Creates a volume thumbnail.
source code
 
gwy_app_get_xyz_thumbnail(data, id, max_width, max_height)
Creates an XYZ data thumbnail.
source code
 
gwy_app_gl_is_ok()
Returns OpenGL availability.
source code
 
gwy_app_gl_material_editor()
Creates or presents OpenGL material editor.
source code
 
gwy_app_gradient_editor()
Creates or presents color gradient editor.
source code
 
gwy_app_init_i18n()
Initializes internationalization.
source code
 
gwy_app_init_widget_styles()
Sets up style properties for special Gwyddion widgets.
source code
 
gwy_app_log_browser_for_channel(data, id)
Shows a simple log browser for a channel.
source code
 
gwy_app_log_browser_for_curve_map(data, id)
Shows a simple log browser for Lawn curve map.
source code
 
gwy_app_log_browser_for_volume(data, id)
Shows a simple log browser for volume data.
source code
 
gwy_app_log_browser_for_xyz(data, id)
Shows a simple log browser for XYZ data.
source code
 
gwy_app_main_window_get()
Returns Gwyddion main application window (toolbox).
source code
 
gwy_app_main_window_set(window)
Sets the main application window.
source code
 
gwy_app_menu_recent_files_get()
Gets the application recent files menu.
source code
 
gwy_app_metadata_browser_for_channel(data, id)
Shows a simple metadata browser for a channel.
source code
 
gwy_app_metadata_browser_for_curve_map(data, id)
Shows a simple metadata browser for curve map data.
source code
 
gwy_app_metadata_browser_for_volume(data, id)
Shows a simple metadata browser for volume data.
source code
 
gwy_app_metadata_browser_for_xyz(data, id)
Shows a simple metadata browser for XYZ data.
source code
 
gwy_app_process_func_save_use()
Saves application data processing function statistics.
source code
 
gwy_app_process_menu_add_run_last(menu)
Adds Re-show Last and Repeat Last items to application data process menu.
source code
 
gwy_app_quit()
Quits the application.
source code
 
gwy_app_recent_file_get_thumbnail(filename_utf8)
Gets thumbnail of a recently open file.
source code
 
gwy_app_recent_file_list_load(filename)
Loads list of recently open files from filename.
source code
 
gwy_app_recent_file_list_save(filename)
Saves list of recently open files to filename.
source code
 
gwy_app_recent_file_list_update(data, filename_utf8, filename_sys, hint)
Moves filename_utf8 to the first position in document history, possibly adding it if not present yet.
source code
 
gwy_app_restore_window_position(window, prefix, grow_only)
Restores a window position and/or size from settings.
source code
 
gwy_app_run_curve_map_func(name)
Runs a curve map processing function on the current data.
source code
 
gwy_app_run_curve_map_func_in_mode(name, run)
Runs a curve map processing function on current data in specified mode.
source code
 
gwy_app_run_graph_func(name)
Runs a graph function on the current graph.
source code
 
gwy_app_run_process_func(name)
Runs a data processing function on the current data.
source code
 
gwy_app_run_process_func_in_mode(name, run)
Runs a data processing function on current data in specified mode.
source code
 
gwy_app_run_volume_func(name)
Runs a volume data processing function on the current data.
source code
 
gwy_app_run_volume_func_in_mode(name, run)
Runs a volume data processing function on current data in specified mode.
source code
 
gwy_app_run_xyz_func(name)
Runs a XYZ data processing function on the current data.
source code
 
gwy_app_run_xyz_func_in_mode(name, run)
Runs a XYZ data processing function on current data in specified mode.
source code
 
gwy_app_save_window_position(window, prefix, position, size)
Saves position and/or size of a window to settings.
source code
 
gwy_app_sensitivity_add_widget(widget, mask)
Adds a widget to the application-wide widget sensitvity group.
source code
 
gwy_app_sensitivity_get_group()
Gets the application-wide widget sensitvity group.
source code
 
gwy_app_sensitivity_set_state(affected_mask, state)
Sets the state of application-wide widget sensitvity group.
source code
 
gwy_app_set_brick_title(data, id, name)
Sets volume data title.
source code
 
gwy_app_set_current_directory(directory)
Sets what the app should use as `current directory'.
source code
 
gwy_app_set_data_field_title(data, id, name)
Sets channel title.
source code
 
gwy_app_set_lawn_title(data, id, name)
Sets Lawn curve map data title.
source code
 
gwy_app_set_surface_title(data, id, name)
Sets XYZ surface data title.
source code
 
gwy_app_settings_create_config_dir()
Create gwyddion config directory.
source code
 
gwy_app_settings_error_quark()
Returns error domain for application settings operations.
source code
 
gwy_app_settings_get()
Gets the Gwyddion settings.
source code
 
gwy_app_settings_get_log_filename()
Returns a suitable log file name.
source code
 
gwy_app_settings_get_recent_file_list_filename()
Returns a suitable recent file list file name.
source code
 
gwy_app_settings_get_settings_filename()
Returns a suitable human-readable settings file name.
source code
 
gwy_app_settings_load(filename)
Loads settings file.
source code
 
gwy_app_settings_save(filename)
Saves the settings.
source code
 
gwy_app_setup_logging(flags)
Sets up Gwyddion GLib log handler.
source code
 
gwy_app_switch_tool(toolname)
Switches the current tool to given tool.
source code
 
gwy_app_sync_data_items(source, dest, from_id, to_id, delete_too, items)
Synchronizes auxiliary image data items between data containers.
source code
 
gwy_app_undo_checkpoint(container, keys)
Create a point in the undo history it is possible to return to.
source code
 
gwy_app_undo_container_remove(data, prefix)
Removes undo/redo information for a data container.
source code
 
gwy_app_undo_qcheckpoint(container, keys)
Create a point in the undo history it is possible to return to.
source code
 
gwy_app_undo_redo_container(data)
Performs undo on a data container.
source code
 
gwy_app_undo_undo_container(data)
Performs undo on a data container.
source code
 
gwy_app_volume_log_add_volume(data, previd, newid)
Adds an entry to the log of the current volume data processing operations for volume data.
source code
 
gwy_app_wait_cursor_finish(window)
Resets the cursor for a window.
source code
 
gwy_app_wait_cursor_start(window)
Changes the cursor for a window to indicate work.
source code
 
gwy_app_wait_finish()
Finishes waiting, closing the dialog.
source code
 
gwy_app_wait_get_enabled()
Reports whether progress reporting is globally enabled.
source code
 
gwy_app_wait_preview_data_field(dfield, data, id)
Helper function for progressive animated preview.
source code
 
gwy_app_wait_set_enabled(setting)
Globally enables or disables progress reporting.
source code
 
gwy_app_wait_set_fraction(fraction)
Sets the amount of progress the progress bar on the dialog displays.
source code
 
gwy_app_wait_set_message(message)
Sets the message shown on the progress dialog.
source code
 
gwy_app_wait_set_message_prefix(prefix)
Sets prefix for the messages shown in the progress dialog.
source code
 
gwy_app_wait_set_preview_widget(widget)
Sets the preview widget of a wait dialogue.
source code
 
gwy_app_wait_start(window, message)
Starts waiting for a window window, creating a dialog with a progress bar.
source code
 
gwy_app_wait_was_canceled()
Checks if a progress dialog was cancelled.
source code
 
gwy_app_xyz_log_add_xyz(data, previd, newid)
Adds an entry to the log of the current XYZ data processing operations for XYZ data.
source code
 
gwy_app_xyz_title_fall_back(data, id)
Adds a XYZ data title based on surface value units.
source code
 
gwy_canonicalize_angle(phi, positive, oriented)
Canonicalizes an angle to requested interval.
source code
 
gwy_canonicalize_path(path)
Canonicalizes a filesystem path.
source code
 
gwy_cdlines()
Gets inventory with all the critical dimension evaluators.
source code
 
gwy_check_box_get_value(checkbox)
Gets the flag value associated with a check box.
source code
 
gwy_color_axis_new_with_range(orientation, min, max)
Creates a new color axis.
source code
 
gwy_color_button_new_with_color(color)
Creates a new color button.
source code
 
gwy_color_selector_for_mask(dialog_title, color_button, container, prefix)
Creates and runs a color selector dialog for a mask.
source code
 
gwy_combo_box_graph_curve_new(gmodel, current)
Creates an enum combo box with curves from a graph model.
source code
 
gwy_combo_box_metric_unit_new(from_, to, unit, active)
Creates an enum combo box with SI power of 10 multiplies.
source code
 
gwy_combo_box_metric_unit_set_unit(combo, from_, to, unit)
Changes the unit selection displayed by a metric unit combo box.
source code
 
gwy_construct_grain_quantity_units(quantity, siunitxy, siunitz) source code
 
gwy_container_deserialize_from_text(text)
Restores a container from is text representation.
source code
 
gwy_create_dialog_preview_hbox(dialog, dataview, pack_end)
Creates the typical data processing dialog hbox with a preview.
source code
 
gwy_create_preview(data, id, size, have_mask)
Creates and sets up a preview widget for use in modules.
source code
 
gwy_create_preview_vector_layer(dataview, id, name, max_objects, editable)
Creates and sets up a vector layer for use in module previews.
source code
 
gwy_curve_map_func_current()
Obtains the name of currently running curve map processing function.
source code
 
gwy_curve_map_func_exists(name)
Checks whether a curve map processing function exists.
source code
 
gwy_curve_map_func_get_menu_path(name)
Returns the menu path of a curve map processing function.
source code
 
gwy_curve_map_func_get_run_types(name)
Returns run modes supported by a curve map processing function.
source code
 
gwy_curve_map_func_get_sensitivity_mask(name)
Gets menu sensititivy mask for a curve map processing function.
source code
 
gwy_curve_map_func_get_stock_id(name)
Gets stock icon id of a curve map processing function.
source code
 
gwy_curve_map_func_get_tooltip(name)
Gets tooltip for a curve map processing function.
source code
 
gwy_curve_map_func_run(name, data, run)
Runs a curve map processing function identified by name.
source code
 
gwy_cwt_wfunc_2d(scale, mval, xres, wtype) source code
 
gwy_data_chooser_new_channels()
Creates a data chooser for data channels.
source code
 
gwy_data_chooser_new_curve_maps()
Creates a data chooser for curve map data.
source code
 
gwy_data_chooser_new_graphs()
Creates a data chooser for graphs.
source code
 
gwy_data_chooser_new_volumes()
Creates a data chooser for volume data.
source code
 
gwy_data_chooser_new_xyzs()
Creates a data chooser for XYZ data.
source code
 
gwy_data_field_correlate_finalize(state)
Destroys a correlation iterator, freeing all resources.
source code
 
gwy_data_field_correlate_iteration(state)
Performs one iteration of correlation.
source code
 
gwy_data_field_crosscorrelate_finalize(state)
Destroys a cross-correlation iterator, freeing all resources.
source code
 
gwy_data_field_crosscorrelate_iteration(state)
Performs one iteration of cross-correlation.
source code
 
gwy_data_field_crosscorrelate_set_weights(state, type)
Sets the weight function to be used within iterative cross-correlation algorithm.
source code
 
gwy_data_field_fractal_cubecounting_dim(xresult, yresult)
Computes fractal dimension by cube counting method from log-log plot data.
source code
 
gwy_data_field_fractal_partitioning_dim(xresult, yresult)
Computes fractal dimension by partitioning method from log-log plot data.
source code
 
gwy_data_field_fractal_psdf_dim(xresult, yresult)
Computes fractal dimension by spectral density function method from log-log plot data.
source code
 
gwy_data_field_fractal_triangulation_dim(xresult, yresult)
Computes fractal dimension by triangulation method from log-log plot data.
source code
 
gwy_data_field_get_circular_area_size(radius)
Calculates an upper bound of the number of samples in a circular region.
source code
 
gwy_data_field_get_elliptic_area_size(width, height)
Calculates an upper bound of the number of samples in an elliptic region.
source code
 
gwy_data_field_grains_watershed_finalize(state)
Destroys a watershed iterator, freeing all resources.
source code
 
gwy_data_field_grains_watershed_iteration(state)
Performs one iteration of the watershed algorithm.
source code
 
gwy_data_field_hough_datafield_line_to_polar(px1, px2, py1, py2) source code
 
gwy_data_field_unrotate_find_corrections(derdist)
Finds rotation corrections.
source code
 
gwy_data_window_class_get_tooltips()
Gets the tooltips object used for adding tooltips to Data window parts.
source code
 
gwy_data_window_class_set_tooltips(tips)
Sets the tooltips object to use for adding tooltips to data window parts.
source code
 
gwy_dialog_prevent_delete_cb()
Returns True.
source code
 
gwy_draw_data_field_map_adaptive(data_field, z)
Maps ordinate values to interval [0,1] as gwy_pixbuf_draw_data_field_adaptive() would do.
source code
 
gwy_draw_type_init()
Makes libgwydraw types safe for deserialization and performs other initialization.
source code
 
gwy_dwt_set_coefficients(dline, type)
Fills resampled or nely allocated data line with wavelet coefficients.
source code
 
gwy_entities()
Returns a constant inventory with all available entities.
source code
 
gwy_entities_entity_to_utf8(entity)
Converts a single named entity entity to UTF-8 representation.
source code
 
gwy_entities_text_to_utf8(text)
Converts entities in a text to UTF-8.
source code
 
gwy_enum_combo_box_get_active(combo)
Gets the enum value corresponding to currently active combo box item.
source code
 
gwy_enum_combo_box_set_active(combo, active)
Sets the active combo box item by corresponding enum value.
source code
 
gwy_enum_combo_box_update_int(combo)
Convenience callback keeping an integer synchronized with selected enum combo box value.
source code
 
gwy_enum_sanitize_value(enumval, enum_type)
Makes sure an enum value is valid.
source code
 
gwy_expr_error_quark()
Returns error domain for expression parsin and evaluation.
source code
 
gwy_fd_curve_presets()
Gets inventory with all the FD curve presets.
source code
 
gwy_fft_find_nice_size(size)
Finds a nice-for-FFT array size.
source code
 
gwy_fft_window(data, windowing)
Multiplies data by given window.
source code
 
gwy_fft_window_data_field(dfield, orientation, windowing)
Performs windowing of a data field in given direction.
source code
 
gwy_file_abandon_contents(buffer, size)
Frees or unmmaps memory allocated by gwy_file_get_contents().
source code
 
gwy_file_channel_import_log_add(data, id, filetype, filename)
Logs the import of a channel from third-party file.
source code
 
gwy_file_curve_map_import_log_add(data, id, filetype, filename)
Logs the import of volume data from third-party file.
source code
 
gwy_file_detect(filename, only_name, operations)
Detects the type of a file.
source code
 
gwy_file_detect_with_score(filename, only_name, operations)
Detects the type of a file and gives the score.
source code
 
gwy_file_func_current()
Obtains the name of currently running file type function.
source code
 
gwy_file_func_exists(name)
Checks whether a file type function exists.
source code
 
gwy_file_func_get_description(name)
Gets file function description.
source code
 
gwy_file_func_get_is_detectable(name)
Returns if the file format is reasonably detectable.
source code
 
gwy_file_func_get_operations(name)
Returns operations supported by a file type function.
source code
 
gwy_file_func_run_detect(name, filename, only_name)
Runs a file type detection function identified by name.
source code
 
gwy_file_func_run_export(name, data, filename, mode)
Runs a file export function identified by name.
source code
 
gwy_file_func_run_load(name, filename, mode)
Runs a file load function identified by name.
source code
 
gwy_file_func_run_save(name, data, filename, mode)
Runs a file save function identified by name.
source code
 
gwy_file_func_set_is_detectable(name, is_detectable)
Sets the detectability status of a file format.
source code
 
gwy_file_get_filename_sys(data)
Gets the file name corresponding to a data container.
source code
 
gwy_file_load(filename, mode)
Loads a data file, autodetecting its type.
source code
 
gwy_file_save(data, filename, mode)
Saves a data file, deciding to save as what type from the file name.
source code
 
gwy_file_volume_import_log_add(data, id, filetype, filename)
Logs the import of volume data from third-party file.
source code
 
gwy_file_xyz_import_log_add(data, id, filetype, filename)
Logs the import of xyz data from third-party file.
source code
 
gwy_filename_ignore(filename_sys)
Checks whether file should be ignored.
source code
 
gwy_find_self_dir(dirname)
Finds a system Gwyddion directory.
source code
 
gwy_fopen(filename, mode)
A wrapper for the stdio fopen() function.
source code
 
gwy_func_use_get(functions, i)
Gets the n-th most function from a function statistics.
source code
 
gwy_func_use_get_filename(type)
Gets the (preferred) name for a file to store function use statistics to.
source code
 
gwy_get_grain_quantity_needs_same_units(quantity) source code
 
gwy_get_home_dir()
Returns home directory, or temporary directory as a fallback.
source code
 
gwy_get_user_dir()
Returns the directory where Gwyddion user settings and data should be stored.
source code
 
gwy_gl_material_selection_get_active(selection)
Gets the name of currently selected GL material of a selection button.
source code
 
gwy_gl_material_selection_new(active)
Creates a GL material selection button.
source code
 
gwy_gl_material_selection_set_active(selection, active)
Sets the currently selected GL material of a selection button.
source code
 
gwy_gl_material_tree_view_new(active)
Creates a tree view with GL material list.
source code
 
gwy_gl_material_tree_view_set_active(treeview, active)
Selects a GL material in a GL material list and scrolls to make it visible.
source code
 
gwy_gl_materials()
Gets inventory with all the GL materials.
source code
 
gwy_gl_materials_get_gl_material(name)
Convenience function to get a GL material from gwy_gl_materials() by name.
source code
 
gwy_gradient_selection_get_active(selection)
Gets the name of currently selected gradient of a selection button.
source code
 
gwy_gradient_selection_new(active)
Creates a gradient selection button.
source code
 
gwy_gradient_selection_set_active(selection, active)
Sets the currently selected gradient of a selection button.
source code
 
gwy_gradient_tree_view_new(active)
Creates a tree view with gradient list.
source code
 
gwy_gradient_tree_view_set_active(treeview, active)
Selects a gradient in a gradient list and scrolls to make it visible.
source code
 
gwy_gradients()
Gets inventory with all the gradients.
source code
 
gwy_gradients_get_gradient(name)
Convenience function to get a gradient from gwy_gradients() by name.
source code
 
gwy_graph_draw_line(drawable, gc, x_from, y_from, x_to, y_to, line_style, size, color)
Draws a line segment on a drawable.
source code
 
gwy_graph_draw_point(drawable, gc, x, y, type, size, color)
Draws a point on a drawable.
source code
 
gwy_graph_func_current()
Obtains the name of currently running graph function.
source code
 
gwy_graph_func_exists(name)
Checks whether a graph function exists.
source code
 
gwy_graph_func_get_menu_path(name)
Gets menu path of a graph function.
source code
 
gwy_graph_func_get_sensitivity_mask(name)
Gets menu sensititivy mask for a graph function.
source code
 
gwy_graph_func_get_stock_id(name)
Gets stock icon id of a graph function.
source code
 
gwy_graph_func_get_tooltip(name)
Gets tooltip for a graph function.
source code
 
gwy_graph_func_run(name, graph)
Runs a graph function identified by name.
source code
 
gwy_graph_get_n_preset_colors()
Gets the number of distinct colors Graph.get_preset_color() can return.
source code
 
gwy_graph_get_preset_color(i)
Gets a preset graph color.
source code
 
gwy_graph_window_class_get_tooltips()
Gets the tooltips object used for adding tooltips to Graph window parts.
source code
 
gwy_graph_window_class_set_tooltips(tips)
Sets the tooltips object to use for adding tooltips to graph window parts.
source code
 
gwy_help_add_to_cmap_dialog(dialog, flags)
Adds help to a curve map data processing function dialog.
source code
 
gwy_help_add_to_file_dialog(dialog, flags)
Adds help to a file function dialog.
source code
 
gwy_help_add_to_graph_dialog(dialog, flags)
Adds help to a graph function dialog.
source code
 
gwy_help_add_to_proc_dialog(dialog, flags)
Adds help to a data processing function dialog.
source code
 
gwy_help_add_to_volume_dialog(dialog, flags)
Adds help to a volume data processing function dialog.
source code
 
gwy_help_add_to_window(window, filename, fragment, flags)
Adds help to a window pointing to the user guide.
source code
 
gwy_help_add_to_window_uri(window, uri, flags)
Adds help to a window pointing to an arbitrary URI.
source code
 
gwy_help_add_to_xyz_dialog(dialog, flags)
Adds help to a XYZ data processing function dialog.
source code
 
gwy_help_is_available()
Check whether help is available.
source code
 
gwy_help_show(filename, fragment)
Immediately shows a specific help location.
source code
 
gwy_interpolation_get_dval(x, x1_, y1_, x2_, y2_, interpolation)
This function uses two-point interpolation methods to get interpolated value between two arbitrary data points.
source code
 
gwy_interpolation_get_dval_of_equidists(x, data, interpolation)
Computes interpolated value from 2 or 4 equidistant values.
source code
 
gwy_interpolation_get_support_size(interpolation)
Obtains the basis support size for an interpolation type.
source code
 
gwy_interpolation_has_interpolating_basis(interpolation)
Obtains the interpolating basis property of an inteprolation type.
source code
 
gwy_interpolation_interpolate_1d(x, coeff, interpolation)
Interpolates a signle data point in one dimension.
source code
 
gwy_interpolation_interpolate_2d(x, y, rowstride, coeff, interpolation)
Interpolates a signle data point in two dimensions.
source code
 
gwy_interpolation_resample_block_1d(data, newlength, interpolation)
Resamples a one-dimensional data array.
source code
 
gwy_interpolation_resample_block_2d(data, width, height, rowstride, newwidth, newheight, newrowstride, interpolation)
Resamples a two-dimensional data array.
source code
 
gwy_interpolation_resolve_coeffs_1d(data, interpolation)
Transforms data values in a one-dimensional array to interpolation coefficients.
source code
 
gwy_interpolation_resolve_coeffs_2d(width, height, rowstride, data, interpolation)
Transforms data values in a two-dimensional array to interpolation coefficients.
source code
 
gwy_interpolation_shift_block_1d(data, offset, interpolation, exterior, fill_value)
Shifts a one-dimensional data block by a possibly non-integer offset.
source code
 
gwy_key_from_name(name)
Convert string representation of key to numerical.
source code
 
gwy_label_new_header(text)
Creates a bold, left aligned label.
source code
 
gwy_layer_func_register(type)
Registeres a layer function (layer type).
source code
 
gwy_log_get_enabled()
Reports whether logging of data processing operations is globally enabled.
source code
 
gwy_log_set_enabled(setting)
Globally enables or disables logging of data processing operations.
source code
 
gwy_mask_color_selector_run(dialog_title, parent, color_button, container, prefix)
Creates and runs a color selector dialog for a mask.
source code
 
gwy_math_curvature(coeffs)
Calculates curvature parameters at the apex from two-dimensional quadratic polynomial coefficients.
source code
 
gwy_math_find_nearest_line(x, y, coords, metric)
Finds the line from coords nearest to the point (x, y).
source code
 
gwy_math_find_nearest_point(x, y, coords, metric)
Finds the point from coords nearest to the point (x, y).
source code
 
gwy_math_fit_polynom(xdata, ydata, n)
Fits a polynom through a general (x, y) data set.
source code
 
gwy_math_humanize_numbers(unit, maximum)
Finds a human-friendly representation for a range of numbers.
source code
 
gwy_math_is_in_polygon(x, y, poly)
Establishes wether the test point x, y is inside the polygon poly.
source code
 
gwy_math_kth_rank(array, k)
Finds k-th item of an array of values using Quick select algorithm.
source code
 
gwy_math_median(array)
Finds median of an array of values using Quick select algorithm.
source code
 
gwy_math_refine_maximum(z)
Performs subpixel refinement of parabolic a two-dimensional maximum.
source code
 
gwy_math_refine_maximum_1d(y)
Performs subpixel refinement of parabolic a one-dimensional maximum.
source code
 
gwy_math_refine_maximum_2d(z)
Performs subpixel refinement of parabolic a two-dimensional maximum.
source code
 
gwy_math_trimmed_mean(array, nlowest, nhighest)
Finds trimmed mean of an array of values.
source code
 
gwy_menu_gl_material()
Creates a pop-up GL material menu.
source code
 
gwy_menu_gradient()
Creates a pop-up gradient menu.
source code
 
gwy_module_browser()
Shows a simple module browser.
source code
 
gwy_module_data_fopen(modname, filename, mode)
Opens a module data file in the user directory.
source code
 
gwy_module_data_save(modname, filename, contents, length)
Saves module data file to the user directory.
source code
 
gwy_module_disable_registration(name)
Prevents the registration of a module of given name.
source code
 
gwy_module_enable_registration(name)
Unblocks the registration of a module of given name.
source code
 
gwy_module_error_quark()
Returns error domain for module loading.
source code
 
gwy_module_file_error_quark()
Returns error domain for file module functions.
source code
 
gwy_module_get_filename(name)
Returns full file name of a module.
source code
 
gwy_module_is_enabled(name)
Reports whether the registration of a module is enabled.
source code
 
gwy_name_from_key(key)
Convert numerical representation of key to string.
source code
 
gwy_nlfit_presets()
Gets inventory with all the NLFit presets.
source code
 
gwy_pixbuf_draw_data_field(pixbuf, data_field, gradient)
Paints a data field to a pixbuf with an auto-stretched color gradient.
source code
 
gwy_pixbuf_draw_data_field_adaptive(pixbuf, data_field, gradient)
Paints a data field to a pixbuf with a color gradient adaptively.
source code
 
gwy_pixbuf_draw_data_field_as_mask(pixbuf, data_field, color)
Paints a data field to a pixbuf as a single-color mask with varying opacity.
source code
 
gwy_pixbuf_draw_data_field_with_range(pixbuf, data_field, gradient, minimum, maximum)
Paints a data field to a pixbuf with an explicite color gradient range.
source code
 
gwy_preview_surface_to_datafield(surface, dfield, max_xres, max_yres, flags)
Renders a preview of a XYZ data surface to a data field.
source code
 
gwy_process_func_current()
Obtains the name of currently running data processing function.
source code
 
gwy_process_func_exists(name)
Checks whether a data processing function exists.
source code
 
gwy_process_func_get_menu_path(name)
Returns the menu path of a data processing function.
source code
 
gwy_process_func_get_run_types(name)
Returns run modes supported by a data processing function.
source code
 
gwy_process_func_get_sensitivity_mask(name)
Gets menu sensititivy mask for a data processing function.
source code
 
gwy_process_func_get_stock_id(name)
Gets stock icon id of a data processing function.
source code
 
gwy_process_func_get_tooltip(name)
Gets tooltip for a data processing function.
source code
 
gwy_process_func_run(name, data, run)
Runs a data processing function identified by name.
source code
 
gwy_process_type_init()
Makes libgwyprocess types safe for deserialization and performs other initialization.
source code
 
gwy_radio_button_get_value(button)
Gets the integer value associated with a radio button.
source code
 
gwy_radio_button_set_value(button, value)
Sets the integer value associated with a radio button.
source code
 
gwy_raw_data_size(datatype)
Reports the size of a single raw data item.
source code
 
gwy_require_image_same_units(field, data, id, name)
Checks if data field has equal lateral and value units, possibly showing error message.
source code
 
gwy_require_square_image(field, data, id, name)
Checks if data field has the same horizontal and vertical pixel dimensions, possibly showing error message.
source code
 
gwy_resource_classes_finalize()
Destroys the inventories of all resource classes.
source code
 
gwy_resource_parse(text, expected_type)
Reconstructs a resource from human readable form.
source code
 
gwy_resource_tree_view_set_active(treeview, active)
Selects a resource in a list and scrolls to make it visible.
source code
 
gwy_rgba_remove_from_container(container, prefix)
Removes RGBA color components from a container.
source code
 
gwy_run_subdialog(dialog)
Runs a modal dialog transient for another another dialog, trying to work around bugs.
source code
 
gwy_save_auxiliary_data(title, parent, data_len, data)
Saves a report or other auxiliary data to a user specified file.
source code
 
gwy_select_in_filtered_inventory_treeeview(treeview, name)
Selects an item in filtered tree view showing an inventory.
source code
 
gwy_serializable_clone(source, copy)
Makes an object identical to another object of the same type.
source code
 
gwy_serializable_clone_with_type(source, copy, type)
Makes an object identical to another object of the same type, with explicit type checking.
source code
 
gwy_serializable_duplicate(object)
Creates a copy of an object.
source code
 
gwy_serializable_get_size(serializable)
Calculates the expected size of serialized object.
source code
 
gwy_serialize_check_string(buffer, size, position, compare_to)
Check whether size bytes of memory in buffer can be interpreted as a NUL-terminated string, and eventually whether it's equal to compare_to.
source code
 
gwy_set_data_preview_size(data_view, max_size)
Sets up data view zoom to not exceed specified size.
source code
 
gwy_sgettext(msgid)
Translate a message id containing disambiguating prefix ending with `|'.
source code
 
gwy_shape_fit_presets()
Gets inventory with all the 3D geometric shape fitting presets.
source code
 
gwy_si_unit_new_parse(unit_string)
Creates a new SI unit from string representation.
source code
 
gwy_si_unit_value_format_clone(source, dest)
Clones a value format to another.
source code
 
gwy_si_unit_value_format_copy(format)
Copies a value format structure.
source code
 
gwy_si_unit_value_format_free(format)
Frees a value format structure.
source code
 
gwy_sinc(x)
Calculates the sinc function.
source code
 
gwy_spline_new_from_points(xy)
Creates a new spline curve passing through given points.
source code
 
gwy_stock_register_stock_items()
Registers stock items.
source code
 
gwy_str_fixed_font_width(str)
Measures the width of UTF-8 encoded string in fixed-width font.
source code
 
gwy_strdiffpos(s1, s2)
Finds position where two strings differ.
source code
 
gwy_strisident(s, more, startmore)
Checks whether a string is valid identifier.
source code
 
gwy_strkill(s, killchars)
Removes characters in killchars from string s, modifying it in place.
source code
 
gwy_strreplace(haystack, needle, replacement, maxrepl)
Replaces occurences of string needle in haystack with replacement.
source code
 
gwy_surface_new_from_data(points, n)
Creates a new surface, filling it with provided points.
source code
 
gwy_surface_new_sized(n)
Creates a new surface with preallocated size.
source code
 
gwy_table_attach_adjbar(table, row, name, units, pivot, style)
Attaches an adjustment bar with spinbutton and labels, or something else, to a table row.
source code
 
gwy_table_attach_hscale(table, row, name, units, pivot, style)
Attaches a spinbutton with a scale and labels, or something else, to a table row.
source code
 
gwy_table_attach_row(table, row, name, units, middle_widget)
Attaches a widget with two labels to a table.
source code
 
gwy_table_attach_spinbutton(table, row, name, units, adj)
Attaches a spinbutton with two labels to a table.
source code
 
gwy_table_get_child_widget(table, row, col)
Finds a widget in GtkTable by its coordinates.
source code
 
gwy_table_hscale_get_check(pivot)
Gets the check button associated with a pivot object.
source code
 
gwy_table_hscale_get_label(pivot)
Gets the (left) label associated with a pivot object.
source code
 
gwy_table_hscale_get_middle_widget(pivot)
Gets the middle widget associated with a pivot object.
source code
 
gwy_table_hscale_get_scale(pivot)
Gets the horizontal scale associated with a pivot object.
source code
 
gwy_table_hscale_get_units(pivot)
Gets the units label associated with a pivot object.
source code
 
gwy_table_hscale_set_sensitive(pivot, sensitive)
Sets sensitivity of a group of controls create by gwy_table_attach_hscale() or gwy_table_attach_adjbar().
source code
 
gwy_text_header_error_quark()
Returns error domain for expression parsin and evaluation.
source code
 
gwy_threads_are_enabled()
Obtains the state of internal multithread processing.
source code
 
gwy_threads_set_enabled(setting)
Enables or disables internal multithread processing.
source code
 
gwy_tip_cmap(tip, surface)
Performs certainty map algorithm published by Villarrubia.
source code
 
gwy_tip_dilation(tip, surface)
Performs the tip convolution algorithm published by Villarrubia, which is equivalent to morphological dilation operation.
source code
 
gwy_tip_erosion(tip, surface)
Performs surface reconstruction (erosion) algorithm published by Villarrubia, which is equivalent to morphological erosion operation.
source code
 
gwy_tip_estimate_full(tip, surface, threshold, use_edges)
Performs full blind estimation algorithm published by Villarrubia.
source code
 
gwy_tip_estimate_partial(tip, surface, threshold, use_edges)
Performs partial blind estimation algorithm published by Villarrubia.
source code
 
gwy_tip_model_get_npresets()
Find number of actual tip model presets.
source code
 
gwy_tip_model_get_preset(preset_id)
Get data related to tip preset.
source code
 
gwy_tip_model_get_preset_by_name(name)
Get data related to preset with specified name.
source code
 
gwy_tip_model_get_preset_group_name(preset)
Get group name of preset (e.
source code
 
gwy_tip_model_get_preset_id(preset)
Get preset identifier within all presets.
source code
 
gwy_tip_model_get_preset_tip_name(preset)
Get name of the preset (e.
source code
 
gwy_tool_func_register(type)
Registeres a tool function (tool type).
source code
 
gwy_type_init()
Makes libgwyddion types safe for deserialization and performs other initialization.
source code
 
gwy_undo_checkpoint(container, keys)
Create a point in the undo history it is possible to return to.
source code
 
gwy_undo_container_get_modified(data)
Tests whether a container was modified.
source code
 
gwy_undo_container_has_redo(data)
Returns whether there is any redo available for a container.
source code
 
gwy_undo_container_has_undo(data)
Returns whether there is any undo available for a container.
source code
 
gwy_undo_container_remove(data, prefix)
Removes undo/redo information for a data container.
source code
 
gwy_undo_container_set_unmodified(data)
Marks a data container as umodified (that is, saved).
source code
 
gwy_undo_get_enabled()
Reports whether undo/redo is globally enabled.
source code
 
gwy_undo_qcheckpoint(container, keys)
Create a point in the undo history it is possible to return to.
source code
 
gwy_undo_redo_container(data)
Performs undo on a data container.
source code
 
gwy_undo_set_enabled(setting)
Globally enables or disables undo/redo.
source code
 
gwy_undo_undo_container(data)
Performs undo on a data container.
source code
 
gwy_utf8_strescape(source, exceptions)
Escapes special characters in a string.
source code
 
gwy_version_major()
Gets the major version of Gwyddion.
source code
 
gwy_version_minor()
Gets the minor version of Gwyddion.
source code
 
gwy_version_string()
Gets the full Gwyddion version as a string.
source code
 
gwy_volume_func_current()
Obtains the name of currently running volume data processing function.
source code
 
gwy_volume_func_exists(name)
Checks whether a volume data processing function exists.
source code
 
gwy_volume_func_get_menu_path(name)
Returns the menu path of a volume data processing function.
source code
 
gwy_volume_func_get_run_types(name)
Returns run modes supported by a volume data processing function.
source code
 
gwy_volume_func_get_sensitivity_mask(name)
Gets menu sensititivy mask for a volume data processing function.
source code
 
gwy_volume_func_get_stock_id(name)
Gets stock icon id of a volume data processing function.
source code
 
gwy_volume_func_get_tooltip(name)
Gets tooltip for a volume data processing function.
source code
 
gwy_volume_func_run(name, data, run)
Runs a volume data processing function identified by name.
source code
 
gwy_widget_get_activate_on_unfocus(widget)
Obtains the activate-on-unfocus state of a widget.
source code
 
gwy_widget_set_activate_on_unfocus(widget, activate)
Sets the activate-on-unfocus state of a widget.
source code
 
gwy_widget_sync_sensitivity(master, slave)
Make widget's sensitivity follow the sensitivity of another widget.
source code
 
gwy_widgets_get_gl_config()
Returns OpenGL framebuffer configuration for 3D widgets.
source code
 
gwy_widgets_gl_init()
Configures an OpenGL-capable visual for 3D widgets.
source code
 
gwy_widgets_type_init()
Makes libgwydgets types safe for deserialization and performs other initialization.
source code
 
gwy_xlnx_int(x)
Calculates natural logarithm multiplied by the argument for integers.
source code
 
gwy_xyz_func_current()
Obtains the name of currently running surface data processing function.
source code
 
gwy_xyz_func_exists(name)
Checks whether a surface data processing function exists.
source code
 
gwy_xyz_func_get_menu_path(name)
Returns the menu path of a surface data processing function.
source code
 
gwy_xyz_func_get_run_types(name)
Returns run modes supported by a surface data processing function.
source code
 
gwy_xyz_func_get_sensitivity_mask(name)
Gets menu sensititivy mask for a surface data processing function.
source code
 
gwy_xyz_func_get_stock_id(name)
Gets stock icon id of a surface data processing function.
source code
 
gwy_xyz_func_get_tooltip(name)
Gets tooltip for a surface data processing function.
source code
 
gwy_xyz_func_run(name, data, run)
Runs a surface data processing function identified by name.
source code
Variables [hide private]
  __package__ = None
Function Details [hide private]

gwy_3d_view_class_disable_axis_drawing(disable)

source code 

Globally disables drawing of 3D view axes.

If axis drawing is disabled, axes are never drawn. If it is not disabled, their rendering depends on the 3D view setup.

This function is a hack and exists to work around various GL implementations that crash on pixmap drawing operations.

Parameters:
  • disable - True to disable 3D view axes globally, False to enable them. (bool)

Since: 2.14

gwy_3d_window_class_get_tooltips()

source code 

Gets the tooltips object used for adding tooltips to 3D window parts.

This function does not do anything useful. Do not use it.

Returns:
The GtkTooltips object. (gtk.Tooltips)

gwy_3d_window_class_set_tooltips(tips)

source code 

Sets the tooltips object to use for adding tooltips to 3D window parts.

This function does not do anything useful. Do not use it.

This is a class method. It affects only newly cerated 3D windows, existing 3D windows will continue to use the tooltips they were constructed with.

If no class tooltips object is set before first 3DWindow is created, the class instantiates one on its own. You can normally obtain it with gwy_3d_window_class_get_tooltips() then. The class takes a reference on the tooltips in either case.

Parameters:
  • tips - Tooltips object 3DWindow's should use for setting tooltips. A None value disables tooltips altogether. (gtk.Tooltips)

gwy_app_add_graph_or_curves(gmodel, data, target_graph, colorstep)

source code 

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

Parameters:
  • gmodel - A graph model with curves to add. (GraphModel)
  • data - Data container where the graph would be added. (Container)
  • target_graph - Graph where curves would be added. (const-AppDataId*)
  • colorstep - Curve block size as in Graph.model_append_curves(). (int)
Returns:
The numerical identifier of the newly-created graph of one was created. Value -1 is returned if curves were added to target_graph. (int)

Since: 2.41

gwy_app_add_main_accel_group(window)

source code 

Adds main (global) application accelerator group to a window.

This includes accelerators for terminating Gwyddion, opening files, etc.

Parameters:
  • window - A window. (gtk.Window)

gwy_app_build_curve_map_menu(accel_group)

source code 

Constructs the application Curve Maps 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.

Parameters:
  • accel_group - Acceleration group to be associated with the menu. (gtk.AccelGroup)
Returns:
A newly ceated curve map data processing menu (a GtkMenu). (gtk.Widget)

Since: 2.60

gwy_app_build_graph_menu(accel_group)

source code 

Constructs the application Graph 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.

Parameters:
  • accel_group - Acceleration group to be associated with the menu. (gtk.AccelGroup)
Returns:
A newly ceated graph menu (a GtkMenu). (gtk.Widget)

gwy_app_build_process_menu(accel_group)

source code 

Constructs the application Data Process 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.

Parameters:
  • accel_group - Acceleration group to be associated with the menu. (gtk.AccelGroup)
Returns:
A newly ceated data processing menu (a GtkMenu). (gtk.Widget)

gwy_app_build_volume_menu(accel_group)

source code 

Constructs the application Volume Data 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.

Parameters:
  • accel_group - Acceleration group to be associated with the menu. (gtk.AccelGroup)
Returns:
A newly ceated volume data processing menu (a GtkMenu). (gtk.Widget)

Since: 2.32

gwy_app_build_xyz_menu(accel_group)

source code 

Constructs the application XYZ Data 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.

Parameters:
  • accel_group - Acceleration group to be associated with the menu. (gtk.AccelGroup)
Returns:
A newly ceated XYZ data processing menu (a GtkMenu). (gtk.Widget)

Since: 2.45

gwy_app_channel_log_add_proc(data, previd, newid)

source code 

Adds an entry to the log of the current data processing operations for a channel.

This simplified variant of gwy_app_channel_log_add() takes the currently running data processing function name and constructs the qualified function name from that.

Parameters:
  • data - A data container. (Container)
  • previd - Identifier of the previous (source) data channel in the container. Pass -1 for a no-source (or unclear source) operation. (int)
  • newid - Identifier of the new (target) data channel in the container. (int)

Since: 2.38

gwy_app_channel_mask_of_nans(dfield, removebad)

source code 

Creates a mask corresponding to not-a-number and infinite values in a data field.

NaNs and infinities are not normally allowed in Gwyddion so this function should be used upon import if the source file format can represent such values.

The invalid values can be automatically removed using the same method as gwy_app_channel_remove_bad_data().

Parameters:
  • dfield - A data field possibly containing NaNs and infinities. (DataField)
  • removebad - Automatically remove the invalid values. (bool)
Returns:
A newly created data field with 1.0 in pixels corresponding to a NaN or infinity in dfield. If no such pixels are present, None is returned. (DataField)

Since: 2.38

gwy_app_channel_remove_bad_data(dfield, mfield)

source code 

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.

Parameters:
  • dfield - A data field. The values of bad data points are ignored and might be even left uninitialized. (DataField)
  • mfield - A mask field containing 1.0 in place of good data points, 0.0 in place of bad points. It will be inverted to become the mask of bad points. (DataField)
Returns:
The number of bad data points replaced. If zero is returned, all points are good and there is no need for masking. (int)

Since: 2.14

gwy_app_channel_title_fall_back(data, id)

source code 

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.

Parameters:
  • data - A data container. (Container)
  • id - Data channel id. (int)
Returns:
True if the title was set (either by this function or before). (bool)

Since: 2.3

gwy_app_current_tool()

source code 

Obtains the currently active tool object.

In some rare circumstances, this function can return None because no tool is active. This includes program startup and shutdown and during the construction of a new Tool object while switching tools. Also, None is typically returned outside Gwyddion in programs just using the libraries.

Returns:
The current tool object. (Tool*)

Since: 2.55

gwy_app_current_tool_name()

source code 

Obtains the name of currently active tool.

See gwy_app_switch_tool() for the name description.

In some rare circumstances, this function can return None because no tool is active. This includes program startup and shutdown and during the construction of a new Tool object while switching tools. Also, None is typically returned outside Gwyddion in programs just using the libraries.

Returns:
The tool name. (string)

Since: 2.38

gwy_app_curve_map_log_add_curve_map(data, previd, newid)

source code 

Adds an entry to the log of the current Lawn curve map processing operations for Lawn curve map.

This simplified variant of gwy_app_curve_map_log_add() takes the currently running function Lawn curve map processing name and constructs the qualified function name from that.

Parameters:
  • data - A data container. (Container)
  • previd - Identifier of the previous (source) Lawn curve map in the container. Pass -1 for a no-source (or unclear source) operation. (int)
  • newid - Identifier of the new (target) Lawn curve map in the container. (int)

Since: 2.60

gwy_app_data_browser_add(data)

source code 

Adds a data container to the application data browser.

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

Parameters:

gwy_app_data_browser_add_brick(brick, preview, data, showit)

source code 

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. (Brick)
  • preview - Preview data field. It may be None to create a preview automatically. If non-None, 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 DataField.duplicate(). (DataField)
  • data - A data container to add brick to. It can be None to add the data field to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the data brick in the container. (int)

Since: 2.32

gwy_app_data_browser_add_data_field(dfield, data, showit)

source code 

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. (DataField)
  • data - A data container to add dfield to. It can be None to add the data field to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the data field in the container. (int)

gwy_app_data_browser_add_graph_model(gmodel, data, showit)

source code 

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. (GraphModel)
  • data - A data container to add gmodel to. It can be None to add the graph model to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the graph model in the container. (int)

gwy_app_data_browser_add_lawn(lawn, preview, data, showit)

source code 

Adds Lawn 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 - Lawn to add. (Lawn)
  • preview - Preview data field. It may be None to create a preview automatically. If non-None, 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 DataField.duplicate(). (DataField)
  • data - A data container to add lawn to. It can be None to add the data field to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the data lawn in the container. (int)

Since: 2.60

gwy_app_data_browser_add_spectra(spectra, data, showit)

source code 

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. (Spectra)
  • data - A data container to add gmodel to. It can be None to add the spectra to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the spectra object in the container. (int)

Since: 2.7

gwy_app_data_browser_add_surface(surface, data, showit)

source code 

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. (Surface)
  • data - A data container to add surface to. It can be None to add the data field to current data container. (Container)
  • showit - True to display it immediately, False to just add it. (bool)
Returns:
The id of the data surface in the container. (int)

Since: 2.45

gwy_app_data_browser_copy_channel(source, id, dest)

source code 

Copies a channel including all auxiliary data.

Parameters:
  • source - Source container. (Container)
  • id - Data channel id. (int)
  • dest - Target container (may be identical to source). (Container)
Returns:
The id of the copy. (int)

gwy_app_data_browser_copy_curve_map(source, id, dest)

source code 

Copies Lawn curve map data including all auxiliary data.

Parameters:
  • source - Source container. (Container)
  • id - Lawn curve map data id. (int)
  • dest - Target container (may be identical to source). (Container)
Returns:
The id of the copy. (int)

Since: 2.60

gwy_app_data_browser_copy_volume(source, id, dest)

source code 

Copies volume brick data including all auxiliary data.

Parameters:
  • source - Source container. (Container)
  • id - Volume data brick id. (int)
  • dest - Target container (may be identical to source). (Container)
Returns:
The id of the copy. (int)

Since: 2.32

gwy_app_data_browser_copy_xyz(source, id, dest)

source code 

Copies XYZ surface data including all auxiliary data.

Parameters:
  • source - Source container. (Container)
  • id - XYZ surface data id. (int)
  • dest - Target container (may be identical to source). (Container)
Returns:
The id of the copy. (int)

Since: 2.45

gwy_app_data_browser_find_data_by_title(data, titleglob)

source code 

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. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the channel titles against. (string)
Returns:
A newly allocated array with channel ids, -1 terminated. (list)

Since: 2.21

gwy_app_data_browser_find_graphs_by_title(data, titleglob)

source code 

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. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the graph titles against. (string)
Returns:
A newly allocated array with graph ids, -1 terminated. (list)

Since: 2.21

gwy_app_data_browser_find_spectra_by_title(data, titleglob)

source code 

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. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the spectra titles against. (string)
Returns:
A newly allocated array with spectra ids, -1 terminated. (list)

Since: 2.21

gwy_app_data_browser_find_volume_by_title(data, titleglob)

source code 

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. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the volume data titles against. (string)
Returns:
A newly allocated array with volume data ids, -1 terminated. (list)

Since: 2.45

gwy_app_data_browser_find_xyz_by_title(data, titleglob)

source code 

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. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the XYZ data titles against. (string)
Returns:
A newly allocated array with XYZ data ids, -1 terminated. (list)

Since: 2.45

gwy_app_data_browser_foreach(function, user_data)

source code 

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

Parameters:
  • function - Function to run on each data container. (AppDataForeachFunc)
  • user_data - Data to pass as second argument of function. (gpointer)

gwy_app_data_browser_get(number)

source code 

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. (int)
Returns:
The corresponding data container. None is returned if number does not identify any existing data. (Container)

Since: 2.41

gwy_app_data_browser_get_containers()

source code 

Get list of containers of current data browser.

Returns:
list of containers Container object (list)

gwy_app_data_browser_get_current(obj_type)

source code 

Get current data item of given type.

Depending on what you request, the function can return data object themselves, integer keys, ids, ...

Parameters:
  • obj_type - Data item type. (AppWhat) Expected values: APP_CONTAINER, APP_DATA_VIEW, APP_GRAPH, APP_DATA_FIELD, APP_DATA_FIELD_KEY, APP_DATA_FIELD_ID, APP_MASK_FIELD, APP_MASK_FIELD_KEY, APP_SHOW_FIELD, APP_SHOW_FIELD_KEY, APP_GRAPH_MODEL, APP_GRAPH_MODEL_KEY, APP_GRAPH_MODEL_ID, APP_SPECTRA, APP_SPECTRA_KEY, APP_SPECTRA_ID, APP_VOLUME_VIEW, APP_BRICK, APP_BRICK_KEY, APP_BRICK_ID, APP_CONTAINER_ID, APP_XYZ_VIEW, APP_SURFACE, APP_SURFACE_KEY, APP_SURFACE_ID, APP_PAGE, APP_LAWN, APP_LAWN_KEY, APP_LAWN_ID, APP_CURVE_MAP_VIEW. (AppWhat)
Returns:
The current object or None. (any)

gwy_app_data_browser_get_data_ids(container)

source code 

Gets the list of all channels in a data container (presumably representing a file).

Parameters:
Returns:
List of channel ids. (list)

gwy_app_data_browser_get_graph_ids(container)

source code 

Gets the list of all graphs in a data container (presumably representing a file).

Parameters:
Returns:
List of graph ids. (list)

gwy_app_data_browser_get_gui_enabled()

source code 

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. (bool)

Since: 2.21

gwy_app_data_browser_get_keep_invisible(data)

source code 

Gets data browser behaviour for inaccessible data.

Parameters:
Returns:
See gwy_app_data_browser_set_keep_invisible(). (bool)

gwy_app_data_browser_get_number(data)

source code 

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, None is also permitted. (Container)
Returns:
A positive numerical identifier of data. Zero is returned if data is None. (int)

Since: 2.41

gwy_app_data_browser_get_spectra_ids(container)

source code 

Gets the list of all spectra in a data container (presumably representing a file).

Parameters:
Returns:
List of spectra ids. (list)

gwy_app_data_browser_get_volume_ids(container)

source code 

Gets the list of all volume data in a data container (presumably representing a file).

Parameters:
Returns:
List of volume data ids. (list)

gwy_app_data_browser_get_xyz_ids(container)

source code 

Gets the list of all XYZ data in a data container (presumably representing a file).

Parameters:
Returns:
List of XYZ data ids. (list)

gwy_app_data_browser_merge(data)

source code 

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

Parameters:
  • data - A data container, not managed by the data browser. (Container)

Since: 2.7

gwy_app_data_browser_remove(data)

source code 

Removed a data container from the application data browser.

Parameters:

gwy_app_data_browser_remove_channel_watch(id)

source code 

Removes a channel watch function.

Parameters:
  • id - Watch function id, as returned by gwy_app_data_browser_add_channel_watch(). (gulong)

Since: 2.21

gwy_app_data_browser_remove_curve_map_watch(id)

source code 

Removes a curve map data watch function.

Parameters:
  • id - Watch function id, as returned by gwy_app_data_browser_add_curve_map_watch(). (gulong)

Since: 2.60

gwy_app_data_browser_remove_graph_watch(id)

source code 

Removes a graph watch function.

Parameters:
  • id - Watch function id, as returned by gwy_app_data_browser_add_graph_watch(). (gulong)

Since: 2.41

gwy_app_data_browser_remove_volume_watch(id)

source code 

Removes a volume data watch function.

Parameters:
  • id - Watch function id, as returned by gwy_app_data_browser_add_volume_watch(). (gulong)

Since: 2.60

gwy_app_data_browser_remove_xyz_watch(id)

source code 

Removes an XYZ data watch function.

Parameters:
  • id - Watch function id, as returned by gwy_app_data_browser_add_xyz_watch(). (gulong)

Since: 2.60

gwy_app_data_browser_reset_visibility(data, reset_type)

source code 

Resets visibility of all data objects in a container.

Parameters:
  • data - A data container. (Container)
  • reset_type - Type of visibility reset. Expected values: VISIBILITY_RESET_DEFAULT, VISIBILITY_RESET_RESTORE, VISIBILITY_RESET_SHOW_ALL, VISIBILITY_RESET_HIDE_ALL. (VisibilityResetType)
Returns:
True if anything is visible after the reset. (bool)

gwy_app_data_browser_restore()

source code 

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_select_brick(data, id)

source code 

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

Parameters:
  • data - The container to select. (Container)
  • id - Number (id) of the brick in data to select. (int)

Warning: 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.

Since: 2.61

gwy_app_data_browser_select_curve_map(data_view)

source code 

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. (DataView)

Since: 2.60

gwy_app_data_browser_select_data_field(data, id)

source code 

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

Parameters:
  • data - The container to select. (Container)
  • id - Number (id) of the data field in data to select. (int)

Warning: 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.

gwy_app_data_browser_select_data_view(data_view)

source code 

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. (DataView)

gwy_app_data_browser_select_graph(graph)

source code 

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. (Graph)

gwy_app_data_browser_select_graph_model(data, id)

source code 

Makes a graph model current in the data browser.

Parameters:
  • data - The container to select. (Container)
  • id - Number (id) of the graph model in data to select. (int)

Warning: 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.

gwy_app_data_browser_select_lawn(data, id)

source code 

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

Parameters:
  • data - The container to select. (Container)
  • id - Number (id) of the lawn in data to select. (int)

Warning: 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.

Since: 2.61

gwy_app_data_browser_select_spectra(spectra)

source code 

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. (Spectra)

Since: 2.7

gwy_app_data_browser_select_surface(data, id)

source code 

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

Parameters:
  • data - The container to select. (Container)
  • id - Number (id) of the surface in data to select. (int)

Warning: 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.

Since: 2.61

gwy_app_data_browser_select_volume(data_view)

source code 

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. (DataView)

Since: 2.32

gwy_app_data_browser_select_xyz(data_view)

source code 

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. (DataView)

Since: 2.45

gwy_app_data_browser_set_gui_enabled(setting)

source code 

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. (bool)

Since: 2.21

gwy_app_data_browser_set_keep_invisible(data, keep_invisible)

source code 

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. (Container)
  • keep_invisible - True to retain data in the browser even when it becomes inaccessible, False to dispose of it. (bool)

gwy_app_data_browser_show()

source code 

Shows the data browser window.

If the window does not exist, it is created.

gwy_app_data_browser_show_3d(data, id)

source code 

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. (Container)
  • id - Channel id. (int)

gwy_app_data_clear_selections(data, id)

source code 

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. (Container)
  • id - Data channel id. (int)

gwy_app_data_view_change_mask_color(data_view)

source code 

Runs mask color selector on a data view.

This is a convenience function to run gwy_color_selector_for_mask(), possibly taking the initial color from settings.

Parameters:
  • data_view - A data view (of application's data window). It must have a mask. (DataView)

gwy_app_file_close()

source code 

Closes the current file file (very high-level app function).

Since: 2.45

gwy_app_file_confirm_overwrite(chooser)

source code 

Asks for file overwrite for a file save chooser.

Parameters:
  • chooser - A file chooser for save action. (gtk.Widget)
Returns:
True if it is OK to overwrite the file, False when user cancelled it or there was other problem. (bool)

gwy_app_file_load(filename_utf8, name)

source code 

Loads a file into application (a high-level function).

At least one of filename_utf8, filename_sys must be non-None.

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.

Parameters:
  • filename_utf8 - Name of file to load, in UTF-8. (string)
  • name - File type to open file as, but normally None to automatically detect from file contents. (string)
Returns:
Tuple consisting of 2 values (value, filename_sys). ((Container), (SkipArg))

gwy_app_file_merge()

source code 

Merges a user-selected file (very high-level app function).

Since: 2.7

gwy_app_file_save()

source code 

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.

gwy_app_file_write(data, filename_utf8, name)

source code 

Writes container to a file (a high-level function).

At least one of filename_utf8, filename_sys must be non-None.

The file is saved in interactive mode, modules can ask for user input. If the write fails, an error dialog is presented.

Parameters:
  • data - Data to write. (Container)
  • filename_utf8 - Name of file to write data to, in UTF-8. (string)
  • name - File type to save file as, but normally None to automatically detect from file name. (string)
Returns:
Tuple consisting of 2 values (value, filename_sys). ((bool), (SkipArg))

gwy_app_find_window_for_channel(data, id)

source code 

Finds the window displaying a data channel.

Parameters:
  • data - A data container to find window for. (Container)
  • id - Data channel id. It can be -1 to find any data window displaying a channel from data. (int)
Returns:
The window if found, None if no data window displays the requested channel. (gtk.Window)

gwy_app_find_window_for_curve_map(data, id)

source code 

Finds the window displaying given curve map.

Parameters:
  • data - A data container to find window for. (Container)
  • id - curve map id. It can be -1 to find any data window displaying curve map from data. (int)
Returns:
The window if found, None if no data window displays the requested curve map. (gtk.Window)

Since: 2.60

gwy_app_find_window_for_graph(data, id)

source code 

Finds the window displaying a graph model.

Parameters:
  • data - A data container to find window for. (Container)
  • id - Graph model id. It can be -1 to find any graph window displaying a graph model from data. (int)
Returns:
The window if found, None if no graph window displays the requested channel. (gtk.Window)

Since: 2.45

gwy_app_find_window_for_volume(data, id)

source code 

Finds the window displaying given volume data.

Parameters:
  • data - A data container to find window for. (Container)
  • id - Volume data id. It can be -1 to find any data window displaying volume data from data. (int)
Returns:
The window if found, None if no data window displays the requested volume data. (gtk.Window)

Since: 2.42

gwy_app_find_window_for_xyz(data, id)

source code 

Finds the window displaying given XYZ data.

Parameters:
  • data - A data container to find window for. (Container)
  • id - XYZ data id. It can be -1 to find any data window displaying XYZ data from data. (int)
Returns:
The window if found, None if no data window displays the requested XYZ data. (gtk.Window)

Since: 2.45

gwy_app_get_brick_key_for_id(id)

source code 

Calculates data brick quark identifier from its id.

Parameters:
  • id - Numerical id of a data brick in file (container). (int)
Returns:
The quark key identifying data brick with number id. (int)

Since: 2.32

gwy_app_get_brick_meta_key_for_id(id)

source code 

Calculates data brick title quark identifier from its id.

Parameters:
  • id - Numerical id of a data brick in file (container). (int)
Returns:
The quark key identifying metadata container of data brick with number id. (int)

Since: 2.43

gwy_app_get_brick_palette_key_for_id(id)

source code 

Calculates data brick palette quark identifier from its id.

Parameters:
  • id - Numerical id of a data brick in file (container). (int)
Returns:
The quark key identifying string name palette of data brick with number id. (int)

Since: 2.43

gwy_app_get_brick_preview_key_for_id(id)

source code 

Calculates data brick preview quark identifier from its id.

Parameters:
  • id - Numerical id of a data brick in file (container). (int)
Returns:
The quark key identifying preview data field of data brick with number id. (int)

Since: 2.43

gwy_app_get_brick_title(data, id)

source code 

Gets a volume data brick title.

Parameters:
  • data - A data container. (Container)
  • id - Volume data brick id. (int)
Returns:
The brick title as a newly allocated string. (string)

Since: 2.32

gwy_app_get_brick_title_key_for_id(id)

source code 

Calculates data brick title quark identifier from its id.

Parameters:
  • id - Numerical id of a data brick in file (container). (int)
Returns:
The quark key identifying string title of data brick with number id. (int)

Since: 2.43

gwy_app_get_channel_thumbnail(data, id, max_width, max_height)

source code 

Creates a channel thumbnail.

Parameters:
  • data - A data container. (Container)
  • id - Data channel id. (int)
  • max_width - Maximum width of the created pixbuf, it must be at least 2. (int)
  • max_height - Maximum height of the created pixbuf, it must be at least 2. (int)
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. (gdk.Pixbuf)

gwy_app_get_current_directory()

source code 

Returns what the app uses as `current directory'.

Warning: This function is probably temporary.

Returns:
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 glib.DIR_SEPARATOR_S. (string)

gwy_app_get_curve_map_thumbnail(data, id, max_width, max_height)

source code 

Creates a curve map thumbnail.

Parameters:
  • data - A data container. (Container)
  • id - Volume data id. (int)
  • max_width - Maximum width of the created pixbuf, it must be at least 2. (int)
  • max_height - Maximum height of the created pixbuf, it must be at least 2. (int)
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. (gdk.Pixbuf)

Since: 2.60

gwy_app_get_data_base_key_for_id(id)

source code 

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). (int)
Returns:
The quark key identifying base string prefix of image with number id. (int)

Since: 2.59

gwy_app_get_data_field_title(data, id)

source code 

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. (Container)
  • id - Data channel id. (int)
Returns:
The channel title as a newly allocated string. (string)

gwy_app_get_data_key_for_id(id)

source code 

Calculates data field quark identifier from its id.

Parameters:
  • id - Numerical id of a channel in file (container). (int)
Returns:
The quark key identifying channel data field with number id. (int)

gwy_app_get_data_meta_key_for_id(id)

source code 

Calculates data field metadata quark identifier from its id.

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying metadata container of image with number id. (int)

Since: 2.43

gwy_app_get_data_palette_key_for_id(id)

source code 

Calculates data field palette quark identifier from its id.

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying string name palette of image with number id. (int)

Since: 2.43

gwy_app_get_data_range_max_key_for_id(id)

source code 

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

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying floating fixed false colour range maximum of image with number id. (int)

Since: 2.43

gwy_app_get_data_range_min_key_for_id(id)

source code 

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

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying floating fixed false colour range minimum of image with number id. (int)

Since: 2.43

gwy_app_get_data_range_type_key_for_id(id)

source code 

Calculates data field range type quark identifier from its id.

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying LayerBasicRangeType false colour mapping type of image with number id. (int)

Since: 2.43

gwy_app_get_data_real_square_key_for_id(id)

source code 

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

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying boolean controlling real-square setting of image with number id. (int)

Since: 2.60

gwy_app_get_data_title_key_for_id(id)

source code 

Calculates data field title quark identifier from its id.

Parameters:
  • id - Numerical id of a image in file (container). (int)
Returns:
The quark key identifying string title of image with number id. (int)

Since: 2.43

gwy_app_get_graph_key_for_id(id)

source code 

Calculates graph model quark identifier from its id.

Parameters:
  • id - Numerical id of a graph in file (container). (int)
Returns:
The quark key identifying graph model with number id. (int)

Since: 2.7

gwy_app_get_graph_thumbnail(data, id, max_width, max_height)

source code 

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. (Container)
  • id - Graph model data id. (int)
  • max_width - Maximum width of the created pixbuf, it must be at least 2. (int)
  • max_height - Maximum height of the created pixbuf, it must be at least 2. (int)
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. (gdk.Pixbuf)

Since: 2.45

gwy_app_get_lawn_key_for_id(id)

source code 

Calculates Lawn curve map quark identifier from its id.

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_lawn_meta_key_for_id(id)

source code 

Calculates Lawn curve map title quark identifier from its id.

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying metadata container of Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_lawn_palette_key_for_id(id)

source code 

Calculates Lawn curve map palette quark identifier from its id.

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying string name palette of Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_lawn_preview_key_for_id(id)

source code 

Calculates Lawn curve map preview quark identifier from its id.

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying preview data field of Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_lawn_real_square_key_for_id(id)

source code 

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

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying boolean controlling real-square setting of Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_lawn_title(data, id)

source code 

Gets a Lawn curve map data title.

Parameters:
  • data - A data container. (Container)
  • id - XYZ data lawn id. (int)
Returns:
The lawn title as a newly allocated string. (string)

Since: 2.60

gwy_app_get_lawn_title_key_for_id(id)

source code 

Calculates Lawn curve map title quark identifier from its id.

Parameters:
  • id - Numerical id of a Lawn curve map in file (container). (int)
Returns:
The quark key identifying string title of Lawn curve map with number id. (int)

Since: 2.60

gwy_app_get_log_text_buffer()

source code 

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.

Returns:
Text buffer with the program log messages. (gtk.TextBuffer)

Since: 2.45

gwy_app_get_mask_key_for_id(id)

source code 

Calculates mask field quark identifier from its id.

Parameters:
  • id - Numerical id of a channel in file (container). (int)
Returns:
The quark key identifying mask data field with number id. (int)

gwy_app_get_show_key_for_id(id)

source code 

Calculates presentation field quark identifier from its id.

Parameters:
  • id - Numerical id of a channel in file (container). (int)
Returns:
The quark key identifying presentation data field with number id. (int)

gwy_app_get_spectra_key_for_id(id)

source code 

Calculates spectra quark identifier from its id.

Parameters:
  • id - Numerical id of a spectra set in file (container). (int)
Returns:
The quark key identifying spectra with number id. (int)

Since: 2.7

gwy_app_get_surface_key_for_id(id)

source code 

Calculates XYZ surface quark identifier from its id.

Parameters:
  • id - Numerical id of an XYZ surface in file (container). (int)
Returns:
The quark key identifying XYZ surface with number id. (int)

Since: 2.45

gwy_app_get_surface_meta_key_for_id(id)

source code 

Calculates XYZ surface title quark identifier from its id.

Parameters:
  • id - Numerical id of an XYZ surface in file (container). (int)
Returns:
The quark key identifying metadata container of XYZ surface with number id. (int)

Since: 2.45

gwy_app_get_surface_palette_key_for_id(id)

source code 

Calculates XYZ surface palette quark identifier from its id.

Parameters:
  • id - Numerical id of an XYZ surface in file (container). (int)
Returns:
The quark key identifying string name palette of XYZ surface with number id. (int)

Since: 2.45

gwy_app_get_surface_preview_key_for_id(id)

source code 

Calculates XYZ surface preview quark identifier from its id.

Parameters:
  • id - Numerical id of an XYZ surface in file (container). (int)
Returns:
The quark key identifying preview data field of XYZ surface with number id. (int)

Since: 2.46

gwy_app_get_surface_title(data, id)

source code 

Gets an XYZ surface data title.

Parameters:
  • data - A data container. (Container)
  • id - XYZ data surface id. (int)
Returns:
The surface title as a newly allocated string. (string)

Since: 2.45

gwy_app_get_surface_title_key_for_id(id)

source code 

Calculates data surface title quark identifier from its id.

Parameters:
  • id - Numerical id of a data surface in file (container). (int)
Returns:
The quark key identifying string title of data surface with number id. (int)

Since: 2.45

gwy_app_get_tooltips()

source code 

Gets the application-wide tooltips instance.

Do not use. Use gtk_widget_set_tooltip_text() or gtk_widget_set_tooltip_markup() instead.

Returns:
The global tooltips instance. No reference is added, you can add yours, but the returned object will exist to the end of program anyway. (gtk.Tooltips)

gwy_app_get_volume_thumbnail(data, id, max_width, max_height)

source code 

Creates a volume thumbnail.

Parameters:
  • data - A data container. (Container)
  • id - Volume data id. (int)
  • max_width - Maximum width of the created pixbuf, it must be at least 2. (int)
  • max_height - Maximum height of the created pixbuf, it must be at least 2. (int)
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. (gdk.Pixbuf)

Since: 2.33

gwy_app_get_xyz_thumbnail(data, id, max_width, max_height)

source code 

Creates an XYZ data thumbnail.

Parameters:
  • data - A data container. (Container)
  • id - XYZ surface data id. (int)
  • max_width - Maximum width of the created pixbuf, it must be at least 2. (int)
  • max_height - Maximum height of the created pixbuf, it must be at least 2. (int)
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. (gdk.Pixbuf)

Since: 2.45

gwy_app_gl_is_ok()

source code 

Returns OpenGL availability.

Returns:
The return value is the same as the return value of gwy_app_gl_init() which needs to be called prior to this function (until then, the return value is always False). (bool)

gwy_app_gl_material_editor()

source code 

Creates or presents OpenGL material editor.

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

gwy_app_gradient_editor()

source code 

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.

gwy_app_init_i18n()

source code 

Initializes internationalization.

Normally not needed to call explicitly.

gwy_app_init_widget_styles()

source code 

Sets up style properties for special Gwyddion widgets.

Normally not needed to call explicitly.

gwy_app_log_browser_for_channel(data, id)

source code 

Shows a simple log browser for a channel.

If the log browser is already shown for this channel it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of a channel in data to show log for. (int)
Returns:
The log browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.35

gwy_app_log_browser_for_curve_map(data, id)

source code 

Shows a simple log browser for Lawn curve map.

If the log browser is already shown for this Lawn curve map it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of Lawn curve map in data to show log for. (int)
Returns:
The log browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.60

gwy_app_log_browser_for_volume(data, id)

source code 

Shows a simple log browser for volume data.

If the log browser is already shown for this volume data it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of volume data in data to show log for. (int)
Returns:
The log browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.35

gwy_app_log_browser_for_xyz(data, id)

source code 

Shows a simple log browser for XYZ data.

If the log browser is already shown for this XYZ data it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of XYZ data in data to show log for. (int)
Returns:
The log browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.45

gwy_app_main_window_get()

source code 

Returns Gwyddion main application window (toolbox).

Returns:
The Gwyddion toolbox. (gtk.Widget)

gwy_app_main_window_set(window)

source code 

Sets the main application window.

This function is probably only useful in Gwyddion itself and should be ignored.

It needs to be called exactly once at Gwyddion startup. It restores the toolbox position and makes gwy_app_main_window_get() work.

Parameters:
  • window - A window, presumably the Gwyddion toolbox. (gtk.Widget)

gwy_app_menu_recent_files_get()

source code 

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.

Returns:
The recent files menu (a GtkMenu). (gtk.Widget)

gwy_app_metadata_browser_for_channel(data, id)

source code 

Shows a simple metadata browser for a channel.

If the metadata browser is already shown for this channel it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of a channel in data to show metadata for. (int)
Returns:
The metadata browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.32

gwy_app_metadata_browser_for_curve_map(data, id)

source code 

Shows a simple metadata browser for curve map data.

If the metadata browser is already shown for this curve map data it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of curve map data in data to show metadata for. (int)
Returns:
The metadata browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.60

gwy_app_metadata_browser_for_volume(data, id)

source code 

Shows a simple metadata browser for volume data.

If the metadata browser is already shown for this volume data it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of volume data in data to show metadata for. (int)
Returns:
The metadata browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.32

gwy_app_metadata_browser_for_xyz(data, id)

source code 

Shows a simple metadata browser for XYZ data.

If the metadata browser is already shown for this XYZ data it is just raised and given focus. Otherwise, a new window is created.

Parameters:
  • data - A data container. (Container)
  • id - Id of XYZ data in data to show metadata for. (int)
Returns:
The metadata browser (owned by the library). Usually, you can ignore the return value. (gtk.Widget)

Since: 2.45

gwy_app_process_menu_add_run_last(menu)

source code 

Adds Re-show Last and Repeat Last items to application data process menu.

This function is essentially useful only for toolbox construction.

Parameters:

gwy_app_quit()

source code 

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().

Returns:
Always True to be usable as an event handler. However, if the application is actually terminated, this function does not return. (bool)

gwy_app_recent_file_get_thumbnail(filename_utf8)

source code 

Gets thumbnail of a recently open file.

Parameters:
  • filename_utf8 - Name of a recent file, in UTF-8 encoding. (string)
Returns:
The thumbnail as a new pixbuf or a pixbuf with a new reference. The caller must unreference it but not modify it. If not thumbnail can not be obtained, a fully transparent pixbuf is returned. (gdk.Pixbuf)

gwy_app_recent_file_list_load(filename)

source code 

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 None as filename in that case.

Parameters:
  • filename - Name of file containing list of recently open files. (string)
Returns:
True if the file was read successfully, False otherwise. (bool)

gwy_app_recent_file_list_save(filename)

source code 

Saves list of recently open files to filename.

Parameters:
  • filename - Name of file to save the list of recently open files to. (string)
Returns:
True if the file was written successfully, False otherwise. (bool)

gwy_app_recent_file_list_update(data, filename_utf8, filename_sys, hint)

source code 

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.

Parameters:
  • data - A data container corresponding to the file. (Container)
  • filename_utf8 - A recent file to insert or move to the first position in document history, in UTF-8. (string)
  • filename_sys - A recent file to insert or move to the first position in document history, in GLib encoding. (string)
  • hint - Preferred channel id to use for thumbnail, pass 0 if no channel is specificaly preferred. (int)

gwy_app_restore_window_position(window, prefix, grow_only)

source code 

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.

Parameters:
  • window - A window to restore position of. (gtk.Window)
  • prefix - Unique prefix in settings to get the information from (the same as in gwy_app_save_window_position()). (string)
  • grow_only - True to only attempt set the window default size bigger than it requests, never smaller. (bool)

gwy_app_run_curve_map_func(name)

source code 

Runs a curve map processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters:
  • name - A curve map processing function name. (string)
Returns:
The actually used mode (nonzero), or 0 on failure. (RunType)

Since: 2.45

gwy_app_run_curve_map_func_in_mode(name, run)

source code 

Runs a curve map processing function on current data in specified mode.

Parameters:
  • name - A curve map processing function name. (string)
  • run - A run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

Since: 2.45

gwy_app_run_graph_func(name)

source code 

Runs a graph function on the current graph.

Parameters:
  • name - A graph function name. (string)

gwy_app_run_process_func(name)

source code 

Runs a data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters:
  • name - A data processing function name. (string)
Returns:
The actually used mode (nonzero), or 0 on failure. (RunType)

gwy_app_run_process_func_in_mode(name, run)

source code 

Runs a data processing function on current data in specified mode.

Parameters:
  • name - A data processing function name. (string)
  • run - A run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

gwy_app_run_volume_func(name)

source code 

Runs a volume data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters:
  • name - A volume data processing function name. (string)
Returns:
The actually used mode (nonzero), or 0 on failure. (RunType)

Since: 2.32

gwy_app_run_volume_func_in_mode(name, run)

source code 

Runs a volume data processing function on current data in specified mode.

Parameters:
  • name - A volume data processing function name. (string)
  • run - A run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

Since: 2.32

gwy_app_run_xyz_func(name)

source code 

Runs a XYZ data processing function on the current data.

From the run modes function name supports, the most interactive one is selected.

Parameters:
  • name - A XYZ data processing function name. (string)
Returns:
The actually used mode (nonzero), or 0 on failure. (RunType)

Since: 2.45

gwy_app_run_xyz_func_in_mode(name, run)

source code 

Runs a XYZ data processing function on current data in specified mode.

Parameters:
  • name - A XYZ data processing function name. (string)
  • run - A run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

Since: 2.45

gwy_app_save_window_position(window, prefix, position, size)

source code 

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.

Parameters:
  • window - A window to save position of. (gtk.Window)
  • prefix - Unique prefix in settings to store the information under. (string)
  • position - True to save position information. (bool)
  • size - True to save size information. (bool)

gwy_app_sensitivity_add_widget(widget, mask)

source code 

Adds a widget to the application-wide widget sensitvity group.

The semantics of this function is the same as SensitivityGroup.add_widget() (in fact, it's a simple wrapper around it).

Parameters:
  • widget - Widget to add. (gtk.Widget)
  • mask - Which flags the widget is sensitive to. Expected values: MENU_FLAG_DATA, MENU_FLAG_UNDO, MENU_FLAG_REDO, MENU_FLAG_GRAPH, MENU_FLAG_LAST_PROC, MENU_FLAG_LAST_GRAPH, MENU_FLAG_DATA_MASK, MENU_FLAG_DATA_SHOW, MENU_FLAG_3D, MENU_FLAG_FILE, MENU_FLAG_VOLUME, MENU_FLAG_XYZ, MENU_FLAG_CURVE_MAP, MENU_FLAG_GRAPH_CURVE, MENU_FLAG_MASK. (MenuSensFlags)

gwy_app_sensitivity_get_group()

source code 

Gets the application-wide widget sensitvity group.

The flags to be used with this sensitvity group are defined in MenuSensFlags.

Returns:
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. (SensitivityGroup)

gwy_app_sensitivity_set_state(affected_mask, state)

source code 

Sets the state of application-wide widget sensitvity group.

The semantics of this function is the same as SensitivityGroup.set_state() (in fact, it's a simple wrapper around it).

Parameters:
  • affected_mask - Which bits in state to copy to state. Expected values: MENU_FLAG_DATA, MENU_FLAG_UNDO, MENU_FLAG_REDO, MENU_FLAG_GRAPH, MENU_FLAG_LAST_PROC, MENU_FLAG_LAST_GRAPH, MENU_FLAG_DATA_MASK, MENU_FLAG_DATA_SHOW, MENU_FLAG_3D, MENU_FLAG_FILE, MENU_FLAG_VOLUME, MENU_FLAG_XYZ, MENU_FLAG_CURVE_MAP, MENU_FLAG_GRAPH_CURVE, MENU_FLAG_MASK. (MenuSensFlags)
  • state - The new state (masked with affected_mask). Expected values: MENU_FLAG_DATA, MENU_FLAG_UNDO, MENU_FLAG_REDO, MENU_FLAG_GRAPH, MENU_FLAG_LAST_PROC, MENU_FLAG_LAST_GRAPH, MENU_FLAG_DATA_MASK, MENU_FLAG_DATA_SHOW, MENU_FLAG_3D, MENU_FLAG_FILE, MENU_FLAG_VOLUME, MENU_FLAG_XYZ, MENU_FLAG_CURVE_MAP, MENU_FLAG_GRAPH_CURVE, MENU_FLAG_MASK. (MenuSensFlags)

gwy_app_set_brick_title(data, id, name)

source code 

Sets volume data title.

Parameters:
  • data - A data container. (Container)
  • id - The volume data brick id. (int)
  • name - The title to set. It can be None to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). (string)

Since: 2.32

gwy_app_set_current_directory(directory)

source code 

Sets what the app should use as `current directory'.

Warning: This function is probably temporary.

Parameters:
  • directory - The directory to set, or a filename to take directory part from, it must be an absolute path. In GLib file name encoding. (string)

gwy_app_set_data_field_title(data, id, name)

source code 

Sets channel title.

Parameters:
  • data - A data container. (Container)
  • id - The data channel id. (int)
  • name - The title to set. It can be None to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). (string)

gwy_app_set_lawn_title(data, id, name)

source code 

Sets Lawn curve map data title.

Parameters:
  • data - A data container. (Container)
  • id - The Lawn curve map data channel id. (int)
  • name - The title to set. It can be None to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). (string)

Since: 2.60

gwy_app_set_surface_title(data, id, name)

source code 

Sets XYZ surface data title.

Parameters:
  • data - A data container. (Container)
  • id - The XYZ surface data channel id. (int)
  • name - The title to set. It can be None to use somthing like "Untitled". The id will be appended to it or (replaced in it if it already ends with digits). (string)

Since: 2.45

gwy_app_settings_create_config_dir()

source code 

Create gwyddion config directory.

Returns:
Whether it succeeded (also returns True if the directory already exists). (bool)

gwy_app_settings_error_quark()

source code 

Returns error domain for application settings operations.

See and use APP_SETTINGS_ERROR.

Returns:
The error domain. (int)

gwy_app_settings_get()

source code 

Gets the Gwyddion settings.

The program settings are a Container automatically loaded at program startup and saved ad its exit. For storing persistent module data manually you should use "/module/YOUR_MODULE_NAME/" prefix. However, in common cases you should use ParamDef and Params which can handle the dirty work themselves.

Returns:
The settings as a Container. (Container)

gwy_app_settings_get_log_filename()

source code 

Returns a suitable log file name.

Returns:
The file name as a newly allocated string. (string)

gwy_app_settings_get_recent_file_list_filename()

source code 

Returns a suitable recent file list file name.

Returns:
The file name as a newly allocated string. (string)

gwy_app_settings_get_settings_filename()

source code 

Returns a suitable human-readable settings file name.

Returns:
The file name as a newly allocated string. (string)

gwy_app_settings_load(filename)

source code 

Loads settings file.

Parameters:
  • filename - A filename to read settings from. (string)
Returns:
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 Container. (bool)

gwy_app_settings_save(filename)

source code 

Saves the settings.

Use gwy_app_settings_get_settings_filename() to obtain a suitable default filename.

Parameters:
  • filename - A filename to save the settings to. (string)
Returns:
Whether it succeeded. (bool)

gwy_app_setup_logging(flags)

source code 

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.

Parameters:
  • flags - Flags controlling how messages are handled. Expected values: APP_LOGGING_TO_FILE, APP_LOGGING_TO_CONSOLE. (AppLoggingFlags)

Since: 2.45

gwy_app_switch_tool(toolname)

source code 

Switches the current tool to given tool.

If the tool is already active it is shown when hidden and hidden when visible.

Parameters:
  • toolname - Tool name, that is type name of the tool object in the GLib type system. This can be for instance "ToolGrainMeasure". (string)

gwy_app_sync_data_items(source, dest, from_id, to_id, delete_too, items)

source code 

Synchronizes auxiliary image data items between data containers.

Parameters:
  • source - Source container. (Container)
  • dest - Target container (may be identical to source). (Container)
  • from_id - Data number to copy items from. (int)
  • to_id - Data number to copy items to. (int)
  • delete_too - True to delete items in target if source does not contain them, False to copy only. (bool)
  • items - (list)

gwy_app_undo_checkpoint(container, keys)

source code 

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.

Parameters:
  • container - (Container)
  • keys - (StringArray*)
Returns:
Undo level id (zero if undo/redo is disabled). Not useful (yet). (gulong)

gwy_app_undo_container_remove(data, prefix)

source code 

Removes undo/redo information for a data container.

In addition to what gwy_undo_container_remove() does, this function takes care of updating application controls state.

Parameters:
  • data - A data container managed by the data-browser. (Container)
  • prefix - Prefix to remove undo/redo information under. Pass None to remove undo/redo information altogether. (string)

Since: 2.23

gwy_app_undo_qcheckpoint(container, keys)

source code 

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.

Parameters:
Returns:
Undo level id. Not useful (yet). (gulong)

gwy_app_undo_redo_container(data)

source code 

Performs undo on a data container.

It must have redo available.

In addition to what gwy_undo_redo_container() does, this function takes care of updating application controls state.

Parameters:

gwy_app_undo_undo_container(data)

source code 

Performs undo on a data container.

It must have undo available.

In addition to what gwy_undo_undo_container() does, this function takes care of updating application controls state.

Parameters:

gwy_app_volume_log_add_volume(data, previd, newid)

source code 

Adds an entry to the log of the current volume data processing operations for volume data.

This simplified variant of gwy_app_volume_log_add() takes the currently running function volume data processing name and constructs the qualified function name from that.

Parameters:
  • data - A data container. (Container)
  • previd - Identifier of the previous (source) volume data in the container. Pass -1 for a no-source (or unclear source) operation. (int)
  • newid - Identifier of the new (target) volume data in the container. (int)

Since: 2.38

gwy_app_wait_cursor_finish(window)

source code 

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.

Parameters:
  • window - A window. (gtk.Window)

Since: 2.3

gwy_app_wait_cursor_start(window)

source code 

Changes the cursor for a window to indicate work.

This function lets the Gtk+ main loop to run.

Parameters:
  • window - A window. (gtk.Window)

Since: 2.3

gwy_app_wait_finish()

source code 

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.

gwy_app_wait_get_enabled()

source code 

Reports whether progress reporting is globally enabled.

Returns:
True if progress reporting is enabled, False if it is disabled. (bool)

Since: 2.48

gwy_app_wait_preview_data_field(dfield, data, id)

source code 

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 DataField.data_changed() on it to redraw the preview.

No preview is created if progress bars are disabled, see gwy_app_wait_set_enabled().

Parameters:
  • dfield - A data field used for preview. (DataField)
  • data - Data container with source image (or None). (Container)
  • id - Source image id (or -1). (int)
Returns:
The created DataView with the preview (possibly None if not preview was actually created). Usually you can ignore it. (gtk.Widget)

Since: 2.59

gwy_app_wait_set_enabled(setting)

source code 

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 None arguments.

Parameters:
  • setting - True to enable progress reporting, False to disable it. (bool)

Since: 2.48

gwy_app_wait_set_fraction(fraction)

source code 

Sets the amount of progress the progress bar on the dialog displays.

This function may let the Gtk+ main loop to run. It used to let the main loop to run always. Since version 2.46 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.

Parameters:
  • fraction - The progress of the operation, as a number from 0 to 1. (float)
Returns:
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. (bool)

gwy_app_wait_set_message(message)

source code 

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.

Parameters:
  • message - A mesage to show in the progress dialog. (string)
Returns:
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. (bool)

gwy_app_wait_set_message_prefix(prefix)

source code 

Sets prefix for the messages shown in the progress dialog.

The prefix will take effect in the next gwy_app_wait_set_message() call.

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.

Parameters:
  • prefix - The prefix for new messages. (string)
Returns:
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. (bool)

gwy_app_wait_set_preview_widget(widget)

source code 

Sets the preview widget of a wait dialogue.

This function needs to be used before gwy_app_wait_start() to have any effect.

Parameters:
  • widget - Preview widget, usually something like DataView. (gtk.Widget)

Since: 2.54

gwy_app_wait_start(window, message)

source code 

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.

Parameters:
  • window - A window. (gtk.Window)
  • message - A message to show in the wait dialog. (string)

gwy_app_wait_was_canceled()

source code 

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.

Returns:
True if the currently running calculation was cancelled. (bool)

Since: 2.49

gwy_app_xyz_log_add_xyz(data, previd, newid)

source code 

Adds an entry to the log of the current XYZ data processing operations for XYZ data.

This simplified variant of gwy_app_xyz_log_add() takes the currently running function XYZ data processing name and constructs the qualified function name from that.

Parameters:
  • data - A data container. (Container)
  • previd - Identifier of the previous (source) XYZ data in the container. Pass -1 for a no-source (or unclear source) operation. (int)
  • newid - Identifier of the new (target) XYZ data in the container. (int)

Since: 2.45

gwy_app_xyz_title_fall_back(data, id)

source code 

Adds a XYZ data title based on surface 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.

Parameters:
  • data - A data container. (Container)
  • id - XYZ surface data id. (int)
Returns:
True if the title was set (either by this function or before). (bool)

Since: 2.45

gwy_canonicalize_angle(phi, positive, oriented)

source code 

Canonicalizes an angle to requested interval.

For positive=False, oriented=False the output interval is [-π/2,π/2].

For positive=False, oriented=True the output interval is [-π,π].

For positive=True, oriented=False the output interval is [0,π).

For positive=True, oriented=True the output interval is [0,2π).

Parameters:
  • phi - Angle to canonicalize, in radians. (float)
  • positive - True if a positive angle is requested, False for outputs symmetrical around zero. (bool)
  • oriented - True for direction of a vector, False for the direction of a line (i.e. with no distinction between forward and backward direction). (bool)
Returns:
Canonicalized angle, equivalent (in given sense) to phi. (float)

Since: 2.50

gwy_canonicalize_path(path)

source code 

Canonicalizes a filesystem path.

Particularly it makes the path absolute, resolves `..' and `.', and fixes slash sequences to single slashes. On Win32 it also converts all backslashes to slashes along the way.

Note this function does NOT resolve symlinks, use g_file_read_link() for that.

Parameters:
  • path - A filesystem path. (string)
Returns:
The canonical path, as a newly created string. (string)

gwy_cdlines()

source code 

Gets inventory with all the critical dimension evaluators.

Returns:
Critical dimension evaluator inventory. (Inventory)

gwy_check_box_get_value(checkbox)

source code 

Gets the flag value associated with a check box.

Parameters:
  • checkbox - A check box belonging to a group created by gwy_check_boxes_create() or gwy_check_boxes_createl(). (gtk.Widget)
Returns:
The flag value corresponding to button. (int)

Since: 2.51

gwy_color_axis_new_with_range(orientation, min, max)

source code 

Creates a new color axis.

Parameters:
  • orientation - The orientation of the axis. (GtkOrientation)
  • min - The minimum. (float)
  • max - The maximum. (float)
Returns:
The newly created color axis as a GtkWidget. (gtk.Widget)

gwy_color_button_new_with_color(color)

source code 

Creates a new color button.

Parameters:
  • color - A RGBA to set the current color with. (const-RGBA*)
Returns:
a new color button. (gtk.Widget)

gwy_color_selector_for_mask(dialog_title, color_button, container, prefix)

source code 

Creates and runs a color selector dialog for a mask.

See gwy_mask_color_selector_run() for details.

Parameters:
  • dialog_title - Title of the color selection dialog (None to use default). (string)
  • color_button - Color button to update on color change (or None). (ColorButton)
  • container - Container to initialize the color from and save it to. (Container)
  • prefix - Prefix in container (normally "/0/mask"). (string)

gwy_combo_box_graph_curve_new(gmodel, current)

source code 

Creates an enum combo box with curves from a graph model.

This function is intended for selection of curves from static graphs in graph modules. The graph model is not permitted to change.

Parameters:
  • gmodel - A graph model. (GraphModel)
  • current - Index of currently selected curve. (int)
Returns:
The newly created combo box as GtkWidget. (gtk.Widget)

Since: 2.45

gwy_combo_box_metric_unit_new(from_, to, unit, active)

source code 

Creates an enum combo box with SI power of 10 multiplies.

The integer value is the power of 10.

Parameters:
  • from_ - (int)
  • to - The exponent of 10 the menu should end at (a multiple of 3, will be rounded upward if isn't). (int)
  • unit - The unit to be prefixed. (SIUnit)
  • active - The power of 10 to show as currently selected (a multiple of 3). (int)
Returns:
The newly created combo box as GtkWidget. (gtk.Widget)

gwy_combo_box_metric_unit_set_unit(combo, from_, to, unit)

source code 

Changes the unit selection displayed by a metric unit combo box.

Parameters:
  • combo - A combo box which was created with gwy_combo_box_metric_unit_new(). (gtk.ComboBox)
  • from_ - (int)
  • to - The exponent of 10 the menu should end at (a multiple of 3, will be rounded upward if isn't). (int)
  • unit - The unit to be prefixed. (SIUnit)

Since: 2.5

gwy_container_deserialize_from_text(text)

source code 

Restores a container from is text representation.

Parameters:
Returns:
The restored container, or None on failure. (Container)

gwy_create_dialog_preview_hbox(dialog, dataview, pack_end)

source code 

Creates the typical data processing dialog hbox with a preview.

The box is added to the dialog.

Parameters:
  • dialog - A data processing dialog. (gtk.Dialog)
  • dataview - Preview data view, usually created by gwy_create_preview(). (DataView)
  • pack_end - True to pack the data view to the end; False to pack it to the start. (bool)
Returns:
A new GtkBox widget. (gtk.Widget)

Since: 2.59

gwy_create_preview(data, id, size, have_mask)

source code 

Creates and sets up a preview widget for use in modules.

Parameters:
  • data - Data container with images to preview. (Container)
  • id - Data id of preview image in data. (int)
  • size - Preview size. Prefrably one of the standard sizes. (int)
  • have_mask - True if the preview will have mask and should be set up so. (bool)
Returns:
A new data view widget with the preview. (gtk.Widget)

Since: 2.59

gwy_create_preview_vector_layer(dataview, id, name, max_objects, editable)

source code 

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 name. You can query the layer using DataView functions.

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.

Parameters:
  • dataview - Preview data view, usually created by gwy_create_preview(). (DataView)
  • id - Data id of preview image in dataview's data. (int)
  • name - Layer/selection type name, without the Layer/Selection prefix. So usually "Point", "Line" or "Rectangle". (string)
  • max_objects - Maximum number of objects in the selection. (int)
  • editable - True for a user-editable selection, False to disable editing. (bool)
Returns:
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. (Selection)

Since: 2.61

gwy_curve_map_func_current()

source code 

Obtains the name of currently running curve map processing function.

If no curve map processing function is currently running, None is returned.

If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.

Returns:
The name of currently running curve map processing function or None. (string)

Since: 2.60

gwy_curve_map_func_exists(name)

source code 

Checks whether a curve map processing function exists.

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
True if function name exists, False otherwise. (bool)

Since: 2.60

gwy_curve_map_func_get_menu_path(name)

source code 

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

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
The menu path. The returned string is owned by the module. (string)

Since: 2.60

gwy_curve_map_func_get_run_types(name)

source code 

Returns run modes supported by a curve map processing function.

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
The run mode bit mask. (RunType)

Since: 2.60

gwy_curve_map_func_get_sensitivity_mask(name)

source code 

Gets menu sensititivy mask for a curve map processing function.

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
The menu item sensitivity mask (a combination of MenuSensFlags flags). (int)

Since: 2.60

gwy_curve_map_func_get_stock_id(name)

source code 

Gets stock icon id of a curve map processing function.

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
The stock icon id. The returned string is owned by the module. (string)

Since: 2.60

gwy_curve_map_func_get_tooltip(name)

source code 

Gets tooltip for a curve map processing function.

Parameters:
  • name - Curve map data processing function name. (string)
Returns:
The tooltip. The returned string is owned by the module. (string)

Since: 2.60

gwy_curve_map_func_run(name, data, run)

source code 

Runs a curve map processing function identified by name.

Parameters:
  • name - Curve map data processing function name. (string)
  • data - Data (a Container). (Container)
  • run - How the function should be run. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

Since: 2.60

gwy_data_chooser_new_channels()

source code 

Creates a data chooser for data channels.

Returns:
A new channel chooser. Nothing may be assumed about the type and properties of the returned widget as they can change in the future. (gtk.Widget)

gwy_data_chooser_new_curve_maps()

source code 

Creates a data chooser for curve map data.

Returns:
A new curve map data chooser. Nothing may be assumed about the type and properties of the returned widget as they can change in the future. (gtk.Widget)

Since: 2.60

gwy_data_chooser_new_graphs()

source code 

Creates a data chooser for graphs.

Returns:
A new graph chooser. Nothing may be assumed about the type and properties of the returned widget as they can change in the future. (gtk.Widget)

Since: 2.41

gwy_data_chooser_new_volumes()

source code 

Creates a data chooser for volume data.

Returns:
A new volume chooser. Nothing may be assumed about the type and properties of the returned widget as they can change in the future. (gtk.Widget)

Since: 2.33

gwy_data_chooser_new_xyzs()

source code 

Creates a data chooser for XYZ data.

Returns:
A new XYZ data chooser. Nothing may be assumed about the type and properties of the returned widget as they can change in the future. (gtk.Widget)

Since: 2.45

gwy_data_field_correlate_finalize(state)

source code 

Destroys a correlation iterator, freeing all resources.

Parameters:
  • state - Correlation iterator. (ComputationState*)

gwy_data_field_correlate_iteration(state)

source code 

Performs one iteration of correlation.

An iterator can be created with DataField.correlate_init(). When iteration ends, either by finishing or being aborted, DataField.correlate_finalize() must be called to release allocated resources.

Parameters:
  • state - Correlation iterator. (ComputationState*)

gwy_data_field_crosscorrelate_finalize(state)

source code 

Destroys a cross-correlation iterator, freeing all resources.

Parameters:
  • state - Cross-correlation iterator. (ComputationState*)

gwy_data_field_crosscorrelate_iteration(state)

source code 

Performs one iteration of cross-correlation.

Cross-correlation matches two different images of the same object under changes.

It does not use any special features for matching. It simply searches for all points (with their neighbourhood) of data_field1 within data_field2. Parameters search_width and search_height determine maimum area where to search for points. The area is cenetered in the data_field2 at former position of points at data_field1.

A cross-correlation iterator can be created with DataField.crosscorrelate_init(). When iteration ends, either by finishing or being aborted, DataField.crosscorrelate_finalize() must be called to release allocated resources.

Parameters:
  • state - Cross-correlation iterator. (ComputationState*)

gwy_data_field_crosscorrelate_set_weights(state, type)

source code 

Sets the weight function to be used within iterative cross-correlation algorithm.

By default (not setting it), rectangular windowing is used. This function should be called before running first iteration to get consistent results.

Parameters:
  • state - Cross-correlation iterator. (ComputationState*)
  • type - Set windowing type to be set as correlation weight, see WindowingType for details. Expected values: WINDOWING_NONE, WINDOWING_HANN, WINDOWING_HAMMING, WINDOWING_BLACKMANN, WINDOWING_LANCZOS, WINDOWING_WELCH, WINDOWING_RECT, WINDOWING_NUTTALL, WINDOWING_FLAT_TOP, WINDOWING_KAISER25. (WindowingType)

gwy_data_field_fractal_cubecounting_dim(xresult, yresult)

source code 

Computes fractal dimension by cube counting method from log-log plot data.

The xresult and yresult data lines are usually calculated by DataField.fractal_cubecounting().

Parameters:
  • xresult - Log-log fractal data (x values). (DataLine)
  • yresult - Log-log fractal data (y values). (DataLine)
Returns:
Tuple consisting of 3 values (value, a, b). ((float), (float), (float))

gwy_data_field_fractal_partitioning_dim(xresult, yresult)

source code 

Computes fractal dimension by partitioning method from log-log plot data.

The xresult and yresult data lines are usually calculated by DataField.fractal_partitioning().

Parameters:
  • xresult - Log-log fractal data (x values). (DataLine)
  • yresult - Log-log fractal data (y values). (DataLine)
Returns:
Tuple consisting of 3 values (value, a, b). ((float), (float), (float))

gwy_data_field_fractal_psdf_dim(xresult, yresult)

source code 

Computes fractal dimension by spectral density function method from log-log plot data.

The xresult and yresult data lines are usually calculated by DataField.fractal_psdf().

Parameters:
  • xresult - Log-log fractal data (x values). (DataLine)
  • yresult - Log-log fractal data (y values). (DataLine)
Returns:
Tuple consisting of 3 values (value, a, b). ((float), (float), (float))

gwy_data_field_fractal_triangulation_dim(xresult, yresult)

source code 

Computes fractal dimension by triangulation method from log-log plot data.

The xresult and yresult data lines are usually calculated by DataField.fractal_triangulation().

Parameters:
  • xresult - Log-log fractal data (x values). (DataLine)
  • yresult - Log-log fractal data (y values). (DataLine)
Returns:
Tuple consisting of 3 values (value, a, b). ((float), (float), (float))

gwy_data_field_get_circular_area_size(radius)

source code 

Calculates an upper bound of the number of samples in a circular region.

Parameters:
  • radius - Circular area radius (in pixels). (float)
Returns:
The number of pixels in a circular region with given rectangular bounds (or its upper bound). (int)

gwy_data_field_get_elliptic_area_size(width, height)

source code 

Calculates an upper bound of the number of samples in an elliptic region.

This function is useful for elliptic areas more or less contained within the data field. Otherwise the returned size can be overestimated a lot. Use DataField.get_elliptic_intersection() for elliptic areas intersecting the data field in arbitrary manner.

Parameters:
  • width - Bounding box width. (int)
  • height - Bounding box height. (int)
Returns:
The number of pixels in an elliptic region with given rectangular bounds (or its upper bound). (int)

gwy_data_field_grains_watershed_finalize(state)

source code 

Destroys a watershed iterator, freeing all resources.

Parameters:
  • state - Watershed iterator. (ComputationState*)

gwy_data_field_grains_watershed_iteration(state)

source code 

Performs one iteration of the watershed algorithm.

Fields state and progress fraction of watershed state are updated (fraction is calculated for each phase individually). Once state becomes WATERSHED_STATE_FINISHED, the calculation is finised.

A watershed iterator can be created with DataField.grains_watershed_init(). When iteration ends, either by finishing or being aborted, DataField.grains_watershed_finalize() must be called to release allocated resources.

Parameters:
  • state - Watershed iterator. (ComputationState*)

gwy_data_field_unrotate_find_corrections(derdist)

source code 

Finds rotation corrections.

Rotation correction is computed for for all symmetry types. In addition an estimate is made about the prevalent one.

Parameters:
Returns:
Tuple consisting of 2 values (value, correction). ((PlaneSymmetry), (list))

gwy_data_window_class_get_tooltips()

source code 

Gets the tooltips object used for adding tooltips to Data window parts.

This function does not do anything useful. Do not use it.

Returns:
The GtkTooltips object. (gtk.Tooltips)

gwy_data_window_class_set_tooltips(tips)

source code 

Sets the tooltips object to use for adding tooltips to data window parts.

This function does not do anything useful. Do not use it.

This is a class method. It affects only newly cerated data windows, existing data windows will continue to use the tooltips they were constructed with.

If no class tooltips object is set before first DataWindow is created, the class instantiates one on its own. You can normally obtain it with DataWindow.class_get_tooltips() then. The class takes a reference on the tooltips in either case.

Parameters:
  • tips - Tooltips object DataWindow's should use for setting tooltips. A None value disables tooltips altogether. (gtk.Tooltips)

gwy_dialog_prevent_delete_cb()

source code 

Returns True.

Use gtk_true() instead.

Returns:
True. (bool)

gwy_draw_data_field_map_adaptive(data_field, z)

source code 

Maps ordinate values to interval [0,1] as gwy_pixbuf_draw_data_field_adaptive() would do.

This is useful to find out which positions in the false colour gradient correspond to specific values.

Parameters:
  • data_field - A data field to draw. (DataField)
  • z - Array of n data values to map. (list)
Returns:
(list)

Since: 2.39

gwy_draw_type_init()

source code 

Makes libgwydraw types safe for deserialization and performs other initialization. You have to call this function before using objects from libgwydraw.

Calls gwy_process_type_init() first to make sure libgwyprocess is initialized.

It is safe to call this function more than once, subsequent calls are no-op.

gwy_dwt_set_coefficients(dline, type)

source code 

Fills resampled or nely allocated data line with wavelet coefficients.

Parameters:
  • dline - Data line to store wavelet coefficients to (or None to allocate a new one). (DataLine)
  • type - Wavelet type. Expected values: DWT_HAAR, DWT_DAUB4, DWT_DAUB6, DWT_DAUB8, DWT_DAUB12, DWT_DAUB20. (DWTType)
Returns:
resampled or newly allocated DataLine with wavelet coefficients. (DataLine)

gwy_entities()

source code 

Returns a constant inventory with all available entities.

Returns:
The entities as a Inventory. (Inventory)

gwy_entities_entity_to_utf8(entity)

source code 

Converts a single named entity entity to UTF-8 representation.

The string passed to this function should be a bare entity name, i.e. it should not contain the ampersand and semicolon.

Parameters:
  • entity - A single entity name, as a nul-delimited string. (string)
Returns:
entity if the name was not recognized, or a valid UTF-8 string. If the returned string is not equal to entities, it's owned by entities and must not be freed nor modified. (string)

gwy_entities_text_to_utf8(text)

source code 

Converts entities in a text to UTF-8.

Parameters:
  • text - A nul-delimited string. (string)
Returns:
A newly allocated nul-delimited string containing the converted text. (string)

gwy_enum_combo_box_get_active(combo)

source code 

Gets the enum value corresponding to currently active combo box item.

Parameters:
  • combo - A combo box which was created with gwy_enum_combo_box_new(). (gtk.ComboBox)
Returns:
The selected enum value. (int)

gwy_enum_combo_box_set_active(combo, active)

source code 

Sets the active combo box item by corresponding enum value.

Parameters:
  • combo - A combo box which was created with gwy_enum_combo_box_new(). (gtk.ComboBox)
  • active - The enum value to show as currently selected. (int)

gwy_enum_combo_box_update_int(combo)

source code 

Convenience callback keeping an integer synchronized with selected enum combo box value.

Parameters:
  • combo - A combo box which was created with gwy_enum_combo_box_new(). (gtk.ComboBox)
Returns:
Value integer. ((int))

gwy_enum_sanitize_value(enumval, enum_type)

source code 

Makes sure an enum value is valid.

Parameters:
  • enumval - An enum value. (int)
  • enum_type - GType of a registered enum type. (GType)
Returns:
Either enumval itself if it's valid, or some valid enum value. When enumval is invalid and larger than all valid values the largest valid value is returned. Likewise if it's smaller the smallest valid value is returned. If it's in range but invalid, the first enum value is returned. (int)

gwy_expr_error_quark()

source code 

Returns error domain for expression parsin and evaluation.

See and use EXPR_ERROR.

Returns:
The error domain. (int)

gwy_fd_curve_presets()

source code 

Gets inventory with all the FD curve presets.

Returns:
FD curve preset inventory. (Inventory)

Since: 2.7

gwy_fft_find_nice_size(size)

source code 

Finds a nice-for-FFT array size.

Here ‘nice’ means three properties are guaranteed: it is greater than or equal to size; it can be directly used with current FFT backend without scaling (since 2.8 this is true for any size); and the transform is fast, i.e. the number is highly factorable.

To be compatible with Gwyddion <= 2.7 one has to pass only data fields and lines with sizes returned by this function to raw integral transforms. Otherwise this function is mainly useful if you extend and pad the input data for other reasons and thus have the freedom to choose a convenient transform size.

Parameters:
  • size - Transform size. (int)
Returns:
A nice FFT array size. (int)

gwy_fft_window(data, windowing)

source code 

Multiplies data by given window.

Parameters:
  • data - Data values. (list)
  • windowing - Method used for windowing. Expected values: WINDOWING_NONE, WINDOWING_HANN, WINDOWING_HAMMING, WINDOWING_BLACKMANN, WINDOWING_LANCZOS, WINDOWING_WELCH, WINDOWING_RECT, WINDOWING_NUTTALL, WINDOWING_FLAT_TOP, WINDOWING_KAISER25. (WindowingType)
Returns:
(list)

gwy_fft_window_data_field(dfield, orientation, windowing)

source code 

Performs windowing of a data field in given direction.

This is an old alias for DataField.fft_window_1d().

Parameters:
  • dfield - A data field. (DataField)
  • orientation - Windowing orientation (the same as corresponding FFT orientation). Expected values: ORIENTATION_HORIZONTAL, ORIENTATION_VERTICAL. (Orientation)
  • windowing - The windowing type to use. Expected values: WINDOWING_NONE, WINDOWING_HANN, WINDOWING_HAMMING, WINDOWING_BLACKMANN, WINDOWING_LANCZOS, WINDOWING_WELCH, WINDOWING_RECT, WINDOWING_NUTTALL, WINDOWING_FLAT_TOP, WINDOWING_KAISER25. (WindowingType)

gwy_file_abandon_contents(buffer, size)

source code 

Frees or unmmaps memory allocated by gwy_file_get_contents().

Parameters:
  • buffer - Buffer with file contents as created by gwy_file_get_contents(). (guchar*)
  • size - Buffer size. (gsize)
Returns:
Whether it succeeded. Since 2.22 it always return True. (bool)

gwy_file_channel_import_log_add(data, id, filetype, filename)

source code 

Logs the import of a channel from third-party file.

This is a convenience wrapper for gwy_app_channel_log_add(). The source id will be set to -1. The file name will be added to function arguments.

Parameters:
  • data - A data container. (Container)
  • id - Data channel id. (int)
  • filetype - File type, i.e. the name of the function importing the data (without any "file::" prefix). Since 2.38 it is possible to pass None to fill the name of the currently running file type function automatically. (string)
  • filename - 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. (string)

Since: 2.35

gwy_file_curve_map_import_log_add(data, id, filetype, filename)

source code 

Logs the import of volume data from third-party file.

This is a convenience wrapper for gwy_app_curve_map_log_add(). The source id will be set to -1. The file name will be added to function arguments.

Parameters:
  • data - A data container. (Container)
  • id - Volume data id. (int)
  • filetype - File type, i.e. the name of the function importing the data (without any "file::" prefix). Since 2.38 it is possible to pass None to fill the name of the currently running file type function automatically. (string)
  • filename - 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. (string)

Since: 2.60

gwy_file_detect(filename, only_name, operations)

source code 

Detects the type of a file.

Parameters:
  • filename - A file name to detect type of. (string)
  • only_name - Whether to use only file name for a guess, or try to actually access the file. (bool)
  • operations - The file operations the file type must support (it must support all of them to be considered). Expected values: FILE_OPERATION_DETECT, FILE_OPERATION_LOAD, FILE_OPERATION_SAVE, FILE_OPERATION_EXPORT, FILE_OPERATION_MASK. (FileOperationType)
Returns:
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 None if there's no probable one. (string)

gwy_file_detect_with_score(filename, only_name, operations)

source code 

Detects the type of a file and gives the score.

Parameters:
  • filename - A file name to detect type of. (string)
  • only_name - Whether to use only file name for a guess, or try to actually (bool)
  • operations - The file operations the file type must support (it must Expected values: FILE_OPERATION_DETECT, FILE_OPERATION_LOAD, FILE_OPERATION_SAVE, FILE_OPERATION_EXPORT, FILE_OPERATION_MASK. (FileOperationType)
Returns:
Tuple consisting of 2 values (value, score). ((string), (int))

Since: 2.1

gwy_file_func_current()

source code 

Obtains the name of currently running file type function.

Detection routines are not included, only load, save and export functions.

If no file type function is currently running, None is returned.

If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.

Returns:
The name of currently running file type function or None. (string)

Since: 2.38

gwy_file_func_exists(name)

source code 

Checks whether a file type function exists.

Parameters:
  • name - File type function name. (string)
Returns:
True if function name exists, False otherwise. (bool)

gwy_file_func_get_description(name)

source code 

Gets file function description.

That is, the description argument of gwy_file_func_register() .

Parameters:
  • name - File type function name. (string)
Returns:
File function description, as a string owned by module loader. (string)

gwy_file_func_get_is_detectable(name)

source code 

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

Parameters:
  • name - File type function name. (string)
Returns:
If the file format is detectable. (bool)

Since: 2.18

gwy_file_func_get_operations(name)

source code 

Returns operations supported by a file type function.

Parameters:
  • name - File type function name. (string)
Returns:
The file operation bit mask, zero if name does not exist. (FileOperationType)

gwy_file_func_run_detect(name, filename, only_name)

source code 

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.

Parameters:
  • name - A file type function name. (string)
  • filename - A file name to detect. (string)
  • only_name - Whether to use only file name for a guess, or try to actually access the file. (bool)
Returns:
An integer score expressing the likehood of the file being loadable as this type. A basic scale is 20 for a good extension, 100 for good magic header, more for more thorough tests. (int)

gwy_file_func_run_export(name, data, filename, mode)

source code 

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.

Parameters:
  • name - A file save function name. (string)
  • data - A Container to save. (Container)
  • filename - A file name to save data as. (string)
  • mode - Run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)
Returns:
True if file save succeeded, False otherwise. (bool)

gwy_file_func_run_load(name, filename, mode)

source code 

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.

Parameters:
  • name - A file load function name. (string)
  • filename - A file name to load data from. (string)
  • mode - Run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)
Returns:
A new Container with data from filename, or None. (Container)

gwy_file_func_run_save(name, data, filename, mode)

source code 

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.

Parameters:
  • name - A file save function name. (string)
  • data - A Container to save. (Container)
  • filename - A file name to save data as. (string)
  • mode - Run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)
Returns:
True if file save succeeded, False otherwise. (bool)

gwy_file_func_set_is_detectable(name, is_detectable)

source code 

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.

Parameters:
  • name - File type function name. (string)
  • is_detectable - True to define format as detectable, False as non-detectable. (bool)

Since: 2.18

gwy_file_get_filename_sys(data)

source code 

Gets the file name corresponding to a data container.

The file name is set on two ocasions: file load and successful file save. File export does not set it.

Parameters:
Returns:
File name of data (in GLib encoding), or None. The returned string is owned by module system and is valid only until the container is destroyed or saved again. (string)

Since: 2.36

gwy_file_load(filename, mode)

source code 

Loads a data file, autodetecting its type.

Parameters:
  • filename - A file name to load data from, in GLib encoding. (string)
  • mode - Run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)
Returns:
A new Container with data from filename, or None. (Container)

gwy_file_save(data, filename, mode)

source code 

Saves a data file, deciding to save as what type from the file name.

It tries to find a module implementing FILE_OPERATION_SAVE first, when it does not succeed, it falls back to FILE_OPERATION_EXPORT.

Parameters:
  • data - A Container to save. (Container)
  • filename - A file name to save the data as, in GLib encoding. (string)
  • mode - Run mode. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)
Returns:
The save operation that was actually realized on success, zero on failure. (FileOperationType)

gwy_file_volume_import_log_add(data, id, filetype, filename)

source code 

Logs the import of volume data from third-party file.

This is a convenience wrapper for gwy_app_volume_log_add(). The source id will be set to -1. The file name will be added to function arguments.

Parameters:
  • data - A data container. (Container)
  • id - Volume data id. (int)
  • filetype - File type, i.e. the name of the function importing the data (without any "file::" prefix). Since 2.38 it is possible to pass None to fill the name of the currently running file type function automatically. (string)
  • filename - 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. (string)

Since: 2.35

gwy_file_xyz_import_log_add(data, id, filetype, filename)

source code 

Logs the import of xyz data from third-party file.

This is a convenience wrapper for gwy_app_xyz_log_add(). The source id will be set to -1. The file name will be added to function arguments.

Parameters:
  • data - A data container. (Container)
  • id - XYZ surface data id. (int)
  • filetype - File type, i.e. the name of the function importing the data (without any "file::" prefix). It is possible to pass None to fill the name of the currently running file type function automatically. (string)
  • filename - 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. (string)

Since: 2.45

gwy_filename_ignore(filename_sys)

source code 

Checks whether file should be ignored.

This function checks for common file names indicating files that should be normally ignored. Currently it means backup files (ending with ~ or .bak) and Unix hidden files (starting with a dot).

Parameters:
  • filename_sys - File name in GLib encoding. (string)
Returns:
True to ignore this file, False otherwise. (bool)

gwy_find_self_dir(dirname)

source code 

Finds a system Gwyddion directory.

On Unix, a compiled-in path is returned, unless it's overriden with environment variables (see gwyddion manual page).

On Win32, the directory where the libgwyddion DLL from which this function was called resides is taken as the base and the location of other Gwyddion directories is calculated from it.

The returned value is not actually tested for existence, it's up to caller.

To obtain the Gwyddion user directory see gwy_get_user_dir().

Parameters:
  • dirname - A gwyddion directory name: "modules", "plugins", "pixmaps", "locale", or "data". (string)
Returns:
The path as a newly allocated string. (string)

gwy_fopen(filename, mode)

source code 

A wrapper for the stdio fopen() function. The fopen() function opens a file and associates a new stream with it.

Because file descriptors are specific to the C library on Windows, and a file descriptor is part of the FILE struct, the FILE* returned by this function makes sense only to functions in the same C library. Thus if the GLib-using code uses a different C library than GLib does, the FILE* returned by this function cannot be passed to C library functions like fprintf() or fread().

See your C library manual for more details about fopen().

Parameters:
  • filename - a pathname in the GLib file name encoding (UTF-8 on Windows) (string)
  • mode - a string describing the mode in which the file should be opened (string)
Returns:
A FILE* if the file was successfully opened, or None if an error occurred. (FILE*)

Since: 2.43

gwy_func_use_get(functions, i)

source code 

Gets the n-th most function from a function statistics.

Parameters:
  • functions - Function use statistics. (FunctionUse*)
  • i - Position in the top used functions (starting from 0). (int)
Returns:
The function name, or None if there are not more functions with use statistics records than i. (string)

gwy_func_use_get_filename(type)

source code 

Gets the (preferred) name for a file to store function use statistics to.

Parameters:
  • type - Function type, that is an identifier of the type of statistics gathered. It must be a valid identifier. (string)
Returns:
The file name as a newly allocated string. (string)

gwy_get_home_dir()

source code 

Returns home directory, or temporary directory as a fallback.

Under normal circumstances the same string as g_get_home_dir() would return is returned. But on MS Windows, something like "C:\Windows\Temp" can be returned too, as it is as good as anything else (we can write there).

Returns:
Something usable as user home directory. It may be silly, but never None or empty. (string)

gwy_get_user_dir()

source code 

Returns the directory where Gwyddion user settings and data should be stored.

On Unix this is usually a dot-directory in user's home directory. On modern Win32 the returned directory resides in user's Documents and Settings. On silly platforms or silly occasions, silly locations (namely a temporary directory) can be returned as fallback.

To obtain a Gwyddion system directory see gwy_find_self_dir().

Returns:
The directory as a constant string that should not be freed. (string)

gwy_gl_material_selection_get_active(selection)

source code 

Gets the name of currently selected GL material of a selection button.

Parameters:
  • selection - GL material selection button. (gtk.Widget)
Returns:
Name as a string owned by the selected GL material. (string)

gwy_gl_material_selection_new(active)

source code 

Creates a GL material selection button.

Parameters:
  • active - GL material name to be shown as currently selected (or None for default). (string)
Returns:
The newly created GL material selection button as GtkWidget. (gtk.Widget)

gwy_gl_material_selection_set_active(selection, active)

source code 

Sets the currently selected GL material of a selection button.

Parameters:
  • selection - GL material selection button. (gtk.Widget)
  • active - GL material name to be shown as currently selected. (string)

gwy_gl_material_tree_view_new(active)

source code 

Creates a tree view with GL material list.

Parameters:
  • active - GL material name to be shown as currently selected (or None for default). (string)
Returns:
The newly created GL material tree view as GtkWidget. (gtk.Widget)

gwy_gl_material_tree_view_set_active(treeview, active)

source code 

Selects a GL material in a GL material list and scrolls to make it visible.

Parameters:
  • treeview - A GL material selector tree view. (gtk.Widget)
  • active - GL material name to be shown as currently selected. (string)
Returns:
True if active was selected, False if there is no such GL material. (bool)

gwy_gl_materials()

source code 

Gets inventory with all the GL materials.

Returns:
GL material inventory. (Inventory)

gwy_gl_materials_get_gl_material(name)

source code 

Convenience function to get a GL material from gwy_gl_materials() by name.

Parameters:
  • name - GL material name. May be None to get the default GL material. (string)
Returns:
GL material identified by name or the default GL material if name does not exist. (GLMaterial)

gwy_gradient_selection_get_active(selection)

source code 

Gets the name of currently selected gradient of a selection button.

Parameters:
  • selection - Gradient selection button. (gtk.Widget)
Returns:
Name as a string owned by the selected gradient. (string)

gwy_gradient_selection_new(active)

source code 

Creates a gradient selection button.

Parameters:
  • active - Gradient name to be shown as currently selected (or None for default). (string)
Returns:
The newly created gradient selection button as GtkWidget. (gtk.Widget)

gwy_gradient_selection_set_active(selection, active)

source code 

Sets the currently selected gradient of a selection button.

Parameters:
  • selection - Gradient selection button. (gtk.Widget)
  • active - Gradient name to be shown as currently selected. (string)

gwy_gradient_tree_view_new(active)

source code 

Creates a tree view with gradient list.

Parameters:
  • active - Gradient name to be shown as currently selected (or None for default). (string)
Returns:
The newly created gradient tree view as GtkWidget. (gtk.Widget)

gwy_gradient_tree_view_set_active(treeview, active)

source code 

Selects a gradient in a gradient list and scrolls to make it visible.

Parameters:
  • treeview - A gradient selector tree view. (gtk.Widget)
  • active - Gradient name to be shown as currently selected. (string)
Returns:
True if active was selected, False if there is no such gradient. (bool)

gwy_gradients()

source code 

Gets inventory with all the gradients.

Returns:
Gradient inventory. (Inventory)

gwy_gradients_get_gradient(name)

source code 

Convenience function to get a gradient from gwy_gradients() by name.

Parameters:
  • name - Gradient name. May be None to get the default gradient. (string)
Returns:
Gradient identified by name or the default gradient if name does not exist. (Gradient)

gwy_graph_draw_line(drawable, gc, x_from, y_from, x_to, y_to, line_style, size, color)

source code 

Draws a line segment on a drawable.

Parameters:
  • drawable - A drawable. (gdk.Drawable)
  • gc - Graphics context. It is modified by this function unpredictably. (gdk.GC)
  • x_from - x coordinate of the start point of the line (int)
  • y_from - y coordinate of the start point of the line (int)
  • x_to - x coordinate of the end point of the line (int)
  • y_to - y coordinate of the end point of the line (int)
  • line_style - graph line style (GdkLineStyle)
  • size - point size (int)
  • color - point color (const-RGBA*)

gwy_graph_draw_point(drawable, gc, x, y, type, size, color)

source code 

Draws a point on a drawable.

Parameters:
  • drawable - A drawable. (gdk.Drawable)
  • gc - Graphics context. It is modified by this function unpredictably. (gdk.GC)
  • x - X coordinate of the point. (int)
  • y - Y coordinate of the point. (int)
  • type - graph point type Expected values: GRAPH_POINT_SQUARE, GRAPH_POINT_CROSS, GRAPH_POINT_CIRCLE, GRAPH_POINT_STAR, GRAPH_POINT_TIMES, GRAPH_POINT_TRIANGLE_UP, GRAPH_POINT_TRIANGLE_DOWN, GRAPH_POINT_DIAMOND, GRAPH_POINT_FILLED_SQUARE, GRAPH_POINT_DISC, GRAPH_POINT_FILLED_CIRCLE, GRAPH_POINT_FILLED_TRIANGLE_UP, GRAPH_POINT_FILLED_TRIANGLE_DOWN, GRAPH_POINT_FILLED_DIAMOND, GRAPH_POINT_TRIANGLE_LEFT, GRAPH_POINT_FILLED_TRIANGLE_LEFT, GRAPH_POINT_TRIANGLE_RIGHT, GRAPH_POINT_FILLED_TRIANGLE_RIGHT, GRAPH_POINT_ASTERISK. (GraphPointType)
  • size - point size (int)
  • color - point color (const-RGBA*)

gwy_graph_func_current()

source code 

Obtains the name of currently running graph function.

If no graph function is currently running, None is returned.

If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.

Returns:
The name of currently running graph function or None. (string)

Since: 2.38

gwy_graph_func_exists(name)

source code 

Checks whether a graph function exists.

Parameters:
  • name - Graph function name. (string)
Returns:
True if function name exists, False otherwise. (bool)

gwy_graph_func_get_menu_path(name)

source code 

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

Parameters:
  • name - Graph function name. (string)
Returns:
The menu path. The returned string is owned by the module. (string)

gwy_graph_func_get_sensitivity_mask(name)

source code 

Gets menu sensititivy mask for a graph function.

Parameters:
  • name - Graph function name. (string)
Returns:
The menu item sensitivity mask (a combination of MenuSensFlags flags). (int)

gwy_graph_func_get_stock_id(name)

source code 

Gets stock icon id of a graph function.

Parameters:
  • name - Graph function name. (string)
Returns:
The stock icon id. The returned string is owned by the module. (string)

gwy_graph_func_get_tooltip(name)

source code 

Gets tooltip for a graph function.

Parameters:
  • name - Graph function name. (string)
Returns:
The tooltip. The returned string is owned by the module. (string)

gwy_graph_func_run(name, graph)

source code 

Runs a graph function identified by name.

Parameters:
  • name - Graph function name. (string)
  • graph - Graph (a Graph). (Graph)

gwy_graph_get_n_preset_colors()

source code 

Gets the number of distinct colors Graph.get_preset_color() can return.

Returns:
The number of distinct colors. (int)

gwy_graph_get_preset_color(i)

source code 

Gets a preset graph color.

Preset colors are a set of selected colors one can use to distingush graph curves when there is no reason to prefer a particular color. Note they can occasionally change between version, even their number can change.

Parameters:
  • i - Color number, starting from 0 which is always black. It can be any number but colors start to repeat after Graph.get_n_preset_colors() colors. (int)
Returns:
A constant color that must not be neither modified nor freed. (const-RGBA*)

gwy_graph_window_class_get_tooltips()

source code 

Gets the tooltips object used for adding tooltips to Graph window parts.

This function does not do anything useful. Do not use it.

Returns:
The GtkTooltips object. (Do not free). (gtk.Tooltips)

gwy_graph_window_class_set_tooltips(tips)

source code 

Sets the tooltips object to use for adding tooltips to graph window parts.

This function does not do anything useful. Do not use it.

This is a class method. It affects only newly created graph windows, existing graph windows will continue to use the tooltips they were constructed with.

If no class tooltips object is set before first GraphWindow is created, the class instantiates one on its own. You can normally obtain it with Graph.window_class_get_tooltips() then. The class takes a reference on the tooltips in either case.

Parameters:
  • tips - GtkTooltips object GraphWindow should use for setting tooltips. A None value disables tooltips altogether. (gtk.Tooltips)

gwy_help_add_to_cmap_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a curve map data processing function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.60

gwy_help_add_to_file_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a file function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_graph_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a graph function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_proc_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a data processing function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_volume_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a volume data processing function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_window(window, filename, fragment, flags)

source code 

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.

Parameters:
  • window - A window. (gtk.Window)
  • filename - Base file name in the user guide without any path or extensions, for instance "statistical-analysis". (string)
  • fragment - Fragment identifier (without "#"), or possibly None. (string)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_window_uri(window, uri, flags)

source code 

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.

Parameters:
  • window - A window. (gtk.Window)
  • uri - Full URI pointing to the help for window. (string)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.38

gwy_help_add_to_xyz_dialog(dialog, flags)

source code 

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.

Parameters:
  • dialog - Main dialog for a XYZ data processing function. (gtk.Dialog)
  • flags - Flags allowing to modify the help setup. Expected values: HELP_DEFAULT, HELP_NO_BUTTON. (HelpFlags)

Since: 2.45

gwy_help_is_available()

source code 

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.

Returns:
True if help seems available, False if it is not. (bool)

Since: 2.38

gwy_help_show(filename, fragment)

source code 

Immediately shows a specific help location.

This function should be rarely needed. It may fail if help is not available.

Parameters:
  • filename - Base file name in the user guide without any path or extensions, for instance "statistical-analysis". (string)
  • fragment - Fragment identifier (without "#"), or possibly None. (string)

Since: 2.38

gwy_interpolation_get_dval(x, x1_, y1_, x2_, y2_, interpolation)

source code 

This function uses two-point interpolation methods to get interpolated value between two arbitrary data points.

Parameters:
  • x - requested value coordinate (float)
  • x1_ - x coordinate of first value (float)
  • y1_ - y coordinate of first value (float)
  • x2_ - x coordinate of second value (float)
  • y2_ - y coordinate of second value (float)
  • interpolation - interpolation type Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
interpolated value (float)

gwy_interpolation_get_dval_of_equidists(x, data, interpolation)

source code 

Computes interpolated value from 2 or 4 equidistant values.

For INTERPOLATION_NONE no data value is actually used, and zero is returned.

For INTERPOLATION_ROUND or INTERPOLATION_LINEAR it is enough to set middle two data values, that to use data in format {0, data[i], data[i+1], 0} and function computes value at data[i+x] (the outer values are not used).

For four value interpolations you have to prepare data as {data[i-1], data[i], data[i+1], data[i+2]} and function again returns value at data[i+x].

Interpolation with non-interpolating bases are silently replaced with an interpolating function with the same support size. See gwy_interpolation_interpolate_1d() for a function interpolating from interpolation coefficients.

Parameters:
  • x - Possibily noninteger position in data to get value at. (float)
  • data - Array of 4 values to interpolate between (see below). (list)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
Value result. ((float))

gwy_interpolation_get_support_size(interpolation)

source code 

Obtains the basis support size for an interpolation type.

Parameters:
  • interpolation - Interpolation type. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
The length of the support interval of the interpolation basis. (int)

Since: 2.2

gwy_interpolation_has_interpolating_basis(interpolation)

source code 

Obtains the interpolating basis property of an inteprolation type.

Interpolation types with inteprolating basis directly use data values for interpolation. For these types gwy_interpolation_resolve_coeffs_1d() and gwy_interpolation_resolve_coeffs_2d() are no-op.

Generalized interpolation types (with non-interpolation basis) require to preprocess the data values to obtain interpolation coefficients first. On the ohter hand they typically offer much higher interpolation quality.

Parameters:
  • interpolation - Interpolation type. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
True if the inteprolation type has interpolating basis, False if data values cannot be directly used for interpolation of this type. (bool)

Since: 2.2

gwy_interpolation_interpolate_1d(x, coeff, interpolation)

source code 

Interpolates a signle data point in one dimension.

The interpolation basis support size can be obtained generically with gwy_interpolation_get_support_size().

Parameters:
  • x - Position in interval [0,1) to get value at. (float)
  • coeff - Array of support-length size with interpolation coefficients (that are equal to data values for an interpolating basis). (list)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
Value result. ((float))

Since: 2.2

gwy_interpolation_interpolate_2d(x, y, rowstride, coeff, interpolation)

source code 

Interpolates a signle data point in two dimensions.

Parameters:
  • x - X-position in interval [0,1) to get value at. (float)
  • y - Y-position in interval [0,1) to get value at. (float)
  • rowstride - Row stride of coeff. (int)
  • coeff - Array of support-length-squared size with interpolation coefficients (that are equal to data values for an interpolating basis). (list)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
Value result. ((float))

Since: 2.2

gwy_interpolation_resample_block_1d(data, newlength, interpolation)

source code 

Resamples a one-dimensional data array.

This is a primitive operation, in most cases methods such as DataLine.new_resampled() provide more convenient interface.

Parameters:
  • data - Data block to resample. (list)
  • newlength - Requested length after resampling. (int)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
(list)

Since: 2.2

gwy_interpolation_resample_block_2d(data, width, height, rowstride, newwidth, newheight, newrowstride, interpolation)

source code 

Resamples a two-dimensional data array.

This is a primitive operation, in most cases methods such as DataField.new_resampled() provide more convenient interface.

Parameters:
  • data - Data block to resample. (list)
  • width - Number of columns in data. (int)
  • height - Number of rows in data. (int)
  • rowstride - Total row length (including width). (int)
  • newwidth - Requested number of columns after resampling. (int)
  • newheight - Requested number of rows after resampling. (int)
  • newrowstride - Requested total row length after resampling (including newwidth). (int)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
(list)

Since: 2.2

gwy_interpolation_resolve_coeffs_1d(data, interpolation)

source code 

Transforms data values in a one-dimensional array to interpolation coefficients.

This function is no-op for interpolation types with finite-support interpolating function. Therefore you can also omit it and use the data array directly for these interpolation types.

Parameters:
  • data - An array of data values. It will be rewritten with the coefficients. (list)
  • interpolation - Interpolation type to prepare data for. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
(list)

Since: 2.2

gwy_interpolation_resolve_coeffs_2d(width, height, rowstride, data, interpolation)

source code 

Transforms data values in a two-dimensional array to interpolation coefficients.

This function is no-op for interpolation types with finite-support interpolating function. Therefore you can also omit it and use the data array directly for these interpolation types.

Parameters:
  • width - Number of columns in data. (int)
  • height - Number of rows in data. (int)
  • rowstride - Total row length (including width). (int)
  • data - An array of data values. It will be rewritten with the coefficients. (list)
  • interpolation - Interpolation type to prepare data for. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
Returns:
(list)

Since: 2.2

gwy_interpolation_shift_block_1d(data, offset, interpolation, exterior, fill_value)

source code 

Shifts a one-dimensional data block by a possibly non-integer offset.

The EXTERIOR_LAPLACE exterior type cannot be used with this function.

Parameters:
  • data - Data block to shift. (list)
  • offset - The shift, in corrective sense. Shift value of 1.0 means the zeroth value of newdata will be set to the first value of data. (float)
  • interpolation - Interpolation type to use. Expected values: INTERPOLATION_NONE, INTERPOLATION_ROUND, INTERPOLATION_LINEAR, INTERPOLATION_BILINEAR, INTERPOLATION_KEY, INTERPOLATION_BSPLINE, INTERPOLATION_OMOMS, INTERPOLATION_NNA, INTERPOLATION_SCHAUM. (InterpolationType)
  • exterior - Exterior pixels handling. Expected values: EXTERIOR_UNDEFINED, EXTERIOR_BORDER_EXTEND, EXTERIOR_MIRROR_EXTEND, EXTERIOR_PERIODIC, EXTERIOR_FIXED_VALUE, EXTERIOR_LAPLACE. (ExteriorType)
  • fill_value - The value to use with EXTERIOR_FIXED_VALUE. (float)
Returns:
(list)

Since: 2.2

gwy_key_from_name(name)

source code 

Convert string representation of key to numerical.

Parameters:
  • name - String representation of key. (string)
Returns:
Corresponding numerical key. (int)

gwy_label_new_header(text)

source code 

Creates a bold, left aligned label.

The purpose of this function is to avoid propagation of too much markup to translations (and to reduce code clutter by avoiding dummy constructor and left-aligning automatically).

Parameters:
  • text - Text to put into the label. It must be a valid markup and it will be made bold by adding appropriate markup around it. (string)
Returns:
A newly created GtkLabel. (gtk.Widget)

gwy_layer_func_register(type)

source code 

Registeres a layer function (layer type).

Parameters:
  • type - Layer type in GObject type system. That is the return value of gwy_layer_foo_get_type(). (GType)
Returns:
Normally True; False on failure. (bool)

gwy_log_get_enabled()

source code 

Reports whether logging of data processing operations is globally enabled.

Returns:
True if logging is enabled, False if it is disabled. (bool)

Since: 2.35

gwy_log_set_enabled(setting)

source code 

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_app_channel_log_add() become no-op. It is possible to run the log viewer with gwy_app_log_browser_for_channel() to see log entries created when logging was enabled.

Parameters:
  • setting - True to enable logging, False to disable it. (bool)

Since: 2.35

gwy_mask_color_selector_run(dialog_title, parent, color_button, container, prefix)

source code 

Creates and runs a color selector dialog for a mask.

Note this function does not return anything, it runs the color selection dialog modally and returns when it is finished.

Parameters:
  • dialog_title - Title of the color selection dialog (None to use default). (string)
  • parent - Dialog parent window. The color selector dialog will be made transient for this window. (gtk.Window)
  • color_button - Color button to update on color change (or None). (ColorButton)
  • container - Container to initialize the color from and save it to. (Container)
  • prefix - Prefix in container (normally "/0/mask"). (string)

Since: 2.1

gwy_math_curvature(coeffs)

source code 

Calculates curvature parameters at the apex from two-dimensional quadratic polynomial coefficients.

This is an old name for gwy_math_curvature_at_apex(). See the description there.

Parameters:
  • coeffs - Array of the six polynomial coefficients of a quadratic surface in the following order: 1, x, y, x², xy, y². (list)
Returns:
Tuple consisting of 8 values (dimen, kappa1, kappa2, phi1, phi2, xc, yc, zc). ((int), (float), (float), (float), (float), (float), (float), (float))

Since: 2.22

gwy_math_find_nearest_line(x, y, coords, metric)

source code 

Finds the line from coords nearest to the point (x, y).

Parameters:
  • x - X-coordinate of the point to search. (float)
  • y - Y-coordinate of the point to search. (float)
  • coords - Line coordinates stored as x00, y00, x01, y01, x10, y10, etc. (list)
  • metric - Metric matrix (2x2, but stored sequentially by rows: m11, m12, m21, m22), it must be positive definite. Vector norm is then calculated as m11*x*x + (m12 + m21)*x*y + m22*y*y. It can be None, standard Euclidean metric is then used. (list)
Returns:
Tuple consisting of 2 values (idx, d2min). ((int), (float))

gwy_math_find_nearest_point(x, y, coords, metric)

source code 

Finds the point from coords nearest to the point (x, y).

Parameters:
  • x - X-coordinate of the point to search. (float)
  • y - Y-coordinate of the point to search. (float)
  • coords - Point coordinates stored as x0, y0, x1, y1, x2, y2, etc. (list)
  • metric - Metric matrix (2x2, but stored sequentially by rows: m11, m12, m21, m22). Vector norm is then calculated as m11*x*x + (m12 + m21)*x*y + m22*y*y. It can be None, standard Euclidean metric is then used. (list)
Returns:
Tuple consisting of 2 values (idx, d2min). ((int), (float))

gwy_math_fit_polynom(xdata, ydata, n)

source code 

Fits a polynom through a general (x, y) data set.

Parameters:
  • xdata - Independent variable data (of size ndata). (list)
  • ydata - Dependent variable data (of size ndata). (list)
  • n - The degree of polynom to fit. (int)
Returns:
Value coeffs. ((list))

gwy_math_humanize_numbers(unit, maximum)

source code 

Finds a human-friendly representation for a range of numbers.

Parameters:
  • unit - The smallest possible step. (float)
  • maximum - The maximum possible value. (float)
Returns:
Tuple consisting of 2 values (value, precision). ((float), (int))

gwy_math_is_in_polygon(x, y, poly)

source code 

Establishes wether the test point x, y is inside the polygon poly. The polygon can be defined either clockwise or anti-clockwise and can be a concave, convex or self-intersecting polygon.

Parameters:
  • x - The x coordinate of the test point. (float)
  • y - The y coordinate of the test point. (float)
  • poly - An array of coordinate pairs (points) that define a polygon. (list)
Returns:
Value is_inside. ((BooleanOutArg))

Warning: Result can be either True or False if the test point is *exactly* on an edge.

Since: 2.7

gwy_math_kth_rank(array, k)

source code 

Finds k-th item of an array of values using Quick select algorithm.

The value positions change as follows. The returned value is guaranteed to be at k-th position in the array (i.e. correctly ranked). All other values are correctly ordered with respect to this value: preceeding values are smaller (or equal) and following values are larger (or equal).

Parameters:
  • array - Array of doubles. It is shuffled by this function. (list)
  • k - Rank of the value to find (from lowest to highest). (int)
Returns:
The k-th value of array if it was sorted. (float)

Since: 2.50

gwy_math_median(array)

source code 

Finds median of an array of values using Quick select algorithm.

See gwy_math_kth_rank() for details of how the values are shuffled.

Parameters:
  • array - Array of doubles. It is shuffled by this function. (list)
Returns:
The median value of array. (float)

gwy_math_refine_maximum(z)

source code 

Performs subpixel refinement of parabolic a two-dimensional maximum.

An alias for gwy_math_refine_maximum_2d().

Parameters:
  • z - Array of length 9, containing the square 3x3 neighbourhood values in matrix order and with the maximum in the centre. (list)
Returns:
Tuple consisting of 3 values (x, y, refined). ((float), (float), (BooleanOutArg))

Since: 2.42

gwy_math_refine_maximum_1d(y)

source code 

Performs subpixel refinement of parabolic a one-dimensional maximum.

The central value corresponds to x-coordinate 0, distances between values are unity. The refinement is based by fitting a parabola through the maximum. If it fails or the calculated maximum lies farther than the surrounding values the function sets the refined maximum to the origin and returns False.

Parameters:
  • y - Array of length 3, containing the neighbourhood values with the maximum in the centre. (list)
Returns:
Tuple consisting of 2 values (x, refined). ((float), (BooleanOutArg))

Since: 2.49

gwy_math_refine_maximum_2d(z)

source code 

Performs subpixel refinement of parabolic a two-dimensional maximum.

The central value corresponds to coordinates (0,0), distances between values are unity. The refinement is based by fitting a two-dimensional parabola through the maximum. If it fails or the calculated maximum lies farther than the surrounding values the function sets the refined maximum to the origin and returns False.

Parameters:
  • z - Array of length 9, containing the square 3x3 neighbourhood values in matrix order and with the maximum in the centre. (list)
Returns:
Tuple consisting of 3 values (x, y, refined). ((float), (float), (BooleanOutArg))

Since: 2.49

gwy_math_trimmed_mean(array, nlowest, nhighest)

source code 

Finds trimmed mean of an array of values.

At least one value must remain after the trimming, i.e. nlowest + nhighest must be smaller than n. Usually one passes the same number as both nlowest and nhighest, but it is not a requirement.

The function can be also used to calculate normal mean values as it implements efficiently the cases when no trimming is done at either end.

Parameters:
  • array - Array of doubles. It is shuffled by this function. (list)
  • nlowest - The number of lowest values to discard. (int)
  • nhighest - The number of highest values to discard. (int)
Returns:
The trimmed mean. (float)

Since: 2.50

gwy_menu_gl_material()

source code 

Creates a pop-up GL material menu.

Object data "gl-material-name" is set to GL material name for each menu item.

Returns:
The newly created pop-up menu as GtkWidget. (gtk.Widget)

gwy_menu_gradient()

source code 

Creates a pop-up gradient menu.

Object data "gradient-name" is set to gradient name for each menu item.

Returns:
The newly created pop-up menu as GtkWidget. (gtk.Widget)

gwy_module_data_fopen(modname, filename, mode)

source code 

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 glib.FILE_ERROR domain.

Parameters:
  • modname - Module name (determines the subdirectory). (string)
  • filename - Name of the file to save. In GLib encoding, but it really should be just ASCII. (string)
  • mode - File open mode, as in fopen(). (string)
Returns:
A file handle if the file was opened as requested, None on failure. (FILE*)

Since: 2.51

gwy_module_data_save(modname, filename, contents, length)

source code 

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 glib.FILE_ERROR domain.

Parameters:
  • modname - Module name (determines the subdirectory). (string)
  • filename - Name of the file to save. In GLib encoding, but it really should be just ASCII. (string)
  • contents - File contents to write. (string)
  • length - Length of contents, or -1 if it is a NUL-terminated string. (gssize)
Returns:
True if the file was saved. (bool)

Since: 2.51

gwy_module_disable_registration(name)

source code 

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.

Parameters:
  • name - A module name. (string)

Since: 2.48

gwy_module_enable_registration(name)

source code 

Unblocks the registration of a module of given name.

This function influences future module registration. Already loaded modules are unaffected.

Parameters:
  • name - A module name. (string)

Since: 2.48

gwy_module_error_quark()

source code 

Returns error domain for module loading.

See and use MODULE_ERROR.

Returns:
The error domain. (int)

gwy_module_file_error_quark()

source code 

Returns error domain for file module functions.

See and use MODULE_FILE_ERROR.

Returns:
The error domain. (int)

gwy_module_get_filename(name)

source code 

Returns full file name of a module.

Parameters:
  • name - A module name. (string)
Returns:
Module file name as a string that must be modified or freed. (string)

gwy_module_is_enabled(name)

source code 

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.

Parameters:
  • name - A module name. (string)
Returns:
True if module name can be registered; False when it is blocked from registration. (bool)

Since: 2.48

gwy_name_from_key(key)

source code 

Convert numerical representation of key to string.

The argument may only be identifier actually corresponding to string key, for instance obtained with gwy_key_from_name(). Do not pass random integers to this function.

Parameters:
  • key - Numerical representation of a key. (int)
Returns:
Corresponding string key. (string)

gwy_nlfit_presets()

source code 

Gets inventory with all the NLFit presets.

Returns:
NLFit preset inventory. (Inventory)

gwy_pixbuf_draw_data_field(pixbuf, data_field, gradient)

source code 

Paints a data field to a pixbuf with an auto-stretched color gradient.

Minimum data value is mapped to start of gradient, maximum value to its end, values between are mapped linearly to gradient.

Parameters:
  • pixbuf - A Gdk pixbuf to draw to. (gdk.Pixbuf)
  • data_field - A data field to draw. (DataField)
  • gradient - A color gradient to draw with. (Gradient)

gwy_pixbuf_draw_data_field_adaptive(pixbuf, data_field, gradient)

source code 

Paints a data field to a pixbuf with a color gradient adaptively.

The mapping from data field (minimum, maximum) range to gradient is nonlinear, deformed using inverse function to height density cummulative distribution.

Parameters:
  • pixbuf - A Gdk pixbuf to draw to. (gdk.Pixbuf)
  • data_field - A data field to draw. (DataField)
  • gradient - A color gradient to draw with. (Gradient)

gwy_pixbuf_draw_data_field_as_mask(pixbuf, data_field, color)

source code 

Paints a data field to a pixbuf as a single-color mask with varying opacity.

Values equal or smaller to 0.0 are drawn as fully transparent, values greater or equal to 1.0 as fully opaque, values between are linearly mapped to pixel opacity.

Parameters:
  • pixbuf - A Gdk pixbuf to draw to. (gdk.Pixbuf)
  • data_field - A data field to draw. (DataField)
  • color - A color to use. (const-RGBA*)

gwy_pixbuf_draw_data_field_with_range(pixbuf, data_field, gradient, minimum, maximum)

source code 

Paints a data field to a pixbuf with an explicite color gradient range.

minimum and all smaller values are mapped to start of gradient, maximum and all greater values to its end, values between are mapped linearly to gradient.

Parameters:
  • pixbuf - A Gdk pixbuf to draw to. (gdk.Pixbuf)
  • data_field - A data field to draw. (DataField)
  • gradient - A color gradient to draw with. (Gradient)
  • minimum - The value corresponding to gradient start. (float)
  • maximum - The value corresponding to gradient end. (float)

gwy_preview_surface_to_datafield(surface, dfield, max_xres, max_yres, flags)

source code 

Renders a preview of a XYZ data surface to a data field.

Parameters:
  • surface - A surface representing a XYZ data. (Surface)
  • dfield - A data field to fill with surface preview. (DataField)
  • max_xres - Maximum width of the preview, it must be at least 2. (int)
  • max_yres - Maximum height of the preview, it must be at least 2. (int)
  • flags - Flags modifying the behaviour. Expected values: PREVIEW_SURFACE_DENSITY, PREVIEW_SURFACE_FILL. (PreviewSurfaceFlags)

Since: 2.46

gwy_process_func_current()

source code 

Obtains the name of currently running data processing function.

If no process function is currently running, None is returned.

If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.

Returns:
The name of currently running data processing function or None. (string)

Since: 2.38

gwy_process_func_exists(name)

source code 

Checks whether a data processing function exists.

Parameters:
  • name - Data processing function name. (string)
Returns:
True if function name exists, False otherwise. (bool)

gwy_process_func_get_menu_path(name)

source code 

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

Parameters:
  • name - Data processing function name. (string)
Returns:
The menu path. The returned string is owned by the module. (string)

gwy_process_func_get_run_types(name)

source code 

Returns run modes supported by a data processing function.

Parameters:
  • name - Data processing function name. (string)
Returns:
The run mode bit mask. (RunType)

gwy_process_func_get_sensitivity_mask(name)

source code 

Gets menu sensititivy mask for a data processing function.

Parameters:
  • name - Data processing function name. (string)
Returns:
The menu item sensitivity mask (a combination of MenuSensFlags flags). (int)

gwy_process_func_get_stock_id(name)

source code 

Gets stock icon id of a data processing function.

Parameters:
  • name - Data processing function name. (string)
Returns:
The stock icon id. The returned string is owned by the module. (string)

gwy_process_func_get_tooltip(name)

source code 

Gets tooltip for a data processing function.

Parameters:
  • name - Data processing function name. (string)
Returns:
The tooltip. The returned string is owned by the module. (string)

gwy_process_func_run(name, data, run)

source code 

Runs a data processing function identified by name.

Parameters:
  • name - Data processing function name. (string)
  • data - Data (a Container). (Container)
  • run - How the function should be run. Expected values: RUN_NONE, RUN_NONINTERACTIVE, RUN_INTERACTIVE, RUN_IMMEDIATE, RUN_MASK. (RunType)

gwy_process_type_init()

source code 

Makes libgwyprocess types safe for deserialization and performs other initialization. You have to call this function from the main thread before using objects from libgwyprocess.

It calls gwy_type_init() first to make sure libgwyddion is initialized.

It is safe to call this function more than once, subsequent calls are no-op.

gwy_radio_button_get_value(button)

source code 

Gets the integer value associated with a radio button.

Parameters:
  • button - A radio button belonging to a group created by gwy_radio_buttons_create(). (gtk.Widget)
Returns:
The integer value corresponding to button. (int)

gwy_radio_button_set_value(button, value)

source code 

Sets the integer value associated with a radio button.

This function allow to change associated radio button values after creation or even construct a radio button group with associated integers without the help of gwy_radio_buttons_create().

Parameters:
  • button - A radio button to set associated value of. (gtk.Widget)
  • value - Value to associate. (int)

gwy_raw_data_size(datatype)

source code 

Reports the size of a single raw data item.

Parameters:
  • datatype - Raw data type. Expected values: RAW_DATA_SINT8, RAW_DATA_UINT8, RAW_DATA_SINT16, RAW_DATA_UINT16, RAW_DATA_SINT32, RAW_DATA_UINT32, RAW_DATA_SINT64, RAW_DATA_UINT64, RAW_DATA_HALF, RAW_DATA_FLOAT, RAW_DATA_REAL, RAW_DATA_DOUBLE. (RawDataType)
Returns:
The size of a single raw data item of type datatype. (int)

Since: 2.25

gwy_require_image_same_units(field, data, id, name)

source code 

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.

Parameters:
  • field - The data field to check. (DataField)
  • data - Data container with the data field. (Container)
  • id - The id of field in data. (int)
  • name - Error message prefix, usually module function name. (string)
Returns:
True if the units are the same, False otherwise. (bool)

Since: 2.59

gwy_require_square_image(field, data, id, name)

source code 

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.

Parameters:
  • field - The data field to check. (DataField)
  • data - Data container with the data field. (Container)
  • id - The id of field in data. (int)
  • name - Error message prefix, usually module function name. (string)
Returns:
True if the data field is square, False otherwise. (bool)

Since: 2.59

gwy_resource_classes_finalize()

source code 

Destroys the inventories of all resource classes.

This function makes the affected resource classes unusable. Its purpose is to faciliate reference leak debugging by destroying a large number of objects that normally live forever.

Note static resource classes that never called Resource.class_load() are excluded.

Since: 2.8

gwy_resource_parse(text, expected_type)

source code 

Reconstructs a resource from human readable form.

Parameters:
  • text - Textual resource representation. (string)
  • expected_type - Resource object type. If not 0, only resources of give type are allowed. Zero value means any Resource is allowed. (GType)
Returns:
Newly created resource (or None). (Resource)

gwy_resource_tree_view_set_active(treeview, active)

source code 

Selects a resource in a list and scrolls to make it visible.

Parameters:
  • treeview - A resource selector tree view. (gtk.Widget)
  • active - Resource name to be shown as currently selected. (string)
Returns:
True if active was selected, False if there is no such resource. (bool)

gwy_rgba_remove_from_container(container, prefix)

source code 

Removes RGBA color components from a container.

This is a convenience function to remove the components in the common arrangement.

Parameters:
  • container - A Container to remove the color components from. (Container)
  • prefix - Prefix in container, e.g. "/0/mask" (it will remove "/0/mask/red", "/0/mask/green", etc. then). (string)
Returns:
True if anything was removed. (bool)

gwy_run_subdialog(dialog)

source code 

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.

When the function resturns only the dialog has been destroyed.

Parameters:
  • dialog - A data dialog to be run as modal. (gtk.Dialog)
Returns:
The response of dialog. (int)

Since: 2.62

gwy_save_auxiliary_data(title, parent, data_len, data)

source code 

Saves a report or other auxiliary data to a user specified file.

This is actually a simple gwy_save_auxiliary_with_callback() wrapper, see its description for details.

Parameters:
  • title - File chooser dialog title. (string)
  • parent - Parent window for the file chooser dialog (may be None). (gtk.Window)
  • data_len - The length of data in bytes. Pass -1 if data is text, it must be nul-terminated then and it will be saved in text mode (this matters if the operating system distinguishes between text and binary). A non-negative value causes the data to be saved as binary. (gssize)
  • data - The data to save. (string)
Returns:
True if the data was saved, False if it was not saved for any reason. (bool)

Since: 2.3

gwy_select_in_filtered_inventory_treeeview(treeview, name)

source code 

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

Parameters:
  • treeview - A filtered tree view showing an inventory. (gtk.TreeView)
  • name - Item name to select. (string)

Since: 2.62

gwy_serializable_clone(source, copy)

source code 

Makes an object identical to another object of the same type.

More precisely, source may be subclass of copy (the extra information is lost then).

Parameters:
  • source - An object implementing Serializable interface. (gobject.GObject)
  • copy - An object of the same type as source to modify after it. (gobject.GObject)

gwy_serializable_clone_with_type(source, copy, type)

source code 

Makes an object identical to another object of the same type, with explicit type checking.

This function is the same as gwy_serializable_clone(), except it asserts the object type, which must be type.

Since 2.52

Parameters:
  • source - An object implementing Serializable interface. (gobject.GObject)
  • copy - An object of the same type as source to modify after it. (gobject.GObject)
  • type - The type the objects are asserted to be. (GType)

gwy_serializable_duplicate(object)

source code 

Creates a copy of an object.

If the object doesn't support duplication natively, it's brute-force serialized and then deserialized, this may be quite inefficient, namely for large objects.

You can duplicate a None, too, but you are discouraged from doing it.

Parameters:
  • object - An object implementing Serializable interface. (gobject.GObject)
Returns:
The newly created object copy. However if the object is a singleton, object itself (with incremented reference count) can be returned, too. (gobject.GObject)

gwy_serializable_get_size(serializable)

source code 

Calculates the expected size of serialized object.

Parameters:
  • serializable - A GObject that implements Serializable interface. (gobject.GObject)
Returns:
The expected size of serialized serializable. (gsize)

gwy_serialize_check_string(buffer, size, position, compare_to)

source code 

Check whether size bytes of memory in buffer can be interpreted as a NUL-terminated string, and eventually whether it's equal to compare_to.

When compare_to is None, the comparsion is not performed.

Parameters:
  • buffer - A memory location containing a NUL-terminated string at position position. (string)
  • size - The size of buffer. (gsize)
  • position - The position of the string in buffer. (gsize)
  • compare_to - String to compare buffer to, or None. (string)
Returns:
The length of the NUL-terminated string including the NUL character; zero otherwise. (gsize)

gwy_set_data_preview_size(data_view, max_size)

source code 

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.

Parameters:
  • data_view - A data view used for module preview. (DataView)
  • max_size - Maximum allowed data_view size (width and height). (int)

Since: 2.7

gwy_sgettext(msgid)

source code 

Translate a message id containing disambiguating prefix ending with `|'.

Parameters:
  • msgid - Message id to translate, containing `|'-separated prefix. (string)
Returns:
Translated message, or msgid itself with all text up to the last `|' removed if there is no translation. (string)

gwy_shape_fit_presets()

source code 

Gets inventory with all the 3D geometric shape fitting presets.

Returns:
3D geometric shape fitting preset inventory. (Inventory)

Since: 2.47

gwy_si_unit_new_parse(unit_string)

source code 

Creates a new SI unit from string representation.

This is a more powerful version of SIUnit.new(): unit_string may be a relatively complex unit, with prefixes, like "pA/s" or "km^2". Beside conversion to a base SI unit like "A/s" or "m^2" it also computes the power of 10 one has to multiply the base unit with to get an equivalent of unit_string.

For example, for "pA/s" it will store -12 to power10 because 1 pA/s is 1e-12 A/s, for "km^2" it will store 6 to power10 because 1 km^2 is 1e6 m^2.

Parameters:
  • unit_string - Unit string (it can be None for an empty unit). (string)
Returns:
Tuple consisting of 2 values (value, power10). ((SIUnit), (int))

gwy_si_unit_value_format_clone(source, dest)

source code 

Clones a value format to another.

This function follows the convention of many value format updating functions that can either modify an existing format or allocate a new one.

Parameters:
Returns:
The dest value format. If it was None, a newly allocated format is returned, otherwise (modified) dest itself is returned. (SIValueFormat)

Since: 2.46

gwy_si_unit_value_format_copy(format)

source code 

Copies a value format structure.

Parameters:
Returns:
Newly allocated value format, identical to format. (SIValueFormat)

Since: 2.39

gwy_si_unit_value_format_free(format)

source code 

Frees a value format structure.

Parameters:

gwy_sinc(x)

source code 

Calculates the sinc function.

The sinc function is equal to sin(x)/x for non-zero x, and defined to the limit 1 for zero x.

Parameters:
  • x - Value to calculate sinc (cardinal sine) of. (float)
Returns:
Value of sinc(x). (float)

Since: 2.51

gwy_spline_new_from_points(xy)

source code 

Creates a new spline curve passing through given points.

See Spline.set_points() for discussion.

Parameters:
  • xy - Array of points in plane the curve will pass through. (list)
Returns:
A newly created spline curve. (Spline)

Since: 2.45

gwy_stock_register_stock_items()

source code 

Registers stock items.

This function must be called before any stock items are used.

gwy_str_fixed_font_width(str)

source code 

Measures the width of UTF-8 encoded string in fixed-width font.

This corresponds to width of the string displayed on a text terminal, for instance. Zero and double width characters are taken into account. It is not guaranteed all terminals display the string with the calculated width.

Parameters:
  • str - UTF-8 encoded string. (string)
Returns:
String width in fixed font, in character cells. (int)

Since: 2.52

gwy_strdiffpos(s1, s2)

source code 

Finds position where two strings differ.

Parameters:
  • s1 - A string. (string)
  • s2 - A string. (string)
Returns:
The last position where the strings do not differ yet. Possibly -1 can be returned if either string is None, zero-length, or they differ in the very first character. (int)

gwy_strisident(s, more, startmore)

source code 

Checks whether a string is valid identifier.

Valid identifier must start with an alphabetic character or a character from startmore, and it must continue with alphanumeric characters or characters from more.

Note underscore is not allowed by default, you have to pass it in more and/or startmore.

Parameters:
  • s - A NUL-terminated string. (string)
  • more - List of additional ASCII characters allowed inside identifier, empty list can be passed as None. (string)
  • startmore - List of additional ASCII characters allowed as the first identifier characters, empty list can be passed as None. (string)
Returns:
True if s is valid identifier, False otherwise. (bool)

gwy_strkill(s, killchars)

source code 

Removes characters in killchars from string s, modifying it in place.

Use gwy_strkill(g_strdup(s), killchars) to get a modified copy.

Parameters:
  • s - A NUL-terminated string. (string)
  • killchars - A string containing characters to kill. (string)
Returns:
s itself, the return value is to allow function call nesting. (string)

gwy_strreplace(haystack, needle, replacement, maxrepl)

source code 

Replaces occurences of string needle in haystack with replacement.

See gwy_gstring_replace() for a function which does in-place replacement on a GString.

Parameters:
  • haystack - A NUL-terminated string to search in. (string)
  • needle - A NUL-terminated string to search for. (string)
  • replacement - A NUL-terminated string to replace needle with. (string)
  • maxrepl - Maximum number of occurences to replace (use (gsize)-1 to replace all occurences). (gsize)
Returns:
A newly allocated string. (string)

gwy_surface_new_from_data(points, n)

source code 

Creates a new surface, filling it with provided points.

Parameters:
  • points - Array of n points with the surface data. (const-XYZ*)
  • n - Number of points. (int)
Returns:
A new surface. (Surface)

Since: 2.45

gwy_surface_new_sized(n)

source code 

Creates a new surface with preallocated size.

The surface will contain the speficied number of points with uninitialised values.

Parameters:
  • n - Number of points. (int)
Returns:
A new surface. (Surface)

Since: 2.45

gwy_table_attach_adjbar(table, row, name, units, pivot, style)

source code 

Attaches an adjustment bar with spinbutton and labels, or something else, to a table row.

The group of controls takes three table columns: adjustment bar, spinbutton and units.

You can use functions gwy_table_hscale_get_scale(), gwy_table_hscale_get_check(), etc. to get the various widgets from pivot later.

The function usually does the right thing but what exactly happens with various style values is a bit convoluted.

Parameters:
  • table - A GtkTable. (gtk.Widget)
  • row - Row in table to attach stuff to. (int)
  • name - The label before pivot widget. (string)
  • units - The label after pivot widget. (string)
  • pivot - Either a GtkAdjustment, or a widget to use instead of the spin button and scale widgets (if style is HSCALE_WIDGET). (gtk.Object)
  • style - A mix of options an flags determining what and how will be attached to the table. Expected values: HSCALE_DEFAULT, HSCALE_LOG, HSCALE_SQRT, HSCALE_LINEAR, HSCALE_NO_SCALE, HSCALE_WIDGET, HSCALE_WIDGET_NO_EXPAND, HSCALE_CHECK, HSCALE_SNAP. (HScaleStyle)
Returns:
The middle widget. If a spinbutton is attached, then this spinbutton is returned. Otherwise (in HSCALE_WIDGET case) pivot itself. (gtk.Widget)

Since: 2.49

gwy_table_attach_hscale(table, row, name, units, pivot, style)

source code 

Attaches a spinbutton with a scale and labels, or something else, to a table row.

The group of controls takes four table columns: label, scale, spinbutton and units.

You can use functions gwy_table_hscale_get_scale(), gwy_table_hscale_get_check(), etc. to get the various widgets from pivot later.

The function usually does the right thing but what exactly happens with various style values is a bit convoluted.

Parameters:
  • table - A GtkTable. (gtk.Widget)
  • row - Row in table to attach stuff to. (int)
  • name - The label before pivot widget. (string)
  • units - The label after pivot widget. (string)
  • pivot - Either a GtkAdjustment, or a widget to use instead of the spin button and scale widgets (if style is HSCALE_WIDGET). (gtk.Object)
  • style - A mix of options an flags determining what and how will be attached to the table. Expected values: HSCALE_DEFAULT, HSCALE_LOG, HSCALE_SQRT, HSCALE_LINEAR, HSCALE_NO_SCALE, HSCALE_WIDGET, HSCALE_WIDGET_NO_EXPAND, HSCALE_CHECK, HSCALE_SNAP. (HScaleStyle)
Returns:
The middle widget. If a spinbutton is attached, then this spinbutton is returned. Otherwise (in HSCALE_WIDGET case) pivot itself. (gtk.Widget)

gwy_table_attach_row(table, row, name, units, middle_widget)

source code 

Attaches a widget with two labels to a table.

Parameters:
  • table - A GtkTable. (gtk.Widget)
  • row - Table row to attach to. (int)
  • name - The label before middle_widget. (string)
  • units - The label after adj. (string)
  • middle_widget - A widget. (gtk.Widget)

gwy_table_attach_spinbutton(table, row, name, units, adj)

source code 

Attaches a spinbutton with two labels to a table.

Parameters:
  • table - A GtkTable. (gtk.Widget)
  • row - Table row to attach to. (int)
  • name - The label before adj. (string)
  • units - The label after adj. (string)
  • adj - An adjustment to create spinbutton from. (gtk.Object)
Returns:
The spinbutton as a GtkWidget. (gtk.Widget)

gwy_table_get_child_widget(table, row, col)

source code 

Finds a widget in GtkTable by its coordinates.

Coordinates (col, row) are taken as coordinates of widget top left corner. More precisely, the returned widget either contains the specified grid point or it is attached by its left side, top side, or top left corner to this point.

If there are multiple matches due to overlapping widgets, a random match is returned.

Parameters:
  • table - A GtkTable. (gtk.Widget)
  • row - Row in table. (int)
  • col - Column in table. (int)
Returns:
The widget at (col, row) or None if there is no such widget. (gtk.Widget)

gwy_table_hscale_get_check(pivot)

source code 

Gets the check button associated with a pivot object.

May return None if not constructed with HSCALE_CHECK.

Parameters:
Returns:
(gtk.Widget)

gwy_table_hscale_get_label(pivot)

source code 

Gets the (left) label associated with a pivot object.

May return None if constructed with HSCALE_CHECK.

Parameters:
Returns:
(gtk.Widget)

gwy_table_hscale_get_middle_widget(pivot)

source code 

Gets the middle widget associated with a pivot object.

Parameters:
Returns:
(gtk.Widget)

gwy_table_hscale_get_scale(pivot)

source code 

Gets the horizontal scale associated with a pivot object.

May return None if constructed with HSCALE_NO_SCALE, HSCALE_WIDGET, or HSCALE_WIDGET_NO_EXPAND.

Parameters:
Returns:
(gtk.Widget)

gwy_table_hscale_get_units(pivot)

source code 

Gets the units label associated with a pivot object.

May return None if constructed without units.

Parameters:
Returns:
(gtk.Widget)

gwy_table_hscale_set_sensitive(pivot, sensitive)

source code 

Sets sensitivity of a group of controls create by gwy_table_attach_hscale() or gwy_table_attach_adjbar().

For controls without an enable/disable check button controls the sensitivity as expected. If the hscale was created with HSCALE_CHECK you usually manage its sensitivity by setting state of the check button instead. Only use this function when you want to enable/disable the entire group of controls, including the check button.

This function can also be used with rows created by gwy_table_attach_spinbutton() too if the spinbutton is passed as pivot.

Parameters:
  • pivot - The same object that was passed to gwy_table_attach_hscale() as pivot. (gtk.Object)
  • sensitive - True to make the row sensitive, False to insensitive. (bool)

gwy_text_header_error_quark()

source code 

Returns error domain for expression parsin and evaluation.

See and use TEXT_HEADER_ERROR.

Returns:
The error domain. (int)

Since: 2.18

gwy_threads_are_enabled()

source code 

Obtains the state of internal multithread processing.

Returns:
True if multithread processing is enabled; False otherwise (this includes the case of Gwyddion not built with multithread processing support at all). (bool)

Since: 2.53

gwy_threads_set_enabled(setting)

source code 

Enables or disables internal multithread processing.

This function can be called any time during the program life time to switch between single- and multithread processing. It must be called from the main thread while no Gwyddion data processing functions are being executed.

Parameters:
  • setting - True to enable multithread processing; False to disable it. (bool)

Since: 2.53

gwy_tip_cmap(tip, surface)

source code 

Performs certainty map algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Result certainty map can be used as a mask of points where tip did not directly touch the surface.

Parameters:
Returns:
Certainty map, i.e. result, on success. May return None if aborted. (DataField)

gwy_tip_dilation(tip, surface)

source code 

Performs the tip convolution algorithm published by Villarrubia, which is equivalent to morphological dilation operation.

If the operation is aborted the size and contents of result field is undefined.

Parameters:
Returns:
Dilated surface data, i.e. result, on success. May return None if aborted. (DataField)

gwy_tip_erosion(tip, surface)

source code 

Performs surface reconstruction (erosion) algorithm published by Villarrubia, which is equivalent to morphological erosion operation.

If the operation is aborted the size and contents of result field is undefined.

Parameters:
Returns:
Reconstructed (eroded) surface, i.e. result, on success. May return None if aborted. (DataField)

gwy_tip_estimate_full(tip, surface, threshold, use_edges)

source code 

Performs full blind estimation algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Note that the threshold value must be chosen sufficently high value to supress small fluctulations due to noise (that would lead to very sharp tip) but sufficiently low value to put algorithm at work. A value similar to 1/10000 of surface range can be good. Otherwise we recommend to start with zero threshold and increase it slowly to observe changes and choose right value.

Parameters:
  • tip - Tip data to be refined (allocated). (DataField)
  • surface - Surface data. (DataField)
  • threshold - Threshold for noise supression. (float)
  • use_edges - Whether use also edges of image. (bool)
Returns:
Tuple consisting of 4 values (value, count, set_fraction, set_message). ((DataField), (int), (SkipArg), (SkipArg))

gwy_tip_estimate_partial(tip, surface, threshold, use_edges)

source code 

Performs partial blind estimation algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Note that the threshold value must be chosen sufficently high value to supress small fluctulations due to noise (that would lead to very sharp tip) but sufficiently low value to put algorithm at work. A value similar to 1/10000 of surface range can be good. Otherwise we recommend to start with zero threshold and increase it slowly to observe changes and choose right value.

Parameters:
  • tip - Tip data to be refined (allocated). (DataField)
  • surface - Surface data. (DataField)
  • threshold - Threshold for noise supression. (float)
  • use_edges - Whether use also edges of image. (bool)
Returns:
Tuple consisting of 4 values (value, count, set_fraction, set_message). ((DataField), (int), (SkipArg), (SkipArg))

gwy_tip_model_get_npresets()

source code 

Find number of actual tip model presets.

Returns:
Number of presets. (int)

gwy_tip_model_get_preset(preset_id)

source code 

Get data related to tip preset.

Parameters:
  • preset_id - Preset identifier. (int)
Returns:
Chosen preset data. (const-TipModelPreset*)

gwy_tip_model_get_preset_by_name(name)

source code 

Get data related to preset with specified name.

Parameters:
  • name - Name of tip (e. g. "contact"). (string)
Returns:
Chosen preset data. (const-TipModelPreset*)

gwy_tip_model_get_preset_group_name(preset)

source code 

Get group name of preset (e. g. "analytical".)

Parameters:
  • preset - Tip model preset. (const-TipModelPreset*)
Returns:
Preset group name. (string)

gwy_tip_model_get_preset_id(preset)

source code 

Get preset identifier within all presets.

Parameters:
  • preset - Tip model preset. (const-TipModelPreset*)
Returns:
Preset id. (int)

gwy_tip_model_get_preset_tip_name(preset)

source code 

Get name of the preset (e. g. "contact").

Parameters:
  • preset - Tip model preset. (const-TipModelPreset*)
Returns:
Preset name. (string)

gwy_tool_func_register(type)

source code 

Registeres a tool function (tool type).

Parameters:
  • type - Layer type in GObject type system. That is the return value of gwy_tool_foo_get_type(). (GType)
Returns:
Normally True; False on failure. (bool)

gwy_type_init()

source code 

Makes libgwyddion types safe for deserialization and performs other initialization. You have to call this function from the main thread before using objects from libgwyddion.

It calls g_type_init() first to make sure GLib object system is initialized.

It is safe to call this function more than once, subsequent calls are no-op.

gwy_undo_checkpoint(container, keys)

source code 

Create a point in the undo history it is possible to return to.

Parameters:
  • container - (Container)
  • keys - (StringArray*)
Returns:
Undo level id. Not useful (yet). (gulong)

gwy_undo_container_get_modified(data)

source code 

Tests whether a container was modified.

FIXME: it may not work.

Parameters:
  • data - Data container to get modification infomation of. (Container)
Returns:
True if container was modified, False otherwise. (int)

gwy_undo_container_has_redo(data)

source code 

Returns whether there is any redo available for a container.

Parameters:
  • data - Data container to get redo infomation of. (Container)
Returns:
True if there is redo, False otherwise. (bool)

gwy_undo_container_has_undo(data)

source code 

Returns whether there is any undo available for a container.

Parameters:
  • data - Data container to get undo infomation of. (Container)
Returns:
True if there is undo, False otherwise. (bool)

gwy_undo_container_remove(data, prefix)

source code 

Removes undo/redo information for a data container.

Parameters:
  • data - A data container. (Container)
  • prefix - Prefix to remove undo/redo information under. Pass None to remove undo/redo information altogether. (string)

gwy_undo_container_set_unmodified(data)

source code 

Marks a data container as umodified (that is, saved).

Parameters:
  • data - Data container to set modification infomation of. (Container)

gwy_undo_get_enabled()

source code 

Reports whether undo/redo is globally enabled.

Returns:
True if undo/redo is enabled, False if it is disabled. (bool)

Since: 2.21

gwy_undo_qcheckpoint(container, keys)

source code 

Create a point in the undo history it is possible to return to.

Parameters:
Returns:
Undo level id. Not useful (yet). (gulong)

gwy_undo_redo_container(data)

source code 

Performs undo on a data container.

It must have redo available.

Parameters:

gwy_undo_set_enabled(setting)

source code 

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_container_get_modified() always returns zero. Disabling undo also removes saved undo data of all containers.

Parameters:
  • setting - True to enable undo, False to disable it. (bool)

Since: 2.21

gwy_undo_undo_container(data)

source code 

Performs undo on a data container.

It must have undo available.

Parameters:

gwy_utf8_strescape(source, exceptions)

source code 

Escapes special characters in a string.

Escapes the special characters '', ' ', ' ', ' ', ' ', ' ', '' and '"' in the string source by inserting a '' before them. Additionally all characters in the range 0x01-0x1F (everything below SPACE), the character 0x7F, characters 0xC0 and 0xC1, and all characters in the range 0xF5-0xFF are replaced with a '' followed by their octal representation. Characters supplied in exceptions are not escaped.

In essence, this functions differs from g_strescape() by preserving valid UTF-8 strings, unless they contain ‘odd’ characters. Passing strings which are not valid UTF-8 is possible, but generally not advised.

Function g_strcompress() does the reverse conversion.

Parameters:
  • source - A string to escape. (string)
  • exceptions - A string containing characters to not escape, or None. (string)
Returns:
A newly allocated string with special characters escaped. (string)

Since: 2.62

gwy_version_major()

source code 

Gets the major version of Gwyddion.

If the version is 1.99.7.20060604, this function returns 1.

Returns:
The major version. (int)

gwy_version_minor()

source code 

Gets the minor version of Gwyddion.

If the version is 1.99.7.20060604, this function returns 99.

Returns:
The minor version. (int)

gwy_version_string()

source code 

Gets the full Gwyddion version as a string.

If the version is 1.99.7.20060604, this function returns "1.99.7.20060604".

This is the only method to get finer version information than major.minor. However, only development versions use finer versioning than major.minor therefore a module or app requiring such information is probably broken anyway. A meaningful use is to advertise the version of Gwyddion your app runs with.

Returns:
The full version as a constant string. (string)

gwy_volume_func_current()

source code 

Obtains the name of currently running volume data processing function.

If no volume data processing function is currently running, None is returned.

If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.

Returns:
The name of currently running volume data processing function or None. (string)

Since: 2.38

gwy_volume_func_exists(name)

source code 

Checks whether a volume data processing function exists.

Parameters:
  • name - Volume data processing function name. (string)
Returns:
True if function name exists, False otherwise. (bool)

Since: 2.32

gwy_volume_func_get_menu_path(name)

source code 

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

Parameters:
  • name - Volume data processing function name. (string)
Returns:
The menu path. The returned string is owned by the module. (string)

Since: 2.32

gwy_volume_func_get_run_types(name)

source code 

Returns run modes supported by a volume data processing function.

Parameters:
  • name - Volume data processing function name. (string)
Returns:
The run mode bit mask. (RunType)

Since: 2.32

gwy_volume_func_get_sensitivity_mask(name)

source code 

Gets menu sensititivy mask for a volume data processing function.

Parameters:
  • name - Volume data processing function name. (string)
Returns:
The menu item sensitivity mask (a combination of MenuSensFlags flags). (int)

Since: 2.32

gwy_volume_func_get_stock_id(name)

source code 

Gets stock icon id of a volume data processing function.

Parameters:
  • name - Volume data processing function name. (string)
Returns:
The stock icon id. The returned string is owned by the module. (string)

Since: 2.32

gwy_volume_func_get_tooltip(name)

source code 

Gets tooltip for a volume data processing function.

Parameters:
  • name - Volume data processing function name. (string)
Returns:
The tooltip. The returned string is owned by the module. (string)

Since: 2.32

gwy_volume_func_run(name, data, run)

source code 

Runs a volume data processing function identified by name.