







                         CChhaapptteerr 1100

                           EEvveennttss



饤ȡץꥱϡ _X_O_p_e_n_D_i_s_p_l_a_y ؿǳΩ
륳̤ͥXС̿롣饤ȡ
ץꥱϡΥͥ X С˥ꥯ
Ȥ롣ΥꥯȤϡ饤ȡץꥱ
˸ƤФ Xlib ؿˤäƺ롣¿ Xlib ؿ
ϡX С˥٥Ȥȯ롢ˡ桼Υ
ԥ󥰤ݥ󥿡ΰưϡƱ˥٥Ȥȯ뤳
Ǥ롣 X СϡƱͥǥ٥Ȥ򥯥饤
Ȥ֤

ξϤϡ٥Ȥ˴طʲ:

+o    Event types

+o    Event structures

+o    Event masks

+o    Event processing

٥Ȥ갷εǽϡξϤǰ롣

00..11..  EEvveenntt TTyyppeess

٥ȤϡǥХưη̤Ȥơ뤤 Xlib ؿ
ˤä줿ꥯȤη̤Ȥ X Сˤä
Ʊȯ줿륯饤ȡץꥱ
󤬤Υ٥ȷ(type)Ȥޤǡ뤤
ȤޤǡǥХ˴Ϣ륤٥ȤϡΥ
̳إɥ롣̤ˡ饤Ȥ
Ū˥ɥΥ٥ȥޥ°ꤹ뤳Ȥˤ
ơΤˤΥ٥ȷ(type)Τ׵ᤷ
˸¤ꡢX Сϥ饤ȡץꥱ˥٥
롣ޤޥϡʤɥФȤ
뤤ϥɥΥ٥ȥޥѹ뤳Ȥˤä
롣ޤʤϡɥ°Ťʤ٥Ȥ
ꤹޥ뤳Ȥˤäƾ̳إɥ
ϤΥ٥Ȥ򱣤ȤǤ롣ʤ顢 _M_a_p_p_i_n_g_-
_N_o_t_i_f_y ٥Ȥϡˤ٤ƤΥ饤Ȥ롣

٥ȷ(type)ϡX Сˤäȯ줿Υ
٥ȤˤĤƽҤ٤롣б̾ϥ٥ȷ(type)򻲾
˻Ȥ <_X_1_1_/_X_._h> ˤ롣ʲΥơ
ϡ٥ȡƥ꡼Ӥ˴Ϣ륤٥
(type)󤹤롣Υ٥Ȥ˴طϡ
 10.5 ǵ롣









                             -2-


-------------------------------------------------------------
EEvveenntt CCaatteeggoorryy           EEvveenntt TTyyppee
-------------------------------------------------------------
Keyboard events          _K_e_y_P_r_e_s_s, _K_e_y_R_e_l_e_a_s_e
Pointer events           _B_u_t_t_o_n_P_r_e_s_s, _B_u_t_t_o_n_R_e_l_e_a_s_e, _M_o_t_i_o_n_-
                         _N_o_t_i_f_y
Window crossing events   _E_n_t_e_r_N_o_t_i_f_y, _L_e_a_v_e_N_o_t_i_f_y
Input focus events       _F_o_c_u_s_I_n, _F_o_c_u_s_O_u_t
Keymap state notifica-   _K_e_y_m_a_p_N_o_t_i_f_y
tion event
Exposure events          _E_x_p_o_s_e, _G_r_a_p_h_i_c_s_E_x_p_o_s_e, _N_o_E_x_p_o_s_e
Structure control        _C_i_r_c_u_l_a_t_e_R_e_q_u_e_s_t, _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t,
events                   _M_a_p_R_e_q_u_e_s_t, _R_e_s_i_z_e_R_e_q_u_e_s_t
Window state notifica-   _C_i_r_c_u_l_a_t_e_N_o_t_i_f_y, _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y,
tion events              _C_r_e_a_t_e_N_o_t_i_f_y, _D_e_s_t_r_o_y_N_o_t_i_f_y,
                         _G_r_a_v_i_t_y_N_o_t_i_f_y, _M_a_p_N_o_t_i_f_y,
                         _M_a_p_p_i_n_g_N_o_t_i_f_y, _R_e_p_a_r_e_n_t_N_o_t_i_f_y,
                         _U_n_m_a_p_N_o_t_i_f_y,
                         _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y
Colormap state notifi-   _C_o_l_o_r_m_a_p_N_o_t_i_f_y
cation event
Client communication     _C_l_i_e_n_t_M_e_s_s_a_g_e, _P_r_o_p_e_r_t_y_N_o_t_i_f_y,
events                   _S_e_l_e_c_t_i_o_n_C_l_e_a_r, _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y,
                         _S_e_l_e_c_t_i_o_n_R_e_q_u_e_s_t
-------------------------------------------------------------


00..22..  EEvveenntt SSttrruuccttuurreess

줾Υ٥ȷ(type)ˤơб빽¤Τ
<_X_1_1_/_X_l_i_b_._h> 롣٤ƤΥ٥ȹ¤Τϰʲζ
̤ΥС:

__
||
typedef struct {
     int type;
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
} XAnyEvent;

||__

type Сϡդˤ̤륤٥ȷ(type)̾
ꤵ롥㤨СXС _G_r_a_p_h_i_c_s_E_x_p_o_s_e ٥Ȥ
饤ȡץꥱΤȤˡϡ
_G_r_a_p_h_i_c_s_E_x_p_o_s_e  type Сꤵ줿 _X_G_r_a_p_h_i_c_s_E_x_-
_p_o_s_e_E_v_e_n_t ¤Τ롥 display Сϡ٥Ȥɤ
줿ǥץ쥤ؤΥݥ󥿡(pointer)ꤵ롣
send_event Сϡ٥Ȥ _S_e_n_d_E_v_e_n_t ץȥꥯ
Ȥˤä줿ʪʤ _T_r_u_e ꤵ롣 serial 
ϥץȥΤ줿ꥢֹꤵ롣









                             -3-


Ǿ16ӥåȤ鴰32ӥåȤͤ˳ĥ롣
window Сϡġ륭åȡǥѥå㡼ˤȤäƺ
Ωĥɥꤵ롥

X Сϡϥȥ꡼ǤĤǤ⥤٥Ȥ뤳Ȥ
롥 Xlib ϥ٥ȡ塼Ǳ(reply)ԤäƤ֤
äɤʥ٥ȤǻȤ¸롥 XlibϤ
ʤ٥ȡ塼Υ٥ȤĴ٤뤳Ȥǽˤ
뵡ǽ󶡤(11.3򸫤)

줾Υ٥ȷ(type)ΤƤġι¤
˲äơ _X_E_v_e_n_t ¤ΤϤ줾Υ٥ȷ(type)Τ
Ƥġι¤ΤζΤǤ롣(type)˱ơ
ʤϡ _X_E_v_e_n_t ΤȤäƤ줾Υ٥ȤΥС
˥٤
















































                             -4-

__
||
typedef union _XEvent {
     int type;                /* must not be changed */
     XAnyEvent xany;
     XKeyEvent xkey;
     XButtonEvent xbutton;
     XMotionEvent xmotion;
     XCrossingEvent xcrossing;
     XFocusChangeEvent xfocus;
     XExposeEvent xexpose;
     XGraphicsExposeEvent xgraphicsexpose;
     XNoExposeEvent xnoexpose;
     XVisibilityEvent xvisibility;
     XCreateWindowEvent xcreatewindow;
     XDestroyWindowEvent xdestroywindow;
     XUnmapEvent xunmap;
     XMapEvent xmap;
     XMapRequestEvent xmaprequest;
     XReparentEvent xreparent;
     XConfigureEvent xconfigure;
     XGravityEvent xgravity;
     XResizeRequestEvent xresizerequest;
     XConfigureRequestEvent xconfigurerequest;
     XCirculateEvent xcirculate;
     XCirculateRequestEvent xcirculaterequest;
     XPropertyEvent xproperty;
     XSelectionClearEvent xselectionclear;
     XSelectionRequestEvent xselectionrequest;
     XSelectionEvent xselection;
     XColormapEvent xcolormap;
     XClientMessageEvent xclient;
     XMappingEvent xmapping;
     XErrorEvent xerror;
     XKeymapEvent xkeymap;
     long pad[24];
} XEvent;

||__

_X_E_v_e_n_t ¤ΤκǽΥȥ꡼ϡɬ type Сʥ
٥ȷ(type)ꤵˡ2ΥСϡɬ٥
Ȥȯץȥ׵Υꥢֹ3ΥС
ϡɬsend_event ʰۤʤ륯饤Ȥˤä줿
٥Ȥ򼨤 _B_o_o_l ͤˡ4ΥСϡĤ dis-
play (Υ٥Ȥɤޤ줿ǥץ쥤򼨤) keymap
٥Ȥơ5ΥСϡĤ window (ġ
åȡǥѥå㡼ˤȤäΩĤդ֤Ф
) toolkits Ȥ򤱤뤿ˡκǽ 5 
Υȥ꡼νϡѤʤˤۤȤɤΥ٥
ϡtime Сޤ(ǥ٥Ȥä֤Ǥ
)äơѤΥ٥ȤؤΥݥ󥿡Ϲ¤Τ¾
줫ξ˥˥㥹ȤʤƤϤʤʤ











                             -5-


00..33..  EEvveenntt MMaasskkss

饤Ȥϥɥ˴طۤȤɤΥ٥ȤΥ٥
Τ֡򤹤ˤϡ٥ȥޥɬפȤ
Xlib ٥Ƚؿ˥٥ȥޥϤ٥ȡޥ
ΥӥåȤ <_X_1_1_/_X_._h> 롥٥ȥޥΤ줾
ΥӥåȤϡʤ X С饤ȥץꥱ
֤˾٥Ȥ򵭽Ҥ륤٥ȥޥ̾
롣

ȾΥ٥Ȥϥ饤ȤŪ׵ᤷʤ¤ꤽ餬
ȯΤʤ饤Ȥ GC  graphics-
exposures  _F_a_l_s_e ꤹ뤳Ȥʤ¤ _G_r_a_p_h_i_c_-
_s_E_x_p_o_s_e  _N_o_E_x_p_o_s_e ϡ _X_C_o_p_y_P_l_a_n_e  _X_C_o_p_y_A_r_e_a η̤Ȥ
ƥǥեȤΤ롣 _S_e_l_e_c_t_i_o_n_C_l_e_a_r
_S_e_l_e_c_t_i_o_n_R_e_q_u_e_s_t _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y _C_l_i_e_n_t_M_e_s_s_a_g_e 
ޥ뤳ȤǤʤ쥯˴Ϣ륤٥Ȥϥ
쥯˶ϤƤ륯饤ȤˤΤ(see sec-
tion 4.5)ܡɡ뤤ϥݥ󥿡ޥåԥ󥰤Ѥ
Ȥˡ _M_a_p_p_i_n_g_N_o_t_i_f_y ɬ饤Ȥ
롥

ʲΥơ֥ϡʤ٥ȥޥȤϤȤ
륤٥ȥޥȤʤΥ٥ȥޥꤷ
ʤ󤹤:


-----------------------------------------------------------
EEvveenntt MMaasskk             CCiirrccuummssttaanncceess
-----------------------------------------------------------
_N_o_E_v_e_n_t_M_a_s_k            No events wanted
_K_e_y_P_r_e_s_s_M_a_s_k           Keyboard down events wanted
_K_e_y_R_e_l_e_a_s_e_M_a_s_k         Keyboard up events wanted
_B_u_t_t_o_n_P_r_e_s_s_M_a_s_k        Pointer button down events wanted
_B_u_t_t_o_n_R_e_l_e_a_s_e_M_a_s_k      Pointer button up events wanted
_E_n_t_e_r_W_i_n_d_o_w_M_a_s_k        Pointer window entry events wanted
_L_e_a_v_e_W_i_n_d_o_w_M_a_s_k        Pointer window leave events wanted
_P_o_i_n_t_e_r_M_o_t_i_o_n_M_a_s_k      Pointer motion events wanted
_P_o_i_n_t_e_r_M_o_t_i_o_n_H_i_n_t_-     Pointer motion hints wanted
_M_a_s_k
_B_u_t_t_o_n_1_M_o_t_i_o_n_M_a_s_k      Pointer motion while button 1 down
_B_u_t_t_o_n_2_M_o_t_i_o_n_M_a_s_k      Pointer motion while button 2 down
_B_u_t_t_o_n_3_M_o_t_i_o_n_M_a_s_k      Pointer motion while button 3 down
_B_u_t_t_o_n_4_M_o_t_i_o_n_M_a_s_k      Pointer motion while button 4 down
_B_u_t_t_o_n_5_M_o_t_i_o_n_M_a_s_k      Pointer motion while button 5 down
_B_u_t_t_o_n_M_o_t_i_o_n_M_a_s_k       Pointer motion while any button
                       down
_K_e_y_m_a_p_S_t_a_t_e_M_a_s_k        Keyboard state wanted at window
                       entry and focus in
_E_x_p_o_s_u_r_e_M_a_s_k           Any exposure wanted
_V_i_s_i_b_i_l_i_t_y_C_h_a_n_g_e_M_a_s_k   Any change in visibility wanted
_S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k    Any change in window structure
                       wanted










                             -6-


-----------------------------------------------------------
EEvveenntt MMaasskk             CCiirrccuummssttaanncceess
-----------------------------------------------------------
_R_e_s_i_z_e_R_e_d_i_r_e_c_t_M_a_s_k     Redirect resize of this window
_S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_-    Substructure notification wanted
_M_a_s_k
_S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_-      Redirect structure requests on
_r_e_c_t_M_a_s_k               children
_F_o_c_u_s_C_h_a_n_g_e_M_a_s_k        Any change in input focus wanted
_P_r_o_p_e_r_t_y_C_h_a_n_g_e_M_a_s_k     Any change in property wanted
_C_o_l_o_r_m_a_p_C_h_a_n_g_e_M_a_s_k     Any change in colormap wanted
_O_w_n_e_r_G_r_a_b_B_u_t_t_o_n_M_a_s_k    Automatic grabs should activate
                       with owner_events set to _T_r_u_e
-----------------------------------------------------------



00..44..  EEvveenntt PPrroocceessssiinngg OOvveerrvviieeww

