Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XmeGetColorObjData(3X) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     XmeGetColorObjData(3X)    UNIX System V    XmeGetColorObjData(3X)



     NAME
          XmeGetColorObjData - access ColorObject desktop and pixel
          data

     SYNOPSIS
          #include <Xm/ColorObjP.h>
          Boolean XmeGetColorObjData(
          int*screen,
          int*coloruse,
          XmPixelSet*pixelset,
          unsigned shortpixelsetsize,
          short*active, *inactive, *primary, *secondary, *text);

          typedef struct {
             Pixel fg;
             Pixel bg;
             Pixel ts;
             Pixel bs;
             Pixel sc;
          } XmPixelSet;

     DESCRIPTION
          The Motif library creates and maintains a ColorObject at
          application initialization time (first VendorShell creation)
          which holds color information coming from a Color Server
          running on the desktop (see Color Server protocol,
          documented as part of the new revision of the X/Open XCSA
          specification).

          This ColorObject is not directly available to programmers,
          but an API is provided to access most of the information it
          contains.

          The ColorObject itself makes use of this information
          internally to default most color setting for the Motif
          widgets (e.g. it will add *background: <PIXEL> in the in
          memory resource database for the application)

          This function returns color information maintained by the
          ColorObject in Motif, which comes from the color server
          using the Color Server protocol (see above sections) The
          color_usepossible returned values are:

          enum { XmCO_BLACK_WHITE,
                 XmCO_LOW_COLOR,
                 XmCO_MEDIUM_COLOR,
                 XmCO_HIGH_COLOR };

          which correspond to the type of monitor in use by the
          desktop.

          There is a maximum of 8 pixel sets returned.  Each pixel set



     Page 1                                          (printed 1/22/99)





     XmeGetColorObjData(3X)    UNIX System V    XmeGetColorObjData(3X)



          consists of the five fundamental motif colors maintained by
          the ColorObject for this screen: background, foreground,
          topshadowcolor, bottomshadowcolor, and selectcolor.

          The function also returns the color set id number used by
          the ColorObject.

          screen    X screen passed in

          color_use colorUse type enum returned

          pixel_set Pixel sets returned (allocated by caller)

          pixel_set_size
                    Size of pixel sets array (max used by function)

          active, inactive, primary, secondary, text
                    Returned color set ids.

     RETURN VALUE
          False if the color server is not running, if the useColorObj
          XmScreen resource is set to False, or if the screen number
          is out of the range managed by the color server; otherwise
          True.

     STRUCTURES
          XmPixelSet is used to specify the pixel allocated by the
          Color Server.

     ENVIRONMENT
          The information returned by this function depends on the
          presence of an active Color Server.

     RESOURCES
          This function is affected by the resources set on the Color
          Server and useColorObj on XmScreen.

     ACTIONS/MESSAGES
          None.

     ERRORS/WARNINGS
          None.

     EXAMPLES
          On return, one can use:

          primary_background = pixelSet[primary_id].bg;

     SEE ALSO
          ,





     Page 2                                          (printed 1/22/99)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026