XAllocStandardColormap(3X11) | XLIB FUNCTIONS | XAllocStandardColormap(3X11) |
̾??¶
XAllocStandardColormap, XSetRGBColormaps, XGetRGBColormaps, XStandardColormap - ɸ?५?顼?ޥå?¤?Τγ??????ơ????ꡦ????
????¶
XStandardColormap *XAllocStandardColormap()
void XSetRGBColormaps(display, w,
std_colormap, count, property)
Display *display;
Window w;
XStandardColormap *std_colormap;
int count;
Atom property;
Status XGetRGBColormaps(display, w,
std_colormap_return, count_return, property)
Display *display;
Window w;
XStandardColormap **std_colormap_return;
int *count_return;
Atom property;
??????¶
- display
- X ?????Фؤ???³?????ꤹ?롣
- count
- ???顼?ޥåפο??????ꤹ?롣
- count_return
- ???顼?ޥåפο????֤????롣
- property
- ?ץ??ѥƥ???̾???????ꤹ?롣
- std_colormap
- ?Ȥ????? XStandardColormap ??¤?Τ????ꤹ?롣
- std_colormap_return
- XStandardColormap ??¤?Τ??֤????롣
????¶
?ؿ? XAllocStandardColormap ?? XStandardColormap ??¤?Τ????????ơ????ι?¤?Τ??ؤ??ݥ????֤??? XStandardColormap ??¤?Τ????ƤΥե??????ɤ? 0 ?ǽ??????????????????դ??뤳?ȡ? ??ʬ?ʥ????꤬???ѤǤ??ʤ????硢 XAllocStandardColormap ?? NULL ???֤??? ???ι?¤?Τ˳??????Ƥ??줿?????????????????ˤ? XFree ?????Ѥ??뤳?ȡ?
?ؿ? XSetRGBColormaps ?ϻ??ꤷ?????????ɥ??λ??ꤷ???ץ??ѥƥ??? RGB ???顼?ޥåפ????????? ???????롣 ???Υץ??ѥƥ????ޤ?¸?ߤ??ʤ????硢 XSetRGBColormaps ?ϻ??ꤷ?????????ɥ??λ??ꤷ???ץ??ѥƥ??? RGB ???顼?ޥåפ??????? ???ꤹ?롣 ?ץ??ѥƥ??? RGB_COLOR_MAP ?????ե????ޥå? 32 ?dz?Ǽ?????롣 RGB_DEFAULT_MAP ?Τߤ?ʣ?????????????ĤȤ??? ICCCM ?ε????ϡ??ؿ????? ?ӽФ?¦?Ǽ?????̳?????뤳?Ȥ????դ??衣
?ؿ? XSetRGBColormaps ???Ȥ??Τϡ??̾??ϥ??????ɥ??????å??????ޥ͡??????????Ǥ??롣 ɸ?५?顼?ޥåפϰʲ??μ?³???Ǻ??????롣
- 1.
- ???ߤΥ????Фؤο???????³???ץ롣
- 2.
- ?????Ф??֤??롣
- 3.
- ????????Υ롼?ȥ??????ɥ??Υץ??ѥƥ??ꥹ?Ȥˤ??Υץ??ѥƥ??????뤫 ?ɤ?????ǧ???롣
- 4.
- ɬ?פʥץ??ѥƥ????ʤ????м??ν??????Ԥ???
- (????????Υǥե????ȤΥ??顼?ޥåפ??Ȥ??ʤ??????˸¤?)???顼?ޥå? ?????????롣
- ?ӥ??奢???ο????????????ꤹ?롣
- ???顼?ޥå????Υ????????????Ƥ?(???뤤?? AllocAll ?Ǻ???????)??
- XStoreColors ???Ƥӡ????顼?ޥåפ?Ŭ?ڤʿ????ͤ???Ǽ???롣
- XStandardColormap ??¤?ΤΥ????Ф????ꤹ?롣
- ???Υץ??ѥƥ????롼?ȥ??????ɥ??˳????դ??롣
- XSetCloseDownMode ?????Ѥ??ơ??????????³Ū?ʤ??Τˤ??롣
- 5.
- ?????ФΥ????֤????????롣
XSetRGBColormaps ?ϥ??顼 BadAlloc, BadAtom, BadWindow ???????Ȥ????롣
XGetRGBColormaps ?ϡ????ꤷ?????????ɥ??λ??ꤷ???ץ??ѥƥ????? RGB ???顼?ޥå??????? ?֤??? ?ץ??ѥƥ???¸?ߤ??????η??? RGB_COLOR_MAP???ե????ޥåȤ? 32 ?Ǥ??ꡢ???ĥ??顼?ޥå????????ޤ??Τ˽?ʬ??Ĺ???????äƤ????С? XGetRGBColormaps ???֤????顼?ޥåפ????????ƤƤ??Υ??????ΰ??????ᡢ0 ?Ǥʤ? ???ơ????????֤??? ?ӥ??奢?? ID ???ʤ????硢 XGetRGBColormaps ?ϥ??????ɥ??????֤????륹??????Υǥե????ȤΥӥ??奢???????ꤹ?롣 kill ID ??¸?ߤ??ʤ??????ˤ? None ?????ꤵ???롣 ?????ϡ????Υ?????ϲ????Ǥ??ʤ????Ȥ??? ?????ʳ??ξ????ˤϡ????????Υե??????ɤ????ꤵ?줺?? XGetRGBColormaps ?ϥ??ơ??????Ȥ??? 0 ???֤??? RGB_DEFAULT_MAP ??????1?İʾ??????????ޤ? ICCCM ?????¤????????????Τ? ?ؿ????ƤӽФ?¦????Ǥ?Ǥ??뤳?Ȥ????դ??衣
XGetRGBColormaps ?ϥ??顼 BadAtom BadWindow ???????Ȥ????롣
??¤??¶
XStandardColormap ??¤?Τ????Ƥ??ʲ??˼???:
#define | ReleaseByFreeingColormap | ( (XID) 1L) |
typedef struct { Colormap colormap; unsigned long red_max; unsigned long red_mult; unsigned long green_max; unsigned long green_mult; unsigned long blue_max; unsigned long blue_mult; unsigned long base_pixel; VisualID visualid; XID killid; } XStandardColormap;
colormap ?????Фϡ??ؿ? XCreateColormap ?Ǻ??????륫?顼?ޥåפǤ??롣 red_max, green_max, blue_max ?????Ф? RGB ?γ??ͤκ????ͤ?Ϳ???롣 ???줾???ο????????ϰϤ? 0 ?ʾ塢?????Ͱʲ??Ǥ??롣 ?㤨?С?ɸ??Ū?ʥ??顼?ޥåפ????֤? 3/3/2?Ǥ???(?֤?3?ץ졼?????Ф?3 ?ץ졼?????Ĥ?2?ץ졼??)?? ???Υ??顼?ޥåפ? red_max = 7, green_max = 7, blue_max = 3 ?Ȥʤ롣 216 ???????Ȥ??ʤ??̤????֤Ȥ??Ƥϡ?red_max = 5, green_max = 5, blue_max = 5 ?ʤɤ??ͤ??????롣
red_mult, green_mult, blue_mult ?????Фϴ????ʥԥ??????ͤ????뤿?????? Ψ??Ϳ???롣 (?ܤ????????ˤĤ??Ƥ? base_pixels ?????Ф??????Ȥ??뤳?ȡ?) 3/3/2 ?????֤ξ????ˤ? red_mult ?? 32, green_mult ?? 4, blue_mult ?? 1 ?Ȥʤ롣 6/6/6 ?????֤ξ????ˤϡ?red_mult ?? 36, green_mult ?? 6, blue_mult ?? 1 ?Ȥʤ롣
base_pixel ?????Фϡ??????ʥԥ??????ͤ????뤿???˻Ȥ??????١????ԥ??? ???ͤ?Ϳ???롣 ?̾???? base_pixel ?ϴؿ? XAllocColorPlanes ???ƤӽФ??????롣 ???????ϰϤ? RGB ?γƷ?????Ϳ?????ȡ??б??????ԥ??????ͤϼ??μ??Ƿ? ?Ǥ??롣
(r * red_mult + g * green_mult + b * blue_mult + base_pixel) & 0xFFFFFFFF
GrayScale ???顼?ޥåפˤĤ??Ƥϡ?colormap, red_max, red_mult, base_pixel ?????? ???????????????롣 ¾?Υ????Ф?̵?뤵???롣 GrayScale ?Υԥ??????ͤη??ˤϼ??μ??????Ѥ??롣
(gray * red_mult + base_pixel) & 0xFFFFFFFF
???ξ?????ɽ???ˤϡ????ξ????? 2 ??????ɽ???? unsigned long ???Ѵ????? ???η??̤?Ŭ?ڤ? _mult ?ե??????ɤ???¸???????ɤ??? 0xFFFFFFFF ?Υޥ??????ݤ????ʳ??ǡ??????줿???ξ????????ξ????˸? ΨŪ???Ѵ????뤳?Ȥ??Ǥ??롣 ¿???η??????????ƥ??????Ǥϡ??ޥ????ν????Ϸ??˻??Ѥ????? ?????Υ??????˰?¸???Ƽ?ưŪ?˹Ԥ????롣
visualid ?????Фϡ????顼?ޥåפ??????????ӥ??奢???? ID ?ֹ???Ϳ???롣 killid ?????Фϡ??????ID??Ϳ???롣 ???Υ????ID?ϡ?????ɸ?५?顼?ޥåפ??ݻ????Ƥ??륻???顼?ޥå? ID ?β????ˤ??äƲ????????Τ??????ꤵ?줿??????ˤĤ??Ƥ? XKillClient ?θƤӽФ??ˤ??äƹԤ??Τ????? (??????ˡ?ϡ????ߤ?¸?ߤ??ʤ????顼?ޥåפ????????Ƥ???????ɬ?פǤ??롣)
XStandardColormap ?ξ??????ޤ??ץ??ѥƥ??η??? RGB_COLOR_MAP ?Ǥ??롣
?֤???¶
??Ϣ????¶
XAllocColor(3X11), XCreateColormap(3X11), XFree(3X11),
XSetCloseDownMode(3X11)
Xlib - C Language X Interface
Release 6.5 | X Version 11 |