The "dispdata" Package

These routines are meant to provide a high level mechanism to manage the display of data. NOTE: THIS PACKAGE IS WORK IN PROGRESS. THE INTERFACE MAY CHANGE IN THE NEXT RELEASE, POSSIBLY WITHOUT NOTICE.

Library: karmagraphics
Link With: -lkarmagraphics

Functions

dispdata_array_create_dataclassInitialise array data support for the package.
dispdata_array_clone_dataClone an array dataset.
dispdata_array_register_irange_change_funcRegister a function to be called the image itensity range changes
dispdata_array_convert_3coordConvert canvas co-ordinate to 3D dataset co-ordinate.
dispdata_initInitialise the package.
dispdata_get_classlistGet the list of supported dataclasses.
dispdata_register_data_create_funcRegister a function to be called when a dataobject is created.
dispdata_register_data_destroy_funcRegister a function to be called when a dataobject is destroyed.
dispdata_register_dataobject_destroy_funcRegister a function to be called when a dataobject is destroyed.
dispdata_set_dataclass_attributesSet global attributes for the a dataclass.
dispdata_get_dataclass_attributesGet global attributes for the a dataclass.
dispdata_create_windowCreate a display data window.
dispdata_destroy_windowDestroy a display data window.
dispdata_register_window_destroy_funcRegister destroy callback.
dispdata_set_window_attributesSet the attributes for a window.
dispdata_get_window_attributesGet the attributes for a window object.
dispdata_get_num_windowsGet the number of windows.
dispdata_refresh_windowRefresh a window.
dispdata_get_num_blinkstatesGet the number of blinkstates for a window.
dispdata_get_active_blinkstateGet the active KDisplayDataBlinkState for a window.
dispdata_get_first_windowGet first window.
dispdata_get_prev_windowGet previous window.
dispdata_get_next_windowGet next window.
dispdata_get_window_indexGet the index for a window.
dispdata_register_window_renumber_funcRegister renumber callback.
dispdata_create_dataobjectCreate a display data object (i.e. array, overlay, etc.).
dispdata_destroy_dataobjectDestroy a display data object (i.e. array, overlay, etc.).
dispdata_get_dataobject_subclassGet the subclass for a KDisplayDataObject.
dispdata_set_data_attributesSet the attributes for a data object.
dispdata_get_data_attributesGet the attributes for a data object.
dispdata_associate_data_objectAssociate a named object with a data object.
dispdata_get_associated_data_objectGet an associated named object for a data object.
dispdata_get_first_dataobjectGet first data object for a dataclass.
dispdata_get_next_dataobjectGet next data object.
dispdata_create_blinkstateCreate a blink state object.
dispdata_destroy_blinkstateDestroy a blink state object.
dispdata_get_blinkstate_classGet the dataclass-specific object for a blink state.
dispdata_activate_blinkstateMake a blinkstate active (change window contents).
dispdata_test_blinkstate_activeTest if blinkstate is the active one for its window.
dispdata_get_blinkstate_indexGet the index for a blinkstate.
dispdata_copy_blinkstateCopy blink state.
dispdata_refresh_blinkstateRefresh the user interface for a blink state.
dispdata_get_blinkstate_infoGet the arbitrary pointer for a blinkstate.
dispdata_register_blinkstate_funcsRegister callback functions for a blinkstate.
dispdata_get_first_blinkstateGet first blinkstate for a window.
dispdata_get_last_blinkstateGet last blinkstate for a window.
dispdata_get_prev_blinkstateGet previous blinkstate for a window.
dispdata_get_next_blinkstateGet next blinkstate for a window.
dispdata_get_window_from_blinkstateGet the windor for a blinkstate.
dispdata_get_namelistGet the list of (sorted) data names for a dataclass.
dispdata_get_objectlistGet the list of (sorted) data objects for a dataclass.
dispdata_regenerate_namelistRegenerate the list of (sorted) data names for a dataclass.
dispdata_free_namelistFree the list of (sorted) data names for a dataclass.
dispdata_get_first_blinkentryGet the first blink entry for a blink state.
dispdata_get_next_blinkentryGet the next blink entry after a specified entry.
dispdata_get_blinkentry_infoGet the application-specific information for a blink entry.
dispdata_set_blinkentry_attributesSet attributes for a blink entry.
dispdata_get_blinkentry_attributesGet attributes for a blink entry.
dispdata_regenerate_blinkentry_listRegenerate a list of blink entries for a blink state.
dispdata_get_dataobject_from_blinkentryGet the dataobject for a blinkentry.
dispdata_overlay_create_dataclassInitialise overlay data support for the package.
dispdata_overlay_create_dataobjectCreate an overlay data object.


