📄 gravity.html
字号:
<HTML><HEAD><TITLE>Xlib Programming Manual: Events: GravityNotify</TITLE></HEAD><BODY><H1 ALIGN=center>10.10.5 GravityNotify Events</H1>The X server can report<B>GravityNotify</B>events to clients wanting information about when a window is moved because of achange in the size of its parent.The X server generates this event whenever a clientapplication actually moves a child window as a result of resizing its parent by calling<B><A HREF="../../window/XConfigureWindow.html">XConfigureWindow()</A></B>,<B><A HREF="../../window/XMoveResizeWindow.html">XMoveResizeWindow()</A></B>,or<B><A HREF="../../window/XResizeWindow.html">XResizeWindow()</A></B>. <P>To receive <B>GravityNotify</B>events, set the<B>StructureNotifyMask</B>bit in the <A HREF="../../window/attributes/event-and-do-not-propagate.html">event-mask</A> attribute of the window or the<B>SubstructureNotifyMask</B>bit in the <A HREF="../../window/attributes/event-and-do-not-propagate.html">event-mask</A> attribute of the parent window(in which case, any child that is moved because its parent has been resizedgenerates an event).<A NAME="XGravityEvent"></A><P>The structure for this event type contains:<P><PRE><CODE>typedef struct { int type; /* GravityNotify */ unsigned long serial; /* # of last request processed by server */ Bool send_event; /* true if this came from a <B><A HREF="../../appendix/a.html#SendEvent">SendEvent</A></B> request */ Display *display; /* Display the event was read from */ Window event; Window window; int x, y;} XGravityEvent;</CODE></PRE><P>The <B>event</B> member is set either to the window that was moved or to its parent,depending on whether<B>StructureNotify</B>or<B>SubstructureNotify</B>was selected.The <B>window</B> member is set to the child window that was moved.The <B>x</B> and <B>y</B> members are set to the coordinates relative to the new parent window's originand indicate the position of the upper-left outside corner of the window.<H5 ALIGN=right><I>Next: <A HREF="map.html">MapNotify Events</A></I></H5><HR><ADDRESS><A HREF="http://tronche.com/">Christophe Tronche</A>, <A HREF="mailto:ch.tronche@computer.org">ch.tronche@computer.org</A></ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -