16747b715Smrg/*
26747b715Smrg * Copyright © 2009 Red Hat, Inc.
36747b715Smrg *
46747b715Smrg * Permission is hereby granted, free of charge, to any person obtaining a
56747b715Smrg * copy of this software and associated documentation files (the "Software"),
66747b715Smrg * to deal in the Software without restriction, including without limitation
76747b715Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
86747b715Smrg * and/or sell copies of the Software, and to permit persons to whom the
96747b715Smrg * Software is furnished to do so, subject to the following conditions:
106747b715Smrg *
116747b715Smrg * The above copyright notice and this permission notice (including the next
126747b715Smrg * paragraph) shall be included in all copies or substantial portions of the
136747b715Smrg * Software.
146747b715Smrg *
156747b715Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
166747b715Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
176747b715Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
186747b715Smrg * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
196747b715Smrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
206747b715Smrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
216747b715Smrg * DEALINGS IN THE SOFTWARE.
226747b715Smrg *
236747b715Smrg */
246747b715Smrg
256747b715Smrg#ifndef _EVENTCONVERT_H_
266747b715Smrg#include <X11/X.h>
276747b715Smrg#include <X11/extensions/XIproto.h>
286747b715Smrg#include "input.h"
296747b715Smrg#include "events.h"
3035c4bbdfSmrg#include "eventstr.h"
316747b715Smrg
3235c4bbdfSmrg_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
336747b715Smrg_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
346747b715Smrg_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
3535c4bbdfSmrg_X_INTERNAL int GetCoreType(enum EventType type);
3635c4bbdfSmrg_X_INTERNAL int GetXIType(enum EventType type);
3735c4bbdfSmrg_X_INTERNAL int GetXI2Type(enum EventType type);
386747b715Smrg
39ed6184dfSmrg_X_INTERNAL enum EventType GestureTypeToBegin(enum EventType type);
40ed6184dfSmrg_X_INTERNAL enum EventType GestureTypeToEnd(enum EventType type);
41ed6184dfSmrg
4235c4bbdfSmrg#endif                          /* _EVENTCONVERT_H_ */
43