Functions


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataClass dispdata_array_create_dataclass (void)

Initialise array data support for the package.

Parameters:

Returns: A KDisplayDataClass object on success, else NULL.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_array_clone_data (KDisplayDataObject dataobject)

Clone an array dataset.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_array_register_irange_change_func (KDisplayDataObject dataobject, void (*func) (KDisplayDataObject dataobject, void *info), void *info)

Register a function to be called the image itensity range changes

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag dispdata_array_convert_3coord (KDisplayDataObject dataobject, KDisplayDataWindow window, double *x, double *y, double *z, double h, double v)

Convert canvas co-ordinate to 3D dataset co-ordinate.

Parameters:

Returns: TRUE on success, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_init (void)

Initialise the package.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

unsigned int dispdata_get_classlist (KDisplayDataClass **classes,char ***names)

Get the list of supported dataclasses.

Parameters:

Returns: The number of dataclasses. On failure the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_register_data_create_func (KDisplayDataClass dataclass, void (*func) (void *info, KDisplayDataObject data), void *info)

Register a function to be called when a dataobject is created.

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_register_data_destroy_func (KDisplayDataClass dataclass, void (*func) (void *info), void *info)

Register a function to be called when a dataobject is destroyed.

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_register_dataobject_destroy_func (KDisplayDataObject dataobject, void (*func) (void *info), void *info)

Register a function to be called when a dataobject is destroyed.

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_set_dataclass_attributes (KDisplayDataClass dataclass, ...)

Set global attributes for the a dataclass.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_get_dataclass_attributes (KDisplayDataClass dataclass, ...)

Get global attributes for the a dataclass.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataWindow dispdata_create_window (KDisplayDataCanvas pc, KDisplayDataCanvas rgb, void (*show_canvas) (void *info, KWorldCanvas canvas), void *info )

Create a display data window.

Parameters:

Returns: A KDisplayDataWindow object on success, else NULL.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_destroy_window (KDisplayDataWindow window)

Destroy a display data window.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_register_window_destroy_func (KDisplayDataWindow window, void (*func) (), void *info)

This routine will register a destroy function for a display data window. The function will be called when the window is destroyed. Many destroy functions may be registered per window. The first function registered is the first function called upon destruction.

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_set_window_attributes (KDisplayDataWindow window, ...)

Set the attributes for a window.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_get_window_attributes (KDisplayDataWindow window, ...)

Get the attributes for a window object.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

unsigned int dispdata_get_num_windows ()

Get the number of windows.

Parameters:

Returns: The number of windows.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_refresh_window (KDisplayDataWindow window, KWorldCanvas canvas)

Refresh a window.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

unsigned int dispdata_get_num_blinkstates (KDisplayDataWindow window)

Get the number of blinkstates for a window.

Parameters:

Returns: The number of blinkstates.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_get_active_blinkstate (KDisplayDataWindow window, void **info)

Get the active KDisplayDataBlinkState for a window.

Parameters:

Returns: The active blink state. NULL is returned if there is no active blink state.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataWindow dispdata_get_first_window (void **info)

Get first window.

Parameters:

Returns: A KDisplayDataWindow object. NULL is returned if there are no windows.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataWindow dispdata_get_prev_window (KDisplayDataWindow window, flag circular, void **info)

Get previous window.

Parameters:

Returns: A KDisplayDataWindow object. NULL is returned if there are no more windows.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataWindow dispdata_get_next_window (KDisplayDataWindow window, flag circular, void **info)

Get next window.

Parameters:

Returns: A KDisplayDataWindow object. NULL is returned if there are no more windows.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

