The "iedit" Package

These routines provide a simple interface to the recursive, heirarchical data structure supported in Karma, to define 2-dimensional (image) editing instructions.

Library: karma
Link With: -lkarma

Functions

iedit_create_listCreate a managed image edit instruction list.
iedit_free_listDestroy image edit list.
iedit_get_instruction_descGet the list descriptor for image edit instructions.
iedit_alloc_edit_coordsAllocate an array of edit co-ordinates.
iedit_get_edit_coordsGet a number of editing co-ordinates from a co-ordinate list.
iedit_add_instructionAdd an image edit instruction to a list.
iedit_remove_instructionsRemove instructions from an image edit list.
iedit_apply_instructionsApply image edit instructions.
iedit_get_listGet list of edits in an image edit list.
iedit_make_list_default_masterPrepare image edit list for mastery.
iedit_make_list_default_slavePrepare image edit list for slavery.

Prototype Functions

iedit_PROTO_add_funcImage edit instruction add callback.
iedit_PROTO_loss_funcImage edit instruction loss callback.
iedit_PROTO_apply_funcImage edit instruction apply callback.


Functions


KImageEditList iedit_create_list (void (*add_func) (), void (*loss_func) (), void (*apply_func) (), void *info)

Create a managed image edit instruction list.

Parameters:

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


EXPERIMENTAL FUNCTION: subject to change without notice

void iedit_free_list (KImageEditList ilist)

Destroy image edit list.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


packet_desc * iedit_get_instruction_desc ()

Get the list descriptor for image edit instructions.

Parameters:

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


edit_coord * iedit_alloc_edit_coords (unsigned int num_coords)

Allocate an array of edit co-ordinates.

Parameters:

Returns: A pointer to a statically allocated array of co-ordinate structures on success, else NULL.
Multithreading Level: Unsafe


flag iedit_get_edit_coords (list_header *list_head, edit_coord **coords)

The routine will get a number of editing co-ordinates from a co-ordinate list. The routine will extract all co-ordinates in the list.

Parameters:

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


flag iedit_add_instruction (KImageEditList ilist, unsigned int instruction_code, edit_coord *coords, unsigned int num_coords, double intensity[2])

This routine will add a single edit instruction to a managed image edit instruction list. The add_func function registered for this instruction list will be called at a future time with a copy of the instruction to be added.

Parameters:

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


flag iedit_remove_instructions (KImageEditList ilist, unsigned int num_to_remove)

This routine will remove a number of edit instructions from a managed image edit instruction list. The loss_func function registered for this instruction list will be called at a future time.

Parameters:

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


flag iedit_apply_instructions (KImageEditList ilist)

This routine will issue an apply (commit) request for a managed image edit instruction list. The apply_func function registered for this instruction list will be called at a future time. Some time after this, the loss_func registered will also be called.

Parameters:

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


list_header * iedit_get_list (KImageEditList ilist)

This routine will get the list of edit instructions associated with a managed image edit instruction list.

Parameters:

Returns: The list of edit instructions.
Multithreading Level: Unsafe


void iedit_make_list_default_master (KImageEditList ilist)

This routine will make a managed image edit instruction list the default list for accepting slave list connections.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void iedit_make_list_default_slave (KImageEditList ilist)

This routine will make a managed image edit instruction list the default list for making slave list connections.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


Prototype Functions


void iedit_PROTO_add_func (KImageEditList ilist, list_entry *instruction, void **info)

This routine will process a single edit instruction which has been added to a managed image edit instruction list.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void iedit_PROTO_loss_func (KImageEditList ilist, void **info)

This routine will process the loss of an edit instruction from a managed image edit instruction list.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void iedit_PROTO_apply_func (KImageEditList ilist, void **info)

This routine will apply (commit) an edit list prior to the list being cleared.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


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