gwymodule-xyz
void | (*GwyXYZFunc) () |
gboolean | gwy_xyz_func_register () |
void | gwy_xyz_func_run () |
gboolean | gwy_xyz_func_exists () |
GwyRunType | gwy_xyz_func_get_run_types () |
const gchar * | gwy_xyz_func_get_menu_path () |
const gchar * | gwy_xyz_func_get_stock_id () |
const gchar * | gwy_xyz_func_get_tooltip () |
guint | gwy_xyz_func_get_sensitivity_mask () |
void | gwy_xyz_func_foreach () |
const gchar * | gwy_xyz_func_current () |
#include <libgwymodule/gwymodule.h>
void (*GwyXYZFunc) (GwyContainer *data
,GwyRunType run
,const gchar *name
);
The type of surface data processing function.
data |
The data container to operate on. |
|
run |
Run mode. |
|
name |
Function name from as registered with |
Since: 2.45
gboolean gwy_xyz_func_register (const gchar *name
,GwyXYZFunc func
,const gchar *menu_path
,const gchar *stock_id
,GwyRunType run
,guint sens_mask
,const gchar *tooltip
);
Registers a surface 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 XYZ Data menu. The menu path should be marked translatabe, but passed untranslated (to allow merging of translated and untranslated submenus). |
|
stock_id |
Stock icon id for toolbar. |
|
run |
Supported run modes. XYZ surface data processing functions can have
two run modes: |
|
sens_mask |
Sensitivity mask (a combination of GwyMenuSensFlags flags). Usually it contains GWY_MENU_FLAG_XYZ, possibly other requirements. |
|
tooltip |
Tooltip for this function. |
Normally TRUE
; FALSE
on failure.
Since: 2.45
void gwy_xyz_func_run (const gchar *name
,GwyContainer *data
,GwyRunType run
);
Runs a surface data processing function identified by name
.
name |
XYZ surface data processing function name. |
|
data |
Data (a GwyContainer). |
|
run |
How the function should be run. |
Since: 2.45
gboolean
gwy_xyz_func_exists (const gchar *name
);
Checks whether a surface data processing function exists.
name |
XYZ surface data processing function name. |
TRUE
if function name
exists, FALSE
otherwise.
Since: 2.45
GwyRunType
gwy_xyz_func_get_run_types (const gchar *name
);
Returns run modes supported by a surface data processing function.
name |
XYZ surface data processing function name. |
The run mode bit mask.
Since: 2.45
const gchar *
gwy_xyz_func_get_menu_path (const gchar *name
);
Returns the menu path of a surface data processing function.
The returned menu path is only the tail part registered by the function, i.e., without any leading "/XYZ Data".
name |
XYZ surface data processing function name. |
The menu path. The returned string is owned by the module.
Since: 2.45
const gchar *
gwy_xyz_func_get_stock_id (const gchar *name
);
Gets stock icon id of a surface data processing function.
name |
XYZ surface data processing function name. |
The stock icon id. The returned string is owned by the module.
Since: 2.45
const gchar *
gwy_xyz_func_get_tooltip (const gchar *name
);
Gets tooltip for a surface data processing function.
name |
XYZ surface data processing function name. |
The tooltip. The returned string is owned by the module.
Since: 2.45
guint
gwy_xyz_func_get_sensitivity_mask (const gchar *name
);
Gets menu sensititivy mask for a surface data processing function.
name |
XYZ surface data processing function name. |
The menu item sensitivity mask (a combination of GwyMenuSensFlags flags).
Since: 2.45
void gwy_xyz_func_foreach (GFunc function
,gpointer user_data
);
Calls a function for each surface function.
function |
Function to run for each surface function. It will get function
name (constant string owned by module system) as its first
argument, |
|
user_data |
Data to pass to |
Since: 2.45
const gchar *
gwy_xyz_func_current (void
);
Obtains the name of currently running surface data processing function.
If no surface data processing function is currently running, NULL
is
returned.
If multiple nested functions are running (which is not usual but technically possible), the innermost function name is returned.
The name of currently running surface data processing function or
NULL
.
Since: 2.38