[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This section describes all event types by listing their fields and basic
information on when they are generated. All events are defined in the
module Xlib.protocol.event
. All event types have the following
two attributes:
Stores the X type code of this event. Type codes are integers in the
range 2-127, and are defined with symbolic names in Xlib.X
. The
symbolic names are the same as the event class names, except for the
special event AnyEvent
.
This attribute is normally 0, meaning that the event was generated by the X server. It is set to 1 if this event was instead sent from another client.
Event object can be created by instantiating the corresponding event class, providing all the attributes described for the event as keyword arguments.
These events are generated when a key or a button logically changes
state, or when the pointer logically moves. In the discussion below,
the source window is the window that the event occured in. The
event may be generated on some other window than the source window, see
XKeyEvent(3X11) for details. The same man page also describes
MotionNotify
.
The server X time when this event was generated.
The root window which the source window is an inferior of.
The window the event is reported on.
Set to 1 if window
is on the same screen as root
, 0
otherwise.
If the source window is an inferior of window
, child
is
set to the child of window
that is the ancestor of (or is) the
source window. Otherwise it is set to X.NONE
.
The pointer coordinates at the time of the event, relative to the root window.
The pointer coordinates at the time of the event, relative to
window
. If window
is not on the same screen as
root
, these are set to 0.
The logical state of the button and modifier keys just before the event.
For KeyPress
and KeyRelease
, this is the keycode of the
event key.
For ButtonPress
and ButtonRelease
, this is the button of
the event.
For MotionNotify
, this is either X.NotifyNormal
or
X.NotifyHint
.
If pointer motion or window hierarchy change causes the pointer to be in
another window than before, these events are generated instead of
a MotionNotify
event.
The semantics are quite complex, see XCrossingEvent(3X11) for details.
The server X time when this event was generated.
The root window of the pointer at the end of this event.
The window the event is reported for.
In a LeaveNotify
event, if a child of window
contains the
initial pointer position, this is set to that child window.
In a EnterNotify
event, if a child of window
contains the
final pointer position, this is set to that child window.
Otherwise this is set to X.NONE
.
The final pointer position relative to root
.
The final pointer position relative to window
.
The modifier and button state at the time of the event.
One of X.NotifyNormal
, X.NotifyGrab
or
X.NotifyUngrab
.
One of X.NotifyAncestor
, X.NotifyVirtual
,
X.NotifyInferior
, X.NotifyNonlinear
, or
X.NotifyNonlinearVirtual
.
If bit 0 is set, window
is the focus window or an inferior of it.
If bit 1 is set, window
is on the same screen as root
.
These events are generated when the focus changes. This is also very complex events, see XFocusChangeEvent(3X11) for details.
The window the event is generated for.
One of X.NotifyNormal
, X.NotifyWhileGrabbed
,
X.NotifyGrab
, or X.NotifyUngrab
.
One of X.NotifyAncestor
, X.NotifyVirtual
,
X.NotifyInferior
, X.NotifyNonlinear
,
X.NotifyNonlinearVirtual
, X.NotifyPointer
,
X.NotifyPointerRoot
, or X.NONE
.
This event is generated immediately after every EnterNotify
and
FocusIn
.
A list of 31 eight-bit integers, as returned by query_keymap.
This event is generated when regions of a window has to be redrawn. The
regions are decomposed into a set of rectangles, and an Expose
event is generated for each rectangle.
The window containing regions to redraw.
The coordinates of the rectangle to redraw.
At least this many more Expose
events will immediately follow for
this window. If this is the last event, count
is set to 0.
This allows a simple application to ignore all Expose
events
with a non-zero count
, and then redraw the entire window when the
zero event is received.
These events may be generated for drawables when a graphics context with
graphics_exposures
selected is used. See
XGraphicsExposeEvent(3X11) for details.
Both events have these attributes:
The drawable of the event.
The major and minor number of the request that generated this event.
For the core protocol major_event
is always 62 (CopyArea) or 63
(CopyPlane), and minor_event
is always 0.
GraphicsExpose have these additional attributes:
The coordinates of the event region.
At least this many more GraphicsExposure
events follows. The
last one has count
set to 0.
These events are generated when the visibility of a viewable window is changed. See XVisibilityNotifyEvent(3X11).
The window of the event.
One of X.VisibilityUnobscured
,
X.VisibilityPartiallyObscured
, or X.VisibilityFullyObscured
.
This event is generated when a window is created.
X.SubstructureNotifyMask
must be selected on the parent of the
new window to receive this event.
The parent of the new window.
The new window.
These values are fetched from the create_window
call.
This event is generated when a window is destroyed.
The window that the event is generated for.
The window that was destroyed.
This event is generated when a window is unmapped.
The window that the event is generated for.
The window that was unmapped.
This is true if window
was unmapped because its parent was
resized and window
had win-gravity X.UnmapGravity
.
This event is generated when a window is mapped.
The window that the event is generated for.
The window that was mapped.
This is set from the corresponding window attribute.
This event is reported to the client that has set
X.SubstructureRedirectMask
on a window, and an unmapped child of
that window attempts to be mapped by some other client, unless the child
has override-redirect set.
The parent window.
The child window that attempts to be mapped.
This event is reported to clients selecting
X.SubstructureNotifyMask
on either the old or the new parent and
to clients selecting X.StructureNotifyMask
on the reparented
window.
The window the event is generated for.
The reparented window.
The new parent window.
The coordinates of the upper-left outer corner of window
in
parent
.
This is set from the corresponding attribute on window
.
This event is generated when a configure request actually changes the state of the window.
The window that the event is generated for.
The window that has been changed.
The new coordinate and geometry of window
.
This is X.NONE
if this window is at the bottom of the window
stack. Otherwise it is the sibling window that window
is
immediately above.
This is set from the corresponding attribute on window
.
This event is reported to the client that has set
X.SubstructureRedirectMask
on the parent of a window that another
client attempts to configure, unless the window has override-redirect
set.
The parent of the window being configured.
The window being configured.
A bitmask indicating which values that the caller tries to change.
The window geometry in the configure call. If X.CWX
,
X.CWY
, X.CWWidth
, X.CWHeight
, or
X.CWBorderWidth
is set in value_mask
, the corresponding
attributes contains the new value as given in the configure call,
otherwise the current value is used.
If X.CWStackMode
is set in value_mask
, this is the stack
mode specified in the configure call, one of X.Above
,
X.Below
, X.TopIf
, X.BottomIf
, or
X.Opposite
. If the flag is not set, this is set to
X.Above
.
If X.CWSibling
is set in value_mask
, this is the sibling
window specified in the configure call. If the flag is not set, this is
set to X.NONE
.
This event is generated when a window is moved because its parent’s size has changed.
The window the event is generated for.
The window that moved.
The new coordinates of the upper-left outer corner of window
.
This is reported to the client selecting X.ResizeRedirectMask
on
a window, and another client attempts to resize it.
The window that was attempted to be resized.
The requested size of the window, excluding the border.
This event is generated when a window is restacked caused by a circulate call.
The window the event is reported on.
The window that has been restacked.
Either X.PlaceOnTop
or X.PlaceOnBottom
.
This event is reported to the client that has set
X.SubstructureRedirectMask
on the parent of a window that needs
to be restacked as a result of a circulate call on the parent.
The parent window.
The window that should be restacked.
Where window
should be placed, either X.PlaceOnTop
or
X.PlaceOnBottom
.
This event is generated when a property on a window is changed.
The window which the property is or was set on.
The atom identifying the property.
The server X time when the property was changed.
What was changed, either X.PropertyNewValue
or
X.PropertyDelete
.
This event is reported to the owner of a selection when it has gotten a new owner.
The owner window of the selection.
The selection atom.
The server X time when the selection was last changed.
This event is reported to the owner of a selection when a client requests it by calling convert_selection.
The owner window of the selection.
These attributes are fetched from the convert_selection call.
This event is generated by the server if there are no owner of a selection when convert_selection is called. If there is an owner, it should send this event to the requestor when the selection has been converted.
See XSelectionEvent(3X11).
This event is generated when the colormap attribute of a window is set, or when a window’s colormap is installed or uninstalled.
The affected window.
The colormap of the window, or X.NONE
.
Set to 1 if the colormap attribute has been set, 0 when the colormap is installed or uninstalled.
Indicates whether the colormap is installed or not, either
X.ColormapInstalled
or X.ColormapUninstalled
.
This event is sent to all clients, without any event mask having to be set. It is sent when the keyboard or pointer mapping is changed.
The mapping that has changed, one of X.MappingModifier
,
X.MappingKeyboard
or X.Pointer
.
If the keyboard mapping has changed, this is the range of modified keycodes.
This event is only generated by clients using send_event.
The destination window of the event.
The type of message, an atom.
The message data as a tuple: (format, mdata)
Format must be one of 8, 16, or 32. mdata must either be a string of exactly 20 characters, or a list of exactly 20, 10 or 5 integers depending of the format.
This event is represents an event the Xlib does not recognise. These
should never be returned by Display.next_event()
, but they might
be useful for sending special events to other clients.
An eight-bit integer.
A string of exactly 28 characters.
[ << ] | [ < ] | [ Up ] | [ > ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
This document was generated on September 16, 2020 using texi2html 5.0.