.\" .\" $XFree86: xc/doc/man/Xi/XListDev.man,v 1.2 2001/01/27 18:20:21 dawes Exp $ .\" .\" .\" Copyright ([\d,\s]*) by Hewlett-Packard Company, Ardent Computer, .\" .\" Permission to use, copy, modify, distribute, and sell this documentation .\" for any purpose and without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" Ardent, and Hewlett-Packard make no representations about the .\" suitability for any purpose of the information in this document. It is .\" provided \`\`as is'' without express or implied warranty. .\" .\" $Xorg: XListDev.man,v 1.3 2000/08/17 19:41:56 cpqbld Exp $ .\" .\" 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 Sun Sep 30 21:54:10 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .ds xL Programming with Xlib .TH XListInputDevices 3X11 "Release 6.5" "X Version 11" "X FUNCTIONS" .SH 名前 .\"0 XListInputDevices, XFreeDeviceList \- list available input devices XListInputDevices, XFreeDeviceList \- 利用可能な入力デバイスの列挙 .SH 書式 XDeviceInfo *XListInputDevices\^(\^\fIdisplay\fP, \fIndevices_return\fP\^) .br Display *\fIdisplay\fP\^; .br int *\fIndevices_return\fP\^; .sp XFreeDeviceList\^(\^\fIlist\fP\^) .br XDeviceInfo *\fIlist\fP\^; .SH 引き数 .TP 12 .I display .\"0 Specifies the connection to the X server. X サーバへの接続を指定。 .TP 12 .I ndevices_return .\"0 Specifies a pointer to a variable where the number of available devices can .\"0 be returned. 利用可能なデバイスの数を返す領域へのポインタを指定。 .TP 12 .I list .\"0 Specifies the list of devices to free. The \fIXFreeDeviceList\fP function .\"0 frees the list of available extension input devices. 解放するデバイスの数を指定。 関数 \fIXFreeDeviceList\fP は、利用可能な拡張入力のデバイスのリストを 解放する。 .SH 説明 .\"0 The \fIXListInputDevices\fP .\"0 request lists the available extension input devices. This list includes the .\"0 X pointer and X keyboard, any other input devices that are currently accessible .\"0 through the X server, and any input devices that are not currently accessible .\"0 through the X server but could be accessed if requested. \fIXListInputDevices\fP リクエストは、利用可能な拡張デバイスのリストを返す。このリストには、現 在X サーバを通じて利用可能な X のポインタ、X のキーボード、その他の入 力デバイスが含まれる。さらにこのリストには、現在は利用可能でないが要求 すれば X サーバを通じてアクセスすることができる入力デバイスも含まれる。 .LP .\"0 Some server implementations may make all input devices available at the time .\"0 the server is initialized. Others may wait until requested by a client to .\"0 access an input device. In the latter case, it is possible that an input .\"0 device will be listed as available at one time but not at another. サーバの実装によっては、サーバを初期化したときに全ての入力デバイスを利 用可能にするものがあるかもしれない。あるいは、クライアントが入力デバイ スへのアクセスを要求するときまで待つものもあるかもしれない。後者の場合 には、ある時には入力デバイスは利用可能としてリストされ、別の時にはリス トされないこともある。 .LP .\"0 For each input device available to the server, the XListInputDevices .\"0 request returns an XDeviceInfo structure. That structure contains a .\"0 pointer to a list of structures, each of which contains information about .\"0 one class of input supported by the device. サーバが利用可能な各入力デバイスについて、XListInputDevices リクエスト は XDeviceInfo 構造体を返す。この構造体は構造体のリストへのポインタを 含んでおり、リストの各要素はデバイスがサポートしている入力のクラス1つ に関する情報を持っている。 .\"0 The XDeviceInfo structure is defined as follows: XDeviceInfo 構造体は以下のように定義されている。 .DS .nf typedef struct _XDeviceInfo { XID id; Atom type; char *name; int num_classes; int use; XAnyClassPtr inputclassinfo; } XDeviceInfo; .fi .DE .LP .\"0 The id is a number in the range 0-128 that uniquely identifies .\"0 the device. It is assigned to the device when it is initialized by the server. id メンバは 0-128 の範囲の数字で、デバイスを一意に特定する。この数字は サーバが初期化を行ったときに割り当てられる。 .LP .\"0 The type field is of type Atom and indicates the nature .\"0 of the device. type フィールドは Atom 型であり、デバイスの性質を示す。 .LP .\"0 The name field contains a pointer to a null-terminated .\"0 string that corresponds to one of the defined device .\"0 types. The name will correspond to one of the following .\"0 strings (defined in the header file \fIXI.h\fP: name フィールドは、定義されているデバイスのタイプの1つに対応する、 NULL で終る文字列へのポインタを持つ。この名前は以下に示す文字列のいず れかである(ヘッダファイル \fIXI.h\fP で定義されている): .LP .DS XI_MOUSE XI_TABLET XI_KEYBOARD XI_TOUCHSCREEN XI_TOUCHPAD XI_BUTTONBOX XI_BARCODE XI_TRACKBALL XI_QUADRATURE XI_ID_MODULE XI_ONE_KNOB XI_NINE_KNOB XI_KNOB_BOX XI_SPACEBALL XI_DATAGLOVE XI_EYETRACKER XI_CURSORKEYS XI_FOOTMOUSE .DE .LP .\"0 These names may be directly compared with the name field of the .\"0 XDeviceInfo structure, or used in an XInternAtom request to return .\"0 an atom that can be compared with the type field of the XDeviceInfo .\"0 structure. これらの名前は XDeviceInfo 構造体の name フィールドと直接比較すること ができ、また、XDeviceInfo 構造体の type フィールドと比較することができ るアトムを取得するために XInternAtom リクエストで使うことができる。 .LP .\"0 The num_classes field is a number in the .\"0 range 0-255 that specifies the number of input classes .\"0 supported by the device for which information is .\"0 returned by ListInputDevices. Some input classes, such .\"0 as class Focus and class Proximity do not have any .\"0 information to be returned by ListInputDevices. num_classes フィールドは 0-255 の範囲の値であり、ListInputDevices が返 す情報について、デバイスがサポートしている入力クラスの数を示す。入力ク ラスによっては、ListInputDevices が情報を全く返さないものもある(Focus クラスや Proximiti クラスなど)。 .LP .\"0 The use field specifies how the device is currently .\"0 being used. If the value is \fIIsXKeyboard\fP, the device is .\"0 currently being used as the X keyboard. If the value .\"0 is \fIIsXPointer\fP, the device is currently being used as .\"0 the X pointer. If the value is \fIIsXExtensionDevice\fP, the .\"0 device is available for use as an extension device. use フィールドはデバイスが現在どのように使用されているかを示す。この値 が \fIIsXKeyboard\fP ならば、現在このデバイスは X のキーボードとして使 われている。値が \fIIsXPointer\fP ならば、このデバイスは現在 X のポイ ンタとして使われている。また、値が \fIIsXExtensionDevice\fP ならば、こ のデバイスは拡張デバイスとして使用することができる。 .LP .\"0 The inputclassinfo field contains a pointer to the first input-class .\"0 specific data. The first two fields are common to all .\"0 classes. inputclassinfo フィールドは、入力クラスに依存する最初のデータへのポイ ンタを持っている。この最初の2つのフィールドは全てのクラスで共通である。 .LP .\"0 The class field is a number in the range 0-255. .\"0 It uniquely identifies the class of input for which .\"0 information is returned. Currently defined classes .\"0 are KeyClass, ButtonClass, and ValuatorClass. class フィールドは 0-255 の範囲の数である。この数は情報が返される入力 のクラスを一意に区別する。現在定義されているクラスは、KeyClass, ButtonClass, ValuatorClass である。 .LP .\"0 The length field is a number in the range 0- 255. .\"0 It specifies the number of bytes of data that are .\"0 contained in this input class. The length includes the .\"0 class and length fields. length フィールドは 0-255 の範囲の数である。この数は、この入力クラスに 含まれているデータのバイト数を示す。この長さは class フィールドと length フィールドを含んでいる。 .LP .\"0 The XKeyInfo structure describes the characteristics of the keys on the .\"0 device. It is defined as follows: XKeyInfo 構造体は、デバイス上のキーの特性を記述する。これは以下のよう に定義されている: .LP .DS .nf typedef struct _XKeyInfo { XID class; int length; unsigned short min_keycode; unsigned short max_keycode; unsigned short num_keys; } XKeyInfo; .fi .DE .LP .\"0 min_keycode is of type KEYCODE. It specifies the .\"0 minimum keycode that the device will report. The .\"0 minimum keycode will not be smaller than 8. min_keycode は KEYCODE 型である。これはデバイスが通知する最小のキーコー ドを指定する。最小のキーコードは8未満にはならない。 .LP .\"0 max_keycode is of type KEYCODE. It specifies the .\"0 maximum keycode that the device will report. The .\"0 maximum keycode will not be larger than 255. min_keycode は KEYCODE 型である。これはデバイスが通知する最大のキーコー ドを指定する。最大のキーコードは255より大きくはならない。 .LP .\"0 num_keys specifies the number of keys that the device has. num_keys はデバイスが持っているキーの数を示す。 .LP .\"0 The XButtonInfo structure defines the characteristics of the buttons .\"0 on the device. It is defined as follows: XButtonInfo 構造体は、デバイス上のボタンの特性を定義する。これは以下の ように定義されている: .LP .DS .nf typedef struct _XButtonInfo { XID class; int length; short num_buttons; } XButtonInfo; .fi .DE .LP .\"0 num_buttons specifies the number of buttons that the device has. num_bottons はデバイスが持っているボタンの数を示す。 .LP .\"0 The XValuatorInfo structure defines the characteristics of the valuators .\"0 on the device. It is defined as follows: XValuatorInfo 構造体は、デバイス上のバリュエータの特性を定義する。これ は以下のように定義されている: .LP .DE .nf typedef struct _XValuatorInfo { XID class; int length; unsigned char num_axes; unsigned char mode; unsigned long motion_buffer; XAxisInfoPtr axes; } XValuatorInfo; .fi .DS .LP .\"0 num_axes contains the number of axes the device supports. num_axes はデバイスがサポートしている軸の数を示す。 .LP .\"0 mode is a constant that has one of the following .\"0 values: Absolute or Relative. Some devices allow the .\"0 mode to be changed dynamically via the SetDeviceMode .\"0 request. mode は定数であり、Absolute と Relative のいずれかである。デバイスによっ ては、SetDeviceMode リクエストによって mode を動的に変えることができる。 .LP .\"0 motion_buffer_size is a cardinal number that specifies .\"0 the number of elements that can be contained in the .\"0 motion history buffer for the device. motion_buffer_size はデバイスの動作履歴バッファが持つことができる要素 数を示す基数である。 .LP .\"0 The axes field contains a pointer to an XAxisInfo structure. axis フィールドは XAxisInfo 構造体へのポインタを持つ。 .LP .\"0 The XAxisInfo structure is defined as follows: XAxisInfo 構造体は以下のように定義されている: .LP .DS .nf typedef struct _XAxisInfo { int resolution; int min_value; int max_value; } XAxisInfo; .fi .DE .LP .\"0 The resolution contains a number in counts/meter. 解像度は、カウント数/メートルの値を持つ。 .LP .\"0 The min_val field contains a number that specifies .\"0 the minimum value the device reports for this axis. min_value フィールドは、この軸に対してデバイスが通知する最小値を示す。 .\"0 For devices whose mode is Relative, the min_val field .\"0 will contain 0. モードが Relative であるデバイスに対しては、min_value フィールドは 0 となる。 .LP .\"0 The max_val field contains a number that specifies .\"0 the maximum value the device reports for this axis. max_value フィールドは、この軸に対してデバイスが通知する最大値を示す。 .\"0 For devices whose mode is Relative, the max_val field .\"0 will contain 0. モードが Relative であるデバイスに対しては、max_value フィールドは 0 となる。 .LP .\"0 To free the \fIXDeviceInfo\fP array created by \fIXListInputDevices\fP, .\"0 use \fIXFreeDeviceList\fP. \fIXListInputDevices\fP によって生成された \fIXDeviceInfo\fP の配列を 解放するには、\fIXFreeDeviceList\fP を使用すること。 .SH 返り値 .\"0 none. 無し。 .SH 関連項目 .br \fI\*(xL\fP