blob: af586e46ec9cc807d0dad0b9cf8b9943b8541fb7 [file] [log] [blame]
oshima@chromium.org6c32d0b2012-04-07 09:33:04 +09001// Copyright (c) 2012 The Chromium Authors. All rights reserved.
oshima@google.com9b786a52011-10-06 02:14:33 +09002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef BASE_EVENT_TYPES_H
6#define BASE_EVENT_TYPES_H
oshima@google.com9b786a52011-10-06 02:14:33 +09007
8#include "build/build_config.h"
9
10#if defined(OS_WIN)
11#include <windows.h>
msb@chromium.orgb1aa6a02011-11-15 04:23:46 +090012#elif defined(USE_X11)
oshima@google.com9b786a52011-10-06 02:14:33 +090013typedef union _XEvent XEvent;
dhollowa@chromium.orgbc3e3612011-12-20 13:20:15 +090014#elif defined(OS_MACOSX)
15#if defined(__OBJC__)
16@class NSEvent;
17#else // __OBJC__
18class NSEvent;
19#endif // __OBJC__
oshima@google.com9b786a52011-10-06 02:14:33 +090020#endif
21
22namespace base {
23
24// Cross platform typedefs for native event types.
25#if defined(OS_WIN)
26typedef MSG NativeEvent;
27#elif defined(USE_X11)
28typedef XEvent* NativeEvent;
dhollowa@chromium.orgbc3e3612011-12-20 13:20:15 +090029#elif defined(OS_MACOSX)
30typedef NSEvent* NativeEvent;
oshima@google.com9b786a52011-10-06 02:14:33 +090031#else
32typedef void* NativeEvent;
33#endif
34
35} // namespace base
36
37#endif // BASE_EVENT_TYPES_H