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
Functions
  Kdisplay
 xc_get_dpy_handle    (Display *display, Colormap cmap)
    Generate a display handle for later use.
Parameters:
- display : 
    The X display.
 
- cmap : 
    The X colourmap ID.
 
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:
- num_cells : 
    The number of colourcells to allocate.
 
- pixel_values : 
    A pointer to the array where the pixel values allocated will
    be written.
 
- min_cells : 
    The minimum number of colourcells to allocate. The routine will
    try to allocate at least this number of colourcells.
 
- dpy_handle : 
    The low level display handle. The meaning of this value
    depends on the lower level graphics library used.
 
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:
- num_cells : 
    The number of colourcells to free.
 
- pixel_values : 
    The array of pixel values (colourcells) to free.
 
- dpy_handle : 
    The low level display handle. The meaning of this value
    depends on the lower level graphics library used.
 
Returns:     Nothing.
Multithreading Level: Unsafe
  void
 xc_store_colours    (unsigned int num_cells,
		       CONST 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:
- num_cells : 
    The number of colourcells to store.
 
- pixel_values : 
    The array of pixel values.
 
- reds : 
    The array of red intensity values. If this is NULL, the value 0 is
    used.
 
- greens : 
    The array of green intensity values. If this is NULL, the value 0
    is used.
 
- blues : 
    The array of blue intensity values. If this is NULL, the value 0 is
    used.
 
- stride : 
    The stride (in unsigned shorts) between intensity values in each
    array.
 
- dpy_handle : 
    The low level display handle. The meaning of this value
    depends on the lower level graphics library used.
 
Returns:     Nothing.
Multithreading Level: Unsafe
  EXPERIMENTAL FUNCTION: subject to change without notice
void
 xc_get_location2    (Kdisplay dpy_handle, unsigned long *serv_hostaddr,
		       unsigned long *serv_display_num, unsigned long *cmap_id)
    Determine the location of the graphics display being used.
Parameters:
- dpy_handle : 
    The low level display handle. The meaning of this value
    depends on the lower level graphics library used.
 
- serv_hostaddr : 
    The Internet address of the host on which the display is
    running will be written here.
 
- serv_display_num : 
    The number of the display will be written here.
 
- cmap_id : 
    The ID of the hardware colourmap is written here.
 
Returns:     Nothing.
Multithreading Level: Unsafe
  Colormap
 xc_get_cmap    (Kdisplay dpy_handle)
    Get the X11 colourmap for a display handle.
Parameters:
- dpy_handle : 
    The display handle.
 
Returns:     The X11 colourmap.
Multithreading Level: Unsafe
  EXPERIMENTAL FUNCTION: subject to change without notice
void
 xc_free_handle    (Kdisplay dpy_handle)
    Free a display handle.
Parameters:
- dpy_handle : 
    The display handle.
 
Returns:     Nothing.
Multithreading Level: Unsafe
Back to Karma Home Page
Contact: Richard Gooch
Web Development: Ariel Internet Services