Scroll to navigation

XGetWindowProperty(3X11) XLIB FUNCTIONS XGetWindowProperty(3X11)

̾??


XGetWindowProperty, XListProperties, XChangeProperty, XRotateWindowProperties, XDeleteProperty - ???????ɥ??Υץ??ѥƥ??μ??????ѹ????Ԥʤ?

????

int XGetWindowProperty(display, w, property, long_offset, long_length, delete, req_type,
actual_type_return, actual_format_return, nitems_return, bytes_after_return,
prop_return)
Display *display;
Window w;
Atom property;
long long_offset, long_length;
Bool delete;
Atom req_type;
Atom *actual_type_return;
int *actual_format_return;
unsigned long *nitems_return;
unsigned long *bytes_after_return;
unsigned char **prop_return;

Atom *XListProperties(display, w, num_prop_return)
Display *display;
Window w;
int *num_prop_return;

XChangeProperty(display, w, property, type, format, mode, data, nelements)
Display *display;
Window w;
Atom property, type;
int format;
int mode;
unsigned char *data;
int nelements;

XRotateWindowProperties(display, w, properties, num_prop, npositions)
Display *display;
Window w;
Atom properties[];
int num_prop;
int npositions;

XDeleteProperty(display, w, property)
Display *display;
Window w;
Atom property;

??????

?ץ??ѥƥ??μºݤΥե????ޥåȤ??֤????롣
?ץ??ѥƥ??μºݤΥ????פ????????륢?ȥ༱?̻Ҥ??֤????롣
?ץ??ѥƥ??ΰ????????ɤ߹????????硢?Ĥ??ΥХ??ȿ????֤????롣
?ץ??ѥƥ??Υǡ????????ꤹ?롣
?ץ??ѥƥ??????????뤫?ɤ??????ꤹ?뿿???ͤ????ꤹ?롣
X ?????Фؤ???³?????ꤹ?롣
?ǡ????? 8?ӥåȡ?16?ӥåȡ?32?ӥåȤ???????ñ?̤Υꥹ?ȤȤߤʤ????? ???ꤹ?롣 8, 16, 32 ???????Ǥ??롣 ???ξ????ˤ??ꡢX ?????Ф?ɬ?פ˱????ƥХ??ȸ򴹤????????Ԥ????Ȥ??Ǥ? ?롣 ?ե????ޥåȤ? 16?ӥåȤ?32?ӥåȤξ????ˤϡ? XChangeProperty ?θƤӽФ??κݤˤϥǡ????ؤΥݥ??󥿤? (unsigned char *) ?˥??㥹?Ȥ? ?ʤ????Фʤ??ʤ???
?????????ǡ?????32?ӥå??ܤ?Ĺ???????ꤹ?롣
?ǡ????????????ޤ??롢???ꤷ???ץ??ѥƥ????Υ??ե??å?(32?ӥå?ñ??)?? ???ꤹ?롣
?????Υ⡼?ɤ????ꤹ?롣 PropModeReplace, PropModePrepend, PropModeAppend ?Τ????줫???????Ǥ??롣
???ꤷ???ǡ????ե????ޥåȤ????ǿ??????ꤹ?롣
prop_return ?˳?Ǽ???줿 8?ӥåȡ?16?ӥåȡ?32?ӥåȤΥ????ƥ??μºݤ? ?????֤????롣
?ץ??ѥƥ?????????Ĺ???????ꤹ?롣
?ץ??ѥƥ?????????Ĺ?????֤????롣
?????ơ??????????̤????ꤹ?롣
???ꤷ???ե????ޥåȤΥǡ??????֤????롣
?ץ??ѥƥ?̾?????ꤹ?롣
?????ơ??Ȥ??????ץ??ѥƥ????????????ꤹ?롣
?ץ??ѥƥ??Υ????פ??б????륢?ȥ༱?̻Ҥ? AnyPropertyType ?????ꤹ?롣
?ץ??ѥƥ??η??????ꤹ?롣 X ?????ФϷ??β????ϹԤ??ʤ????????? XGetWindowProperty ???ƤӽФ??????ץꥱ?????????ˤ??η??򤽤Τޤ??֤???
?ץ??ѥƥ??μ??????ѹ????????ơ??ȡ????????Ԥ????????ɥ??????ꤹ?롣

