| Top |
| void | (*GwyCurveMapFunc) () |
| gboolean | gwy_curve_map_func_register () |
| void | gwy_curve_map_func_run () |
| gboolean | gwy_curve_map_func_exists () |
| GwyRunModeFlags | gwy_curve_map_func_get_run_types () |
| const gchar * | gwy_curve_map_func_get_menu_path () |
| const gchar * | gwy_curve_map_func_get_icon_name () |
| const gchar * | gwy_curve_map_func_get_tooltip () |
| guint | gwy_curve_map_func_get_sensitivity_mask () |
| void | gwy_curve_map_func_foreach () |
| const gchar * | gwy_curve_map_func_current () |
Curve map data processing modules implement function processing curve map data represented with GwyLawn. They reigster functions that get a GwyFile with data and either modify it or create a new data from it. In this regard, they are quite similar to regular (two-dimensional) data processing functions but they live in separate menus, toolbars, etc.
void (*GwyCurveMapFunc) (GwyFile *data,GwyRunModeFlags run);
The type of curve map data processing function.
gboolean gwy_curve_map_func_register (const gchar *name,GwyCurveMapFunc func,const gchar *menu_path,const gchar *icon_name,GwyRunModeFlags run,guint sens_mask,const gchar *tooltip);
Registers a curve map data processing function.
Note: the string arguments are not copied as modules are not expected to vanish. If they are constructed (non-constant) strings, do not free them. Should modules ever become unloadable they will get a chance to clean-up.
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. |
|
func |
The function itself. |
|
menu_path |
Menu path under Curve Map menu. The menu path should be marked translatabe, but passed untranslated (to allow merging of translated and untranslated submenus). |
|
icon_name |
Stock icon id for toolbar. |
|
run |
Supported run modes. Curve map data processing functions can have two run modes: |
|
sens_mask |
Sensitivity mask (a combination of GwyMenuSensFlags flags). Usually it contains GWY_MENU_FLAG_CMAP, possibly other requirements. |
|
tooltip |
Tooltip for this function. |
void gwy_curve_map_func_run (const gchar *name,GwyFile *data,GwyRunModeFlags run);
Runs a curve map processing function identified by name
.
name |
Curve map data processing function name. |
|
data |
Data (a GwyFile). |
|
run |
How the function should be run. |
gboolean
gwy_curve_map_func_exists (const gchar *name);
Checks whether a curve map processing function exists.
GwyRunModeFlags
gwy_curve_map_func_get_run_types (const gchar *name);
Returns run modes supported by a curve map processing function.
const gchar *
gwy_curve_map_func_get_menu_path (const gchar *name);
Returns the menu path of a curve map processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/Curve Map".
const gchar *
gwy_curve_map_func_get_icon_name (const gchar *name);
Gets icon name of a curve map processing function.
const gchar *
gwy_curve_map_func_get_tooltip (const gchar *name);
Gets tooltip for a curve map processing function.
guint
gwy_curve_map_func_get_sensitivity_mask
(const gchar *name);
Gets menu sensititivy mask for a curve map processing function.
void gwy_curve_map_func_foreach (GwyNameFunc function,gpointer user_data);
Calls a function for each curve map function.
const gchar *
gwy_curve_map_func_current (void);
Obtains the name of currently running curve map processing function.
If no curve map processing function is currently running, NULL is returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.