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

Module gwy

source code

Classes [hide private]
  Axis
  ColorAxis
  ColorButton
  Container
  Curve
  DataField
  DataLine
  DataView
  DataViewLayer
  DataWindow
  Graph
  GraphArea
  GraphCurveModel
  GraphCurves
  GraphData
  GraphLabel
  GraphModel
  GraphWindow
  Inventory
  InventoryStore
  MarkerBox
  NullStore
  PixmapLayer
  LayerMask
  LayerBasic
  PlainTool
  Resource
  NLFitPreset
  Gradient
  GLMaterial
  CDLine
  ResourceEditor
  Ruler
  SIUnit
  SciText
  Selection
  SensitivityGroup
  Shader
  Spectra
  Statusbar
  StringList
  VectorLayer
Functions [hide private]
 
z_UNIMPLEMENTED_construct_rgi_names(pluginname) source code
 
z_UNIMPLEMENTED_create_user_plugin_dirs() source code
 
z_UNIMPLEMENTED_dump_export_data_field(dfield, name, fh) source code
 
z_UNIMPLEMENTED_file_find_plugin(name, run) source code
 
z_UNIMPLEMENTED_file_pattern_specificity(pattern) source code
 
z_UNIMPLEMENTED_file_plugin_proxy_detect(filename, only_name, name) source code
 
z_UNIMPLEMENTED_file_plugin_proxy_export(data, filename, mode, error, name) source code
 
z_UNIMPLEMENTED_file_plugin_proxy_load() source code
 
z_UNIMPLEMENTED_file_register_plugins(plugins, file, buffer) source code
 
z_UNIMPLEMENTED_find_plugin_executables(dir, list, level) source code
 
z_UNIMPLEMENTED_gwy_2d_cwt_wavelet_type_get_enum()
Returns Enum for 2DCWTWaveletType enum type.
source code
 
z_UNIMPLEMENTED_gwy_2d_cwt_wavelet_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_label_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_movement_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_projection_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_setup_get_type() source code
 
gwy_3d_view_class_disable_axis_drawing(disable)
Globally disables drawing of 3D view axes.
source code
 
z_UNIMPLEMENTED_gwy_3d_view_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_view_label_get_type() source code
 
z_UNIMPLEMENTED_gwy_3d_visualization_get_type() 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
 
z_UNIMPLEMENTED_gwy_3d_window_get_type() source code
 
gwy_app_add_main_accel_group(window)
Adds main (global) application accelerator group to a window.
source code
 
z_UNIMPLEMENTED_gwy_app_build_graph_menu(accel_group)
Constructs the application <guimenu>Graph</guimenu> menu.
source code
 
z_UNIMPLEMENTED_gwy_app_build_process_menu(accel_group)
Constructs the application <guimenu>Data Process</guimenu> menu.
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_data_browser_add(data)
Adds a data container to the application data browser.
source code
 
z_UNIMPLEMENTED_gwy_app_data_browser_add_channel_watch(function, user_data)
Adds a watch function called when a channel changes.
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_spectra(spectra, data, showit)
Adds a spectra object to a data container.
source code
 
gwy_app_data_browser_copy_channel(source, id, dest)
Copies a channel including all auxiliary data.
source code
 
z_UNIMPLEMENTED_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
 
z_UNIMPLEMENTED_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
 
z_UNIMPLEMENTED_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_foreach(function, user_data)
Calls a function for each data container managed by data browser.
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 object of given type.
source code
 
gwy_app_data_browser_get_data_ids(container)
Gets the list of all channels in a data container.
source code
 
z_UNIMPLEMENTED_gwy_app_data_browser_get_graph_ids(data)
Gets the list of all graphs in a data container.
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
 
z_UNIMPLEMENTED_gwy_app_data_browser_get_spectra_ids(data)
Gets the list of all spectra in a data container.
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_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_data_field(data, id)
Makes a data field (channel) 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 (channel) 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_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_confirm_overwrite(chooser)
Asks for file overwrite for a file save chooser.
source code
 
gwy_app_file_load(filename)
Load specified file
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, filename_sys, 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_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_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_graph_key_for_id(id)
Calculates graph model quark identifier from its id.
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_tooltips()
Gets the application-wide tooltips instance.
source code
 
z_UNIMPLEMENTED_gwy_app_gl_init(argc, argv)
Checks for working OpenGL and initializes it.
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_main_window_get()
Returns Gwyddion main application window (toolbox).
source code
 
gwy_app_menu_recent_files_get()
Gets the application recent files menu.
source code
 
z_UNIMPLEMENTED_gwy_app_menu_recent_files_update(recent_files)
Updates recent file menu.
source code
 
z_UNIMPLEMENTED_gwy_app_process_func_get_use() 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 <guimenuitem>Re-show Last</guimenuitem> and <guimenuitem>Repeat Last</guimenuitem> 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_free()
Frees all memory taken by recent file list.
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_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_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_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_settings_create_config_dir()
Create gwyddion config directory.
source code
 
z_UNIMPLEMENTED_gwy_app_settings_error_get_type() source code
 
gwy_app_settings_error_quark()
Returns error domain for application settings operations.
source code
 
gwy_app_settings_free()
Frees Gwyddion settings.
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
 
z_UNIMPLEMENTED_gwy_app_settings_get_module_dirs()
Returns a list of directories to search modules in.
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_switch_tool(toolname)
Switches the current tool.
source code
 