٥Ƚδ֤˥饤ȡץꥱ˥ݡȤ
륤٥Ȥϡʤɥ˥٥ȥޥ°Ȥ
󶡤(ʣ)٥ȥޥǤ롣ĤΥ٥
ޥǤϡ٥ȥޥȥ٥ȷ(type)11
бƤ롥㤨С⤷ʤ٥ȥޥ _B_u_t_t_o_n_-
_P_r_e_s_s_M_a_s_k ϤСXСϡ _B_u_t_t_o_n_P_r_e_s_s ٥ȤΤߤ
֤ۤȤɤΥ٥Ȥϡtime Сޤ(ǥ
٥Ȥä֤Ǥ)

¾ξǡĤΥ٥ȥޥʣΥ٥ȷ(type)
б롣㤨С⤷ʤ٥ȡޥ
_S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ϤСXСϡ _C_i_r_c_u_l_a_t_e_N_o_-
_t_i_f_y _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y _C_r_e_a_t_e_N_o_t_i_f_y _D_e_s_t_r_o_y_N_o_t_i_f_y _G_r_a_v_i_t_y_N_o_-
_t_i_f_y _M_a_p_N_o_t_i_f_y _R_e_p_a_r_e_n_t_N_o_t_i_f_y 뤤 _U_n_m_a_p_N_o_t_i_f_y ٥
֤ȤǤ롣

⤦ĤΥǡ2ĤΥ٥ȥޥ 1 ĤΥ٥
(type)б롥㤨С⤷ʤ٥ȥ
 _P_o_i_n_t_e_r_M_o_t_i_o_n_M_a_s_k ޤ _B_u_t_t_o_n_M_o_t_i_o_n_M_a_s_k (ΰ)
СXС _M_o_t_i_o_n_N_o_t_i_f_y ٥Ȥ֤

ʲΥơ֥ϡ٥ȥޥ˴Ϣ륤٥
(type)󤹤롤ơ¤̾ϡ٥ȷ(type)ȷ
դι¤ΤΤĤϡºݤˤϡ2ĤΥ٥
(type)δ֤ǶͭѤι¤Τ typedefs ա
ŬѤǤʤˤ N.A. 롣


------------------------------------------------------------------------------------------
EEvveenntt MMaasskk                  EEvveenntt TTyyppee         SSttrruuccttuurree                GGeenneerriicc SSttrruuccttuurree
------------------------------------------------------------------------------------------
ButtonMotionMask            MotionNotify       XPointerMovedEvent       XMotionEvent
Button1MotionMask
Button2MotionMask










                             -7-


------------------------------------------------------------------------------------------
EEvveenntt MMaasskk                  EEvveenntt TTyyppee         SSttrruuccttuurree                GGeenneerriicc SSttrruuccttuurree
------------------------------------------------------------------------------------------
Button3MotionMask
Button4MotionMask
Button5MotionMask
ButtonPressMask             ButtonPress        XButtonPressedEvent      XButtonEvent
ButtonReleaseMask           ButtonRelease      XButtonReleasedEvent     XButtonEvent
ColormapChangeMask          ColormapNotify     XColormapEvent
EnterWindowMask             EnterNotify        XEnterWindowEvent        XCrossingEvent
LeaveWindowMask             LeaveNotify        XLeaveWindowEvent        XCrossingEvent
ExposureMask                Expose             XExposeEvent
GCGraphicsExposures in GC   GraphicsExpose     XGraphicsExposeEvent
                            NoExpose           XNoExposeEvent
FocusChangeMask             FocusIn            XFocusInEvent            XFocusChangeEvent
                            FocusOut           XFocusOutEvent           XFocusChangeEvent
KeymapStateMask             KeymapNotify       XKeymapEvent
KeyPressMask                KeyPress           XKeyPressedEvent         XKeyEvent
KeyReleaseMask              KeyRelease         XKeyReleasedEvent        XKeyEvent
OwnerGrabButtonMask         N.A.               N.A.
PointerMotionMask           MotionNotify       XPointerMovedEvent       XMotionEvent
PointerMotionHintMask       N.A.               N.A.
PropertyChangeMask          PropertyNotify     XPropertyEvent
ResizeRedirectMask          ResizeRequest      XResizeRequestEvent
StructureNotifyMask         CirculateNotify    XCirculateEvent
                            ConfigureNotify    XConfigureEvent
                            DestroyNotify      XDestroyWindowEvent
                            GravityNotify      XGravityEvent
                            MapNotify          XMapEvent
                            ReparentNotify     XReparentEvent
                            UnmapNotify        XUnmapEvent
SubstructureNotifyMask      CirculateNotify    XCirculateEvent
                            ConfigureNotify    XConfigureEvent
                            CreateNotify       XCreateWindowEvent
                            DestroyNotify      XDestroyWindowEvent
                            GravityNotify      XGravityEvent
                            MapNotify          XMapEvent
                            ReparentNotify     XReparentEvent
                            UnmapNotify        XUnmapEvent
SubstructureRedirectMask    CirculateRequest   XCirculateRequestEvent
                            ConfigureRequest   XConfigureRequestEvent
                            MapRequest         XMapRequestEvent
N.A.                        ClientMessage      XClientMessageEvent
N.A.                        MappingNotify      XMappingEvent
N.A.                        SelectionClear     XSelectionClearEvent
N.A.                        SelectionNotify    XSelectionEvent
N.A.                        SelectionRequest   XSelectionRequestEvent
VisibilityChangeMask        VisibilityNotify   XVisibilityEvent
------------------------------------------------------------------------------------------


³Ϥʤۤʤ륤٥ȥޥ
ˤĤƽҤ٤롣ϽΥƥʬ
ä:









                             -8-


+o    Keyboard and pointer events

+o    Window crossing events

+o    Input focus events

+o    Keymap state notification events

+o    Exposure events

+o    Window state notification events

+o    Structure control events

+o    Colormap state notification events

+o    Client communication events

00..55..  KKeeyybbooaarrdd aanndd PPooiinntteerr EEvveennttss

This section discusses:

+o    Pointer button events

+o    Keyboard and pointer events

00..55..11..  PPooiinntteerr BBuuttttoonn EEvveennttss

Ǥϡݥ󥿡ܥץ쥹餫Υɥ w ؤ
ݥ󥿡դǽȤƤʤ륢ƥ֥
֤¹ǤϤʤˤ륤٥ȽˤĤƽҤ٤롣

X Сϡƥ֤ˤʤѥå֥֤õơ롼
β w ξ̳إɥ򸡺롥⤷ܥ˴Ϣ
ѥå֥֤ʤϡX СϼưŪ˥饤
Ȥ٥Ȥ뤿Υƥ֥֤ưƸ
ΥС֤˺ǽݥ󥿥ֻꤹ롣̤ϡ
Ū˥饤Ȥ _X_G_r_a_b_B_u_t_t_o_n ˰ʲΰϤȤ
:

------------------------------------------------------
AArrgguummeenntt          VVaalluuee
------------------------------------------------------
_w                 The event window
_e_v_e_n_t___m_a_s_k        The client's selected pointer
                  events on the event window
_p_o_i_n_t_e_r___m_o_d_e      _G_r_a_b_M_o_d_e_A_s_y_n_c
_k_e_y_b_o_a_r_d___m_o_d_e     _G_r_a_b_M_o_d_e_A_s_y_n_c
_o_w_n_e_r___e_v_e_n_t_s      _T_r_u_e, if the client has selected
                  _O_w_n_e_r_G_r_a_b_B_u_t_t_o_n_M_a_s_k on the event
                  window, otherwise _F_a_l_s_e
_c_o_n_f_i_n_e___t_o        _N_o_n_e











                             -9-


------------------------------------------------------
AArrgguummeenntt          VVaalluuee
------------------------------------------------------
_c_u_r_s_o_r            _N_o_n_e
------------------------------------------------------


ݥ󥿡Ūʾ֤٤ƤΥܥ󤬲줿ˡ
ƥ֤ʥ֤ϡưŪ˽λ롣饤Ȥ _X_U_n_-
_g_r_a_b_P_o_i_n_t_e_r  _X_C_h_a_n_g_e_A_c_t_i_v_e_P_o_i_n_t_e_r_G_r_a_b Ƥ֤Ȥ
äƥƥ֥֤ѹ뤳ȤǤ롥

00..55..22..  KKeeyybbooaarrdd aanndd PPooiinntteerr EEvveennttss

Υϡܡɡ٥ _K_e_y_P_r_e_s_s  _K_e_y_R_e_-
_l_e_a_s_e ƥݥ󥿡٥ _B_u_t_t_o_n_P_r_e_s_s
_B_u_t_t_o_n_R_e_l_e_a_s_e _M_o_t_i_o_n_N_o_t_i_f_y Τ˵
롥ܡɡ٥ȥϥɥ󥰥桼ƥƥˤĤ
ξϡ11Ϥ򸫤补

X СϡŪʾ֤ξ׵᤹륯饤
 _K_e_y_P_r_e_s_s  _K_e_y_R_e_l_e_a_s_e ٥ȤΤ롣Ρ:
Υ٥ȤϤ٤ƤΥΤȯ졢ˤ
ǥեӥåȤ˼Ƥ롣 X Сϡ
Ūʾ֤ξɬפȤ륯饤Ȥ _B_u_t_t_o_n_P_r_e_s_s 
_B_u_t_t_o_n_R_e_l_e_a_s_e Τ롣

X Сϡݥ󥿤ŪưȤ׵᤹륯
饤Ȥ _M_o_t_i_o_n_N_o_t_i_f_y Τ롣 X Сϥݥ
ư줵˥ɥǥݥ󥿤ưϤޤäƽ
ˤϤĤ⤳Υ٥Ȥ򵯤 _M_o_t_i_o_n_N_o_t_i_f_y ٥Ȥ
ϡݾڤʤ饤Ȥϥݥ󥿡ư
ƻߤޤкĤΥ٥ȷ(type)ݾڤ
롣

⤷ǥХ٥Ȥν뤵ʪŪѲ
ŪѲȤδ֤ˤ줬ޤ롣

_K_e_y_P_r_e_s_s _K_e_y_R_e_l_e_a_s_e _B_u_t_t_o_n_P_r_e_s_s _B_u_t_t_o_n_R_e_l_e_a_s_e ٥
ˤϥɥΥ٥ȥޥ°
_K_e_y_P_r_e_s_s_M_a_s_k _K_e_y_R_e_l_e_a_s_e_M_a_s_k _B_u_t_t_o_n_P_r_e_s_s_M_a_s_k _B_u_t_t_o_n_R_e_-
_l_e_a_s_e_M_a_s_k ӥåȤꤹ롣

_M_o_t_i_o_n_N_o_t_i_f_y ٥ȤˤϡɥΥ٥ȥ
°˼Υ٥ȥޥӥåȤΤİʾꤹ롣

+o    _B_u_t_t_o_n_1_M_o_t_i_o_n_M_a_s_k - _B_u_t_t_o_n_5_M_o_t_i_o_n_M_a_s_k

     饤ȥץꥱϻꤵ줿ܥΤ
     İʾ夬줿˸¤ _M_o_t_i_o_n_N_o_t_i_f_y ٥Ȥ
     롣

+o    _B_u_t_t_o_n_M_o_t_i_o_n_M_a_s_k










                            -10-


     饤ȥץꥱϺĤΥܥ󤬲
     ˸¤ _M_o_t_i_o_n_N_o_t_i_f_y ٥Ȥ롣

+o    _P_o_i_n_t_e_r_M_o_t_i_o_n_M_a_s_k

     饤ȡץꥱϥݥ󥿥ܥξ֤
     ؤ餺 _M_o_t_i_o_n_N_o_t_i_f_y ٥Ȥ롣

+o    _P_o_i_n_t_e_r_M_o_t_i_o_n_H_i_n_t_M_a_s_k

     ⤷ _P_o_i_n_t_e_r_M_o_t_i_o_n_H_i_n_t_M_a_s_k 嵭˥ޥΤ1İʾ
     ȰФС X Сϡޤϥܥʤ
     ˤξ֤Ѳ롢ݥ󥿡٥ȥɥ
     롢뤤ϥ饤Ȥ _X_Q_u_e_r_y_P_o_i_n_t_e_r ޤ
     _X_G_e_t_M_o_t_i_o_n_E_v_e_n_t_s ƤФʤ¤ꡢ٥ȥɥΤ
     ˥饤ȤˤĤΡ _X_P_o_i_n_t_e_r_M_o_v_e_d_E_v_e_n_t ¤
     Τ is_hint С _N_o_t_i_f_y_H_i_n_t ꤷ _M_o_t_i_o_n_-
     _N_o_t_i_f_y ٥ȤͳǤ롣˥С
     is_hint  _N_o_t_i_f_y_H_i_n_t ꤹʤ _M_o_t_i_o_n_N_o_t_i_f_y
     ٥Ȥ

٥Ȥȯϡݥ󥿡ɽǽ(viewable)ʥ
ɥ X Ф餽Υ٥ȤΤ뤿˻Ȥ
륦ɥϡɥγع¤ΤʤǤΤΥ
ΰ֤ȡ֤äƤ륦ɥ٥Ȥȯػߤ
Ƥ뤫ɤ˰¸Ʒޤ롣 X Фϡ饤Ȥ
饤٥Ȥܤ褦˻ꤵ줿ǽΥɥ򡢥
ȤȯΥɥ˥ɥγع¤򤵤
ܤäõ⤷֤ˤ륦ɥΰĤˡμΥ
Ȥȯػߤ do-not-propagate-mask ꤵƤ
硢μΥ٥Ȥ롣֤äƤ륦ɥ
ΰĤŤʤ٥Ȥꤹޥ٥
(type)ػߤ褦ꤵƤȡη
٥Ȥ롣饤Ȥϥƥ֥֤Ȥ
ˤäơƥܡɥ٥Ȥξˤϡե
ɥȤˤäƤ⡢ºݤΤ˻Ȥ륦ɥ
Ǥ롣

Υ٥ȷ(type)Τι¤Τϰʲޤ:
























                            -11-

__
||
typedef struct {
     int type;                /* ButtonPress or ButtonRelease */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* ``event'' window it is reported relative to */
     Window root;             /* root window that the event occurred on */
     Window subwindow;        /* child window */
     Time time;               /* milliseconds */
     int x, y;                /* pointer x, y coordinates in event window */
     int x_root, y_root;      /* coordinates relative to root */
     unsigned int state;      /* key or button mask */
     unsigned int button;     /* detail */
     Bool same_screen;        /* same screen flag */
} XButtonEvent;
typedef XButtonEvent XButtonPressedEvent;
typedef XButtonEvent XButtonReleasedEvent;



