events.h revision 645f5050
1645f5050Syouri/*****************************************************************************/ 2645f5050Syouri/** Copyright 1988 by Evans & Sutherland Computer Corporation, **/ 3645f5050Syouri/** Salt Lake City, Utah **/ 4645f5050Syouri/** Portions Copyright 1989 by the Massachusetts Institute of Technology **/ 5645f5050Syouri/** Cambridge, Massachusetts **/ 6645f5050Syouri/** **/ 7645f5050Syouri/** All Rights Reserved **/ 8645f5050Syouri/** **/ 9645f5050Syouri/** Permission to use, copy, modify, and distribute this software and **/ 10645f5050Syouri/** its documentation for any purpose and without fee is hereby **/ 11645f5050Syouri/** granted, provided that the above copyright notice appear in all **/ 12645f5050Syouri/** copies and that both that copyright notice and this permis- **/ 13645f5050Syouri/** sion notice appear in supporting documentation, and that the **/ 14645f5050Syouri/** names of Evans & Sutherland and M.I.T. not be used in advertising **/ 15645f5050Syouri/** in publicity pertaining to distribution of the software without **/ 16645f5050Syouri/** specific, written prior permission. **/ 17645f5050Syouri/** **/ 18645f5050Syouri/** EVANS & SUTHERLAND AND M.I.T. DISCLAIM ALL WARRANTIES WITH REGARD **/ 19645f5050Syouri/** TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANT- **/ 20645f5050Syouri/** ABILITY AND FITNESS, IN NO EVENT SHALL EVANS & SUTHERLAND OR **/ 21645f5050Syouri/** M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAM- **/ 22645f5050Syouri/** AGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA **/ 23645f5050Syouri/** OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER **/ 24645f5050Syouri/** TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE **/ 25645f5050Syouri/** OR PERFORMANCE OF THIS SOFTWARE. **/ 26645f5050Syouri/*****************************************************************************/ 27645f5050Syouri/* 28645f5050Syouri * [ ctwm ] 29645f5050Syouri * 30645f5050Syouri * Copyright 1992 Claude Lecommandeur. 31645f5050Syouri * 32645f5050Syouri * Permission to use, copy, modify and distribute this software [ctwm] and 33645f5050Syouri * its documentation for any purpose is hereby granted without fee, provided 34645f5050Syouri * that the above copyright notice appear in all copies and that both that 35645f5050Syouri * copyright notice and this permission notice appear in supporting documen- 36645f5050Syouri * tation, and that the name of Claude Lecommandeur not be used in adverti- 37645f5050Syouri * sing or publicity pertaining to distribution of the software without 38645f5050Syouri * specific, written prior permission. Claude Lecommandeur make no represen- 39645f5050Syouri * tations about the suitability of this software for any purpose. It is 40645f5050Syouri * provided "as is" without express or implied warranty. 41645f5050Syouri * 42645f5050Syouri * Claude Lecommandeur DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 43645f5050Syouri * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO 44645f5050Syouri * EVENT SHALL Claude Lecommandeur BE LIABLE FOR ANY SPECIAL, INDIRECT OR 45645f5050Syouri * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF 46645f5050Syouri * USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 47645f5050Syouri * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 48645f5050Syouri * PERFORMANCE OF THIS SOFTWARE. 49645f5050Syouri * 50645f5050Syouri * Author: Claude Lecommandeur [ lecom@sic.epfl.ch ][ April 1992 ] 51645f5050Syouri */ 52645f5050Syouri 53645f5050Syouri 54645f5050Syouri/*********************************************************************** 55645f5050Syouri * 56645f5050Syouri * $XConsortium: events.h,v 1.14 91/05/10 17:53:58 dave Exp $ 57645f5050Syouri * 58645f5050Syouri * twm event handler include file 59645f5050Syouri * 60645f5050Syouri * 17-Nov-87 Thomas E. LaStrange File created 61645f5050Syouri * 62645f5050Syouri ***********************************************************************/ 63645f5050Syouri 64645f5050Syouri#ifndef _EVENTS_ 65645f5050Syouri#define _EVENTS_ 66645f5050Syouri 67645f5050Syouri#include <X11/Xlib.h> 68645f5050Syouri#include <X11/Xproto.h> 69645f5050Syouri 70645f5050Syouritypedef void (*event_proc)(void); 71645f5050Syouri 72645f5050Syouriextern void InitEvents(void); 73645f5050Syouriextern Bool StashEventTime(register XEvent *ev); 74645f5050Syouriextern Time lastTimestamp; 75645f5050Syouriextern void SimulateMapRequest(Window w); 76645f5050Syouriextern void AutoRaiseWindow(TwmWindow *tmp); 77645f5050Syouriextern void SetRaiseWindow (TwmWindow *tmp); 78645f5050Syouriextern void AutoLowerWindow(TwmWindow *tmp); 79645f5050Syouri#define LastTimestamp() lastTimestamp 80645f5050Syouriextern Window WindowOfEvent (XEvent *e); 81645f5050Syouriextern void FixRootEvent (XEvent *e); 82645f5050Syouriextern Bool DispatchEvent(void); 83645f5050Syouriextern Bool DispatchEvent2(void); 84645f5050Syouriextern void HandleEvents(void); 85645f5050Syouriextern void HandleExpose(void); 86645f5050Syouriextern void HandleDestroyNotify(void); 87645f5050Syouriextern void HandleMapRequest(void); 88645f5050Syouriextern void HandleMapNotify(void); 89645f5050Syouriextern void HandleUnmapNotify(void); 90645f5050Syouriextern void HandleMotionNotify(void); 91645f5050Syouriextern void HandleButtonRelease(void); 92645f5050Syouriextern void HandleButtonPress(void); 93645f5050Syouriextern void HandleEnterNotify(void); 94645f5050Syouriextern void HandleLeaveNotify(void); 95645f5050Syouriextern void HandleConfigureRequest(void); 96645f5050Syouriextern void HandleClientMessage(void); 97645f5050Syouriextern void HandlePropertyNotify(void); 98645f5050Syouriextern void HandleKeyPress(void); 99645f5050Syouriextern void HandleKeyRelease(void); 100645f5050Syouriextern void HandleColormapNotify(void); 101645f5050Syouriextern void HandleVisibilityNotify(void); 102645f5050Syouriextern void HandleUnknown(void); 103645f5050Syouriextern void HandleFocusIn(XFocusInEvent *event); 104645f5050Syouriextern void HandleFocusOut(XFocusOutEvent *event); 105645f5050Syouriextern void SynthesiseFocusOut(Window w); 106645f5050Syouriextern void SynthesiseFocusIn(Window w); 107645f5050Syouriextern int Transient(Window w, Window *propw); 108645f5050Syouri 109645f5050Syouriextern ScreenInfo *FindScreenInfo(Window w); 110645f5050Syouri 111645f5050Syouriextern int InstallWindowColormaps (int type, TwmWindow *tmp); 112645f5050Syouriextern int InstallColormaps (int type, Colormaps *cmaps); 113645f5050Syouriextern void InstallRootColormap(void); 114645f5050Syouriextern void UninstallRootColormap(void); 115645f5050Syouriextern void ConfigureRootWindow (XEvent *ev); 116645f5050Syouri 117645f5050Syouriextern void free_cwins (TwmWindow *tmp); 118645f5050Syouri 119645f5050Syouriextern event_proc EventHandler[]; 120645f5050Syouriextern Window DragWindow; 121645f5050Syouriextern int origDragX; 122645f5050Syouriextern int origDragY; 123645f5050Syouriextern int DragX; 124645f5050Syouriextern int DragY; 125645f5050Syouriextern unsigned int DragWidth; 126645f5050Syouriextern unsigned int DragHeight; 127645f5050Syouriextern unsigned int DragBW; 128645f5050Syouriextern int CurrentDragX; 129645f5050Syouriextern int CurrentDragY; 130645f5050Syouri 131645f5050Syouriextern int ButtonPressed; 132645f5050Syouriextern int Cancel; 133645f5050Syouri 134645f5050Syouriextern XEvent Event; 135645f5050Syouri 136645f5050Syouri#endif /* _EVENTS_ */ 137