z_UNIMPLEMENTED_gwy_app_undo_checkpointv(data, n, 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_qcheckpointv(data, n, 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_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_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_start(window, message)
Starts waiting for a window window, creating a dialog with a progress bar.
source code
 
z_UNIMPLEMENTED_gwy_app_what_get_type() source code
 
z_UNIMPLEMENTED_gwy_ascii_strcase_equal(v1, v2)
Compares two strings for equality, ignoring case.
source code
 
z_UNIMPLEMENTED_gwy_ascii_strcase_hash(v)
Converts a string to a hash value, ignoring case.
source code
 
z_UNIMPLEMENTED_gwy_axis_get_type() source code
 
z_UNIMPLEMENTED_gwy_axis_scale_format_get_type() source code
 
z_UNIMPLEMENTED_gwy_byte_order_get_type() source code
 
gwy_canonicalize_path(path)
Canonicalizes a filesystem path.
source code
 
z_UNIMPLEMENTED_gwy_cdline_get_type() source code
 
gwy_cdlines()
Gets inventory with all the critical dimension evaluators.
source code
 
z_UNIMPLEMENTED_gwy_color_axis_get_type() source code
 
gwy_color_axis_new_with_range(orientation, min, max)
Creates a new color axis.
source code
 
z_UNIMPLEMENTED_gwy_color_button_get_type() 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_metric_unit_set_unit(combo, _from, to, unit)
Changes the unit selection displayed by a metric unit combo box.
source code
 
z_UNIMPLEMENTED_gwy_computation_state_type_get_type() source code
 
gwy_container_deserialize_from_text(text)
Restores a container from is text representation.
source code
 
z_UNIMPLEMENTED_gwy_container_get_type() source code
 
z_UNIMPLEMENTED_gwy_convert_raw_data(data, nitems, stride, datatype, byteorder, target, scale, offset)
Converts a block of raw data items to doubles.
source code
 
z_UNIMPLEMENTED_gwy_correlation_type_get_enum() source code
 
z_UNIMPLEMENTED_gwy_correlation_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_curve_channel_get_type() source code
 
z_UNIMPLEMENTED_gwy_curve_get_type() source code
 
z_UNIMPLEMENTED_gwy_curve_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_cwt_wfunc_2d(scale, mval, xres, wtype) source code
 
z_UNIMPLEMENTED_gwy_data_chooser_get_type() source code
 
gwy_data_chooser_new_channels()
Creates a data chooser for data channels.
source code
 
z_UNIMPLEMENTED_gwy_data_compatibility_flags_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_field_cached_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_field_correlate_finalize(state)
Destroys a correlation iterator, freeing all resources.
source code
 
z_UNIMPLEMENTED_gwy_data_field_correlate_iteration(state)
Performs one iteration of correlation.
source code
 
z_UNIMPLEMENTED_gwy_data_field_crosscorrelate_finalize(state)
Destroys a cross-correlation iterator, freeing all resources.
source code
 
z_UNIMPLEMENTED_gwy_data_field_crosscorrelate_iteration(state)
Performs one iteration of cross-correlation.
source code
 
gwy_data_field_fractal_cubecounting_dim(xresult, yresult, a, b)
Computes fractal dimension by cube counting method from log-log plot data.
source code
 
gwy_data_field_fractal_partitioning_dim(xresult, yresult, a, b)
Computes fractal dimension by partitioning method from log-log plot data.
source code
 
gwy_data_field_fractal_psdf_dim(xresult, yresult, a, b)
Computes fractal dimension by spectral density function method from log-log plot data.
source code
 
gwy_data_field_fractal_triangulation_dim(xresult, yresult, a, b)
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
 
z_UNIMPLEMENTED_gwy_data_field_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_field_grains_watershed_finalize(state)
Destroys a watershed iterator, freeing all resources.
source code
 
z_UNIMPLEMENTED_gwy_data_field_grains_watershed_iteration(state)
Performs one iteration of the watershed algorithm.
source code
 
z_UNIMPLEMENTED_gwy_data_field_hough_datafield_line_to_polar(px1, px2, py1, py2, rho, theta) source code
 
z_UNIMPLEMENTED_gwy_data_field_unrotate_find_corrections(derdist, correction)
Finds rotation corrections.
source code
 
z_UNIMPLEMENTED_gwy_data_item_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_line_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_view_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_view_layer_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_view_layer_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_data_watch_event_type_get_type() 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
 
z_UNIMPLEMENTED_gwy_data_window_get_type() source code
 
z_UNIMPLEMENTED_gwy_deserialize_object_hash(buffer, size, position, object_name, nitems)
Deserializes an object with arbitrary components from gwy-file format.
source code
 
gwy_dialog_prevent_delete_cb()
Returns True.
source code
 
gwy_draw_type_init()
Makes libgwydraw types safe for deserialization and performs other initialization.
source code
 
z_UNIMPLEMENTED_gwy_dwt_denoise_type_get_enum()
Returns Enum for DWTDenoiseType enum type.
source code
 
z_UNIMPLEMENTED_gwy_dwt_denoise_type_get_type() source code
 
gwy_dwt_set_coefficients(dline, type)
Fills resampled or nely allocated data line with wavelet coefficients.
source code
 
z_UNIMPLEMENTED_gwy_dwt_type_get_enum()
Returns Enum for DWTType enum type.
source code
 
z_UNIMPLEMENTED_gwy_dwt_type_get_type() 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, integer)
Convenience callback keeping an integer synchronized with selected enum combo box value.
source code
 
z_UNIMPLEMENTED_gwy_enum_get_type() source code
 
gwy_enum_sanitize_value(enumval, enum_type)
Makes sure an enum value is valid.
source code
 
z_UNIMPLEMENTED_gwy_enum_to_string(enumval, enum_table, n)
Creates a string representation of an integer enum value enumval.
source code
 
z_UNIMPLEMENTED_gwy_expr_error_get_type() source code
 
gwy_expr_error_quark()
Returns error domain for expression parsin and evaluation.
source code
 
z_UNIMPLEMENTED_gwy_exterior_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_fd_curve_preset_get_type() 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
 
z_UNIMPLEMENTED_gwy_fft_simple(dir, n, istride, in_re, in_im, ostride, out_re, out_im)
Performs a DFT algorithm.
source code
 
gwy_fft_window(n, 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_detect(filename, only_name, operations)
Detects the type of a file.
source code
 
gwy_file_detect_with_score(filename, only_name, operations, score)
Detects the type of a file and gives the score.
source code
 
gwy_file_func_exists(name)
Checks whether a file type function exists.
source code
 
z_UNIMPLEMENTED_gwy_file_func_foreach(function, user_data)
Calls a function for each file function.
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
 
z_UNIMPLEMENTED_gwy_file_func_register(name, description, detect, load, save, export_)
Registered a file 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
 
z_UNIMPLEMENTED_gwy_file_get_contents(filename, buffer, size)
Reads or mmaps file filename into memory.
source code
 
z_UNIMPLEMENTED_gwy_file_get_data_info(data, name, filename_sys)
Gets file information about a data.
source code
 
gwy_file_load(filename, mode)
Loads a data file, autodetecting its type.
source code
 
z_UNIMPLEMENTED_gwy_file_load_with_func(filename, mode, name) source code
 
z_UNIMPLEMENTED_gwy_file_operation_type_get_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
 
z_UNIMPLEMENTED_gwy_file_save_with_func(data, filename, mode, name)
Saves a data file, deciding to save as what type from the file name.
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
 
z_UNIMPLEMENTED_gwy_flags_to_string(enumval, enum_table, n, glue)
Creates a string representation of integer flag combination enumval.
source code
 
z_UNIMPLEMENTED_gwy_func_use_add(functions, name)
Adds an use of a function to the statistics.
source code
 
z_UNIMPLEMENTED_gwy_func_use_free(functions)
Destroys function use statistics, freeing all associated resourced.
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
 
z_UNIMPLEMENTED_gwy_func_use_load(filename)
Loads function use statistics from a file.
source code
 
z_UNIMPLEMENTED_gwy_func_use_save(functions, filename)
Saves function use statistics data to a file.
source code
 
gwy_get_home_dir()
Returns home directory, or temporary directory as a fallback.
source code
 
gwy_get_key_from_name(name) source code
 
z_UNIMPLEMENTED_gwy_get_pango_ft2_font_map(unref)
Returns global Pango FT2 font map, eventually creating it.
source code
 
gwy_get_user_dir()
Returns the directory where Gwyddion user settings and data should be stored.
source code
 
z_UNIMPLEMENTED_gwy_gl_material_get_type() 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_set_active(selection, active)
Sets the currently selected GL material of a selection button.
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
 
z_UNIMPLEMENTED_gwy_gradient_get_type() source code
 
gwy_gradient_selection_get_active(selection)
Gets the name of currently selected gradient of a 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_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
 
z_UNIMPLEMENTED_gwy_grain_quantity_get_type() source code
 
z_UNIMPLEMENTED_gwy_grain_value_flags_get_type() source code
 
z_UNIMPLEMENTED_gwy_grain_value_group_get_type() source code
 
z_UNIMPLEMENTED_gwy_grain_value_store_column_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_area_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_corner_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_curve_model_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_curve_type_get_enum()
Returns Enum for GraphCurveType enum type.
source code
 
z_UNIMPLEMENTED_gwy_graph_curve_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_curves_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_data_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_draw_curve(drawable, gc, specs, gcmodel)
Draws a single graph curve on a drawable.
source code
 
z_UNIMPLEMENTED_gwy_graph_draw_grid(drawable, gc, specs, nxdata, x_grid_data, nydata, y_grid_data)
Draws an array of grid lines on a drawable.
source code
 
z_UNIMPLEMENTED_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
 
z_UNIMPLEMENTED_gwy_graph_draw_selection_areas(drawable, gc, specs, selection)
Draws selected area on a drawable.
source code
 
z_UNIMPLEMENTED_gwy_graph_draw_selection_lines(drawable, gc, specs, selection, orientation)
Draws selected lines on a drawable.
source code
 
z_UNIMPLEMENTED_gwy_graph_draw_selection_points(drawable, gc, specs, selection)
Draws selection points on a drawable.
source code
 
z_UNIMPLEMENTED_gwy_graph_draw_selection_xareas(drawable, gc, specs, selection)
Draws selected x-area on a drawable.
source code
 
z_UNIMPLEMENTED_gwy_graph_draw_selection_yareas(drawable, gc, specs, selection)
Drawss selected y-area on a drawable.
source code
 
gwy_graph_func_exists(name)
Checks whether a graph function exists.
source code
 
z_UNIMPLEMENTED_gwy_graph_func_foreach(function, user_data)
Calls a function for each graph function.
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
 
z_UNIMPLEMENTED_gwy_graph_func_register(name, func, menu_path, stock_id, sens_mask, tooltip)
Registers 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
 
z_UNIMPLEMENTED_gwy_graph_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_grid_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_label_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_label_position_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_model_export_style_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_model_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_point_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_graph_status_type_get_type() 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
 
z_UNIMPLEMENTED_gwy_graph_window_get_type() source code
 
z_UNIMPLEMENTED_gwy_hash_table_to_list_cb(unused_key, value, user_data)
GHashTable to GList convertor.
source code
 
z_UNIMPLEMENTED_gwy_hash_table_to_slist_cb(unused_key, value, user_data)
GHashTable to GSList convertor.
source code
 
z_UNIMPLEMENTED_gwy_hmarker_box_get_type() source code
 
z_UNIMPLEMENTED_gwy_hruler_get_type() source code
 
z_UNIMPLEMENTED_gwy_hscale_style_get_type() 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
 
z_UNIMPLEMENTED_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
 
z_UNIMPLEMENTED_gwy_interpolation_resample_block_1d(length, data, newlength, newdata, interpolation, preserve)
Resamples a one-dimensional data array.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_resample_block_2d(width, height, rowstride, data, newwidth, newheight, newrowstride, newdata, interpolation, preserve)
Resamples a two-dimensional data array.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_resolve_coeffs_1d(n, data, interpolation)
Transforms data values in a one-dimensional array to interpolation coefficients.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_resolve_coeffs_2d(width, height, rowstride, data, interpolation)
Transforms data values in a two-dimensional array to interpolation coefficients.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_shift_block_1d(length, data, offset, newdata, interpolation, exterior, fill_value, preserve)
Shifts a one-dimensional data block by a possibly non-integer offset.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_type_get_enum()
Returns Enum for InterpolationType enum type.
source code
 
z_UNIMPLEMENTED_gwy_interpolation_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_inventory_get_type() source code
 
z_UNIMPLEMENTED_gwy_inventory_new_filled(itype, nitems, items)
Creates a new inventory and fills it with items.
source code
 
z_UNIMPLEMENTED_gwy_inventory_new_from_array(itype, item_size, nitems, items)
Creates a new inventory from static item array.
source code
 
z_UNIMPLEMENTED_gwy_inventory_store_get_type() source code
 
gwy_label_new_header(text)
Creates a bold, left aligned label.
source code
 
z_UNIMPLEMENTED_gwy_layer_basic_get_type() source code
 
z_UNIMPLEMENTED_gwy_layer_basic_range_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_layer_func_foreach(function, user_data)
Calls a function for each layer function.
source code
 
gwy_layer_func_register(type)
Registeres a layer function (layer type).
source code
 
z_UNIMPLEMENTED_gwy_layer_line_restrict_angle(data_view, endpoint, x, y, xy) source code
 
z_UNIMPLEMENTED_gwy_layer_mask_get_type() source code
 
z_UNIMPLEMENTED_gwy_line_stat_quantity_get_type() source code
 
z_UNIMPLEMENTED_gwy_list_store_row_changed(store, iter, path, row)
Convenience function to emit "GtkTreeModel::row-changed" signal on a tree store.
source code
 
z_UNIMPLEMENTED_gwy_marker_box_get_type() source code
 
z_UNIMPLEMENTED_gwy_marker_operation_type_get_type() 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
 
z_UNIMPLEMENTED_gwy_masking_type_get_enum()
Returns Enum for MaskingType enum type.
source code
 
z_UNIMPLEMENTED_gwy_masking_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_math_choleski_decompose(n, matrix)
Decomposes a symmetric positive definite matrix in place.
source code
 
z_UNIMPLEMENTED_gwy_math_choleski_solve(n, decomp, rhs)
Solves a system of linear equations with predecomposed symmetric positive definite matrix a and right hand side b.
source code
 
z_UNIMPLEMENTED_gwy_math_curvature(coeffs, kappa1, kappa2, phi1, phi2, xc, yc, zc) source code
 
z_UNIMPLEMENTED_gwy_math_find_nearest_line(x, y, d2min, n, coords, metric)
Finds the line from coords nearest to the point (x, y).
source code
 
z_UNIMPLEMENTED_gwy_math_find_nearest_point(x, y, d2min, n, coords, metric)
Finds the point from coords nearest to the point (x, y).
source code
 
z_UNIMPLEMENTED_gwy_math_fit_polynom(ndata, xdata, ydata, n, coeffs)
Fits a polynom through a general (x, y) data set.
source code
 
z_UNIMPLEMENTED_gwy_math_humanize_numbers(unit, maximum, precision)
Finds a human-friendly representation for a range of numbers.
source code
 
gwy_math_is_in_polygon(x, y, poly, n)
Establishes wether the test point x, y is inside the polygon poly.
source code
 
z_UNIMPLEMENTED_gwy_math_lin_solve(n, matrix, rhs, result)
Solve a regular system of linear equations.
source code
 
z_UNIMPLEMENTED_gwy_math_lin_solve_rewrite(n, matrix, rhs, result)
Solves a regular system of linear equations.
source code
 
z_UNIMPLEMENTED_gwy_math_median(n, array)
Finds median of an array of values using Quick select algorithm.
source code
 
z_UNIMPLEMENTED_gwy_math_median_uncertainty(n, array, uarray) source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_derive(x, n_param, param, fixed_param, ff, user_data, deriv, dres)
Numerically computes the partial derivative of a fitting function.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_fit(nlfit, n_dat, x, y, n_param, param, user_data)
Performs a nonlinear fit of nlfit function on (x,y) data.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_fit_full(nlfit, n_dat, x, y, weight, n_param, param, fixed_param, link_map, user_data)
Performs a nonlinear fit of nlfit function on (x,y) data, allowing some fixed parameters.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_free(nlfit)
Completely frees a Marquardt-Levenberg nonlinear fitter.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_get_correlations(nlfit, par1, par2)
Returns the correlation coefficient between par1-th and par2-th parameter.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_get_dispersion(nlfit)
Returns the residual sum divided by the number of degrees of freedom.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_get_max_iterations(nlfit)
Returns the maximum number of iterations of nonlinear fitter nlfit.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_get_sigma(nlfit, par)
Returns the standard deviation of parameter number par.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_set_max_iterations(nlfit, maxiter)
Sets the maximum number of iterations for nonlinear fitter nlfit.
source code
 
z_UNIMPLEMENTED_gwy_math_nlfit_succeeded(nlfit)
Obtains the status of the last fitting.
source code
 
z_UNIMPLEMENTED_gwy_math_sort(n, array)
Sorts an array of doubles using a quicksort algorithm.
source code
 
z_UNIMPLEMENTED_gwy_math_tridiag_solve_rewrite(n, d, a, b, rhs)
Solves a tridiagonal system of linear equations.
source code
 
z_UNIMPLEMENTED_gwy_md5_get_digest(buffer, buffer_size, digest16)
Compute the MD5 hash of a buffer.
source code
 
z_UNIMPLEMENTED_gwy_memcpy_byte_swap(source, dest, item_size, nitems, byteswap)
Copies a block of memory swapping bytes along the way.
source code
 
z_UNIMPLEMENTED_gwy_memmem(haystack, haystack_len, needle, needle_len)
Find a block of memory in another block of memory.
source code
 
z_UNIMPLEMENTED_gwy_menu_gl_material(callback, cbdata)
Creates a pop-up GL material menu.
source code
 
z_UNIMPLEMENTED_gwy_menu_gradient(callback, cbdata)
Creates a pop-up gradient menu.
source code
 
z_UNIMPLEMENTED_gwy_menu_sens_flags_get_type() source code
 
z_UNIMPLEMENTED_gwy_merge_type_get_enum()
Returns Enum for MergeType enum type.
source code
 
z_UNIMPLEMENTED_gwy_merge_type_get_type() source code
 
gwy_module_browser()
Shows a simple module browser.
source code
 
z_UNIMPLEMENTED_gwy_module_error_get_type() source code
 
gwy_module_error_quark()
Returns error domain for module loading.
source code
 
z_UNIMPLEMENTED_gwy_module_file_error_get_type() source code
 
gwy_module_file_error_quark()
Returns error domain for file module functions.
source code
 
z_UNIMPLEMENTED_gwy_module_foreach(function, data)
Runs function on each registered module.
source code
 
gwy_module_get_filename(name)
Returns full file name of a module.
source code
 
z_UNIMPLEMENTED_gwy_module_get_functions(name)
Returns list of names of functions a module implements.
source code
 
z_UNIMPLEMENTED_gwy_module_lookup(name)
Returns information about one module.
source code
 
z_UNIMPLEMENTED_gwy_module_register_module(name)
Loads a single module.
source code
 
z_UNIMPLEMENTED_gwy_module_register_modules(paths)
Registers all modules in given directories.
source code
 
z_UNIMPLEMENTED_gwy_nlfit_preset_get_type() source code
 
gwy_nlfit_presets()
Gets inventory with all the NLFit presets.
source code
 
z_UNIMPLEMENTED_gwy_null_store_get_type() source code
 
z_UNIMPLEMENTED_gwy_orientation_get_enum()
Returns Enum for Orientation enum type.
source code
 
z_UNIMPLEMENTED_gwy_orientation_get_type() 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
 
z_UNIMPLEMENTED_gwy_pixmap_layer_get_type() source code
 
z_UNIMPLEMENTED_gwy_plain_tool_changed_get_type() source code
 
z_UNIMPLEMENTED_gwy_plain_tool_get_type() source code
 
gwy_plain_tool_get_z_average(data_field, point, radius)
Computes average value over a part of data field dfield.
source code
 
z_UNIMPLEMENTED_gwy_plane_fit_quantity_get_type() source code
 
z_UNIMPLEMENTED_gwy_plane_symmetry_get_enum()
Returns Enum for PlaneSymmetry enum type.
source code
 
z_UNIMPLEMENTED_gwy_plane_symmetry_get_type() source code
 
gwy_process_func_exists(name)
Checks whether a data processing function exists.
source code
 
z_UNIMPLEMENTED_gwy_process_func_foreach(function, user_data)
Calls a function for each process function.
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
 
z_UNIMPLEMENTED_gwy_process_func_register(name, func, menu_path, stock_id, run, sens_mask, tooltip)
Registers 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
 
z_UNIMPLEMENTED_gwy_radio_buttons_attach_to_table(group, table, colspan, row)
Attaches a group of radio buttons to table rows.
source code
 
z_UNIMPLEMENTED_gwy_radio_buttons_create(entries, nentries, callback, cbdata, current)
Creates a radio button group from an enum.
source code
 
z_UNIMPLEMENTED_gwy_radio_buttons_find(group, value)
Finds a radio button by its associated integer value.
source code
 
z_UNIMPLEMENTED_gwy_radio_buttons_get_current(group)
Gets the integer enum value corresponding to currently selected item.
source code
 
z_UNIMPLEMENTED_gwy_radio_buttons_set_current(group, current)
Sets currently selected radio button in group based on integer item object data (as set by gwy_radio_buttons_create()).
source code
 
gwy_raw_data_size(datatype)
Reports the size of a single raw data item.
source code
 
z_UNIMPLEMENTED_gwy_raw_data_type_get_type() source code
 
gwy_resource_classes_finalize()
Destroys the inventories of all resource classes.
source code
 
z_UNIMPLEMENTED_gwy_resource_editor_get_type() source code
 
z_UNIMPLEMENTED_gwy_resource_get_type() 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
 
z_UNIMPLEMENTED_gwy_rgba_get_type() source code
 
gwy_rgba_remove_from_container(container, prefix)
Removes RGBA color components from a container.
source code
 
z_UNIMPLEMENTED_gwy_ruler_get_type() source code
 
z_UNIMPLEMENTED_gwy_run_type_get_type() 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
 
z_UNIMPLEMENTED_gwy_save_auxiliary_with_callback(title, parent, create, destroy, user_data)
Saves a report or other auxiliary data to a user specified file.
source code
 
z_UNIMPLEMENTED_gwy_sci_text_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_graph_1darea_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_graph_area_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_graph_line_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_graph_point_get_type() source code
 
z_UNIMPLEMENTED_gwy_selection_graph_zoom_get_type() source code
 
z_UNIMPLEMENTED_gwy_sensitivity_group_get_type() source code
 
gwy_serializable_clone(source, copy)
Makes an object identical to another object of the same type.
source code
 
z_UNIMPLEMENTED_gwy_serializable_deserialize(buffer, size, position)
Restores a serialized object from byte buffer.
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
 
z_UNIMPLEMENTED_gwy_serializable_get_type() source code
 
z_UNIMPLEMENTED_gwy_serializable_serialize(serializable, buffer)
Serializes an object to byte buffer.
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
 
z_UNIMPLEMENTED_gwy_serialize_get_items_size(object_name, nitems, items)
Calculates serialized object size for hash-like objects.
source code
 
z_UNIMPLEMENTED_gwy_serialize_get_struct_size(object_name, nspec, spec)
Calculates serialized object size for struct-like objects.
source code
 
z_UNIMPLEMENTED_gwy_serialize_object_items(buffer, object_name, nitems, items)
Serializes an object to buffer in gwy-file format.
source code
 
z_UNIMPLEMENTED_gwy_serialize_pack_object_struct(buffer, object_name, nspec, spec)
Appends serialization of object with g_type_name() B{C{object_name}} and components described by B{C{spec}} to B{C{buffer}} in gwy-file format.
source code
 
z_UNIMPLEMENTED_gwy_serialize_unpack_object_struct(buffer, size, position, object_name, nspec, spec)
Deserializes an object with named components packed into gwy-file format by L{gwy_serialize_pack_object_struct}().
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
 
z_UNIMPLEMENTED_gwy_shader_get_type() source code
 
z_UNIMPLEMENTED_gwy_si_unit_format_style_get_type() source code
 
z_UNIMPLEMENTED_gwy_si_unit_get_type() source code
 
gwy_si_unit_new_parse(unit_string, power10)
Creates a new SI unit from string representation.
source code
 
z_UNIMPLEMENTED_gwy_si_unit_value_format_free(format)
Frees a value format structure.
source code
 
z_UNIMPLEMENTED_gwy_si_unit_value_format_set_units(format, units)
Sets the units field of a value format structure.
source code
 
z_UNIMPLEMENTED_gwy_spectra_get_type() source code
 
z_UNIMPLEMENTED_gwy_statusbar_get_type() source code
 
gwy_stock_register_stock_items()
Registers stock items.
source code
 
z_UNIMPLEMENTED_gwy_str_next_line(buffer)
Extracts a next line from a character buffer, modifying it in place.
source code
 
gwy_strdiffpos(s1, s2)
Finds position where two strings differ.
source code
 
z_UNIMPLEMENTED_gwy_string_list_get_type() source code
 
z_UNIMPLEMENTED_gwy_string_to_enum(str, enum_table, n)
Creates an integer representation of a string enum value str.
source code
 
z_UNIMPLEMENTED_gwy_string_to_flags(str, enum_table, n, delimiter)
Creates an integer flag combination of its string representation str.
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_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_set_sensitive(pivot, sensitive)
Sets sensitivity of a group of controls create by gwy_table_attach_hscale().
source code
 
z_UNIMPLEMENTED_gwy_text_header_error_get_type() source code
 
gwy_text_header_error_quark()
Returns error domain for expression parsin and evaluation.
source code
 
z_UNIMPLEMENTED_gwy_text_header_parse(header, parser, user_data)
Parses a line-oriented text header into a hash table.
source code
 
z_UNIMPLEMENTED_gwy_ticks_style_get_type() source code
 
gwy_tip_cmap(tip, surface) source code
 
gwy_tip_dilation(tip, surface) source code
 
gwy_tip_erosion(tip, surface) source code
 
gwy_tip_estimate_full(tip, surface, threshold, use_edges) source code
 
gwy_tip_estimate_partial(tip, surface, threshold, use_edges) source code
 
gwy_tip_model_get_npresets()
Find number of actual tip model presets.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset(preset_id)
Get data related to tip preset.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset_by_name(name)
Get data related to preset with specified name.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset_group_name(preset)
Get group name of preset (e.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset_id(preset)
Get preset identifier within all presets.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset_nparams(preset)
Get number of tip preset parameters.
source code
 
z_UNIMPLEMENTED_gwy_tip_model_get_preset_tip_name(preset)
Get name of the preset (e.
source code
 
z_UNIMPLEMENTED_gwy_tip_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_tool_func_foreach(function, user_data)
Calls a function for each tool function.
source code
 
gwy_tool_func_register(type)
Registeres a tool function (tool type).
source code
 
z_UNIMPLEMENTED_gwy_tool_switch_event_get_type() source code
 
z_UNIMPLEMENTED_gwy_transform_direction_get_type() source code
 
gwy_type_init()
Makes libgwyddion types safe for deserialization and performs other initialization.
source code
 
z_UNIMPLEMENTED_gwy_undo_checkpointv(data, n, 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
 
z_UNIMPLEMENTED_gwy_undo_qcheckpointv(data, n, 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
 
z_UNIMPLEMENTED_gwy_units_placement_get_type() source code
 
z_UNIMPLEMENTED_gwy_vector_layer_get_type() 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
 
z_UNIMPLEMENTED_gwy_visibility_reset_type_get_type() source code
 
z_UNIMPLEMENTED_gwy_vruler_get_type() source code
 
z_UNIMPLEMENTED_gwy_watershed_state_type_get_type() 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
 
z_UNIMPLEMENTED_gwy_windowing_type_get_enum()
Returns Enum for WindowingType enum type.
source code
 
z_UNIMPLEMENTED_gwy_windowing_type_get_type() source code
 
z_UNIMPLEMENTED_gwyfile_pack_metadata(data) source code
 
z_UNIMPLEMENTED_match_line(res, ref, cmp, maxoff, offset, score) source code
 
z_UNIMPLEMENTED_omicronflat_getscalingfactor() source code
 
z_UNIMPLEMENTED_omicronflat_load() source code
 
z_UNIMPLEMENTED_omicronflat_read2dimage() source code
 
z_UNIMPLEMENTED_omicronflat_readcits() source code
 
z_UNIMPLEMENTED_omicronflat_readmetadata() source code
 
z_UNIMPLEMENTED_omicronflat_readmetainfo() source code
 
z_UNIMPLEMENTED_omicronflat_readsps() source code
 
z_UNIMPLEMENTED_omicronflat_readstring() source code
 
z_UNIMPLEMENTED_open_temporary_file(filename, error) source code
 
z_UNIMPLEMENTED_proc_find_plugin(name, run) source code
 
z_UNIMPLEMENTED_proc_plugin_proxy_run(data, run, name) source code
 
z_UNIMPLEMENTED_proc_register_plugins(plugins, file, buffer) source code
 
z_UNIMPLEMENTED_register_plugins(plugins, dir, register_func) source code
 
z_UNIMPLEMENTED_text_dump_export(data, filename, error) source code
Variables [hide private]
  __package__ = None
Function Details [hide private]

z_UNIMPLEMENTED_gwy_2d_cwt_wavelet_type_get_enum()

source code 

Returns Enum for 2DCWTWaveletType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

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.

Since: 2.14

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

gwy_3d_window_class_get_tooltips()

source code 

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

Returns:
The GtkTooltips object.

gwy_3d_window_class_set_tooltips(tips)

source code 

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

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 NULL value disables tooltips altogether. (gtk.Tooltips)

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)

z_UNIMPLEMENTED_gwy_app_build_graph_menu(accel_group)

source code 

Constructs the application <guimenu>Graph</guimenu> menu.

The menu is created from graph functions registered by modules, therefore module registeration has to be performed 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).

z_UNIMPLEMENTED_gwy_app_build_process_menu(accel_group)

source code 

Constructs the application <guimenu>Data Process</guimenu> menu.

The menu is created from data processing functions registered by modules, therefore module registeration has to be performed 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).

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, using the average of all good points as the neutral replacement value (at this moment).

Since: 2.14

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.

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.

Since: 2.3

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

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:

z_UNIMPLEMENTED_gwy_app_data_browser_add_channel_watch(function, user_data)

source code 

Adds a watch function called when a channel changes.

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

Parameters:
  • function - Function to call when a channel changes. (AppDataWatchFunc)
  • user_data - User data to pass to function. (gpointer)
Returns:
The id of the added watch func that can be used to remove it later using gwy_app_data_browser_remove_channel_watch().

Since 2.21.

gwy_app_data_browser_add_data_field(dfield, data, showit)

source code 

Adds a data field to a data container.

Parameters:
  • dfield - A data field to add. (DataField)
  • data - A data container to add dfield to. It can be NULL 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.

gwy_app_data_browser_add_graph_model(gmodel, data, showit)

source code 

Adds a graph model to a data container.

Parameters:
  • gmodel - A graph model to add. (GraphModel)
  • data - A data container to add gmodel to. It can be NULL 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.

gwy_app_data_browser_add_spectra(spectra, data, showit)

source code 

Adds a spectra object to a data container.

Since: 2.7

Parameters:
  • spectra - A spectra object to add. (Spectra)
  • data - A data container to add gmodel to. It can be NULL 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.

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.

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

Since: 2.21

Parameters:
  • data - A data container managed by the data-browser. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the channel titles against. (string)
Returns:
A newly allocated array with channel ids, -1 terminated.

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

Since: 2.21

Parameters:
  • data - A data container managed by the data-browser. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the graph titles against. (string)
Returns:
A newly allocated array with graph ids, -1 terminated.

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

Since: 2.21

Parameters:
  • data - A data container managed by the data-browser. (Container)
  • titleglob - Pattern, as used by GPatternSpec, to match the spectra titles against. (string)
Returns:
A newly allocated array with spectra ids, -1 terminated.

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

source code 

Get list of containers of current data browser.

Returns:
list of containers Container object

gwy_app_data_browser_get_current(obj_type)

source code 

Get current object of given type.

Parameters:
  • obj_type - object type, expected values: APP_DATA_FIELD_ID, APP_GRAPH_MODEL_ID, APP_SPECTRA_ID, APP_DATA_FIELD_KEY, APP_MASK_FIELD_KEY, APP_SHOW_FIELD_KEY, APP_GRAPH_MODEL_KEY, APP_SPECTRA_KEY, APP_CONTAINER, APP_DATA_VIEW, APP_GRAPH, APP_DATA_FIELD, APP_MASK_FIELD, APP_SHOW_FIELD, APP_GRAPH_MODEL, APP_SPECTRA (some_type)
Returns:
reference to current object or None.

gwy_app_data_browser_get_data_ids(container)

source code 

Gets the list of all channels in a data container. The container must be known to the data browser.

Parameters:
  • container - A data container. (some_type)
Returns:
A tuple with ids

z_UNIMPLEMENTED_gwy_app_data_browser_get_graph_ids(data)

source code 

Gets the list of all graphs in a data container.

Parameters:
  • data - A data container managed by the data-browser. (Container)
Returns:
A newly allocated array with graph ids, -1 terminated.

gwy_app_data_browser_get_gui_enabled()

source code 

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

Since: 2.21

Returns:
True if the data-browser is permitted to create windows, False if it is not.

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

z_UNIMPLEMENTED_gwy_app_data_browser_get_spectra_ids(data)

source code 

Gets the list of all spectra in a data container.

Since: 2.7

Parameters:
  • data - A data container managed by the data-browser. (Container)
Returns:
A newly allocated array with spectrum ids, -1 terminated.

gwy_app_data_browser_merge(data)

source code 

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

Since: 2.7

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

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.

Since: 2.21

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

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. (VisibilityResetType)
Returns:
True if anything is visible after the reset.

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

source code 

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

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

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 (channel) current in the data browser.

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

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.

Since: 2.7

Parameters:
  • spectra - A spectra object. (Spectra)

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.

Since: 2.21

Parameters:
  • setting - True to enable creation of widgets by the data-browser, False to disable it. (bool)

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

source code 

Releases data browser resources and saves its state.

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

gwy_app_file_load(filename)

source code 

Load specified file

Parameters:
  • filename - Filename of file to open (some_type)
Returns:
A main Container of opened file

gwy_app_file_merge()

source code 

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

Since: 2.7

gwy_app_file_open()

source code 

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

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

source code 

Saves current data to a user-selected file (very high-level app function).

gwy_app_file_write(data, filename_utf8, filename_sys, name)

source code 

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

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

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

Parameters:
  • data - Data to write. (Container)
  • filename_utf8 - Name of file to write data to, in UTF-8. (string)
  • filename_sys - Name of file to write data to, in GLib encoding. (string)
  • name - File type to open file as, but normally NULL to automatically detect from file name. (string)
Returns:
True on success.

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, NULL if no data window displays the requested channel.

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.

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

gwy_app_get_data_field_title(data, id)

source code 

Gets a data channel title.

This function should return a reasoanble 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.

gwy_app_get_data_key_for_id(id)

source code 

Calculates data field quark identifier from its id.

Parameters:
  • id - Data number in container. (int)
Returns:
The quark key identifying mask number id.

gwy_app_get_graph_key_for_id(id)

source code 

Calculates graph model quark identifier from its id.

Since: 2.7

Parameters:
  • id - Graph number in container. (int)
Returns:
The quark key identifying graph model number id.

gwy_app_get_mask_key_for_id(id)

source code 

Calculates mask field quark identifier from its id.

Parameters:
  • id - Data number in container. (int)
Returns:
The quark key identifying mask number id.

gwy_app_get_show_key_for_id(id)

source code 

Calculates presentation field quark identifier from its id.

Parameters:
  • id - Data number in container. (int)
Returns:
The quark key identifying presentation number id.

gwy_app_get_spectra_key_for_id(id)

source code 

Calculates spectra quark identifier from its id.

Since: 2.7

Parameters:
  • id - Spectra number in container. (int)
Returns:
The quark key identifying spectra number id.

gwy_app_get_tooltips()

source code 

Gets the application-wide tooltips instance.

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.

z_UNIMPLEMENTED_gwy_app_gl_init(argc, argv)

source code 

Checks for working OpenGL and initializes it.

When OpenGL support is not compiled in, this function does not do anything. When OpenGL is supported, it calls gtk_gl_init_check() and gwy_widgets_gl_init() (if the former succeeeds).

Parameters:
  • argc - Address of the argc parameter of main(). Passed to gtk_gl_init_check(). (int*)
  • argv - Address of the argv parameter of main(). Passed to gtk_gl_init_check(). (char***)
Returns:
True if OpenGL initialization succeeeded.

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

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

source code 

Returns Gwyddion main application window (toolbox).

Returns:
The Gwyddion toolbox.

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

z_UNIMPLEMENTED_gwy_app_menu_recent_files_update(recent_files)

source code 

Updates recent file menu.

If the list of files is longer than the maximum number of recent file menu items, only the maximum number is shown.

Parameters:
  • recent_files - A list of recent file names, in UTF-8. (GList*)

gwy_app_process_func_save_use()

source code 

Saves application data processing function statistics.

gwy_app_process_menu_add_run_last(menu)

source code 

Adds <guimenuitem>Re-show Last</guimenuitem> and <guimenuitem>Repeat Last</guimenuitem> items to application data process menu.

This function is essentially useful only for toolbox construction.

Parameters:
  • menu - Menu created with gwy_app_build_process_menu(). (gtk.Widget)

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.

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.

gwy_app_recent_file_list_free()

source code 

Frees all memory taken by recent file list.

Should not be called while the recent file menu still exists.

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

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.

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

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

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

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. (MenuSensFlags)
  • state - The new state (masked with affected_mask). (MenuSensFlags)

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 NULL 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_settings_create_config_dir()

source code 

Create gwyddion config directory.

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

gwy_app_settings_error_quark()

source code 

Returns error domain for application settings operations.

See and use APP_SETTINGS_ERROR.

Returns:
The error domain.

gwy_app_settings_free()

source code 

Frees Gwyddion settings.

Should not be called only by main application.

gwy_app_settings_get()

source code 

Gets the Gwyddion settings.

The settings are a Container automatically loaded at program startup and saved ad its exit. For storing persistent module data you should use <literal>"/module/YOUR_MODULE_NAME/"</literal> prefix.

Returns:
The settings as a Container.

gwy_app_settings_get_log_filename()

source code 

Returns a suitable log file name.

Returns:
The file name as a newly allocated string.

z_UNIMPLEMENTED_gwy_app_settings_get_module_dirs()

source code 

Returns a list of directories to search modules in.

Returns:
The list of module directories as a newly allocated array of newly allocated strings, to be freed with g_str_freev() when not longer needed.

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.

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.

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.

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.

gwy_app_switch_tool(toolname)

source code 

Switches the current tool.

Parameters:
  • toolname - Tool name, that is GType name of the tool type. (string)

z_UNIMPLEMENTED_gwy_app_undo_checkpointv(data, n, keys)

source code 

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

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

Parameters:
  • data - A data container. (Container)
  • n - The number of strings in keys. (int)
  • keys - An array of container string keys to save data. It can contain holes, that is NUL's, they are ignored. However, it should contain at least one real key. (const-gchar**)
Returns:
Undo level id. Not useful (yet).

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.

Since: 2.23

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

gwy_app_undo_qcheckpointv(data, n, keys)

source code 

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

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

If keys include channel keys the corresponding channel calibration data is saved together with the data and then removed from the container. This prevents mismatch between a data field and its calibration data. Therefore, if you perform a data operation that can also meaningfully transform the corresponding calibration data take care to obtain it before saving undo.

Parameters:
  • data - A data container. (Container)
  • n - The number of strings in keys. (int)
  • keys - An array of container quark keys to save data. It can contain holes, that is 0's, they are ignored. However, it should contain at least one real key. (const-GQuark*)
Returns:
Undo level id. Not useful (yet).

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

Since: 2.3

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

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.

Since: 2.3

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

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_set_fraction(fraction)

source code 

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

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.

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.

Parameters:
  • message - A mesage to show in the progress dialog. (string)
Returns:
True if the operation can continue, False if user cancelled it meanwhile.

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.

Parameters:
  • prefix - The prefix for new messages. (string)
Returns:
True if the operation can continue, False if user cancelled it meanwhile.

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.

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

z_UNIMPLEMENTED_gwy_ascii_strcase_equal(v1, v2)

source code 

Compares two strings for equality, ignoring case.

The case folding is performed only on ASCII characters.

This function is intended to be passed to g_hash_table_new() as key_equal_func, namely in conjuction with gwy_ascii_strcase_hash() hashing function.

Since: 2.26

Parameters:
  • v1 - String key. (gconstpointer)
  • v2 - String key to compare with v1. (gconstpointer)
Returns:
True if the two string keys match, ignoring case.

z_UNIMPLEMENTED_gwy_ascii_strcase_hash(v)

source code 

Converts a string to a hash value, ignoring case.

The case folding is performed only on ASCII characters.

This function is intended to be passed to g_hash_table_new() as hash_func, namely in conjuction with gwy_ascii_strcase_equal() comparison function.

Since: 2.26

Parameters:
  • v - String key. (gconstpointer)
Returns:
The hash value corresponding to the key v.

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.

gwy_cdlines()

source code 

Gets inventory with all the critical dimension evaluators.

Returns:
Critical dimension evaluator inventory.

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.

gwy_color_button_new_with_color(color)

source code 

Creates a new color button.

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

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 (NULL to use default). (string)
  • color_button - Color button to update on color change (or NULL). (ColorButton*)
  • container - Container to initialize the color from and save it to. (Container)
  • prefix - Prefix in container (normally "/0/mask"). (string)

gwy_combo_box_metric_unit_set_unit(combo, _from, to, unit)

source code 

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

Since: 2.5

Parameters:
  • combo - A combo box which was created with gwy_combo_box_metric_unit_new(). (gtk.ComboBox)
  • _from - The exponent of 10 the menu should start at (a multiple of 3, will be rounded downward if isn't). (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)

gwy_container_deserialize_from_text(text)

source code 

Restores a container from is text representation.

Parameters:
  • text - Text containing serialized container contents as dumped by Container.serialize_to_text(). (string)
Returns:
The restored container, or NULL on failure.

z_UNIMPLEMENTED_gwy_convert_raw_data(data, nitems, stride, datatype, byteorder, target, scale, offset)

source code 

Converts a block of raw data items to doubles.

Note that conversion from 64bit integral types may lose information as they have more bits than the mantissa of doubles. All other conversions should be precise.

Since: 2.25

Parameters:
  • data - Pointer to the input raw data to be converted to doubles. The data type is given by datatype and byteorder. (gconstpointer)
  • nitems - Data block length, i.e. the number of consecutive items to convert. (gsize)
  • stride - Item stride in the raw data, measured in raw values. Pass 1 for consecutive raw data. For backward reading, pass -1 and point data to the last raw item instead of the first. (gssize)
  • datatype - Type of the raw data items. (RawDataType)
  • byteorder - Byte order of the raw data. (ByteOrder)
  • target - Array of nitems to store the converted input data to. (gdouble*)
  • scale - Factor to multiply the data with. (float)
  • offset - Constant to add to the data after multiplying with scale. (float)

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.

z_UNIMPLEMENTED_gwy_data_field_correlate_finalize(state)

source code 

Destroys a correlation iterator, freeing all resources.

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

z_UNIMPLEMENTED_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*)

z_UNIMPLEMENTED_gwy_data_field_crosscorrelate_finalize(state)

source code 

Destroys a cross-correlation iterator, freeing all resources.

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

z_UNIMPLEMENTED_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_fractal_cubecounting_dim(xresult, yresult, a, b)

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)
  • a - Location to store linear fit constant to. (float)
  • b - Location to store linear fit slope to. (float)
Returns:
The fractal dimension.

gwy_data_field_fractal_partitioning_dim(xresult, yresult, a, b)

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)
  • a - Location to store linear fit constant to. (float)
  • b - Location to store linear fit slope to. (float)
Returns:
The fractal dimension.

gwy_data_field_fractal_psdf_dim(xresult, yresult, a, b)

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)
  • a - Location to store linear fit constant to. (float)
  • b - Location to store linear fit slope to. (float)