typedef struct {
     int type;                /* KeyPress or KeyRelease */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* ``event'' window it is reported relative to */
     Window root;             /* root window that the event occurred on */
     Window subwindow;        /* child window */
     Time time;               /* milliseconds */
     int x, y;                /* pointer x, y coordinates in event window */
     int x_root, y_root;      /* coordinates relative to root */
     unsigned int state;      /* key or button mask */
     unsigned int keycode;    /* detail */
     Bool same_screen;        /* same screen flag */
} XKeyEvent;
typedef XKeyEvent XKeyPressedEvent;
typedef XKeyEvent XKeyReleasedEvent;



typedef struct {
     int type;                /* MotionNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* ``event'' window reported relative to */
     Window root;             /* root window that the event occurred on */
     Window subwindow;        /* child window */
     Time time;               /* milliseconds */
     int x, y;                /* pointer x, y coordinates in event window */
     int x_root, y_root;      /* coordinates relative to root */
     unsigned int state;      /* key or button mask */
     char is_hint;            /* detail */









                            -12-


     Bool same_screen;        /* same screen flag */
} XMotionEvent;
typedef XMotionEvent XPointerMovedEvent;

||__

ι¤Τϡʲζ̤ΥС:
windowrootsubwindowtimexyx_rooty_rootstate
 same_screen window Сϡ٥Ȥȯ
줿ꤵơ٥ȥɥȤƻȤ롣
˹פ¤ꡢϥ٥ȤΤ뤿
 X СˤäƻȤ륦ɥ root С
ϡΥɥΥ롼ȥɥꤵ롣 x_root
С y_root Сϥ٥ȤΥ롼ȥ
θФݥ󥿡кɸꤵ롣

same_screen Сϥ٥ȥɥ롼ȥɥ
Ʊ꡼ˤ뤫ɤ򼨤ꤵ졢 _T_r_u_e 
뤤 _F_a_l_s_e ꤵ롣⤷ _T_r_u_e ʤС٥ȥ
ɥȥ롼ȥɥƱ꡼ˤ롣⤷ _F_a_l_s_e
ʤС٥ȥɥȥ롼ȥɥϰۤʤ륹꡼
ˤ롣

⤷٥ȯΥɥ٥ȥɥβ̳
Υɥʤ顢¤Τ subwindow Сϥ٥ȥ
ɥλҤǤ륤٥ȯΥɥ뤤ϥ٥
ɥλҤǤ륤٥ȯΥɥξ̳إ
ɥꤵ롣ǤʤȤϡXСϡsubwindow
С _N_o_n_e ꤹ롣 time Сϥ٥Ȥȯ
λ֤ꤵ졢ߥñ̤ɽ롣

⤷٥ȥɥ롼ȥɥƱ꡼
ˤʤС x  y Сϥ٥ȥɥθ
кɸꤵ롣ǤʤСΥС
zero ꤵ롣

state СϤΥ٥ȤľΥݥ󥿡ܥȽ
Ūʾ֤򼨤褦ꤵ졢ʲΥܥ󤢤뤤Ͻ
ޥΥӥå¤Ǥ: _B_u_t_t_o_n_1_M_a_s_k
_B_u_t_t_o_n_2_M_a_s_k _B_u_t_t_o_n_3_M_a_s_k _B_u_t_t_o_n_4_M_a_s_k _B_u_t_t_o_n_5_M_a_s_k
_S_h_i_f_t_M_a_s_k _L_o_c_k_M_a_s_k _C_o_n_t_r_o_l_M_a_s_k _M_o_d_1_M_a_s_k _M_o_d_2_M_a_s_k
_M_o_d_3_M_a_s_k _M_o_d_4_M_a_s_k _M_o_d_5_M_a_s_k

ι¤ΤΤĤϾܺ٤򼨤С롣 _X_K_e_y_-
_P_r_e_s_s_e_d_E_v_e_n_t  _X_K_e_y_R_e_l_e_a_s_e_d_E_v_e_n_t ǤϡΥС key-
code ȸƤФ롣ϥܡɤʪŪʥɽͤ
ꤵ롣 keycode ϡܡɤΤɤʥΤǤ
ɽ( 12.7  16.1 򸫤)

_X_B_u_t_t_o_n_P_r_e_s_s_e_d_E_v_e_n_t  _X_B_u_t_t_o_n_R_e_l_e_a_s_e_d_E_v_e_n_t ¤ΤǤϡ
С button ȸƤФ롣ϥݥ󥿡ܥξ
ɽ _B_u_t_t_o_n_1 _B_u_t_t_o_n_2 _B_u_t_t_o_n_3 _B_u_t_t_o_n_4뤤
_B_u_t_t_o_n_5 ͤȤʤ롣 _X_P_o_i_n_t_e_r_M_o_v_e_d_E_v_e_n_t ǤϡΥС
is_hint ȸƤФ롣ϡ _N_o_t_i_f_y_N_o_r_m_a_l 뤤









                            -13-


_N_o_t_i_f_y_H_i_n_t ꤵ롣

ΥǽҤ٤줿ܥ⤤ĤϽ줿
ġʲΤ褦:

-----------------------------------------------------------
SSyymmbbooll                 VVaalluuee
-----------------------------------------------------------
_B_u_t_t_o_n_1_M_o_t_i_o_n_M_a_s_k      (1L<<8)
_B_u_t_t_o_n_2_M_o_t_i_o_n_M_a_s_k      (1L<<9)
_B_u_t_t_o_n_3_M_o_t_i_o_n_M_a_s_k      (1L<<10)
_B_u_t_t_o_n_4_M_o_t_i_o_n_M_a_s_k      (1L<<11)
_B_u_t_t_o_n_5_M_o_t_i_o_n_M_a_s_k      (1L<<12)
_B_u_t_t_o_n_1_M_a_s_k            (1<<8)
_B_u_t_t_o_n_2_M_a_s_k            (1<<9)
_B_u_t_t_o_n_3_M_a_s_k            (1<<10)
_B_u_t_t_o_n_4_M_a_s_k            (1<<11)
_B_u_t_t_o_n_5_M_a_s_k            (1<<12)
_S_h_i_f_t_M_a_s_k              (1<<0)
_L_o_c_k_M_a_s_k               (1<<1)
_C_o_n_t_r_o_l_M_a_s_k            (1<<2)
_M_o_d_1_M_a_s_k               (1<<3)
_M_o_d_2_M_a_s_k               (1<<4)
_M_o_d_3_M_a_s_k               (1<<5)
_M_o_d_4_M_a_s_k               (1<<6)
_M_o_d_5_M_a_s_k               (1<<7)
_B_u_t_t_o_n_1                1
_B_u_t_t_o_n_2                2
_B_u_t_t_o_n_3                3
_B_u_t_t_o_n_4                4
_B_u_t_t_o_n_5                5
-----------------------------------------------------------


00..66..  WWiinnddooww EEnnttrryy//EExxiitt EEvveennttss

Υϥɥå󥰥٥ _E_n_t_e_r_N_o_t_i_f_y
 _L_e_a_v_e_N_o_t_i_f_y ˤĤƽҤ٤롣ݥ󥿤ΰư䥦ɥ
ع¤Ѳˤäơݥ󥿤Ȱ㤦ɥˤ
֤ˤʤä硢X Ф _E_n_t_e_r_N_o_t_i_f_y ޤ _L_e_a_f_N_o_t_i_f_y
Υ٥Ȥ򤳤Υ٥ȤȤ褦򤷤Ƥ (ʣ
)饤Ȥ롣ع¤Ѳˤäư
٤Ƥ _E_n_t_e_r_N_o_t_i_f_y  _L_e_a_v_e_N_o_t_i_f_y ٥ȤϤѲ
äƲ餫Υҥ륭٥ (_U_n_m_a_p_N_o_t_i_f_y
_M_a_p_N_o_t_i_f_y _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y _G_r_a_v_i_t_y_N_o_t_i_f_y
_C_i_r_c_u_l_a_t_e_N_o_t_i_f_y) ȯ; 
顢X ץȥ _E_n_t_e_r_N_o_t_i_f_y ٥Ȥ _L_e_a_v_e_N_o_t_i_f_y 
Ȥ˴ؤȯ줿 _F_o_c_u_s_O_u_t _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y
_E_x_p_o_s_e ٥Ȥν϶ʤ

 _M_o_t_i_o_n_N_o_t_i_f_y ٥ȤȤоŪ _M_o_t_i_o_n_N_o_t_i_f_y 
Ȥޤݥ󥿤ΰưˤäȯ뤬ݥ󥿤ΰư
ƱΥɥǻϤޤäƽäƤ˸¤롣










                            -14-


_E_n_t_e_r_N_o_t_i_f_y 뤤 _L_e_a_v_e_N_o_t_i_f_y ٥ȤϤ륯饤
ץꥱ _X_G_r_a_b_P_o_i_n_t_e_r  _X_U_n_g_r_a_b_P_o_i_n_t_e_r Ƥֻ
ɬȯ롣 _E_n_t_e_r_N_o_t_i_f_y  _L_e_a_v_e_N_o_t_i_f_y 
ϡɥΥ٥ȥޥ° _E_n_t_e_r_W_i_n_d_o_w_M_a_s_k 
_L_e_a_v_e_W_i_n_d_o_w_M_a_s_k ӥåȤꤹ롣

Υ٥ȷ(type)Τι¤Τϰʲޤ:

__
||
typedef struct {
     int type;                /* EnterNotify or LeaveNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* ``event'' window reported relative to */
     Window root;             /* root window that the event occurred on */
     Window subwindow;        /* child window */
     Time time;               /* milliseconds */
     int x, y;                /* pointer x, y coordinates in event window */
     int x_root, y_root;      /* coordinates relative to root */
     int mode;                /* NotifyNormal, NotifyGrab, NotifyUngrab */
     int detail;
                              /*
                              * NotifyAncestor, NotifyVirtual, NotifyInferior,
                              * NotifyNonlinear,NotifyNonlinearVirtual
                              */
     Bool same_screen;        /* same screen flag */
     Bool focus;              /* boolean focus */
     unsigned int state;      /* key or button mask */
} XCrossingEvent;
typedef XCrossingEvent XEnterWindowEvent;
typedef XCrossingEvent XLeaveWindowEvent;

||__

window Сϡ _E_n_t_e_r_N_o_t_i_f_y 뤤 _L_e_a_v_e_N_o_t_i_f_y ٥
Ȥȯɥꤵ졢٥ȥɥȤƻ
Ȥ롣ϡX С٥ȤΤ뤿˻Ȥ
ɥǡ٥Ȥä롼ȥɥ˴طƤ
롣 root Сϥ٥Ȥ꡼Υ롼ȥ
ɥꤵ롣

_L_e_a_v_e_N_o_t_i_f_y ٥ȤǤϡ٥ȥɥλҥɥ
ݥ󥿡ν֤ޤޤƤʤ顢subwindow ФϤ
λҥɥꤵ롣Ǥʤʤ顢X С
subwindow С _N_o_n_e ꤹ롣 _E_n_t_e_r_N_o_t_i_f_y ٥
Ǥϡ٥ȥɥλҤ˥ݥ󥿡κǽ֤ޤޤ
Τʤ顢subwindow СϤλҥɥꤵ졢
Ǥʤʤ _N_o_n_e ꤵ롣

time Сϥ٥Ȥȯλ֤ꤵ졢ߥ
ñ̤ɽ롣 x  y Сϥ٥ȥɥǤΥ
󥿡֤κɸꤵ롣ΰ֤Ͼ˥ݥ󥿡κ









                            -15-


֤Ǥꡢ֤ǤϤʤ٥ȥɥ롼ȥ
ɥƱ꡼ˤʤ顢x  y ϥݥ󥿡
ɸǤꡢ٥ȥɥθФкɸꤵ
롣Ǥʤʤ顢x  y  zero ꤵ롣 x_root 
y_root Сϥ٥ȤΥ롼ȥɥθ
Фкɸꤵ롣

same_screen Сϥ٥ȥɥȥ롼ȥɥ
Ʊ꡼ˤ뤫ɤ򼨤 _T_r_u_e 뤤 _F_a_l_s_e
ꤵ롣 _T_r_u_e ʤХ٥ȥɥȥ롼ȥ
Ʊ꡼ˤ롣 _F_a_l_s_e ʤХ٥ȥɥ
ȥ롼ȥɥϰۤʤ륹꡼ˤ롣 focus 
ϥ٥ȥɥեɥ뤤ϥե
ɥβ̳إɥǤ뤫ɤ򼨤 X 
СϤΥС _T_r_u_e 뤤 _F_a_l_s_e ꤹ롣 _T_r_u_e
ʤ顢٥ȥɥϥեɥ뤤Ϥβ
̳إɥ _F_a_l_s_e ʤ顢٥ȥɥϥե
ɥ뤤Ϥβ̳إɥǤϤʤ

state СϤΥ٥ȤľΥݥ󥿡ܥȥǥ
եξ֤ꤵ롣 X СϤΥС
˰ʲΥܥ󤢤뤤ϥǥեޥΥӥå
¤ꤹ: _B_u_t_t_o_n_1_M_a_s_k _B_u_t_t_o_n_2_M_a_s_k _B_u_t_t_o_n_3_M_a_s_k
_B_u_t_t_o_n_4_M_a_s_k _B_u_t_t_o_n_5_M_a_s_k _S_h_i_f_t_M_a_s_k _L_o_c_k_M_a_s_k
_C_o_n_t_r_o_l_M_a_s_k _M_o_d_1_M_a_s_k _M_o_d_2_M_a_s_k _M_o_d_3_M_a_s_k _M_o_d_4_M_a_s_k
_M_o_d_5_M_a_s_k

mode Сϡ٥Ȥ̾磻٥ȡ֤ͭˤʤ
εư(pseudo-motion)٥ȡ̵֤ˤʤä
εư(pseudo-motion)٥ȤΤɤʤΤ򼨤褦
ꤵ롣 X СϤΥС _N_o_t_i_f_y_N_o_r_m_a_l
_N_o_t_i_f_y_G_r_a_b _N_o_t_i_f_y_U_n_g_r_a_b Τɤ줫ꤹ롣

detail СΤξܺ٤򼨤 _N_o_t_i_f_y_A_n_c_e_s_t_o_r
_N_o_t_i_f_y_V_i_r_t_u_a_l _N_o_t_i_f_y_I_n_f_e_r_i_o_r _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r _N_o_t_i_-
_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l Τɤ줫ꤵ롣

00..66..11..  NNoorrmmaall EEnnttrryy//EExxiitt EEvveennttss

ݥ󥿡1Ĥ뤫ۤưȤˡ _E_n_t_e_r_N_o_t_i_f_y 
 _L_e_a_v_e_N_o_t_i_f_y ٥Ȥϡȯ롣̾
