The "xc" Package

These routines are meant to provide an abstracted interface to X displays and colourmaps, used in the kcmap routines.

Library: karmaX11
Link With: -lkarmaX11

Functions

xc_get_dpy_handleGenerate a display handle for later use.
xc_alloc_coloursAllocate colourcells.
xc_free_coloursFree a number of colourcells in a low level colourmap.
xc_store_coloursStore colours into a low level colourmap.
xc_get_locationDetermine the location of the graphics display being used.
xc_get_cmapGet the X11 colourmap for a display handle.


Functions


Kdisplay xc_get_dpy_handle (Display *display, Colormap cmap)

Generate a display handle for later use.

Parameters:

Returns: A pointer to the display handle on success, else NULL.
Multithreading Level: Unsafe


unsigned int xc_alloc_colours (unsigned int num_cells, unsigned long *pixel_values, unsigned int min_cells, Kdisplay dpy_handle)

This routine will allocate a number of colourcells in a low level colourmap (e.g. using the Xlib routine XAllocColorCells).

Parameters:

Returns: The number of colourcells allocated.
Multithreading Level: Unsafe


void xc_free_colours (unsigned int num_cells, unsigned long *pixel_values, Kdisplay dpy_handle)

Free a number of colourcells in a low level colourmap.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void xc_store_colours (unsigned int num_cells, unsigned long *pixel_values, unsigned short *reds, unsigned short *greens, unsigned short *blues, unsigned int stride, Kdisplay dpy_handle)

Store colours into a low level colourmap.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


void xc_get_location (Kdisplay dpy_handle, unsigned long *serv_hostaddr, unsigned long *serv_display_num)

Determine the location of the graphics display being used.

Parameters:

Returns: Nothing.
Multithreading Level: Unsafe


Colormap xc_get_cmap (Kdisplay dpy_handle)

Get the X11 colourmap for a display handle.

Parameters:

Returns: The X11 colourmap.
Multithreading Level: Unsafe


Contact: Richard Gooch
Web Development: Ariel Internet Services