Name
IO Algorithms -- Interface for Algorithms.
Description
Great effort has been devoted to making the addicion of new algorithms as easy
as posible, here is documented what there is to know to be able to write your
own algorithms.
Details
struct io_algorithm_t
typedef struct { /* This struct is all we know
about each algorithm */
gchar * name;
gint (*select) (void);
gint (*unselect) (void); /* These two functions will be
called before and after the
use of an algorithm to let
it keep a low memory usage
when not in use.*/
GtkWidget * properties; /* Each algorithm will maintain
it's own properties widget.
NULL means "no properties".
It should be set to NULL
when destroyed. If not
destroyed in "unselect" the
system will destroy it.*/
gint (*event) (io_request_t *request); /* This is called to inform the
algorithm of block request*/
gint (*done_reading) (void); /* This ia called to inform the
algorithm about all requested
reads been done */
} io_algorithm_t; |
get_IO_current_algorithm ()
Find out which is the current algorithm.
init_IO_algorithms ()
GSList* init_IO_algorithms (void); |
Initializes the IO algorithms code.
Mainly will call init functions for each algorithm.
register_IO_algorithm ()
Each algorithm should call this function in it's initialization function
to register its algorithm struct.
See Also
- IO Simulation
How to inspect and manage requests.
- Geometry
How manage geometry.
- Property Widget Facility
How to hadle numerical algorithm properties with the user
without learning GTK+.
- Request Queues
How to hadle request queues.