a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync/*
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Copyright © 2009 Red Hat, Inc.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Permission is hereby granted, free of charge, to any person obtaining a
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * copy of this software and associated documentation files (the "Software"),
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * to deal in the Software without restriction, including without limitation
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * the rights to use, copy, modify, merge, publish, distribute, sublicense,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * and/or sell copies of the Software, and to permit persons to whom the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Software is furnished to do so, subject to the following conditions:
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * The above copyright notice and this permission notice (including the next
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * paragraph) shall be included in all copies or substantial portions of the
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * Software.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync * DEALINGS IN THE SOFTWARE.
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync *
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync */
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#ifndef _EVENTCONVERT_H_
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/X.h>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include <X11/extensions/XIproto.h>
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include "input.h"
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include "events.h"
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#include "eventstr.h"
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_EXPORT int EventToXI2(InternalEvent *ev, xEvent **xi);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_INTERNAL int GetCoreType(enum EventType type);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_INTERNAL int GetXIType(enum EventType type);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync_X_INTERNAL int GetXI2Type(enum EventType type);
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync
a3f3701cea1ba388e7c877955252bb7375eedebdvboxsync#endif /* _EVENTCONVERT_H_ */