Returns:
The fractal dimension.

gwy_data_field_fractal_triangulation_dim(xresult, yresult, a, b)

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)
  • a - Location to store linear fit constant to. (float)
  • b - Location to store linear fit slope to. (float)
Returns:
The fractal dimension.

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

gwy_data_field_get_elliptic_area_size(width, height)

source code 

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

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

z_UNIMPLEMENTED_gwy_data_field_grains_watershed_finalize(state)

source code 

Destroys a watershed iterator, freeing all resources.

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

z_UNIMPLEMENTED_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*)

z_UNIMPLEMENTED_gwy_data_field_unrotate_find_corrections(derdist, correction)

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:
  • derdist - Angular derivation distribution (normally obrained from DataField.slope_distribution()). (DataLine)
  • correction - Corrections for particular symmetry types will be stored here (indexed by PlaneSymmetry). correction[0] contains the most probable correction. All angles are in radians. (gdouble*)
Returns:
The estimate type of prevalent symmetry.

gwy_data_window_class_get_tooltips()

source code 

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

Returns:
The GtkTooltips object.

gwy_data_window_class_set_tooltips(tips)

source code 

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

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 NULL value disables tooltips altogether. (gtk.Tooltips)

z_UNIMPLEMENTED_gwy_deserialize_object_hash(buffer, size, position, object_name, nitems)

