KWIN(3)

PACKAGE
kwin - Manipulate pixel canvases in a device independent way

PURPOSE
These routines are meant to provide a high level mechanism to create and manipulate pixel canvases. After creating a pixel canvas from some graphics system primitive object, the canvas may be manipulated without the need to use the underlying graphics system interface. This renders code much more portable.

LIBRARY
karmagraphics

LINK WITH
-lkarmagraphics

FUNCTIONS

kwin_create_x
    Create a pixel canvas from an X window.

kwin_set_gc_x
    Set Graphics Context for an X-based pixel canavas.

kwin_get_gc_x
    Get Graphics Context for an X-based pixel canavas.

kwin_create_generic
    Create generic pixel canvas.

kwin_create_child
    Create a child pixel canvas.

kwin_destroy
    Destroy a pixel canvas.

kwin_register_destroy_func
    Register destroy callback.

kwin_register_refresh_func
    Register a refresh callback.

kwin_register_position_event_func
    Register position event callback.

kwin_register_bindings
    Register mouse and key binding descriptions with a pixel canvas.

kwin_resize
    Resize a pixel canvas.

kwin_refresh_if_visible
    Refresh a pixel canvas if it is visible.

kwin_partial_refresh
    Perform a partial refresh of a pixel canvas.

kwin_process_position_event
    Process position event on a pixel canvas.

kwin_get_attributes
    Get the attributes for a pixel canvas.

kwin_set_attributes
    Set the attributes for a pixel canvas.

kwin_associate_object
    Associate an object with a pixel canvas.

kwin_get_associated_object
    Get an associated object for a pixel canvas.

kwin_clear
    Clear a rectangular portion of a pixel canvas.

kwin_draw_pc_image
    Draw PseudoColour image to a pixel canvas.

kwin_compute_pc_subimage
    Compute PseudoColour subimage for a pixel canvas.

kwin_draw_rgb_image
    Draw TrueColour image to a pixel canvas.

kwin_draw_cached_image
    Draw cached image to a pixel canvas.

kwin_draw_cached_subimages
    Draw previously computed cached subimages.

kwin_draw_point
    Draw a single point onto a pixel canvas.

kwin_draw_points
    Draw multiple points onto a pixel canvas.

kwin_draw_line
    Draw a single line onto a pixel canvas.

kwin_draw_lines
    Draw multiple connected lines onto a pixel canvas.

kwin_fill_ellipse
    Draw a filled ellipse onto a pixel canvas.

kwin_fill_polygon
    Draw a filled polygon onto a pixel canvas.

kwin_draw_string
    Draw a string onto a pixel canvas.

kwin_draw_rectangle
    Draw a single rectangle onto a pixel canvas.

kwin_fill_rectangle
    Draw a single filled rectangle onto a pixel canvas.

kwin_draw_arc
    Draw an arc onto a pixel canvas.

kwin_draw_ellipse
    Draw an ellipse onto a pixel canvas.

kwin_draw_ellipses
    Draw multiple ellipses onto a pixel canvas.

kwin_fill_ellipses
    Draw multiple filled ellipses onto a pixel canvas.

kwin_draw_segments
    Draw multiple disjoint lines onto a pixel canvas.

kwin_get_size
    Get the size of a pixel canvas.

kwin_free_cache_data
    Free some cache data allocated by <-kwin_draw_pc_image->.

kwin_set_clip_areas
    Set the clip areas.

kwin_convert_to_canvas_coord
    Convert low-level co-ordinates to pixel co-ordinates.

kwin_convert_from_canvas_coord
    Convert pixel co-ordinates to low-level co-ordinates.

kwin_get_colour
    Get (possibly allocate) a colourcell for a canvas.

kwin_get_pixel_RGB_values
    Get RGB components of pixel values.

kwin_load_font
    Load a font for later use.

kwin_get_string_size
    Determine the size of a string.