(Normal)٥Ȥ _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t 뤤 _X_L_e_a_v_e_W_i_n_-
_d_o_w_E_v_e_n_t ¤Τ mode С _N_o_t_i_f_y_N_o_r_m_a_l ꤵ
Ƚ̤Ǥ롣

+o    ݥ󥿡ɥ A 饦ɥ B ư
      A  B β̳إɥǤX Сϰ
     λԤʤ:

     -    ɥ A  _L_e_a_v_e_N_o_t_i_f_y ٥Ȥȯ롢
          _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_A_n_c_e_s_t_o_r ꤹ롣











                            -16-


     -    ɥ A ȥɥ B δ֤Τ줾Υ
          ɥʤξü A  B Ͻˤ _L_e_a_v_e_N_o_t_i_f_y
          ٥Ȥȯ롢 _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _E_n_t_e_r_N_o_t_i_f_y ٥Ȥȯ롢
          _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_I_n_f_e_r_i_o_r ꤹ롣

+o    ݥ󥿡 ɥ A 饦ɥ B ư
      B  A β̳إɥǤäX С
     ʲλԤʤ:

     -    ɥ A  _L_e_a_v_e_N_o_t_i_f_y ٥Ȥȯ롢
          _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С
          _L_e_a_v_e_N_o_t_i_f_y ꤹ롣

     -    ɥ A ȥɥ B δ֤Τ줾Υ
          ɥʤξü A  B Ͻˤ _E_n_t_e_r_N_o_t_i_f_y
          ٥Ȥȯ롢 _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _E_n_t_e_r_N_o_t_i_f_y ȯ롢 _X_E_n_t_e_r_-
          _W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_A_n_c_e_s_t_o_r ꤹ롣

+o    ݥ󥿡ɥ A 饦ɥ B ư
     ˥ɥ C κǤᤤ̤ξ̳إ
     λX СϰʲλԤʤ:

     -    ɥ A  _L_e_a_v_e_N_o_t_i_f_y ٥Ȥȯ롢
          _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ A ȥɥ C δ֤Τ줾Υ
          ɥʤξü A  C Ͻˤ _L_e_a_v_e_N_o_t_i_f_y
          ٥Ȥȯ롢 _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ
          롣

     -    ɥ C ȥɥ B δ֤Τ줾Υ
          ɥʤξü C  B Ͻˤ _E_n_t_e_r_N_o_t_i_f_y
          ٥Ȥȯ롢 _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ
          롣

     -    ɥ B  _E_n_t_e_r_N_o_t_i_f_y ٥Ȥȯ롢
          _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

+o    ݥ󥿡ɥ A  ۤʤ륹꡼Υ
     ɥ B ưX СϰʲλԤʤ











                            -17-


     -    ɥ A  _L_e_a_v_e_N_o_t_i_f_y ȯ롢
          _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ A 롼ȥɥǤϤʤΤʤС
          ɥ A ǥ롼ȥɥä
          Υɥ _L_e_a_v_e_N_o_t_i_f_y ٥Ȥȯ
          롢 _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B 롼ȥɥǤʤʤС
          ɥ B Υ롼ȥɥ겼ǥɥ B 
          ޤʤ줾Υɥ _E_n_t_e_r_N_o_t_i_f_y ٥
          Ȥȯ롢 _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _E_n_t_e_r_N_o_t_i_f_y ٥Ȥȯ롢
          _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

00..66..22..  GGrraabb aanndd UUnnggrraabb EEnnttrryy//EExxiitt EEvveennttss

ư(pseudo-motion)⡼ɤ _E_n_t_e_r_N_o_t_i_f_y  _L_e_a_v_e_N_o_t_i_f_y
ϥݥ󥿡֤ƥֲ뤤ϥǥƥֲ
ȯ롣ݥ󥿡֤ƥֲΥ٥
 _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t 뤤 _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ
mode С _N_o_t_i_f_y_G_r_a_b ꤵƤˤäȽ̤
롣ݥ󥿡֤ǥƥֲΥ٥Ȥ
_X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t 뤤 _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤Τ mode
С _N_o_t_i_f_y_U_n_g_r_a_b (see _X_G_r_a_b_P_o_i_n_t_e_r) ꤵƤ
ˤäȽ̤Ǥ롣

+o    ݥ󥿡֤ƥֲˡ confine_to 
     ɥؤβ餫νưθǡ֤򥢥
     ƥ֤ˤʤ餫 _B_u_t_t_o_n_P_r_e_s_s ٥Ȥºݤȯ
     ˡ G ֤Τ grab_window Ǥꡢ P
     ݥ󥿡륦ɥȤơ X Сϰʲ
     λԤʤ:

     -    _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤
          Τ mode С _N_o_t_i_f_y_G_r_a_b ꤷ _E_n_t_e_r_-
          _N_o_t_i_f_y ٥Ȥ _L_e_a_v_e_N_o_t_i_f_y ٥Ȥʥ
           10.6.1 򸫤ȯ롣Υ٥Ȥϡ
          ǥݥ󥿡 P ˤ뤽θ֤߰ G 
          Τɤ˰ưΤ褦ȯ
          롣ʤ顢ݥ󥿡ϰưʤ X
          Сϥ٥Ȥν֤Ⱥǽ֤ξΥݥ
          󥿡֤Ѥ롣

+o    ݥ󥿡֤ǥƥֲˡ֤ǥ
     ƥ֤ˤ벿餫 _B_u_t_t_o_n_R_e_l_e_a_s_e ٥Ȥºݤȯ
     ˡ G ֤Τ grab_window Ǥꡢ P
     ݥ󥿡륦ɥȤơ X Сϰʲ
     λԤʤ:









                            -18-


     -    _X_E_n_t_e_r_W_i_n_d_o_w_E_v_e_n_t ¤Τ _X_L_e_a_v_e_W_i_n_d_o_w_E_v_e_n_t ¤
          Τ mode С _N_o_t_i_f_y_U_n_g_r_a_b ꤷ
          _E_n_t_e_r_N_o_t_i_f_y ٥Ȥ _L_e_a_v_e_N_o_t_i_f_y ٥Ȥʥ
           10.6.1ߤȯ롣Υ٥
          ϡޤǥݥ󥿡 G Τɤ P 
          뤽θ֤߰˰ưΤ褦ȯ
          롣ʤ顢ݥ󥿡ϰưʤ
           X Сϥ٥Ȥν֤Ⱥǽ֤ξ
          Υݥ󥿡֤Ѥ롣

00..77..  IInnppuutt FFooccuuss EEvveennttss

Υϥե٥ _F_o_c_u_s_I_n  _F_o_c_u_s_O_u_t
ˤĤƽҤ٤롣 X СϥեѤä˥
饤Ȥξ׵ᤷƤʤ _F_o_c_u_s_I_n ٥Ȥ
_F_o_c_u_s_O_u_t ٥ȤΤ롣ܡɤϡե
ɥȸƤФ뤢륦ɥʤդĤ롼ȥɥǾ
̤Υɥˤ˾ˤĤƤ롣եɥȥݥ
󥿡ΰ֤ϡܡϤ륦ɥ롣
饤Ȥϡϥե꡼ΰζĴɽ
ѤΤäƤɬפ뤫Τʤ

_F_o_c_u_s_I_n ٥Ȥ _F_o_c_u_s_O_u_t ٥Ȥˤϡ
Υ٥ȥޥ° _F_o_c_u_s_C_h_a_n_g_e_M_a_s_k ӥåȤꤹ롣

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* FocusIn or FocusOut */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* window of event */
     int mode;                /* NotifyNormal, NotifyGrab, NotifyUngrab */
     int detail;
                              /*
                              * NotifyAncestor, NotifyVirtual, NotifyInferior,
                              * NotifyNonlinear,NotifyNonlinearVirtual,
                              * NotifyPointer, NotifyPointerRoot,
                              * NotifyDetailNone
                              */
} XFocusChangeEvent;
typedef XFocusChangeEvent XFocusInEvent;
typedef XFocusChangeEvent XFocusOutEvent;

||__

window С _F_o_c_u_s_I_n ٥Ȥ _F_o_c_u_s_O_u_t ٥Ȥȯ
ɥꤵ롣 X Сˤäƥ
ȤΤ뤿˻Ȥ륦ɥ mode С
ե٥Ȥ̤Υե٥ȡ
ե٥ȡ֤ƥֲΥե









                            -19-


٥ȡ֤ǥƥֲΥե٥ȤΤ
줫򼨤褦ꤵ롣 X С mode С
_N_o_t_i_f_y_N_o_r_m_a_l _N_o_t_i_f_y_W_h_i_l_e_G_r_a_b_b_e_d _N_o_t_i_f_y_G_r_a_b _N_o_t_i_f_y_U_n_-
_g_r_a_b Τ줫ꤹ롣

ɥΥޥå(unmap)ˤäư뤹٤Ƥ
_F_o_c_u_s_O_u_t ٥Ȥϡ餫 _U_n_m_a_p_N_o_t_i_f_y ٥Ȥθȯ
롣ʤ顢 X ץȥ _F_o_c_u_s_O_u_t ٥Ȥ˴ؤ
ȯ줿 _E_n_t_e_r_N_o_t_i_f_y _L_e_a_v_e_N_o_t_i_f_y
_V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y _E_x_p_o_s_e ٥Ȥν϶ʤ

٥ȥ⡼ɤ˱ơ detail СΤξܺ٤򼨤
_N_o_t_i_f_y_A_n_c_e_s_t_o_r _N_o_t_i_f_y_V_i_r_t_u_a_l _N_o_t_i_f_y_I_n_f_e_r_i_o_r
_N_o_t_i_f_y_N_o_n_l_i_n_e_a_r _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l _N_o_t_i_f_y_P_o_i_n_t_e_r
_N_o_t_i_f_y_P_o_i_n_t_e_r_R_o_o_t _N_o_t_i_f_y_D_e_t_a_i_l_N_o_n_e Τɤ줫ꤵ롣

00..77..11..  NNoorrmmaall FFooccuuss EEvveennttss aanndd FFooccuuss EEvveennttss WWhhiillee GGrraabbbbeedd

̾Υե٥Ȥ _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ _X_F_o_c_u_-
_s_O_u_t_E_v_e_n_t ¤Τ mode С _N_o_t_i_f_y_N_o_r_m_a_l ꤵ
Ƚ̤Ǥ롣Υե٥Ȥ _X_F_o_c_u_s_I_n_-
_E_v_e_n_t ¤Τ _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ mode С _N_o_t_i_-
_f_y_W_h_i_l_e_G_r_a_b_b_e_d ꤵƤȽ̤Ǥ롣 X С
̾ΥեȥΥե򲼵Τ褦˽
:

+o    եɥ A 饦ɥ B ưA 
     B β̳إɥǡ˥ݥ󥿡ɥ
     P ˤX СϰʲλԤʤ:

     -    ɥ A ǡ _F_o_c_u_s_O_u_t ٥Ȥȯ
          롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_A_n_c_e_s_t_o_r ꤹ롣

     -    ɥ A ȥɥ B δ֤Τ줾Υ
          ɥʤξü A  B Ͻˤ _F_o_c_u_s_O_u_t 
          Ȥȯ롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _F_o_c_u_s_I_n ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_-
          _I_n_f_e_r_i_o_r ꤹ롣

     -    ɥ P ɥ B β̳ؤΥɥ
          Ǥ뤬ɥ P ɥ A 䥦ɥ
          A ξ̳ؤ̳ؤΥɥǤϤʤʤС
          ɥ B 겼إɥ P ޤƤ줾
          Υɥ _F_o_c_u_s_I_n ٥Ȥȯ롢 _X_F_o_-
          _c_u_s_I_n_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_-
          _P_o_i_n_t_e_r ꤹ롣

+o    եɥ A 饦ɥ B ˰ư B
      A β̳إɥǤꡢݥ󥿡ɥ
     P ˤ X СϰʲλԤʤ:









                            -20-


     -    ɥ P ɥ A β̳ؤΥɥ
          Ǥ뤬 P ɥ B β̳ؤ̳ؤ
          ɥǤϤʤʤСɥ P إ
          ɥ A ޤ᤺ˤ줾Υɥ _F_o_c_u_-
          _s_O_u_t ٥Ȥȯ롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤
           detail С _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

     -    ɥ A  _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_-
          _I_n_f_e_r_i_o_r ꤹ롣

     -    ɥ A ȥɥ B δ֤Τ줾Υ
          ɥʤξü A  B Ͻˤ _F_o_c_u_s_I_n 
          Ȥȯ롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _F_o_c_u_s_I_n ٥Ȥȯ롢
          _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_A_n_c_e_s_t_o_r ꤹ롣

+o    եɥ A 饦ɥ B ˰ư
     ɥ C κǤᤤ̤ξ̳إɥǡ
     ݥ󥿡ɥ P ˤ X Сϰʲ
     Ԥʤ:

     -    ɥ P  ɥ A β̳إɥ
          ʤСɥ P ǥɥ A ޤ
          줾Υɥ _F_o_c_u_s_O_u_t ٥Ȥȯ
          롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

     -    ɥ A  _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ A ȥɥ C δ֤Τ줾Υ
          ɥʤξü A  C Ͻˤ _F_o_c_u_s_O_u_t 
          Ȥȯ롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ C ȥɥ B δ֤Τ줾Υ
          ɥʤξü C  B Ͻˤ _F_o_c_u_s_I_n 
          Ȥȯ롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _F_o_c_u_s_I_n ٥Ȥȯ롢
          _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ P ɥ B β̳إɥ
          Сɥ B 겼Υɥ P ޤ᤿
          줾Υɥ _F_o_c_u_s_I_n ٥Ȥȯ
          롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣









                            -21-


+o    եɥ A ۤʤ륹꡼Υ
      B ˰ưݥ󥿡ɥ P ˤ X 
     СϰʲλԤʤ:

     -    _N_o_t_i_f_y_P_o_i_n_t_e_r.  ɥ P  ɥ A β
          ̳ؤΥɥʤСɥ P Υ
          ɥ A ޤʤ줾Υɥ _F_o_c_u_-
          _s_O_u_t ٥Ȥȯ롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤
           detail С _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

     -    ɥ A  _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ A ǤΥ롼ȥɥޤ᤿
          줾Υɥǥ٥Ȥȯ롢 _X_F_o_-
          _c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_N_o_n_-
          _l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B 롼ȥɥǤϤʤΤʤС
          ɥ B Υ롼ȥɥ鲼ǥɥ
          B ޤʤ줾Υɥ _F_o_c_u_s_I_n ٥
          Ȥȯ롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail 
          С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣

     -    ɥ B  _F_o_c_u_s_I_n ٥Ȥȯ롢
          _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ P ɥ B β̳إɥ
          Сɥ B 겼ǥɥ P ޤ᤿
          줾Υɥ _F_o_c_u_s_I_n ٥Ȥȯ
          롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

