blob: 7d8f50333f1ed811754c7df6cfa5fff38175bbfc [file] [log] [blame]
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#pragma once
#include "ui/gfx/native_widget_types.h"
#if defined(OS_LINUX)
typedef union _GdkEvent GdkEvent;
#if defined(USE_X11)
typedef union _XEvent XEvent;
namespace views {
// A note about NativeEvent and NativeEvent2.
// 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove
// Gtk/Gdk from the stack.
// 2. TOUCH_UI needs XEvents now for certain event types.
// 3. TOUCH_UI also needs GdkEvents for certain event types.
// => NativeEvent and NativeEvent2.
// Once we replace usage of Gtk/Gdk types with Xlib types across the board in
// views, we can remove NativeEvent2 and typedef XEvent* to NativeEvent. The
// world will then be beautiful(ish).
#if defined(OS_WIN)
typedef MSG NativeEvent;
#if defined(OS_LINUX)
typedef GdkEvent* NativeEvent;
#if defined(USE_X11)
typedef XEvent* NativeEvent2;
typedef void* NativeEvent2;
} // namespace views