Scroll to navigation

XCreateWindow(3X11) XLIB FUNCTIONS XCreateWindow(3X11)

̾??

XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes - ???????ɥ????????????????ɥ?°????¤??

????

Window XCreateWindow(display, parent, x, y, width, height, border_width, depth,
class, visual, valuemask, attributes)
Display *display;
Window parent;
int x, y;
unsigned int width, height;
unsigned int border_width;
int depth;
unsigned int class;
Visual *visual
unsigned long valuemask;
XSetWindowAttributes *attributes;

Window XCreateSimpleWindow(display, parent, x, y, width, height, border_width,
border, background)
Display *display;
Window parent;
int x, y;
unsigned int width, height;
unsigned int border_width;
unsigned long border;
unsigned long background;

??????

?ͤ??????Ф???¤??(?ޥ????ͤȤ??ƻ???)?????ꤹ?롣 ??¤?ΤǤɤ?°???????åȤ????Ƥ??뤫?򼨤????ᡢ?ޥ????ͤˤ?Ŭ?ڤʥӥå? ?????åȤ????Ƥ??ʤ????Фʤ??ʤ???
???????ɥ????طʤΥԥ??????ͤ????ꤹ?롣
???????ɥ??ζ????Υԥ??????ͤ????ꤹ?롣
?????????륦?????ɥ??ζ??????????ԥ?????ñ?̤ǻ??ꤹ?롣
?????????륦?????ɥ??Υ??饹?????ꤹ?롣 ?????ˤ? InputOutput, InputOnly, CopyFromParent ?Τ????줫?????ꤹ?롣 CopyFromParent ???饹?λ??ϡ??Ƥ?Ʊ?????饹?ˤʤ롣
???????ɥ??ο????????ꤹ?롣 ?????? CopyFromParent ?Ȥ??????硢?????ϿƤ?Ʊ???ˤʤ롣
X ?????Фؤ???³?????ꤹ?롣
?ƥ??????ɥ??????ꤹ?롣
?????? attributes ???????????륦?????ɥ?°???????ꤹ?롣 ???Υޥ????ϡ?ʣ????ͭ????°???ޥ??????Ф??ơ??ӥåȤ??Ȥ??????¤????? ?????ΤǤ??롣 ?ޥ????ͤ? 0 ?ʤ??а????? attributes ??̵?뤵?졢???Ȥ????ʤ???
?ӥ??奢?뷿?????ꤹ?롣 ?ӥ??奢???? CopyFromParent ?????ꤷ???????ϿƤ?Ʊ???ӥ??奢?뷿?ˤʤ롣

?⤵?????????ꤹ?롣 ???????????????륦?????ɥ?????¦???礭???Ǥ??ꡢ?????ϴޤޤʤ???

x, y ??ɸ?????ꤹ?롣?????ϥ??????ɥ??ζ????κ??峰¦?ζ??Ǥ??ꡢ ?ƥ??????ɥ??ζ???????¦?????????к?ɸ?ǻ??ꤹ?롣

????

?ؿ? XCreateWindow ?ϡ??ޥåפ????Ƥ??ʤ????֥??????ɥ??????ꤷ???ƥ??????ɥ????Ф??????????? ???????????????ɥ??Υ??????ɥ?ID???֤????ޤ???X ?????Ф? CreateNotify ???٥??Ȥ??????????롣 ???????줿???????ɥ??Ϸ??復?????ɥ????Ф??ƥ????å??ΰ??־??????֤??? ?롣

??ɸ?Ϥ?X??????ʿ??????Y??????ľ?????Ǥ??ꡢ????????????[0, 0]?Ǥ??롣 ??ɸ???????ǡ??ԥ????뤬?????Ǥ??ꡢ?ԥ????????濴?Ȱ??פ??롣 ?ƥ??????ɥ??ȥԥå????ޥåפϼ?ʬ???Ȥκ?ɸ?Ϥ????ġ? ???????ɥ??ˤĤ??Ƥϡ??????Ϻ??????ζ???????¦?Ǥ??롣

InputOnly ?Υ??????ɥ??ξ????? border_width ?? 0 ?Ǥʤ????Фʤ??ʤ??? ?????Ǥʤ????硢???顼 BadMatch ?Ȥʤ롣 InputOutput ???饹?ξ??硢?????꡼?????Ф??ƥӥ??奢?뷿?ȿ??????Ȥ߹??碌?? ???ݡ??Ȥ????Ƥ??ʤ????Фʤ??ʤ????????Ǥʤ??????ˤϡ????顼 BadMatch ?Ȥʤ롣 ?????Ͽƥ??????ɥ???Ʊ???Ǥ???ɬ?פ?̵???????ƥ??????ɥ??Υ??饹?? InputOnly ?Ǥ??äƤϤʤ??ʤ????????Ǥʤ????硢???顼 BadMatch ?Ȥʤ롣 InputOnly ?Υ??????ɥ??Ͽ????? 0 ?Ǥʤ????Фʤ餺???????꡼?󤬥??ݡ??Ȥ??Ƥ??? ?ӥ??奢???Ǥʤ????Фʤ餤?ʤ??? ?????줫?ξ??郎?????????ʤ????硢???顼 BadMatch ?Ȥʤ롣 ?????????ƥ??????ɥ???Ǥ?դο????ȥ??饹?????Ĥ??Ȥ??ͤ??????롣 ???????ɥ????Ф????????ʥ??????ɥ?°???????ꤷ?????硢???顼 BadMatch ?Ȥʤ롣