source code 

Deserializes an object with arbitrary components from gwy-file format.

This function works like gwy_serialize_unpack_object_struct(), except that it does not use any a priori knowledge of what the object contains. So instead of filling values in supplied SerializeSpec's, it constructs SerializeItem's completely from what is found in buffer. It does considerably less sanity checks and even allows several components of the same name.

Parameters:
  • buffer - A block of memory of size size contaning object representation. (string)
  • size - The size of buffer. (gsize)
  • position - Current position in buffer, will be updated to point after object. (gsize*)
  • object_name - The type name of the object. (string)
  • nitems - Where the number of deserialized components should be stored. (gsize*)
Returns:
A newly allocated array of deserialized components. Note the name fields of SerializeSpec's point to buffer and thus are valid only as long as buffer is; any arrays or strings are newly allocated and must be reused or freed by caller.

gwy_dialog_prevent_delete_cb()

source code 

Returns True.

Use gtk_true() instead.

Returns:
True.

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.

z_UNIMPLEMENTED_gwy_dwt_denoise_type_get_enum()

source code 

Returns Enum for DWTDenoiseType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

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 NULL to allocate a new one). (DataLine)
  • type - Wavelet type. (DWTType)
Returns:
resampled or newly allocated DataLine with wavelet coefficients.

z_UNIMPLEMENTED_gwy_dwt_type_get_enum()

source code 

Returns Enum for DWTType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

gwy_entities()

source code 

Returns a constant inventory with all available entities.