+o    եɥ A  _P_o_i_n_t_e_r_R_o_o_t ʥݥ󥿡
     βΥɥ륤٥ȡˤ _N_o_n_e ˴(dis-
     card)ˤ˰ưݥ󥿡ɥ P ˤ X
     СϰʲλԤʤ:

     -    ɥ P ɥ A β̳إɥ
          Сɥ P Υɥ A 
          Υɥ _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_-
          _P_o_i_n_t_e_r ꤹ롣

     -    ɥ A ǡ _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l.  ɥ A 롼ȥ
          ɥʤСɥ A ΤΥ롼ȥ
          ɥޤ줾Υɥ _F_o_c_u_s_O_u_t 
          Ȥȯ롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail









                            -22-


          С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ롣
          ƤΥ꡼Υ롼ȥɥ _F_o_c_u_s_I_n ٥
          Ȥȯ롢줾 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_P_o_i_n_t_e_r_R_o_o_t ʤ뤤
          _N_o_t_i_f_y_D_e_t_a_i_l_N_o_n_eˤꤹ롣

     -    ե _P_o_i_n_t_e_r_R_o_o_t ʤСɥ
          P Υ롼ȥɥ鲼˥ɥ P ޤ
          줾Υɥǡ _F_o_c_u_s_I_n ٥Ȥȯ
          롢 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r.  ꤹ롣

+o    ե _P_o_i_n_t_e_r_R_o_o_t ʥݥ󥿡β
     ٥ȡˤ _N_o_n_e 饦ɥ A ˰ưݥ󥿡
     ɥ P ˤ X СϰʲλԤʤ:

     -    Ťե _P_o_i_n_t_e_r_R_o_o_t ʤСɥ P
          ˥ɥ P Υ롼ȥɥޤऽ
          Υɥ _F_o_c_u_s_O_u_t ٥Ȥȯ롢
          _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С _N_o_t_i_f_y_-
          _P_o_i_n_t_e_r ꤹ롣

     -    ٤ƤΥ롼ȥɥ _F_o_c_u_s_O_u_t ٥Ȥȯ
          롢 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r_R_o_o_t ʤ뤤 _N_o_t_i_f_y_D_e_t_a_i_l_N_o_n_eˤ
          ꤹ롣

     -    ɥ A 롼ȥɥǤʤʤС
          ɥ A Υ롼ȥɥ鲼ǥɥ A 
          ޤޤʤ줾Υɥ _F_o_c_u_s_I_n ٥Ȥ
          ȯ롢줾 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ
          detail С _N_o_t_i_f_y_N_o_n_l_i_n_e_a_r_V_i_r_t_u_a_l ꤹ
          롣

     -    ɥ A  _F_o_c_u_s_I_n ٥Ȥȯ롢
          _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail С _N_o_t_i_-
          _f_y_N_o_n_l_i_n_e_a_r ꤹ롣

     -    ɥ P ɥ A β̳إɥ
          ʤʤСɥ A 겼Υɥ P 
          줾Υɥ _F_o_c_u_s_I_n ٥Ȥȯ
          롢줾 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

+o    ե _P_o_i_n_t_e_r_R_o_o_t ʥݥ󥿡β
     ٥ȡˤ _N_o_n_e ˰ưʤ뤤ϡդƱͤˡˡ
     ݥ󥿡ɥ P ˤ X Сϰʲ
     Ԥʤ:

     -    Ťե _P_o_i_n_t_e_r_R_o_o_t ʤСɥ P
          ˥ɥ P Υ롼ȥɥޤऽ
          Υɥ _F_o_c_u_s_O_u_t ٥Ȥȯ
          줾 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail С
          _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣









                            -23-


     -    ٤ƤΥ롼ȥɥ _F_o_c_u_s_O_u_t ٥Ȥȯ
          롢줾 _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_P_o_i_n_t_e_r_R_o_o_t 뤤 _N_o_t_i_f_y_D_e_-
          _t_a_i_l_N_o_n_e ꤹ롣

     -    ٤ƤΥ롼ȥɥ _F_o_c_u_s_I_n ٥Ȥȯ
          롢줾 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail
          С _N_o_t_i_f_y_D_e_t_a_i_l_N_o_n_e 뤤 _N_o_t_i_f_y_P_o_i_n_t_-
          _e_r_R_o_o_t ꤹ롣

     -    ե _P_o_i_n_t_e_r_R_o_o_t ʤСɥ
          P Υ롼ȥɥ鲼˥ɥ P ޤߤ
          줾Υɥ _F_o_c_u_s_I_n ٥Ȥȯ
          롢줾 _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ detail 
          С _N_o_t_i_f_y_P_o_i_n_t_e_r ꤹ롣

00..77..22..  FFooccuuss EEvveennttss GGeenneerraatteedd bbyy GGrraabbss

ե٥Ȥܡɥ֤Υƥֲˤʪ
ɤ _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ mode
С _X_F_o_c_u_s_O_u_t_E_v_e_n_t ꤵƤˤäȽ̤Ǥ
롣ե٥Ȥܡɥ֤Υǥƥֲˤ
ʪɤ _X_F_o_c_u_s_I_n_E_v_e_n_t ¤Τ _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤
 mode С _N_o_t_i_f_y_U_n_g_r_a_b ( _X_G_r_a_b_K_e_y_b_o_a_r_d 򸫤) 
ꤵƤˤäȽ̤Ǥ롣

+o    ܡɥ֤ƥֲˡ֤򥢥
     ƥ֤ˤʤ餫 _K_e_y_P_r_e_s_s ٥Ȥºݤȯ
     ˡ G ֤Τ grab_window Ǥꡢ F 
     ߤΥեɥȤơ X Сϰʲ
     Ԥʤ:

     -    ٥Ȥ _F_o_c_u_s_O_u_t ٥Ȥȯ롢 _X_F_o_-
          _c_u_s_I_n_E_v_e_n_t ¤Τ _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ mode
          С _N_o_t_i_f_y_G_r_a_b ꤹ롣Υ٥
          ϡեޤǥե F  G 
          äΤ褦ȯ롣

+o    ܡɥ֤ǥƥֲˡ֤򥢥
     ƥ֤ˤʤ餫 _K_e_y_R_e_l_e_a_s_e ٥Ȥºݤȯ
     ˡ G ֤Τ grab_window Ǥꡢ F
     ߤΥեɥȤơ X Сϰʲ
     λԤʤ:

     -    ٥Ȥ _F_o_c_u_s_O_u_t ٥Ȥȯ롢 _X_F_o_-
          _c_u_s_I_n_E_v_e_n_t ¤Τ _X_F_o_c_u_s_O_u_t_E_v_e_n_t ¤Τ mode
          С _N_o_t_i_f_y_U_n_g_r_a_b ꤹ롣Υ٥
          Ȥϡեޤǥե G  F 
          äΤ褦ȯ롣

00..88..  KKeeyy MMaapp SSttaattee NNoottiiffiiccaattiioonn EEvveennttss

X СϡȤΥܡɤξ֤Ѳξ׵᤹륯
饤Ȥ _K_e_y_m_a_p_N_o_t_i_f_y ٥ȤΤ롣









                            -24-


٥ȤˤϡɥΥ٥ȥޥ°
_K_e_y_m_a_p_S_t_a_t_e_M_a_s_k ӥåȤꤹ롣 X С _E_n_t_e_r_N_o_t_i_f_y
٥Ȥ _F_o_c_u_s_I_n ٥ȤθǡˤΥ٥Ȥȯ
롣

Υ٥ȤΤι¤Τʲ˼: _K_e_y_m_a_p_N_o_t_i_f_y

__
||
/* generated on EnterWindow and FocusIn when KeymapState selected */
typedef struct {
     int type;                /* KeymapNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     char key_vector[32];
} XKeymapEvent;

||__

window СϻѤʤĤΥġ륭åȤν
ˤʤ褦󶡤롣 key_vector Сϥܡɤ
ӥåȥ٥ȥꤵ롣ӥåȤ 1 ꤵƤ
ȡб륭߲Ƥ򼨤٥ȥ 32 
Ȥɽ롣Х N(0Ϥޤ)ϡ 8N  8N+7
бӥåȤġΥХȤκǲ̥ӥåȤ 8N 
б롣

00..99..  EExxppoossuurree EEvveennttss

X ץȥϡɥ(obscure)뤤Ϻǹ
(reconfigure) 줿ˡɥƤ򤢤餫¸
ݾڤʤĤμϥɥƤ򤢤餫
¸뤫Τʤ¾μϡɥϪ
(expose)줿˥ɥƤͳ˲Ǥ롣 X
Ϫ(expose)줿ɥΰƤǤ
ꤹ륯饤ȥץꥱ롣ʥɥ
褬Ϫ(expose)ȸϡĻ(visible)ˤʤ
褬˱(obscure)줿ɥǤȸ
ΤᡢX Сϡɥȥɥΰ褬Ϫ
(expose) 줿ȸΤ餻 _E_x_p_o_s_e ٥Ȥ롣
ñʥ饤ȥץꥱϡ̾ΤΥɥ
ľ줿饤ȥץꥱϡñ
Ϫ(expose) 줿ΰľ

00..99..11..  EExxppoossee EEvveennttss

X СϡɥƤ줿ˤξ׵᤹
륯饤Ȥ _E_x_p_o_s_e ٥ȤΤ롣 X С
_E_x_p_o_s_e ٥Ȥȯ¾Υ٥ȤۤɤϤä
ޤäƤϤʤʤ顢X СϤʤ _I_n_p_u_-
_t_O_n_l_y Ȼꤷ饹ΥɥǤϷ褷 _E_x_p_o_s_e ٥
ȯʤ X СϡͭǤʤƤɥ









                            -25-


ΰ¸ߤΰ褬Ļ(visible)ΰ褬ɽ
ǽ(viewable)ǥСɥΥХå󥰥ȥݻ
Ƥ롢뤤ϡɥɽǽ(viewable)ǤϤʤ
Сɥ _A_l_w_a_y_s  _W_h_e_n_M_a_p_p_e_d ꤵƤ
Хå󥰥ȥ°¿ʬẢ˼դƤ롢Τ
Ǥʤ _E_x_p_o_s_e ٥Ȥȯ롣ΰϥ쥯󥰥
ĹˤΡǤդΡ˽ޤʬ򤵤졢Ƥ줾Υ쥯
󥰥ĹˤΤ _E_x_p_o_s_e ٥Ȥȯ롣ǡ
ʤ륦ɥˤ⡢ɥ쥤(raise)ʤɤ
_E_x_p_o_s_e ٥Ȥ餫γưˤäϪ
(expose)뤹٤ƤΰľΤ X Ф
ݾڤ롣

_E_x_p_o_s_e ٥ȤˤϡɥΥ٥ȥޥ°
 _E_x_p_o_s_u_r_e_M_a_s_k ӥåȤꤹ롣

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* Expose */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     int x, y;
     int width, height;
     int count;               /* if nonzero, at least this many more */
} XExposeEvent;

||__

window СϪ(expose)»(damege)ˤɥ
ꤵ롣 x  y СϥɥθФ
ɸꤵ졢쥯󥰥ĹˤκѤ򼨤 width
 height Сϥ쥯󥰥ĹˤΥ()
ꤵ롣 count Сϡ³ _E_x_p_o_s_e ٥Ȥο
ꤵ롣 count ʤСΥɥФ
_E_x_p_o_s_e ٥Ȥ³ʤcount ǤʤС
㤳οʤʾΤȤ⤢ˤ _E_x_p_o_s_e ٥Ȥ
ɥФ³ΥɥΥ֥ꥢ̤
ǺŬʤñʥץꥱϡ count
ǤϤʤ٤Ƥ _E_x_p_o_s_e ٥Ȥñ̵뤷 count
 _E_x_p_o_s_e ٥ȤǴʺԤʤ롣

00..99..22..  GGrraapphhiiccssEExxppoossee aanndd NNooEExxppoossee EEvveennttss

X Сϡǥƥ͡ΰ褬եåꥯ
: _X_C_o_p_y_A_r_e_a _X_C_o_p_y_P_l_a_n_e Τ줫δ֤˻ʤ
˥饤Ȥξ׵ᤷƤʤ _G_r_a_p_h_i_c_s_E_x_p_o_s_e
٥ȤΤ롣 X Сϡǥƥ͡ΰ
(obscure)Ƥ뤫ΰζγˤ뤿
׻ǤʤϡɬΥ٥Ȥȯ롣ˡX 









                            -26-


ФϤʤ餫ΥեåꥯȡʤȤСɥ
֥(drawable)Υꥢǥƥ͡Υɥ
(drawable)˥ԡˤˤäϪ(expose)줿٤Ƥ
ΰľ𤹤ݾڤ롣

X Сϡ _G_r_a_p_h_i_c_s_E_x_p_o_s_e ĤФΤʤ
եåꥯȤ߽ФʤϤĤǤ _N_o_E_x_p_o_s_e
٥Ȥȯ롣ؤС饤Ȥ
_G_r_a_p_h_i_c_s_E_x_p_o_s_e Ƥ뤬 _N_o_E_x_p_o_s_e ٥Ȥ
롣

_G_r_a_p_h_i_c_s_E_x_p_o_s_e  _N_o_E_x_p_o_s_e ˤϡǽ˥ե
ƥȤ graphics-exposure ° _T_r_u_e ꤷ
Фʤʤʤ _X_C_r_e_a_t_e_G_C Ȥäƥեå
ƥȤĤФˡ뤤 _X_S_e_t_G_r_a_p_h_i_c_s_E_x_p_o_s_u_r_e_s
Ƥֻˤä graphics-expose °Ǥ롣

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* GraphicsExpose */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Drawable drawable;
     int x, y;
     int width, height;
     int count;               /* if nonzero, at least this many more */
     int major_code;          /* core is CopyArea or CopyPlane */
     int minor_code;          /* not defined in the core */
} XGraphicsExposeEvent;



typedef struct {
     int type;                /* NoExpose */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Drawable drawable;
     int major_code;          /* core is CopyArea or CopyPlane */
     int minor_code;          /* not defined in the core */
} XNoExposeEvent;

||__

