FrontPage > C/C++ > X11 > XEvent

XEvent

Xlib.h内の構造体

typedef union _XEvent {
    inttype;/* イベント・タイプ */
    XAnyEventxany;/* イベント共通変数の構造体 */
    XKeyEventxkey;/* キーボード (KeyPress, KeyRelease) */
    XButtonEventxbutton;/* マウス (ButtonPress, ButtonRelease) */
    XMotionEventxmotion;/* マウス移動 (MotionNotify) */
    XCrossingEventxcrossing;/* マウス・フォーカス (EnterNotify,LeaveNotify) */
    XFocusChangeEventxfocus;/* キーボード・フォーカス (FocusIn, FocusOut) */
    XExposeEventxexpose;/* グラフィック再描画 (Expose) */
    XGraphicsExposeEventxgraphicsexpose;/* グラフィック[ソースコピー領域利用NG] (GraphicsExpose) */
    XNoExposeEventxnoexpose;/* グラフィック[ソースコピー領域利用OK] (NoExpose) */
    XVisibilityEventxvisibility;/* Window可視/不可視状態変更 (VisibilityNotify) */
    XCreateWindowEventxcreatewindow;/* Window生成 (CreateNotify) */
    XDestroyWindowEventxdestroywindow;/* Window破棄 (DestroyNotify) */
    XUnmapEventxunmap;/* Windowアンマップ (UnmapNotify) */
    XMapEventxmap;/* Windowマップ (MapNotify) */
    XMapRequestEventxmaprequest;/* Windowマップ要求 (MapRequest) */
    XReparentEventxreparent;/* 親Window変更 (ReparentNotify) */
    XConfigureEventxconfigure;/* Window構成変更 (ConfigureNotify) */
    XGravityEventxgravity;/* (GravityNotify) */
    XResizeRequestEventxresizerequest;/* Windowサイズ変更要求 (ResizeRequest) */
    XConfigureRequestEventxconfigurerequest;/* Window構成変更要求 (ConfigureRequest) */
    XCirculateEventxcirculate;/* Windowスタック変更 (CirculateNotify) */
    XCirculateRequestEventxcirculaterequest;/* Windowスタック変更要求 (CirculateRequest) */
    XPropertyEventxproperty;/* Windowプロパティ変更 (PropertyNotify) */
    XSelectionClearEventxselectionclear;/* (SelectionClear) */
    XSelectionRequestEventxselectionrequest;/* (SelectionRequest) */
    XSelectionEventxselection;/* (SelectionNotify) */
    XColormapEventxcolormap;/* カラーマップ変更 (ColormapNotify) */
    XClientMessageEventxclient;/* (ClientMessage) */
    XMappingEventxmapping;/* XSendEventイベント受信 (MappingNotify) */
    XErrorEventxerror;
    XKeymapEventxkeymap;/* キーボード・マップ変更(KeymapNotify) */
    longpad[24];
} XEvent;


Event Mask (event_mask)の種類

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

Event Types (event->type)

KeyPress(2)キーボードのキーの押下。
KeyRelease(3)キーボードのキーの解放。
ButtonPress(4)マウス・ボタンの押下。
ButtonRelease(5)マウス・ボタンの解放。
MotionNotify(6)マウスが移動した。
EnterNotify(7)マウス・ポインタがWindow内に入った。
LeaveNotify(8)マウス・ポインタがWindow外に出た。
FocusIn(9)キーボード・フォーカスを得た。
FocusOut(10)キーボード・フォーカスを失った。
KeymapNotify(11)キーボードの全状態を検知した。
Expose(12)Window面が露出した。
GraphicsExpose(13)コピー時コピーソースが利用出来なかった。
NoExpose(14)コピー時コピーソースが利用出来た。
VisibilityNotify(15)Windowの可視/不可視状態が変わった。
CreateNotify(16)Windowが生成された。
DestroyNotify(17)Windowが破棄された。
UnmapNotify(18)Windowがアンマップ(Unmap)された。
MapNotify(19)Windowがマップ(Map)された。
MapRequest(20)Windowのマップ要求があった。
ReparentNotify(21)親Windowが別のWindowになった。
ConfigureNotify(22)Window構成が変わった。
ConfigureRequest(23)Window構成の変更要求があった。
GravityNotify(24)親Windowのサイズ変更等により移動した。
ResizeRequest(25)Windowのサイズの変更要求があった。
CirculateNotify(26)Windowのスタックが回った。
CirculateRequest(27)Windowのスタックが回転要求があった。
PropertyNotify(28)Windowのプロパティが変わった。
SelectionClear(29)セレクションの所有権を失った。
SelectionRequest(30)セレクションの変換要求があった。
SelectionNotify(31)セレクションの変換が完了した。
ColormapNotify(32)カラーマップが変わった。
ClientMessage(33)XSendEvent関数からイベントを受け取った。
MappingNotify(34)キーボードのマップ状態が変わった。
LASTEvent(35)(最終イベント)

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2008-12-15 (月) 20:03:02