????

?ؿ? XGetWindowProperty ?ϥץ??ѥƥ??μºݤΥ????ס??ץ??ѥƥ??μºݤΥե????ޥåȡ?ž???????? 8?ӥåȡ?16?ӥåȡ?32?ӥåȤΥ????ƥ??????ץ??ѥƥ??˻ĤäƤ????ɤ߹? ???٤??Х??ȿ????ǡ????ؤΥݥ??󥿤??֤??? XGetWindowProperty ???ͤ??֤??????????Ф??ưʲ??Τ褦???ͤ????ꤹ?롣

  • ???ꤷ?????????ɥ????Ф??????ꤷ???ץ??ѥƥ???¸?ߤ??ʤ????硢 XGetWindowProperty ?? actual_type_return ?? None ???֤???actual_format_return ?? bytes_after_return ?? 0 ???֤??? ?????? nitems_return ?϶??ˤʤ롣 ???ξ????ˤϰ????? delete ??̵?뤵???롣
  • ???ꤷ???ץ??ѥƥ???¸?ߤ??뤬???ꤷ???????פ˰??פ??ʤ????硢 XGetWindowProperty ?? actual_type_return ?˼ºݤΥץ??ѥƥ??Υ????ס? actual_format_return ?˼ºݤΥץ??ѥƥ??Υե????ޥå?(?褷?? 0 ?ˤϤ? ???ʤ?)??bytes_after_return ?˥ץ??ѥƥ??ΥХ???Ĺ (actual_format_return ??16?ޤ???32?Ǥ??äƤ?)???֤??? ???ξ??????????? delete ??̵?뤵???롣 ?????? nitems_return ?϶??Ǥ??롣
  • ???ꤷ???ץ??ѥƥ???¸?ߤ??????ġ??????? req_type ?? AnyPropertyType ?????ꤹ?뤫???ꤷ???????פ??ºݤΥץ??ѥƥ??Ȱ??פ????????ϡ? XGetWindowProperty ?? actual_type_return ?˼ºݤΥץ??ѥƥ??Υ????ס?actual_format_return ?? ?ºݤΥץ??ѥƥ??Υե????ޥå?(?褷?? 0 ?ˤʤ??ʤ?)???֤??? ?ޤ????ʲ????????????ͤ? bytes_after_return ?? nitems_return ???֤???

N = ??Ǽ?????Ƥ????ץ??ѥƥ??μºݤΥХ???Ĺ
(?ե????ޥåȤ?16?ޤ???32?ξ??????ޤ?) I = 4 * long_offset T = N - I L = MINIMUM(T, 4 * long_length) A = N - (I + L)
?֤??????ͤ?(0 ??????????) I ???ܤΥХ??Ȥ????ϤޤꡢĹ???? L ?Х??? ?Ǥ??롣 long_offset ???ͤˤ??? L ???????ͤˤʤä????硢???顼 BadValue ?Ȥʤ롣 bytes_after_return ???ͤ? A ?Ǥ??롣?????ϳ?Ǽ?????Ƥ????ץ??ѥƥ????? ?ĤäƤ??Ƥޤ??ɤ??Ǥ??ʤ??Х??ȿ??Ǥ??롣

?֤??줿?ե????ޥåȤ?8?ʤ??С??֤??줿?ǡ????? char ???????Ȥ???ɽ???????Ƥ??롣 ?֤??줿?ե????ޥåȤ?16?ʤ??С??֤??줿?ǡ????? short ???????Ȥ???ɽ???????Ƥ??ꡢ???Ǥ??????ˤϤ??η??˥??㥹?Ȥ??ʤ????Ф? ???ʤ??? ?֤??줿?ե????ޥåȤ?32?ʤ??С??֤??줿?ǡ????? long ???????Ȥ???ɽ???????Ƥ??ꡢ???Ǥ??????ˤϤ??η??˥??㥹?Ȥ??ʤ????Ф? ???ʤ???

