EventI.h revision 444c061a
1444c061aSmrg/* $Xorg: EventI.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ */
2444c061aSmrg/* $oHeader: EventI.h,v 1.3 88/08/24 09:21:11 asente Exp $ */
3444c061aSmrg
4444c061aSmrg/***********************************************************
5444c061aSmrg
6444c061aSmrgCopyright 1987, 1988, 1998  The Open Group
7444c061aSmrg
8444c061aSmrgPermission to use, copy, modify, distribute, and sell this software and its
9444c061aSmrgdocumentation for any purpose is hereby granted without fee, provided that
10444c061aSmrgthe above copyright notice appear in all copies and that both that
11444c061aSmrgcopyright notice and this permission notice appear in supporting
12444c061aSmrgdocumentation.
13444c061aSmrg
14444c061aSmrgThe above copyright notice and this permission notice shall be included in
15444c061aSmrgall copies or substantial portions of the Software.
16444c061aSmrg
17444c061aSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18444c061aSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19444c061aSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
20444c061aSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21444c061aSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22444c061aSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23444c061aSmrg
24444c061aSmrgExcept as contained in this notice, the name of The Open Group shall not be
25444c061aSmrgused in advertising or otherwise to promote the sale, use or other dealings
26444c061aSmrgin this Software without prior written authorization from The Open Group.
27444c061aSmrg
28444c061aSmrg
29444c061aSmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
30444c061aSmrg
31444c061aSmrg                        All Rights Reserved
32444c061aSmrg
33444c061aSmrgPermission to use, copy, modify, and distribute this software and its
34444c061aSmrgdocumentation for any purpose and without fee is hereby granted,
35444c061aSmrgprovided that the above copyright notice appear in all copies and that
36444c061aSmrgboth that copyright notice and this permission notice appear in
37444c061aSmrgsupporting documentation, and that the name of Digital not be
38444c061aSmrgused in advertising or publicity pertaining to distribution of the
39444c061aSmrgsoftware without specific, written prior permission.
40444c061aSmrg
41444c061aSmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
42444c061aSmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
43444c061aSmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
44444c061aSmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45444c061aSmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
46444c061aSmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47444c061aSmrgSOFTWARE.
48444c061aSmrg
49444c061aSmrg******************************************************************/
50444c061aSmrg/* $XFree86: xc/lib/Xt/EventI.h,v 1.3 2001/12/14 19:56:12 dawes Exp $ */
51444c061aSmrg
52444c061aSmrg/*
53444c061aSmrg * Event.h - exported types and functions for toolkit event handler
54444c061aSmrg *
55444c061aSmrg * Author:	Charles Haynes
56444c061aSmrg * 		Digital Equipment Corporation
57444c061aSmrg * 		Western Software Laboratory
58444c061aSmrg * Date:	Sun Dec  6 1987
59444c061aSmrg */
60444c061aSmrg
61444c061aSmrg#ifndef _Event_h_
62444c061aSmrg#define _Event_h_
63444c061aSmrg
64444c061aSmrgtypedef struct _XtGrabRec  *XtGrabList;
65444c061aSmrg
66444c061aSmrg#include "PassivGraI.h"
67444c061aSmrg
68444c061aSmrgextern void _XtEventInitialize(
69444c061aSmrg    void
70444c061aSmrg);
71444c061aSmrg
72444c061aSmrgtypedef struct _XtEventRec {
73444c061aSmrg     XtEventTable	next;
74444c061aSmrg     EventMask		mask;	/*  also select_data count for RecExt */
75444c061aSmrg     XtEventHandler	proc;
76444c061aSmrg     XtPointer		closure;
77444c061aSmrg     unsigned int	select:1;
78444c061aSmrg     unsigned int	has_type_specifier:1;
79444c061aSmrg     unsigned int	async:1; /* not used, here for Digital extension? */
80444c061aSmrg} XtEventRec;
81444c061aSmrg
82444c061aSmrgtypedef struct _XtGrabRec {
83444c061aSmrg    XtGrabList next;
84444c061aSmrg    Widget   widget;
85444c061aSmrg    unsigned int exclusive:1;
86444c061aSmrg    unsigned int spring_loaded:1;
87444c061aSmrg}XtGrabRec;
88444c061aSmrg
89444c061aSmrgtypedef struct _BlockHookRec {
90444c061aSmrg    struct _BlockHookRec* next;
91444c061aSmrg    XtAppContext app;
92444c061aSmrg    XtBlockHookProc proc;
93444c061aSmrg    XtPointer closure;
94444c061aSmrg} BlockHookRec, *BlockHook;
95444c061aSmrg
96444c061aSmrgextern void _XtFreeEventTable(
97444c061aSmrg    XtEventTable*	/* event_table */
98444c061aSmrg);
99444c061aSmrg
100444c061aSmrgextern Boolean _XtOnGrabList(
101444c061aSmrg    Widget	/* widget */,
102444c061aSmrg    XtGrabRec*	/* grabList */
103444c061aSmrg);
104444c061aSmrg
105444c061aSmrgextern void _XtRemoveAllInputs(
106444c061aSmrg    XtAppContext /* app */
107444c061aSmrg);
108444c061aSmrg
109444c061aSmrgextern void _XtRefreshMapping(
110444c061aSmrg    XEvent*	/* event */,
111444c061aSmrg    _XtBoolean	/* dispatch */
112444c061aSmrg);
113444c061aSmrg
114444c061aSmrgextern void _XtSendFocusEvent(
115444c061aSmrg    Widget	/* child */,
116444c061aSmrg    int		/* type */);
117444c061aSmrg
118444c061aSmrgextern EventMask _XtConvertTypeToMask(
119444c061aSmrg    int		/* eventType */
120444c061aSmrg);
121444c061aSmrg
122444c061aSmrg/* EventUtil.c */
123444c061aSmrgextern Widget _XtFindRemapWidget(XEvent *event, Widget widget,
124444c061aSmrg				 EventMask mask, XtPerDisplayInput pdi);
125444c061aSmrgextern void _XtUngrabBadGrabs(XEvent *event, Widget widget,
126444c061aSmrg				 EventMask mask, XtPerDisplayInput pdi);
127444c061aSmrgextern void _XtFillAncestorList(Widget **listPtr, int *maxElemsPtr,
128444c061aSmrg				int *numElemsPtr, Widget start,
129444c061aSmrg				Widget breakWidget);
130444c061aSmrg
131444c061aSmrg/* NextEvent.c */
132444c061aSmrgextern Boolean XtAppPeekEvent_SkipTimer;
133444c061aSmrg
134444c061aSmrg#endif /* _Event_h_ */
135