'\" t .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium .\" .\" Permission is hereby granted, free of charge, to any person obtaining .\" a copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, .\" distribute, sublicense, and/or sell copies of the Software, and to .\" permit persons to whom the Software is furnished to do so, subject to .\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR .\" OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of the X Consortium shall .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by .\" Digital Equipment Corporation .\" .\" Portions Copyright \(co 1990, 1991 by .\" Tektronix, Inc. .\" .\" Permission to use, copy, modify and distribute this documentation for .\" any purpose and without fee is hereby granted, provided that the above .\" copyright notice appears in all copies and that both that copyright notice .\" and this permission notice appear in all copies, and that the names of .\" Digital and Tektronix not be used in in advertising or publicity pertaining .\" to this documentation without specific, written prior permission. .\" Digital and Tektronix makes no representations about the suitability .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" .\" Copyright (c) 1998, 2001 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Fri Oct 2 23:10:42 JST 1998 .\" by FUJIWARA Teruyoshi .\" Corrected by NAKANO Takeo .\" Updated Sun Sep 23 19:39:57 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/X11/XCreWin.man,v 1.4 2001/02/09 03:47:45 tsi Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface .ds xL Xlib \- C Language X Interface .ds xC Inter-Client Communication Conventions Manual .na .de Ds .nf .\\$1D \\$2 \\$1 .ft 1 .\".ps \\n(PS .\".if \\n(VS>=40 .vs \\n(VSu .\".if \\n(VS<=39 .vs \\n(VSp .. .de De .ce 0 .if \\n(BD .DF .nr BD 0 .in \\n(OIu .if \\n(TM .ls 2 .sp \\n(DDu .fi .. .de FD .LP .KS .TA .5i 3i .ta .5i 3i .nf .. .de FN .fi .KE .LP .. .de IN \" send an index entry to the stderr .. .de C{ .KS .nf .D .\" .\" choose appropriate monospace font .\" the imagen conditional, 480, .\" may be changed to L if LB is too .\" heavy for your eyes... .\" .ie "\\*(.T"480" .ft L .el .ie "\\*(.T"300" .ft L .el .ie "\\*(.T"202" .ft PO .el .ie "\\*(.T"aps" .ft CW .el .ft R .ps \\n(PS .ie \\n(VS>40 .vs \\n(VSu .el .vs \\n(VSp .. .de C} .DE .R .. .de Pn .ie t \\$1\fB\^\\$2\^\fR\\$3 .el \\$1\fI\^\\$2\^\fP\\$3 .. .de ZN .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. .de hN .ie t <\fB\\$1\fR>\\$2 .el <\fI\\$1\fP>\\$2 .. .de NT .ne 7 .ds NO Note .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1 .ie n .sp .el .sp 10p .TB .ce \\*(NO .ie n .sp .el .sp 5p .if '\\$1'C' .ce 99 .if '\\$2'C' .ce 99 .in +5n .ll -5n .R .. . \" Note End -- doug kraft 3/85 .de NE .ce 0 .in -5n .ll +5n .ie n .sp .el .sp 10p .. .ny0 '\" t .TH XCreateWindow 3X11 "Release 6.5" "X Version 11" "XLIB FUNCTIONS" .SH 名前 .\"0 XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes \- create windows and window attributes structure XCreateWindow, XCreateSimpleWindow, XSetWindowAttributes \- ウィンドウの生成、ウィンドウ属性構造体 .SH 書式 Window XCreateWindow\^(\^\fIdisplay\fP, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIborder_width\fP\^, \fIdepth\fP\^, .br \fIclass\fP\^, \fIvisual\fP\^, \fIvaluemask\fP\^, \fIattributes\fP\^) .br Display *\fIdisplay\fP\^; .br Window \fIparent\fP\^; .br int \fIx\fP\^, \fIy\fP\^; .br unsigned int \fIwidth\fP\^, \fIheight\fP\^; .br unsigned int \fIborder_width\fP\^; .br int \fIdepth\fP\^; .br unsigned int \fIclass\fP\^; .br Visual *\fIvisual\fP\^ .br unsigned long \fIvaluemask\fP\^; .br XSetWindowAttributes *\fIattributes\fP\^; .LP Window XCreateSimpleWindow\^(\^\fIdisplay\fP, \fIparent\fP\^, \fIx\fP\^, \fIy\fP\^, \fIwidth\fP\^, \fIheight\fP\^, \fIborder_width\fP\^, .br \fIborder\fP\^, \fIbackground\fP\^) .br Display *\fIdisplay\fP\^; .br Window \fIparent\fP\^; .br int \fIx\fP\^, \fIy\fP\^; .br unsigned int \fIwidth\fP\^, \fIheight\fP\^; .br unsigned int \fIborder_width\fP\^; .br unsigned long \fIborder\fP\^; .br unsigned long \fIbackground\fP\^; .SH 引き数 .IP \fIattributes\fP 1i .\"0 Specifies the structure from which the values (as specified by the value mask) .\"0 are to be taken. 値を取り出す構造体(マスク値として指定)を指定する。 .\"0 The value mask should have the appropriate bits .\"0 set to indicate which attributes have been set in the structure. 構造体でどの属性がセットされているかを示すため、マスク値には適切なビット がセットされていなければならない。 .IP \fIbackground\fP 1i .\"0 Specifies the background pixel value of the window. ウィンドウの背景のピクセル値を指定する。 .IP \fIborder\fP 1i .\"0 Specifies the border pixel value of the window. ウィンドウの境界のピクセル値を指定する。 .IP \fIborder_width\fP 1i .\"0 Specifies the width of the created window's border in pixels. 生成されるウィンドウの境界の幅をピクセル単位で指定する。 .IP \fIclass\fP 1i .\"0 Specifies the created window's class. 生成されるウィンドウのクラスを指定する。 .\"0 You can pass .\"0 .ZN InputOutput , .\"0 .ZN InputOnly , .\"0 or .\"0 .ZN CopyFromParent . これには .ZN InputOutput , .ZN InputOnly , .ZN CopyFromParent のいずれかを指定する。 .\"0 A class of .\"0 .ZN CopyFromParent .\"0 means the class .\"0 is taken from the parent. .ZN CopyFromParent クラスの時は、親と同じクラスになる。 .IP \fIdepth\fP 1i .\"0 Specifies the window's depth. ウィンドウの深さを指定する。 .\"0 A depth of .\"0 .ZN CopyFromParent .\"0 means the depth is taken from the parent. 深さを .ZN CopyFromParent とした場合、深さは親と同じになる。 .IP \fIdisplay\fP 1i .\"0 Specifies the connection to the X server. X サーバへの接続を指定する。 .IP \fIparent\fP 1i .\"0 Specifies the parent window. 親ウィンドウを指定する。 .IP \fIvaluemask\fP 1i .\"0 Specifies which window attributes are defined in the attributes .\"0 argument. 引き数 attributes で定義されるウィンドウ属性を指定する。 .\"0 This mask is the bitwise inclusive OR of the valid attribute mask bits. このマスクは、複数の有効な属性マスクに対して、ビットごとの論理和を取っ たものである。 .\"0 If valuemask is zero, .\"0 the attributes are ignored and are not referenced. マスク値が 0 ならば引き数 attributes は無視され、参照されない。 .IP \fIvisual\fP 1i .\"0 Specifies the visual type. ビジュアル型を指定する。 .\"0 A visual of .\"0 .ZN CopyFromParent .\"0 means the visual type is taken from the .\"0 parent. ビジュアルに .ZN CopyFromParent を指定した場合は親と同じビジュアル型になる。 .\"0 .ds Wh , which are the created window's inside dimensions .\"0 and do not include the created window's borders .IP \fIwidth\fP 1i .br .ns .IP \fIheight\fP 1i .\"0 Specify the width and height\*(Wh. 高さと幅を指定する。 これは生成されるウィンドウの内側の大きさであり、境界は含まない。 .\"0 .ds Xy , which are the top-left outside corner of the window's .\"0 borders and are relative to the inside of the parent window's borders .IP \fIx\fP 1i .br .ns .IP \fIy\fP 1i .\"0 Specify the x and y coordinates\*(Xy. x, y 座標を指定する。これはウィンドウの境界の左上外側の隅であり、 親ウィンドウの境界の内側からの相対座標で指定する。 .SH 説明 .\"0 The .\"0 .ZN XCreateWindow .\"0 function creates an unmapped subwindow for a specified parent window, .\"0 returns the window ID of the created window, .\"0 and causes the X server to generate a .\"0 .ZN CreateNotify .\"0 event. 関数 .ZN XCreateWindow は、マップされていないサブウィンドウを指定した親ウィンドウに対して生成し、 生成したウィンドウのウィンドウIDを返す。また、X サーバに .ZN CreateNotify イベントを生成させる。 .\"0 The created window is placed on top in the stacking order .\"0 with respect to siblings. 生成されたウィンドウは兄弟ウィンドウに対してスタックの一番上に配置され る。 .LP .\"0 The coordinate system has the X axis horizontal and the Y axis vertical .\"0 with the origin [0, 0] at the upper-left corner. 座標系はX軸が水平方向、Y軸が垂直方向であり、左上隅が原点[0, 0]である。 .\"0 Coordinates are integral, .\"0 in terms of pixels, .\"0 and coincide with pixel centers. 座標は整数で、ピクセルが基準であり、ピクセルの中心と一致する。 .\"0 Each window and pixmap has its own coordinate system. 各ウィンドウとピックスマップは自分自身の座標系を持つ。 .\"0 For a window, .\"0 the origin is inside the border at the inside, upper-left corner. ウィンドウについては、原点は左上隅の境界の内側である。 .LP .\"0 The border_width for an .\"0 .ZN InputOnly .\"0 window must be zero, or a .\"0 .ZN BadMatch .\"0 error results. .ZN InputOnly のウィンドウの場合は border_width は 0 でなければならない。 そうでない場合、エラー .ZN BadMatch となる。 .\"0 For class .\"0 .ZN InputOutput , .\"0 the visual type and depth must be a combination supported for the screen, .\"0 or a .\"0 .ZN BadMatch .\"0 error results. .ZN InputOutput クラスの場合、スクリーンに対してビジュアル型と深さの組み合わせが サポートされていなければならない。そうでない場合には、エラー .ZN BadMatch となる。 .\"0 The depth need not be the same as the parent, .\"0 but the parent must not be a window of class .\"0 .ZN InputOnly , .\"0 or a .\"0 .ZN BadMatch .\"0 error results. 深さは親ウィンドウと同じである必要は無いが、親ウィンドウのクラスは .ZN InputOnly であってはならない。そうでない場合、エラー .ZN BadMatch となる。 .\"0 For an .\"0 .ZN InputOnly .\"0 window, .\"0 the depth must be zero, and the visual must be one supported by the screen. .ZN InputOnly のウィンドウは深さが 0 でなければならず、スクリーンがサポートしている ビジュアルでなければならいない。 .\"0 If either condition is not met, .\"0 a .\"0 .ZN BadMatch .\"0 error results. いずれかの条件が満たされない場合、エラー .ZN BadMatch となる。 .\"0 The parent window, however, may have any depth and class. しかし、親ウィンドウは任意の深さとクラスを持つことが考えられる。 .\"0 If you specify any invalid window attribute for a window, a .\"0 .ZN BadMatch .\"0 error results. ウィンドウに対して不正なウィンドウ属性を指定した場合、エラー .ZN BadMatch となる。 .LP .\"0 The created window is not yet displayed (mapped) on the user's display. 生成されたウィンドウは、その時点ではディスプレイに表示(マップ)されない。 .\"0 To display the window, call .\"0 .ZN XMapWindow . ウィンドウを表示するには、 .ZN XMapWindow を呼び出す。 .\"0 The new window initially uses the same cursor as .\"0 its parent. 新しいウィンドウは初期状態では親ウィンドウと同じカーソルを使用する。 .\"0 A new cursor can be defined for the new window by calling .\"0 .ZN XDefineCursor . 新しいウィンドウに新しいカーソルを定義する時は、 .ZN XDefineCursor を使う。 .IN "Cursor" "Initial State" .IN "XDefineCursor" .\"0 The window will not be visible on the screen unless it and all of its .\"0 ancestors are mapped and it is not obscured by any of its ancestors. 生成されたウィンドウは全ての祖先ウィンドウがマップされ、自身が祖先ウィ ンドウの陰に隠されないようになるまではスクリーンに表示されない。 .LP .\"0 .ZN XCreateWindow .\"0 can generate .\"0 .ZN BadAlloc .\"0 .ZN BadColor , .\"0 .ZN BadCursor , .\"0 .ZN BadMatch , .\"0 .ZN BadPixmap , .\"0 .ZN BadValue , .\"0 and .\"0 .ZN BadWindow .\"0 errors. .ZN XCreateWindow はエラー .ZN BadAlloc, .ZN BadColor , .ZN BadCursor , .ZN BadMatch , .ZN BadPixmap , .ZN BadValue , .ZN BadWindow を起こすことがある。 .LP .\"0 The .\"0 .ZN XCreateSimpleWindow .\"0 function creates an unmapped .\"0 .ZN InputOutput .\"0 subwindow for a specified parent window, returns the .\"0 window ID of the created window, and causes the X server to generate a .\"0 .ZN CreateNotify .\"0 event. 関数 .ZN XCreateSimpleWindow は指定した親ウィンドウに対して、マップされていない .ZN InputOutput のサブウィンドウを作り、そのウィンドウIDを返す。また、X サーバに .ZN CreateNotify イベントを生成させる。 .\"0 The created window is placed on top in the stacking order with respect to .\"0 siblings. 生成されたウィンドウは兄弟ウィンドウに対してスタックの最も上に配置され る。 .\"0 Any part of the window that extends outside its parent window is clipped. 親ウィンドウの外にはみ出る部分は全てクリップされる。 .\"0 The border_width for an .\"0 .ZN InputOnly .\"0 window must be zero, or a .\"0 .ZN BadMatch .\"0 error results. .ZN InputOnly のウィンドウの border_width は 0 でなければならない。そうでない場合に は、エラー .ZN BadMatch となる。 .\"0 .ZN XCreateSimpleWindow .\"0 inherits its depth, class, and visual from its parent. .ZN XCreateSimpleWindow は親ウィンドウより深さ、クラス、ビジュアルを継承する。 .\"0 All other window attributes, except background and border, .\"0 have their default values. これ以外のウィンドウ属性は、背景色を除いて全てデフォルト値になる。 .LP .\"0 .ZN XCreateSimpleWindow .\"0 can generate .\"0 .ZN BadAlloc , .\"0 .ZN BadMatch , .\"0 .ZN BadValue , .\"0 and .\"0 .ZN BadWindow .\"0 errors. .ZN XCreateSimpleWindow はエラー .ZN BadAlloc , .ZN BadMatch , .ZN BadValue , .ZN BadWindow を起こすことがある。 .SH 構造体 .\"0 The .\"0 .ZN XSetWindow Attributes .\"0 structure contains: .ZN XSetWindowAttributes 構造体の内容を示す。 .LP .LP .TS lw(.5i) lw(2.5i) lw(.8i). T{ \&#define T} T{ .ZN CWBackPixmap T} T{ (1L<<0) T} T{ \&#define T} T{ .ZN CWBackPixel T} T{ (1L<<1) T} T{ \&#define T} T{ .ZN CWBorderPixmap T} T{ (1L<<2) T} T{ \&#define T} T{ .ZN CWBorderPixel T} T{ (1L<<3) T} T{ \&#define T} T{ .ZN CWBitGravity T} T{ (1L<<4) T} T{ \&#define T} T{ .ZN CWWinGravity T} T{ (1L<<5) T} T{ \&#define T} T{ .ZN CWBackingStore T} T{ (1L<<6) T} T{ \&#define T} T{ .ZN CWBackingPlanes T} T{ (1L<<7) T} T{ \&#define T} T{ .ZN CWBackingPixel T} T{ (1L<<8) T} T{ \&#define T} T{ .ZN CWOverrideRedirect T} T{ (1L<<9) T} T{ \&#define T} T{ .ZN CWSaveUnder T} T{ (1L<<10) T} T{ \&#define T} T{ .ZN CWEventMask T} T{ (1L<<11) T} T{ \&#define T} T{ .ZN CWDontPropagate T} T{ (1L<<12) T} T{ \&#define T} T{ .ZN CWColormap T} T{ (1L<<13) T} T{ \&#define T} T{ .ZN CWCursor T} T{ (1L<<14) T} .TE .IN "XSetWindowAttributes" "" "@DEF@" .Ds 0 .TA .5i 3i .ta .5i 3i 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; .De .LP .\"0 For a detailed explanation of the members of this structure, .\"0 see \fI\*(xL\fP\^. この構造体のメンバの詳しい説明については \fI\*(xL\fP\^ を参照すること。 .SH 返り値 .TP 1i .ZN BadAlloc .\"0 The server failed to allocate the requested resource or server memory. 要求されたリソースやサーバメモリの割り当てにサーバが失敗した。 .TP 1i .ZN BadColor .\"0 A value for a Colormap argument does not name a defined Colormap. 引き数 Colormap の値が、定義されている Colormap を指していない。 .TP 1i .ZN BadCursor .\"0 A value for a Cursor argument does not name a defined Cursor. 引き数 Cursor の値が、定義されている Cursor を指していない。 .TP 1i .ZN BadMatch .\"0 The values do not exist for an .\"0 .ZN InputOnly .\"0 window. .ZN InputOnly のウィンドウに対する値が存在しない。 .TP 1i .ZN BadMatch .\"0 Some argument or pair of arguments has the correct type and range but fails .\"0 to match in some other way required by the request. 引き数や引き数の組は正しい型・範囲を持っているが、そのリクエストが要求する 他の条件に適合できなかった。 .TP 1i .ZN BadPixmap .\"0 A value for a Pixmap argument does not name a defined Pixmap. 引き数 Pixmap の値が、定義されている Pixmap を指していない。 .TP 1i .ZN BadValue .\"0 Some numeric value falls outside the range of values accepted by the request. .\"0 Unless a specific range is specified for an argument, the full range defined .\"0 by the argument's type is accepted. Any argument defined as a set of .\"0 alternatives can generate this error. 指定された数値にリクエストの許容範囲を越えているものがある。引き数に対 して特定の範囲が指定されていなければ、引き数の型で定義されている全ての範 囲が許される。選択肢として定義されている引き数はこのエラーを起こすことが ある。 .TP 1i .ZN BadWindow .\"0 A value for a Window argument does not name a defined Window. 引き数 Window の値が、定義されている Window を指していない。 .SH 関連項目 XChangeWindowAttributes(3X11), XConfigureWindow(3X11), XDefineCursor(3X11), XDestroyWindow(3X11), XMapWindow(3X11), XRaiseWindow(3X11), XUnmapWindow(3X11) .br \fI\*(xL\fP