Blame man/XCrossingEvent.man

Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission is hereby granted, free of charge, to any person obtaining
Packit 5bd3a9
.\" a copy of this software and associated documentation files (the
Packit 5bd3a9
.\" "Software"), to deal in the Software without restriction, including
Packit 5bd3a9
.\" without limitation the rights to use, copy, modify, merge, publish,
Packit 5bd3a9
.\" distribute, sublicense, and/or sell copies of the Software, and to
Packit 5bd3a9
.\" permit persons to whom the Software is furnished to do so, subject to
Packit 5bd3a9
.\" the following conditions:
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" The above copyright notice and this permission notice shall be included
Packit 5bd3a9
.\" in all copies or substantial portions of the Software.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 5bd3a9
.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 5bd3a9
.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Packit 5bd3a9
.\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit 5bd3a9
.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit 5bd3a9
.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit 5bd3a9
.\" OTHER DEALINGS IN THE SOFTWARE.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Except as contained in this notice, the name of the X Consortium shall
Packit 5bd3a9
.\" not be used in advertising or otherwise to promote the sale, use or
Packit 5bd3a9
.\" other dealings in this Software without prior written authorization
Packit 5bd3a9
.\" from the X Consortium.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by
Packit 5bd3a9
.\" Digital Equipment Corporation
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Portions Copyright \(co 1990, 1991 by
Packit 5bd3a9
.\" Tektronix, Inc.
Packit 5bd3a9
.\"
Packit 5bd3a9
.\" Permission to use, copy, modify and distribute this documentation for
Packit 5bd3a9
.\" any purpose and without fee is hereby granted, provided that the above
Packit 5bd3a9
.\" copyright notice appears in all copies and that both that copyright notice
Packit 5bd3a9
.\" and this permission notice appear in all copies, and that the names of
Packit 5bd3a9
.\" Digital and Tektronix not be used in in advertising or publicity pertaining
Packit 5bd3a9
.\" to this documentation without specific, written prior permission.
Packit 5bd3a9
.\" Digital and Tektronix makes no representations about the suitability
Packit 5bd3a9
.\" of this documentation for any purpose.
Packit 5bd3a9
.\" It is provided ``as is'' without express or implied warranty.
Packit 5bd3a9
.\" 
Packit 5bd3a9
.\"
Packit 5bd3a9
.ds xT X Toolkit Intrinsics \- C Language Interface
Packit 5bd3a9
.ds xW Athena X Widgets \- C Language X Toolkit Interface
Packit 5bd3a9
.ds xL Xlib \- C Language X Interface
Packit 5bd3a9
.ds xC Inter-Client Communication Conventions Manual
Packit 5bd3a9
.na
Packit 5bd3a9
.de Ds
Packit 5bd3a9
.nf
Packit 5bd3a9
.\\$1D \\$2 \\$1
Packit 5bd3a9
.ft CW
Packit 5bd3a9
.\".ps \\n(PS
Packit 5bd3a9
.\".if \\n(VS>=40 .vs \\n(VSu
Packit 5bd3a9
.\".if \\n(VS<=39 .vs \\n(VSp
Packit 5bd3a9
..
Packit 5bd3a9
.de De
Packit 5bd3a9
.ce 0
Packit 5bd3a9
.if \\n(BD .DF
Packit 5bd3a9
.nr BD 0
Packit 5bd3a9
.in \\n(OIu
Packit 5bd3a9
.if \\n(TM .ls 2
Packit 5bd3a9
.sp \\n(DDu
Packit 5bd3a9
.fi
Packit 5bd3a9
..
Packit 5bd3a9
.de IN		\" send an index entry to the stderr
Packit 5bd3a9
..
Packit 5bd3a9
.de Pn
Packit 5bd3a9
.ie t \\$1\fB\^\\$2\^\fR\\$3
Packit 5bd3a9
.el \\$1\fI\^\\$2\^\fP\\$3
Packit 5bd3a9
..
Packit 5bd3a9
.de ZN
Packit 5bd3a9
.ie t \fB\^\\$1\^\fR\\$2
Packit 5bd3a9
.el \fI\^\\$1\^\fP\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.de hN
Packit 5bd3a9
.ie t <\fB\\$1\fR>\\$2
Packit 5bd3a9
.el <\fI\\$1\fP>\\$2
Packit 5bd3a9
..
Packit 5bd3a9
.ny0
Packit 5bd3a9
.TH XCrossingEvent __libmansuffix__ __xorgversion__ "XLIB FUNCTIONS"
Packit 5bd3a9
.SH NAME
Packit 5bd3a9
XCrossingEvent \- EnterNotify and LeaveNotify event structure
Packit 5bd3a9
.SH STRUCTURES
Packit 5bd3a9
The structure for
Packit 5bd3a9
.ZN EnterNotify 
Packit 5bd3a9
and
Packit 5bd3a9
.ZN LeaveNotify
Packit 5bd3a9
events contains:
Packit 5bd3a9
.LP
Packit 5bd3a9
.Ds 0
Packit 5bd3a9
typedef struct {
Packit 5bd3a9
        int type;       /\&* EnterNotify or LeaveNotify */
Packit 5bd3a9
        unsigned long serial;   /\&* # of last request processed by server */
Packit 5bd3a9
        Bool send_event;        /\&* true if this came from a SendEvent request */
Packit 5bd3a9
        Display *display;       /\&* Display the event was read from */
Packit 5bd3a9
        Window window;  /\&* ``event'' window reported relative to */
Packit 5bd3a9
        Window root;    /\&* root window that the event occurred on */
Packit 5bd3a9
        Window subwindow;       /\&* child window */
Packit 5bd3a9
        Time time;      /\&* milliseconds */
Packit 5bd3a9
        int x, y;       /\&* pointer x, y coordinates in event window */
Packit 5bd3a9
        int x_root, y_root;     /\&* coordinates relative to root */
Packit 5bd3a9
        int mode;       /\&* NotifyNormal, NotifyGrab, NotifyUngrab */
Packit 5bd3a9
        int detail;
Packit 5bd3a9
                /\&*
Packit 5bd3a9
                * NotifyAncestor, NotifyVirtual, NotifyInferior, 
Packit 5bd3a9
                * NotifyNonlinear,NotifyNonlinearVirtual
Packit 5bd3a9
                */
Packit 5bd3a9
        Bool same_screen;       /\&* same screen flag */
Packit 5bd3a9
        Bool focus;     /\&* boolean focus */
Packit 5bd3a9
        unsigned int state;     /\&* key or button mask */
Packit 5bd3a9
} XCrossingEvent;
Packit 5bd3a9
typedef XCrossingEvent XEnterWindowEvent;
Packit 5bd3a9
typedef XCrossingEvent XLeaveWindowEvent;
Packit 5bd3a9
.De
Packit 5bd3a9
.LP
Packit 5bd3a9
When you receive these events,
Packit 5bd3a9
the structure members are set as follows.
Packit 5bd3a9
.LP
Packit 5bd3a9
The type member is set to the event type constant name that uniquely identifies
Packit 5bd3a9
it.
Packit 5bd3a9
For example, when the X server reports a
Packit 5bd3a9
.ZN GraphicsExpose
Packit 5bd3a9
event to a client application, it sends an
Packit 5bd3a9
.ZN XGraphicsExposeEvent
Packit 5bd3a9
structure with the type member set to
Packit 5bd3a9
.ZN GraphicsExpose .
Packit 5bd3a9
The display member is set to a pointer to the display the event was read on.
Packit 5bd3a9
The send_event member is set to
Packit 5bd3a9
.ZN True
Packit 5bd3a9
if the event came from a
Packit 5bd3a9
.ZN SendEvent
Packit 5bd3a9
protocol request.
Packit 5bd3a9
The serial member is set from the serial number reported in the protocol
Packit 5bd3a9
but expanded from the 16-bit least-significant bits to a full 32-bit value.
Packit 5bd3a9
The window member is set to the window that is most useful to toolkit
Packit 5bd3a9
dispatchers.
Packit 5bd3a9
.LP
Packit 5bd3a9
The window member is set to the window on which the
Packit 5bd3a9
.ZN EnterNotify
Packit 5bd3a9
or
Packit 5bd3a9
.ZN LeaveNotify
Packit 5bd3a9
event was generated and is referred to as the event window. 
Packit 5bd3a9
This is the window used by the X server to report the event, 
Packit 5bd3a9
and is relative to the root
Packit 5bd3a9
window on which the event occurred. 
Packit 5bd3a9
The root member is set to the root window of the screen
Packit 5bd3a9
on which the event occurred.
Packit 5bd3a9
.LP
Packit 5bd3a9
For a
Packit 5bd3a9
.ZN LeaveNotify 
Packit 5bd3a9
event,
Packit 5bd3a9
if a child of the event window contains the initial position of the pointer,
Packit 5bd3a9
the subwindow component is set to that child.
Packit 5bd3a9
Otherwise, the X server sets the subwindow member to
Packit 5bd3a9
.ZN None .
Packit 5bd3a9
For an
Packit 5bd3a9
.ZN EnterNotify 
Packit 5bd3a9
event, if a child of the event window contains the final pointer position, 
Packit 5bd3a9
the subwindow component is set to that child or
Packit 5bd3a9
.ZN None .
Packit 5bd3a9
.LP
Packit 5bd3a9
The time member is set to the time when the event was generated
Packit 5bd3a9
and is expressed in milliseconds.
Packit 5bd3a9
The x and y members are set to the coordinates of the pointer position in 
Packit 5bd3a9
the event window.
Packit 5bd3a9
This position is always the pointer's final position,
Packit 5bd3a9
not its initial position.
Packit 5bd3a9
If the event window is on the same
Packit 5bd3a9
screen as the root window, x and y are the pointer coordinates
Packit 5bd3a9
relative to the event window's origin. 
Packit 5bd3a9
Otherwise, x and y are set to zero.
Packit 5bd3a9
The x_root and y_root members are set to the pointer's coordinates relative to the
Packit 5bd3a9
root window's origin at the time of the event.
Packit 5bd3a9
.LP
Packit 5bd3a9
The same_screen member is set to indicate whether the event window is on the same screen
Packit 5bd3a9
as the root window and can be either
Packit 5bd3a9
.ZN True 
Packit 5bd3a9
or
Packit 5bd3a9
.ZN False .
Packit 5bd3a9
If
Packit 5bd3a9
.ZN True ,
Packit 5bd3a9
the event and root windows are on the same screen.
Packit 5bd3a9
If
Packit 5bd3a9
.ZN False ,
Packit 5bd3a9
the event and root windows are not on the same screen.
Packit 5bd3a9
.LP
Packit 5bd3a9
The focus member is set to indicate whether the event window is the focus window or an
Packit 5bd3a9
inferior of the focus window.
Packit 5bd3a9
The X server can set this member to either
Packit 5bd3a9
.ZN True 
Packit 5bd3a9
or
Packit 5bd3a9
.ZN False .
Packit 5bd3a9
If
Packit 5bd3a9
.ZN True ,
Packit 5bd3a9
the event window is the focus window or an inferior of the focus window.
Packit 5bd3a9
If
Packit 5bd3a9
.ZN False ,
Packit 5bd3a9
the event window is not the focus window or an inferior of the focus window.
Packit 5bd3a9
.LP
Packit 5bd3a9
The state member is set to indicate the state of the pointer buttons and
Packit 5bd3a9
modifier keys just prior to the
Packit 5bd3a9
event.
Packit 5bd3a9
The X server can set this member to the bitwise inclusive OR of one 
Packit 5bd3a9
or more of the button or modifier key masks:
Packit 5bd3a9
.ZN Button1Mask ,
Packit 5bd3a9
.ZN Button2Mask ,
Packit 5bd3a9
.ZN Button3Mask ,
Packit 5bd3a9
.ZN Button4Mask ,
Packit 5bd3a9
.ZN Button5Mask ,
Packit 5bd3a9
.ZN ShiftMask ,
Packit 5bd3a9
.ZN LockMask ,
Packit 5bd3a9
.ZN ControlMask ,
Packit 5bd3a9
.ZN Mod1Mask ,
Packit 5bd3a9
.ZN Mod2Mask ,
Packit 5bd3a9
.ZN Mod3Mask ,
Packit 5bd3a9
.ZN Mod4Mask ,
Packit 5bd3a9
.ZN Mod5Mask .
Packit 5bd3a9
.LP
Packit 5bd3a9
The mode member is set to indicate whether the events are normal events, 
Packit 5bd3a9
pseudo-motion events
Packit 5bd3a9
when a grab activates, or pseudo-motion events when a grab deactivates.
Packit 5bd3a9
The X server can set this member to 
Packit 5bd3a9
.ZN NotifyNormal ,
Packit 5bd3a9
.ZN NotifyGrab ,
Packit 5bd3a9
or
Packit 5bd3a9
.ZN NotifyUngrab .
Packit 5bd3a9
.LP
Packit 5bd3a9
The detail member is set to indicate the notify detail and can be
Packit 5bd3a9
.ZN NotifyAncestor ,
Packit 5bd3a9
.ZN NotifyVirtual ,
Packit 5bd3a9
.ZN NotifyInferior ,
Packit 5bd3a9
.ZN NotifyNonlinear ,
Packit 5bd3a9
or
Packit 5bd3a9
.ZN NotifyNonlinearVirtual .
Packit 5bd3a9
.SH "SEE ALSO"
Packit 5bd3a9
XAnyEvent(__libmansuffix__),
Packit 5bd3a9
XButtonEvent(__libmansuffix__),
Packit 5bd3a9
XCreateWindowEvent(__libmansuffix__),
Packit 5bd3a9
XCirculateEvent(__libmansuffix__),
Packit 5bd3a9
XCirculateRequestEvent(__libmansuffix__),
Packit 5bd3a9
XColormapEvent(__libmansuffix__),
Packit 5bd3a9
XConfigureEvent(__libmansuffix__),
Packit 5bd3a9
XConfigureRequestEvent(__libmansuffix__),
Packit 5bd3a9
XDestroyWindowEvent(__libmansuffix__),
Packit 5bd3a9
XErrorEvent(__libmansuffix__),
Packit 5bd3a9
XExposeEvent(__libmansuffix__),
Packit 5bd3a9
XFocusChangeEvent(__libmansuffix__),
Packit 5bd3a9
XGraphicsExposeEvent(__libmansuffix__),
Packit 5bd3a9
XGravityEvent(__libmansuffix__),
Packit 5bd3a9
XKeymapEvent(__libmansuffix__),
Packit 5bd3a9
XMapEvent(__libmansuffix__),
Packit 5bd3a9
XMapRequestEvent(__libmansuffix__),
Packit 5bd3a9
XPropertyEvent(__libmansuffix__),
Packit 5bd3a9
XReparentEvent(__libmansuffix__),
Packit 5bd3a9
XResizeRequestEvent(__libmansuffix__),
Packit 5bd3a9
XSelectionClearEvent(__libmansuffix__),
Packit 5bd3a9
XSelectionEvent(__libmansuffix__),
Packit 5bd3a9
XSelectionRequestEvent(__libmansuffix__),
Packit 5bd3a9
XUnmapEvent(__libmansuffix__),
Packit 5bd3a9
XVisibilityEvent(__libmansuffix__)
Packit 5bd3a9
.br
Packit 5bd3a9
\fI\*(xL\fP