1 /* 2 * Copyright (C) 2006-2021 Kim Woelders 3 * 4 * Permission is hereby granted, free of charge, to any person obtaining a copy 5 * of this software and associated documentation files (the "Software"), to 6 * deal in the Software without restriction, including without limitation the 7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 8 * sell copies of the Software, and to permit persons to whom the Software is 9 * furnished to do so, subject to the following conditions: 10 * 11 * The above copyright notice and this permission notice shall be included in 12 * all copies of the Software, its documentation and marketing & publicity 13 * materials, and acknowledgment shall be given in the documentation, materials 14 * and software packages that this Software was used. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 19 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 */ 23 #ifndef _EVENTS_H_ 24 #define _EVENTS_H_ 25 26 #include "xtypes.h" 27 28 /* Re-mapped X-events */ 29 #define EX_EVENT_CREATE_GONE 64 30 #define EX_EVENT_UNMAP_GONE 65 31 #define EX_EVENT_MAP_GONE 66 32 #define EX_EVENT_MAPREQUEST_GONE 67 33 #define EX_EVENT_REPARENT_GONE 68 34 35 #define EX_EVENT_SHAPE_NOTIFY 71 36 #define EX_EVENT_SAVER_NOTIFY 72 37 #define EX_EVENT_SCREEN_CHANGE_NOTIFY 73 38 #define EX_EVENT_DAMAGE_NOTIFY 74 39 #define EX_EVENT_GLX_FLIP 75 40 41 void EventsInit(void); 42 void EventsMain(void); 43 void EventShow(const XEvent * ev); 44 void EventShowError(const XEvent * ev); 45 46 typedef void (EventFdHandler) (void); 47 int EventFdRegister(int fd, EventFdHandler * handler); 48 void EventFdUnregister(int efd); 49 50 int EventsUpdateXY(int *px, int *py); 51 void EventsBlock(int mode); 52 53 void EventsRandrScreenChange(XEvent * xev); 54 55 #endif /* _EVENTS_H_ */ 56