ɤι¤Τⶦ̤ΥС draw-
ablemajor_codeminor_code ġ drawable Сϥ
եåꥯȤ¹ԤϤäǥƥ͡
ΰΥɥ֥(drawable)ꤵ롣饤Ȥ
եåꥯȤꤵ졢 _X___C_o_p_y_A_r_e_a 
_X___C_o_p_y_P_l_a_n_e Τ줫Ǥ롣 _X___C_o_p_y_A_r_e_a ξϡΥ









                            -27-


Ȥ򵯤 _X___C_o_p_y_P_l_a_n_e ξ _X_C_o_p_y_P_l_a_n_e 
ꥯȤ򵯤 <_X_1_1_/_X_p_r_o_t_o_._h> 
Ƥ롣 minor_code Сϡmajor_code Τ褦ˡɤ
եåꥯȤ饤ȤˤäƻϤ줿Τ
򼨤ʤ顢 minor_code Сϥ X ץ
ǤƤʤΤǤΤ褦ʾϥꤵ
ΥСϳĥˤäƻȤ뤫Τʤ

_X_G_r_a_p_h_i_c_s_E_x_p_o_s_e_E_v_e_n_t ¤ΤϼɲåСäƤ
:xywicthheightcountɥ֥(drawable)θ
Фкɸꤵ졢쥯󥰥 (Ĺ)κѤ
 width  height Сϥ쥯󥰥(Ĺ)Υ
(()ꤵ롣 count Сϡ³ _G_r_a_p_h_i_c_-
_s_E_x_p_o_s_e ٥Ȥοꤵ롣 count ʤС
ɥФ _G_r_a_p_h_i_c_s_E_x_p_o_s_e ٥Ȥ³ʤ
count ǤʤС㤳οʤʾΤȤ⤢
ˤ _G_r_a_p_h_i_c_s_E_x_p_o_s_e ٥ȤΥɥФ³

00..1100..  WWiinnddooww SSttaattee CChhaannggee EEvveennttss

The following sections discuss:

+o    _C_i_r_c_u_l_a_t_e_N_o_t_i_f_y events

+o    _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y events

+o    _C_r_e_a_t_e_N_o_t_i_f_y events

+o    _D_e_s_t_r_o_y_N_o_t_i_f_y events

+o    _G_r_a_v_i_t_y_N_o_t_i_f_y events

+o    _M_a_p_N_o_t_i_f_y events

+o    _M_a_p_p_i_n_g_N_o_t_i_f_y events

+o    _R_e_p_a_r_e_n_t_N_o_t_i_f_y events

+o    _U_n_m_a_p_N_o_t_i_f_y events

+o    _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y events

00..1100..11..  CCiirrccuullaatteeNNoottiiffyy EEvveennttss

X СϡɥåǤΰ֤Ѥ
׵᤹륯饤Ȥ _C_i_r_c_u_l_a_t_e_N_o_t_i_f_y ٥Ȥ
롣 X Сϡ饤ȥץꥱ
_X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s _X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s_U_p _X_C_i_r_c_u_l_a_t_e_-
_S_u_b_w_i_n_d_o_w_s_D_o_w_n Τ줫ƤӽФ̡ɥº
˺ƥåϤĤ⤳Υ٥ȷ(type)ȯ롣

_C_i_r_c_u_l_a_t_e_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥ
οƥɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k









                            -28-


ӥåȤꤹ롣ʤΤФ۴(circulate)벿餫
λҥɥ٥Ȥȯˡ

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* CirculateNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     int place;               /* PlaceOnTop, PlaceOnBottom */
} XCirculateEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
ɤ򤷤˱ơƥå줿ɥ
ƥɥΤ줫ꤵ롣 window СϺƥ
å줿ɥꤵ롣 place СϺƥ
åΥɥΰ֤ꤵ졢 _P_l_a_c_e_O_n_T_o_p 
_P_l_a_c_e_O_n_B_o_t_t_o_m Τ줫줬 _P_l_a_c_e_O_n_T_o_p ʤСΥ
ɥϤޤ٤Ƥη復ɥξˤ롣줬
_P_l_a_c_e_O_n_B_o_t_t_o_m ʤСΥɥϤޤ٤Ƥη復
ɥβˤ롣

00..1100..22..  CCoonnffiigguurreeNNoottiiffyy EEvveennttss

X Сϡɥξ(֡ܡ
åå󥰥ʤɤ)μºݤѲˤĤƤξ׵
륯饤Ȥ _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y ٥ȤΤ롣

+o    X Сϡ饤ȥץꥱ󤬤ˤäƺ
     줿Ҥ륦ɥۥꥯȤΰĤºݤ˴
     λˤɬΥ٥ȷ(type)ȯ: _X_C_o_n_-
     _f_i_g_u_r_e_W_i_n_d_o_w ƤֻǥɥΥ֡ܡ
     åå󥰥ƹۤ롣

+o    _X_L_o_w_e_r_W_i_n_d_o_w _X_R_a_i_s_e_W_i_n_d_o_w _X_R_e_s_t_a_c_k_W_i_n_d_o_w_s Τ
     Ƥֻǥåå󥰥ǤΥɥ
     ֤ѹ롣

+o    _X_M_o_v_e_W_i_n_d_o_w Ƥֻǥɥϰư롣

+o    _X_R_e_s_i_z_e_W_i_n_d_o_w ƤֻǥɥΥѹ
     롣

+o    _X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w ƤֻǥɥΥȰ֤
     ѹ롣











                            -29-


+o    _X_M_a_p_R_a_i_s_e_d Ƥֻǡɥϥޥåפ졢å
     󥰥ǤΤΰ֤ѹ롣

+o    _X_S_e_t_W_i_n_d_o_w_B_o_r_d_e_r_W_i_d_t_h ƤֻǡɥΥܡ
     ѹ롣

_C_o_n_f_i_g_u_r_e_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥ
οƥɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k
ӥåȤꤹ롣ʤΤФ(configure)벿餫
λҥɥ٥Ȥȯˡ

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* ConfigureNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     int x, y;
     int width, height;
     int border_width;
     Window above;
     Bool override_redirect;
} XConfigureEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơƹۤ줿ɥ
οƥɥΤɤ餫ꤵ롣 window Сϡ
֡ܡåå󥰥ѹ줿
ɥꤵ롣

x  y СϿƥɥθФкɸꤵ
졢ɥκѤγ¦ΰ֤򼨤 width  height
Сϥɥ¦礭ꤵ롢ܡϴ
ޤʤ border_width СϥɥΥܡ
ꤵ롢ԥͤ

above СϷ復ɥꤵ졢åå
˻Ȥ롣 X СΥС _N_o_n_e ꤷ
顢֤ѹ줿ΥɥϷ復ɥãˤΥ
åˤ롣ΥС˷復ɥ
ʤ顢֤ѹ줿ΥɥϤη復ɥ
ξ֤롣

override_redirect Сϥɥ override-redirect
°ꤵ롣ɥޥ͡㡼饤
ϡoverride_redirect С _T_r_u_e Ǥ뤳Υɥ









                            -30-


̵̾뤹٤

00..1100..33..  CCrreeaatteeNNoottiiffyy EEvveennttss

X Сϥɥκ(create)ˤĤƤξ׵᤹
饤Ȥ _C_r_e_a_t_e_N_o_t_i_f_y ٥ȤΤ롣 X С
ϡ饤ȥץꥱ _X_C_r_e_a_t_e_W_i_n_d_o_w  _X_C_r_e_-
_a_t_e_S_i_m_p_l_e_W_i_n_d_o_w Τ줫Ƥֻǥɥ
(create)ɬΥ٥Ȥȯ롣

_C_r_e_a_t_e_N_o_t_i_f_y ٥Ȥˤϡɥ event-mask
° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롣餫λҥ
ɥĤФȡ٥Ȥȯ롣

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* CreateNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window parent;           /* parent of the window */
     Window window;           /* window id of window created */
     int x, y;                /* window location */
     int width, height;       /* size of window */
     int border_width;        /* border width */
     Bool override_redirect;  /* creation should be overridden */
} XCreateWindowEvent;

||__

parent СϺ줿ɥοƥɥꤵ
롣 window СϺ줿ɥꤵ롣 x
 y СϺ줿ɥΤοƥɥθ
ФФκɸꤵ졢줿ɥκѤ
¦ΰ֤򼨤 width  height СϺ줿
ɥ¦礭ʥܡޤޤʤˤꤵ졢ɬ
ʳͤ border_width СϺ줿ɥ
ܡꤵ졢ԥͤ override_redirect 
Сϥɥ override-redirect °ꤵ롣
ɥޥ͡㡼饤Ȥϡoverride_redirect 
 _T_r_u_e Ǥ뤳Υɥ̵̾뤹٤

00..1100..44..  DDeessttrrooyyNNoottiiffyy EEvveennttss

X Сϥɥ˴(destoroy)ȸ׵
륯饤Ȥ _D_e_s_t_r_o_y_N_o_t_i_f_y ٥ȤΤ롣 X 
Сϡ饤ȥץꥱ _X_D_e_s_t_r_o_y_W_i_n_d_o_w 
_X_D_e_s_t_r_o_y_S_u_b_w_i_n_d_o_w_s Τ줫Ƥֻǥɥ
(destoroy)ɬΥ٥Ȥȯ롣











                            -31-


ɤʥɥˤ⡢ _D_e_s_t_r_o_y_N_o_t_i_f_y ٥Ȥνϡ
ȤΥɥ _D_e_s_t_r_o_y_N_o_t_i_f_y ȯ˥
ɥΤ٤Ƥβ̳إɥȯ롣 X ץ
ϡ復ɥ֤ƥֳؤ٤äơ
ʤ

_D_e_s_t_r_o_y_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥ
οƥɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k
ӥåȤꤹ롣ʤΤФ˴(destoroy)벿餫
ҥɥ٥Ȥȯˡ

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* DestroyNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
} XDestroyWindowEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơƹۤ륦ɥ
οƥɥΤɤ餫ꤵ롣 window Сϡ
(destoroy)줿ɥꤵ롣

00..1100..55..  GGrraavviittyyNNoottiiffyy EEvveennttss

X СϡɥοƥɥΥѤä
˥ɥưȸ׵᤹륯饤
 _G_r_a_v_i_t_y_N_o_t_i_f_y ٥ȤΤ롣 X Сϡ饤
ȥץꥱ _X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w
_X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w _X_R_e_s_i_z_e_W_i_n_d_o_w Τ줫ƤֻǤο
ɥΥꥵη̤Ȥƻҥɥºݤư
ɬΥ٥Ȥȯ롣

_G_r_a_v_i_t_y_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥ
οƥɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k
ӥåȤꤹ롣ʤΤФ餫λҥɥ
ƥɥꥵ뤿˰ưȡ٥Ȥȯ
ˡ

Υ٥ȷ(type)Τι¤Τʲ˼:













                            -32-

__
||
typedef struct {
     int type;                /* GravityNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     int x, y;
} XGravityEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơư륦ɥ
ƥɥΤɤ餫ꤵ롣 window Сϡư
줿ɥꤵ롣 x  y СϿƥɥ
θФкɸꤵ졢ɥκѤγ¦
֤򼨤

00..1100..66..  MMaappNNoottiiffyy EEvveennttss

X Сϡɥޥåפ줿ȸ׵᤹륯
饤Ȥ _M_a_p_N_o_t_i_f_y ٥ȤΤ롣 X Сϡ
饤ȥץꥱ _X_M_a_p_W_i_n_d_o_w _X_M_a_p_R_a_i_s_e_d
_X_M_a_p_S_u_b_w_i_n_d_o_w_s _X_R_e_p_a_r_e_n_t_W_i_n_d_o_w Τ줫Ƥֻǡ
ϥ֥åȤνη̤Ȥƥɥξ֤򥢥ޥ
(unmap)ޥå(map)ѹɬΥ٥
(type)ȯ롣

_M_a_p_N_o_t_i_f_y ٥Ȥˤϡɥ event-mask °
 _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥοƥ
ɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤ
ꤹ롣ʤΤФޥå(map)벿餫λҥ
٥Ȥȯˡ

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* MapNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     Bool override_redirect;  /* boolean, is override set... */
} XMapEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơޥå(map)줿









                            -33-


οƥɥΤɤ餫ꤵ롣 window С
ϡޥå(map)줿ɥꤵ롣 override_redi-
rect Сϥɥ override-redirect °ꤵ
롣ɥޥ͡㡼饤Ȥϡoverride_redirect
С _T_r_u_e Ǥ뤳Υɥ̵̾뤹٤
because these events usually are generated from pop-ups,
which override structure control.

00..1100..77..  MMaappppiinnggNNoottiiffyy EEvveennttss

X СϤ٤ƤΥ饤Ȥ _M_a_p_p_i_n_g_N_o_t_i_f_y ٥Ȥ
Τ롣Υ٥ȤΤݤˡϤʤ X 
ϥ饤ȥץꥱ󤬰ʲθƽФ
ɬΥ٥ȷ(type)ȯ:

+o    _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g ϡǥե(modifier)Ȥ
     Ȥ KeyCode ꤹ롣

+o    _X_S_e_t_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g ϡܡɥޥåԥ󥰤ѹ
     롣

+o    _X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g ϡݥ󥿡ޥåԥ󥰤ѹ롣

_X_S_e_t_P_o_i_n_t_e_r_M_a_p_p_i_n_g ϡݥ󥿡ޥåԥ󥰤ѹ롣

__
||
typedef struct {
     int type;                /* MappingNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;           /* unused */
     int request;             /* one of MappingModifier, MappingKeyboard,
                                 MappingPointer */
     int first_keycode;       /* first keycode */
     int count;               /* defines range of change w. first_keycode*/
} XMappingEvent;

||__

request СϡɤΥޥåԥѹäꤵ
졢 _M_a_p_p_i_n_g_M_o_d_i_f_i_e_r _M_a_p_p_i_n_g_K_e_y_b_o_a_r_d _M_a_p_p_i_n_g_P_o_i_n_t_e_r Τ
줫Ǥ롣 _M_a_p_p_i_n_g_M_o_d_i_f_i_e_r ʤСǥե
(modifier)ޥåԥ󥰤ѹ줿 _M_a_p_p_i_n_g_K_e_y_b_o_a_r_d ʤ
Сܡɥޥåԥ󥰤ѹ줿 _M_a_p_p_i_n_g_P_o_i_n_t_e_r ʤ
Сݥ󥿡ܥޥåԥ󥰤ѹ줿 first_keycode
 count Сϡ request С _M_a_p_p_i_n_g_K_e_y_b_o_a_r_d 
ꤵ줿ˤΤߡꤵ롣 first_keycode οϡ
줿ޥåԥ󥰤ϰϤκǽοɽ

