#ifndef UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_X_H_
#define UI_EVENTS_KEYCODES_KEYBOARD_CODE_CONVERSION_X_H_
#include <stdint.h>
#include "ui/events/keycodes/dom/dom_key.h"
#include "ui/events/keycodes/keyboard_codes_posix.h"
#include "ui/events/keycodes/keycodes_x_export.h"
#include "ui/gfx/x/connection.h"
#include "ui/gfx/x/event.h"
#if !BUILDFLAG(IS_OHOS)
#include "ui/gfx/x/xinput.h"
#else
#include "ui/gfx/x/generated_protos/xinput.h"
#endif
namespace ui {
enum class DomCode : uint32_t;
KEYCODES_X_EXPORT KeyboardCode KeyboardCodeFromXKeyEvent(const x11::Event& xev);
KEYCODES_X_EXPORT KeyboardCode KeyboardCodeFromXKeysym(unsigned int keysym);
KEYCODES_X_EXPORT DomCode CodeFromXEvent(const x11::Event& xev);
KEYCODES_X_EXPORT uint16_t GetCharacterFromXEvent(const x11::Event& xev);
KEYCODES_X_EXPORT DomKey GetDomKeyFromXEvent(const x11::Event& xev);
#if BUILDFLAG(ARKWEB_INPUT_EVENTS)
KEYCODES_X_EXPORT int XKeysymForWindowsKeyCode(KeyboardCode keycode,
bool shift, bool capslock);
#else
KEYCODES_X_EXPORT int XKeysymForWindowsKeyCode(KeyboardCode keycode,
bool shift);
#endif
KEYCODES_X_EXPORT unsigned int XKeyCodeForWindowsKeyCode(
KeyboardCode key_code,
int flags,
x11::Connection* connection);
KEYCODES_X_EXPORT KeyboardCode
DefaultKeyboardCodeFromHardwareKeycode(unsigned int hardware_code);
KEYCODES_X_EXPORT uint32_t
GetXI2StateFromEvent(const x11::Input::DeviceEvent& xievent);
KEYCODES_X_EXPORT int XkbGroupForCoreState(int state);
}
#endif