XGetWindowProperty XGetWindowProperty ?Ͼ??? prop_return ???ɲä?1?Х??Ȥ????????ơ??????? 0 ?????ꤹ?롣 ʸ???????ʤ???ñ?ʥץ??ѥƥ??򡢻????????̤?ʸ?????˥??ԡ?????ɬ?? ???ʤ??褦?ˤ??뤿???Ǥ??롣

delete ?? True ?? bytes_after_return ?? 0 ?ʤ??С? XGetWindowProperty ?ϥץ??ѥƥ??򥦥????ɥ????????????????Υ??????ɥ????? PropertyNotify ???٥??Ȥ????????롣

???δؿ????????˼¹Ԥ??줿???硢 Success ???֤??? ?????줿?ǡ??????????????ˤ? XFree ?????Ѥ??뤳?ȡ?

XGetWindowProperty ?ϥ??顼 BadAtom, BadValue, BadWindow ?򵯤??????Ȥ????롣

?ؿ? XListProperties ?ϻ??ꤵ?줿???????ɥ????Ф????????????Ƥ??륢?ȥ??ץ??ѥƥ????????ؤ? ?ݥ??󥿤??֤????ץ??ѥƥ??????Ĥ????ʤ??ä??????ˤ? NULL ???֤??? ???δؿ??????????Ƥ??????????????????ˤ? XFree ???Ȥ????ȡ?

XListProperties ?ϥ??顼 BadWindow ?򵯤??????Ȥ????롣

?ؿ? XChangeProperty ?ϻ??ꤵ?줿???????ɥ??Υץ??ѥƥ????ѹ????? ???Υ??????ɥ????? PropertyNotify ???٥??Ȥ? X ?????Ф??????????롣 XChangeProperty ?ϰʲ???ư?????Ԥ???

  • ?????? mode ?? PropModeReplace ?ʤ??С? XChangeProperty ?ϰ????Υץ??ѥƥ??ͤ??˴????????????ǡ???????Ǽ???롣
  • mode ?? PropModePrepend ?ʤ??С? XChangeProperty ?ϸ??ߤ????ǡ???????Ƭ?˻??ꤷ???ǡ????????????? mode ?? PropModeAppend ?ʤ??С????ߤ????ǡ??????????˻??ꤷ???ǡ????????????롣 ?????פȥե????ޥåȤϸ??ߤ????ץ??ѥƥ??ͤȰ??פ??Ƥ??ʤ????Фʤ餺?? ?????Ǥʤ??????ˤϥ??顼 BadMatch ?Ȥʤ롣 ?ץ??ѥƥ????????????Ƥ??ʤ????硢?????????????????פȥե????ޥåȤ??? ?????줿??Ĺ?? 0 ?Υǡ????Ȥ??ư??????롣

???ꤷ???ե????ޥåȤ?8?ʤ??С??ץ??ѥƥ??Υǡ????? char ?????????Ǥʤ????Фʤ??ʤ??? ???ꤷ???ե????ޥåȤ?16?ʤ??С??ץ??ѥƥ??Υǡ????? short ?????????Ǥʤ????Фʤ??ʤ??? ???ꤷ???ե????ޥåȤ?32?ʤ??С??ץ??ѥƥ??Υǡ????? long ?????????Ǥʤ????Фʤ??ʤ???

