FrontPage > C/C++ > X Toolkit > XtAddEventHandler
WidgetにWindowのイベント・コールバックを設定
void XtAddEventHandler (Widget w, EventMask event_mask, Boolean nonmaskable, XtEventHandler proc, XtPointer client_data) ; w : コールバックを設定するWidget event_mask : マスクするイベント 複数記載時は、「ButtonPressMask | ButtonReleaseMask」の様に「|」を使用する。 nonmaskable : マスク出来ないイベント時に、呼び出すか削除するかを指定 (True, False) (マスク出来ないイベント : GraphicsExpose, NoExpose, SelectionClear, SelectionRequest, SelectionNotify, ClientMessage, MappingNotify ) proc : イベント発生時に呼び出す関数 client_data : クライアント・データ (コールバックに渡す任意データ)
NoEventMask No events wanted KeyPressMask キーボードのキーを押した。 KeyReleaseMask キーボードのキーを離した。 ButtonPressMask マウスのボタンを押した。 ButtonReleaseMask マウスのボタンを離した。 EnterWindowMask マウスがWindow内の入った。 LeaveWindowMask マウスがWindow外へ移動した。 PointerMotionMask マウスの移動した。 PointerMotionHintMask Pointer motion hints wanted Button1MotionMask マウスのボタン1を押しながらドラッグ。 Button2MotionMask マウスのボタン2を押しながらドラッグ。 Button3MotionMask マウスのボタン3を押しながらドラッグ。 Button4MotionMask マウスのボタン4を押しながらドラッグ。 Button5MotionMask マウスのボタン5を押しながらドラッグ。 ButtonMotionMask マウスのボタンを押しながらドラッグ。 KeymapStateMask Keyboard state wanted at window entry and focus in ExposureMask Windowの描画要求。 VisibilityChangeMask Windowの可視/不可視状態が変わった。 StructureNotifyMask Windowの状態が変化した。(Map, Unmap, Destroy含む) ResizeRedirectMask Windowのサイズ変化した。 SubstructureNotifyMask Substructure notification wanted SubstructureRedirectMask Redirect structure requests on children FocusChangeMask フォーカス状態が変わった。 PropertyChangeMask Windowのプロパティの状態が変わった。 ColormapChangeMask カラーマップが状態が変わった。 OwnerGrabButtonMask Automatic grabs should activate with owner_events set to True
X Japanese Documentation Projectより
XtAddEventHandler
Xlib - C Language X Interface Chapter 10: Events