Returns:
The entities as a 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.

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.

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.

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, integer)

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)
  • integer - Pointer to an integer to update to selected enum value. (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.

z_UNIMPLEMENTED_gwy_enum_to_string(enumval, enum_table, n)

source code 

Creates a string representation of an integer enum value enumval.

Parameters:
  • enumval - A one integer value from enum_table. (int)
  • enum_table - A table of corresponding string-integer pairs. (const-Enum*)
  • n - The number of elements in enum_table, may be -1 when enum_table is terminated by a NULL name. (int)
Returns:
The name as a string from enum_table, thus it generally should not be modified or freed, unless enum_table is supposed to be modified too. If the value is not found, an empty string is returned.

gwy_expr_error_quark()

source code 

Returns error domain for expression parsin and evaluation.

See and use EXPR_ERROR.

Returns:
The error domain.

gwy_fd_curve_presets()

source code 

Gets inventory with all the FD curve presets.

Since: 2.7

Returns:
FD curve preset inventory.

gwy_fft_find_nice_size(size)

source code 

Finds a nice-for-FFT array size.

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

z_UNIMPLEMENTED_gwy_fft_simple(dir, n, istride, in_re, in_im, ostride, out_re, out_im)

source code 

Performs a DFT algorithm.

This is a low-level function used by other FFT functions when no better backend is available.

Strides are distances between samples in input and output arrays. Use 1 for normal `dense' arrays. To use gwy_fft_simple() with interleaved arrays, that is with alternating real and imaginary data, call it with istride=2, in_re=complex_array, in_im=complex_array+1 (and similarly for output arrays).

The output is symmetrically normalized by square root of n for both transform directions. By performing forward and then backward transform, you will obtain the original array (up to rounding errors).

Parameters:
  • dir - Transformation direction. (TransformDirection)
  • n - Number of data points. Note only certain transform sizes are implemented. If gwy_fft_simple() is the current FFT backend, then gwy_fft_find_nice_size() can provide accepted transform sizes. If gwy_fft_simple() is not the current FFT backend, you should not use it. (int)
  • istride - Input data stride. (int)
  • in_re - Real part of input data. (const-gdouble*)
  • in_im - Imaginary part of input data. (const-gdouble*)
  • ostride - Output data stride. (int)
  • out_re - Real part of output data. (gdouble*)
  • out_im - Imaginary part of output data. (gdouble*)

gwy_fft_window(n, data, windowing)

source code 

Multiplies data by given window.

Parameters:
  • n - Number of data values. (int)
  • data - Data values. (gdouble*)
  • windowing - Method used for windowing. (WindowingType)

gwy_fft_window_data_field(dfield, orientation, windowing)

source code 

Performs windowing of a data field in given direction.

Parameters:
  • dfield - A data field. (DataField)
  • orientation - Windowing orientation (the same as corresponding FFT orientation). (Orientation)
  • windowing - The windowing type to use. (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.

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). (FileOperationType)
Returns:
The type name (i.e., the same name as passed to e.g. gwy_run_file_load_func()) of most probable type of filename, or NULL if there's no probable one.

gwy_file_detect_with_score(filename, only_name, operations, score)

source code 

Detects the type of a file and gives the score.

Since: 2.1

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 (FileOperationType)
  • score - Location to store the maximum score (corresponding to the returned type) to. (int)
Returns:
The type name (i.e., the same name as passed to e.g. gwy_run_file_load_func()) of most probable type of filename, or NULL if there's no probable one.

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.

z_UNIMPLEMENTED_gwy_file_func_foreach(function, user_data)

source code 

Calls a function for each file function.

Parameters:
  • function - Function to run for each file function. It will get function name (constant string owned by module system) as its first argument, user_data as the second argument. (GFunc)
  • user_data - Data to pass to function. (gpointer)

gwy_file_func_get_description(name)

source code 

Gets file function description.

That is, the file_desc field of FileFuncInfo.

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

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.

Since: 2.18

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

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.

z_UNIMPLEMENTED_gwy_file_func_register(name, description, detect, load, save, export_)

source code 

Registered a file function.

At least one of load, save, and export_ must be non-NULL. See FileOperationType for differences between save and export.

Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed (non-constant) strings, do not free them. Should modules ever become unloadable they will get chance to clean-up.

Parameters:
  • name - Name of function to register. It should be a valid identifier and if a module registers only one function, module and function names should be the same. (string)
  • description - File type description (will be used in file type selectors). (string)
  • detect - Detection function. It may be NULL, files of such a type can can be then loaded and saved only on explict user request. (FileDetectFunc)
  • load - File load/import function. (FileLoadFunc)
  • save - File save function. (FileSaveFunc)
  • export_ - File export function. (FileSaveFunc)
Returns:
Normally True; False on failure.

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.

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. (RunType)
Returns:
True if file save succeeded, False otherwise.

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. (RunType)
Returns:
A new Container with data from filename, or NULL.

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. (RunType)
Returns:
True if file save succeeded, False otherwise.

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.

Since: 2.18

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

z_UNIMPLEMENTED_gwy_file_get_contents(filename, buffer, size)

source code 

Reads or mmaps file filename into memory.

The buffer must be treated as read-only and must be freed with gwy_file_abandon_contents(). It is NOT guaranteed to be NUL-terminated, use size to find its end.

Parameters:
  • filename - A file to read contents of. (string)
  • buffer - Buffer to store the file contents. (guchar**)
  • size - Location to store buffer (file) size. (gsize*)
Returns:
Whether it succeeded. In case of failure buffer and size are reset too.

z_UNIMPLEMENTED_gwy_file_get_data_info(data, name, filename_sys)

source code 

Gets file information about a data.

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

Parameters:
  • data - A Container. (Container)
  • name - Location to store file type (that is file function name) of data, or NULL. The returned string is owned by module system. (const-gchar**)
  • filename_sys - Location to store file name of data (in GLib encoding), or NULL. The returned string is owned by module system and is valid only until the container is destroyed or saved again. (const-gchar**)
Returns:
True if information about data was found and name and/or filename was filled.

gwy_file_load(filename, mode)

source code 

Loads a data file, autodetecting its type.

Since: 2.25

Parameters:
  • filename - A file name to load data from, in GLib encoding. (string)
  • mode - Run mode. (RunType)
  • name - Location to store the name of file load function used to load the file, or NULL. If an error occurs outside the module, e.g. failure to recognise the file type, NULL is stored to name.
Returns:
A new Container with data from filename, or NULL.

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. (RunType)
Returns:
The save operation that was actually realized on success, zero on failure.

z_UNIMPLEMENTED_gwy_file_save_with_func(data, filename, mode, name)

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.

Since: 2.25

Parameters:
  • data - A Container to save. (Container)
  • filename - A file name to save the data as, in GLib encoding. (string)
  • mode - Run mode. (RunType)
  • name - Location to store the name of file load function used to save the file, or NULL. If an error occurs outside the module, e.g. failure to recognise the file type, NULL is stored to name. (const-gchar**)
Returns:
The save operation that was actually realized on success, zero on failure.

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.

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: <literal>"modules"</literal>, <literal>"plugins"</literal>, <literal>"pixmaps"</literal>, <literal>"locale"</literal>, or <literal>"data"</literal>. (string)
Returns:
The path as a newly allocated string.

z_UNIMPLEMENTED_gwy_flags_to_string(enumval, enum_table, n, glue)

source code 

Creates a string representation of integer flag combination enumval.

Parameters:
  • enumval - Some ORed integer flags from enum_table. (int)
  • enum_table - A table of corresponding string-integer pairs. (const-Enum*)
  • n - The number of elements in enum_table, may be -1 when enum_table is terminated by a NULL name. (int)
  • glue - A glue to join string values with, when NULL space is used. (string)
Returns:
The string representation as a newly allocated string. It should be freed when no longer used.

z_UNIMPLEMENTED_gwy_func_use_add(functions, name)

source code 

Adds an use of a function to the statistics.

Parameters:
  • functions - Function use statistics. (FunctionUse*)
  • name - Function name. (string)

z_UNIMPLEMENTED_gwy_func_use_free(functions)

source code 

Destroys function use statistics, freeing all associated resourced.

Parameters:
  • functions - Function use statistics. (FunctionUse*)

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 NULL if there are not more functions with use statistics records than i.

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.

z_UNIMPLEMENTED_gwy_func_use_load(filename)

source code 

Loads function use statistics from a file.

Parameters:
  • filename - A file name (in GLib encoding). (string)
Returns:
A newly created function use statistics filled with data from file filename.

z_UNIMPLEMENTED_gwy_func_use_save(functions, filename)

source code 

Saves function use statistics data to a file.

Parameters:
  • functions - Function use statistics. (FunctionUse*)
  • filename - A file name (in GLib encoding). (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 NULL or empty.

z_UNIMPLEMENTED_gwy_get_pango_ft2_font_map(unref)

source code 

Returns global Pango FT2 font map, eventually creating it.

FT2 portability to Win32 is questionable, use PangoCairo instead.

Parameters:
  • unref - If True, function removes the font map reference and returns NULL. (bool)
Returns:
Pango FT2 font map. Add your own reference if you want it to never go away.

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.

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.

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

gwy_gl_materials()

source code 

Gets inventory with all the GL materials.

Returns:
GL material 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 NULL to get the default GL material. (string)
Returns:
GL material identified by name or the default GL material if name does not exist.

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.

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

gwy_gradients()

source code 

Gets inventory with all the gradients.

Returns:
Gradient 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 NULL to get the default gradient. (string)
Returns:
Gradient identified by name or the default gradient if name does not exist.

z_UNIMPLEMENTED_gwy_graph_curve_type_get_enum()

source code 

Returns Enum for GraphCurveType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

z_UNIMPLEMENTED_gwy_graph_draw_curve(drawable, gc, specs, gcmodel)

source code 

Draws a single graph curve on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • gcmodel - Curve model of the curve to draw. (GraphCurveModel*)

z_UNIMPLEMENTED_gwy_graph_draw_grid(drawable, gc, specs, nxdata, x_grid_data, nydata, y_grid_data)

source code 

Draws an array of grid lines on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • nxdata - Number of x grid positions. (int)
  • x_grid_data - Array of grid data for the x-axis, it can be NULL if nxdata is zero. (const-gdouble*)
  • nydata - Number of y grid positions. (int)
  • y_grid_data - Array of grid data for the y-axis, it can be NULL if nydata is zero. (const-gdouble*)

z_UNIMPLEMENTED_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. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • 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. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • x - X coordinate of the point. (int)
  • y - Y coordinate of the point. (int)
  • type - graph point type (GraphPointType)
  • size - point size (int)
  • color - point color (const-RGBA*)

z_UNIMPLEMENTED_gwy_graph_draw_selection_areas(drawable, gc, specs, selection)

source code 

Draws selected area on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • selection - A selection of type SelectionGraphArea. (SelectionGraphArea*)

z_UNIMPLEMENTED_gwy_graph_draw_selection_lines(drawable, gc, specs, selection, orientation)

source code 

Draws selected lines on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • selection - a SelectionGraphLine structure (SelectionGraphLine*)
  • orientation - horizontal or vertical orientation (GtkOrientation)

z_UNIMPLEMENTED_gwy_graph_draw_selection_points(drawable, gc, specs, selection)

source code 

Draws selection points on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • selection - A selection of type SelectionGraphPoint. (SelectionGraphPoint*)

z_UNIMPLEMENTED_gwy_graph_draw_selection_xareas(drawable, gc, specs, selection)

source code 

Draws selected x-area on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • selection - A selection of type SelectionGraph1DArea. (SelectionGraph1DArea*)

z_UNIMPLEMENTED_gwy_graph_draw_selection_yareas(drawable, gc, specs, selection)

source code 

Drawss selected y-area on a drawable.

Parameters:
  • drawable - A drawable. (GdkDrawable*)
  • gc - Graphics context. It is modified by this function unpredictably. (GdkGC*)
  • specs - Specifications (boundaries) of the active area of the graph. (GraphActiveAreaSpecs*)
  • selection - A selection of type SelectionGraph1DArea. (SelectionGraph1DArea*)

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.

z_UNIMPLEMENTED_gwy_graph_func_foreach(function, user_data)

source code 

Calls a function for each graph function.

Parameters:
  • function - Function to run for each graph function. It will get function name (constant string owned by module system) as its first argument, user_data as the second argument. (GFunc)
  • user_data - Data to pass to function. (gpointer)

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.

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

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.

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.

z_UNIMPLEMENTED_gwy_graph_func_register(name, func, menu_path, stock_id, sens_mask, tooltip)

source code 

Registers a graph function.

Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed (non-constant) strings, do not free them. Should modules ever become unloadable they will get chance to clean-up.

Parameters:
  • name - Name of function to register. It should be a valid identifier and if a module registers only one function, module and function names should be the same. (string)
  • func - The function itself. (GraphFunc)
  • menu_path - Menu path under Graph menu. The menu path should be marked translatabe, but passed untranslated (to allow merging of translated and untranslated submenus). (string)
  • stock_id - Stock icon id for toolbar. (string)
  • sens_mask - Sensitivity mask (a combination of MenuSensFlags flags). Usually it is equal to MENU_FLAG_GRAPH, but it's possible to set other requirements. (int)
  • tooltip - Tooltip for this function. (string)
Returns:
Normally True; False on failure.

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.

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.

gwy_graph_window_class_get_tooltips()

source code 

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

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

gwy_graph_window_class_set_tooltips(tips)

source code 

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

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 NULL value disables tooltips altogether. (gtk.Tooltips)

z_UNIMPLEMENTED_gwy_hash_table_to_list_cb(unused_key, value, user_data)

source code 

GHashTable to GList convertor.

Usble in g_hash_table_foreach(), pass a pointer to a GList* as user data to it.

Parameters:
  • unused_key - Hash key (unused). (gpointer)
  • value - Hash value. (gpointer)
  • user_data - User data (a pointer to GList*). (gpointer)

z_UNIMPLEMENTED_gwy_hash_table_to_slist_cb(unused_key, value, user_data)

source code 

GHashTable to GSList convertor.

Usble in g_hash_table_foreach(), pass a pointer to a GSList* as user data to it.

Parameters:
  • unused_key - Hash key (unused). (gpointer)
  • value - Hash value. (gpointer)
  • user_data - User data (a pointer to GSList*). (gpointer)

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 (InterpolationType)
Returns:
interpolated value

z_UNIMPLEMENTED_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). (gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
Returns:
Interpolated value.

gwy_interpolation_get_support_size(interpolation)

source code 

Obtains the basis support size for an interpolation type.

Since: 2.2

Parameters:
  • interpolation - Interpolation type. (InterpolationType)
Returns:
The length of the support interval of the interpolation basis.

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.

Since: 2.2

Parameters:
  • interpolation - Interpolation type. (InterpolationType)
Returns:
True if the inteprolation type has interpolating basis, False if data values cannot be directly used for interpolation of this type.

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

Since: 2.2

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). (const-gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
Returns:
Interpolated value.

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

source code 

Interpolates a signle data point in two dimensions.

Since: 2.2

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). (const-gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
Returns:
Interpolated value.

z_UNIMPLEMENTED_gwy_interpolation_resample_block_1d(length, data, newlength, newdata, interpolation, preserve)

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.

Since: 2.2

Parameters:
  • length - Data block length. (int)
  • data - Data block to resample. (gdouble*)
  • newlength - Requested length after resampling. (int)
  • newdata - Array to put the resampled data to. (gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
  • preserve - True to preserve the content of data, False to permit its overwriting with temporary data. (bool)

z_UNIMPLEMENTED_gwy_interpolation_resample_block_2d(width, height, rowstride, data, newwidth, newheight, newrowstride, newdata, interpolation, preserve)

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.

Since: 2.2

Parameters:
  • width - Number of columns in data. (int)
  • height - Number of rows in data. (int)
  • rowstride - Total row length (including width). (int)
  • data - Data block to resample. (gdouble*)
  • 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)
  • newdata - Array to put the resampled data to. (gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
  • preserve - True to preserve the content of data, False to permit its overwriting with temporary data. (bool)

z_UNIMPLEMENTED_gwy_interpolation_resolve_coeffs_1d(n, 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.

Since: 2.2

Parameters:
  • n - Number of points in data. (int)
  • data - An array of data values. It will be rewritten with the coefficients. (gdouble*)
  • interpolation - Interpolation type to prepare data for. (InterpolationType)

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

Since: 2.2

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. (gdouble*)
  • interpolation - Interpolation type to prepare data for. (InterpolationType)

z_UNIMPLEMENTED_gwy_interpolation_shift_block_1d(length, data, offset, newdata, interpolation, exterior, fill_value, preserve)

source code 

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

Since: 2.2

Parameters:
  • length - Data block length. (int)
  • data - Data block to shift. (gdouble*)
  • 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)
  • newdata - Array to put the shifted data to. (gdouble*)
  • interpolation - Interpolation type to use. (InterpolationType)
  • exterior - Exterior pixels handling. (ExteriorType)
  • fill_value - The value to use with EXTERIOR_FIXED_VALUE. (float)
  • preserve - True to preserve the content of data, False to permit its overwriting with temporary data. (bool)

z_UNIMPLEMENTED_gwy_interpolation_type_get_enum()

source code 

Returns Enum for InterpolationType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

z_UNIMPLEMENTED_gwy_inventory_new_filled(itype, nitems, items)

source code 

Creates a new inventory and fills it with items.

Parameters:
  • itype - Type of items the inventory will contain. (const-InventoryItemType*)
  • nitems - The number of pointers in items. (int)
  • items - Item pointers to fill the newly created inventory with. (gpointer*)
Returns:
The newly created inventory.

z_UNIMPLEMENTED_gwy_inventory_new_from_array(itype, item_size, nitems, items)

source code 

Creates a new inventory from static item array.

The inventory is neither modifiable nor sortable, it simply serves as an adaptor for the array items.

Parameters:
  • itype - Type of items the inventory will contain. Inventory keeps a copy of it, so it can be an automatic variable. (const-InventoryItemType*)
  • item_size - Item size in bytes. (int)
  • nitems - The number of items in items. (int)
  • items - An array with items. It will be directly used as thus must exist through the whole lifetime of inventory. (gconstpointer)
Returns:
The newly created inventory.

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.

z_UNIMPLEMENTED_gwy_layer_func_foreach(function, user_data)

source code 

Calls a function for each layer function.

Parameters:
  • function - Function to run for each layer function. It will get function name (constant string owned by module system) as its first argument, user_data as the second argument. (GFunc)
  • user_data - Data to pass to function. (gpointer)

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.

z_UNIMPLEMENTED_gwy_list_store_row_changed(store, iter, path, row)

source code 

Convenience function to emit "GtkTreeModel::row-changed" signal on a tree store.

At least one of iter, path, row must be set to identify the row to emit "row-changed" on, and usually exactly one should be set. The remaining information necessary to call gtk_tree_model_row_changed() is inferred automatically.

The behaviour of this function is undefined for specified, but inconsistent iter, path, and row.

Parameters:
  • store - A list store. (GtkListStore*)
  • iter - A tree model iterator in store, or NULL for none. (GtkTreeIter*)
  • path - A tree model path in store, or NULL for none. (GtkTreePath*)
  • row - A row number in store, or -1 for none. (int)

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.

Since: 2.1

Parameters:
  • dialog_title - Title of the color selection dialog (NULL 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 NULL). (ColorButton*)
  • container - Container to initialize the color from and save it to. (Container)
  • prefix - Prefix in container (normally "/0/mask"). (string)

z_UNIMPLEMENTED_gwy_masking_type_get_enum()

source code 

Returns Enum for MaskingType enum type.

Since: 2.18

Returns:
NULL-terminated Enum which must not be modified nor freed.

z_UNIMPLEMENTED_gwy_math_choleski_decompose(n, matrix)

source code 

Decomposes a symmetric positive definite matrix in place.

Parameters:
  • n - The dimension of a. (int)
  • matrix - Lower triangular part of a symmetric matrix, stored by rows, i.e., matrix = [a_00 a_10 a_11 a_20 a_21 a_22 a_30 ...]. (gdouble*)
Returns:
Whether the matrix was really positive definite. If False, the decomposition failed and a does not contain any meaningful values.

z_UNIMPLEMENTED_gwy_math_choleski_solve(n, decomp, rhs)

source code 

Solves a system of linear equations with predecomposed symmetric positive definite matrix a and right hand side b.

Parameters:
  • n - The dimension of a. (int)
  • decomp - Lower triangular part of Choleski decomposition as computed by gwy_math_choleski_decompose(). (const-gdouble*)
  • rhs - Right hand side vector. Is is modified in place, on return it contains the solution. (gdouble*)

z_UNIMPLEMENTED_gwy_math_find_nearest_line(x, y, d2min, n, 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)
  • d2min - Where to store the squared minimal distance, or NULL. (gdouble*)
  • n - The number of lines (i.e. coords has 4n items). (int)
  • coords - Line coordinates stored as x00, y00, x01, y01, x10, y10, etc. (const-gdouble*)
  • 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 NULL, standard Euclidean metric is then used. (const-gdouble*)
Returns:
The line number. It may return -1 if (x, y) doesn't lie in the orthogonal stripe of any of the lines.

z_UNIMPLEMENTED_gwy_math_find_nearest_point(x, y, d2min, n, 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)
  • d2min - Location to store the squared minimal distance to, or NULL. (gdouble*)
  • n - The number of points (i.e. coords has 2n items). (int)
  • coords - Point coordinates stored as x0, y0, x1, y1, x2, y2, etc. (const-gdouble*)
  • 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 NULL, standard Euclidean metric is then used. (const-gdouble*)
Returns:
The point number.

z_UNIMPLEMENTED_gwy_math_fit_polynom(ndata, xdata, ydata, n, coeffs)

source code 

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

Parameters:
  • ndata - The number of items in xdata, ydata. (int)
  • xdata - Independent variable data (of size ndata). (const-gdouble*)
  • ydata - Dependent variable data (of size ndata). (const-gdouble*)
  • n - The degree of polynom to fit. (int)
  • coeffs - An array of size n+1 to store the coefficients to, or NULL (a fresh array is allocated then). (gdouble*)
Returns:
The coefficients of the polynom (coeffs when it was not NULL, otherwise a newly allocated array).

z_UNIMPLEMENTED_gwy_math_humanize_numbers(unit, maximum, precision)

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)
  • precision - A location to store printf() precession, if not NULL. (gint*)
Returns:
The magnitude i.e., a power of 1000.

gwy_math_is_in_polygon(x, y, poly, n)

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.

<warning> Result can be either True or False if the test point is *exactly* on an edge. </warning>

Since: 2.7

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. (const-gdouble*)
  • n - The number of corners of the polygon. (int)
Returns:
True if the test point is inside poly and False otherwise.

z_UNIMPLEMENTED_gwy_math_lin_solve(n, matrix, rhs, result)

source code 

Solve a regular system of linear equations.

Parameters:
  • n - The size of the system. (int)
  • matrix - The matrix of the system (n times n), ordered by row, then column. (const-gdouble*)
  • rhs - The right hand side of the sytem. (const-gdouble*)
  • result - Where the result should be stored. May be NULL to allocate a fresh array for the result. (gdouble*)
Returns:
The solution (result if it wasn't NULL), may be NULL if the matrix is singular.

z_UNIMPLEMENTED_gwy_math_lin_solve_rewrite(n, matrix, rhs, result)

source code 

Solves a regular system of linear equations.

This is a memory-conservative version of gwy_math_lin_solve() overwriting matrix and rhs with intermediate results.

Parameters:
  • n - The size of the system. (int)
  • matrix - The matrix of the system (n times n), ordered by row, then column. (gdouble*)
  • rhs - The right hand side of the sytem. (gdouble*)
  • result - Where the result should be stored. May be NULL to allocate a fresh array for the result. (gdouble*)
Returns:
The solution (result if it wasn't NULL), may be NULL if the matrix is singular.

z_UNIMPLEMENTED_gwy_math_median(n, array)

source code 

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

Parameters:
  • n - Number of items in array. (gsize)
  • array - Array of doubles. It is modified by this function. All values are kept, but their positions in the array change. (gdouble*)
Returns:
The median value of array.

z_UNIMPLEMENTED_gwy_math_nlfit_derive(x, n_param, param, fixed_param, ff, user_data, deriv, dres)

source code 

Numerically computes the partial derivative of a fitting function.

Parameters:
  • x - The value to compute the derivative at. (float)
  • n_param - The nuber of parameters. (int)
  • param - Array of parameters (of size n_param). (const-gdouble*)
  • fixed_param - Which parameters should be treated as fixed (corresponding entries are set to True). (const-gboolean*)
  • ff - The fitted function. (NLFitFunc)
  • user_data - User data as passed to gwy_math_nlfit_fit(). (gpointer)
  • deriv - Array where the put the result to. (gdouble*)
  • dres - Set to True if succeeds, False on failure. (gboolean*)

z_UNIMPLEMENTED_gwy_math_nlfit_fit(nlfit, n_dat, x, y, n_param, param, user_data)

source code 

Performs a nonlinear fit of nlfit function on (x,y) data.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
  • n_dat - The number of data points in x, y. (int)
  • x - Array of independent variable values. (const-gdouble*)
  • y - Array of dependent variable values. (const-gdouble*)
  • n_param - The nuber of parameters. (int)
  • param - Array of parameters (of size n_param). Note the parameters must be initialized to reasonably near values. (gdouble*)
  • user_data - Any pointer that will be passed to the function and derivative as user_data. (gpointer)
Returns:
The final residual sum, a negative number in the case of failure.

z_UNIMPLEMENTED_gwy_math_nlfit_fit_full(nlfit, n_dat, x, y, weight, n_param, param, fixed_param, link_map, user_data)

source code 

Performs a nonlinear fit of nlfit function on (x,y) data, allowing some fixed parameters.

Initial values of linked (dependent) parameters are overwritten by master values, their fixed_param property is ignored and master's property controls whether all are fixed or all variable.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
  • n_dat - The number of data points in x, y, weight. (int)
  • x - Array of independent variable values. (const-gdouble*)
  • y - Array of dependent variable values. (const-gdouble*)
  • weight - Array of weights associated to each data point. Can be NULL, weight of 1 is then used for all data. (const-gdouble*)
  • n_param - The nuber of parameters. (int)
  • param - Array of parameters (of size n_param). Note the parameters must be initialized to reasonably near values. (gdouble*)
  • fixed_param - Which parameters should be treated as fixed (set corresponding element to True for them). May be NULL if all parameters are variable. (const-gboolean*)
  • link_map - Map of linked parameters. One of linked parameters is master, Values in this array are indices of corresponding master parameter for each parameter (for independent parameters set link_map[i] == i). May be NULL if all parameter are independent. (const-gint*)
  • user_data - Any pointer that will be passed to the function and derivative (gpointer)
Returns:
The final residual sum, a negative number in the case of failure.

z_UNIMPLEMENTED_gwy_math_nlfit_free(nlfit)

source code 

Completely frees a Marquardt-Levenberg nonlinear fitter.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)

z_UNIMPLEMENTED_gwy_math_nlfit_get_correlations(nlfit, par1, par2)

source code 

Returns the correlation coefficient between par1-th and par2-th parameter.

This function can be used only after a successful fit.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
  • par1 - First parameter index. (int)
  • par2 - Second parameter index. (int)
Returns:
The correlation coefficient.

z_UNIMPLEMENTED_gwy_math_nlfit_get_dispersion(nlfit)

source code 

Returns the residual sum divided by the number of degrees of freedom.

This function can be used only after a successful fit.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
Returns:
The dispersion.

z_UNIMPLEMENTED_gwy_math_nlfit_get_max_iterations(nlfit)

source code 

Returns the maximum number of iterations of nonlinear fitter nlfit.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
Returns:
The maximum number of iterations.

z_UNIMPLEMENTED_gwy_math_nlfit_get_sigma(nlfit, par)

source code 

Returns the standard deviation of parameter number par.

This function makes sense only after a successful fit.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
  • par - Parameter index. (int)
Returns:
The SD of par-th parameter.

z_UNIMPLEMENTED_gwy_math_nlfit_set_max_iterations(nlfit, maxiter)

source code 

Sets the maximum number of iterations for nonlinear fitter nlfit.

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
  • maxiter - The maximum number of iterations. (int)

z_UNIMPLEMENTED_gwy_math_nlfit_succeeded(nlfit)

source code 

Obtains the status of the last fitting.

Fitting failure can be (and usually should be) also determined by checking for negative return value of gwy_math_nlfit_fit() or gwy_math_nlfit_fit_full(). This function allows to test it later.

Since: 2.7

Parameters:
  • nlfit - A Marquardt-Levenberg nonlinear fitter. (NLFitter*)
Returns:
True if the last fitting suceeded, False if it failed.

z_UNIMPLEMENTED_gwy_math_sort(n, array)

source code 

Sorts an array of doubles using a quicksort algorithm.

This is usually about twice as fast as the generic quicksort function thanks to specialization for doubles.

Parameters:
  • n - Number of items in array. (gsize)
  • array - Array of doubles to sort in place. (gdouble*)

z_UNIMPLEMENTED_gwy_math_tridiag_solve_rewrite(n, d, a, b, rhs)

source code 

Solves a tridiagonal system of linear equations.

Parameters:
  • n - The dimension of d. (int)
  • d - The diagonal of a tridiagonal matrix, its contents will be overwritten. (gdouble*)
  • a - The above-diagonal stripe (it has n-1 elements). (const-gdouble*)
  • b - The below-diagonal stripe (it has n-1 elements). (const-gdouble*)
  • rhs - The right hand side of the system, upon return it will contain the solution. (gdouble*)
Returns:
True if the elimination suceeded, False if the system is (numerically) singular. The contents of d and rhs may be overwritten in the case of failure too, but not to any meaningful values.

z_UNIMPLEMENTED_gwy_md5_get_digest(buffer, buffer_size, digest16)

source code 

Compute the MD5 hash of a buffer.

The MD5 algorithm takes as input a message of arbitrary length and produces as output a 128-bit "fingerprint" or "message digest" of the input. For more information see RFC 1321.

Parameters:
  • buffer - A byte buffer. (string)
  • buffer_size - Size of buffer (in bytes) or -1 if buffer is nul-terminated. (int)
  • digest - 16 bytes to store the hash code to.

z_UNIMPLEMENTED_gwy_memcpy_byte_swap(source, dest, item_size, nitems, byteswap)

source code 

Copies a block of memory swapping bytes along the way.

The bits in byteswap correspond to groups of bytes to swap: if j-th bit is set, adjacent groups of 2j bits are swapped. For example, value 3 means items will be divided into couples (bit 1) of bytes and adjacent couples of bytes swapped, and then divided into single bytes (bit 0) and adjacent bytes swapped. The net effect is reversal of byte order in groups of four bytes. More generally, if you want to reverse byte order in groups of size 2<superscript>j</superscript>, use byte swap pattern j-1.

When byteswap is zero, this function reduces to plain memcpy().

Since: 2.1

Parameters:
  • source - Source memory block. (const-guint8*)
  • dest - Destination memory location. (guint8*)
  • item_size - Size of one copied item, it should be a power of two. (gsize)
  • nitems - Number of items of size item_size to copy. (gsize)
  • byteswap - Byte swap pattern. (gsize)

z_UNIMPLEMENTED_gwy_memmem(haystack, haystack_len, needle, needle_len)

source code 

Find a block of memory in another block of memory.

This function is very similar to strstr(), except that it works with arbitrary memory blocks instead of NUL-terminated strings.

If needle_len is zero, haystack is always returned.

On GNU systems with glibc at least 2.1 this is a just a trivial memmem() wrapper. On other systems it emulates memmem() behaviour.

Since: 2.12

Parameters:
  • haystack - Memory block to search in. (gconstpointer)
  • haystack_len - Size of haystack, in bytes. (gsize)
  • needle - Memory block to find. (gconstpointer)
  • needle_len - Size of needle, in bytes. (gsize)
Returns:
Pointer to the first byte of memory block in haystack that matches needle; NULL if no such block exists.

z_UNIMPLEMENTED_gwy_menu_gl_material(callback, cbdata)

source code 

Creates a pop-up GL material menu.

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

Parameters:
  • callback - A callback called when a menu item is activated (or NULL for none). (GCallback)
  • cbdata - User data passed to the callback. (gpointer)
Returns:
The newly created pop-up menu as GtkWidget.

z_UNIMPLEMENTED_gwy_menu_gradient(callback, cbdata)

source code 

Creates a pop-up gradient menu.

Object data <literal>"gradient-name"</literal> is set to gradient name for each menu item.

Parameters:
  • callback - A callback called when a menu item is activated (or NULL for none). (GCallback)
  • cbdata - User data passed to the callback. (gpointer)
Returns:
The newly created pop-up menu as GtkWidget.

z_UNIMPLEMENTED_gwy_merge_type_get_enum()

source code 

Returns Enum for MergeType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

gwy_module_browser()

source code 

Shows a simple module browser.

gwy_module_error_quark()

source code 

Returns error domain for module loading.

See and use MODULE_ERROR.

Returns:
The error domain.

gwy_module_file_error_quark()

source code 

Returns error domain for file module functions.

See and use MODULE_FILE_ERROR.

Returns:
The error domain.

z_UNIMPLEMENTED_gwy_module_foreach(function, data)

source code 

Runs function on each registered module.

It passes module name as the key and pointer to module info (ModuleInfo) as the value. Neither should be modified.

Parameters:
  • function - A GHFunc run for each module. (GHFunc)
  • data - User data. (gpointer)

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.

z_UNIMPLEMENTED_gwy_module_get_functions(name)

source code 

Returns list of names of functions a module implements.

Parameters:
  • name - A module name. (string)
Returns:
List of module function names, as a GSList that is owned by module loader and must not be modified or freed.

z_UNIMPLEMENTED_gwy_module_lookup(name)

source code 

Returns information about one module.

Parameters:
  • name - A module name. (string)
Returns:
The module info, of NULL if not found. It must be considered constant and never modified or freed.

z_UNIMPLEMENTED_gwy_module_register_module(name)

source code 

Loads a single module.

Parameters:
  • name - Module file name to load, including full path and extension. (string)
Returns:
Module info on success, NULL on failure.

z_UNIMPLEMENTED_gwy_module_register_modules(paths)

source code 

Registers all modules in given directories.

It can be called several times (on different directories). No errors are reported, register modules individually with gwy_module_register_module() to get registration errors.

Parameters:
  • paths - A NULL-terminated list of directory names. (const-gchar**)

gwy_nlfit_presets()

source code 

Gets inventory with all the NLFit presets.

Returns:
NLFit preset inventory.

z_UNIMPLEMENTED_gwy_orientation_get_enum()

source code 

Returns Enum for Orientation enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

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. (GdkPixbuf*)
  • 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. (GdkPixbuf*)
  • 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. (GdkPixbuf*)
  • 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. (GdkPixbuf*)
  • 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_plain_tool_get_z_average(data_field, point, radius)

source code 

Computes average value over a part of data field dfield.

It is not an error if part of it lies outside the data field borders (it is simply not counted in), however the intersection have to be nonempty.

Parameters:
  • data_field - A data field. (DataField)
  • point - Real X and Y-coordinate of area center in physical units. (const-gdouble*)
  • radius - Area radius in pixels, 1 means a signle pixel. The actual radius passed to DataField.circular_area_extract() is radius-0.5. (int)
Returns:
The average value.

z_UNIMPLEMENTED_gwy_plane_symmetry_get_enum()

source code 

Returns Enum for PlaneSymmetry enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.

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.

z_UNIMPLEMENTED_gwy_process_func_foreach(function, user_data)

source code 

Calls a function for each process function.

Parameters:
  • function - Function to run for each process function. It will get function name (constant string owned by module system) as its first argument, user_data as the second argument. (GFunc)
  • user_data - Data to pass to function. (gpointer)

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.

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.

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

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.

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.

z_UNIMPLEMENTED_gwy_process_func_register(name, func, menu_path, stock_id, run, sens_mask, tooltip)

source code 

Registers a data processing function.

Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed (non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.

Parameters:
  • name - Name of function to register. It should be a valid identifier and if a module registers only one function, module and function names should be the same. (string)
  • func - The function itself. (ProcessFunc)
  • menu_path - Menu path under Data Process menu. The menu path should be marked translatabe, but passed untranslated (to allow merging of translated and untranslated submenus). (string)
  • stock_id - Stock icon id for toolbar. (string)
  • run - Supported run modes. Data processing functions can have two run modes: RUN_IMMEDIATE (no questions asked) and RUN_INTERACTIVE (a modal dialog with parameters). (RunType)
  • sens_mask - Sensitivity mask (a combination of MenuSensFlags flags). Usually it contains MENU_FLAG_DATA, possibly other requirements. (int)
  • tooltip - Tooltip for this function. (string)
Returns:
Normally True; False on failure.

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

gwy_process_type_init()

source code 

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

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.

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)

z_UNIMPLEMENTED_gwy_radio_buttons_attach_to_table(group, table, colspan, row)

source code 

Attaches a group of radio buttons to table rows.

Since: 2.1

Parameters:
  • group - A radio button group. Not necessarily created by gwy_radio_buttons_create(). (GSList*)
  • table - A table. (GtkTable*)
  • colspan - The number of columns the radio buttons should span across. (int)
  • row - Table row to start attaching at. (int)
Returns:
The row after the last attached radio button.

z_UNIMPLEMENTED_gwy_radio_buttons_create(entries, nentries, callback, cbdata, current)

source code 

Creates a radio button group from an enum.

Try to avoid -1 as an enum value.

Parameters:
  • entries - Radio button group items. (const-Enum*)
  • nentries - The number of items. Since 2.18 negative value means that entries is terminated with a NULL-named item. (int)
  • callback - A callback called when a menu item is activated (or NULL for no callback). (GCallback)
  • cbdata - User data passed to the callback. (gpointer)
  • current - Value to be shown as currently selected (-1 to use what happens to be first). (int)
Returns:
The newly created radio button group (a GSList). Iterate over the list and pack the widgets (the order is the same as in entries). The group is owned by the buttons and must not be freed.

z_UNIMPLEMENTED_gwy_radio_buttons_find(group, value)

source code 

Finds a radio button by its associated integer value.

Parameters:
  • group - A radio button group created by gwy_radio_buttons_create(). (GSList*)
  • value - The value associated with the button to find. (int)
Returns:
The radio button corresponding to value, or NULL on failure.

z_UNIMPLEMENTED_gwy_radio_buttons_get_current(group)

source code 

Gets the integer enum value corresponding to currently selected item.

Parameters:
  • group - A radio button group created by gwy_radio_buttons_create(). (GSList*)
Returns:
The enum value corresponding to currently selected item. In case of failure -1 is returned.

z_UNIMPLEMENTED_gwy_radio_buttons_set_current(group, current)

source code 

Sets currently selected radio button in group based on integer item object data (as set by gwy_radio_buttons_create()).

Parameters:
  • group - A radio button group created by gwy_radio_buttons_create(). (GSList*)
  • current - Value to be shown as currently selected. (int)
Returns:
True if current button was set, False if current was not found.

gwy_raw_data_size(datatype)

source code 

Reports the size of a single raw data item.

Since: 2.25

Parameters:
  • datatype - Raw data type. (RawDataType)
Returns:
The size of a single raw data item of type datatype.

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

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.

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.

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.

Since: 2.3

Parameters:
  • title - File chooser dialog title. (string)
  • parent - Parent window for the file chooser dialog (may be NULL). (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 save, False if it was not saved for any reason.

z_UNIMPLEMENTED_gwy_save_auxiliary_with_callback(title, parent, create, destroy, user_data)

source code 

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

Since: 2.3

Parameters:
  • title - File chooser dialog title. (string)
  • parent - Parent window for the file chooser dialog (may be NULL). (gtk.Window)
  • create - Function to create the data (it will not be called if the user cancels the saving). (SaveAuxiliaryCreate)
  • destroy - Function to destroy the data (if will be called iff create will be called), it may be NULL. (SaveAuxiliaryDestroy)
  • user_data - User data passed to create and destroy. (gpointer)
Returns:
True if the data was save, False if it was not saved for any reason (I/O error, cancellation, overwrite cancellation, etc.).

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)

z_UNIMPLEMENTED_gwy_serializable_deserialize(buffer, size, position)

source code 

Restores a serialized object from byte buffer.

The newly created object has reference count according to its nature, thus a GtkObject will have a floating reference, a GObject will have a refcount of 1, etc.

Parameters:
  • buffer - A block of memory of size size contaning object representation. (string)
  • size - The size of buffer. (gsize)
  • position - The position of the object in buffer, it's updated to point after it. (gsize*)
Returns:
A newly created object.

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

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.

z_UNIMPLEMENTED_gwy_serializable_serialize(serializable, buffer)

source code 

Serializes an object to byte buffer.

This is a high-level method. Do not use it for implementation of child object serialization (should you ever need to do it manually), it would lead to repeated required buffer size calculations. In such a case, use gwy_serializable_do_serialize() FIXME: but that's not public.

Parameters:
  • serializable - A GObject that implements Serializable interface. (gobject.GObject)
  • buffer - A buffer to which the serialized object should be appended, or NULL to allocate and return a new GByteArray. (GByteArray*)
Returns:
buffer or a newly allocated GByteArray with serialized object appended.

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 NULL, 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 NULL. (string)
Returns:
The length of the nul-terminated string including the nul character; zero otherwise.

z_UNIMPLEMENTED_gwy_serialize_get_items_size(object_name, nitems, items)

source code 

Calculates serialized object size for hash-like objects.

The component specification is the same as in gwy_serialize_object_items().

Parameters:
  • object_name - The type name of the object. (string)
  • nitems - The number of items items. (gsize)
  • items - The components to serialize. (const-SerializeItem*)
Returns:
Serialized object size, it included space for object name and size. The value is exact unless some components are objects that do not return exact size estimate themselves.

z_UNIMPLEMENTED_gwy_serialize_get_struct_size(object_name, nspec, spec)

source code 

Calculates serialized object size for struct-like objects.

The component specification is the same as in gwy_serialize_pack_object_struct().

Parameters:
  • object_name - The type name of the object. (string)
  • nspec - The number of items in spec. (gsize)
  • spec - The components to serialize. (const-SerializeSpec*)
Returns:
Serialized object size, it included space for object name and size. The value is exact unless some components are objects that do not return exact size estimate themselves.

z_UNIMPLEMENTED_gwy_serialize_object_items(buffer, object_name, nitems, items)

source code 

Serializes an object to buffer in gwy-file format.

More precisely, it appends serialization of object with g_type_name() object_name with components described by items to buffer.

Parameters:
  • buffer - A buffer to which the serialized components should be appended, or NULL. (GByteArray*)
  • object_name - The type of the object. (string)
  • nitems - The number of items items. (gsize)
  • items - The components to serialize. (const-SerializeItem*)
Returns:
buffer or a newly allocated GByteArray with serialization of items components appended.

z_UNIMPLEMENTED_gwy_serialize_pack_object_struct(buffer, object_name, nspec, spec)

source code 

Appends serialization of object with g_type_name() B{C{object_name}} and
components described by B{C{spec}} to B{C{buffer}} in gwy-file format.

Here's how a serialization method of a simple object whose state is
described by a single real number foo could look (without error checking):
<informalexample><programlisting>
static guchar*
my_object_serialize(GObject *obj,
guchar *buffer,
gsize *size)
{
MyObject *my_object = MY_OBJECT(obj);
SerializeSpec spec[] = {
{ 'd', "foo", &my_object->foo, NULL, },
};

return L{gwy_serialize_pack_object_struct}(buffer, size,
"MyObject",
G_N_ELEMENTS(spec), spec);
}
</programlisting></informalexample>


@param buffer:  A buffer to which the serialized components should be appended. I{(GByteArray*)} 
@param object_name:  The type name of the object. I{(string)} 
@param nspec:  The number of items in B{C{spec}}. I{(gsize)} 
@param spec:  The components to serialize. I{(const-SerializeSpec*)} 
@return: The buffer with serialization of B{C{spec}} components appended.

     

z_UNIMPLEMENTED_gwy_serialize_unpack_object_struct(buffer, size, position, object_name, nspec, spec)

source code 

Deserializes an object with named components packed into gwy-file format by
L{gwy_serialize_pack_object_struct}().

Extra components are ignored (but cause a warning), components of different
type than expected cause failure, missing components are not detected.

It is safe to pass pointers to existing non-atomic objects (strings, arrays,
objects) in B{C{spec}} values, they will be dereferenced and freed as necessary
when an unpacked value is about to replace them.
For the same reason it is an error to pass pointers to unintialized memory
there, always initialize non-atomic B{C{spec}} values to B{C{NULL}} pointers, at
least.

Caller is responsible for use/clean-up of these values if deserialization
succeeds or not.

Here's how a deserialization method of a simple object whose state is
described by a single real number B{C{foo}} could look (without error checking):
<informalexample><programlisting>
static GObject*
my_object_deserialize(const guchar *buffer,
gsize size,
gsize *position)
{
double foo = 1.0;
SerializeSpec spec[] = {
{ 'd', "foo", &foo, NULL, },
};
MyObject *my_object;

L{gwy_serialize_unpack_object_struct}(buffer, size, position,
"MyObject",
G_N_ELEMENTS(spec), spec);
return my_object_new(foo);
}
</programlisting></informalexample>


@param buffer:  A memory location containing a serialized object at position
B{C{position}}. I{(string)} 
@param size:  Current size of B{C{buffer}}, new size is returned here. I{(gsize)} 
@param position:  The position of the object in B{C{buffer}}, it's updated to point
after it. I{(gsize*)} 
@param object_name:  The type name of the object. I{(string)} 
@param nspec:  The number of items in B{C{spec}}. I{(gsize)} 
@param spec:  The components to deserialize. I{(SerializeSpec*)} 
@return: Whether the unpacking succeeded
(see description body for definition of success and failure).

     

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.

Since: 2.7

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

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.

gwy_si_unit_new_parse(unit_string, power10)

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 <literal>"pA/s"</literal> it will store -12 to power10 because 1 pA/s is 1e-12 A/s, for <literal>"km^2"</literal> it will store 6 to power10 because 1 km^2 is 1e6 m^2.

Parameters:
  • unit_string - Unit string (it can be NULL for an empty unit). (string)
  • power10 - Where power of 10 should be stored (or NULL). (int)
Returns:
A new SI unit.

z_UNIMPLEMENTED_gwy_si_unit_value_format_free(format)

source code 

Frees a value format structure.

Parameters:
  • format - A value format to free. (SIValueFormat*)

z_UNIMPLEMENTED_gwy_si_unit_value_format_set_units(format, units)

source code 

Sets the units field of a value format structure.

This function keeps the units and units_gstring fields consistent.

Parameters:
  • format - A value format to set units of. (SIValueFormat*)
  • units - The units string. (string)

gwy_stock_register_stock_items()

source code 

Registers stock items.

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

z_UNIMPLEMENTED_gwy_str_next_line(buffer)

source code 

Extracts a next line from a character buffer, modifying it in place.

buffer is updated to point after the end of the line and the " " (or " " or " ") is replaced with "", if present.

The final line may or may not be terminated with an EOL marker, its contents is returned in either case. Note, however, that the empty string "" is not interpreted as an empty unterminated line. Instead, NULL is immediately returned.

The typical usage of gwy_str_next_line() is: |[ gchar *p = text; for (gchar *line = gwy_str_next_line(&p); line; line = gwy_str_next_line(&p)) { g_strstrip(line); // Do something more with line } ]|

Parameters:
  • buffer - Text buffer. (gchar**)
Returns:
The start of the line. NULL if the buffer is empty or NULL. The return value is <emphasis>not</emphasis> a new string; the normal return value is the previous value of buffer.

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. Particularly, -1 is returned if either string is NULL, zero-length, or they differ in the very first character.

z_UNIMPLEMENTED_gwy_string_to_enum(str, enum_table, n)

source code 

Creates an integer representation of a string enum value str.

Parameters:
  • str - A string containing one of enum_table string values. (string)
  • enum_table - A table of corresponding string-integer pairs. (const-Enum*)
  • n - The number of elements in enum_table, may be -1 when enum_table is terminated by a NULL name. (int)
Returns:
The integer enum value (NOT index in the table), or -1 if str was not found.

z_UNIMPLEMENTED_gwy_string_to_flags(str, enum_table, n, delimiter)

source code 

Creates an integer flag combination of its string representation str.

Parameters:
  • str - A string containing one of enum_table string values. (string)
  • enum_table - A table of corresponding string-integer pairs. (const-Enum*)
  • n - The number of elements in enum_table, may be -1 when enum_table is terminated by a NULL name. (int)
  • delimiter - A delimiter to split str on, when NULL space is used. (string)
Returns:
All the flags present in str, bitwise ORer.

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 NULL. (string)
  • startmore - List of additional ASCII characters allowed as the first identifier characters, empty list can be passed as NULL. (string)
Returns:
True if s is valid identifier, False otherwise.

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. (gchar*)
  • killchars - A string containing characters to kill. (string)
Returns:
s itself, the return value is to allow function call nesting.

gwy_strreplace(haystack, needle, replacement, maxrepl)

source code 

Replaces occurences of string needle in haystack with replacement.

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.

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.

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

FIXME: What exactly happens with various style values is quite 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). (GtkObject*)
  • style - A mix of options an flags determining what and how will be attached to the table. (HScaleStyle)
Returns:
The middle widget. If a spinbutton is attached, then this spinbutton is returned. Otherwise (in HSCALE_WIDGET case) pivot itself.

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. (GtkObject*)
Returns:
The spinbutton as a GtkWidget.

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 NULL if there is no such widget.

gwy_table_hscale_set_sensitive(pivot, sensitive)

source code 

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

Do not use with HSCALE_CHECK, simply set state of the check button in such a case.

This function can 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. (GtkObject*)
  • 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.

Since: 2.18

Returns:
The error domain.

z_UNIMPLEMENTED_gwy_text_header_parse(header, parser, user_data)

source code 

Parses a line-oriented text header into a hash table.

See TextHeaderParser for details of memory and error handling.

Lines consisting only of whitespace are ignored.

Since: 2.18

Parameters:
  • header - Text header to parse. It must be NULL-terminated and writable. Its contents will be modified to directly embed the hash keys and/or values. It must not be freed while the returned hash table is in use. (gchar*)
  • parser - Parser specification. (const-TextHeaderParser*)
  • user_data - User data passed to parser callbacks. (gpointer)
Returns:
A newly created hash table with values indexed by they keys found in the header.

gwy_tip_model_get_npresets()

source code 

Find number of actual tip model presets.

Returns:
Number of presets.

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

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

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

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

z_UNIMPLEMENTED_gwy_tip_model_get_preset_nparams(preset)

source code 

Get number of tip preset parameters.

Parameters:
  • preset - Tip model preset. (const-TipModelPreset*)
Returns:
Number of parameters.

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

z_UNIMPLEMENTED_gwy_tool_func_foreach(function, user_data)

source code 

Calls a function for each tool function.

Parameters:
  • function - Function to run for each tool function. It will get function name (constant string owned by module system) as its first argument, user_data as the second argument. (GFunc)
  • user_data - Data to pass to function. (gpointer)

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.

gwy_type_init()

source code 

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

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.

z_UNIMPLEMENTED_gwy_undo_checkpointv(data, n, keys)

source code 

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

Parameters:
  • data - A data container. (Container)
  • n - The number of strings in keys. (int)
  • keys - An array of container string keys to save data. It can contain holes, that is NUL's, they are ignored. However, it should contain at least one real key. (const-gchar**)
Returns:
Undo level id. Not useful (yet).

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.

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.

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.

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

Since: 2.21

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

z_UNIMPLEMENTED_gwy_undo_qcheckpointv(data, n, keys)

source code 

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

Parameters:
  • data - A data container. (Container)
  • n - The number of strings in keys. (int)
  • keys - An array of container quark keys to save data. It can contain holes, that is 0's, they are ignored. However, it should contain at least one real key. (const-GQuark*)
Returns:
Undo level id. Not useful (yet).

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.

Since: 2.21

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

gwy_undo_undo_container(data)

source code 

Performs undo on a data container.

It must have undo available.

Parameters:

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.

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.

gwy_version_string()

source code 

Gets the full Gwyddion version as a string.

If the version is 1.99.7.20060604, this function returns <literal>"1.99.7.20060604"</literal>.

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.

gwy_widget_get_activate_on_unfocus(widget)

source code 

Obtains the activate-on-unfocus state of a widget.

Since: 2.5

Parameters:
  • widget - A widget. (gtk.Widget)
Returns:
True if signal "GtkWidget::activate" is emitted when focus leaves the widget.

gwy_widget_set_activate_on_unfocus(widget, activate)

source code 

Sets the activate-on-unfocus state of a widget.

When it is enabled, signal "GtkWidget::activate" is emited whenever focus leaves the widget.

Since: 2.5

Parameters:
  • widget - A widget. (gtk.Widget)
  • activate - True to enable activate-on-unfocus, False disable it. (bool)

gwy_widget_sync_sensitivity(master, slave)

source code 

Make widget's sensitivity follow the sensitivity of another widget.

The sensitivity of slave is set according to master's effective sensitivity (as returned by GTK_WIDGET_IS_SENSITIVE()), i.e. it does not just synchronize GtkWidget:sensitive property.

Since: 2.8

Parameters:
  • master - Master widget. (gtk.Widget)
  • slave - Slave widget. (gtk.Widget)

gwy_widgets_get_gl_config()

source code 

Returns OpenGL framebuffer configuration for 3D widgets.

Call gwy_widgets_gl_init() first.

Returns:
The OpenGL framebuffer configuration, NULL if OpenGL initialization was not successfull.

gwy_widgets_gl_init()

source code 

Configures an OpenGL-capable visual for 3D widgets.

Use gwy_widgets_get_gl_config() to get the framebuffer configuration.

This function must be called before OpenGL widgets can be used.

Returns:
True if an appropriate visual was found. If Gwyddion was compiled without OpenGL support, it always returns False.

gwy_widgets_type_init()

source code 

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

Calls gwy_draw_type_init() first to make sure libgwydraw is initialized.

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

z_UNIMPLEMENTED_gwy_windowing_type_get_enum()

source code 

Returns Enum for WindowingType enum type.

Returns:
NULL-terminated Enum which must not be modified nor freed.