#ifndef UI_EVENTS_X_EVENTS_X_UTILS_H_
#define UI_EVENTS_X_EVENTS_X_UTILS_H_
#include <stdint.h>
#include "base/time/tick_clock.h"
#include "base/time/time.h"
#include "ui/events/event_constants.h"
#include "ui/events/pointer_details.h"
#include "ui/events/types/event_type.h"
#include "ui/events/x/events_x_export.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/x/event.h"
#include "ui/gfx/x/xinput.h"
namespace ui {
EVENTS_X_EXPORT EventType EventTypeFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT int GetEventFlagsFromXKeyEvent(const x11::KeyEvent& key,
bool send_event);
EVENTS_X_EXPORT int EventFlagsFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT base::TimeTicks EventTimeFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT gfx::Point EventLocationFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT gfx::Point EventSystemLocationFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT int EventButtonFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT int GetChangedMouseButtonFlagsFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT gfx::Vector2d GetMouseWheelOffsetFromXEvent(
const x11::Event& xev);
EVENTS_X_EXPORT float GetStylusForceFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetStylusTiltXFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetStylusTiltYFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT PointerDetails
GetStylusPointerDetailsFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT int GetTouchIdFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetTouchRadiusXFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetTouchRadiusYFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetTouchAngleFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT float GetTouchForceFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT PointerDetails
GetTouchPointerDetailsFromXEvent(const x11::Event& xev);
EVENTS_X_EXPORT bool GetScrollOffsetsFromXEvent(const x11::Event& xev,
float* x_offset,
float* y_offset,
float* x_offset_ordinal,
float* y_offset_ordinal,
int* finger_count);
EVENTS_X_EXPORT bool GetFlingDataFromXEvent(const x11::Event& xev,
float* vx,
float* vy,
float* vx_ordinal,
float* vy_ordinal,
bool* is_cancel);
EVENTS_X_EXPORT bool IsAltPressed();
EVENTS_X_EXPORT int GetModifierKeyState();
EVENTS_X_EXPORT void ResetTimestampRolloverCountersForTesting();
}
#endif