?ץ??ѥƥ???¸³???֤ϡ???Ǽ???Ԥä????饤?????ȤȤϷ??ӤĤ??????ʤ??? ?ץ??ѥƥ???????Ū?˺????????뤫?????????ɥ????˲??????뤫???????Ф??? ???ꤹ???ޤǻĤ롣 X ?????Фؤ???³???ڤ줿?ݤε?ư?ˤĤ??Ƥϡ?2.6 ?Ϥ򻲾Ȥ??뤳?ȡ? ?ץ??ѥƥ??κ??祵?????ϥ????Ф˰?¸?????????ϥ????Ф????Ѳ?ǽ?ʥ????? ?̤ˤ??ä?ưŪ???Ѥ??뤳?Ȥ⤢?롣 (??ʬ?ʥ????꤬???ݤǤ??ʤ??????ϥ??顼 BadAlloc ?Ȥʤ롣)

XChangeProperty ?ϥ??顼 BadAlloc, BadAtom, BadMatch, BadValue, BadWindow ?򵯤??????Ȥ????롣

?ؿ? XRotateWindowProperties ???Ȥ??ȡ????????ɥ??Υץ??ѥƥ????????ơ??Ȥ????뤳?Ȥ??Ǥ??롣?ޤ??? ???δؿ???X ?????Ф? PropertyNotify ???٥??Ȥ??????????롣 ?ץ??ѥƥ??????????Υץ??ѥƥ?̾?? 0 ?????Ϥޤ??ֹ????դ????ꥹ?????? num_prop ?ĤΥץ??ѥƥ?̾?????????ΤȤ????ȡ??ץ??ѥƥ?̾ I ???б????? ?ͤϥץ??ѥƥ?̾ (I + npositions) mod N ???б??????ͤȤʤ?(I ???ͤ? 0 ?? N-1 ?ޤ?)?? ???δؿ??θ??̤ϡ????֤??ץ??ѥƥ?̾?β???Ū?ʥ??󥰤μ????? npositions ʬ?ΰ??֤????????ơ??Ȥ????뤳?ȤǤ???(npositions ?????ʤ? ?б??????ǡ????ʤ??к?????)?? npositions mod N ?? 0 ?Ǥʤ????С?X ?????Ф? ???????????󤵤??Ƥ??????˳ƥץ??ѥƥ????Ф??? PropertyNotify ???٥??Ȥ????????롣 1?ĤΥ??ȥब?ꥹ??????2?ٰʾ帽???줿?????ȥ??????ɥ????Ф??Ƥ???̾?? ?Υץ??ѥƥ????????????Ƥ??ʤ??????ˤϡ????顼 BadMatch ?Ȥʤ롣 ???顼 BadAtom ???뤤?? BadMatch ???????????硢?ץ??ѥƥ????ѹ??????ʤ???

XRotateWindowProperties ?ϥ??顼 BadAtom, BadMatch, BadWindow ?򵯤??????Ȥ????롣

?ؿ? XDeleteProperty ?ϻ??ꤷ???ץ??ѥƥ??????ꤷ?????????ɥ????Ф????????????Ƥ????????˸? ?äƤ??Υץ??ѥƥ??????????????Υ??????ɥ????Ǥ? PropertyNotify ???٥??Ȥ? X ?????Ф??????????롣

XDeleteProperty ?ϥ??顼 BadAtom?? BadWindow ?򵯤??????Ȥ????롣

?֤???

?׵ᤵ?줿?꥽?????䥵???Х??????γ??????Ƥ˥????Ф????Ԥ?????
?????? Atom ???ͤ????????????Ƥ??? Atom ???ؤ??Ƥ??ʤ???
???ꤵ?줿???ͤˡ??ꥯ?????Ȥε????ϰϤ??ۤ??Ƥ??????Τ????롣?????????? ???????????ϰϤ????ꤵ???Ƥ??ʤ????С????????η????????????Ƥ??????Ƥ??? ?Ϥ????????롣???????Ȥ????????????Ƥ??????????Ϥ??Υ??顼?򵯤??????Ȥ? ???롣
?????? Window ???ͤ????????????Ƥ??? Window ???ؤ??Ƥ??ʤ???

??Ϣ????

XFree(3X11), XInternAtom(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11