???????줿???????ɥ??ϡ????λ????Ǥϥǥ????ץ쥤??ɽ??(?ޥå?)?????ʤ??? ???????ɥ???ɽ???????ˤϡ? XMapWindow ???ƤӽФ??? ?????????????ɥ??Ͻ??????֤ǤϿƥ??????ɥ???Ʊ???????????????Ѥ??롣 ?????????????ɥ??˿??????????????????????????ϡ? XDefineCursor ???Ȥ??? ???????줿???????ɥ??????Ƥ????襦?????ɥ????ޥåפ??졢???Ȥ????襦?? ???ɥ??α??˱??????ʤ??褦?ˤʤ??ޤǤϥ????꡼????ɽ???????ʤ???

XCreateWindow ?ϥ??顼 BadAlloc, BadColor, BadCursor, BadMatch, BadPixmap, BadValue, BadWindow ?򵯤??????Ȥ????롣

?ؿ? XCreateSimpleWindow ?ϻ??ꤷ???ƥ??????ɥ????Ф??ơ??ޥåפ????Ƥ??ʤ? InputOutput ?Υ??֥??????ɥ??????ꡢ???Υ??????ɥ?ID???֤????ޤ???X ?????Ф? CreateNotify ???٥??Ȥ??????????롣 ???????줿???????ɥ??Ϸ??復?????ɥ????Ф??ƥ????å??κǤ????????֤??? ?롣 ?ƥ??????ɥ??γ??ˤϤ߽Ф???ʬ?????ƥ????åפ????롣 InputOnly ?Υ??????ɥ??? border_width ?? 0 ?Ǥʤ????Фʤ??ʤ????????Ǥʤ??????? ?ϡ????顼 BadMatch ?Ȥʤ롣 XCreateSimpleWindow ?Ͽƥ??????ɥ????꿼???????饹???ӥ??奢?????Ѿ????롣 ?????ʳ??Υ??????ɥ?°???ϡ??طʿ????????????ƥǥե??????ͤˤʤ롣

XCreateSimpleWindow ?ϥ??顼 BadAlloc, BadMatch, BadValue, BadWindow ?򵯤??????Ȥ????롣

??¤??

XSetWindowAttributes ??¤?Τ????Ƥ򼨤???

#define CWBackPixmap (1L<<0)
#define CWBackPixel (1L<<1)
#define CWBorderPixmap (1L<<2)
#define CWBorderPixel (1L<<3)
#define CWBitGravity (1L<<4)
#define CWWinGravity (1L<<5)
#define CWBackingStore (1L<<6)
#define CWBackingPlanes (1L<<7)
#define CWBackingPixel (1L<<8)
#define CWOverrideRedirect (1L<<9)
#define CWSaveUnder (1L<<10)
#define CWEventMask (1L<<11)
#define CWDontPropagate (1L<<12)
#define CWColormap (1L<<13)
#define CWCursor (1L<<14)
typedef struct {
	Pixmap background_pixmap;	
	unsigned long background_pixel;	
	Pixmap border_pixmap;		
	unsigned long border_pixel;	
	int bit_gravity;	
	int win_gravity;	
	int backing_store;	
	unsigned long backing_planes;	
	unsigned long backing_pixel;	
	Bool save_under;	
	long event_mask;	
	long do_not_propagate_mask;	
	Bool override_redirect;	
	Colormap colormap;	
	Cursor cursor;		
} XSetWindowAttributes;


???ι?¤?ΤΥ????Фξܤ????????ˤĤ??Ƥ? Xlib - C Language X Interface ?򻲾Ȥ??뤳?ȡ?

?֤???

?׵ᤵ?줿?꥽?????䥵???Х??????γ??????Ƥ˥????Ф????Ԥ?????
?????? Colormap ???ͤ????????????Ƥ??? Colormap ???ؤ??Ƥ??ʤ???
?????? Cursor ???ͤ????????????Ƥ??? Cursor ???ؤ??Ƥ??ʤ???
InputOnly ?Υ??????ɥ????Ф????ͤ?¸?ߤ??ʤ???
?????????????????Ȥ????????????ϰϤ????äƤ??뤬?????Υꥯ?????Ȥ??׵᤹?? ¾?ξ?????Ŭ???Ǥ??ʤ??ä???
?????? Pixmap ???ͤ????????????Ƥ??? Pixmap ???ؤ??Ƥ??ʤ???
???ꤵ?줿???ͤ˥ꥯ?????Ȥε????ϰϤ??ۤ??Ƥ??????Τ????롣?????????? ???????????ϰϤ????ꤵ???Ƥ??ʤ????С????????η????????????Ƥ??????Ƥ??? ?Ϥ????????롣???????Ȥ????????????Ƥ??????????Ϥ??Υ??顼?򵯤??????Ȥ? ???롣
?????? Window ???ͤ????????????Ƥ??? Window ???ؤ??Ƥ??ʤ???

??Ϣ????

XChangeWindowAttributes(3X11), XConfigureWindow(3X11), XDefineCursor(3X11), XDestroyWindow(3X11), XMapWindow(3X11), XRaiseWindow(3X11), XUnmapWindow(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11