饤ȥץꥱΥܡɤξ򹹿뤿
ˡʤ _X_R_e_f_r_e_s_h_K_e_y_b_o_a_r_d_M_a_p_p_i_n_g Ƥ֤٤










                            -34-


00..1100..88..  RReeppaarreennttNNoottiiffyy EEvveennttss

X СϡɥοƥɥѤäȸ
׵᤹륯饤Ȥ _R_e_p_a_r_e_n_t_N_o_t_i_f_y ٥ȤΤ롣 X
Сϡ饤ȥץꥱ _X_R_e_p_a_r_e_n_t_W_i_n_d_o_w
Ƥӡºݤ˥ɥοƤѤ(reparent)ɬΥ
٥Ȥȯ롣

_R_e_p_a_r_e_n_t_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥ
ο줤줫οƥɥ event-mask ° _S_u_b_s_t_r_u_c_-
_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롣ʤΤФƥɥ
ѹ(reparent)餫λҥɥ٥Ȥȯ
ˡ

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* ReparentNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     Window parent;
     int x, y;
     Bool override_redirect;
} XReparentEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơɥο줤
οƥɥꤵ롣 window Сϡƥ
ѹ줿(reparent)ɥꤵ롣 parent 
Сϡƥɥꤵ롣 x  y СϿ
ƥɥθФкɸꤵ졢ɥ
κѤγ¦ΰ֤򼨤 override_redirect С
window СˤäƼ륦ɥ override-redi-
rect °ꤵ롣 _T_r_u_e.  ɥޥ͡㡼饤
Ȥϡoverride_redirect С _T_r_u_e Ǥ뤳Υ
ɥ̵̾뤹٤

00..1100..99..  UUnnmmaappNNoottiiffyy EEvveennttss

X Сϡɥޥå(unmap)줿ȸ
׵᤹륯饤Ȥ _U_n_m_a_p_N_o_t_i_f_y ٥ȤΤ롣 X
Сϡɥξ֤ޥå(map)饢ޥ
(unmap)ѲɬΥ٥ȷ(type)ȯ롣

_U_n_m_a_p_N_o_t_i_f_y ٥Ȥˤϡɥ event-mask
° _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥåȤꤹ롢뤤Ϥο









                            -35-


ɥ event-mask ° _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y_M_a_s_k ӥå
ꤹ롣ʤΤФޥå(unmap)벿餫λ
ɥ٥Ȥȯˡ

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* UnmapNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window event;
     Window window;
     Bool from_configure;
} XUnmapEvent;

||__

event Сϡ _S_t_r_u_c_t_u_r_e_N_o_t_i_f_y  _S_u_b_s_t_r_u_c_t_u_r_e_N_o_t_i_f_y 
줬򤵤Ƥ뤫ˤäơޥå(unmap)줿
ɥοƥɥΤɤ餫ꤵ롣ϡX
С٥ȤΤΤ˻Ȥ륦ɥ win-
dow Сϡޥå(unmap)줿ɥꤵ
롣 from_configure СϡΥɥȤ
win_gravity ٥ȤɥοƤΥꥵ
(resize)η̤Ȥȯ줿ʤСåȤ롣

00..1100..1100..  VViissiibbiilliittyyNNoottiiffyy EEvveennttss

X Сϡꤵ줿ɥβĻ(visibility)β
Ѳ˴ؤ׵᤹륯饤Ȥ _V_i_s_i_b_i_l_i_t_y_N_o_-
_t_i_f_y ٥ȤΤ롣ɥΰϡ꡼
ºݤ˸ΤʤСĻ(visible) X С
ϡĻ(visibility)ѲɬΥ٥Ȥȯ
롣ʤ顢Υ٥Ȥϥ饹 _I_n_p_u_t_O_n_l_y Υ
ɥˤФȯʤ

ع¤Ѳˤ뤹٤Ƥ _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥Ȥϡ
ѲˤäƵ볬ع¤٥ (_U_n_m_a_p_N_o_t_i_f_y
_M_a_p_N_o_t_i_f_y _C_o_n_f_i_g_u_r_e_N_o_t_i_f_y _G_r_a_v_i_t_y_N_o_t_i_f_y
_C_i_r_c_u_l_a_t_e_N_o_t_i_f_y) θȯ롣ǡʤ륦ɥǤβ
 _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥ȤϥɥǤ _E_x_p_o_s_e 
Ȥȯ롢Ϥ٤ƤΥɥǤ
٤Ƥ _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥Ȥ٤ƤΥɥǤ
٤Ƥ _E_x_p_o_s_e ٥ȤȯɬפȤ
 X ץȥˤϡ _F_o_c_u_s_O_u_t _E_n_t_e_r_N_o_t_i_f_y _L_e_a_v_e_N_o_t_i_f_y
٥ȤФ _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥ȤνϴޤޤƤ
ʤ

_V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥Ȥˤϡɥ event-
mask ° _V_i_s_i_b_i_l_i_t_y_C_h_a_n_g_e_M_a_s_k ӥåȤꤹ롣










                            -36-


Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* VisibilityNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     int state;
} XVisibilityEvent;

||__

window СϲĻ(visibility)ξ֤Ѳ
ꤵ롣 state СϥɥβĻ
(visibility)ꤵ졢 _V_i_s_i_b_i_l_i_t_y_U_n_o_b_s_c_u_r_e_d
_V_i_s_i_b_i_l_i_t_y_P_a_r_t_i_a_l_l_y_O_b_s_c_u_r_e_d _V_i_s_i_b_i_l_i_t_y_F_u_l_l_y_O_b_s_c_u_r_e_d Τ
줫 X СϡɥβĻ(visibility)
Ȳʪˤ _V_i_s_i_b_i_l_i_t_y_N_o_t_i_f_y ٥Ȥνλˡ
ɥΤ٤ƤΥ֥ɥ̵뤹:

+o    ɥʬŪʱ(obscure)ʱ
     (obscure)ɽǽ(viewable)Ǥ̵Τ줫ξ
     顢ɽǽ(viewable)(obscure)Ƥʤ
     ֤Ѥ X С _X_V_i_s_i_b_i_l_i_t_y_E_v_e_n_t ¤Τ
     state С _V_i_s_i_b_i_l_i_t_y_U_n_o_b_s_c_u_r_e_d ꤷΥ
     ٥Ȥȯ롣

+o    ɥɽǽ(viewable)Ǵʱ(obscure)
     ɽǽ(viewable)Ǥ̵Τ줫ξ֤顢ɽ
     ǽ(viewable)ʬŪʱ(obscure)ξ֤Ѥ X
     С _X_V_i_s_i_b_i_l_i_t_y_E_v_e_n_t ¤Τ state С
     _V_i_s_i_b_i_l_i_t_y_P_a_r_t_i_a_l_l_y_O_b_s_c_u_r_e_d ꤷΥ٥Ȥȯ
     롣

+o    ɥɽǽ(viewable)(obscure)
     Ƥʤ֡ɽǽ(viewable)ʬŪ˱
     (obscure)Ƥ֡ɽǽ(viewable)Ǥ̵
     줫ξ֤顢ɽǽ(viewable)Ǵʱ
     (obscure)ξ֤Ѥ X С _X_V_i_s_i_b_i_l_i_-
     _t_y_E_v_e_n_t ¤Τ state С _V_i_s_i_b_i_l_i_t_y_F_u_l_l_y_O_b_-
     _s_c_u_r_e_d ꤷΥ٥Ȥȯ롣

00..1111..  SSttrruuccttuurree CCoonnttrrooll EEvveennttss

This section discusses:

+o    _C_i_r_c_u_l_a_t_e_R_e_q_u_e_s_t events

+o    _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t events











                            -37-


+o    _M_a_p_R_e_q_u_e_s_t events

+o    _R_e_s_i_z_e_R_e_q_u_e_s_t events

00..1111..11..  CCiirrccuullaatteeRReeqquueesstt EEvveennttss

X Сϡ¾Υ饤Ȥꤷɥǥ
۴(circulate) ꥯȤ򵯤ˤξ׵ᤷƤ
륯饤Ȥ _C_i_r_c_u_l_a_t_e_R_e_q_u_e_s_t ٥ȤΤ롣 X 
Сϡ饤Ȥɥȥ֥ɥǼºݤ˺
å(restack)ɬפ륦ɥ۴(circulate)ꥯ
Ȥ򵯤ɬΥ٥ȷ(type)ȯ롣饤
Ȥ _X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s _X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s_U_p
_X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s_D_o_w_n Τ줫Ƥֻǥɥ˥
ɥ۴(circulate)ꥯȤ򵯤

_C_i_r_c_u_l_a_t_e_R_e_q_u_e_s_t ٥ȤˤϡɥΥ٥
ȥޥ° _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k ӥåȤꤹ롣
줫龭衢ΥɥǤΥɥ۴(circulate)
Ȥϼ¹ԤʤơΤ褦˥åβ
Υ֥ɥΰ֤ѹʤ㤨С饤
ץꥱ󤬥֥ɥ򥹥åΥȥåפ˾夲뤿
 _X_C_i_r_c_u_l_a_t_e_S_u_b_w_i_n_d_o_w_s_U_p Ƥ֤Τ衣ʤ
_S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k 򤷤ɥäƤ
ȡ X СϤʤ˥٥ȤΤ֥ɥ
åΥȥåפ˾夲ʤ

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* CirculateRequest */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window parent;
     Window window;
     int place;               /* PlaceOnTop, PlaceOnBottom */
} XCirculateRequestEvent;

||__

parent СϿƥɥꤵ롣 window С
Ϻƥå줿֥ɥꤵ롣 place 
ϥåå󥰥ˤ뿷֤ꤵ졢
_P_l_a_c_e_O_n_T_o_p  _P_l_a_c_e_O_n_B_o_t_t_o_m Τ줫 _P_l_a_c_e_O_n_T_o_p ʤ
С֥ɥϤ٤Ƥη復ɥξˤ٤
_P_l_a_c_e_O_n_B_o_t_t_o_m ʤС֥ɥϤ٤Ƥη復ɥ
βˤ٤













                            -38-


00..1111..22..  CCoonnffiigguurreeRReeqquueesstt EEvveennttss

X Сϡۤʤ륯饤ȤΥɥβ餫
ҥɥǥɥ(configure)ꥯȤ򵯤
ˤξ׵᤹륯饤Ȥ _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t ٥
Τ롣ɥ(configure)ꥯȤϡ
Υ֡ܡåå󥰥κƹ
(reconfigure)ߤޤ X Сϡۤʤ륯饤
 _X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w _X_L_o_w_e_r_W_i_n_d_o_w _X_R_a_i_s_e_W_i_n_d_o_w
_X_M_a_p_R_a_i_s_e_d _X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w _X_M_o_v_e_W_i_n_d_o_w
_X_R_e_s_i_z_e_W_i_n_d_o_w _X_R_e_s_t_a_c_k_W_i_n_d_o_w_s _X_S_e_t_W_i_n_d_o_w_B_o_r_d_e_r_W_i_d_t_h 
ֻǥɥǥɥۥꥯȤ򵯤ɬ
Υ٥Ȥȯ롣

_C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t ٥Ȥˤϡɥ event-
mask ° _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k ӥåȤꤹ롣 _C_o_n_-
_f_i_g_u_r_e_R_e_q_u_e_s_t ٥Ȥϡ̤Υ饤Ȥˤäƻҥ
 _C_o_n_f_i_g_u_r_e_W_i_n_d_o_w ץȥꥯȤФ줿ȯ
롣㤨С饤ȥץꥱ󤬥ɥ
 _X_L_o_w_e_r_W_i_n_d_o_w Ƥ֤Τ衣ʤ _S_u_b_s_t_r_u_c_t_u_r_-
_e_R_e_d_i_r_e_c_t_M_a_s_k 򤷤ɥΥɥ
override-redirect ° _F_a_l_s_e ꤵƤʤСX 
СϤʤ _C_o_n_f_i_g_u_r_e_R_e_q_u_e_s_t ٥ȤΤꤵ
ɥ򲼤ʤ

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* ConfigureRequest */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window parent;
     Window window;
     int x, y;
     int width, height;
     int border_width;
     Window above;
     int detail;              /* Above, Below, TopIf, BottomIf, Opposite */
     unsigned long value_mask;
} XConfigureRequestEvent;

||__

parent СϿƥɥꤵ롣 window С
ϡ֡ܡåå󥰥ƹ
(reconfigure)줿ɥꤵ롣 value_mask 
Сϡ _C_o_n_f_i_g_u_r_e_W_i_n_d_o_w ץȥꥯȤɤΥ
ꤹΤɽбͤϥꥯȤͿƤ
ʪΤ롣餬ꥯȤͿʤʤС
_N_o_n_e  _A_b_o_v_e Τ above(復ɥ) detail(
å⡼)ξĤͤϡߤΥɥΥ









                            -39-


ȥ(geometry)Ϳ롣

00..1111..33..  MMaappRReeqquueesstt EEvveennttss

X Сϡۤʤ륯饤Ȥɥޥå(map)
褦ȤƤȸ׵᤹륯饤Ȥ _M_a_p_R_e_q_u_e_s_t
٥ȤΤ롣ɥϡɥޥå(map)ꥯ
Ȥλޥå(map)줿ȸ롣 X С
ϡۤʤ륯饤Ȥ _F_a_l_s_e ꤵƤ over-
ride_redirect Сĥޥå(unmap) ɥ
ɥޥå(map)ꥯȤ򵯤ɬΥ٥
Ȥȯ롣饤Ȥ _X_M_a_p_W_i_n_d_o_w _X_M_a_p_R_a_i_s_e_d _X_M_a_p_-
_S_u_b_w_i_n_d_o_w_s Τ줫Ƥֻǥɥޥå(map)ꥯ
Ȥ򵯤

_M_a_p_R_e_q_u_e_s_t ٥Ȥˤϡɥ event-mask
° _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k ӥåȤꤹ롣ˡ
ǡ¾Υ饤Ȥɥޥå(map)ꥯȵǽ
Ƥֻǻҥɥޥå(map)ߤǤʤ
 _M_a_p_R_e_q_u_e_s_t 롣㤨С饤ȥץꥱ
󤬥ɥޥå(map)뤿 _X_M_a_p_W_i_n_d_o_w 
֤Τ衣ʤ(̥ɥޥ͡)ƥ
 _S_u_b_s_t_r_u_c_t_u_r_e_R_e_d_i_r_e_c_t_M_a_s_k 򤷤ƤơΥɥ
 override-redirect ° _F_a_l_s_e ꤵƤΤʤ