unsigned int dispdata_get_window_index (KDisplayDataWindow window)

Get the index for a window.

Parameters:

Returns: The index of the window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KCallbackFunc dispdata_register_window_renumber_func (KDisplayDataWindow window, void (*func) (), void *info)

This routine will register a renumber function for a display data window. The function will be called when the window index changes (due to renumbering). Many renumber functions may be registered per window. The first function registered is the first function called upon renumbering.

Parameters:

Returns: A KCallbackFunc object. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataObject dispdata_create_dataobject (KDisplayDataClass dataclass, CONST char *domain, CONST char *name, void *data)

Create a display data object (i.e. array, overlay, etc.).

Parameters:

Returns: A KDisplayDataObject object on success, else NULL.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_destroy_dataobject (KDisplayDataObject dataobject)

Destroy a display data object (i.e. array, overlay, etc.).

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void * dispdata_get_dataobject_subclass (KDisplayDataObject dataobject, KDisplayDataClass dataclass)

Get the subclass for a KDisplayDataObject.

Parameters:

Returns: A pointer to the subclass.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_set_data_attributes (KDisplayDataObject dataobject, ...)

Set the attributes for a data object.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_get_data_attributes (KDisplayDataObject dataobject, ...)

Get the attributes for a data object.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_associate_data_object (KDisplayDataObject dataobject, CONST char *name, void (*destroy_func) (void *object), void *object)

Associate a named object with a data object.

Parameters:

Returns: Nothing. On failure, the process aborts.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void * dispdata_get_associated_data_object (KDisplayDataObject dataobject, CONST char *name)

Get an associated named object for a data object.

Parameters:

Returns: A pointer to the associated object.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataObject dispdata_get_first_dataobject (KDisplayDataClass dataclass)

Get first data object for a dataclass.

Parameters:

Returns: A KDisplayDataObject object. NULL is returned if there are no dataobjects.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataObject dispdata_get_next_dataobject (KDisplayDataObject dataobject)

Get next data object.

Parameters:

Returns: A KDisplayDataObject object. NULL is returned if there are no more data objects.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_create_blinkstate (KDisplayDataWindow window, void (*active_change) (void *info, flag active), void *info)

Create a blink state object.

Parameters:

Returns: A KDisplayDataBlinkState object on success, else NULL.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_destroy_blinkstate (KDisplayDataBlinkState blinkstate)

Destroy a blink state object.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataClassBlinkState dispdata_get_blinkstate_class (KDisplayDataBlinkState blinkstate, KDisplayDataClass dataclass)

Get the dataclass-specific object for a blink state.

Parameters:

Returns: A KDisplayDataClassBlinkState object.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_activate_blinkstate (KDisplayDataBlinkState blinkstate)

Make a blinkstate active (change window contents).

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

flag dispdata_test_blinkstate_active (KDisplayDataBlinkState blinkstate)

Test if blinkstate is the active one for its window.

Parameters:

Returns: TRUE if active, else FALSE.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

unsigned int dispdata_get_blinkstate_index (KDisplayDataBlinkState blinkstate)

Get the index for a blinkstate.

Parameters:

Returns: The index of the blinkstate.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_copy_blinkstate (KDisplayDataBlinkState dest, KDisplayDataBlinkState source)

Copy blink state.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_refresh_blinkstate (KDisplayDataBlinkState blinkstate)

Refresh the user interface for a blink state.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void * dispdata_get_blinkstate_info (KDisplayDataBlinkState blinkstate)

Get the arbitrary pointer for a blinkstate.

Parameters:

Returns: The arbitrary pointer.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_register_blinkstate_funcs (KDisplayDataClassBlinkState blinkstate, void (*refresh_func) (void *info, KDisplayDataClass dataclass), void *(*create_blinkentry) (void *info, KDisplayDataBlinkEntry be), void (*destroy_blinkentry) (void *info), void (*copy_blinkentry) (void *dest, void *source), void *info)

Register callback functions for a blinkstate.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_get_first_blinkstate (KDisplayDataWindow window, void **info)

Get first blinkstate for a window.

Parameters:

