.\" 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 Tue Oct 27 00:00:00 JST 1998 .\" by FUJIWARA Teruyoshi .\" Updated Sat Sep 29 13:24:32 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/X11/XGrPntr.man,v 1.2 2001/01/27 18:20:00 dawes 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 .TH XGrabPointer 3X11 "Release 6.5" "X Version 11" "XLIB FUNCTIONS" .SH 名前 .\"0 XGrabPointer, XUngrabPointer, XChangeActivePointerGrab \- grab the pointer XGrabPointer, XUngrabPointer, XChangeActivePointerGrab \- ポインタをグラブする .SH 書式 int XGrabPointer\^(\^\fIdisplay\fP, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIevent_mask\fP\^, \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^, \fIconfine_to\fP\^, \fIcursor\fP\^, \fItime\fP\^) .br Display *\fIdisplay\fP\^; .br Window \fIgrab_window\fP\^; .br Bool \fIowner_events\fP\^; .br unsigned int \fIevent_mask\fP\^; .br int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; .br Window \fIconfine_to\fP\^; .br Cursor \fIcursor\fP\^; .br Time \fItime\fP\^; .LP XUngrabPointer\^(\^\fIdisplay\fP, \fItime\fP\^) .br Display *\fIdisplay\fP\^; .br Time \fItime\fP\^; .LP XChangeActivePointerGrab\^(\^\fIdisplay\fP, \fIevent_mask\fP\^, \fIcursor\fP\^, \fItime\fP\^) .br Display *\fIdisplay\fP\^; .br unsigned int \fIevent_mask\fP\^; .br Cursor \fIcursor\fP\^; .br Time \fItime\fP\^; .SH 引き数 .IP \fIconfine_to\fP 1i .\"0 Specifies the window to confine the pointer in or .\"0 .ZN None . ポインタを閉じ込めるウィンドウか .ZN None を指定する。 .IP \fIcursor\fP 1i .\"0 Specifies the cursor that is to be displayed during the grab or .\"0 .ZN None . グラブの間に表示されるカーソルか .ZN None を指定する。 .IP \fIdisplay\fP 1i .\"0 Specifies the connection to the X server. X サーバへの接続を指定する。 .IP \fIevent_mask\fP 1i .\"0 Specifies which pointer events are reported to the client. どのポインタイベントをクライアントに通知するか指定する。 .\"0 The mask is the bitwise inclusive OR of the valid pointer event mask bits. マスク値は正しいポインタイベントのマスクビット値のビットごとの論理和を 取ったものである。 .IP \fIgrab_window\fP 1i .\"0 Specifies the grab window. グラブウィンドウを指定する。 .IP \fIkeyboard_mode\fP 1i .\"0 Specifies further processing of keyboard events. キーボードイベントの後処理を指定する。 .\"0 You can pass .\"0 .ZN GrabModeSync .\"0 or .\"0 .ZN GrabModeAsync . .ZN GrabModeSync あるいは .ZN GrabModeAsync を指定できる。 .IP \fIowner_events\fP 1i .\"0 Specifies a Boolean value that indicates whether the pointer .\"0 events are to be reported as usual or reported with respect to the grab window .\"0 if selected by the event mask. イベントマスクで選択している場合に、ポインタイベントを通常通り通知するか、 グラブウィンドウについて通知するかを示す真偽値を指定する。 .IP \fIpointer_mode\fP 1i .\"0 Specifies further processing of pointer events. ポインタイベントの後処理を指定する。 .\"0 You can pass .\"0 .ZN GrabModeSync .\"0 or .\"0 .ZN GrabModeAsync . .ZN GrabModeSync あるいは .ZN GrabModeAsync を指定する。 .IP \fItime\fP 1i .\"0 Specifies the time. 時刻を指定する。 .\"0 You can pass either a timestamp or .\"0 .ZN CurrentTime . タイムスタンプか .ZN CurrentTime を指定できる。 .SH 説明 .\"0 The .\"0 .ZN XGrabPointer .\"0 function actively grabs control of the pointer and returns .\"0 .ZN GrabSuccess .\"0 if the grab was successful. 関数 .ZN XGrabPointer はポインタの制御をアクティブにグラブし、これに成功した場合に .ZN GrabSuccess を返す。 .\"0 Further pointer events are reported only to the grabbing client. 以降のポインタイベントはグラブを行ったクライアントに対してのみ報告され る。 .\"0 .ZN XGrabPointer .\"0 overrides any active pointer grab by this client. .ZN XGrabPointer はこのクライアントが行ったポインタのアクティブなグラブを全て無視する。 .\"0 If owner_events is .\"0 .ZN False , .\"0 all generated pointer events .\"0 are reported with respect to grab_window and are reported only if .\"0 selected by event_mask. owner_events が .ZN False ならば、生成された全てのポインタイベントは、イベントマスクによって選択 されている場合に限って grab_window について報告される。 .\"0 If owner_events is .\"0 .ZN True .\"0 and if a generated .\"0 pointer event would normally be reported to this client, .\"0 it is reported as usual. owner_events が .ZN True であり、ポインタイベントが通常はこのクライアントに報告されるはずならば、 このイベントは通常通り報告される。 .\"0 Otherwise, the event is reported with respect to the .\"0 grab_window and is reported only if selected by event_mask. そうでない場合は、このイベントはイベントマスクによって選択されている場 合に限って grab_window について報告される。 .\"0 For either value of owner_events, unreported events are discarded. owner_events のそれぞれの値について、報告されなかったイベントは破棄さ れる。 .LP .\"0 If the pointer_mode is .\"0 .ZN GrabModeAsync , .\"0 pointer event processing continues as usual. the pointer_mode が .ZN GrabModeAsync ならば、ポインタイベントの処理は通常通り継続される。 .\"0 If the pointer is currently frozen by this client, .\"0 the processing of events for the pointer is resumed. このクライアントがポインタを凍結している場合、ポインタに関する イベントの処理は再開される。 .\"0 If the pointer_mode is .\"0 .ZN GrabModeSync , .\"0 the state of the pointer, as seen by .\"0 client applications, .\"0 appears to freeze, and the X server generates no further pointer events .\"0 until the grabbing client calls .\"0 .ZN XAllowEvents .\"0 or until the pointer grab is released. pointer_mode が .ZN GrabModeSync ならば、ポインタの状態(クライアントアプリケーションが見る)は凍結されて いると考えられ、グラブを行っているクライアントが .ZN XAllowEvents を呼び出すか、ポインタのグラブが解放されるまでは X サーバはこれ以上の ポインタイベントを生成しない。 .\"0 Actual pointer changes are not lost while the pointer is frozen; .\"0 they are simply queued in the server for later processing. ポインタの実際の変化はポインタが凍結されている間も失われない。これらは 単にサーバのキューに入れられ、後で処理される。 .LP .\"0 If the keyboard_mode is .\"0 .ZN GrabModeAsync , .\"0 keyboard event processing is unaffected by activation of the grab. keyboard_mode が .ZN GrabModeAsync ならば、キーボードイベントの処理はグラブのアクティブ化による影響は受け ない。 .\"0 If the keyboard_mode is .\"0 .ZN GrabModeSync , .\"0 the state of the keyboard, as seen by .\"0 client applications, .\"0 appears to freeze, and the X server generates no further keyboard events .\"0 until the grabbing client calls .\"0 .ZN XAllowEvents .\"0 or until the pointer grab is released. keyboard_mode が .ZN GrabModeSync ならば、キーボードの状態(クライアントアプリケーションが見る)は凍結され ていると考えられ、グラブを行っているクライアントが .ZN XAllowEvents を呼び出すか、ポインタのグラブが解放されるまでは X サーバはこれ以上の キーボードイベントを生成しない。 .\"0 Actual keyboard changes are not lost while the pointer is frozen; .\"0 they are simply queued in the server for later processing. 実際のキーボードイベントの変化はポインタが凍結されている間も失われない。 これらは後で処理するために、単にサーバのキューに入れられるだけである。 .LP .\"0 If a cursor is specified, it is displayed regardless of what .\"0 window the pointer is in. cursor が指定された場合、このカーソルはポインタがどのウィンドウに入っ ていても表示される。 .\"0 If .\"0 .ZN None .\"0 is specified, .\"0 the normal cursor for that window is displayed .\"0 when the pointer is in grab_window or one of its subwindows; .ZN None が指定された場合は、ポインタが grab_window やそのサブウィンドウの1つに 入った時にそのウィンドウの通常のカーソルが表示される。 .\"0 otherwise, the cursor for grab_window is displayed. それ以外の場合には、grab_window のカーソルが表示される。 .LP .\"0 If a confine_to window is specified, .\"0 the pointer is restricted to stay contained in that window. confine_window が指定された場合は、ポインタはそのウィンドウ内に閉じ込 められる。 .\"0 The confine_to window need have no relationship to the grab_window. confine_to は grab_window と関係を持っている必要はない。 .\"0 If the pointer is not initially in the confine_to window, .\"0 it is warped automatically to the closest edge .\"0 just before the grab activates and enter/leave events are generated as usual. 最初の状態でポインタが confine_window に入っていない場合は、 グラブがアクティブ化される直前にポインタがこのウィンドウの最も近い辺へ と自動的に移動する。この時、enter/leave イベントは通常通りに生成される。 .\"0 If the confine_to window is subsequently reconfigured, .\"0 the pointer is warped automatically, as necessary, .\"0 to keep it contained in the window. その後に confine_to ウィンドウの構成が変えられた場合は、ポインタはこの ウィンドウに含まれたままになるように、必要に応じて自動的に移動する。 .LP .\"0 The time argument allows you to avoid certain circumstances that come up .\"0 if applications take a long time to respond or if there are long network .\"0 delays. 引き数 time を利用して、クライアントはアプリケーションが応答するまでに長 い間がかかる場合や、ネットワークの遅延が大きい場合に生じる不具合を避け ることができる。 .\"0 Consider a situation where you have two applications, both .\"0 of which normally grab the pointer when clicked on. 例として、2つのアプリケーションがあり、そのいずれもクリックされた時に ポインタのグラブを普通に行うという状況を考える。 .\"0 If both applications specify the timestamp from the event, .\"0 the second application may wake up faster and successfully grab the pointer .\"0 before the first application. どちらのアプリケーションもイベントから得たタイムスタンプを指定していれ ば、2番目のアプリケーションは最初のアプリケーションよりも速く立ち上が り、ポインタをうまくグラブできる。 .\"0 The first application then will get an indication that the other application .\"0 grabbed the pointer before its request was processed. 最初のアプリケーションは、自分のリクエストが処理される前に他の アプリケーションがポインタをグラブしたことを知らされる。 .LP .\"0 .ZN XGrabPointer .\"0 generates .\"0 .ZN EnterNotify .\"0 and .\"0 .ZN LeaveNotify .\"0 events. .ZN XGrabPointer は .ZN EnterNotify イベントと .ZN LeaveNotify を生成する。 .LP .\"0 Either if grab_window or confine_to window is not viewable .\"0 or if the confine_to window lies completely outside the boundaries of the root .\"0 window, .\"0 .ZN XGrabPointer .\"0 fails and returns .\"0 .ZN GrabNotViewable . grab_window ウィンドウか confine_to ウィンドウが表示不可能である場合か、 confine_to ウィンドウがルートウィンドウの境界から完全に外に出ている場 合には .ZN XGrabPointer は失敗し、 .ZN GrabNotViewable を返す。 .\"0 If the pointer is actively grabbed by some other client, .\"0 it fails and returns .\"0 .ZN AlreadyGrabbed . 他のクライアントがポインタをアクティブにグラブしている場合、この関数は 失敗し、 .ZN AlreadyGrabbed を返す。 .\"0 If the pointer is frozen by an active grab of another client, .\"0 it fails and returns .\"0 .ZN GrabFrozen . ポインタが他のクライアントのアクティブなグラブによって凍結されている場 合は、この関数は失敗して .ZN GrabFrozen を返す。 .\"0 If the specified time is earlier than the last-pointer-grab time or later .\"0 than the current X server time, it fails and returns .\"0 .ZN GrabInvalidTime . 指定した時間が最終ポインタグラブ時刻より早い場合や X サーバの現在時刻よ り遅い場合には、この関数は失敗して .ZN GrabInvalidTime を返す。 .\"0 Otherwise, the last-pointer-grab time is set to the specified time .\"0 .Pn ( CurrentTime .\"0 is replaced by the current X server time). これ以外の場合には、最終ポインタグラブ時刻には指定した時間がセットされる .Pn ( CurrentTime は X サーバの現在時刻に置き換えられる)。 .LP .\"0 .ZN XGrabPointer .\"0 can generate .\"0 .ZN BadCursor , .\"0 .ZN BadValue , .\"0 and .\"0 .ZN BadWindow .\"0 errors. .ZN XGrabPointer はエラー .ZN BadCursor , .ZN BadValue , .ZN BadWindow を起こすことがある。 .LP .\"0 The .\"0 .ZN XUngrabPointer .\"0 function releases the pointer and any queued events .\"0 if this client has actively grabbed the pointer from .\"0 .ZN XGrabPointer , .\"0 .ZN XGrabButton , .\"0 or from a normal button press. 関数 .ZN XUngrabPointer は、このクライアントが .ZN XGrabPointer , .ZN XGrabButton 関数の呼び出しや普通にボタンを押したことによってポインタをアクティブに グラブしている場合、ポインタとキューに入っているイベントを解放する。 .\"0 .ZN XUngrabPointer .\"0 does not release the pointer if the specified .\"0 time is earlier than the last-pointer-grab time or is later than the .\"0 current X server time. 指定した時刻が最終ポインタグラブ時刻より早い場合や、X サーバの現在時刻 よりも遅い場合には、 .ZN XUngrabPointer はポインタを解放しない。 .\"0 It also generates .\"0 .ZN EnterNotify .\"0 and .\"0 .ZN LeaveNotify .\"0 events. この関数は .ZN EnterNotify イベントと .ZN LeaveNotify イベントを生成する。 .\"0 The X server performs an .\"0 .ZN UngrabPointer .\"0 request automatically if the event window or confine_to window .\"0 for an active pointer grab becomes not viewable .\"0 or if window reconfiguration causes the confine_to window to lie completely .\"0 outside the boundaries of the root window. ポインタのアクティブなグラブに対応するイベントウィンドウや confine_to ウィンドウが表示不能になった場合や、ウィンドウの構成の変化によって confine_to ウィンドウがルートウィンドウの境界から完全に外に出てしまっ た場合には、X サーバは .ZN UngrabPointer リクエストを自動的に実行する。 .LP .\"0 The .\"0 .ZN XChangeActivePointerGrab .\"0 function changes the specified dynamic parameters if the pointer is actively .\"0 grabbed by the client and if the specified time is no earlier than the .\"0 last-pointer-grab time and no later than the current X server time. 関数 .ZN XChangeActivePointerGrab は、クライアントがポインタをアクティブにグラブしていて、指定した時刻が 最終ポインタグラブ時刻よりも早くなく、かつ X サーバの現在時刻よりも遅 くない場合に指定された動的パラメータを変更する。 .\"0 This function has no effect on the passive parameters of a .\"0 .ZN XGrabButton . この関数は .ZN XGrabButton のパッシブなパラメータに対しては無効である。 .\"0 The interpretation of event_mask and cursor is the same as described in .\"0 .ZN XGrabPointer . 引き数 event_mask と cursor の解釈は .ZN XGrabPointer の項目で説明した通りである。 .LP .\"0 .ZN XChangeActivePointerGrab .\"0 can generate a .\"0 .ZN BadCursor .\"0 and .\"0 .ZN BadValue .\"0 error. .ZN XChangeActivePointerGrab はエラー .ZN BadCursor , .ZN BadValue を起こすことがある。 .SH 返り値 .TP 1i .ZN BadCursor .\"0 A value for a Cursor argument does not name a defined Cursor. 引き数 Cursor の値が、定義されている Cursor を指していない。 .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 関連項目 XAllowEvents(3X11), XGrabButton(3X11), XGrabKey(3X11), XGrabKeyboard(3X11) .br \fI\*(xL\fP