СX СϤʤ _M_a_p_R_e_q_u_e_s_t Τơꤵ줿
ɥϥޥå(map)ʤΥ٥ȤϡʤΥ
ɥޥ͡㡼饤Ȥ˥֥ɥ֤椹
ǽϤͿ롣

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* MapRequest */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window parent;
     Window window;
} XMapRequestEvent;

||__

parent СϿƥɥꤵ롣 window С
ϥޥå(map)줿֥ɥꤵ롣

00..1111..44..  RReessiizzeeRReeqquueesstt EEvveennttss

X Сϡ¾Υ饤ȤɥΥѹ
ȤƤȸ׵᤹륯饤Ȥ _R_e_s_i_z_e_R_e_q_u_e_s_t
٥ȤΤ롣 X Сϡ¾Υ饤Ȥ
_X_C_o_n_f_i_g_u_r_e_W_i_n_d_o_w _X_R_e_s_i_z_e_W_i_n_d_o_w _X_M_o_v_e_R_e_s_i_z_e_W_i_n_d_o_w Τ
줫ƤֻΥɥΥѹ褦Ȥ









                            -40-


ɬΥ٥Ȥȯ롣

_R_e_s_i_z_e_R_e_q_u_e_s_t ٥Ȥˤϡɥ event-
mask ° _R_e_s_i_z_e_R_e_d_i_r_e_c_t ӥåȤꤹ롣¾Υ饤
Ȥˤ륵ѹ褦Ȥ벿餫λߤϤλ˥
쥯Ȥ롣

Υ٥ȤΤι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* ResizeRequest */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     int width, height;
} XResizeRequestEvent;

||__

window Сϥ¾Υ饤ȤѤ褦˻
ɥꤵ롣 width  height Сϥ
ɥ¦Υꤵ롢ܡ롣

00..1122..  CCoolloorrmmaapp SSttaattee CChhaannggee EEvveennttss

X Сϡ顼ޥå(colormap)Ѥȸȥ
ޥå(colormap)󥹥ȡ뤵뤢뤤ϥ󥤥󥹥ȡ
뤵ȸ׵᤹륯饤Ȥ _C_o_l_o_r_m_a_p_N_o_t_i_f_y 
٥ȤΤ롣 X Сϥ饤ȥץꥱ
ʲλ򤹤ϤĤ⤳Υ٥ȷ(type)ȯ:

+o    _X_C_h_a_n_g_e_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s _X_F_r_e_e_C_o_l_o_r_m_a_p _X_S_e_t_W_i_n_d_o_w_-
     _C_o_l_o_r_m_a_p Τ줫Ƥֻ _X_S_e_t_W_i_n_d_o_w_A_t_t_r_i_b_u_t_e_s ¤
     Τ colormap Сѹ롣

+o    _X_I_n_s_t_a_l_l_C_o_l_o_r_m_a_p  _X_U_n_i_n_s_t_a_l_l_C_o_l_o_r_m_a_p Ƥֻǥ顼
     ޥå(colormap)򥤥󥹥ȡ뤷ꥢ󥤥󥹥ȡ뤹
     롣

_C_o_l_o_r_m_a_p_N_o_t_i_f_y ˤϥɥ event-mask °
_C_o_l_o_r_m_a_p_C_h_a_n_g_e_M_a_s_k ӥåȤꤹ롣

Υ٥ȤΤι¤Τʲ˼:

















                            -41-

__
||
typedef struct {
     int type;                /* ColormapNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     Colormap colormap;       /* colormap or None */
     Bool new;
     int state;               /* ColormapInstalled, ColormapUninstalled */
} XColormapEvent;

||__

window СϴϢŤ줿顼ޥå(colormap)ѹ
줿󥹥ȡ뤵줿󥤥󥹥ȡ뤵줿ɥ
ꤵ롣顼ޥå(colormap)ѹ롢󥹥
뤵롢󥤥󥹥ȡ뤵Τ줫ʤСcolormap
СϤΥɥ˴ϢŤ줿Υ顼ޥ
(colormap)ꤵ롣顼ޥå(colormap) _X_F_r_e_e_C_o_l_-
_o_r_m_a_p Ƥֻѹ줿ʤСcolormap С _N_o_n_e
ꤵ롣 new СϡꤷɥΥ顼
ޥå(colormap)ѹ󥹥ȡ롢󥤥󥹥ȡΤ
줬Ԥʤ줿򼨤褦ꤵ졢 _T_r_u_e  _F_a_l_s_e Τ
줫 _T_r_u_e ʤС顼ޥå(colormap)ѹ줿
_F_a_l_s_e ʤС顼ޥå(colormap)ϥ󥹥ȡ롢󥤥
ȡΤ줫Ԥʤ줿 state Сϡ顼
ޥå(colormap)󥹥ȡ롢󥤥󥹥ȡΤ줬
ʤ줿Τ򼨤褦ɬꤵ졢 _C_o_l_o_r_m_a_p_I_n_s_t_a_l_l_e_d 
_C_o_l_o_r_m_a_p_U_n_i_n_s_t_a_l_l_e_d Τ줫

00..1133..  CClliieenntt CCoommmmuunniiccaattiioonn EEvveennttss

This section discusses:

+o    _C_l_i_e_n_t_M_e_s_s_a_g_e events

+o    _P_r_o_p_e_r_t_y_N_o_t_i_f_y events

+o    _S_e_l_e_c_t_i_o_n_C_l_e_a_r events

+o    _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y events

+o    _S_e_l_e_c_t_i_o_n_R_e_q_u_e_s_t events

00..1133..11..  CClliieennttMMeessssaaggee EEvveennttss

X Сϡ饤Ȥ _X_S_e_n_d_E_v_e_n_t ǽƤˤΤ
_C_l_i_e_n_t_M_e_s_s_a_g_e ٥Ȥȯ롣

Υ٥ȤΤι¤Τʲ˼:












                            -42-

__
||
typedef struct {
     int type;                /* ClientMessage */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     Atom message_type;
     int format;
     union {
          char b[20];
          short s[10];
          long l[5];
             } data;
} XClientMessageEvent;

||__

message_type Сϥǡä饤Ȥɤ
Ф򼨤ȥ(atom)ꤵ롣 format 
 81632 Τ줫ꤵ졢ǡ
byteshortlong ΤΥꥹȤȤƸ٤ؼ
롣 data СϥС bsl ޤඦΤ
bsl С 20 Ĥ 8 ӥåȡ10 Ĥ 16 ӥåȡ5 
 32 ӥåȤΥǡɽƤ롣Υå
(type)Ϥ餹٤ƤͤѤʤ X С
windowmessage_typedata СͤβԤʤ


00..1133..22..  PPrrooppeerrttyyNNoottiiffyy EEvveennttss

X СϡꤷɥΥץѥƥ(property)
ˤĤƤξ׵᤹륯饤Ȥ _P_r_o_p_e_r_t_y_N_o_t_i_f_y 
ȤΤ롣

_P_r_o_p_e_r_t_y_N_o_t_i_f_y ٥Ȥˤϡˤϥ
ɥ event-mask ° _P_r_o_p_e_r_t_y_C_h_a_n_g_e_M_a_s_k ӥåȤꤹ
롣

Υ٥ȤΤι¤Τʲ˼:























                            -43-

__
||
typedef struct {
     int type;                /* PropertyNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     Atom atom;
     Time time;
     int state;               /* PropertyNewValue or PropertyDelete */
} XPropertyEvent;

||__

window СϴϢŤ줿ץѥƥ(property)Ѥ
줿ɥꤵ롣 atom Сϥץѥƥ
(property)Υȥ(atom)ꤵ졢ɤΥץѥƥ
(property)Ѥ줢뤤˾ޤƤ뤫򼨤 time 
Сϥץѥƥ(property)ѹ줿ΥС֤
ꤵ롣 state Сϥץѥƥ(property)
ͤѹΤ줫򼨤褦ꤵ졢 _P_r_o_p_e_r_-
_t_y_N_e_w_V_a_l_u_e  _P_r_o_p_e_r_t_y_D_e_l_e_t_e Τ줫 state С
ϡ _X_C_h_a_n_g_e_P_r_o_p_e_r_t_y  _X_R_o_t_a_t_e_W_i_n_d_o_w_P_r_o_p_e_r_t_i_e_s Τ줫
ȤäƥɥΥץѥƥ(property)ѹ줿ȡ
_X_C_h_a_n_g_e_P_r_o_p_e_r_t_y ȤäĹΥǡɲä
ˡ _X_C_h_a_n_g_e_P_r_o_p_e_r_t_y  _X_R_o_t_a_t_e_W_i_n_d_o_w_P_r_o_p_e_r_t_i_e_s ȤäƱ
ǡΤ٤Ƥ뤤ϰΥץѥƥ(property)֤
ˡ _P_r_o_p_e_r_t_y_N_e_w_V_a_l_u_e ꤵ롣 state С
_X_D_e_l_e_t_e_P_r_o_p_e_r_t_y 䡢 _T_r_u_e  _X_G_e_t_W_i_n_d_o_w_P_r_o_p_e_r_t_y Ȥ
ƥɥΥץѥƥ(property)ˡ _P_r_o_p_-
_e_r_t_y_D_e_l_e_t_e ꤵ롣

00..1133..33..  SSeelleeccttiioonnCClleeaarr EEvveennttss

X Сϡ쥯(selection)νͭ(ownership)
ä饤Ȥˡ _S_e_l_e_c_t_i_o_n_C_l_e_a_r ٥ȤΤ롣 X
Сϡ¾Υ饤Ȥ _X_S_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r Ƥֻ
쥯(selection)νͭ(ownership)׵(assert) 
ɬΥ٥ȷ(type)ȯ롣

Υ٥ȤΤι¤Τʲ˼:






















                            -44-

__
||
typedef struct {
     int type;                /* SelectionClear */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window window;
     Atom selection;
     Time time;
} XSelectionClearEvent;

||__

selection Сϥ쥯(selection)Υȥ(atom)
ꤵ롣 time Сϥ쥯(selection)˵Ͽ
Ƥǽѹ֤ꤵ롣 window Сϡߤ
ͭԡʥ쥯(selection)򼺤äƤͭ(owner)ˤ
_X_S_e_t_S_e_l_e_c_t_i_o_n_O_w_n_e_r ǻꤷɥꤵ롣

00..1133..44..  SSeelleeccttiioonnRReeqquueesstt EEvveennttss

X Сϥ쥯(selection)νͭ(owner) _S_e_l_e_c_-
_t_i_o_n_R_e_q_u_e_s_t ٥ȤΤ롣 X Сϡ饤
ȤΥ쥯(selection) _X_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n Ƥֻ
Ѵ׵᤹ɬ _X_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n ٥Ȥ
ȯ롣

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* SelectionRequest */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window owner;
     Window requestor;
     Atom selection;
     Atom target;
     Atom property;
     Time time;
} XSelectionRequestEvent;

||__

owner СϡߤνͭԤθƤӽФˤƻꤷ
ɥꤵ롣 requestor Сϡ쥯
(selection)׵ᤷƤ륦ɥꤵ롣 selec-
tion Сϡ쥯(selection)ꤹ륢
(atom)ꤵ롣㤨СPRIMARY ϥץ饤
(primary)쥯(selection)򼨤˻Ȥ롣
target Сϡ쥯(selection) ˵Ƥ
(type)ꤹ륢ȥ(atom)ꤵ롣 property 









                            -45-


ϡץѥƥ(property)̾뤤ϤǤ롣 time 
Сϡॹפ뤤ϥꥯȤ줿ͤ
롣

ͭ(owner)ϡꤵ줿ɸȤʤ뷿(type)˴Ť
 (selection)Ѵơrequestor  _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y
٥Ȥ֤٤쥯(selection)Ȥ
δʵʤϡX 󥽡൬ _I_n_t_e_r_-_C_l_i_e_n_t _C_o_m_m_u_n_i_c_a_-
_t_i_o_n _C_o_n_v_e_n_t_i_o_n_s _M_a_n_u_a_l Ϳ롣

00..1133..55..  SSeelleeccttiioonnNNoottiiffyy EEvveennttss

_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n Υ٥Ȥϡ쥯(selection)ν
ͭԤǤϤʤ饤Ȥ _C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n ץȥꥯ
Ȥؤ X Сˤäȯ롣ͭ(owner)
ʤС _X_S_e_n_d_E_v_e_n_t Ȥäƥ쥯(selection)ν
ͭ(owner)ˤäȯ롣쥯(selection)νͭ
(owner)ϡ쥯(selection)Ѵ졢ץѥƥ
(property)Ȥ¸줿뤤ϥ쥯
(selection)ѴǤʤäproperty С _N_o_n_e
ꤹǼ˻ˡꥯȤ򵯤饤
ȤˤΥ٥Ȥ٤

_C_o_n_v_e_r_t_S_e_l_e_c_t_i_o_n ץȥꥯȤǥץѥƥ
(property)Ȥ _N_o_n_e ꤵ줿ʤ顢ͭ(owner)
ѥƥ(property)̾ӡꥯ(requestor)Υ
ɥǷ̤ץѥƥ(property)Ȥ¸ºݤΥץ
ѥƥ(property)̾Ϳ _S_e_l_e_c_t_i_o_n_N_o_t_i_f_y ٤

Υ٥ȷ(type)Τι¤Τʲ˼:

__
||
typedef struct {
     int type;                /* SelectionNotify */
     unsigned long serial;    /* # of last request processed by server */
     Bool send_event;         /* true if this came from a SendEvent request */
     Display *display;        /* Display the event was read from */
     Window requestor;
     Atom selection;
     Atom target;
     Atom property;           /* atom or None */
     Time time;
} XSelectionEvent;

||__

requestor Сϡ쥯(selection)׵ᤷ
Ȥ˴ϢŤ줿ɥꤵ롣 The selec-
tion member is set to the atom that indicates the selection.
selection Сϡ쥯(selection)򼨤
(atom)ꤵ롣㤨СPRIMARY ϥץ饤
(primary)쥯(selection)Τ˻Ȥ롣 target
СϡѴ뷿򼨤ȥ(atom)ꤵ롣㤨









                            -46-


СPIXMAP ϥԥåޥåפΤ˻Ȥ롣 property 
Сϡ̤ɤΥץѥƥ¸Τ򼨤
(atom) ꤵ롣Ѵ˼ԤʤСproperty 
 _N_o_n_e ꤵ롣 time СϡѴä
ꤵ졢ॹפ _C_u_r_r_e_n_t_T_i_m_e 


























































                            -47-






























































