Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(261)

Side by Side Diff: views/native_types.h

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge removal of compact nav. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « views/ime/input_method_ibus.cc ('k') | views/touchui/gesture_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef VIEWS_NATIVE_TYPES_H_
6 #define VIEWS_NATIVE_TYPES_H_
7 #pragma once
8
9 #include "ui/gfx/native_widget_types.h"
10
11 #if defined(OS_LINUX)
12 typedef union _GdkEvent GdkEvent;
13 #endif
14 #if defined(USE_X11)
15 typedef union _XEvent XEvent;
16 #endif
17 #if defined(USE_WAYLAND)
18 namespace ui {
19 union WaylandEvent;
20 }
21 #endif
22
23 #if defined(USE_AURA)
24 namespace aura {
25 class Event;
26 }
27 #endif
28
29 namespace views {
30
31 // A note about NativeEvent and NativeEvent2.
32 // 1. Eventually TOOLKIT_VIEWS will converge on using XEvent as we remove
33 // Gtk/Gdk from the stack.
34 // 2. TOUCH_UI needs XEvents now for certain event types.
35 // 3. TOUCH_UI also needs GdkEvents for certain event types.
36 //
37 // => NativeEvent and NativeEvent2.
38 //
39 // Once we replace usage of Gtk/Gdk types with Xlib types across the board in
40 // views, we can remove NativeEvent2 and typedef XEvent* to NativeEvent. The
41 // world will then be beautiful(ish).
42
43 #if defined(USE_AURA)
44 typedef aura::Event* NativeEvent;
45 #elif defined(OS_WIN)
46 typedef MSG NativeEvent;
47 #elif defined(OS_LINUX)
48
49 #if defined(USE_WAYLAND)
50 typedef ui::WaylandEvent* NativeEvent;
51 #else
52 typedef GdkEvent* NativeEvent;
53 #endif
54
55 #endif
56
57 #if defined(USE_X11)
58 typedef XEvent* NativeEvent2;
59 #else
60 typedef void* NativeEvent2;
61 #endif
62
63 } // namespace views
64
65 #endif // VIEWS_NATIVE_TYPES_H_
66
OLDNEW
« no previous file with comments | « views/ime/input_method_ibus.cc ('k') | views/touchui/gesture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698