Returns: A KDisplayDataBlinkState object. NULL is returned if there are no blinkstates associated with this window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_get_last_blinkstate (KDisplayDataWindow window, void **info)

Get last blinkstate for a window.

Parameters:

Returns: A KDisplayDataBlinkState object. NULL is returned if there are no blinkstates associated with this window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_get_prev_blinkstate (KDisplayDataBlinkState blinkstate, flag circular, void **info)

Get previous blinkstate for a window.

Parameters:

Returns: A KDisplayDataBlinkState object. NULL is returned if there are no more blinkstates associated with this window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkState dispdata_get_next_blinkstate (KDisplayDataBlinkState blinkstate, flag circular, void **info)

Get next blinkstate for a window.

Parameters:

Returns: A KDisplayDataBlinkState object. NULL is returned if there are no more blinkstates associated with this window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataWindow dispdata_get_window_from_blinkstate (KDisplayDataBlinkState blinkstate)

Get the windor for a blinkstate.

Parameters:

Returns: The window.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

CONST char ** dispdata_get_namelist (KDisplayDataClass dataclass, unsigned int *num_entries, unsigned int *num_chars)

Get the list of (sorted) data names for a dataclass.

Parameters:

Returns: The array of names.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

CONST KDisplayDataObject * dispdata_get_objectlist (KDisplayDataClass dataclass, unsigned int *num_entries)

Get the list of (sorted) data objects for a dataclass.

Parameters:

Returns: The array of data objects.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

char ** dispdata_regenerate_namelist (KDisplayDataClass dataclass, KDisplayDataPrivateNameList *namelist_ptr, unsigned int num_reserved, unsigned int *num_entries, KDisplayDataObject **dataobjects, flag (*filter_func) (void *info, KDisplayDataObject dataobject), void *info)

Regenerate the list of (sorted) data names for a dataclass.

Parameters:

Returns: The array of string pointers. The string contents may be modified and will persist until the next call to this function.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_free_namelist (KDisplayDataPrivateNameList namelist)

Free the list of (sorted) data names for a dataclass.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkEntry dispdata_get_first_blinkentry (KDisplayDataClassBlinkState class_blinkstate)

Get the first blink entry for a blink state.

Parameters:

Returns: A KDisplayDataBlinkEntry object. NULL may be returned if there are no blink state entries (i.e. no data sets loaded for this class).
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataBlinkEntry dispdata_get_next_blinkentry (KDisplayDataBlinkEntry blinkentry)

Get the next blink entry after a specified entry.

Parameters:

Returns: A KDisplayDataBlinkEntry object. NULL may be returned if there are no more blink state entries.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void * dispdata_get_blinkentry_info (KDisplayDataBlinkEntry blinkentry)

Get the application-specific information for a blink entry.

Parameters:

Returns: The application-specific information pointer.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_set_blinkentry_attributes (KDisplayDataBlinkEntry blinkentry, ...)

Set attributes for a blink entry.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe
Note:


EXPERIMENTAL FUNCTION: subject to change without notice

void dispdata_get_blinkentry_attributes (KDisplayDataBlinkEntry blinkentry, ...)

Get attributes for a blink entry.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

CONST KDisplayDataBlinkEntry * dispdata_regenerate_blinkentry_list (KDisplayDataClassBlinkState blinkstate, unsigned int *num_entries)

Regenerate a list of blink entries for a blink state.

Parameters:

Returns: The array of blink entries.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataObject dispdata_get_dataobject_from_blinkentry (KDisplayDataBlinkEntry blinkentry)

Get the dataobject for a blinkentry.

Parameters:

Returns: The dataobject.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataClass dispdata_overlay_create_dataclass (void)

Initialise overlay data support for the package.

Parameters:

Returns: A KDisplayDataClass object on success, else NULL.
Multithreading Level: Unsafe


EXPERIMENTAL FUNCTION: subject to change without notice

KDisplayDataObject dispdata_overlay_create_dataobject (KOverlayList olist, CONST char *domain, CONST char *name)

Create an overlay data object.

Parameters:

Returns: A KDisplayDataObject on success, else NULL.
Multithreading Level: Unsafe


Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services