kwin_warp_pointer
    Warp the pointer to a new location.

kwin_hershey_get_string
    Get string using Hershey (stroke) font for later drawing.

kwin_hershey_draw_string
    Draw string using Hershey (stroke) font.

kwin_mem_write_rgb
    Refresh a pixel canvas into a memory buffer.

kwin_get_colour_harder
    Get (possibly allocate) a colourcell for a canvas.

kwin_open_gl_test_available
    Test if the GLX extension is supported for a display.

kwin_open_gl_test_stereo
    Test if a particular visual can display stereo.

kwin_write_ps
    Refresh a pixel canvas onto a PostScriptPage object.

kwin_ps_generate
    Generate PostScript output.

kwin_queue_position_event
    Queue a position event on a pixel canvas for possible processing.

kwin_xgl_test_stereo
    Test if stereo supported using XGL.

kwin_xgl_create_stereo
    Create a stereo pixel canvas using XGL.

kwin_PROTO_refresh_func
    Process a refresh event for a pixel canvas.

kwin_PROTO_position_func
    Process a position event on a pixel canvas.

kwin_PROTO_destroy_func
    Process a destroy event for an object.

kwin_PROTO_iscale_func
    Intensity scale function.

TABLE kwin_ATTRIBUTES
List of attributes for KPixCanvas objects
Name Get Type Set Type Meaning
KWIN_ATT_END End of varargs list
KWIN_ATT_VISUAL unsigned int * Visual type
KWIN_ATT_DEPTH unsigned int * Depth of canvas
KWIN_ATT_VISIBLE flag * flag Canvas is visible
KWIN_ATT_FONT KPixCanvasFont * KPixCanvasFont Current font
KWIN_ATT_PIX_RED_MASK unsigned long * Red pixel mask
KWIN_ATT_PIX_GREEN_MASK unsigned long * Green pixel mask
KWIN_ATT_PIX_BLUE_MASK unsigned long * Blue pixel mask
KWIN_ATT_IM_RED_MASK unsigned long * Red image mask
KWIN_ATT_IM_GREEN_MASK unsigned long * Green image mask
KWIN_ATT_IM_BLUE_MASK unsigned long * Blue image mask
KWIN_ATT_IM_RED_OFFSET uaddr * Red image offset
KWIN_ATT_IM_GREEN_OFFSET uaddr * Green image offset
KWIN_ATT_IM_BLUE_OFFSET uaddr * Blue image offset
KWIN_ATT_LOWER_HANDLE void ** Lower handle
KWIN_ATT_USER_PTR void ** void * User pointer
KWIN_ATT_LINEWIDTH double * double Line width in pixels (0.0 = thin)

TABLE kwin_STRING_ATTRIBUTES
List of attributes for KPixCanvasFont string
Name Get Type Meaning
KWIN_STRING_END End of varargs list
KWIN_STRING_WIDTH int * String width
KWIN_STRING_HEIGHT int * String height
KWIN_STRING_ASCENT int * String ascent
KWIN_STRING_DESCENT int * String descent

TABLE kwin_XGL_STATUS
List of XGL stereo support types
Name Meaning
KWIN_XGL_NOT_AVAILABLE XGL is not supported
KWIN_XGL_STEREO_NOT_AVAILABLE No stereo display hardware
KWIN_XGL_STEREO_AVAILABLE Stereo available

TABLE kwin_ENVIRONMENT
List of environment variables
Variable Meaning
KWIN_DISABLE_PIXMAPS Disable pixmap cache

AUTHOR
Richard Gooch (rgooch@atnf.csiro.au)

AVAILABLITY
The Karma Distribution is available for anonymous ftp from: ftp://ftp.atnf.csiro.au/pub/software/karma/ ftp://wuarchive.wustl.edu/graphics/graphics/packages/karma/ ftp://ftp.pwr.wroc.pl/pub/karma/ The Karma Home Page is: http://www.atnf.csiro.au/karma/