1/*****************************************************************************/
2/*
3
4Copyright 1989, 1998  The Open Group
5
6Permission to use, copy, modify, distribute, and sell this software and its
7documentation for any purpose is hereby granted without fee, provided that
8the above copyright notice appear in all copies and that both that
9copyright notice and this permission notice appear in supporting
10documentation.
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
18OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
19AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22Except as contained in this notice, the name of The Open Group shall not be
23used in advertising or otherwise to promote the sale, use or other dealings
24in this Software without prior written authorization from The Open Group.
25
26*/
27/**       Copyright 1988 by Evans & Sutherland Computer Corporation,        **/
28/**                          Salt Lake City, Utah                           **/
29/**                        Cambridge, Massachusetts                         **/
30/**                                                                         **/
31/**                           All Rights Reserved                           **/
32/**                                                                         **/
33/**    Permission to use, copy, modify, and distribute this software and    **/
34/**    its documentation  for  any  purpose  and  without  fee is hereby    **/
35/**    granted, provided that the above copyright notice appear  in  all    **/
36/**    copies and that both  that  copyright  notice  and  this  permis-    **/
37/**    sion  notice appear in supporting  documentation,  and  that  the    **/
38/**    name of Evans & Sutherland not be used in advertising    **/
39/**    in publicity pertaining to distribution of the  software  without    **/
40/**    specific, written prior permission.                                  **/
41/**                                                                         **/
42/**    EVANS & SUTHERLAND DISCLAIMs ALL WARRANTIES WITH REGARD    **/
43/**    TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES  OF  MERCHANT-    **/
44/**    ABILITY  AND  FITNESS,  IN  NO  EVENT SHALL EVANS & SUTHERLAND    **/
45/**    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL  DAM-    **/
46/**    AGES OR  ANY DAMAGES WHATSOEVER  RESULTING FROM LOSS OF USE, DATA    **/
47/**    OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER    **/
48/**    TORTIOUS ACTION, ARISING OUT OF OR IN  CONNECTION  WITH  THE  USE    **/
49/**    OR PERFORMANCE OF THIS SOFTWARE.                                     **/
50/*****************************************************************************/
51
52/***********************************************************************
53 *
54 * twm event handler include file
55 *
56 * 17-Nov-87 Thomas E. LaStrange		File created
57 *
58 ***********************************************************************/
59
60#ifndef EVENTS_H
61#define EVENTS_H
62
63#include "screen.h"
64#include "twm.h"
65
66typedef void (*event_proc) (void);
67
68extern Time lastTimestamp;
69
70#define LastTimestamp() lastTimestamp
71
72extern void AutoRaiseWindow(TwmWindow *tmp);
73extern void SetRaiseWindow(TwmWindow *tmp);
74extern void InitEvents(void);
75extern Bool StashEventTime(XEvent *ev);
76extern Window WindowOfEvent(XEvent *e);
77extern Bool DispatchEvent2(void);
78extern Bool DispatchEvent(void);
79extern void HandleEvents(XtAppContext) _X_NORETURN;
80extern void HandleColormapNotify(void);
81extern void HandleVisibilityNotify(void);
82extern void HandleKeyPress(void);
83extern void free_cwins(TwmWindow *tmp);
84extern void HandlePropertyNotify(void);
85extern void HandleClientMessage(void);
86extern void HandleExpose(void);
87extern void HandleDestroyNotify(void);
88extern void HandleCreateNotify(void);
89extern void HandleMapRequest(void);
90extern void SimulateMapRequest(Window w);
91extern void HandleMapNotify(void);
92extern void HandleUnmapNotify(void);
93extern void HandleMotionNotify(void);
94extern void HandleButtonRelease(void);
95extern void HandleButtonPress(void);
96extern void HandleEnterNotify(void);
97extern void HandleLeaveNotify(void);
98extern void HandleConfigureRequest(void);
99extern void HandleShapeNotify(void);
100extern void HandleScreenChangeNotify(void);
101extern void HandleUnknown(void);
102extern int Transient(Window w, Window *propw);
103extern ScreenInfo *FindScreenInfo(Window w);
104extern void InstallWindowColormaps(int type, TwmWindow *tmp);
105extern void InstallRootColormap(void);
106extern void UninstallRootColormap(void);
107
108extern event_proc EventHandler[];
109extern Window DragWindow;
110extern int origDragX;
111extern int origDragY;
112extern int DragX;
113extern int DragY;
114extern int DragWidth;
115extern int DragHeight;
116extern int CurrentDragX;
117extern int CurrentDragY;
118
119extern int ButtonPressed;
120extern int Cancel;
121
122extern int Context;
123
124extern XEvent Event;
125
126extern unsigned int mods_used;
127
128extern int MovedFromKeyPress;
129
130#endif /* EVENTS_H */
131